Add Sales order items to Purchse order by Categorywise using Customization

Dear experts,
I have 4 item group say grp1,grp2,....
There many items in groups.
I have added 5 itmes of grp1,4 itms of grp2 & 9 itms of grp3 in Sales order.
I have taken 1 udf say Category which display grp1,grp2,gpr3,grp4,grp5 At PO level.
In PO when i select grp1 in Category. I want to add 5 items of grp1 which i have taken in Sales order in PO's detail part through customization.
Is it possible!!!!!
Plz give me some suggestion
Regards,
Pravin

hello Anthony,
Did you have maintained your problem? I can add a sales order successful, but update the order which I add was unsuccessful. The xml which I sended to the DI Server and the response as follows:
Request XML:
<?xml version="1.0" encoding="UTF-16"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><SessionID>CC07DB5A-4B64-CB89-D84D-B1C60B26C669</SessionID></env:Header><env:Body><dis:UpdateObject xmlns:dis="http://www.sap.com/SBO/DIS"><BOM><BO><AdmInfo><Object>oOrders</Object></AdmInfo><QueryParams><DocEntry>64</DocEntry></QueryParams><Documents><row><Address2>100021</Address2><CardCode>C00001</CardCode><Comments>DD</Comments><DiscountPercent>0</DiscountPercent><DocDate>20040403</DocDate><DocDueDate>20040403</DocDueDate><DocType>dDocument_Items</DocType><PaymentGroupCode>3</PaymentGroupCode><TaxDate>20040403</TaxDate></row></Documents><Document_Lines><row><DiscountPercent>0</DiscountPercent><ItemCode>A00005</ItemCode><UnitPrice>1651.5</UnitPrice><Quantity>1</Quantity><VatGroup>X1</VatGroup></row></Document_Lines></BO></BOM></dis:UpdateObject></env:Body></env:Envelope>
Response XML:
<?xml version="1.0"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value><env:Subcode><env:Value>-1013</env:Value></env:Subcode></env:Code><env:Reason><env:Text xml:lang="en">Invalid valid value '' in Enum 'BoYesNoEnum'</env:Text></env:Reason><env:Detail><Object>17</Object><ObjectIndex>1</ObjectIndex><Command>UpdateObject</Command><SessionID>CC07DB5A-4B64-CB89-D84D-B1C60B26C669</SessionID></env:Detail></env:Fault></env:Body></env:Envelope>
And I am sure that it updated successful in SBO, but I can't find which property I must handle in the xml, if you can find the problem, please tell me, my e-mail address is :[email protected], thank you very much.

