Application Development 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: 

Idoc generation for VL02N

Former Member
0 Kudos

Hi all

I need to create idoc from VL02N on goods issue....

I have one particular output type configured in nace . When that gets triggered i need to create the idoc by taking the outbound delivery number from VL02N and then fetching certain data.

I am confused as to how to approach for this.....Where do i need to write my code for idoc generation so that it can access the outbound delivery number and then do the rest of the processing

6 REPLIES 6

Former Member
0 Kudos

Hi,

If you want to generate standard idoc Use output type "LAVA" or "LALE".

Other Configuration like Partner profile(we20) should be completed to trigger the IDOC.

Regards

Vinod

0 Kudos

NO its not standard....I have to create custom segments and types...... The output type is also custom......The Idoc config part will be done....But the issue is where shall I put my code so that it executes right after the output type is triggered.

Edited by: subhajit bhadra on May 12, 2010 8:49 AM

0 Kudos

Hi,

You have to write a function module which fills the idoc segments and assign the same to an outbound process code (WE41).

Then assign this process code to the output type during partner profile settings (WE20).

Check the sample coding of process code DELV in transaction code WE41.

Regards

Vinod

0 Kudos

There is one issue.....As I said i need to access the outbound delivery number from VL02N for which the goods issue has been triggered.

Now as you said to create a FM to write the idoc code, how can I get the delivery number used in VL02N and use that in the FM....

0 Kudos

Copy the FM IDOC_OUTPUT_DELVRY to zFM and change the code as per ur new requirement.

--

Reddy

0 Kudos

Hi,

Your custom function module needs to be defined as the same structure as below.

Local Interface:
*"  IMPORTING
*"     REFERENCE(OBJECT) LIKE  NAST STRUCTURE  NAST
*"     REFERENCE(CONTROL_RECORD_IN) LIKE  EDIDC STRUCTURE  EDIDC
*"  EXPORTING
*"     VALUE(OBJECT_TYPE) LIKE  WFAS1-ASGTP
*"     VALUE(CONTROL_RECORD_OUT) LIKE  EDIDC STRUCTURE  EDIDC
*"  TABLES
*"      INT_EDIDD STRUCTURE  EDIDD

In function module add following code to get the delivery number.

move object-objky(10) to del_no.

You can see the function module definition of IDOC_OUTPUT_DELVRY which is related to standard outbound process code "DELV".

Regards

Vinod