2007 Apr 16 1:14 AM
I am using BAPI_SALESORDER_CHANGE for creating line item for the SO.
Sometimes I am getting error "Forward scheduling (enter start date) "
Please help me to resolve this error
I am using BAPI_SALESORDER_CHANGE for creating line item for the SO.
Sometimes I am getting error "Forward scheduling (enter start date) "
Please help me to resolve this error
2007 Apr 16 5:58 AM
Hi,
R u creating sales order,but ur not getting items?is it right?
If u want to create sales orders u use bapi fun module as
BAPI_SALESORDER_CREATEFROMDAT2
in that
order_items_in = itab_item
order_items_inx = itab_itemx
u use these items like this way..i am giving example.
ADD 1 TO lv_item.
wa_item-itm_number = lv_item.
wa_item-material = it_va01-matnr.
wa_item-untof_wght = 'TO'.
wa_item-gross_wght = lv_qty.
wa_item-net_weight = it_va01-kwmeng.
IF it_va01-spart EQ '10' OR it_va01-spart EQ '40'
OR it_va01-spart EQ 'PK'.
wa_item-reqmts_typ = 'KE'.
ELSEIF it_va01-spart EQ '60'.
wa_item-reqmts_typ = 'KSL'.
ENDIF.
WA_ITEM-TAX_CLASS1 = 'G'.
WA_ITEM-TAX_CLASS4 = '4'.
WA_ITEM-OVERDLVTOL = '10'.
APPEND wa_item TO itab_item.
CLEAR : lv_qty.
wa_item-itm_number = lv_item.
wa_itemx-material = 'X'.
wa_itemx-untof_wght = 'X'.
wa_itemx-gross_wght = 'X'.
wa_itemx-net_weight = 'X'.
wa_itemX-reqmts_typ = 'X'.
WA_ITEMX-TAX_CLASS1 = 'X'.
APPEND wa_itemx TO itab_itemx.
Regards,
lokesh
2007 Apr 16 6:02 AM
u have use date in the header details .
DATE FORMAT SHOULD BE YYYY.MM.DD.SYSTEM WILL TAKE LIKE THIS.
wa_soheader-doc_type = 'XXX'.
wa_soheader-sales_org = 'XXX'.
wa_soheader-distr_chan = 'XX' .
wa_soheader-purch_date = L_DATE."IT_VA01-BSTDK."v_date1.
wa_soheader-purch_no_c = it_va01-bstkd.
wa_soheader-pymt_meth = 'I'.
wa_soheader-division = it_va01-spart.
wa_soheader-ship_type = '01'.
itab_ordheader = wa_soheader.
wa_soheaderx-doc_type = 'X'.
wa_soheaderx-sales_org = 'X'.
wa_soheaderx-distr_chan = 'X'.
wa_soheaderx-division = 'X'.
wa_soheaderx-purch_date = 'X'.
wa_soheaderx-purch_no_c = 'X'.
wa_soheaderx-pymt_meth = 'X'.
wa_soheaderx-division = 'X'.
wa_soheaderx-ship_type = 'X'.
itab_ordheaderx = wa_soheaderx.
REGARDS,
LOKESH
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |