Customize bapi for sales orders with customer fields

The situation is a following.
Customer has added a structure on table VBAP. They used Append but without include.
Now I have to make a BAPI that will be able to write on those fields. I have used several posts and documentation, but with on change : Instead of passing on BAPE_VBAP, BAPE_VBAPX, etc the original structure, i pass another that is an exact copy.
Could this be the source of the fact that i Dont write anything? The return struct contains tthese :
ORDER_HEADER_IN has been processed successfully
return..:                                     
ITEM_IN has been processed successfully       
return..:                                     
But nothing is shown on vbap

thanks for the reply, but this is something I knew. My problem was whether the structure added to those BAPE_* has to be exaxtly the structure appended to VBAP, or just an identical structure (eg if I appended VBAPEXT to VBAP, should I append VBAPEXT to BAPE_*, or could I use VBAPEXT_copy, which is exactly the same with different name)?
Anyway, we solved the problem and it seems that we can use an identical structure with same name.

Similar Messages

  • How to Generate sales orders with custom Fields using BAPI_BUSPROCESSND_CREATEMULTI

    Hi,
    I need to generate sales orders with custom fields on table CRMD_ORDERADM_H using BAPI_BUSPROCESSND_CREATEMULTI, after changing the structure BAPI_TE_CRMD_ORDERADM_H, and feed the  EXTENSIONIN table of the BAPI with data, the order is created, but any value on custom fields.
    After debuging, I saw that the BAPI search for structure conversion in table CRMC_OBJECTS_GEN, but we haven't entry with BAPI_TE_CRMD_ORDERADM_H in this table. is that the problem ?, Is there any way to fix it?
    Best Regards,
    Salah.

    That depends on where do you have the customer fields, check the table CRMD_CUSTOMER_H, if your custom fields are there, you need to use the changing parameter CUSTOMER_HEAD, I guess your already checked that one, right? but there's no custom fields, well...AET/EEWB doesn't enhance the strcuture of the BAPI, so you should do it manually, check the note following note for further details.
    988410 - FAQ: User-defined fields in the BAPI
    If you don't have access to the SAP Marketplace, in resume you should create an append on the structure BAPIBUS20001_CUSTOMER_H and include the following strcutrue CI_EEW_CUSTOMER_H
    Cheers!
    Luis

  • Table name for sales order with Customer info

    Hi Gurus,
    Could you please provide me table name for  sales order with customer no and customer name.
    I have list of sales order number (more than 1000 no's ) i need to identify customer number and customer name (ship to party and sold to party information). I am running this report every week. so i plan to create sqvi for this report.
    Thanks and regards,
    B.Deethya.

    Hello,
    Access Tables VBAK & VBAP.
    From the above tables you will get Solt to Party & Ship to Party Codes.
    For Customer names you have to pass the Customer Codes to Table - KNA1
    Hope this clarifies.
    Thanks,
    Jignesh Mehta

  • BAPI SALES ORDER CHANGE CUSTOM FIELD

    Hello Gurus,
    I am trying to update a custom field for sales order. The field name is zfield1 in vbak. The field is added to vbakkom, vbakkomx, vbakkoz, vbakkozx, BAPE_VBAK, BAPE_VBAKX. I guess i need to use the EXTENSIONIN table to populate this field's values to change it with the BAPI. But I not sure exactly how to populate the fields. Can someone tell me how exactly i need to do this?
    Also the documentation says fill Extensionin this way.
    STRUCTURE VALUEPART1 1234561234567890123
    BAPE_VBAP 0000004711000020 XYZ
    BAPE_VBAPX 0000004711000020 X
    What is the 1234561234567890123? Is it a field?
    Thanks,
    KB

    Hi,
    Check this example..I am updating the VBAP field..Instead you can replace it for VBAK..
    PARAMETERS: P_VBELN TYPE VBAK-VBELN.
    DATA: T_LINE LIKE BAPISDITM OCCURS 0 WITH HEADER LINE.
    DATA: T_LINEX LIKE BAPISDITMX OCCURS 0 WITH HEADER LINE.
    DATA: T_EXTEN LIKE BAPIPAREX OCCURS 0 WITH HEADER LINE.
    DATA: T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA: BAPE_VBAP LIKE BAPE_VBAP.
    DATA: BAPE_VBAPX LIKE BAPE_VBAPX.
    DATA: ORDER_HEADERX LIKE BAPISDH1X.
    ORDER_HEADERX-UPDATEFLAG = 'U'.
    T_LINE-ITM_NUMBER = '000010'.
    APPEND T_LINE.
    T_LINEX-ITM_NUMBER = '000010'.
    T_LINEX-UPDATEFLAG = 'U'.
    APPEND T_LINEX.
    BAPE_VBAP-VBELN = P_VBELN.
    BAPE_VBAP-POSNR = '000010'.
    <b>BAPE_VBAP-<b>YYFREETEXT</b> = '02'.</b>
    T_EXTEN-STRUCTURE = 'BAPE_VBAP'.
    T_EXTEN+30 = BAPE_VBAP.
    APPEND T_EXTEN.
    BAPE_VBAPX-VBELN = P_VBELN.
    BAPE_VBAPX-POSNR = '000010'.
    <b>BAPE_VBAPX-YYFREETEXT = 'X'.</b>
    T_EXTEN-STRUCTURE = 'BAPE_VBAPX'.
    T_EXTEN+30 = BAPE_VBAPX.
    APPEND T_EXTEN.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = p_vbeln
    order_header_inx = ORDER_HEADERX
    tables
    return = T_RETURN
    ORDER_ITEM_IN = T_LINE
    ORDER_ITEM_INX = T_LINEX
    EXTENSIONIN = T_EXTEN.
    COMMIT WORK.
    Thanks,
    Naren

  • BAPI For Create Goods Issue for Sales order with picked quantity

    Hi friends,
            Is there any BAPI available to create Goods issue For sales order with picked quantity...............?
    we hv used BAPI_OUTB_DELIVERY_CREATE_SLS
    with sales order .......its creating delivery order but not doing goods issue with piked quantity........

    pls,reply its argent

  • MRP Generated production orders greys out Sales Order and Customer fields

    Hi there,
    The MRP generated production orders greys out the Sales Order and Customer fields for some reasons. These fields are really important as they link the production order to the sales order and the customer's purchase order. Could the SAP team please fix this or advise alternative way of getting the sales order and customer info on production order? Thanks.

    Hello
    MRP only poulated this fields in case the material master has been set up with a strategy group hich is make to order (normally 20). Otherwise MRP summarizes all the requirements from different Customer orders and creates a production order
    Stephan

  • MRP - Sales order and customer fields grey-out

    Hi there,
    The Sales order and customer fields are grey-out for all MRP generated production orders. Can the SAP programmers please get this fixed? It should either read in the sales order number and the customer number or allow user to type in the sales order, just like the manually created production order.
    cheers

    Hello Gordon,
    If production is make-to-order rather than make-to-stock, the MRP should read in the sales order number and the customer, since it is specific to the sales order. Even for make-to-stock production, where it cannot read in the specific sales order number, it should at least not grey out the field, don't you think so? By greying out the field, users are not allowed to type in the sales order number even when the production order directly relates to a particular sales order. As such, we are not able to link it back to the sales order where other info such as customer's purchase order, etc... can be found.
    Could you please advise alternative way of linking MRP generated production orders to the sales orders? thanks

  • Table for sales order change by field

    Dear Friends,
    I want to get the data @ table level for the list of sales orders with changed by field. Can you please tell which table/s for sales order change by field can be used?
    Thanks,
    pinky

    Hi
    You can get the changes for SALES ORDER item in CDPOS table
    Goto SE16 and find the changes.
    hope it will serve your purpose.
    thanks,
    santosh

  • DIServer insert operations for sales orders with error

    DIServer insert operations for sales orders with
    That even though the insert is inserted DocDueDate DocDueDate it says error.
    Subtracting the value of the format 'yyyy-mm-dd', 'yyyy/mm/dd', 'mm-dd-yyyy', 'mm/dd/yyyy' put all reporting
    When the input is entered DocDueDate ShipDate also put together ... but I get an error.
    The error message 'env: Receiver-10Enter due date [ORDR.DocDueDate] 171AddObject2EEE7D98-AB71-464A-93AB-933F0AD3D4DC'
    Purchase order entered into the normal value because the xml is missing or wrong with you.
    Please answer all the possibilities that can be resolved
    This Xml used.
    "<BOM>" +
    "<BO>" +
    "<AdmInfo>" +
    "<Object>oOrders</Object>" +
    "</AdmInfo>" +
    "<QueryParams>" +
    "<DocEntry />" +
    "</QueryParams>" +
    "<Documents>" +
            "<row>" +
            "<DocType>I</DocType>" +
            "<DocDate>2012-01-11</DocDate>" +
            "<DocDueDate>2012-01-11</DocDueDate>" +
            "<CardCode>CD00001</CardCode>" +
            "<Address>Anymode</Address>" +
            "<DocCurrency>KRW</DocCurrency>" +
            "<Comments>[sales orders] LGU TEST</Comments>" +
            "<TaxDate>2012-01-11</TaxDate>" +
            "<JournalMemo>JournalMemo</JournalMemo>" +
            "<Address2>Addr</Address2>" +
            "<BPL_IDAssignedToInvoice>1</BPL_IDAssignedToInvoice>" +
            "</row>" +
    "</Documents>" +
    "<Document_Lines>" +
            "<row>" +
            "<ItemCode>ACDT0100ET</ItemCode>" +
            "<Quantity>1</Quantity>" +
            "<Price>5000</Price>" +
            "<DiscountPercent>10</DiscountPercent>" +
            "<WarehouseCode>A100</WarehouseCode>" +
            "<VatGroup>A2</VatGroup>" +
            "</row>" +
    "</Document_Lines>" +
    "</BO>" +
    "</BOM>";

    I had the same error change the Date to the format yyyymmdd, and problem solved.

  • RFC/BAPI For Sales Order Credit Block Release like vkm3 (very urgent )!!

    hi experts,
    I need the RFC/BAPI For Sales Order Credit Block Release like vkm3 function ,please help
    thanks
    Godspeed

    hi
    can get the list of all the bapis..
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    Reward if USeful
    Thanx & regards.
    Naren..

  • BAPI for sales order creation with Reference

    Hello Experts,
    I have a order, with its reference I have to create a new sales order.
    Am looking for BAPi, with which I can create a sales order with a Reference order (which is in my hand), so I checked SE37 with wild cards, but I did not find any!!
    1) Pls. let me know a BAPI
    2) And just like that I do not want to create a new order with the reference(existing) order, I have to change the PO number & order Reason(2 fileds) in newley creationg order, pls. let me know How to do it
    Thank you

    Hi,
    First try to pass these two parameters to BAPI_SALESORDER_CREATEFROMDAT2
    ORDER_HEADER_IN-REFDOCTYPE = Your Sch. Agreement No. (Please Check) and
    ORDER_HEADER_IN-SD_DOC_CAT = 'E'.
    If the above doesnt work ,than try using BAPI "BAPI_SALESDOCUMENT_COPY"
    I hope you are working in SAP R/3 4.6C and above version because i am not sure whether this BAPI is available in lower version.
    Let us know if this helps you..
    Rgds,
    Mayank

  • BAPI for Sales Order Creation.

    Hello gurus,
    I want to create a sales order using BAPI.
    I have tried some BAPI's like BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDATA, BAPI_SALESDOCU_CREATEWITHDIA.
    But I am not able to update the Miscellaneous Information like Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
    Is there any other BAPI thru which i can update these fields while creation of Sales Order.
    The Fields which I can provide to BAPI as import parameter is:
    Order Type(VBAK-AUART),
    Contract(VBAK_VGBEL),
    SALES Org (VBAK-VGORT),
    Dist Channel(VBAK-VTWEG),
    Division (VBAK-SPART),
    Open Quantity (VBAK-KWMENG)
    Plant(VBAP-WERKS)
    Storage Location (VBAP-LGORT)
    Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
    Thanks In Advance,
    Points will be rewarded for Best Solution......
    Yogesh Sharma

    hi,
    I can give u a suggestion .. try it ..
    its a quite a long process....
    in BAPI_SALESORDER_CREATEFROMDAT2
    there is a table EXTENSIONIN...
    here u can add append structure and carry on ur sales order creation
    Follow the process
    Customer Enhancement for VBAK, VBAP, VBEP
    Description
    You can use this parameter to transfer user-specific enhancments to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure.
    Technical information about Customer Enhancements
    The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
    The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
    CFIELD1, CHAR 10
    CFIELD2, CHAR 3.
    The customer also requires that these two fields can be maintained with the BAPI.
    1. Maintain structure CUTEST in table VBAP
    2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
    Field name       Data element
    CFIELD1            CHAR1
    CFIELD2          CHAR1
    3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
    4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
    5. Adjust the following structures for customer enhancements to table VBAK:
    a) VBAKKOZ
    b) VBAKKOZX
    c) BAPE_VBAK
    d) BAPE_VBAKX
    6. Adjust the following structures for customer enhancements to table VBEK:
    a) VBEPKOZ
    b) VBEPKOZX
    c) BAPE_VBEP
    d) BAPE_VBEPX
    7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
    8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
    For example:
    You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
    The following entries are expected:
    Import:     BAPIVBELN-VBELN       = '0000004711'  Document number
                BAPISDHD1X-UPDATEFLAG = 'U'           UPDKZ for doc header
    Tables:     BAPISDITM-ITM_NUMBER  = '000020'      Item number
                BAPISDITMX-ITM_NUMBER = '000020'      Item number
              + BAPISDITMX-UPDATEFLAG = 'U'           UPDKZ for item
    You must complete the EXTENSION table as follows:
    STRUCTURE                          VALUEPART1       1234561234567890123
    BAPE_VBAP                       0000004711000020                 XYZ
    BAPE_VBAPX                      0000004711000020       X
    Further Information
    You can find more information in the BAPI programming guide in the chapter for enhancements to BAPIs.
    Notes
    You must complete the STRUCTURE field with the name of the relevant enhancement structure (BAPE_VBAK, BAPE_VBAP, BAPE_VBEP). You can complete the remaining fields with the append structures from the enhancement structures.
    At the moment, you can use the BAPI to store enhancements in the following structures:
    VBAK : An enhancement to header data requires an append structure to BAPE_VBAK and an enhancement to structure VBAKKOZ.
    VBAP : An enhancement to item data requires an append structure to BAPE_VBAP and an enhancment to structure VBAPKOZ.
    VBEP : An enhancement to schedule line data requires an append structure to BAPE_VBEP and an enhancement to structure VBEPKOZ.
    VBKD : If you are using an enhancement for header data, you must add an append structure to BAPE_VBAK. You also need to enhance structure VBAKKOZ. If it is for item data, you need to add an append structure to BAPE_VBAP. You must also enhance structure VBAPKOZ.
    If you also want to work with checkboxes, each X-structure must also contain an append structure.
    For example:
    A customer has created an order and wants to include the material long text (50 digits long).
    The EXTENSIONIN structure must be completed with BAPE_VBAP. Two fields have fixed definitions in this structure. These are in the VBAP host key (VBELN, POSNR). The customer sets up an append structure that contains field ZMAT50.
    Because the VBELN is normally blank when you create an order, the data can look like this:
    STRUCTURE   |BAPE_VBAP
    VALUEPART1  |          000010Customermateriallongtext50
                  VBELN     POSNR ZMAT50

  • Structure extension in satndard bapi for sales order

    hi all,
    i have a requirement where i have to create sales order with some custom fields on to the screen.
    how can i use the extension structure  in bapi 'BAPI_SALESORDER_CREATEFROMDAT2' .
    to upload the data of the custom fields.
    regards
    vijay

    Hi Vijay sharma,
    Please check these links
    http://help.sap.com/saphelp_46c/helpdata/en/c3/40999d8b8911d396b70004ac96334b/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/4099a68b8911d396b70004ac96334b/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/4099ac8b8911d396b70004ac96334b/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/3e/0e1089c24611d1ad09080009b0fb56/content.htm
    Example for BAPI
    http://www.sapmaterial.com/bapi_example.html
    Hope this helps...
    Best regards,
    raam

  • Regarding bapis for sales order creation and modification

    Hi,
    I am trying to create a syncbo for sales order creation, modification and display. The bapis that I am using are
    1.BAPI_SALESORDER_GETLIST
    2.BAPISDORDER_GETDETAILEDLIST
    3.BAPI_SALESORDER_CREATEFROMDATA1
    4. BAPI_SALESORDER_CHANGE
    Am I using the correct bapis. When I tried to create a syncbo it gave the following errors
    BAPISDORDER_GETDETAILEDLIST does not have RETURN parameter in export or tables parameter
    RETURN parameter in Create BAPI Wrapper should refer to structure BAPIRET2
    RETURN parameter in GetList BAPI Wrapper should refer to structure BAPIRET2
    GetDetail BAPI Wrapper does not have RETURN parameter in export or tables parameter
    No Export parameter referring to header structure exists in GetDetail BAPI Wrapper
    No Import parameter referring to header structure exists in Create BAPI Wrapper
    No Import parameter referring to header structure exists in Modify BAPI Wrapper
    No Import parameter referring to a field of header structure exists in GetDetail BAPI Wrapper
    No Export parameter referring to a field of header structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Create BAPI Wrapper
    No Tables parameter referring to item structure exists in Modify BAPI Wrapper
    I am informed that the above bapis are standard bapis.
    I am not sure as to why I am getting the errors.
    Does the syncbo require the  bapi's to be in a specific format.
    What would be the header and item structures for sales order bapis
    Regards
    Raja Sekhar

    Hi Raja,
      ya , for creating Sync BOs ,our BAPI wrappers must satisfy certain conditions..
    just go through this link.
    u can use the standard BAPIs of SALES Order in ur Custom BAPI Wrapper
      http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/smartsync/what_is_a_bapi_wrapper.html
    the RETURN must be of type BAPIRET2..
                    Regards
                    Kishor Gopinathan

  • BAPI for Sales Orders items

    I'm looking for BAPI, which returns all items for sales order.
    Returned items must have included all information, which we can see in transaction va02 on card Item Overview
    I'll reward with points for good BAPI.
    BR Tomek

    In the i_bapi_view structure, populate which tables you would like to have returned by using a value of X.
    Use the sales documents table to pass which documents you want information on.
    So if you wanted item details:
    i_bapi_view-item       = 'X'.
    sales_documents-vbeln = '0000012345'.
    append sales_documents.
          call function 'BAPISDORDER_GETDETAILEDLIST'
               exporting
                    i_bapi_view         = i_bapi_view
               tables
                    sales_documents     = sales_documents
                    order_items_out     = order_items_out.

