Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

populating custom idoc through user exit..

Former Member
0 Likes
462

hi friends .. i have one query .. how can we populate a custom idoc through user exits..

i will be thankful if you can provide me information regarding this.

1 ACCEPTED SOLUTION
Read only

LeonardoAraujo
SAP Mentor
SAP Mentor
0 Likes
416

You need to do it using the predefined SAP user exits.

You need to find, based on the message type you are dealing with, the corresponding function module used (for outbound or inbound processing). In this function module (ex: IDOC_INPUT_ORDER) you will find the function exit calls like this:


    CALL CUSTOMER-FUNCTION '011'
         EXPORTING
              dxvbak  = xvbak
              docnum  = idoc_contrl-docnum
         TABLES
              derrtab = errtab
              dxvbap  = xvbap
              dxvbep  = xvbep
              dxvbadr = xvbadr
              dxvbpa  = xvbpa
              dxvbuv  = xvbuv
              dedidc  = idoc_contrl
              dedidd  = idoc_data
              dxkomv  = xkomv
              dxvekp  = xvekp
              dyvekp  = yvekp.

Create a enhancement project in CMOD, using the enhancement that contains the function exit (you can search for it in SMOD dropdown and entereing the function module in the component Additional search in SMOD).

Activate it and enter your code in there.

For specific examples, you will need to provide us the name of the message type or function module you are trying to "enhance".

Hope it helps,

Good luck,

Leonardo De Araujo

hi friends .. i have one query .. how can we populate a custom idoc through user exits..

i will be thankful if you can provide me information regarding this.

1 REPLY 1
Read only

LeonardoAraujo
SAP Mentor
SAP Mentor
0 Likes
417

You need to do it using the predefined SAP user exits.

You need to find, based on the message type you are dealing with, the corresponding function module used (for outbound or inbound processing). In this function module (ex: IDOC_INPUT_ORDER) you will find the function exit calls like this:


    CALL CUSTOMER-FUNCTION '011'
         EXPORTING
              dxvbak  = xvbak
              docnum  = idoc_contrl-docnum
         TABLES
              derrtab = errtab
              dxvbap  = xvbap
              dxvbep  = xvbep
              dxvbadr = xvbadr
              dxvbpa  = xvbpa
              dxvbuv  = xvbuv
              dedidc  = idoc_contrl
              dedidd  = idoc_data
              dxkomv  = xkomv
              dxvekp  = xvekp
              dyvekp  = yvekp.

Create a enhancement project in CMOD, using the enhancement that contains the function exit (you can search for it in SMOD dropdown and entereing the function module in the component Additional search in SMOD).

Activate it and enter your code in there.

For specific examples, you will need to provide us the name of the message type or function module you are trying to "enhance".

Hope it helps,

Good luck,

Leonardo De Araujo