‎2007 Sep 05 6:54 AM
Hi Experts,
I have written the following prg, where I have to to create the work order in IW31 tr code. can any one help me out.
TABLES: ZCUST_INFO.
DATA: WA_CUST TYPE TABLE OF ZCUST_INFO INITIAL SIZE 0 WITH HEADER LINE.
SELECT * FROM ZCUST_INFO INTO TABLE WA_CUST.
IF NOT WA_CUST[] IS INITIAL.
LOOP AT WA_CUST.
WRITE:/ WA_CUST-CMR_NAME.
CLEAR: WA_CUST.
ENDLOOP.
CALL FUNCTION 'BAPI_PLANNEDORDER_CREATE'
EXPORTING
HEADERDATA =
IMPORTING
RETURN =
PLANNEDORDER =
CREATEDHEADERDATA =
CAPACITYHEADERDATA1 =
CAPACITYHEADERDATA2 =
CAPACITYHEADERDATA3 =
TABLES
COMPONENTSDATA =
CREATEDCOMPONENTSDATA =
CAPACITYDATA1 =
CAPACITYDATA2 =
CAPACITYDATA3 =
.
ELSE.
WRITE: / 'NO RECORDS FOUND'.
ENDIF.
regards,
Sunil
‎2007 Sep 05 10:05 AM
Hi Sunil,
have you looked at BAPI BAPI_ALM_ORDER_MAINTAIN, look up documentation for this. I believe to create the order you will need to set the IT_METHODS table parameter to CREATE.
if it helpful reward points are appreciated