cancel
Showing results for 
Search instead for 
Did you mean: 

Relation between delivery number and Sales order number in APO

Former Member
0 Kudos

Hi All,

I am trying to find out relation between delivery number and its corresponding sales order number. I have delivery number and i want to know its corresponding sales order number in APO system. I know that we can see this relation in /SAPAPO/RRP2 transaction by giving the delivery number and ERP logical system. But I am not able to figure it out from where it is picking up. Most probably from live cache it seems.

Is there any FM or table which can give me this relation.

Regards,

Leona

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try with the table /SAPAPO/VS_SDSHP - TP/VS SD Shipping Information for SD sales order, delivery

In this table ORDERID is, i guess for Sales Order no. to convert this ID in to no. you can use Function Module /sapapo/dm_ordid_get_order.

I hope this is what you are looking for.

Regards,

Saurabh

Former Member
0 Kudos

Hi Saurabh,

Thanks for your reply. But this is not what i am looking for. As i said i have delivery number and i need to know its corresponding sales order number.

In /SAPAPO/VS_SDSHP if i give delivery number i will not get its sales order number.

I need to relation to determine sales order number from a delivery number in APO.

Regards,

Leona

Former Member
0 Kudos

Hi,

I hope you got the order ID for delivery no. in the mentioned table, which is nothing but the sales order ID you have to convert it into order no.If this is not the case then if you know the sales order no. you can pass that no to BAPI BAPI_SLSRVAPS_GETLIST2 by which you will get the linked delivery no. in input/output nodes table.

Also you can try with the FM /sapapo/OM_ORDER_GET_DATA to get the details of sales order by paasing Delivery no. to this FM.

Regards,

Saurabh

Former Member
0 Kudos

Hi Surabh,

I think you did not got my requirement. I only have outbond delivery number and from table /SAPAPO/VS_SDSHP i can get the guid of that delivery number. That is fine.

But my requirement is to find out the preceding document number (Sales order or STO) for this outbound delivery number in APO system. BAPI_SLSRVAPS_GETLIST2 is giving me the details of delivery number but no link to get its preceeding document number .

But i think /SAPAPO/OM_ORDER_GET_DATA will give me pegging ID and with this ID i can get all the relavent IONODES with FM /SAPAPO/OM_PEGID_GET_IO and again with all these IONODES as input to /SAPAPO/OM_ORDER_GET_DATA i think i can get all the relavent documents which we see in RRP2 transaction when we give delivery number as input.

Now i think you got my requirement. I am not sure I am on right track for this solution.

Regards,

Leona

Former Member
0 Kudos

Hi,

You have delivery number /GUID of that number from table /SAPAPO/VS_SDSHP..

BAPI_SLSRVAPS_GETLIST2 is giving you the details of delivery number,Have you checked the pegging_input_nodes/pegging_output_nodes tables of this BAPI, I hope in that you will get the preceding order details(at least GUID-CHAR32).

If you pass GUID(CHAR22) of Delivery number to /SAPAPO/OM_ORDER_GET_DATA this should give you all the details because this FM is related to live-cache read.In ET_PEG_INPNODE, ET_PEG_OUTNODE, ET_INPUTS,ET_OUTPUTS you will get the GUID.

You can try with the below FMs also.Pass the CHAR22 GUID of delivery no. to these FMs.

/SAPAPO/OM_ORDER_GET_DATA Get Order Data from liveCache

/SAPAPO/OM_ORDER_GET_REQMTS Gets Requirements Covered by Order

/SAPAPO/OM_ORDER_GET_SUPPLY Get Receipts Used by Order

Regards,

Saurabh

Former Member
0 Kudos

Hi Leona

Sales Order are created in R3 system and are pushed to APO system to plan. So SD Order number in APO will remain same as what was in R3. You can check the SD Order in APO using transaction /SAPAPO/RRP2, where in use R3 Logical System and place the R3 order in Customer Requirement column.

And details of the Order can be seen in either /sapapo/posmapn table or the table name which Saurabh has given.

Thanks

Deepak

Former Member
0 Kudos

Hi All,

Thanks for your replies.

I have got a very easy way. I am reading ECC VBFA table from APO by using Remote FM RFC_READ_TABLE. In this way I am getting sales order number from delivery number.

Regards,

Leona

Answers (0)