‎2005 Jun 09 5:35 PM
Hi !!!
I have a problem with the BAPI_SALESORDER_CREATEFROMDAT2
I execute this successfully, this generate a sales document. When i check the sales order, the DELEIVERY DATE does not appear.
I fill the corresponding fields DELIVERY DATE in both
structures:
ORDER_ITEMS_IN STRUCTURE BAPISDITM OPTIONAL
ORDER_ITEMS_INX STRUCTURE BAPISDITMX OPTIONAL
I am filling ....
structures ORDER_SCHEDULES_IN and ORDER_SCHEDULES_INX.
ORDER_SCHEDULES_IN-itm_number = 10.
ORDER_SCHEDULES_IN-dlv_date = 20051503.
APPEND ORDER_SCHEDULES_IN.
ORDER_SCHEDULES_INX-itm_number = 'X'.
ORDER_SCHEDULES_INX-dlv_date = 'X'.
APPEND ORDER_SCHEDULES_INX.
Regards,
Kunal
‎2005 Jun 09 7:15 PM
‎2005 Jun 09 7:15 PM
‎2005 Jun 09 7:22 PM
Hi,
That was a typo error ... the fields are
ORDER_SCHEDULES_IN-dlv_date = '20050516'.
But the Schedule date in the sales order doesn't get filled with this date it is getting filled with today's date ...
Kunal
‎2005 Jun 09 7:35 PM
‎2005 Jun 09 7:44 PM
Hi,
I am posting the code which i have written ...
wa_sch_in-itm_number = lv_itemno.
wa_sch_in-SCHED_LINE = lv_itemno.
wa_sch_in-req_qty = wa_items_in-target_qty.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = wa_vbak_temp-erdat
IMPORTING
date_internal = wa_sch_in-dlv_date
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
APPEND wa_sch_in TO i_sch_in.
CLEAR wa_sch_inx.
wa_sch_inx-itm_number = 'X'.
wa_sch_inx-sched_line = 'X'.
wa_sch_inx-req_qty = 'X'.
wa_sch_inx-dlv_date = 'X'.
APPEND wa_sch_inx TO i_sch_inx.
CLEAR wa_vbak_temp.
ENDLOOP."LOOP AT i_vbak INTO wa_vbak_temp
CLEAR w_sales_doc.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
order_header_in = wa_header_in
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
salesdocument = w_sales_doc
TABLES
return = i_return
order_items_in = i_items_in
ORDER_ITEMS_INX = i_items_inx
order_partners = i_partner
order_schedules_in = i_sch_in
order_schedules_inx = i_sch_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 =
EXTENSIONIN =
PARTNERADDRESSES =
.
Hope u can help me now , as u see i am sending the sched_line,itm_number,req_qty,dlv_date and also the corresponding order_schedules_inx values but still not getting the correct delivery date value in the sales order.
Kunal
‎2005 Jun 09 8:28 PM
‎2005 Jun 23 10:14 AM
I have been using this BAPI for quite a while now with no problems.
I now require to put a different address on the order to the customer master data. However when I put the data in the partner function table of this BAPI it populates all the fields on SAP but not NAME3 field for some reason.
Anyone know of any problems like this ?