2007 Nov 06 4:56 PM
Hi,
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:
- PSTAT,
- LVORM
- MTART
- MBRSH,
- MATKL,
- MEINS,
- GROES,
- WRKST,
- SPART,
- VPSTA.
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.
<u>Revision</u>:
Only 2 segments must be ALE'd with only the following fields:
1- <b>E1MARAM</b>:
a) MATNR (Material number)
b) BEGRU (Authorization group)
2- <b>E1MARCM:</b>
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.
Diane.
2007 Nov 08 9:28 PM
Hi Diane,
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.
Regards,
Ferry Lianto
2007 Nov 06 7:27 PM
Hi,
Welcome to SDN.
Please try to use IDoc Segment Filters (BD56) instead for message type MATMAS.
Regards,
Ferry Lianto
2007 Nov 06 8:00 PM
Ferry,
As suggested by you, I did the BD56 (IDoc Segment filters) transaction for the E1MARAM segment. I got the following error message:
"Mandatory segment E1MARAM in message type MATMAS05 cannot be filtered".
I would be satisfied if, at least, the following problem was resolved:
The E1MARAM segment has 2 children:
- E1MAKTM for the Material description in french;
- E1MAKTM for the Material description in english.
Those 2 Material descriptions must never been transferred to the Receiving system. Is there a manner to ignore them through ALE ?
Thanks.
Diane.
2007 Nov 06 8:18 PM
Hi Diane,
Well ... I am afraid you can not remove segment E1MAKTM. This is a mandatory segment as well.
The only I can suggest to use an user exits to remove the description values (blank them out). Will these meet your requirement?
Regards,
Ferry Lianto
2007 Nov 08 7:55 PM
Thanks Ferry,
I removed the description values for the <b>E1MAKTM</b> segment through the customer-function EXIT_SAPLMV01_002. It worked perfectly.
I tried to do the same thing with the <b>E1MARAM</b> segment to keep only the BEGRU (Authorization group) value.
<b>1- </b> The problem with that segment is the fact that it contains many fields that are all copied in the same IDoc field called IDOC_DATA-SDATA (1000 positions). When I want to blank out all of the other fields, I get an error message on the Receiving system saying that there are numeric fields with invalid values.
<b>2- </b> Another problem happened because the <b>E1MARAM</b> segment contains mandatory fields that cannot be blanked out: PSTAT, MTART, MATKL, MEINS, SPART, etc.
<b>3- </b> Finally, the manner I use to blank out the fields in the IDOC_DATA-SDATA field is: MOVE '/' to IDOC_DATA-SDATA21(40). Then, I bypass the fields that I cannot update. And I continue to do other statements MOVE '/' to IDOC_DATA-SDATAxx(xx). But, how to know if a field coming from MARA is always at the same positions in the IDOC_DATA-SDATA field.
Thanks,
Diane.
2024 Jun 02 3:41 PM
While 17 years since the original question, if anyone is interested, the list of this mandatory fields is stored in table TBD23 and you can edit the contents via SM30 using associated view V_TBD23.
BD53 reads this information in the underlying report RBDIDOCR using form GET_DATA into a local table FIELD_LIST (search for "FIELD_LIST-TYPE ='M'. " -> 'M' is the constant for compulsory field).
2007 Nov 08 9:28 PM
Hi Diane,
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.
Regards,
Ferry Lianto
2007 Nov 13 3:37 PM
Thanks Ferry for the previous answer,
I have a problem with the E1MARCM segment.
My sending and receiving systems do not have always the same Plant numbers.
If a Plant exists on the sending system and it does not on the receiving system, the Plant must not be created on the receiving system. But from the sending system, I do not know which Plants the receiving system has. This is why the IDoc contains all the Plants. But I added some logic in the <b>inbound</b> customer-function, EXIT_SAPLMV02_002, to ignore the Plants that do not exist on the receiving system in doing a SELECT on the MARC table in the receiving system.
But that customer-function is called from the IDOC_INPUT_MATMAS01 function module, in the " WHEN E1MARCM " section:
PERFORM CHECK_USER_EXIT TABLES T_EDIDD
USER_SEGMENTS
USING CURRENT TABIX.
LOOP AT USER_SEGMENTS.
CALL CUSTOMER-FUNCTION '002'
EXPORTING
MESSAGE_TYPE = IDOC_CONTRL-MESTYP
F_CUST_SEGMENT = USER_SEGMENTS
. . . . . . . . .
ENDLOOP.
In the perform check_user_exit, no record is created in the user_segments table because all the segments in my IDoc start with ' E1 ' :
LOOP AT IDOC_DATA INTO USER_SEGMENTS FROM CURRENT_TABIX.
IF USER_SEGMENTS-SEGNAM(2) = ' E1 '.
EXIT.
ENDIF.
APPEND USER_SEGMENTS.
ENDLOOP.
The customer-function is called within the ' loop at user_segments '. This is why the customer-function is never executed and my code is ignored. So, all the IDocs in the receiving system are in the status 51 (red light).
Do you have any idea how to resolve my problem.
Thanks.
Diane.