Similar Messages

  • How to Add Sales order from one database to another database

    Hi All,
    I am trying to add sales order with sales order object.
    I have completed connectivity from one database to another database.
    but i am unable to post sales order with orders object.
    My code is
    ObjSales = objMain.objUtilities.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
                ObjSales.DocDate = Date.Parse(System.DateTime.Now().ToString("d"))
                ObjSales.DocDueDate = Date.Parse(System.DateTime.Now().ToString("d"))
                ObjSales.TaxDate = Date.Parse(System.DateTime.Now().ToString("d"))
                ObjSales.CardCode = "C0006"
               ObjSales.Series = 92
                ObjSales.PaymentGroupCode = 3
                ObjSales.Comments = "vivek"
               ObjSales.Lines.Add()
               ObjSales.Lines.SetCurrentLine(1)
               ObjSales.Lines.ItemCode = "5127"
               ObjSales.Lines.Quantity = 100
               ObjSales.Lines.UnitPrice = 10
               ObjSales.Lines.WarehouseCode = "01"
                ObjSales.Lines.TaxCode = "0"
                ObjSales.Lines.DiscountPercent = "0.00"
                ObjSales.DocTotal = 1000
                 If ObjSales.Add <> 0 Then
                   objMain.objApplication.SetStatusBarMessage("Sales or Not Posted", SAPbouiCOM.BoMessageTime.bmt_Short, True)
                   Exit Sub
                else
                  objMain.objUtilities.ShowSuccessMessage("Sales Order Posted successfully")
                End If
    The above code is executing successfully.But the Sales order is not getting added.
    Thanks in advance.

    Hi Vivek,
    If the code you posted is not throwing any errors, then the order really does get created. Apparently just not to both databases, am I correct ?
    vivek.Y wrote:
    > I have completed connectivity from one database to another database.
    That means that apparently you have not gotten this bit right.
    Generally speaking if you want to create an order into two databases, you first need to connect to both databases and create separate order objects for each database. So you need to do this bit twice; once for each database. Something like this:
    ObjSales1 = objMain.objUtilities1.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
    ObjSales2 = objMain.objUtilities2.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
    Then at the end you also need to add both objects separately:
    If ObjSales1.Add <> 0 Then
    etc.
    If ObjSales2.Add <> 0 Then
    etc
    Good luck,
    Johan

  • Ignore Save as Draft just consider Add Sales Order

    Dear all,
    I got a problem that the following code:
    If BusinessObjectInfo.FormTypeEx = "139" And BusinessObjectInfo.EventType =                              SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD Then
    If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
    XXXXXXXXXXXXXXXXXXXXX
    End if
    End if
    I just want to assign a value to the field before user "Add" Sales Order.  However, even though user didn't ADD the Sales Order and just Save As Draft but program still run into the ' IF Statement".  How can i ignore the above process when user press "Save As Draft".
    Please help.
    Regards,
    Anna

    Hello Anna,
    You can filter it with BusinessObjectInfo.Type
    Object ,             ObjName ,  ID
    Document draft  ,   DRF         ,  112
    Sales Order     ,     RDR  ,          17
    Regards, Yatsea

  • How can we remove an unwanted # in sales order texts created using a bapiFM

    Hi,
    i've written the following code which splits the record fetched from apllication server and moves it into a workarea.
    CONSTANTS:c_sep VALUE cl_abap_char_utilities=>horizontal_tab, "for separation
    SPLIT wa_tab1-rec1 AT c_sep INTO wa_inf_itm-inf_vbeln
                                           wa_inf_itm-itm_number
                                           wa_inf_itm-material
                                           wa_inf_itm-req_qty
                                           wa_inf_itm-uom
                                           wa_inf_itm-amount_pr00
                                           wa_inf_itm-amount_pi02
                                           wa_inf_itm-amount_mwst
                                           wa_inf_itm-amount_vprs
                                           wa_inf_itm-currency
                                           wa_inf_itm-text.
    Here c_sep will have a value '#' instead of 'space' in Flatfile from application server.
    The field 'wa_inf_itm-text' though it doesnot contain any value in debugging, when the sales order is created using FM 'BAPI_SALESORDER_CREATE_FROM_DAT2' the item texts are having a # character at the end of the text if it has any text(when checked in va03--sales order item text) or if it doesnot contain any text ,then also # character is seen in texts.
    Thanks & Regards,
    Prasad Reddy.

    hi
    use
    Replace all occurrence of '#' with space from .......
    I think it will solve ur problem.
    Rewards with point if helpful.
    Regards
    Santosh.

  • Error while creating sales order with ref using SD_SALESDOCUMENT_CREATE

    Hi
    I am creating sales order with reference using function module SD_SALESDOCUMENT_CREATE , while creating i am getting error
    Document doesn't have document category even thougth i am passing document category in header as well as item lavel.
    In VBUK table there is no value for VGTYP.
    Can you please help me how to resolve it.
    Thanks & regards
    kiran

    Problem resolved by passing   REFDOC_CAT in the FM along with  SD_DOC_CAT.
    Thanks

  • I Need Sales Order Status Reports using ALV

    Hi I Need Sales Order Status Reports using ALV.

    HI!
    For alv use REUSE_ALV_GRID_DSPLAY function module.
    For the given report fetch data from the tables:
    VBAK - sales order header
    VBAP - sales order details
    VBUK - sales order header status
    VBUP - sales order items status
    Regards
    Tamá

  • Sales order details uploading using BAPI method in LSMW

    Hi Guys,
    Sales order details uploading using BAPI in LSMW, could you please suggest me, is any standard method or programs is available for this.
    I have some queries about this.
    1) One header line having multiple line items, in this case  we able to upload use the  LSMW method,
        if possible please tell me the steps.
      2) Do we need to do any config changes while uploading data?     
      3) Flat file should be which format.
      4) Steps to process each step wise if possible.
    Please help me
    Thanks,
    Gourisanakar.

    Hi Gouri Sankar,
    would you be able to upload the sales orders with multiple line items using BAPI LSMW?
    if so could you plz suggest?
    Thanks in advance.
    Suresh/

  • Need code for sales order create report using bapi's

    need code for sales order create report using bapi's

    Hi,
    Go through below link
    http://www.saptechies.com/bapi_salesorder_createfromdat2/
    <b>Reward points if it helps,</b>
    Satish

  • "No matching records found" trying to add sales order in SBO8.8

    Hello.
    Sometimes only, we get the following error (the most)
    "No matching records found - 'Warehouse' (ODBC -2028) [Message 131-183]" trying to add a new sales order when, with the filled document, we push the buttom "Add".
    It shows certain similarity with
    Note 1501421 - After upgrade to 8.8 - exporting to word ends in error
    https://websmp230.sap-ag.de/sap%28bD1lcyZjPTAwMQ==%29/bc/bsp/spn/sapnotes/index2.htm?numm=1501421
    because of the previous upgrading and kind of error.
    Sometimes it happens because of an article but if you take it alone, the order is added normally and after that never happens again with it but with others.
    Can anybody please help me?
    Thank you very much.

    Thanks for answering, Gordon.
    I have sure saw it in SBO8.8 SP00 PL03 and PL05.
    But I do not think we are the only ones who happened something like this ... :S
    Of course, I did not find any pattern on BP or items.
    The problem is you have to enter that sales order again.

  • Add sales order type and switch off fields in webshop

    Hi all!
    Got questions for you!
    Does anyone know how to add possible sales order types in shop management. For now the only possible entry is ISBC, I have created a copy of this one with some other control functions, ZISB. What are the steps to make this a possible choice in Shop Management.
    I would also want to know if there is a "standard" way of switching of visibility of some of the fieds in the webshop.
    CRM 5.0, ECC 6.0, Scenario B2C.
    Thankful for input!
    Best Regards,
    Roland

    Hi Roland,
       I meet many problem in webshop configring, would you kind enough to give me some advise?
       1. SAP CRM5.0 SP2
       2. I use the standard order type:ISBC
    The first problem is:
    When I register a user from webshop.
    I can add the product into basket, but when I check it out, the system give me an error: 99  can't use partner xxx. (But we can check out the basket before, I dont where be changed.)
    Second:
    After check out, the system will create an order, but price of the order is zero, I dont know to resolve this question.
    Thank you very much.
    Eric

  • Sales Order Unable to Use New Condition Tables for Tax Condition Type

    Dear All,
    I am currently working on SAP R/3 4.0. I have a new requirement for my tax where I need to create new condition tables other than the 4 standard SAP tables which are Customer/Material, Division/Customer, Departure Country/Destination Country, Domestic Taxes and Export Taxes. My new tables consists of Departure Country/Destination Country/Shipping Point/Tax Code. The requirement is that the tax code is based on the chosen destination country and shipping point. The problem I am facing now is that no matter what types of table I create or even I generate with reference to the standard table, the access sequence will only refer to the 4 standard SAP tables above. Even if I put my own table in the highest priority for the access sequence, the same thing happens. My sales order will only pick up date from the standard table.
    I wonder if anyone encountered the same problem as me.
    Kindly advise.
    Thank you.
    Regards,
    Yvonne

    Hi
    Yvonne
    I suggest fist check a simple thing ,whether u have successfully determined shipping point for each line item ,it is possible that just adding a line item will not trigger shipping point determination . So after u update the shipping point on line level u can rerun pricing and check agian if u r getting it .
    Secondly for tax purposes I suggest   Try to have Customer and material tax classification approach  this allows to u have long term flexibiliy and also reduces your maintenance activity . As if u change or add number of shipping points and business changes using the sequence of shipping point ,the logic of just using shipping point will not work.
    In Tax classification u cna add new condition table for each new tax category and use it in different access sequences.
    This information can be passed on to FI using Different Tax code for Different combination.
    I hope this helps
    Regards
    Mandar

  • Sales Order History Report using CHANGEDOCUMENT_READ_POSITIONS

    I have used  FM CHANGEDOCUMENT_READ_POSITIONS
    to retrieve all the changes made on Sales Order item.
    Can anyone tell me if i wanna retrieve deleted item and with the value. How can be done?

    How to activate Achieving in SD module???
    Yeah, i can get the item...but without the item net price value (old value + new value )
    If i deleted an SO item with 10.00 net price...then how to get back the 10.00 net price...?
    any idea??

  • Problem in Uploading sales order text data using LSMW

    Hi All,
    I am facing Problem in uploading open sales order data from legacy to SAP using LSMW.
    We are trying to upload sales order data using LSMW Standard Batch/Direct input using program name RVINVB10 and program type D. We are not able to upload item text but have no problem in uploading remaining data.
    the details we are passing to BTEXHKOM structure are......
    BTEXHKOM-OLDNR = IHEADER-OLDORD_NO.
    BTEXHKOM-LAISO = 'EN'.
    BTEXHKOM-TDID = 'Z009'.
    and the for structure BTEXLKOM
    BTEXLKOM-OLDNR = IHEADER-OLDORD_NO.
    BTEXLKOM-TXPARGRAPH = '/'.
    CONCATENATE LITEM-DEPTID LITEM-DEPTNAME
    INTO BTEXLKOM-TXLINE SEPARATED BY ' '.
    we have three input source structures.
    IHEADER Header structure
    LITEM Line item structure ( Material data )
    IPARTN Partners structure
    The structure relationships are
    BTEXHKOM <<< IHEADER.
    BTEXLKOM <<< IHEADER.
    Please let me know if I am doing some thing wrong or some thing else need to be done.
    Thanks,
    Chindam.

    you can pass below values also
    OLDNR         :  order number and item nuber
    TXPARGRAPH  : VBBK
    TXLINE        : your text.....

  • Problem with BOM Quant while creating Sales order with reference using BAPI

    Dear All,
    I am facing problem with creating a slaes order with reference to other sales order by using BAPI_SALESORDER_CREATEFROMDAT2 .
    Sales order is getting created but
    1. It exploding the BOM means the line items which are not there in the reference SO also coming in the new SO ( all BOM items are coming )
    2. Schedule line for BOM header item is getting copied to all sub items of BOM.
    Can any one help me out to prevent the above deviations in creating Sales order with reference by using BAPI_SALESORDER_CREATEFROMDAT2.
    Note: while passing the parameters to BAPI_SALESORDER_CREATEFROMDAT2
    all the data related to items is exactly the same as in the original Sales Order.
    Thanks in advnace.
    Regards,
    John

    Hi All,
    Can any one help me !!!!!!!!!!
    please

  • Sales order IDOC process Using FM J_4A_IDOC_INPUT_ORDERS

    Hi ABAP gurus,
    i am working on Sales order creation using IDOC .
    while i am Filling idoc i am filling reference document number and
    item number .(VGBEL and VGPOS). but when i process idoc i am not getting reference document number at item level.  here we processed idoc using FM J_4A_IDOC_INPUT_ORDERS.
    Please suggest me which segment do i neeed to fill for getting reference document number at item level .right now i am using E1j3p02 segment.
    or do i need to implement user exit for this.
    thanks,
    Neo.

    Hi Shareen Hegde 
    To create Inbound...idoc
    Use the Function Module in you Program : IDOC_INBOUND_WRITE_TO_DB to create the Inbound idoc
    Pass the Control record and Data record in FM.....
    Use Message type : Orders
    IDoc type : Orders01 or 02 or 03 or 04 or 05 ....  which ever suite for your requirement....
    Process Code : ORDE
    When ever your custom program for creating the inbound sales order with  runs .....
    it call the internally FM IDOC_INPUT_ORDERS to create the Sales order...
    or
    If you are getting the inbound idoc from subsystem .....then check you partner profile ,Message type ed and Process code is correct or not....
    I hope this resolves your issuse..
    Ramesh

Maybe you are looking for