05-08-2007 4:45 AM
i want get the production order deatils using bapi_prodord_get_details how to do this plz g
give the sample code very argent.
regrads ,
jai.
05-08-2007 4:49 AM
HI JAYA
To get the Production Order Header status USE the following function;
***Object to specify only the Prod.Ord header is needed
v_ORDER_OBJECTS-HEADER = 'X'.
Refresh IT_HEADER.
CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'
EXPORTING
NUMBER = wa_itab-AUFNR
ORDER_OBJECTS = v_ORDER_OBJECTS
TABLES
HEADER = IT_HEADER.
Clear wa_HEADER.
READ TABLE IT_HEADER WITH
KEY ORDER_NUMBER = wa_itab-AUFNR INTO wa_HEADER.
***Finally got the Status
wa_itab-STATUS = wa_HEADER-SYSTEM_STATUS.
If I were to get the status for many Production Orders this would take a lot of time. So DO THS
SELECT *
INTO CORRESPONDING FIELDS OF TABLE ittab
FROM jest
WHERE objnr = caufv-OBJNR
REGARDS
NAVJOT
REWARD IF HELPFULL
Message was edited by:
navjot sharma
Message was edited by:
navjot sharma
05-08-2007 4:50 AM
1. Plz open that BAPI in SE37.
2. keep the cursor on the BAPI name.
3. Click the where used list icon in the toolbar.
4. You will get the use of that bapi in other programs.
From there you can understand how that bapi can be used.
05-08-2007 4:59 AM
Hi Jaya,
Refer this code :
parameters : d_aufnr like BAPI_ORDER_KEY-ORDER_NUMBER.
data : d_objects like BAPI_PP_ORDER_OBJECTS-HEADER.
data : it_HEADER like BAPI_ORDER_HEADER1 occurs o with header line,
it_item like BAPI_ORDER_ITEM occurs o with header line.
CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'
EXPORTING
number = d_aufnr
COLLECTIVE_ORDER =
order_objects = d_objects
IMPORTING
RETURN =
TABLES
HEADER = it_header
POSITION = it_item
SEQUENCE =
OPERATION =
TRIGGER_POINT =
COMPONENT =
PROD_REL_TOOL =
.
Reward points if helpful.
Regards,
Hemant