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: 

Usage of 'BAPI_SALESORDER_CREATEFROMDAT2' for Sales Order Creation

Former Member
0 Kudos

Dear Friends,

We are using following BAPI for creation of sales order

BAPI_SALESORDER_CREATEFROMDAT2

The sales order is being created by passing data to a program where this BAPI is used.

The order is getting created successfully. We have addtional requirement that Scehdule line number (Length 4) is also to be passed while creation of sales order. We are pushing the external schedule line number in structure ORDER_SCHEDULES_IN & ORDER_SCHEDULES_INX, but still the schedule is not getting updated, even though sales order is created.

Please help.

Regrads,

Dhananjay

Moderator message: please use more descriptive subject lines for your posts.

Edited by: Thomas Zloch on Dec 14, 2010 10:23 AM

Edited by: Dhananjay. on Dec 14, 2010 3:44 PM

5 REPLIES 5

Former Member
0 Kudos

What is the format of External Schedule line number ?

0 Kudos

The format of external schedule line number is NUMC

Please help

Regards,

Dhananjay

0 Kudos

Can you paste the portion of Code used for populating values to ORDER_SCHEDULES_IN & ORDER_SCHEDULES_INX ?

0 Kudos

Please make a note of the ABAP code

**//////////schedule line Data for SO///////////////

**--Schdule Line Item SCHED_LINE

schedule-itm_number = itemno.

schedulex-itm_number = itemno.

schedule-sched_line = it_edidd-etenr.

schedulex-sched_line = it_edidd-etenr.

  • schedule-REQ_DATE = sy-datum.

  • schedulex-REQ_DATE = sy-datum.

****schedule line target quantity.

schedule-req_qty = it_edidd-wmeng.

schedulex-req_qty = 'X'.

append schedule.

clear schedule.

append schedulex.

clear schedulex.

itemno = itemno + 10 .

0 Kudos

What is the value in structure field IT_EDIDD-ETENR ?