Service PO creation with BAPI

Hi All,
I have to create a file upload program to create service PO's with BAPI_PO_CREATE1. Please if anyone can give me a example of it it would be great.
Thanks.
Malinda

Hi ,
       Check out this program .
use this program for creating service po's using bapi.
*& Report ZMM_PO_CREATE1 *
REPORT ZMM_PO_CREATE1 .
data : POHEADER like BAPIMEPOHEADER occurs 0 with header line,
POHEADERX like BAPIMEPOHEADERX occurs 0 with header line,
POITEM like BAPIMEPOITEM occurs 0 with header line,
POITEMX like BAPIMEPOITEMX occurs 0 with header line,
POESLLC like BAPIESLLC occurs 0 with header line,
POACCOUNT like BAPIMEPOACCOUNT occurs 0 with header line,
POACCOUNTX like BAPIMEPOACCOUNTX occurs 0 with header line,
POCONDHEADER like BAPIMEPOCONDHEADER occurs 0 with header line,
POCONDHEADERX like BAPIMEPOCONDHEADERX occurs 0 with header line,
POCOND like BAPIMEPOCOND occurs 0 with header line,
RETURN like BAPIRET2 occurs 0 with header line.
data : po_no(10).
data : begin of it_head occurs 0,
ref(10),
bsart like ekko-bsart,
lifnr like ekko-lifnr,
ekorg like ekko-ekorg,
ekgrp like ekko-ekgrp,
bukrs like ekko-bukrs,
verkf like ekko-verkf,
telf1 like ekko-telf1,
ihrez like ekko-ihrez,
unsez like ekko-unsez,
kdatb(10),
kdate(10),
end of it_head.
data : begin of it_det occurs 0,
ref(10),
knttp like ekpo-knttp,
pstyp like ekpo-pstyp,
txz01 like ekpo-txz01,
matkl like ekpo-matkl,
werks like ekpo-werks,
afnam like ekpo-afnam,
ktext1 like esll-ktext1,
srvpos like esll-srvpos,
frmval1 like esll-frmval1,
frmval2 like esll-frmval2,
menge like esll-menge,
kostl like eskn-kostl,
sakto like eskn-sakto,
zzcode like eskn-zzcode,
kbetr like konv-kbetr,
end of it_det.
data : c_col1 TYPE i VALUE '0001',
c_col2 TYPE i VALUE '0002',
c_col3 TYPE i VALUE '0003',
c_col4 TYPE i VALUE '0004',
c_col5 TYPE i VALUE '0005',
c_col6 TYPE i VALUE '0006',
c_col7 TYPE i VALUE '0007',
c_col8 TYPE i VALUE '0008',
c_col9 TYPE i VALUE '0009',
c_col10 TYPE i VALUE '0010',
c_col11 TYPE i VALUE '0011',
c_col12 TYPE i VALUE '0012',
c_col13 TYPE i VALUE '0013',
c_col14 TYPE i VALUE '0014',
c_col15 TYPE i VALUE '0015',
c_col16 TYPE i VALUE '0016'.
data : v_currentrow type i,
v_currentrow1 type i.
data : itab_head like ALSMEX_TABLINE occurs 0 with header line,
itab_det like ALSMEX_TABLINE occurs 0 with header line.
data : file_head type RLGRAP-FILENAME,
file_item type RLGRAP-FILENAME.
file_head = 'C:Documents and SettingsDesktophead.xls'.
file_item = 'C:Documents and SettingsDesktopitem.xls'.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = file_head
i_begin_col = 1
i_begin_row = 1
i_end_col = 12
i_end_row = 50
tables
intern = itab_head
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = file_item
i_begin_col = 1
i_begin_row = 1
i_end_col = 16
i_end_row = 50
tables
intern = itab_det
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF itab_head[] IS INITIAL.
WRITE:/ 'No Header Data Exists '.
STOP.
ELSE.
sort itab_head by row col.
read table itab_head index 1.
v_currentrow = itab_head-row.
loop at itab_head.
if itab_head-row ne v_currentrow.
APPEND it_head.
v_currentrow = itab_head-row.
ENDIF.
CASE itab_head-col.
WHEN c_col1.
it_head-ref = itab_head-value.
WHEN c_col2.
it_head-bsart = itab_head-value.
WHEN c_col3.
it_head-lifnr = itab_head-value.
WHEN c_col4.
it_head-ekorg = itab_head-value.
WHEN c_col5.
it_head-ekgrp = itab_head-value.
WHEN c_col6.
it_head-bukrs = itab_head-value.
WHEN c_col7.
it_head-verkf = itab_head-value.
WHEN c_col8.
it_head-telf1 = itab_head-value.
WHEN c_col9.
it_head-ihrez = itab_head-value.
WHEN c_col10.
it_head-unsez = itab_head-value.
WHEN c_col11.
it_head-kdatb = itab_head-value.
WHEN c_col12.
it_head-kdate = itab_head-value.
ENDCASE.
ENDLOOP.
APPEND it_head.
CLEAR it_head.
ENDIF.
IF itab_det[] IS INITIAL.
WRITE:/ 'No Item Data Exists '.
STOP.
ELSE.
sort itab_det by row col.
read table itab_det index 1.
v_currentrow1 = itab_det-row.
loop at itab_det.
if itab_det-row ne v_currentrow1.
APPEND it_det.
v_currentrow1 = itab_det-row.
ENDIF.
CASE itab_det-col.
WHEN c_col1.
it_det-ref = itab_det-value.
WHEN c_col2.
it_det-knttp = itab_det-value.
WHEN c_col3.
it_det-pstyp = itab_det-value.
WHEN c_col4.
it_det-txz01 = itab_det-value.
WHEN c_col5.
it_det-matkl = itab_det-value.
WHEN c_col6.
it_det-werks = itab_det-value.
WHEN c_col7.
it_det-afnam = itab_det-value.
WHEN c_col8.
it_det-srvpos = itab_det-value.
WHEN c_col9.
it_det-ktext1 = itab_det-value.
WHEN c_col10.
it_det-frmval1 = itab_det-value.
WHEN c_col11.
it_det-frmval2 = itab_det-value.
WHEN c_col12.
it_det-menge = itab_det-value.
WHEN c_col13.
it_det-kostl = itab_det-value.
WHEN c_col14.
it_det-sakto = itab_det-value.
WHEN c_col15.
it_det-zzcode = itab_det-value.
WHEN c_col16.
it_det-kbetr = itab_det-value.
ENDCASE.
ENDLOOP.
APPEND it_det.
CLEAR it_det.
ENDIF.
loop at it_head.
poheader-doc_type = it_head-bsart.
poheader-vendor = it_head-lifnr.
poheader-purch_org = it_head-ekorg.
poheader-pur_group = it_head-ekgrp.
poheader-comp_code = it_head-bukrs.
poheader-sales_pers = it_head-verkf.
poheader-telephone = it_head-telf1.
poheader-REF_1 = it_head-ihrez.
poheader-OUR_REF = it_head-unsez.
poheader-VPER_START = it_head-kdatb.
poheader-VPER_END = it_head-kdate.
loop at it_det where ref = it_head-ref.
poitem-acctasscat = it_det-knttp.
poitem-item_cat = it_det-pstyp.
poitem-short_text = it_det-txz01.
poitem-matl_group = it_det-matkl.
poitem-plant = it_det-werks.
poitem-PREQ_NAME = it_det-afnam.
POESLLC-SERVICE = it_det-srvpos.
POESLLC-SHORT_TEXT = it_det-ktext1.
POESLLC-FORM_VAL1 = it_det-frmval1.
POESLLC-FORM_VAL2 = it_det-frmval2.
POESLLC-QUANTITY = it_det-menge.
POACCOUNT-COSTCENTER = it_det-kostl.
POACCOUNT-GL_ACCOUNT = it_det-sakto.
POCONDHEADER-COND_TYPE = 'R000'.
POCONDHEADER-COND_VALUE = it_det-kbetr.
endloop.
endloop.
poheaderx-doc_type = 'X'.
poheaderx-vendor = 'X'.
poheaderx-purch_org = 'X'.
poheaderx-pur_group = 'X'.
poheaderx-comp_code = 'X'.
poheaderx-sales_pers = 'X'.
poheaderx-telephone = 'X'.
poheaderx-REF_1 = 'X'.
poheaderx-OUR_REF = 'X'.
poheaderx-VPER_START = 'X'.
poheaderx-VPER_END = 'X'.
poitemx-acctasscat = 'X'.
poitemx-item_cat = 'X'.
poitemx-short_text = 'X'.
poitemx-matl_group = 'X'.
poitemx-plant = 'X'.
poitemx-PREQ_NAME = 'X'.
*POESLLCx-SHORT_TEXT = 'X'.
POACCOUNTx-COSTCENTER = 'X'.
POACCOUNTx-GL_ACCOUNT = 'X'.
POCONDHEADER-cond_type = 'X'.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = poheader
POHEADERX = poheaderx
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPPURCHASEORDER = po_no
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN = return
POITEM = poitem
POITEMX = poitemx
POADDRDELIVERY =
POSCHEDULE =
POSCHEDULEX =
POACCOUNT = poaccount
POACCOUNTPROFITSEGMENT =
POACCOUNTX = poaccountx
POCONDHEADER = pocondheader
POCONDHEADERX = pocondheaderx
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
POSERVICES = poesllc
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
if sy-subrc = 0.
loop at return.
write return-MESSAGE_V1.
write po_no.
endloop.
endif.
Also check this link
[Service Order through BAPI|Service PO creation with BAPI;

Similar Messages

  • Service PO Creation With Negative value

    Hi all,
    I am trying to create a Services PO using the BAPI 'BAPI_PO_CREATE1'
    In my scenario, First time PO will create with negative value.
    Then I will remove some conditions in Services line.
    Then PO value will becomes positive.
    When i create the bapi in ME21N, its working fine. Net values of PO become negative.
    But When I try the same using the BAPI, net price of the PO stored as 0(ZERO).
    If I create a PO with positive value using the same BAPI, everything is fine.
    If I change the PO after creation(removing the service line to make bapi value as positive), Net values are doubled since value stored as zero instead of negative value.
    Kindly help me to get out of this issue.
    Note: I need to create a Services PO with negative value using the BAPI
    Thanks in advance.

    Hi,
    No need to create service PO with negative quantity!
    If payment not done for your servicePO, you can cancel invoice document and then revoke SES.
    If any other process involved you can do subsequent debit or subsequent credit  for your service PO in t.code:MIRO.
    Regards,
    Biju K

  • Service Entry sheet with BAPI

    Hello,
    I want to create service entry sheet with BAPI_ENTRYSHEET_CREATE. can anyone tell me step by step process like what data I need to maintain in which table?

    Hi,
    REPORT test_program.
    DATA: wa_header TYPE bapiessrc,
    i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
    ws_entrysheet_no TYPE bapiessr-sheet_no,
    i_service TYPE bapiesllc OCCURS 0 WITH HEADER LINE,
    i_service_acc TYPE bapiesklc OCCURS 0 WITH HEADER LINE,
    i_service_text TYPE bapieslltx OCCURS 0 WITH HEADER LINE,
    i_account TYPE bapiesknc OCCURS 0 WITH HEADER LINE,
    ws_pack_no TYPE packno.
    DATA: ws_po TYPE bapiekko-po_number,
    po_items TYPE bapiekpo OCCURS 0 WITH HEADER LINE,
    po_services TYPE bapiesll OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF wa_po_header OCCURS 1.
    INCLUDE STRUCTURE bapiekkol.
    DATA: END OF wa_po_header.
    DATA: BEGIN OF bapi_return_po OCCURS 1.
    INCLUDE STRUCTURE bapireturn.
    DATA: END OF bapi_return_po.
    DATA: serial_no LIKE bapiesknc-serial_no,
    line_no LIKE bapiesllc-line_no.
    DATA: bapi_esll LIKE bapiesllc OCCURS 1 WITH HEADER LINE.
    ws_po = '4300000051'.
    CALL FUNCTION 'BAPI_PO_GETDETAIL'
    EXPORTING
    purchaseorder = ws_po
    items = 'X'
    services = 'X'
    IMPORTING
    po_header = wa_po_header
    TABLES
    po_items = po_items
    po_item_services = po_services
    return = bapi_return_po.
    wa_header-po_number = po_items-po_number.
    wa_header-po_item = po_items-po_item.
    wa_header-short_text = 'Sample'.
    wa_header-pckg_no = 1.
    serial_no = 0.
    line_no = 1.
    bapi_esll-pckg_no = 1.
    bapi_esll-line_no = line_no.
    bapi_esll-outl_level = '0'.
    bapi_esll-outl_ind = 'X'.
    bapi_esll-subpckg_no = 2.
    APPEND bapi_esll.
    LOOP AT po_services WHERE NOT short_text IS INITIAL.
    line_no = line_no + 1.
    CLEAR bapi_esll.
    * MOVE-CORRESPONDING po_services TO bapi_esll.
    * bapi_esll-gr_price = '456'.
    bapi_esll-pckg_no = 2.
    bapi_esll-line_no = line_no.
    bapi_esll-service = po_services-service.
    bapi_esll-quantity = po_services-quantity.
    bapi_esll-gr_price = po_services-gr_price.
    bapi_esll-price_unit = po_services-price_unit.
    APPEND bapi_esll.
    ENDLOOP.
    CALL FUNCTION 'BAPI_ENTRYSHEET_CREATE'
    EXPORTING
    entrysheetheader = wa_header
    * testrun = 'X'
    IMPORTING
    entrysheet = ws_entrysheet_no
    TABLES
    * ENTRYSHEETACCOUNTASSIGNMENT =
    entrysheetservices = bapi_esll
    * entrysheetsrvaccassvalues = i_service_acc
    return = i_return
    * entrysheetservicestexts = i_service_text
    * ENTRYSHEETHEADERTEXT =
    break gbpra8.
    LOOP AT i_return.
    ENDLOOP.
    DATA: ws_wait TYPE bapita-wait.
    ws_wait = '3'.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = ws_wait.
    Thanks,
    Krishna...

  • Service order creation using bapi with repair order number

    Hi experts,
    Pls suggest me a BAPI to create a service order for those repair orders where a PGR has been done(for return delivery type : LR).
    The plant should be 0260 with storage location wh01 and item category ZRRE
    Creation of a service order with repair order type SM03 is not allowed in iw31.
    thanks and regards,
    Vijayb.

    Hi prakash,
    Thank u for the BAPI
    But an error is being displayed saying that the REFURBISHMENT ORDERS CANNOT BE PROCESSED USING BAPI.
    ERROR DURING PROCESSING OF BAPI METHODS.
    This is while u pass the order type as either ZM03 or SM01or SM02 or SM03.
    pls help me on that.
    thanks and regards,
    Vijayb.

  • BAPI for Service Notification Creation (with address)

    Hi Friends,
    Could any one help and let me know if there is a BAPI which helps to create a Service Notification and has the capability to update the address fields in that Service Notification. I am aware of the BAPI  "BAPI_SERVNOT_CREATE"  but it does not have the capability to update the address fields (like name1, name2, street, city, region, email address etc). Thanks in advance.
    Regards
    Sid

    Ravi ,
    Thanks for your passing me the bapi , when i use it the program goes to dump , its regarding the category , what has to be passed to the category ,
    As of now i m passing Notification type , Requestor , Code grp and activity code.
    Sorry for not Rewarding points in time , i was at lunch ,

  • Sales order creation with bapi in webdynpro using table control

    When i use table control to update the line items only first row is getting updated in the sale order creation and the loop is not updating the other row to header only the first row is getting saved, for the same set of data sale order is getting created in va01 for multiple line items. Pls give me some idea to resolve this issue, here is the code i am using for creating sale order using bapi 'BAPI_SALESORDER_CREATEFROMDAT2' method CREATE_SALES_ORDER .
    Declaration for Order Header Node DATA: node_order_header TYPE REF TO if_wd_context_node, elem_order_header TYPE REF TO if_wd_context_element, stru_order_header TYPE if_componentcontroller=>element_order_header . * Declaration for Order Items Node DATA: node_order_items TYPE REF TO if_wd_context_node, elem_order_items TYPE REF TO if_wd_context_element, stru_order_items TYPE if_componentcontroller=>element_order_items . * Declaration for Order Partners Node DATA: node_order_partners TYPE REF TO if_wd_context_node, elem_order_partners TYPE REF TO if_wd_context_element, stru_order_partners TYPE if_componentcontroller=>element_order_partners . node_order_header = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_header ). elem_order_header = node_order_header->get_element( ). elem_order_header->get_static_attributes( IMPORTING static_attributes = stru_order_header ). * via lead selection node_order_items = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_items ). elem_order_items = node_order_items->get_element( ). elem_order_items->get_static_attributes( IMPORTING static_attributes = stru_order_items ). * via lead selection node_order_partners = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_partners ). elem_order_partners = node_order_partners->get_element( ). elem_order_partners->get_static_attributes( IMPORTING static_attributes = stru_order_partners ). DATA: v_sales_doc TYPE bapivbeln-vbeln. DATA: w_order_header_in TYPE bapisdhd1, i_order_header_in TYPE table of bapisdhd1," i_order_partners TYPE TABLE OF bapiparnr, w_order_partners TYPE bapiparnr, i_return TYPE TABLE OF bapiret2, w_return TYPE bapiret2, i_order_items_in TYPE TABLE OF bapisditm, w_order_items_in TYPE bapisditm, i_order_conditions_in TYPE TABLE OF bapicond, w_order_conditions_in TYPE bapicond, w_order_SCHDL type BAPISCHDL, i_order_SCHDL type table of BAPISCHDL. * Order Header Details CLEAR: w_order_header_in, i_order_partners, i_return, i_order_items_in, i_order_conditions_in, w_order_SCHDL, i_order_SCHDL. refresh : i_order_partners, i_return, i_order_items_in, i_order_conditions_in, i_order_SCHDL. w_order_header_in-doc_type = stru_order_header-doc_type. w_order_header_in-sales_org = stru_order_header-sales_org. w_order_header_in-distr_chan = stru_order_header-distr_chan. w_order_header_in-division = stru_order_header-division. w_order_header_in-req_date_h = stru_order_header-req_date_h. w_order_header_in-sales_dist = stru_order_header-sales_dist. w_order_header_in-purch_no_c = stru_order_header-purch_no_c. * Order Item Details CLEAR: i_order_items_in,w_order_items_in. * w_order_items_in-itm_num = stru_order_items-itm_num. w_order_items_in-ITM_NUMBER = stru_order_items-ITM_NUMBER. w_order_items_in-material = stru_order_items-material. w_order_items_in-target_qty = stru_order_items-target_qty."'5'. w_order_items_in-target_qu = stru_order_items-target_qu."'5'. w_order_items_in-plant = stru_order_items-plant. w_order_items_in-target_val = stru_order_items-target_val. w_order_items_in-currency = stru_order_items-currency. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = w_order_items_in-material IMPORTING output = w_order_items_in-material. APPEND w_order_items_in TO i_order_items_in. * Order Partner Details CLEAR: i_order_partners,w_order_partners. w_order_partners-partn_role = stru_order_partners-partn_role. w_order_partners-partn_numb = stru_order_partners-partn_numb. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = w_order_partners-partn_numb IMPORTING output = w_order_partners-partn_numb. APPEND w_order_partners TO i_order_partners. * Order Condition Details w_order_SCHDL-ITM_NUMBER = stru_order_items-itm_number." '000010'. w_order_SCHDL-req_qty = stru_order_items-target_qty." '5'. APPEND w_order_SCHDL to i_order_SCHDL. * Create Sales Order BAPI Call *loop at i_order_header_in into w_order_header_in. CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2' EXPORTING order_header_in = w_order_header_in IMPORTING salesdocument = v_sales_doc TABLES return = i_return order_items_in = i_order_items_in order_partners = i_order_partners order_schedules_in = i_order_SCHDL order_conditions_in = i_order_conditions_in. * Get message manager DATA: l_current_controller TYPE REF TO if_wd_controller, l_message_manager TYPE REF TO if_wd_message_manager. l_current_controller ?= wd_this->wd_get_api( ). CALL METHOD l_current_controller->get_message_manager RECEIVING message_manager = l_message_manager. DATA: v_message_text TYPE string. * When Sales Order is created commit the data IF NOT v_sales_doc IS INITIAL. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X'. CONCATENATE 'Sales Document' v_sales_doc 'has been created.' INTO v_message_text SEPARATED BY space. * Report Success message CALL METHOD l_message_manager->report_success EXPORTING message_text = v_message_text. ELSE. v_message_text = 'Error Creating Sales Order'. * Report Error message CALL METHOD l_message_manager->report_error_message EXPORTING message_text = v_message_text. ENDIF. *endloop. endmethod. and code for table control i am using is method WDDOINIT . Types : Begin of item_tab, itm_number type bapisditm-itm_number, material type bapisditm-material, plant type bapisditm-plant , target_qty type bapisditm-target_qty, target_qu type bapisditm-target_qu, target_val type bapisditm-target_val, currency type bapisditm-currency, end of item_tab. *Creating internal table and Work Area of the same structure *as that of the Node created. Data : it_item type standard table of item_tab, wa_item type item_tab. *Appending Blank Work Area to Internal table. ***********************************************888 *LOOP AT it_item INTO wa_item. **wa_item-itm_number to bapisditm-itm_number. **wa_item-material to bapisditm-material. **wa_item-plant to bapisditm-plant. **wa_item-target_qty to bapisditm-target_qty. **wa_item-target_qu to bapisditm-target_qu. **wa_item-target_val to bapisditm-target_val. **wa_item-currency to bapisditm-currency. ** * APPEND wa_item TO it_item. *ENDLOOP. **********************************************88 ******** Do 10 times. Append wa_item to it_item. enddo. ********* "Binding the table DATA lo_nd_order_items TYPE REF TO if_wd_context_node. * DATA lt_material TYPE wd_this->Elements_material. * navigate from to via lead selection lo_nd_order_items = wd_context->get_child_node( name = wd_this->wdctx_order_items ). * @TODO handle non existant child * IF lo_nd_material IS INITIAL. * ENDIF. ** @TODO compute values ** e.g. call a model function * lo_nd_order_items->bind_table( new_items = it_item set_initial_elements = abap_true ). endmethod.

    DATA: node_order_header TYPE REF TO if_wd_context_node, elem_order_header TYPE REF TO if_wd_context_element, stru_order_header TYPE if_componentcontroller=>element_order_header . * Declaration for Order Items Node DATA: node_order_items TYPE REF TO if_wd_context_node, elem_order_items TYPE REF TO if_wd_context_element, stru_order_items TYPE if_componentcontroller=>element_order_items . * Declaration for Order Partners Node DATA: node_order_partners TYPE REF TO if_wd_context_node, elem_order_partners TYPE REF TO if_wd_context_element, stru_order_partners TYPE if_componentcontroller=>element_order_partners . node_order_header = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_header ). elem_order_header = node_order_header->get_element( ). elem_order_header->get_static_attributes( IMPORTING static_attributes = stru_order_header ). * via lead selection node_order_items = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_items ). elem_order_items = node_order_items->get_element( ). elem_order_items->get_static_attributes( IMPORTING static_attributes = stru_order_items ). * via lead selection node_order_partners = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_partners ). elem_order_partners = node_order_partners->get_element( ). elem_order_partners->get_static_attributes( IMPORTING static_attributes = stru_order_partners ). DATA: v_sales_doc TYPE bapivbeln-vbeln. DATA: w_order_header_in TYPE bapisdhd1, i_order_header_in TYPE table of bapisdhd1," i_order_partners TYPE TABLE OF bapiparnr, w_order_partners TYPE bapiparnr, i_return TYPE TABLE OF bapiret2, w_return TYPE bapiret2, i_order_items_in TYPE TABLE OF bapisditm, w_order_items_in TYPE bapisditm, i_order_conditions_in TYPE TABLE OF bapicond, w_order_conditions_in TYPE bapicond, w_order_SCHDL type BAPISCHDL, i_order_SCHDL type table of BAPISCHDL. * Order Header Details CLEAR: w_order_header_in, i_order_partners, i_return, i_order_items_in, i_order_conditions_in, w_order_SCHDL, i_order_SCHDL. refresh : i_order_partners, i_return, i_order_items_in, i_order_conditions_in, i_order_SCHDL. w_order_header_in-doc_type = stru_order_header-doc_type. w_order_header_in-sales_org = stru_order_header-sales_org. w_order_header_in-distr_chan = stru_order_header-distr_chan. w_order_header_in-division = stru_order_header-division. w_order_header_in-req_date_h = stru_order_header-req_date_h. w_order_header_in-sales_dist = stru_order_header-sales_dist. w_order_header_in-purch_no_c = stru_order_header-purch_no_c. * Order Item Details CLEAR: i_order_items_in,w_order_items_in. * w_order_items_in-itm_num = stru_order_items-itm_num. w_order_items_in-ITM_NUMBER = stru_order_items-ITM_NUMBER. w_order_items_in-material = stru_order_items-material. w_order_items_in-target_qty = stru_order_items-target_qty."'5'. w_order_items_in-target_qu = stru_order_items-target_qu."'5'. w_order_items_in-plant = stru_order_items-plant. w_order_items_in-target_val = stru_order_items-target_val. w_order_items_in-currency = stru_order_items-currency. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = w_order_items_in-material IMPORTING output = w_order_items_in-material. APPEND w_order_items_in TO i_order_items_in. * Order Partner Details CLEAR: i_order_partners,w_order_partners. w_order_partners-partn_role = stru_order_partners-partn_role. w_order_partners-partn_numb = stru_order_partners-partn_numb. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = w_order_partners-partn_numb IMPORTING output = w_order_partners-partn_numb. APPEND w_order_partners TO i_order_partners. * Order Condition Details w_order_SCHDL-ITM_NUMBER = stru_order_items-itm_number." '000010'. w_order_SCHDL-req_qty = stru_order_items-target_qty." '5'. APPEND w_order_SCHDL to i_order_SCHDL. * Create Sales Order BAPI Call *loop at i_order_header_in into w_order_header_in. CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2' EXPORTING order_header_in = w_order_header_in IMPORTING salesdocument = v_sales_doc TABLES return = i_return order_items_in = i_order_items_in order_partners = i_order_partners order_schedules_in = i_order_SCHDL order_conditions_in = i_order_conditions_in. * Get message manager DATA: l_current_controller TYPE REF TO if_wd_controller, l_message_manager TYPE REF TO if_wd_message_manager. l_current_controller ?= wd_this->wd_get_api( ). CALL METHOD l_current_controller->get_message_manager RECEIVING message_manager = l_message_manager. DATA: v_message_text TYPE string. * When Sales Order is created commit the data IF NOT v_sales_doc IS INITIAL. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X'. CONCATENATE 'Sales Document' v_sales_doc 'has been created.' INTO v_message_text SEPARATED BY space. * Report Success message CALL METHOD l_message_manager->report_success EXPORTING message_text = v_message_text. ELSE. v_message_text = 'Error Creating Sales Order'. * Report Error message CALL METHOD l_message_manager->report_error_message EXPORTING message_text = v_message_text. ENDIF. *endloop. endmethod. and code for table control i am using is method WDDOINIT . Types : Begin of item_tab, itm_number type bapisditm-itm_number, material type bapisditm-material, plant type bapisditm-plant , target_qty type bapisditm-target_qty, target_qu type bapisditm-target_qu, target_val type bapisditm-target_val, currency type bapisditm-currency, end of item_tab. *Creating internal table and Work Area of the same structure *as that of the Node created. Data : it_item type standard table of item_tab, wa_item type item_tab. *Appending Blank Work Area to Internal table. ***********************************************888 *LOOP AT it_item INTO wa_item. **wa_item-itm_number to bapisditm-itm_number. **wa_item-material to bapisditm-material. **wa_item-plant to bapisditm-plant. **wa_item-target_qty to bapisditm-target_qty. **wa_item-target_qu to bapisditm-target_qu. **wa_item-target_val to bapisditm-target_val. **wa_item-currency to bapisditm-currency. ** * APPEND wa_item TO it_item. *ENDLOOP. **********************************************88 ******** Do 10 times. Append wa_item to it_item. enddo. ********* "Binding the table DATA lo_nd_order_items TYPE REF TO if_wd_context_node. * DATA lt_material TYPE wd_this->Elements_material. * navigate from to via lead selection lo_nd_order_items = wd_context->get_child_node( name = wd_this->wdctx_order_items ). * @TODO handle non existant child * IF lo_nd_material IS INITIAL. * ENDIF. ** @TODO compute values ** e.g. call a model function * lo_nd_order_items->bind_table( new_items = it_item set_initial_elements = abap_true ). endmethod.

  • Sales order creation with bapi in webdynpro

    When i use table control to update the line items only first row is getting updated in the sale order creation and the loop is not updating the other row to header only the first row is getting saved, for the same set of  data sale order is getting created in  va01 for multiple line items.
    Pls give me some idea to resolve this issue,
    here is the code i am using for creating sale order using bapi 'BAPI_SALESORDER_CREATEFROMDAT2'
    method CREATE_SALES_ORDER .
    Declaration for Order Header Node
    DATA: node_order_header TYPE REF TO if_wd_context_node,
           elem_order_header TYPE REF TO if_wd_context_element,
           stru_order_header TYPE if_componentcontroller=>element_order_header .
    Declaration for Order Items Node
    DATA: node_order_items TYPE REF TO if_wd_context_node,
           elem_order_items TYPE REF TO if_wd_context_element,
           stru_order_items TYPE if_componentcontroller=>element_order_items .
    Declaration for Order Partners Node
    DATA: node_order_partners TYPE REF TO if_wd_context_node,
    elem_order_partners TYPE REF TO if_wd_context_element,
    stru_order_partners TYPE if_componentcontroller=>element_order_partners .
    node_order_header = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_header
    elem_order_header = node_order_header->get_element( ).
    elem_order_header->get_static_attributes(
    IMPORTING static_attributes = stru_order_header
    <ORDER_ITEMS> via lead selection
    node_order_items = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_items ).
    elem_order_items = node_order_items->get_element( ).
    elem_order_items->get_static_attributes(
    IMPORTING static_attributes = stru_order_items ).
    <ORDER_PARTNERS> via lead selection
    node_order_partners = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_partners ).
    elem_order_partners = node_order_partners->get_element( ).
    elem_order_partners->get_static_attributes(
    IMPORTING static_attributes = stru_order_partners ).
    DATA: v_sales_doc TYPE bapivbeln-vbeln.
    DATA: w_order_header_in TYPE bapisdhd1,
          i_order_header_in TYPE table of bapisdhd1,"
          i_order_partners TYPE TABLE OF bapiparnr,
          w_order_partners TYPE bapiparnr,
          i_return TYPE TABLE OF bapiret2,
          w_return TYPE bapiret2,
          i_order_items_in TYPE TABLE OF bapisditm,
          w_order_items_in TYPE bapisditm,
          i_order_conditions_in TYPE TABLE OF bapicond,
          w_order_conditions_in TYPE bapicond,
          w_order_SCHDL type  BAPISCHDL,
          i_order_SCHDL type table of BAPISCHDL.
    Order Header Details
    CLEAR: w_order_header_in, i_order_partners, i_return, i_order_items_in,
              i_order_conditions_in, w_order_SCHDL, i_order_SCHDL.
    refresh : i_order_partners, i_return, i_order_items_in,
              i_order_conditions_in, i_order_SCHDL.
    w_order_header_in-doc_type = stru_order_header-doc_type.
    w_order_header_in-sales_org = stru_order_header-sales_org.
    w_order_header_in-distr_chan = stru_order_header-distr_chan.
    w_order_header_in-division = stru_order_header-division.
    w_order_header_in-req_date_h = stru_order_header-req_date_h.
    w_order_header_in-sales_dist = stru_order_header-sales_dist.
    w_order_header_in-purch_no_c = stru_order_header-purch_no_c.
    Order Item Details
      CLEAR: i_order_items_in,w_order_items_in.
    w_order_items_in-itm_num = stru_order_items-itm_num.
    w_order_items_in-ITM_NUMBER =  stru_order_items-ITM_NUMBER.
    w_order_items_in-material = stru_order_items-material.
    w_order_items_in-target_qty = stru_order_items-target_qty."'5'.
    w_order_items_in-target_qu = stru_order_items-target_qu."'5'.
    w_order_items_in-plant = stru_order_items-plant.
    w_order_items_in-target_val = stru_order_items-target_val.
    w_order_items_in-currency = stru_order_items-currency.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
       input = w_order_items_in-material
       IMPORTING output = w_order_items_in-material.
    APPEND w_order_items_in TO i_order_items_in.
    Order Partner Details
    CLEAR: i_order_partners,w_order_partners.
    w_order_partners-partn_role = stru_order_partners-partn_role.
    w_order_partners-partn_numb = stru_order_partners-partn_numb.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING input = w_order_partners-partn_numb
       IMPORTING output = w_order_partners-partn_numb.
    APPEND w_order_partners TO i_order_partners.
    Order Condition Details
    w_order_SCHDL-ITM_NUMBER  = stru_order_items-itm_number." '000010'.
             w_order_SCHDL-req_qty     = stru_order_items-target_qty." '5'.
              APPEND w_order_SCHDL to i_order_SCHDL.
    Create Sales Order BAPI Call
    *loop at i_order_header_in into  w_order_header_in.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
       order_header_in = w_order_header_in
       IMPORTING
         salesdocument = v_sales_doc
         TABLES
           return = i_return
           order_items_in = i_order_items_in
           order_partners = i_order_partners
            order_schedules_in  = i_order_SCHDL
           order_conditions_in = i_order_conditions_in.
    Get message manager
      DATA: l_current_controller TYPE REF TO if_wd_controller,
            l_message_manager    TYPE REF TO if_wd_message_manager.
      l_current_controller ?= wd_this->wd_get_api( ).
      CALL METHOD l_current_controller->get_message_manager
        RECEIVING
          message_manager = l_message_manager.
      DATA: v_message_text TYPE string.
    When Sales Order is created commit the data
    IF NOT v_sales_doc IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
          wait = 'X'.
        CONCATENATE 'Sales Document' v_sales_doc 'has been created.'
        INTO v_message_text SEPARATED BY space.
    Report Success message
        CALL METHOD l_message_manager->report_success
        EXPORTING message_text = v_message_text.
        ELSE.
          v_message_text = 'Error Creating Sales Order'.
    Report Error message
          CALL METHOD l_message_manager->report_error_message
          EXPORTING message_text = v_message_text.
          ENDIF.
    *endloop.
    endmethod.
    and code for table control i am using is
    method WDDOINIT .
      Types : Begin of item_tab,
            itm_number  type bapisditm-itm_number,
            material type bapisditm-material,
            plant type bapisditm-plant ,
            target_qty type bapisditm-target_qty,
            target_qu type bapisditm-target_qu,
            target_val type bapisditm-target_val,
        currency type bapisditm-currency,
            end of item_tab.
    *Creating internal table and Work Area of the same structure
    *as that of the Node created.
    Data : it_item type standard table of item_tab,
            wa_item type item_tab.
    *Appending Blank Work Area to Internal table.
    ***********************************************888
    *LOOP AT it_item INTO wa_item.
    **wa_item-itm_number to  bapisditm-itm_number.
    **wa_item-material to bapisditm-material.
    **wa_item-plant to bapisditm-plant.
    **wa_item-target_qty to bapisditm-target_qty.
    **wa_item-target_qu to bapisditm-target_qu.
    **wa_item-target_val to bapisditm-target_val.
    **wa_item-currency to bapisditm-currency.
       APPEND wa_item TO it_item.
    *ENDLOOP.
    **********************************************88
    Do 10 times.
    Append wa_item to it_item.
    enddo.
    "Binding the table
    DATA lo_nd_order_items TYPE REF TO if_wd_context_node.
    DATA lt_material TYPE wd_this->Elements_material.
    navigate from <CONTEXT> to <MATERIAL> via lead selection
      lo_nd_order_items = wd_context->get_child_node( name = wd_this->wdctx_order_items ).
    @TODO handle non existant child
    IF lo_nd_material IS INITIAL.
    ENDIF.
    @TODO compute values
    e.g. call a model function
      lo_nd_order_items->bind_table( new_items =
      it_item set_initial_elements = abap_true ).
    endmethod.

    When i use table control to update the line items only first row is getting updated in the sale order creation and the loop is not updating the other row to header only the first row is getting saved, for the same set of  data sale order is getting created in  va01 for multiple line items.
    Pls give me some idea to resolve this issue,
    here is the code i am using for creating sale order using bapi 'BAPI_SALESORDER_CREATEFROMDAT2'
    method CREATE_SALES_ORDER .
    Declaration for Order Header Node
    DATA: node_order_header TYPE REF TO if_wd_context_node,
           elem_order_header TYPE REF TO if_wd_context_element,
           stru_order_header TYPE if_componentcontroller=>element_order_header .
    Declaration for Order Items Node
    DATA: node_order_items TYPE REF TO if_wd_context_node,
           elem_order_items TYPE REF TO if_wd_context_element,
           stru_order_items TYPE if_componentcontroller=>element_order_items .
    Declaration for Order Partners Node
    DATA: node_order_partners TYPE REF TO if_wd_context_node,
    elem_order_partners TYPE REF TO if_wd_context_element,
    stru_order_partners TYPE if_componentcontroller=>element_order_partners .
    node_order_header = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_header
    elem_order_header = node_order_header->get_element( ).
    elem_order_header->get_static_attributes(
    IMPORTING static_attributes = stru_order_header
    <ORDER_ITEMS> via lead selection
    node_order_items = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_items ).
    elem_order_items = node_order_items->get_element( ).
    elem_order_items->get_static_attributes(
    IMPORTING static_attributes = stru_order_items ).
    <ORDER_PARTNERS> via lead selection
    node_order_partners = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_partners ).
    elem_order_partners = node_order_partners->get_element( ).
    elem_order_partners->get_static_attributes(
    IMPORTING static_attributes = stru_order_partners ).
    DATA: v_sales_doc TYPE bapivbeln-vbeln.
    DATA: w_order_header_in TYPE bapisdhd1,
          i_order_header_in TYPE table of bapisdhd1,"
          i_order_partners TYPE TABLE OF bapiparnr,
          w_order_partners TYPE bapiparnr,
          i_return TYPE TABLE OF bapiret2,
          w_return TYPE bapiret2,
          i_order_items_in TYPE TABLE OF bapisditm,
          w_order_items_in TYPE bapisditm,
          i_order_conditions_in TYPE TABLE OF bapicond,
          w_order_conditions_in TYPE bapicond,
          w_order_SCHDL type  BAPISCHDL,
          i_order_SCHDL type table of BAPISCHDL.
    Order Header Details
    CLEAR: w_order_header_in, i_order_partners, i_return, i_order_items_in,
              i_order_conditions_in, w_order_SCHDL, i_order_SCHDL.
    refresh : i_order_partners, i_return, i_order_items_in,
              i_order_conditions_in, i_order_SCHDL.
    w_order_header_in-doc_type = stru_order_header-doc_type.
    w_order_header_in-sales_org = stru_order_header-sales_org.
    w_order_header_in-distr_chan = stru_order_header-distr_chan.
    w_order_header_in-division = stru_order_header-division.
    w_order_header_in-req_date_h = stru_order_header-req_date_h.
    w_order_header_in-sales_dist = stru_order_header-sales_dist.
    w_order_header_in-purch_no_c = stru_order_header-purch_no_c.
    Order Item Details
      CLEAR: i_order_items_in,w_order_items_in.
    w_order_items_in-itm_num = stru_order_items-itm_num.
    w_order_items_in-ITM_NUMBER =  stru_order_items-ITM_NUMBER.
    w_order_items_in-material = stru_order_items-material.
    w_order_items_in-target_qty = stru_order_items-target_qty."'5'.
    w_order_items_in-target_qu = stru_order_items-target_qu."'5'.
    w_order_items_in-plant = stru_order_items-plant.
    w_order_items_in-target_val = stru_order_items-target_val.
    w_order_items_in-currency = stru_order_items-currency.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
       input = w_order_items_in-material
       IMPORTING output = w_order_items_in-material.
    APPEND w_order_items_in TO i_order_items_in.
    Order Partner Details
    CLEAR: i_order_partners,w_order_partners.
    w_order_partners-partn_role = stru_order_partners-partn_role.
    w_order_partners-partn_numb = stru_order_partners-partn_numb.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING input = w_order_partners-partn_numb
       IMPORTING output = w_order_partners-partn_numb.
    APPEND w_order_partners TO i_order_partners.
    Order Condition Details
    w_order_SCHDL-ITM_NUMBER  = stru_order_items-itm_number." '000010'.
             w_order_SCHDL-req_qty     = stru_order_items-target_qty." '5'.
              APPEND w_order_SCHDL to i_order_SCHDL.
    Create Sales Order BAPI Call
    *loop at i_order_header_in into  w_order_header_in.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
       order_header_in = w_order_header_in
       IMPORTING
         salesdocument = v_sales_doc
         TABLES
           return = i_return
           order_items_in = i_order_items_in
           order_partners = i_order_partners
            order_schedules_in  = i_order_SCHDL
           order_conditions_in = i_order_conditions_in.
    Get message manager
      DATA: l_current_controller TYPE REF TO if_wd_controller,
            l_message_manager    TYPE REF TO if_wd_message_manager.
      l_current_controller ?= wd_this->wd_get_api( ).
      CALL METHOD l_current_controller->get_message_manager
        RECEIVING
          message_manager = l_message_manager.
      DATA: v_message_text TYPE string.
    When Sales Order is created commit the data
    IF NOT v_sales_doc IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
          wait = 'X'.
        CONCATENATE 'Sales Document' v_sales_doc 'has been created.'
        INTO v_message_text SEPARATED BY space.
    Report Success message
        CALL METHOD l_message_manager->report_success
        EXPORTING message_text = v_message_text.
        ELSE.
          v_message_text = 'Error Creating Sales Order'.
    Report Error message
          CALL METHOD l_message_manager->report_error_message
          EXPORTING message_text = v_message_text.
          ENDIF.
    *endloop.
    endmethod.
    and code for table control i am using is
    method WDDOINIT .
      Types : Begin of item_tab,
            itm_number  type bapisditm-itm_number,
            material type bapisditm-material,
            plant type bapisditm-plant ,
            target_qty type bapisditm-target_qty,
            target_qu type bapisditm-target_qu,
            target_val type bapisditm-target_val,
        currency type bapisditm-currency,
            end of item_tab.
    *Creating internal table and Work Area of the same structure
    *as that of the Node created.
    Data : it_item type standard table of item_tab,
            wa_item type item_tab.
    *Appending Blank Work Area to Internal table.
    ***********************************************888
    *LOOP AT it_item INTO wa_item.
    **wa_item-itm_number to  bapisditm-itm_number.
    **wa_item-material to bapisditm-material.
    **wa_item-plant to bapisditm-plant.
    **wa_item-target_qty to bapisditm-target_qty.
    **wa_item-target_qu to bapisditm-target_qu.
    **wa_item-target_val to bapisditm-target_val.
    **wa_item-currency to bapisditm-currency.
       APPEND wa_item TO it_item.
    *ENDLOOP.
    **********************************************88
    Do 10 times.
    Append wa_item to it_item.
    enddo.
    "Binding the table
    DATA lo_nd_order_items TYPE REF TO if_wd_context_node.
    DATA lt_material TYPE wd_this->Elements_material.
    navigate from <CONTEXT> to <MATERIAL> via lead selection
      lo_nd_order_items = wd_context->get_child_node( name = wd_this->wdctx_order_items ).
    @TODO handle non existant child
    IF lo_nd_material IS INITIAL.
    ENDIF.
    @TODO compute values
    e.g. call a model function
      lo_nd_order_items->bind_table( new_items =
      it_item set_initial_elements = abap_true ).
    endmethod.

  • Material creation with BAPI

    Hi gurús,
                   I am using BAPI_MATERIAL_SAVEDATA to create material. But the ejecution show the following message:
    046Field WERKS has been transferred inconsistently or is blank.
    I really cant find where i have to charge it. I think im do it in all the fields where WERKS is necesary.
    Regards
    Enzo

    Hi Enzo I ussualy use BAPI_MATERIAL_MAINTAINDATA_RT to create materials, if not resolve the problem, you can try with this.
    Regards

  • LSMW/BDC for service PO creation

    Dear all,
    Can anybody pl suggest how to create an LSMW or BDC for service PO creation with multiple
    line items and under each line item there will be multiple service line items also.
    Thx
    Amitava

    hi,
    You could do LSMW without the help of a technical consultant.
    In LSMW you could create a PO by BDc or through BAPI.
    Make use of the BAPI to create.
    BAPI_PO_CREATE1. ( Nothing but a Se37 Function module).
    the parmeters required can be checked in funcition module documentaion in the bapi.
    Hope this helps.
    harish

  • How to create SynBO with  BAPIs from R/3 server?

    Hi,
    Can I get any documents or links regarding Syncbo creation with BAPIs from another R/3 server. I think I have to create RFC destination for this. The steps for creating RFC destination in Netweaver 2004s is also helpful for me.
    Also I need the required configurations also.
    Regards
    Shemim

    Hi Shemin,
    Refer the following link for Mobile Development Kit
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21eba3a7-0601-0010-b982-92f1fca3258a
    This will provide you with rules of creating BAPI wrappers and sample BAPI wrappers.
    For creating RFC destination, contact your BASIS team member. You may not rights to do it by yourself. They will also tell the exact prodecure. It start with transaction SM59.
    Regards,
    Rahul

  • Service entry sheet creation thru bapi for multiple line items

    HI All,
    WE are using BAPI_ENTRYSHEET_CREATE bapi for the creation of service entry sheet against service PO.
    We are able to create the service entry sheet successfully with single sevice line item using this bapi,but when we are going for multiple service line items in item services tab in aPO, we are able to create the service entry sheet with only one service line item although there are 4 service line items in the item service tab in the po.
    We know that this bapi cannot support more than one po line item as it has provision for only one line item at the header leavel in the bapi
    will be rewarded for the best solution.
    Regards,
    velu

    Hi,
    Do you know the note 420334?. There you have very useful information.
    Best Regards,
    Arminda Jack

  • BAPI for Outbound Delivery Creation with reference to Sales Order - VL01N

    Hi Everybody,
           We are in ECC 5.0 version.
           I want to create a enhancement for Outbound Delivery Creation with reference to a Sales Order.
           Is any BAPI available for this ?
           Any input on this will be very much helpfull.
           Please suggest any BAPI available for this, or should I go for BDC using VL01N or VL04 ?
           Thanks in advance.
    regards,
    Nagarajan.J

    Hi Nagarajan,
    The BAPI BAPI_DELIVERYPROCESSING_EXEC meets your requirement. You can create delivery with reference to sales order.
    The below is the sample code...
      data:lt_request      like bapideliciousrequest
                                    occurs 0 with header line,
           lt_createditems like bapideliciouscreateditems
                                    occurs 0 with header line,
           lt_return       like bapiret2
                                    occurs 0 with header line.
        lt_request-document_type      = 'A'.
        lt_request-document_numb      = vbeln.
        lt_request-document_item      = posnr.
      lt_request-material           = matnr.
      lt_request-plant              = werks.
      lt_request-stge_loc           = lgort.
      lt_request-quantity_base__uom = base_uom_qty.
      lt_request-delivery_date      = sy-datum.
      append lt_request.
      call function 'BAPI_DELIVERYPROCESSING_EXEC'
      EXPORTING
        DELIVERY_EXTEND       =
        TECHN_CONTROL         =
        tables
          request               = lt_request
          createditems          = lt_createditems
          return                = lt_return.
      loop at lt_return where type = 'A'
                          or  type = 'E'.
        exit.
      endloop.
      if sy-subrc <> 0.
    Use the BAPI for Commit
        call function 'BAPI_TRANSACTION_COMMIT'
             exporting
                  wait = 'H'.
      endif.
    Thanks
    Ramakrishna

  • BAPI for Outbound Delivery Creation with reference to Sales Order

    Dear all,
    I'm on R/3 4.6B platform and to develop an RFC for outbound Delivery creation instead of using the standard VL01N transaction.
    I've review BAPI for Outbound Delivery Creation with reference to Sales Order - VL01N thread which suggest BAPI_DELIVERYPROCESSING_EXEC .
    However, in 4.6B, that function module doesn't exist. Appreciate any suggestion and or workaround.
    Thanks.
    Steven
    Edited by: Steven Khoo on Mar 25, 2010 7:13 AM
    Edited by: Steven Khoo on Mar 25, 2010 7:14 AM

    Not required anymore

  • Using Quota templates with Self Service Site Creation

    I am having an issue with quota templates not getting assigned to site collections created with Self Service Site Creation.
    I set up a quota template in 'Specify Quota Templates' and give it the name 'test'.  I then go to self service site creation management and select the name 'test' from the 'Quota template to apply' dropdown.  I then create a site using self service
    site creation and when completed no template is applied to the new site collection.  I am wondering if anybody has seen this or if not am I incorrect in what I am expecting, that is that all site created in that web application should have the quota template
    applied that I selected in self-service site creation management
    Steven Albrecht
    University of Colorado Denver
    Steven Albrecht

    Hi Steven,
    Please create a quota template named "Personal site" and apply in self service site creation page, then check again.
    http://blogs.msdn.com/b/jimmiet/archive/2012/07/22/10332361.aspx
    http://danmyhre.wordpress.com/2010/03/16/my-sites-do-not-have-a-quota-when-they-are-created/
    Thanks
    Daniel Yang
    TechNet Community Support

  • BAPI for Service order creation

    Hi ,
    Please tell me if any Bapi for service order creation  , T-code : IW31
    regards,
    Prakash

    Hi Prakash,
    Have a look on the following BAPIs:
    BAPI_ISUSMORDER_CREATEMULTIPLE - Create Service Orders
    BAPI_ALM_CONF_CREATE - Create confirmation for maintenance/service order
    WTY04_CREATE_SERVICE_ORDER - Create Service order via function module.
    Hope this will help.
    Regards,
    Nitin.

Maybe you are looking for

  • Computer Vs. TV

    I'm working on a project that I shot and edited in HD then color corrected in After Effects, exported a final SD version through Final Cut and compressed onto a dvd so I could compare the look from my monitor to that on my tv. I do not have a good tv

  • How to expand or collapse the tree using node level.

    Hi All, I have 4 node levels in tree including the root at node level 0. If i click on node level1 for instance ,all the node level 1 should be expanded or collapsed. Only the root and and nodes at level 1 should be visible to the user. Can anybody p

  • Cycle through key commands?

    Hello everyone, I'm trying to assign a key command but am having a hard time doing so. I'd like to assign the "turn alias into real copy" key command with some modification of the letter "K" as I use "K" for turning loops into real copies, but the ke

  • Why can't I revert to Quicktime 7.2

    I'd like to go back to Quicktime 7.2 but when I try to install it on my system drive it tells me the system drive is incompatible. Is it because I'm running Leopard?

  • Odd shaped images as links

    For simplicity's sake, let's say I am trying to recreate the US map from here: https://www.politicalpagesdirectory.com/states I have a bunch of pictures with alpha channel that would make a "map". They would be one next to another and each of them wo