Xml file to B1 Sales Order

Hi,
I'd like to read xml file which is not standard B1 xml file and created new sales order.
Thi is a data mapping xsl tempate
<xsl:template match="b1im:B1IMessage/b1im:Body/b1im:Payload[./@ObjectTypeId=&apos;Z.F.AnySystem_FileIn&apos;]">
  <BOM>
    <BO>
       <AdmInfo>
          <Object>17</Object>
         <Version>2</Version>
      </AdmInfo>
     <Documents>
       <row>
          <DocDate>20100617</DocDate>
         <DocDueDate>20100617</DocDueDate>
        <CardCode><xsl:value-of select="Envelope/Documents/PurchaseOrder/TradingPartnerID"></xsl:value-of></CardCode>
     </row>
   </Documents>  
   <Document_Lines>
     <row>
     <xsl:for-each select="Envelope/Document_Lines/row">
     <ItemCode><xsl:value-of select="ItemCode"></xsl:value-of></ItemCode>
     <Quantity><xsl:value-of select="Quantity"></xsl:value-of></Quantity>
     <Currency>USD</Currency>
        <Rate>1</Rate>
                              <TaxCode>0</TaxCode>
                         </xsl:for-each>
                         </row>
                    </Document_Lines>
               </BO>
          </BOM>
     </xsl:template>

And This is a xml details to read
<ENV:Envelope TransactionID="234567" xmlns:ENV="schemas-hiwg-org-au:EnvelopeV1.0">
     <ENV:SenderID>ABC</ENV:SenderID>
       <ENV:RecipientID>XYZ</ENV:RecipientID>
       <ENV:DocumentCount>1</ENV:DocumentCount>
     <Documents>
          <PurchaseOrder RecordType="10" xmlns="schemas-hiwg-org-au:PurchaseOrderV2.0">
                 <TradingPartnerID>C42000</TradingPartnerID>
                 <MessageType>ORDERS</MessageType>
                 <VersionControlNo>2.0</VersionControlNo>
                 <DocumentType>220</DocumentType>
            </PurchaseOrder>
       </Documents>     
       <Document_Lines>
          <row>
               <ItemCode>Nylon Black</ItemCode>
               <Quantity>2</Quantity>
          </row>
          <row>
               <ItemCode>Nylon White</ItemCode>
               <Quantity>3</Quantity>
          </row>
     </Document_Lines>
  </ENV:Envelope>
But this event is fileted with this result message
"Mapping from LocalObjectType Envelope to object Type failed."
I've tried to use ENV:Envelope logical objecttype instead of Envelope. But result is same.
I hope someone can help me
Thanks

