Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

bapi

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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