cancel
Showing results for 
Search instead for 
Did you mean: 

Planned Orders in APO

Former Member
0 Kudos

Can anyone one help me in getting Planned oRder no. from Orderid

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

The table is /SAPAPO/ORDKEY

Former Member
0 Kudos

The no. of entries in this database table is 0.What to do now?

Former Member
0 Kudos

Hi,

This information is stored in structures in APO

Refer /SAPAPO/OM_ORDERNO

Regards

R. Senthil Mareeswaran.

Former Member
0 Kudos

Go to transaction /sapapo/om16. Click on the orders tab and enter the orderid in the Order GUID field.

Andy

Former Member
0 Kudos

Hi,

Actually I am building a report where I had to read some alert from /SAPAPO/AMON1.From the alert I am getting the Order Id (a character 22 field).Now we have to get the corresonding planned order no.

Can anybody help

Former Member
0 Kudos

You will need to create a connection to livecache (simession_create) in your code then you can call /SAPAPO/OM_ORDER_GET_DATA passing planning verision in gen_params, ordid and simsession retrieving the ordkey and/or ordmap table. Ordmap will have R3/ECC mapping and delnr - ordkey will have apo ordno which may be same as delnr. You may want to close your simsession depending on what else your program is doing.

Andy

Former Member
0 Kudos

Please help me in getting the value of simsession as I am new to APO

Former Member
0 Kudos

You can do what I mentioned above by calling FM /sapapo/rrp_simsession_create first to create simsession. I think I have a simpler way for you to do this. Below is a snippet of code where you will not need to create a simsession:

 

    DATA: om_lc_name             TYPE dbcon_name VALUE 'LCA',

          om_lc_appl_name        TYPE dbcon_name,

          lt_ordkey              TYPE TABLE OF /sapapo/ordkey.

 DATA: lv_ordid TYPE /sapapo/ordkey-ordid,

          lv_simversion TYPE /SAPAPO/OM_VRSIOID.

FIELD-SYMBOLS: TYPE /sapapo/ordkey.

SELECT-OPTIONS :

    soordid FOR lv_ordid.

PARAMETERS:

    p_vers  TYPE /SAPAPO/OM_VRSIOID DEFAULT '000'.

CLEAR om_lc_name.

    GET PARAMETER ID '/SAPAPO/LC' FIELD om_lc_name.

    IF om_lc_name IS INITIAL.

*      om_lc_name = om_lc_appl_name.

      IF om_lc_name IS INITIAL.

        om_lc_name = 'LCA'.

      ENDIF.

    ENDIF.

TRY.

        SELECT * FROM /sapapo/ordkey INTO TABLE lt_ordkey

          CONNECTION (om_lc_name)

          WHERE ordid   in soordid and

                simid = p_vers.

        CATCH cx_sy_open_sql_db.

        MESSAGE I001 WITH 'Invalid LC SQL'.

        STOP.

    ENDTRY.