cancel
Showing results for 
Search instead for 
Did you mean: 

Source of supply of Purchase requisition

Former Member
0 Kudos

Dear APO experts,

Using Purchase requisition Live cache id as an input, I need to retrieve the 'source of supply' of the Purchase requisition.

I tried using Function module: /SAPAPO/M_ORDKEY_SELECT_ORDNO.... however It fetches only the Location id and not the Source of Supply.

Please let me know in which table/FM I can get the details of Source of supply of a PR.

Thanks in advance

Vignesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vignesh,

Pls check this field BZQID in table /sapapo/drpmchng

Former Member
0 Kudos

Hi Senthil,

Thanks for your quick response. I couldnt find table: /SAPAPO/DRPMCHNG in my system. Even generic search couldnt help me to find the table.

I also tried the field BZQID in SE90...

I request you to let me know the correct table name...

Thanks Senthil...

Vignesh M

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vignesh,

The table /SAPAPO/DRPMCHNG is opening for me in se16 transaction. I have tried in SCM 5.0 version. Could you please recheck.

Regards

R. Senthil Mareeswaran.

Former Member
0 Kudos

Try this...

  • get order from live cache

CALL FUNCTION '/SAPAPO/RRP_LC_ORDER_GET_DATA'

EXPORTING

iv_order = iv_ordid

IMPORTING

es_ordkey = ls_ordkey

es_order = ls_order

et_outputs = lt_output.

  • read mainproduct from order

READ TABLE lt_output INTO ls_output WITH KEY is_master = gc_true.

  • get source of supply

CALL FUNCTION '/SAPAPO/SOS_GET'

EXPORTING

pi_trpid = ls_ordkey-trpid

pi_pegid = ls_output-pegid

pi_sos_external = 'X'

pi_tpsrc = 'X'

pi_refresh_buffer = 'X'

IMPORTING

po_sources = ls_sources

po_show_sources = ls_show_sources

po_tpsrc = ls_tpsrc

EXCEPTIONS

no_proid = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE a000(zgdb01).

ENDIF.

Kind regards,

Christian

Former Member
0 Kudos

Hi Senthil,

Thanks for your reply again.... I couldnt find the table in SCM 4.1. I guess the table is made available only for 5.0 and above customers.

Christian,

Thanks for the piece of code. It worked.

Thanks

Vignesh M

Former Member
0 Kudos

Hi Vignesh - you can use /SAPAPO/OM_ORDER_GET or /SAPAPO/OM_ORDER_GET_DATA. Create a simsession before calling these FM and look in the et_order or et_orders table.

Andy

Former Member
0 Kudos

Hi Andy

I also want to retrieve source of supply for purchase requisition and I used /SAPAPO/OM_ORDER_GET_DATA but et_orders always have location as blank. Am I doing anythign wrong?