on 06-08-2009 6:28 PM
Can anyone one help me in getting Planned oRder no. from Orderid
The table is /SAPAPO/ORDKEY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This information is stored in structures in APO
Refer /SAPAPO/OM_ORDERNO
Regards
R. Senthil Mareeswaran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Go to transaction /sapapo/om16. Click on the orders tab and enter the orderid in the Order GUID field.
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
User | Count |
---|---|
7 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.