‎2007 Aug 27 4:20 PM
Hi
I am using BAPI_SAG_CREATE.. I know the structure which I need to fill for this BAPI but I dont know what these two ls_headerx & lt_itemx to be filled with
Please let me know this asp.. points for everyone
DATA: ls_header TYPE bapimeoutheader,
ls_headerx TYPE bapimeoutheaderx,
ls_item TYPE bapimeoutitem,
ls_itemx TYPE bapimeoutitemx.
data: lt_item TYPE bapimeout_t_item,
lt_itemx TYPE bapimeout_t_itemx.
ls_header-suppl_plnt = wa_bapi_data-reswk.
ls_header-DOC_TYPE = wa_bapi_data-evart.
ls_header-purch_org = wa_bapi_data-ekorg.
ls_header-pur_group = wa_bapi_data-ekgrp.
ls_header-SUPPL_PLNT = wa_bapi_data-werks.
ls_header-vper_start = wa_bapi_data-kdatb.
ls_header-vper_end = wa_bapi_data-kdate.
ls_item-ematerial = wa_bapi_data-ematn.
ls_item-target_qty = wa_bapi_data-ktmng.
ls_item-net_price = wa_bapi_data-netpr.
ls_item-price_unit = wa_bapi_data-peinh.
ls_item-ORDERPR_UN = wa_bapi_data-bprme.
ls_header-incoterms1 = wa_bapi_data-inco1.
ls_header-incoterms2 = wa_bapi_data-inco2.
ls_item-tax_code = wa_bapi_data-mwskz.
ls_item-shipping = wa_bapi_data-evers.
ls_item-conf_ctrl = wa_bapi_data-bstae.
ls_item-gr_pr_time = wa_bapi_data-webaz.
ls_item-PLAN_DEL = wa_bapi_data-plifz.
append ls_item to lt_item.
CALL FUNCTION 'BAPI_SAG_CREATE'
EXPORTING
header = ls_header
headerx = ls_headerx
* VENDOR_ADDRESS =
* HEAD_EXPORT_IMPORT =
* HEAD_EXPORT_IMPORTX =
* TESTRUN =
* TECHNICAL_DATA =
* IMPORTING
* PURCHASINGDOCUMENT =
* EXP_HEADER =
tables
* RETURN =
item = lt_item
itemx = lt_itemx
* ACCOUNT =
* ACCOUNTPROFITSEGMENT =
* ACCOUNTX =
* SCHEDULE =
* SCHEDULEX =
* SC_COMPONENT =
* SC_COMPONENTX =
* SHIPPING =
* SHIPPINGX =
* SHIPPING_EXP =
* DELIVERY_ADDRESS =
* ITEM_COND_VALIDITY =
* ITEM_COND_VALIDITYX =
* ITEM_CONDITION =
* ITEM_CONDITIONX =
* ITEM_COND_SCALE_VALUE =
* ITEM_COND_SCALE_QUAN =
* EXPORT_IMPORT =
* EXPORT_IMPORTX =
* ITEM_TEXT =
* HEADER_TEXT =
* HEAD_COND_VALIDITY =
* HEAD_COND_VALIDITYX =
* HEAD_CONDITION =
* HEAD_CONDITIONX =
* HEAD_COND_SCALE_VAL =
* HEAD_COND_SCALE_QUAN =
* PARTNER =
* PARTNERX =
* EXTENSIONIN =
* EXTENSIONOUT =
.
‎2007 Aug 27 4:23 PM
‎2007 Aug 27 4:27 PM
Hi Rich
Do you mean to say
ls_headerx-suppl_plnt = 'X'.
ls_headerx-DOC_TYPE = 'X'.
should I do in this way..
this is BAPI for SAG create not any modification operation.. even then I need to pass it on as 'X'.
Let me know
‎2007 Aug 28 1:13 PM
consider tat u have 'BAPIEN' parameter in u r bapi ......
u should consider 'BAPIENX' parameter in u r bapi functionmodule ......
in program
bapien-synch = 'xxxxxx1'.
bapien-userid = '00001'.
bapien-name = 'Abu'.
bapien-quantord = '2'. ( the field u r going to change)
so enable the change parameter structure such that
bapienx-quantord = 'x'. (by assigning x to this field).
untill and unless u enable the change parameter structure .... u r changed field wont get updated ........