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

Order quantity not being created from BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
729

Hi Experts,

I am able to create the sales order but , quantity in the item is blank and ultimately no schedule line item is created even though i am passing the data into BAPI.

I tried some OSS notes and also tried some of the suggestions given in other threads but still not able to solve the issue.

Could sombody give an exact reason or solution for this proble.

Regards,

Praveen.

5 REPLIES 5
Read only

Former Member
0 Likes
590

Hi,

hope this will help u

ORDER_HEADER_IN-DOC_TYPE = TAB-DOC_TYPE.

ORDER_HEADER_IN-SALES_ORG = TAB-SALES_ORG.

ORDER_HEADER_IN-DISTR_CHAN = TAB-DISTR_CHAN.

  • ORDER_HEADER_IN-REQ_DATE_H = TAB-REQ_DATE_H.

ORDER_HEADER_IN-PURCH_DATE = TAB-PURCH_DATE.

ORDER_HEADER_IN-PMNTTRMS = TAB-PMNTTRMS.

ORDER_HEADER_IN-PURCH_NO_C = TAB-PURCH_NO_C.

ORDER_HEADER_IN-DIVISION = tab-DIVISION.

ORDER_ITEMS_IN-ITM_NUMBER = tab-ITM_NUMBER.

ORDER_ITEMS_IN-material = TAB-CUST_MAT22.

ORDER_ITEMS_IN-PLANT = TAB-PLANT.

APPEND ORDER_ITEMS_IN.

ORDER_SCHEDULES_IN-ITM_NUMBER = tab-ITM_NUMBER.

ORDER_SCHEDULES_IN-REQ_QTY = tab-TARGET_QTY.

append ORDER_SCHEDULES_IN.

CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'

EXPORTING

  • SALESDOCUMENTIN =

ORDER_HEADER_IN = ORDER_HEADER_IN

  • ORDER_HEADER_INX =

  • SENDER =

  • BINARY_RELATIONSHIPTYPE =

  • INT_NUMBER_ASSIGNMENT =

  • BEHAVE_WHEN_ERROR =

  • LOGIC_SWITCH =

  • TESTRUN =

  • CONVERT = ' '

IMPORTING

SALESDOCUMENT = SALESDOCUMENT

TABLES

RETURN = RETURN

ORDER_ITEMS_IN = ORDER_ITEMS_IN

  • ORDER_ITEMS_INX =

  • ORDER_PARTNERS =

ORDER_SCHEDULES_IN = ORDER_SCHEDULES_IN

  • ORDER_SCHEDULES_INX =

  • ORDER_CONDITIONS_IN =

  • ORDER_CONDITIONS_INX =

  • ORDER_CFGS_REF =

  • ORDER_CFGS_INST =

  • ORDER_CFGS_PART_OF =

  • ORDER_CFGS_VALUE =

  • ORDER_CFGS_BLOB =

  • ORDER_CFGS_VK =

  • ORDER_CFGS_REFINST =

  • ORDER_CCARD =

  • ORDER_TEXT =

  • ORDER_KEYS = ORDER_KEYS

  • EXTENSIONIN =

  • PARTNERADDRESSES =

.

Chk whether u hav filled everything ...

Read only

arjun_subhash
Active Participant
0 Likes
590

hi,

r u using 10,20,30 as item nos for schedule lines?

regards

Arjun

Read only

Former Member
0 Likes
590

i got my mistake, thanks

Read only

0 Likes
590

Hi Praveen,

I am facing the same problem.

could u pls share your solution ?

Thanks & Regards,

Ramya

Read only

0 Likes
590

Hi,

Update the schedule line structures bapischdl and bapischdlx correctly.

Updating the fields ITM_NUMBER,SCHED_LINE,REQ_DATE,REQ_QTY is mandatory and flag the corresponding fields in bapischdlx and finally append .