Maybe you are looking for

  • Clean Windows 8.1 install on Split 13 x2

    I have been unable to solve a Windows 8.1 boot failure on a customer's Split 13 x2.  The system will boot from a Windows 8.1 recovery USB stick that I created.  I can see the volumes on the disk and bcdedit seems to display the correct information bu

  • I bought an app on one username, but when it tells me to update I can only use a different name that is preset. How do I switch the username?

    I am signed in on a username thatI boght the app. however when i want to update the  app it only offres me a different usename that didnt pay for the app. so i will ahve to buy it again which i obviously dont want to do. how do i switch the name, it

  • OS X reports %74 keyboard battery for brand new fully charged batteries

    I just placed three brand new fully charged 2450mAh Energizer batteries into my wireless keyboard and OS X reports that it is only %74 charged. Previously I had the same result with rechargeable Duracell batteries but using non-rechargeable batteries

  • CDXM8800 Car Stereo

    Hi all, Have on older CDXM8800 Car Stereo installed in my '00 Prelude. Now the car is running again I'd like to know the best way to connect my iPod to the stereo (Sony neglected an AUX input on this model). Please, no wireless suggestions. Thanks. S

  • Wanna talk to an employee..

    i`d like to talk to someone who works at apple in private... i have some sensitive information.. and i`d like to talk to someone from apple who can help me out.. and guide me... i dont see a private message option here.. so if anyone who works at app