在sap定价中,经常会增加一些自定义的增强字段,这样在条件IDOC中无法自动包含这些字段的传输,这就需要做些增强扩展的开发,具体步骤如下notes。
587811 - Modification: ALE transfer of fields for bulkiness
Symptom
************************************************************************
* Caution: This is a modification *
* See Note 170183*
************************************************************************
During the distribution of freight condition records using message type 'COND_A' (Conditions: Master data for price determination) via ALE, the fields for bulkiness processing
- Cumulate Minimum Weights Indicator (MGKUM)
are not transferred to the target system.
Other Terms
TK12, TK13, IDoc, COND_A02, condition information, bulkiness factor, bulkiness
Reason and Prerequisites
Solution
Since enhancing IDoc basic type 'COND_A02' is not possible in the current release, a corresponding customer enhancement has to be used. The following is a description of the necessary steps for this:
1. Enhancement of IDoc type 'COND_A02'.
Note: For detailed documentation, you can refer to the SAP Library [path: Basis -> Basis Services / Communication Interface (BC-SRV) -> IDoc Interface (BC-SRV-EDI) -> IDoc Interface / Electronic Data Interchange (BC-SRV-EDI) -> Structure, Documentation and Definition of IDoc Types -> Define New IDoc Types -> Enhancement of an IDoc Type].
a) Create customer segment 'Z1KOMG' using Transaction 'WE31' [SAP Library: Enhancement of an IDoc Type -> Group segments]:
Field name |
Data element |
BUGRP |
VH_BUGRP |
MGKUM |
VH_MGKUM |
|
Save your entries. |
b) Define an enhancement for IDoc type 'COND_A02' using Transaction 'WE30' [SAP Library: Enhancement of an IDoc Type -> Enhance Basis Type]. Select 'Enhancement' as the development object. On the next dialog box select 'Create' and specify 'COND_A02' under 'Linked Basic Type'. Afterwards create an enhancement segment by positioning the cursor on segment 'E1KOMG':
Segment type |
Z1KOMG |
Min. number |
1 |
Max. number |
1 |
|
Save your entries. |
c) Using Transaction 'WE82', you can assign the enhancement to message type / basis type 'COND_A / COND_A02' [SAP Library: Enhancement of an IDoc Type -> Assign Message Type, Basis Type and Enhancement].
2. Adjust IDoc outbound processing.
a) Enhancement in function module 'MASTERIDOC_CREATE_COND_A'.
Add form 'FILL_Z1KOMG' to an include of function group 'VKOE' and enhance form 'EDIDD_FILL_AND_SEND' in accordance with the attached correction instruction.
b) Adjust the corresponding partner profiles using Transaction 'WE20' [SAP Library: Enhancement of an IDoc Type -> Change Partner Profiles (Outbound)]. Specify the name of the enhancement created above in the outbound parameters for message 'COND_A'.
3. Adjust IDoc inbound processing.
a) Enhancement in function module 'IDOC_INPUT_COND_A'.
Add form 'READ_SEG_Z1KOMG' to an include of function group 'VKOI' and enhance form 'FILL_APPL_STRUCTURES' in accordance with the attached correction instruction.
b) Enhance the assignment of function module 'IDOC_INPUT_COND_A' using Transaction 'WE57'. Define here that the function module may process the enhanced basic type with message 'COND_A'. In doing so, you enhance the ALE registration of the function module [SAP Library: Enhancement of an IDoc Type -> Enhance Assignment of the Function Module (direct inbound)].
4. Release the IDoc segment and the IDoc enhancement.
First release new segment 'Z1KOMG' and then your enhancement. You set the release from the respective development tool (see above) via 'Edit -> Set Release'. You can also cancel the release again via 'Edit -> Cancel Release' [SAP Library: Enhancement of an IDoc Type -> Release Newly Defined Objects].