cancel
Showing results for 
Search instead for 
Did you mean: 

Pegging APO (Context for manufacturing order)

Former Member
0 Kudos

Hello,

Somebody knows a function (or BAPI) that reproduce the order context on APO? I only need to see the Pegged requirements (not all pegging structure). I have a manufacturing order and I need to see for what sales order I´m producing (I have production orders on the others steps).

Thanks,

Marcelo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Marcelo,

Pass the value '0' to the parameter iv_ionode_peg_sel.

Regards,

Siva.

Answers (2)

Answers (2)

Former Member
0 Kudos

Claus,

I could not make this function work using the test mode. It always raise the message LC_COM_ERROR. I could not understand what I should insert in the field IV_IONODE_PEG_SEL. It´s a numeric field.

Thanks for your help,

Marcelo

Former Member
0 Kudos

Hi Marcelo,

I think you can do that with the following FM:

CALL FUNCTION '/SAPAPO/OM_PEG_CAT_GET_ORDERS'

EXPORTING

is_gen_params = ls_gen_params

iv_simsession = lv_simsession

it_pegid = lt_pegid_char

it_category = lt_atpcat

iv_start_time = gv_start_tst

iv_end_time = gv_end_tst

iv_ionode_peg_sel = gc_io_peg_all_out

iv_additional_sel_options = lv_sel_opt

IMPORTING

et_ordkeys = lt_ordkey

et_orders = lt_order

  • et_inputs = lt_inputs

et_outputs = lt_outputs

  • et_peg_inpnode = lt_peg_inpnode

et_peg_outnode = lt_peg_outnode

EXCEPTIONS

lc_connect_failed = 1

lc_com_error = 2

lc_appl_error = 3

OTHERS = 4.

You have to select the orders by pegid, atpcat and time range. Also important is

the parameter "iv_ionode_peg_sel = gc_io_peg_all_out". Then you get all pegging nodes for an order in the structures et_peg_inpnode and et_peg_outnode.

regards,

Claus