Similar Messages

  • Regarding xml file sequence and sales order sequence not equal

    Hi frnds,
                                     The XML File generates after sorting the line items, the sorting is done alphabetically on material master codes but the when the program converts the XML to Sales orders, the line item numbers does not matches with the line item of the XML File, like to understand how the XML conversion happens and is it possible to keep the same sequence of the XML file?
    Regards,
    Jaya.

    And This is a xml details to read
    <ENV:Envelope TransactionID="234567" xmlns:ENV="schemas-hiwg-org-au:EnvelopeV1.0">
         <ENV:SenderID>ABC</ENV:SenderID>
           <ENV:RecipientID>XYZ</ENV:RecipientID>
           <ENV:DocumentCount>1</ENV:DocumentCount>
         <Documents>
              <PurchaseOrder RecordType="10" xmlns="schemas-hiwg-org-au:PurchaseOrderV2.0">
                     <TradingPartnerID>C42000</TradingPartnerID>
                     <MessageType>ORDERS</MessageType>
                     <VersionControlNo>2.0</VersionControlNo>
                     <DocumentType>220</DocumentType>
                </PurchaseOrder>
           </Documents>     
           <Document_Lines>
              <row>
                   <ItemCode>Nylon Black</ItemCode>
                   <Quantity>2</Quantity>
              </row>
              <row>
                   <ItemCode>Nylon White</ItemCode>
                   <Quantity>3</Quantity>
              </row>
         </Document_Lines>
      </ENV:Envelope>
    But this event is fileted with this result message
    "Mapping from LocalObjectType Envelope to object Type failed."
    I've tried to use ENV:Envelope logical objecttype instead of Envelope. But result is same.
    I hope someone can help me
    Thanks

  • XML file to B1 Sales Quotaion

    hello,
    I am trying to insert a sales quotation in XML file format into SAP B1.
    In the message log i get an error : Value too long in property 'CardCode' of 'Document'
    every time i use an Item code or a card code containing Hebrew characters , i get garbage in the message:
    i defind the B1 sender system language to Hebrew and i don't see the reason for the problem.
    thanks, udi

    Hi Eddy,
    I only get the error message in hebrew.
    i tried a sales quotation where the customer code and item code were in english and it loaded succesfully.
    thanks, udi

  • Deployment xml file generated in different order

    I am using Toplink Workbench 10.1.3.1.0. After making changes to mappings, the order of elements in my exported deployment xml file changes from export to export. The smallest changes to mappings - changes to queries, etc. - will cause the resulting export file to look drastically diferent from pervious version of deploymenty file. This causes quite an issue when useing a file comparision tool to audit changes bwteen versions of our deployment xml file.
    Are there any known confiruration settings that address this or is it a known bug?

    Proper school boy error here..
    Turns out it was because I had left the 'Executable Name' as the original report name and hadn't replaced it with the XDODTEXE Java Conc Program.
    Apologies for wasting peoples time..
    Steven

  • Generating sales order and reserve invoice in a row

    Hi all,
    i'm using B1iSN PL14 with sap B1 8.8.
    I need to build the following scenario :
    I receive an xml file representing a sales order, i have to create :
    - a sales order
    - a reserve invoice based on the sales order
    I've create two BIUs that currently work.
    But now i'd like to chain the two BIUs and execute the the invoice creation only if a sales order has been created.
    What is the best way to do tha kind of thing ?
    thanks !

    I found it difficult in a similar situation & unfortunately didn't get much response from here.
    My workaround solution was:
    - I removed the filter for the B1i user; it's explained in the extensibility guide I think. Basically B1i ignores any events created by itself, but I removed that so B1i received all events including ones created by B1i itself.
    - When creating my first document (for the example lets say it was a Sales Order), I entered a specific text in the remarks field - you could also use a UDF
    - Then my BIU for the second document then had the following conditions
    Document = Sales Order
    User = B1i
    Remarks = CreatedWithB1i (for example)
    So using this, any time my first BIU completed succesfully, it triggered the second one... it's clearly a workaround solution, but it worked for me.

  • Inbound Files Create Sales Order

    Dear All,
    I am working one Assignments For Sales Order Creation Through Inbound Files and Its working fine.
    But I have one Issue during creation of Sales Order through inbound files ( Which Contains Quotation Number Which Already Exist in SAP ) and Quotation Number updated in PO Number (BSTKD) filed in Sales Order.
    And My Problem is How we can update Quotation in Document Flow during creation of Sales Order through inbound files..
    Any Help or Suggestion will very helpful for me.
    Thanx in Advance.
    Regards
    Vijay Maurya

    HI Vijay,
    Could you please let me know, how are you processing the file to make sales order. In other words are you using BDC or something else for creating sales order.
    If you are using a BDC to create sales order, you need to re-record it so that the sales order is created in reference to the quotation. In this way, the sales order will automatically get linked to sales order. And all the document flows will be updated, also the issues of pricing, delivery date will also be perfectly copied.
    Also since the SAP will update the tables on its own, hence you will not need to direct update any table in SAP.
    Hope this helps,
    Abhishek
    Edited by: Abhishek Purwar on Nov 20, 2008 9:11 PM

  • View attached files for Sales Order in Approbation.

    Hi,
    I have attached a file in a Sales Order. My Sales Order then goes to approbation. Can my approbator open the attached file WITHOUT having to open the Sales Order.
    Thank you !

    Hi Thanh,
    There is no such option to open the attached file without opening the sales order the approver has to open the order to check the attachment.
    Regards,
    Suresh

  • Using a Global Session to find data in an XML file in Repository

    Ok, here is the scenario:
    1. We issue a company iPhone to each Field Sales Rep
    2. Each Sales Rep has an assigned Sales Support Rep in the Contact Center.
    3. When a Sales Rep calls the Contact Center from their company phone, we try to route them to their designated Sales Support Agent (if that Rep is available, if not they go to the Queue and wait for next available Sales Support Agent).
    At first we had all entries in 1 xml file but our Sales Force soon grew larger than we could accomodate in one xml file (my testing found a lookup limit of 121 rows in the xmfl file).
    I changed the script logic to first look at the area code and then do a lookup into one of 3 xml files based on the area code. For example, the first file contained all phones with area codes up to 350, the 2nd file for numbers with area codes from 351 to 700, the 3rd file for numbers with area codes from 701 to 999.
    The problem is that the script utilizes the Create XML Document function to search the xml files. This has resulted in the following condition:
    Error: It is not recommended to update the application as
    Engine heap memory usage exceeded configured threshold
    Do I create a global session for each xml file to hold that file's data?
    Do I just replace the "Create XML Document step with a subflow step to the appropriate global session for each xml file?
    Thanks in advance for help and or clarification.
    The recommended solution is to utilize global session variables to store the contents of the xml files.
    I found the following thread discussing just such a situation:
    https://supportforums.cisco.com/thread/2047722
    I have downloaded Anthony Holloway's global session subscript but I am still unclear exactly how I utilize it in my base script.

    Ok, I just noticed that my initial post comes up somewhat out of sequence. The very last questions I had (after the included graphic) ended up before the graphic. Here are the questions I had:
    Do I create a global session for each xml file to hold that file's data?
    Do I just replace the "Create XML Document" step with a subflow step to the appropriate global session for each xml file?
    Thanks in advance for help and or clarification.

  • Sales order creation using bapi

    kindly help me.
    I have created a program which uses a bapi
    BAPI_SALESDOCU_CREATEFROMDATA. I fill the required data  in a  text file and the sales order gets created. but when I go to va03 transaction to check the data the payment terms column shows a different data than the one that I have entered .
    what could be the issue.
    could it be an user exit doing this.
    if so please let me know which user exit is responsibel for this.
    Regards

    hi,
    it might be configuration dependant or as you said it is based on user-exit.
    if it is user-exit then you should look in to <b>MV45AFZZ</b> incldue . then check inside in any of the forms are they doing any thing related to payment terms.
    there are so many user-exits avaliable in that include.
    regards
    vijay

  • Cannot load XML file in Screen Painter in SAPB1

    Hi All,
    i am creating an xml file of existing purchase order through the following code
    Public Sub getxml(ByVal FormUID As String)
            Dim f As SAPbouiCOM.Form
            f = sbo_application.Forms.Item(FormUID)
            Dim oXmlDoc As Xml.XmlDocument
            Dim sXmlString As String
            oXmlDoc = New Xml.XmlDocument
            '// get the form as an XML string
            sXmlString = f.GetAsXML
            oXmlDoc.LoadXml(sXmlString)
            Dim sPath As String
            sPath = IO.Directory.GetParent(Application.StartupPath).ToString
            oXmlDoc.Save((sPath & "\ChangedXml.xml"))
        End Sub
    i am calling this function getxml in pageload of this form as
    Private Sub B1_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles sbo_application.ItemEvent
            If pVal.FormType = "142" And pVal.BeforeAction = False Then
                Dim oItem As SAPbouiCOM.Item
                Dim oFolder As SAPbouiCOM.Folder
                Dim oform As SAPbouiCOM.Form
                Dim oStaticText As SAPbouiCOM.Button
                Dim oEditText As SAPbouiCOM.EditText
                Select Case pVal.EventType
                    Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD
                        getxml(FormUID)
                End Select
            End If
    End Sub
    it will create the xml file ChangedXml.xml in the destination folder, then i will copy that one and paste it and change the extension to .srf.
    then i will open screen painter and try to acceess this one it will open the form but it will give an error as Error: Menu - Image Type Not Supported
    it will open the screen but it won't open the matrix, the space which consists of matrix in the original form will come as blank.
    Please any one help me, it's urjent.
    Thanks,
    Vaithy
    09886807576

    Hi Vaithy,
    Not all the items you have in B1 forms are supported by the UI API and/or the ScreenPainter.
    If you need to reproduce a B1 system form you will have to remove all items giving you an error in the ScreenPainter and then have a reduced form.
    Why do you need the xml of the Purchase Order form? Please take care if you are trying to reproduce the behavior of the Purchase Order form, there can be some Formatted Searches or other customizations in the B1 form if you are using other addons.
    Hope it helps
    Trinidad.

  • Can't import an xml file

    Hi,
    I am using Captivate 5.5 on Windows. I have an .swf file which needs to have an xml file with it in order for it to behave the way in which it was intended. The developer has said that the two files need to be included in the same folder.
    I have no problem importing the swf file however I can't import the xml file which is called flashParams.xml. I have been editing the xml file in windows notepad and it is working perfectly outside Captivate. However when i try to import the xml, I get the message 'Cannot import XML'. I have been using File/Import/from xml to get the file loaded but no luck. I have also tried dragging it into the library but no luck here either.
    Can anyone suggest what I might be doing wrong and how they would approach what surely must be a very simple task.
    Thanks,
    Nick

    Hi Rod,
    Thanks for the reply.
    I think what I could do is to launch the swf by clicking on a link in the Captivate session to an external url (it will be hosted on Moodle). The one problem I have is that when I do this in Captivate, the slide refuses to pause and moves onto the next slide. What I would like is for the user to be able to click on the link for the url and for the slide to pause until the user clicks on a next button to go to the next slide.
    Nick

  • Message No.00088 while posting Inbound Sales Order Idoc.

    Hello Experts,
    I am working on Inbound Interface i.e inbound sales order via Biz talk. When BizTalk send one file contains all sales order related data .
    When it comes to SAP, the Net price for PRICE condition type, getting an error message
    Input must be in the format ___,___,__~.__V
    Message no. 00088
    Diagnosis
    Your entry does not match the specified input format.
    System Response
    The entry in this field was rejected.
    I already checked my User settings everything is ok. When I am manually putting it like 122.32 its working but when its came by file thru inbound interface I am getting the above error.
    The Net price field is KOMV-KBETR.
    Please help me out.
    Waiting for your suggestions.
    Thanks in Advance.
    Dev

    Thanks for your reply.
    Already check that thread & settings.
    Still the error is there.
    Manually its working only when data receive tru IDOC sysytem is throwing same error.

  • BDC capture sales order number

    Dear All,
    I am having one excel file which i am uploading from presentation server. Based on this file, sales order gets created through BDC Call transaction method.
    Suppose i have 10 records in flat file then 10 sales order number should gets created. But i am not able to get sales order number through call transaction method. Sales order number are not getting populated in internal table having structure BDCMSGCOLL.
    Any idea how to capture the sales order number at run time depending on how many records present in my excel file.
    I cannt go and check VBAK table for that.
    Thanks in advance for your kind help.
    Regards,
    T

    better to use BAPI Function module ,
    see the below example for capturing the order # using bdcmsgcoll structure
      CALL TRANSACTION c_va01 USING t_bdcdata MODE C_N
                                                  update 'S'
                                                 MESSAGES INTO   t_bdcmsg.
          REFRESH  t_tcdata.
         CALL FUNCTION 'FORMAT_MESSAGE'
           EXPORTING
                v2        = sy-msgv2
           IMPORTING
                msg       = g_vbeln
           EXCEPTIONS
                not_found = 1
                OTHERS    = 2.
      IF sy-subrc = 0.
        g_vbeln = sy-msgv2.
      ENDIF.
    Reward Points if it is helpful
    Thanks
    Seshu

  • Regarding sales order not created in xml file format

    Hi Friends,
                       I have the xml file,I sort the xml file alphabetically on material master codes, WHen program try to create the sales order by using this xml file through call transaction method, the line item numbers does not matches with the line items of xml file.
    I want same sequence.Please suggest me..
    Best Regards,
    SHialpa.

    HI Divya,
    Have u uninstalled Acrobt Reader from your system???
    Regards
    Manoj S

  • Problem in creatinga sales order idoc into XML file in the same appl server

    Hai....friends....
    I am tring to send an  sales order as iDOC  to a xml port in the same application server....
    1. have created a xml port with path..\usr\sap\RRM\SYS\global\.
    2. assigned it to logical system.
    3.Have a RFC destination of TCP/ip(LOCAL_EXEC)
    but in bd64 after creating  model view when i am generating partner profiles  a tRFC PORT has been automatically created.
    then finally the IDOc has been created but its saying....IDOC CANNOT OR SHOULD NOT BE SENT...
    Pls help me regarding this...
    thx,
    ram

    Hi Thanks for your updates,
    But I got the same error, while pass the data from abap into XML.
    error message,what I am getting is
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/tempcustomers.xml'. Line 1, Position 1
    #<?xml version="1.0" encoding="utf-16"?>
    Thanks
    Gowrishankar

Maybe you are looking for