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: 

Capture Idoc numbers for outbound INVOIC02

Former Member
0 Kudos

Hi,

We have a requirement where we need to capture the idoc numbers before it is dispatched.

IDOCS are populated by FM IDOC_OUTPUT_INVOIC using process code SD09 for custom output type(EDI processing).

Our requirement is to capture these idoc numbers into a custom table which will be used for further custom processing. The user exits in the above FM are good for just for segment population.

What is the best approach to capture these idocs? Is there a user exit to capture these idocs?

Thanks,

Pratik

1 ACCEPTED SOLUTION

jack_graus2
Active Contributor
0 Kudos

IDOC numbers that are created from invoice are already captured. You can find the link between invoice doceument and IDOC number by calling function module NREL_GET_NEIGHBOURHOOD with the invoice number in IS_OBJECT-OBJKEY and IS_OBJECT-OBJTUPE='VBRK'. The IDOC numbers are then returned in LINKS-OBJKEY_B.

Regards jack

8 REPLIES 8

atanu_mukherjee
Explorer
0 Kudos

Hi Pratik,

Please refer to exit ZXEDFU03,ZXEDFU04 and ZXEDFU01. I think user exit is the only option for you to capture idoc numbers before they actually despatch.

BR,

Atanu

jitendra_it
Active Contributor
0 Kudos

Hi Pratik,

Pls check below link.

http://www.sapfans.com/forums/viewtopic.php?f=21&t=324303

Thanks

Jitendra

0 Kudos

Hi Jitendra,

where do we use this FM WFMC_PROTOCOL_GET from?

Thanks Pratik.

jack_graus2
Active Contributor
0 Kudos

IDOC numbers that are created from invoice are already captured. You can find the link between invoice doceument and IDOC number by calling function module NREL_GET_NEIGHBOURHOOD with the invoice number in IS_OBJECT-OBJKEY and IS_OBJECT-OBJTUPE='VBRK'. The IDOC numbers are then returned in LINKS-OBJKEY_B.

Regards jack

0 Kudos

Hi Jack,

where should this function module be called from?

Pratik.

0 Kudos

Hi Pratik, not completely sure what your requirment is and where and how you want to 'catch' IDOC numbers for an invoice.

The function module I mentioned is also called by SAP when you are in invoice transaction VF01,2,3 and press in the GOS (Global Object Service) box in the left top of the screen the 'links' button. Then the IDOC's linked to the invoice will be showed.

The function module WFMC_PROTOCOL_GET mentioned is also called from invoice transaction when you go to messages and press the 'monitor' button. Then IDOC's created from invoice output will be showed.

Regards Jack

0 Kudos

Hello Everyone,

Sorry for being a little late.

Actually I found a better and SIMPLE solution to do this:

In the output type config, a custom routine was declared in Processing2 section of the Processing Routines for EDI processing.

Inside this routine, we have EDIDC table structure available. This has the doc_num (idoc number).

Since we have a custom logic after this to read the idoc data, an update task function module is called from within this routine to handle this. idoc number is passed to this FM. Inside the FM I select the table EDID4 to read the idoc segments.

That's it. Working perfectly.

Thanks to all of you for your precious time.

Former Member
0 Kudos

Hi,

check for any enhancement spot in the FM so that u can the collect IDOC numbers generated .

Thanks & Regards,

Padmasri M.