‎2006 Nov 04 4:04 PM
hi all,
i would like to know how to do userexits in idocs
and the t-code to create user exits
‎2006 Nov 04 4:25 PM
Hi Kiran,
Welcome to SDN.
First you need to identify the FM module that will be 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.To create user exits in IDoc, you need to double click on the include program (i.e. EXIT_SAPLVEDC_003) then system will ask to create a new transport request. Once you have complete the above steps then you code your custom logic. Please ensure to save the changes and activate at the end.
If you can use transaction SE80/SE38/SE37 to modify the user exit.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.
‎2006 Nov 05 10:43 PM
And don't forget cmod and smod to activate and view the exit
‎2006 Nov 18 1:33 PM
Hi,
Can any body provide me with document/information on function module IDOC_OUTPUT_OILTPI50_MASS that process pushes Sales order Idoc(OILTPI50 for oil-industry) to pertner system ?
Also tell me how to modify any of the userexits available to incorporate the similar processing for STO, please.
Plz help me on an URGENT basis.