Need conversion logic for the xml sending from legacy system ...!!!

Hi Experts ,
we have one requirement where in the legacy system ( Sender system) is sending .xml  file and PI needs to pick the file and send it to ECC Via IDOC AAE Receiver Adapter  to R/3  (SAP ECC) System .
The problem is the  .xml file which PI receives is in a different format  which is shown below
</tns:Header>
    <tns:Body>
        <esa:Payload>
            <esa:Header>
                <PayloadName></PayloadName>
                <PayloadVersion>1.0</PayloadVersion>
                <PayloadCreated>2014-01-07T02:39:55.793Z</PayloadCreated>
                <PayloadSize units="Bytes">432</PayloadSize>
            </esa:Header>
            <esa:Data>
                <zcs:HUM xmlns:zcs="com.">
                    <Hum_Number>00393155965135748871</Hum_Number>
                    <Source_Storage_Location>9000</Source_Storage_Location>
                    <Destination_Storage_Location>0100</Destination_Storage_Location>
                    <Material_Number>000000000000004123</Material_Number>
                    <Batch_Number>321940071 </Batch_Number>
                    <Quantity>0000000096000</Quantity>
                    <Production_Version>A100</Production_Version>
                    <Hostname>POSPI000003</Hostname>
                </zcs:HUM>
            </esa:Data>
        </esa:Payload>
    </tns:Body>
</tns:Envelope>|]
need help to  convert this  .xml into PI Standard xml  format ( i mean without esa,zcs, ..So that at PI the message gets passed  successfully without throwing  xml parser issue or xml well not formed error .)  .
do i need to write any java code for this ?
Please experts needs your suggestions here .
regards,
khan ,

Hi Aziz,
please make sure your pasted xml has  start and end tags
<tns:Body> </tns:Body>.
i don't think you need to change the external definition. make sure that you use xslt mapping first then message mapping.
Regards,
Muni.

