XSL(T) Mapping in SAP PI

Hello comminity.
I have got a question about XSL(T) in condition to XML.
There are 2 XML-Documents, one Source-XML and one Target-XML.
And there is also a XSL(T)-Document, which transfers the Source-XML into the
Target-XML.
My Problem:
The XSL(T) is either wrong, or some lines are missing.
Source-XML: -> Correct / no mistakes
XSL(T) (Mapping): -> Anything wrong / missing in this Transformation
<!-- Transfer of the attachment-->
          <xsl:for-each select="Z1ATTACH">
          </xsl:for-each>
     </xsl:template>
     <xsl:template name="formatDate">
          <xsl:param name="date">
          </xsl:param>
          <xsl:if test="string-length($date) &gt; '0'">
               <xsl:value-of select="concat(substring($date, '1', '4'), '-', substring($date, '5', '2'), '-', substring($date, '7','2'))"/>
          </xsl:if>
     </xsl:template>
</xsl:stylesheet>
Target-XML: -> Correct / no mistakes
<!Begin of attachments>
The XSL(T)-Document is either wrong, or some lines are missing as a said.
So would you be so kind and tell me the wrong / missing code ?
Thank you very much for helping.
Best Regards.

Hello comminity.
After 2 days, I have solved the problem by myself.
There you have the code, I have written and now it works:)
<!-- Delivery of attachment -->
          <xsl:for-each select="//Z1ATTACH">
               <xsl:element name="AdditionalData">
                    <xsl:element name="Name">
                         <xsl:text>Z_CI_ATTACHMENT_DESCRIPTION</xsl:text>
                    </xsl:element>
                    <xsl:element name="Value">
                         <xsl:value-of select="DESCRIPTION"/>
                    </xsl:element>
                    <xsl:element name="AdditionalData">
                    </xsl:element>
               </xsl:element>
               <xsl:element name="Name">
                    <xsl:text>Z_CI_ATTACHMENT_BY_RFC</xsl:text>
               </xsl:element>
               <xsl:element name="Value">
                    <xsl:value-of select="PH_OBJID"/>
               </xsl:element>
               <xsl:element name="AdditionalData">
                    </xsl:element>
          </xsl:for-each>
     </xsl:template>
     <xsl:template name="formatDate">
          <xsl:param name="date">
          </xsl:param>
          <xsl:if test="string-length($date) &gt; '0'">
               <xsl:value-of select="concat(substring($date, '1', '4'), '-', substring($date, '5', '2'), '-', substring($date, '7', '2'))"/>
          </xsl:if>
     </xsl:template>
</xsl:stylesheet>
Thank you for helping.
Best Regards.

