2008 Mar 05 3:58 PM
Hi,
i have enhanced the base IDOC MATMAS05 by creating a customer segment. This segment has to be filled whenever the IDOC is transmitted by the BD21. But I don´t know how to enhance the BD21 without changing the standard. Is there an user-exit i can use?
May be someone can help me.
Greetings
Christian
2008 Mar 05 5:19 PM
Hi Christian,
You have to enhance your MATMAS Idoc in BD21 in customer-exit EXIT_SAPLMV01_002 (INCLUDE ZXMGVU03).
Reward points if useful.
Roger
2008 Mar 06 10:27 AM
Hi Roger,
Thank you for answer. I found the INCLUDE and tried to fill my segment with the following code:
DATA: lw_edidd01 TYPE edidd,
lw_ZMATFIL TYPE ZMATFIL.
IF message_type EQ 'MATMAS' AND
segment_name EQ 'ZMATFIL'.
LOOP AT idoc_data INTO lw_edidd01
WHERE segnam EQ 'ZMATFIL'.
MOVE: lw_edidd01 to lw_ZMATFIL,
F_MVKE-VKORG TO lw_ZMATFIL-VKORG,
lw_ZMATFIL TO lw_edidd01-sdata.
MODIFY: idoc_data FROM lw_edidd01 TRANSPORTING sdata.
ENDLOOP.
endif.So I started the BD21 with "MATMAS"!
But the "move"-statement is never reached because "segment_name " never becomes ZMATFIL.
So the IDOC was created. But when I looked for it in the WE02 it says "EDI Syntax error". Because my segment is marked as necessary.
Edited by: Christian Dsen on Mar 6, 2008 1:29 PM
2009 Aug 28 11:01 PM
Hi,
I have a similar issue. We have extended the MATMAS message type with a new segment for export data.
When we change the export data in MM02, it creates a change document (standard SAP).
Yet when I run BD21, it does not create a change pointer and fill that custom segment.
Any help is appreciated.
Thanks.
JP