How to add new xml item(BAPI requset)?

Hello
i want to create bom to ERP from mii
how to add new xml item(BAPI requset)?
i use bapi CAD_CREATE_BOM_WITH_SUB_ITEMS
this bapi's format is
<table>
<item>
    <col1>1111</col1>
    <col2>bbbb</col2>
</item>
</table>
i want to add <item>
like this
<table>
<item>
    <col1>1111</col1>
    <col2>bbbb</col2>
</item>
<item>
    <col1>22222</col1>
    <col2>bbbb</col2>
</item>
</table>
how to set trx?
i tryed
SAP_JCo_Interface_0.Request{/CAD_CREATE_BOM_WITH_SUB_ITEMS/TABLES/BOM_ITEM/item[2]/SORTF}
when error occured
use MII12.0
Edited by: Atsushi Iwasaki on May 18, 2010 6:22 AM

Hi,
You can try this alternative
Step 1) Create XML Document with required structure which you want to pass it to BAPI request.
Step 2) Populate the XML Row with required contents and map it to above created XML document
Step 3) Map above created XML Document to BAPI request (use assign XML option dfrom link editor rather tha assign value)
This will help to map dynamic contents to your BAPI request.
Regards,
Shalaka

Similar Messages

  • How to add new line item using BAPI BAPI_CONTRACT_CHANGE for contract-ME32K

    HI Experts,
    how to add new line item using BAPI: BAPI_CONTRACT_CHANGE for existing contract.
    Requirement:
    Already the contract having two line items using ME31K.
    Custom program has to add new line items in existing contract.
    Thanks,
    Sendil

    I got the solution:
    We can do like this:
    1. Get all details using details, BAPI_CONTRACT_GETDETAIL.
    2. After getting results, append new line item. Then use your BAPI.
    Check this posting program.. where this bapi is used, use the same coding technique.
    IDOC_INPUT_PURCONTRACT_CHANGE

  • How to add new line item to PO using BAPI_PO_CREATE1

    Hi,
    I have a purchase order with 2 line items, now i want to add new line item to the same PO using BAPI_PO_CREATE1.
    Here new line item should be created with reference PR line item.But this PR line item is Dynamic it get generated once the Sales order line item get changed.
    Please let me know how can i pass the PR doc no, PR line item no as reference to create the new PO line item.
    Thanks
    Bhuvana

    Hi,
    I think you need to use BAPI: BAPI_PO_GETDETAIL, then BAPI:BAPI_PO_CHANGE.
    BAPI_PO_CREATE1 equals ME21N, but adding new line item needs to be done in ME22N.
    Cheers,

  • How to add new line item to SO using BAPI_SALESORDER_CREATEFROMDAT2

    Hi,
    I have sales order A with 1 line item, now i want to add new line item with material x and quantity y to the existing sales order A
    using BAPI_SALESORDER_CREATEFROMDAT2.
    Line item no for new line item should be generated by SAP internally.Please let me know the mandatory parameters to be passed to the BAPI to fulfill the requirement.
    DATA: order_header TYPE bapisdhd1,
               order_inx TYPE bapisdhd1x,
               partners TYPE TABLE OF bapiparnr,
               wa_partners TYPE bapiparnr.
    CLEAR: salesdocument,order_header_inx,wa_in, wa_inx.
    REFRESH: item_in, item_inx.
      salesdocument = wa_vbup-vbeln.
      order_header_inx-updateflag = 'X'.
      wa_in-itm_number = ' '.
      wa_in-material = p_nmatnr.
      wa_in-target_qty = gv_menge - gv_wemng.
      APPEND wa_in TO item_in.
      wa_inx-itm_number = ' '.
      wa_inx-updateflag = 'U'.
      wa_inx-target_qty = 'X'.
      APPEND wa_inx TO item_inx.
          CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
          EXPORTING
           salesdocumentin               = salesdocument
           order_header_in               = order_header
           order_header_inx              = order_inx
          IMPORTING
           salesdocument                 = salesdocument
          TABLES
           return                              = return
           order_items_in                = item_in
           order_items_inx               = item_inx
           order_partners                = partners.
    Thanks
    Bhuvana

    Hello,
    You can use FM: BAPI_SALESORDER_CHANGE with update indicator I (insert)
      call function 'BAPI_SALESORDER_CHANGE'
        exporting
          salesdocument    = l_vbeln
          order_header_inx = l_wa_order_header_inx
          simulation       = l_simulation
        tables
          return           = l_i_return
          order_item_in    = l_i_order_item
          order_item_inx   = l_i_order_item_inx
          partners         = l_i_partners
          schedule_lines   = l_i_schedule_lines
          schedule_linesx  = l_i_schedule_linesx
          extensionin      = l_i_extensionin.
    Thanks
    Subhankar

  • How to add new line items to FI document

    Hi,
    When doing a Post Goods Issue From VL02N I need to add a new line item to the posted FI document.  BADI AC_DOCUMENT allows you to change the FI document, but it doesn't appear to allow you to add any new lines.  In fact the Exporting parameter EX_DOCUMENT-item doesn't even have all of the line item fields like the GL account(hkont).  Can the item component be extended to add the other item fields?
    Or is it best to use a Business Transaction Event such as Process 1120??
    Thanks for any and all advice!
    Doug Crabtree

    Hi Chris,
    The $20 difference represents a variance between what is the Material Master standard price and and another price that is maintained because of the current rapidly escalating commodity prices.  This amount and cost center to post it to has to be determined dynamically at posting time from VL02N.  Finance wants to be able to post this variance to account 40100 to be able to track this.  Our FI analyst has determined that this isn't possible using config. 
    A possible solution is to create a custom program to post an additional FI doc using a BAPI with the additional line item and run it as a periodic job, however a real-time solution would be preferred.
    There are BADI's and substitutions to substitute values, but I haven't found any great way to add additional line items.  Even several BTE's I have looked at such as PROCESS_00001120 say not to change bseg lines. 
    Any help or advice would be greatly appreciated.  Thanks.
    Doug

  • How to add new line item based on main item using crm_order_maintain

    Hi All,
    can you please provide a way to create a new line item based on main line item and save in crm transaction( in house repair order) by using crm_order_maintain(from SAP GUI).
    Thanks,
    vinod.

    Hi Vinod,
    The relationship with main item is stored with CRMD_ORDERADM_I- Parent.
    You need to pass the guid of main item to orderadm_i-parent. This will keep the relationship with main item.
    Thanks
    Ajay

  • How to add New LineItems in PO using BAPI - BAPI_PO_CHANGE

    I have gone thru sdn but didnt get any clear solution......
    I am trying to add New Line Items in a PO using BAPI- BAPI_PO_CHANGE, but getting the following errors.....
    E BAPI             003      Instance 83000625 of object type PurchaseOrder could not be changed
    E MEPO           000      Purchase order still contains faulty items
    E SE                026      You cannot maintain service specs. due to incomplete transfer structure
    E ME                003      Plant cor not defined (please check your input)
    suggest any solutions
    here I am trying to add '00040' line item in the Existing PO & add a Service line in the added line item...
      itemx-po_item = '00040'.
      itemx-po_itemx = c_x.
      item-pckg_no = '0000000001'.
      append item. clear item.
      clear service[].
      service-pckg_no = '0000000001'.
      service-line_no = '0000000001'.
      service-subpckg_no = '0000000002'.
      service-from_line = '1' .
      append service. clear service.
      service-pckg_no = '0000000002'.
      service-line_no = '0000000001'.
      service-ext_line = '0000000040'.
      service-quantity = wa_datatab-col10 .
      service-short_text = wa_datatab-col9 .
      service-GR_PRICE = wa_datatab-col12 .
      service-USERF1_NUM  = wa_datatab-col13 .
      append service. clear service.
    then calling 'BAPI_PO_CHANGE' with item, account, condition, services data and its corresponding itemx,accountx,conditionx....
    Kindly send me if there is any code corrections....

    Hi Srikar,
            Check these threads on adding a line item using BAPI_PO_CHANGE
          [Re: FM BAPI_PO_CHANGE & new PO line items;
         [.BAPI_PO_CHANGE - ME 664;
    It may help you
    Regards,
    Pavan.

  • How to add new item in more options dialog box

    Hi all,
    Can anyone tell me how to add new item in more options dialog box(site actions -> more options). I want to add new item there to the new page layout which I created but I didn't find any way to do it. can anyone assist me for this.

    Good point, in order to add a Page into that area, you will need to define a Custom Action. You can learn more about creating Custom Actions here:
    http://msdn.microsoft.com/en-us/library/hh500259(v=office.14).aspx
    As an example, Microsoft uses the following Custom Action to add the "Publishing Page" to that Create Silverlight control when enabling the Publishing features:
    <CustomAction
    Id="CreatePublishingPage"
    GroupId="WebPages"
    Location="Microsoft.SharePoint.Create"
    Sequence="100"
    Title="$Resources:cmscore,Create_WebPages_PublishedPage;"
    Description="$Resources:cmscore,Create_WebPages_PublishedPage_Description;"
    ImageUrl="/_layouts/images/ltpp.png">
    <UrlAction Url="_Layouts/CreatePage.aspx" />
    </CustomAction>
    Dimitri Ayrapetov (MCSE: SharePoint)

  • How to add extra tab in bapi at item level

    hi developer,
    please guide me in solving this problem i.e how to add extra tab in bapi at item level .
    thanks .
    ravi

    What are you exactly asking for, I don't understand your question...
    Transaction screen, adding a tab / customer fields
    Business Object / BAPI, modifying BAPI signature, extension
    NB : The quality of an answer depends significantly on the quality of the question ...
    Regards,
    Raymond

  • How to modify or add new line items to existing BOM?

    Hi All-
    I have been trying to change Quantity, Valid From Date, Sort String and Item Category of existing BOM components, but only successful in changing Quantity and sort string. I dont know why Valid From date and Item Category are not getting changed. Further, I am not able to add new components (items) to the BOM. Can anyone help me with the coding for the same? I shall def reward the good and helpful answers. I am using the function module, CSAP_MAT_BOM_MAINTAIN. Send me some sample program for understanding.
    Thanks
    Shakir

    Hi,
    Please try to  use Explicit Commit work to save the changes.
    check if there in any BAPI FM related to this.
    Please check the structure you have passed for these fields.
    check the Item category for BOM items - POSTP in table T418. if the entry exists then try to add the values again.
    Thanks & Regards,
    Chandralekha.

  • How to add new UI(buttons,checkbox) item in preexisting option dialog and extension in indesign?

    I want to add new UI item in preexisting option dialog and Extension what i have to do ??
    eg:if i select interactivity sub menu item in object menu than I select change to button and in this dialog I want add new menu with the add to object menu(at the bottom) or new input text field .
    for doing such is there any api available to access  there inbuilt dialog or panel or any scripting solution ??

    This doesn't look possible. To define a Dialog or a panel, you need to add the resource definitions of the required widgets to the resource definition of the Dialog/Panel. Duplication of a resouce gives errors on compilation. I might be wrong as I'm new to plug-in developemnt, but most likely this will not be possible.
    Regards
    maddy1907

  • 11.5.9/OAF 5.7 : how to add new fields in iProc "search results" page

    We need to add new fields into iProc "search results" page - "Personalize Self-Service Defn" is et, we can enter the personalization screens (from both the "master" link at top/right page level or from the link above the region) - anyway cannot find how to add new fields. Do we have to go to AK developer and/or XML files or is it feasable from OAF (as it is with 11510) ? TIA.

    It depends on what fields you want to add.
    1. If Oracle has included the fields, just render them via personalizations
    2. If they are brand new fields:
    a) you will need to extend the VO (I do not know the exact name).
    b) change the query to get your extra db columns if necesary
    c) add transient attributes to the VO and map them to b).
    d) Then you need to add the items via personalization and map them to the attributes you created in c)
    Check on metalink for the lates version of OAF Dev Guide and Personalization guide.
    Thanks
    Sandeep

  • How I add a LIBRARY ITEM to a page layout, top/bottom ?

    how I add a LIBRARY ITEM to a page layout, top/bottom ? in
    dwmr mx 2004 and cs4 ?

    Have you looked at the DW help file - it will explain all
    about library items :-)
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    CSS Tutorials for Dreamweaver |
    http://www.adobe.com/devnet/dreamweaver/css.html
    Book: Ultimate CSS Reference (aff link) |
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap
    "lse987" <[email protected]> wrote in
    message news:gpsvtt$t5q$[email protected]..
    > how I add a LIBRARY ITEM to a page layout, top/bottom ?
    in dwmr mx 2004 and cs4 ?

  • Add new line item in VA02 by copying same Order line details

    Hi All,
    I've a requirement where i need to add new line items in the Sales Order (T Code VA02) with reference to the same Order lines . For e.g an Order 80000100 which has 2 line items and the requirement is to create a new line i.e. line item 0030 by copying the details from the existing line item 0010 of the same order .
    I've checked the BAPI - BAPI_SALESDOCUMENT_COPY which is for Order Creation T Code VA01 . I'm looking out for Sales Order Change BAPI where i can give the reference as Order no and Order line item which will create a new line item in the same Order with the same details of the reference Order line item .
    Do let me know your thoughts !!!!
    Thanks,
    Bintu

    Hi -
    Please check these two FM's BAPI_SALESORDER_GETDETAILBOS & BAPI_SALESORDER_CHANGE.
    Regards,
    Atul Mohanty

  • How to add new subscreen & fields to ME51N

    Hi Experts,
    How to add new subscreen and to add new fields at item level, maybe someone have done this before and maybe can guide me...
    Thank You.

    someone have experience on this? so can you guide me... tq

Maybe you are looking for

  • Preloader  #1009 error

    Halo. I've been trying to load external swf  ("index.swf") with the following code in AS3: //it's a simple preloader with one dynamic text field: "percent" //the "index.swf" is suppose to stop at 689 frame after being loaded (this part works fine) st

  • Do anyone know we're to buy a 3 meter long cable for power to my iPad

    Do anyone know we're to buy a 3 meter long cable for power to my iPad?

  • Firefox Gnome Integration and Mimetypes

    Hey there archers! The other day I was messing around with libgnome and eliminated the gnome-vfs dependency so I could remove hal. Changed the PKGBUILD, compiled and installed over the official one. However, upon starting firefox, I noticed popups no

  • What software is missing in itunes for showing my ipad?

    My ipad2 will not show up in itunes so I can update it to 5OS.  I have the latest itunes and have tried deleting and reinstalling to no avail.  I get an error message saying it can't be shown because it is missing software. 

  • Apple Mail freezes the entire system

    This just started today after absolutely no problems with my system in the last 20 months of ownership. This morning I got the spinning beach ball and my computer became completely unresponsive. I could not force quit any apps or switch between them.