Similar Messages

  • How to Map in SAP      ?

    Hi
    My client is Automobile industry.In the presales process my company delivers the goods to the dealer.On transit the goods are damaged.Instead of returning the goods the dealer him self repairs the goods and sends the credit memo to the company.The company will send the engineer for inspection and give the clearance certificate for the dealer.With reference to this we have to create the credit the customer.
    How to Map it SAP....?
    Plz send me the reply
    Regard's
    Prasad.

    Dear Prasad,
    As you r not taking d goodS back (or dealer is not sending them back) thus it's not a case of a Returns. Also there is no issue with d invoice either thus even Invoice Corrrection Request will not b generated.
    Thus it's a simple case of creating a Credit Memo Request for the required amount i.e the amount claimed 2 b spent by d dealer. This will obviously have a block which can b removed by d engineer who went for inspection (or some1else depending on d working of d organisation). Once the billing block is removed the dealer can b issued a Credit Memo in d usual way.
    Hope it answers ur query.
    regards
    PARAM

  • How to create a map in SAP BI???

    Dear SAP BI Experts,
    I have a difficulties to make a map in BI and missed the steps procedure how to create a map.  I have an ESRI CD Map and Arc VIew application.  What is the first step if i want to create a map and is there any procedures or manuals from the beginning "how to create a map in SAP BI" ???
    So sorry for stupid question!!!
    Thank you very much for your time and help.
    Best Regards,
    Rudy (SAP BI Team)

    Hi Nirmansyah,
    Please check the below link.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/s-u/step-by-step%20procedure%20for%20creating%20customized%20bex%20maps.pdf
    Hope this helps.
    Veerendra.

  • RuntimeException in Message-Mapping (com.sap.aii.utilxi.misc.api.BaseRunti)

    HI,
    We are facing a very strange problem , during runtime we are facing the below mapping problem ,
    <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
    <SAP:P1>com/sap/xi/tf/_MM_FILE_TO_IDOC_P~</S P:P1>
    <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
    <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
    But when we have downloaded the XML from SXMB_MONI and tested the mapping it works fine , only in the run time we are facing this problem , funny part is the same scenario worked fine yester day itself (end-to-end).
    <b>Note</b>: <b>Chche is uptodate.
             Mapped all mandatory fields</b>
    Regards,
    Vijaya

    Hi
    please chech whether the data in the input file is according to the format or not.
    for this you go to sxmb_moni,take the input payload from the moni and test with that payload and you will come to lnow where is the error.
    if you still have the problem please relly me back
    Thanks
    Rinku

  • How to create interactive map in SAP Visual Business using SAP UI5 SDK

    Hi,
    Please tell me,
    How to create interactive map in SAP Visual Business using SAP UI5 SDK.
    Is it possible to create interactive map using VB Control in SAP UI5 SDK..?
    if possible please any one let me know.

    Hi folks, one question:
    We have our development close moved and now it is earlier than originally planned. 
    That means that we maybe can't finish our convenient API and you have to wait till we will release it - early 2015 is planned.
    But there is another option:
    Currently we have a API based on json. The developer has to create json and  to transfer it to the Visual Business control.
    This interface is more used as a low level API and we are developing on top the more convenient one. So all the features are the same.
    It will stay stable & compatible in the future and you can build on it.
    Do you want to use this interface?  
    Then I will publish the documentation.
    Let me know.
    Thanks

  • SAP:Code area="MAPPING" EXCEPTION_DURING_EXECUTE /SAP:Code

    Hi Experts.
    I'm tryin to make a JDBC Synchronous escenario, i want to UPDATE data from table in DB2 AS400, and the JDBC Update instruction returns the total of the register updated.
    All the configuration It's ready, but when I send the Update instruction, the UPDATE the information in the AS400 DB2 table, but the return message send me the next error:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_DAT_RES_</SAP:P1>
      <SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>
      <SAP:P3>on: Cannot create target element /ns0:MT_DAT_RES_0</SAP:P3>
      <SAP:P4>2. Values missing in queue context. Target XSD re~</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_DAT_RES_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_DAT_RES_02. Values missing in queue context. Target XSD re~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Can anyone telll me about it?
    Thanks.
    Kenneth

    Hi Rao,
    Go to sxmb_moni and open your response mapping and take the payload and test your mapping. It seems the value you are mapping to /ns0:MT_DAT_RES_02 is not there. Can you please check that. You need to make sure step 4 in this blog:
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    Your response always comes up with _response and your message type should be like that only.  Also can you give your response mapping payload and the response message type here so that somebody can help you out if this didn't resolve your issue.
    Regards,
    ---Satish

  • Error in SXMB_MONI: SAP:Code area="MAPPING" EXCEPTION_DURING_EXECUTE /SAP:C

    Hi All
    When the Idoc is sent from ECC to XI after checking the message in the SXMB_MONI I get an error saying:
    <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
    What is this error and how should I go about resolving it?

    Hi,
      The most probable reason is that your idoc has failed in the mapping step.
    Take the xml payload of your message from SXMB_MONI and paste it the test tab of your Message Mapping.
    Then you can run the mapping in the test tab of the message mapping, which will point you to the exact reason for the mapping failure.
    Regards,
    Ravi Kanth Talagana

  • Runtime exception occurred during application mapping in SAP PI

    Hi Team,
    Please help me regarding this issue is very urgent:
    Runtime Error in configuration part:
    Here i test the XML message in Receiver Determintion:
    Below i am getting error:
    Runtime exception occurred during application mapping com/sap/xi/tf/_MaterialStockUpdate_Multi_AllPlant~; com.sap.aii.utilxi.misc.api.BaseRuntimeException:The processing instruction target matching "[xX][mM][lL]" is not allowed
    SXMB_MONI:
    I am getting below error:
    Runtime exception occurred during application mapping

    Hi,
    Actually my problem is what i am getting,I am trying to test the data in runtime workbench and configuration part copied from inbound payload XML structure .
    I already sent the screenshots of above errors,
    Configuartion:
    Runtime workbench:
    This the error i am getting below in "Runtime Workbench"
    Error While Sending Message: Additional error text from response: com.sap.engine.interfaces.messaging.api.exception.ConfigException: ConfigException in XI protocol handler. Failed to determine a receiver agreement for the given message. Root cause: com.sap.aii.af.service.cpa.CPAObjectNotFoundException: Couldn't retrieve outbound binding for the given P/S/A values: FP=;TP=;FS=MHEPL_Sandbox_100;TS=;AN=MaterialStockUpdate_Multi_AllPlants_N;ANS=http://www.manipalhospitals.com/his/mm; in the current context [Unknown].

  • What is Multi-mapping in SAP+XI and when is it used?

    Hi SDN,
    Can you please tell me what exactly is a multi-mapping in SAP+XI  and when is it used with an example.
    Regards,
    Aniruddha Bhattacharya

    Hi Aniruddha,
      Multi mappings can be used in ccBPM which is used to map abstract interfaces. Development is the same as Message Mappings.
    n:1 Transformation
    Bundles multiple messages into one message, for example, individual purchase order items into one purchase order.
    1:n Transformation
    Splits a message into multiple messages, for example, a purchase order into the individual purchase order items.(its possible without BPM)
    n:m Transformation
    Converts a message into another message, for example, a message that is defined by interface A is converted to message that is defined by interface B.
    Multi-Mappings reference multiple message structures:-
    a) All source message structures are combined into 1 source structure.
    b) All target message structures are combined into 1 target structure.
    Therefore, there is only one source structure mapped to one target.
    With BPM:
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    Without BPM:
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Also go through this thread...you will find lots of link which are helpfull...
    Multi Mapping
    Regds,
    Pinangshuk.

  • XSL Interface Mapping - Recover name of file

    Good evening,
    I am using XSL interface mapping to convert a file to idoc and I need to recover the name of the file to insert it in the idoc.
    I have been looking for in XSL manuals for an answer and I haven't find it.
    How can I recover the name of the file that I'm trying to map to idoc?
    Best Regards,
    Nuria

    hi,
    right after you create an IDOC in your XSLT mapping
    create another mapping - message mapping (this time IDOC to IDOC)
    and put it into your interface determination
    put the code from my blog:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    and you will have the name
    Regards,
    michal

  • Kindly advise on new business process to map to SAP

    Hello All,
    I have one business process and I could not able to map to SAP.
    Please help me out.
    I have two company codes and one company code does the export business and other one supplies some parts to exports company code.
    Please find the scenario details in below.
    Company code 1000                 Company Code 2000 (Exports)
    Plant 1000                               Plant 2000
    X is the final product which is assembled with below parts (BOM)
    (Part A,Part B,Part C,Part D)
    Business Process:
    1. Plant 2000 places an order to Plant 1000 for final product "X".(It is the combination of Parts A,B,C,and D)
    2. Plant 2000 supplies Part E and Part F to plant 1000 without billing as RGP (Returnable goods packing).
    3. Plant 1000 receives parts E and F from Plant 2000
    4. Plant 1000 packs all the parts in one cart (ABCDE+F) and issues the final product "X" and part E and part F to Plant 2000
    5. Plant 2000 receives the final product X and part E and part F and as soon as GR done Part E and Part F should get consumed automatically in Plant 2000
    6. Plant 1000 sends the invoice for the Parts A,B,C and D and for service also.
    7. Plant 2000 pays invoice amount to plant 1000
    8. Plant 1000 receives the payment from plant 2000
    Please suggest me the suitable process in SAP and let me know if you need further explanation.
    << Moderator message - Please do not offer points >>
    Regards,
    Nag
    Edited by: Rob Burbank on Nov 19, 2010 4:59 PM

    Hi,
    For the above process you can map with Sub con process
    Step1 ) Create BOM in plant 2000 under cocd 2000  as End product /Header Material(X) and Component/child material as E and F
    Step 2) Create Sub con PO in plant 2000 under cocd 2000 with Vendor as Plant 1000 under co cd 1000
    Step 3) Transfer Component/child material E and F to Vendor as Plant 1000 under co cd 1000 using 541 Movt type.
    Steps 4) In Plant 1000 under co cd 1000 maintain material E and F as Non Valuated only Qty update.
    Step 5) Receipt the Component/child material E and F using Movt type 501 to update stock.
    Step 6) Create BOM IN Plant 2000 under co cd 2000 as End product/ Header material as X and Component/child material as A, B, C , D,  E & F.
    Step 7) Create sales order in Plant 1000 under co cd 1000 with customer as plant 2000 under cocd 2000
    Step 8) MRP run if require to plan the material A, B, C & D.
    Step 9) Procure the material A, B, C & D if stock less.
    Step 10) Create Production order/ Process order for Material X.
    Step 11) Confirm production order and receipt the End material (X) AGAINST Production order.
    Step 12) Crete out bond delivery VL01N for Material X and Goods issue (VL02N)
    Step 13) Billing VF01
    Step 14) MIGO goods receipt in  Plant 2000 under co cd 2000 against Sub on PO here Material E & F will consumes upon GR and end/ Header Material X will updated Stock.
    Step 15) MIRO to settle Vendor Account. Hope this will helps you.

  • Future Road Map of SAP B1.

    Dear All,
             Can anybody guide me from where i can get Future Road Map of SAP B1.
    Regards
    Hitesh

    Hi,
    Please find the link to the Business One Roadmap :
    [Business One RoadMap|https://websmp202.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700001336422008E]
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • LC & Advance Licence in Import procurment - mapping to SAP

    Hi experts
    How Letter of credit during import procurement & Advace license against imports will be mapped in SAP.
    Rgds
    kcr

    This is mapped in SD foreign trade scenario only, as this is the most important use, the customer wants to make sure that he does not ship materials that he does not get paid for.
    On purchasing (vendor) side , there is nothing comparable.
    If you dont use contracts for that material in your scenario, then you can create one to cover the LC as a workaround. So you as a vendor will always know how much of this LC is already used.

  • Mapping between SAP work process and db2 application/applications ?

    Hi,
    I want to identify what db2 application(s), maps to particular SAP work process.(when I mean db2 application I mean entry in "list applications" command output)
    Both db2 "list applications" and SAP work process lists PIDS of processes they belog.
    I want to find what db2 process maps to particular sap work process ? (I'm not sure is it one-to-one or one-to-many)
    thanks
    Vilius

    Using the DBACOCKPIT / ST04 (DB02 ... just leads you to a different branch of the DBACOCKPIT) gives you the option to view the mapping from SAP level.
    The DB2 facility to use is the application snapshot
    db2 get snapshot for applications on <dbname>
    which is not very handy to use.
    Another way that can be used from DBACOCKPIT (see Diagnostic -> SQL Commands) and database level is SQL - in V9.1 and V9.5 e.g. use
    select agent_id, client_pid, coord_agent_pid from sysibmadm.snapappl_info
    In v8 (as of fp9), you also can use SQL - just the view names are different. The beauty of this approach is that you easily can taylor the query to provide exactly the info you need. I suggest to consult the documentation on available views and routines.
    Malte

  • Scenario Map in SAP Bestpractices

    Hello:
    It's no possible to see the scneario map in SAP Best Practices
    When I tried to enter to  SAP Best Practices Scoping - Offline Version  I got this message.
    gCurrSelXMLdoc.load is not a function
    Cannot import selection
    It's happen on Google Chrome.
    Thanks in advance.
    Milton

    Dear Mr Kari Srinivasa Rao ,
                  Thank you for replying . Kindly let me know where I will maintain moisture percentage and corresponding price ?In purchase info record ? And where in quality we will maintain the moisture percentage . Kindly explain the solution in detail .
                  And one more thing . Will I be able to record gross weight and tare weight in confirmation tab ? Because it is allowing me to enter only one weight . 
    Regards
    Abhijit Das

Maybe you are looking for

  • "Automatically open a downloaded file" doesn't work.

    When I download a file using Firefox, it asks me what I want to do with it (save it or open it with a certain program). I select to open it, and check the "Do this automatically for files like this from now on" box. Next time I download a file like t

  • Bluetooth no more working with latest OVI suite

    Since I install latest OVI suite it seems my bluetooth stop working correctly and I cannot sync. however the radio seels OK, since I can pair. I've tried to unpai, repair, to clean. sometimes it works but afer the first disconnection, it no more work

  • RAW files not launching

    After a system crash I reinstalled Lightroom 3.6 and subscribed to Creative Cloud. Downloaded and installed without issue Bridge and Photoshop CS6 - 64bit Windows 7 system. Some (NOT ALL) of the RAW files (ORF) that I restored from a backup will not

  • Visually handicap, needs to increase font size in logic pro, Command  doesn't work

    Hi,      I'm visually handicapped, and new to logic-pro.  I'm having a miserable time reading the internal logic-pro fonts.  Command + doesn't work, and I can't find any preferrence or settings options that affect the default font sizes, any ideas?

  • How can I skip pages going back and forward?

    I would like to be able to skip over pages instead of just going back one page at a time. I know it can be done because I just did it accidentally. A list popped up with all the previous pages I had visited.