Similar Messages

  • Conversion logic for the following!!

    Hi,
    Experts
    can you help me to build a conversion logic for the following
    1.BKPF-BLART .setting it to 'ZF'.
    2.BKPF-MONAT derived from  posting date
    3.BKPF-WAERS set to GBP
    4.Dr/.Cr indicator BSEG-SHKZG.
    If Posting Key (BSEG-BSCHL) is u201840u2019 then this indicator (BSEG- SHKZG)is u2018Su2019 (Debit)
    If Posting Key (BSEG-BSCHL) is u201850u2019 then this indicator (BSEG- SHKZG)is u2018Hu2019 (Credit)
    5.a)If Cost Object Type is u2018Cu2019 (= Cost Centre), then Cost Collection Object Id shall be mapped to BSEG- KOSTL.
           BSEG- PRCTR should be derived from the Cost Centre Master data CSKS- PRCTR.
           Effective date should fall between the validity dates CSKS-DATAB and CSKS-DATBI
    b)If Cost Object Type is u2018Iu2019 (= Internal Order), then Cost Collection Object Id shall be mapped to BSEG- AUFNR.
           BSEG - PRCTR should be derived from the Internal Order Master data AUFK-PRCTR
    c)If Cost Object Type is u2018Wu2019 (= Work Breakdown Structure element), then Cost Collection Object Id shall be mapped to BSEG-PROJK.
           BSEG - PRCTR should be derived from the WBS Master data PRPS-PRCTR
    d)If Cost Object Type is u2018Pu2019 (= Profit Centre), then Cost Collection Object Id shall be mapped to BSEG - PRCTR.
    6.Ledger Group BKPF-LDGRP. Set it to u2018Blanku2019 so that the document is posted to all ledgers.
    7.Set BSEG-KOKRS (Controlling Area) to 1000.

    Please do not dump your specs here expecting others to do you work.
    matt

  • IDOC/BAPI for Production order creation from Legacy system

    Hi all
    We are using an interface to create Production orders from legacy to SAP. Would you recommend an IDOC or a BAPI to create Production orders. If IDOC or BAPI then could you please mention which one?
    thanks a bunch

    Hi John,
    For your purposes, please use BAPI for production order creation from legacy system. There is no standard inbound IDoc available to use. SAP has an IDoc for outbound interface only (message type LOIPRO).
    If there is an inbound IDoc available, I would recommend to use an IDoc.
    IDoc technology has excellent error handling and will allow you to reprocess an error (if any).
    BAPI is also good approach to use and fast in term of  processing.
    For BAPI approach, you can use BAPI BAPI_PRODORD_CREATE.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Need Mapping logic for the following scenario

    Hi everyone,
    I need a mapping logic for the following scenario.
    For the same order no with same material no, the quantity should be summed and only one idoc should be created.
    For the same order no with different material no, no need to sum the quantity and only one idoc should be created.
    For example:
    Source Structure:
    Ord No      Mat No      QTY
    12               1               2
    13               1               3
    13               2               1
    12               2               4
    15               1               5
    14                3              7
    12               1              6
    Target Structure:
    Ord No      Mat No      QTY
    12               1               8
    12               2               4
    13               1               3
    13               2               1
    14               3              7
    15               1              5
    Thanks in Advance

    Try the graphical mapping as shown below using concat with a space as delimite and UDF to split the value again by space.
    1. Idoc node
    (RootContext)
    OrdNo
         |concat[ ] -> sort[asending] -> SplitByValue -> collapseContexts -> Idoc
    MatNo                case sensitive    [ValueChange]                              
    (RootContext)
    2. OrdNo
    OrdNo(RC)
         |concat[ ] -> sort[asending] ->SplitByValue->collapseContexts->SplitByVale-> UDF to fetch ordno  -> OrdNo
    MatNo(RC)           case sensitive    [ValueChange]                [eachValue]   (return var1.split(" ")[0];)
    3. MatNo
    OrdNo(RC)
         |concat[ ] -> sort[asending] -> SplitByValue ->collapseContexts->SplitByVale-> UDF to fetch ordno  -> MatNo
    MatNo(RC)              case sensitive    [ValueChange]                  [eachValue]   (return var1.split(" ")[1];)
    4. Qty
                   [asending,case sensitive]               
                   --  sortByKey -----> formatByExample -> sum ->Qty
    OrdNo(RC)           |          |          ^          
         |concat[ ] -> |            Qty(RC)          |
    MatNo(RC)           |                |     
                   --sort[asending]-> SplitByValue
                       case sensitive    [ValueChange]
    Regards,
    Sunil Chandra

  • I need a logic for the version management report

    HI
    Here with sending my req. Please give me the posible solution,its urgent,
    1.     Get all the objects included in a transport request by using function module 
    /DGN/ITC_TRANSPORT_TO_OBJECT.
    2.     Find the Objects which have the versions maintained in SAP.
    3.     Find the date on which the Transport request was released.
    4.     Find the date on which the object was changed.
    5.     Compare the date the TP was released and the date on which the object was changed, to find out the version of the object on the date when the Transport was released.
    Output: Transport Request Number, Object Name, Object Type and Version
    Thank you
    srini

    I can explain you the full logic of this FM but before that i would like to know if you are working for Data Domain?
    Thanks
    Yogesh Gupta

  • How to upload the master data from legacy to SAP

    Hi Frends,
    how to upload the master data from legacy system to SAP System once the configuration is over.how to carry forward the open items of vendors and customers while uploading.who will upload functional consultantsor ABAPER.
    please clarify me
    Regards
    Sap Guru

    Hi ,
    use LSMW  or BDC for uploading Master & transaction data.
    This work is done by the Respective Functional team.
    Chandra

  • How to receive the cost center group from legacy system

    Hi Experts,
    i need to collect  cost center group hierarchy from Legacy system.is there any standerd tcode available to get it.
    Usefull answers will be rewarded.
    looking forward to hear from all.
    regards,
    Tom

    Hi,
    Cost Center group can be viewed from field SETCLASS of table SETLEAF.
    To Fetch the relevant cost center from a cost center group, we can use FM: 'K_HIERARCHY_TABLE_READ'.
    Below thread may give you more details.
    Cost Center Group
    Regards,
    Ranjith.

  • Reg:when i was uploading data from legacy system

    Hi All,
    it is any Include  program
    for tcode mpr1
    when i was upload the data for forecast values from
    legacy system to sap system .
    only one record is geting updated
    other records are not updateding
    i have retun logic like this
    code,,,,,,,,
    TYPES: BEGIN OF TY_FILE,
            WERKS LIKE MAPR-WERKS,
            MATNR LIKE MAPR-MATNR,
            PRWRT LIKE PROW-PRWRT,
           END OF TY_FILE.
    DATA: IT_FILE TYPE STANDARD TABLE OF TY_FILE,
          WA_FILE TYPE TY_FILE.
    DATA : IT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE,
           IT_MARC LIKE MARC OCCURS 0 WITH HEADER LINE.
    DATA : LV_FILE TYPE STRING.
    LV_FILE = I_MPR1USERPAR.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
      EXPORTING
        FILENAME                = LV_FILE
        FILETYPE                = 'DAT'
        HAS_FIELD_SEPARATOR     = 'X'
      CHANGING
        DATA_TAB                = IT_FILE
      EXCEPTIONS
        FILE_OPEN_ERROR         = 1
        FILE_READ_ERROR         = 2
        NO_BATCH                = 3
        GUI_REFUSE_FILETRANSFER = 4
        INVALID_TYPE            = 5
        NO_AUTHORITY            = 6
        UNKNOWN_ERROR           = 7
        BAD_DATA_FORMAT         = 8
        HEADER_NOT_ALLOWED      = 9
        SEPARATOR_NOT_ALLOWED   = 10
        HEADER_TOO_LONG         = 11
        UNKNOWN_DP_ERROR        = 12
        ACCESS_DENIED           = 13
        DP_OUT_OF_MEMORY        = 14
        DISK_FULL               = 15
        DP_TIMEOUT              = 16
        NOT_SUPPORTED_BY_GUI    = 17
        ERROR_NO_GUI            = 18
        OTHERS                  = 19
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT T_ARTICLES.
        CLEAR : IT_MARA,IT_MARC.
        SELECT SINGLE * FROM MARA INTO IT_MARA  WHERE MATNR = T_ARTICLES-MATNR.
        SELECT SINGLE * FROM MARC INTO IT_MARC  WHERE MATNR = T_ARTICLES-MATNR
                                                 AND  WERKS = T_ARTICLES-WERKS.
      ENDLOOP.
    LOOP AT IT_FILE INTO WA_FILE .
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = WA_FILE-MATNR
        IMPORTING
          OUTPUT = WA_FILE-MATNR.
      T_FORECAST_VALUES-WERKS = WA_FILE-WERKS.
      T_FORECAST_VALUES-MATNR = WA_FILE-MATNR.
      T_FORECAST_VALUES-PERKZ = IT_MARC-PERKZ.
      T_FORECAST_VALUES-ERTAG = T_ARTICLES-PRDAT_NEW.
      T_FORECAST_VALUES-KOPRW = WA_FILE-PRWRT.
      T_FORECAST_VALUES-MEINS = IT_MARA-MEINS.
      APPEND T_FORECAST_VALUES.
      CLEAR : T_FORECAST_VALUES.
    ENDLOOP.
    thanks
    mars

    For creating/uploading the master data from legacy system to SAP we either use below options
    1. BDC (recording)
    2. BAPI
    3. ALE iDoc.
    I would sugguest you to use BAPI and there's already this post which explains few details about the BAPI:
    Problems with BAPI_PROJECT_MAINTAIN
    Regards
    Sreenivas

  • This is regarding interface from legacy system to SAP

    Hi All,
    We have trasferred the one file from legacy system to SAP, and it was created a session in SM35, it contains 1000 errors.
    we don't want correct those errors and these entries should be delated, could you please let me know are these errors can I see in any error table in SAP, is this facility is availbe in SAP or not?
    becuase it isl very difficult to go and delete the entries one by one in sm35
    Regards
    Nama

    Hi,
    1) No updates will have been done for the items with errors.
    2) Mark the Batch, then press F2 to call up the analysis. You can check here for the cause.
    3) If you are not going to correct the items or the cause so as to post them, just delete the batch.
    Kind regards

  • Uploading data from Legacy System to SAP (In PS Module)

    While Implementing Project system Module, Whether LSMW is applicable for uploading data from Legacy sytem. If not, then what is the method used for uploading the data from Legacy sytsem to SAP

    For creating/uploading the master data from legacy system to SAP we either use below options
    1. BDC (recording)
    2. BAPI
    3. ALE iDoc.
    I would sugguest you to use BAPI and there's already this post which explains few details about the BAPI:
    Problems with BAPI_PROJECT_MAINTAIN
    Regards
    Sreenivas

  • I moved from the UK to the US with my iMac. What do I need to buy for the UK iMac to work in the US? A power convertor? A plug convertor? or Both?

    I moved from the UK to the US with my iMac. What do I need to buy for the UK iMac to work in the US? A power convertor? A plug convertor? or Both?  I had previously read that you only need a plug convertor (three prong to two prong).  But I'm terrified that my iMac will blow up if I only use a plug convertor and not some sort of voltage convertor (Transformer).

    I'm not really hardware tech savy - is it easy to pop out the UK power cable and plug in the US power cable? Or do I need to get someone like an iMac support guy to do this? And because of the voltage difference, is there something built into the iMac that takes care of the voltage difference for me?  Thanks!!

  • Which licenses do I need for the Enterprise Portal from Dynamics AX R2 2012

    Dear Community,
    some time ago i heard about the Enterprise Portal, which requires a SharePoint 2013 and a Dynamics AX R2 2012 Server.
    My company has a fully licensed SharePoint 2013 Enterprise Server and enough CALs. We also have a Dynamics AX 2009 Server running. 
    Now to my question: What licenses are needed to get a Enterprise Portal with Dynamics AX 2012?
    Thanks for your responses.
    Sincerely ShareBear9280

    Hi ShareBear,
    According to your description, my understanding is that you want to know which licenses needed for the Enterprise Portal from Dynamics AX 2012 R2.
    There are 4 types of user CALs in Dynamics AX 2012 R2 - Enterprise, Functional, Task, and Self Serve. The number of CALs needed is related to who these users are and what they do.
    More information, please refer to the link:
    http://community.dynamics.com/ax/f/33/t/114710.aspx
    For this issue, I recommend you can post your question to the forum for Microsoft Dynamics AX: 
    http://community.dynamics.com/ax/f/33.aspx .More experts will assist you, then you will get more information relation to Microsoft Dynamics AX.
    Thank you for your understanding and support.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Excel output for the xml publisher report when it is [b]scheduled [/b]

    How to get the excel output for the xml publisher report when it is scheduled by a apps user? Like what is the user profile option (for the apps user who runs the report) and what are the other things that needs to be taken care of so that only this xml publisher report run by this apps user produces a EXCEL output (When scheduled) ???
    Really appreciate it if any one can help me in this regards.
    Thanks
    Munna

    Hi Munna,
    For eBusiness Suite (apps user) the report output is stored the same way whether executed immediately or scheduled.,To get excel set the options > output format to Excel. Only the user that submitted the report can view it, or you can get the output file from the server. Or you can set the notify option so that a Workflow Notification is sent when the request completes.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • How to edit the existing data in the XML file from java programming.

    Hi all
    i am able to create XML file with the sample data as below from java programming.
    i need sample code on how to edit the existing data in the XML file?
    for example
    <?xml version="1.0"?>
       <mydata>
               <data1>
                         <key1>467</key1>
                        <name1>Paul</name1>
                        <id1>123</id1>
              </data1>
              <data2>
                         <key2>467</key2>
                        <name2>Paul</name2>
                        <id2>123</id2>
              </data2>
        </mydata>
    i am able to insert the data in the XML.
    now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
    Regards
    Sunil
    [points will be always rewardable]

    hi
    u need a parser or validate the xml file for to read the xml file from java coding u need for this
    xml4j.jar u can download this file  from here
    http://www.alphaworks.ibm.com/tech/xml4j
    or we can use the SAX(simple API for XML)
    some sample applications for this
    http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
    http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
    http://www.xml-training-guide.com/e-xml44.html
    let me know u need any other info
    bvr

  • Adding attachments to the mail send from XI

    Hi all,
    How can we add attachments to the mails send from XI?
    Regards,
    Satpreet Singh

    Hi
    Do the Mail Receiver Adaptor Configuration as mentioned.
    Choose any of the options suiting to your requirements. All the options shall give attachments in one way or the other.
    1) Choose Message Protocol   = u201CXIALLu201D
    The mail will go to the address mentioned in Mail Attributes in the adaptor as two attachments. The file something like ATT123.xml will contains all the system information and another file u201CpayloadXXXu2026..xmlu201D will contain the input file you give.
    2) Message Protocol =   u201CXIPAYLOADu201D with u201CMail Packageu201D
    If we check u201CKeep Attachmentsu201D in u201CMail Attributesu201D then, the content will be sent as an attachment otherwise, the content will be sent as body of the mail.
    3)Message Protocol =   u201CXIPAYLOADu201D without u201CMail Packageu201D
    The content will go as attachment even though u201CKeep Attachmentsu201D is not checked. If u201CKeep Attachmentsu201D is not checked then the attached file name will be same as that of the subject we have given in the Subject in Mail Attributes. 
    If the checkbox u201CKeep Attachementsu201D is checked, then the attachment file name will be u201CPayloadXXXXu2026.xmlu201D irrespective of the input file name.
    For more details:
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    Regards
    Monika

Maybe you are looking for

  • What is involved in removing an image from a PDF document and inserting a new one?

    Our form producing process is very typical: (1) Start with a TIFF image, create a fresh PDF document. (2) By adding items such as links and interactive fields, convert the read-only document into an interactive form. Step (2) may take a lot of work,

  • SA 520 DNS Issues

    Guys, I have a problem that was discussed before, but no results and the other user said that they firmwared up the unit and that fixed their problem. I have seen this problem on 1.1.42 and the prerelease of 1.1.56. It brings up a screen that says: A

  • How to display error message in abap

    How to dispaly error message in report? i have to check the range bewteen two days and if it is not in range have to display error message only once. next time if i press the execute button report will get executed without showing the warning message

  • I am unable to install itunes - Service apple mobile device failed to start

      I am unable to install itunes - Service apple mobile device failed to start

  • Office 365 University Error Opening All Products

    I am a student at OTC in Springfield, MO. I just purchased Office 365 University Edition today, as it is required for my courses. So, it took forever to download, because my internet is slow. When it was finally done, I could not open any of the prog