Need to ALE only 2 fields through a reduced message type copied from MATMAS
Only the Authorization group fields MARA-BEGRU and MARC-QMATA need to be transferred through ALE from one system to another one. A new reduced message type has been created from MATMAS.
The fields BEGRU and QMATA have been selected through the BD53 transaction to be part of the segments.
Result: 3 segments are part of the new Message type: E1MARAM and its 2 children E1MAKTM and E1MARCM.
Problem: Even the BD53 (Reduced message type) transaction has been used, too many unnecessary fields are transferred through the ALE.
The following fields in the E1MARAM segment must not been updated (transferred) in the receiving system:
They should disappear from the segment.
The E1MAKTM segment must not been transferred to the receiving system because the user does not want to modifiy the Material description. But the BD53 (reduce message type) seems to consider that segment as mandatory.
Only few 1EMARCM segments with specific Plants (WERKS) should be sent on the receiving system. Not all the Plants. That segment should not include the PSTAT field. I have no control on which Plants to transfer.
Only 2 segments must be ALE'd with only the following fields:
a) MATNR (Material number)
b) BEGRU (Authorization group)
a) WERKS (Plant)
b) QMATA (Material Authorization Group for Activities in QM).
What should I do to ALE only those 2 segments and only those specific fields?
Thanks a lot.
Ferry Lianto replied
Please try this in your user exits EXIT_SAPLMV01_002.
It works fine in my system when generating the IDoc.
DATA: WA_E1MARAM LIKE E1MARAM. IF SEGMENT_NAME = 'E1MARAM'. LOOP AT IDOC_DATA. CASE IDOC_DATA-SEGNAM. WHEN 'E1MARAM'. MOVE IDOC_DATA-SDATA TO WA_E1MARAM. MOVE SPACE TO WA_E1MARAM-PSTAT. MOVE SPACE TO WA_E1MARAM-MTART. MOVE SPACE TO WA_E1MARAM-MATKL. MOVE SPACE TO WA_E1MARAM-MEINS. MOVE SPACE TO WA_E1MARAM-SPART. MOVE WA_E1MARAM TO IDOC_DATA-SDATA. MODIFY IDOC_DATA. WHEN OTHERS. ENDCASE. ENDLOOP. ENDIF.