11-02-2006 7:18 PM
11-02-2006 7:30 PM
Hi Nagini,
First you need to identify the FM module that being is used for inbound or outbound IDoc process. Then next step is to find custom exit available inside the corresponding FM to add your custom codes.
For example, function module IDOC_OUTPUT_ORDRSP is used to generate the IDoc type ORDERS05.
There is a last user exits that can be used to modify the EDIDD segments prior to generate IDoc ORDERS05.
Let's say you want to add quotation date to segment E1EDK03.
*- final customer-Function
CALL CUSTOMER-FUNCTION '003'
EXPORTING
DCONTROL_RECORD_OUT = CONTROL_RECORD_OUT
DORDER_NUMBER = ORDER_RESPONSE_NUMBER
DXVBAK = XVBAK
DXHVBKD = XHVBKD
TABLES
DXVBKD = XVBKD
DXVBPA = XVBPA
DXVBAP = XVBAP
DXVBEP = XVBEP
DIKOMV = IKOMV
DIKOMVD = IKOMVD
DINT_EDIDD = INT_EDIDD
EXCEPTIONS
ERROR_MESSAGE_RECEIVED = 1
DATA_NOT_RELEVANT_FOR_SENDING = 2.
Then in user exits EXIT_SAPLVEDC_003, you can code like this.
data: wa_edidd like edidd,
wa_e1edk03 like e1edk03.
loop at dint_edidd.
if dint_edidd-segnam = 'E1EDK03'.
move dint_edidd-sdata to wa_e1edk03.
if wa_e1edk03-iddat = '013'.
exit.
else.
clear wa_edidd.
clear wa_e1edk03.
move dint_edidd to wa_edidd.
wa_e1edk03-iddat = '013'.
wa_e1edk03-datum = <quotation date>
move wa_e1edk03 to wa_edidd-sdata.
append wa_edidd-sdata to dint_edidd.
endif.
endif.
endloop.
Hope this will help.
Regards,
Ferry Lianto
11-02-2006 8:22 PM
11-02-2006 8:28 PM
Hi,
The dint_edidd is an internal table that hold the data records (segments) for corresponding idoc type.
Regards,
Ferry Lianto
07-29-2013 6:58 AM
08-13-2013 3:47 PM
08-14-2013 7:59 AM