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: 

Is there any table or function module to know the IDOC number of a Delivery

Former Member
0 Kudos

Hi,

I want to know if there is any TABLE or FUNCTION MODULE to know the IDOC number of an Outbound Delivery document.

Basically my requirement is to display the IDOC data on a SMARTFORM/SAP script layout. So the print program should be able to fetch this IDOC data and display on the layout. Please let me know what would be the best solution.

Currently i'm displaying all the data whichever is possible to fetch from the tables (also used RV_DELIVERY_PRINT_VIEW) which gives most of the Delivery related information. But apart from this data, there is some data which is updated back from the Partner system. And this data is not stored anywhere else other than EDID4/EDIDD table.

I could not find the IDOC number getting geneted during the call to function module IDOC_OUTPUT_DELVRY or any of its user exit, where I can use an EXPORT ......MEMORY ID <> and export the IDOC number to a memory id and then IMPORT it into my Print program. So its confirmed that the IDOC number is not available in INT_EDIDD during the IDOC_OUTPUT_DELVRY.

What I could notice is that the IDOC number is getting generated and filling the EDIDC values only at one of the Includes in RSNASTED program used for EDI processing.

Now my question is:

Is there anyway my Print program gets the IDOC number of the Delivery??

How can I extract the IDOC segments data into my Print program for Smartforms???

Please help me in finding the solution!

Thanks!

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

you can use the Tables SRRELROLES and IDOCREL

if it is inbound delivery the use the business object BUS2015(outbound use LIKP)

first get the ROLEID using the Delivery number as Objectkey(business obecjt BUS2015/LIK) from the SRRELROLES,

then pass the ROLEID to the table IDOCREL to ROLE_A , get the ROLE_B,

use this ROLE_B supply to ROLEID of SRRELROLES table(business object as IDOC, )

get the objkey which is nothing But IDOC.

4 REPLIES 4

Former Member
0 Kudos

use SREL_GET_NEXT_RELATIONS to find the IDOC#, then using that # you can read the IDOC data using IDOC_READ_COMPLETELY

0 Kudos

Hi MxG.. thanks! This info is very very helpful...!

former_member188685
Active Contributor
0 Kudos

you can use the Tables SRRELROLES and IDOCREL

if it is inbound delivery the use the business object BUS2015(outbound use LIKP)

first get the ROLEID using the Delivery number as Objectkey(business obecjt BUS2015/LIK) from the SRRELROLES,

then pass the ROLEID to the table IDOCREL to ROLE_A , get the ROLE_B,

use this ROLE_B supply to ROLEID of SRRELROLES table(business object as IDOC, )

get the objkey which is nothing But IDOC.

0 Kudos

Hi Vijay,

Thanks a lot for your great help!

It has resolved the issue. I have assigned the points to you.

Best Regards... !