Application Development and Automation 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: 
Read only

Help needed for BAPI program

Former Member
0 Likes
349

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

1 REPLY 1
Read only

former_member239282
Active Participant
0 Likes
324

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