File-Adapter: Variable substitution form payload XML-attribute

Hi experts,
is possible to use XML-attribute-content for variable substitution in file-Adapter?
extract from XML:
<?xml version="1.0" encoding="utf-8" ?>
- <all>
- <transaction <b>file="filename"</b>>
- <table name="BPAADDRESS" options="insertIfUpdateFails">
- <record id="1">
  <hkeycol name="BPAMAINHKEY">0010500345</hkeycol>
  <hkeycol name="USAGE">Invoice</hkeycol>
  </transaction>
I want to get the value "filename" = attribute file of transaction.
Is this possible?
Thanks a lot,
Florian

I have done this taking a field from the XML.
You have to map the location of the field within the XML...
Taken from:
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
Variable Substitution (Target Directory/File Name Scheme)
If you set the Enable indicator, you can enter variables for the Target Directory and File Name Scheme. Enter the names of the variables and references in the table.
&#9679;      Enter each variable that you reference in the Target Directory and File Name Scheme fields without the surrounding percentage sign under Name of Variables in the table.
The variables can refer to attributes of the message header or elements of the message payload.
&#9675;       If the variables are to refer to an attribute of the message header, add the prefix message: to the name of the variable under Reference. You can specify the following attributes of the message header:
sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,
message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-cbf10a126331)
message_id_hex (message ID in hexadecimal format, for example 9fbe1ff19a0d11d98665cbf10a126331)
For example, if you want to specify the interface name from the message header in the target directory or in the file name scheme, enter message:interface_name as the reference.
If one of the message attributes contains characters that are not permitted in a file name, for example \, /, :, *, ?, ", <, >, |, then these characters are replaced by an underscore ("_").
&#9675;       If the variable refers to an element in XML schema, add the prefix payload: to the information under Reference. The reference then comprises a pseudo path description in the form of a comma-separated list with the schema namea,na,nameb,nb,....
namea,nameb,... corresponds to the element name and na,nb,... corresponds to the occurrence of the element name at the respective level in the document.
The description begins at the root of the document and ends at the respective element.
To reference the element that is in bold in the example, the following expression is used: payload:root,1,e1,1,e2,2
The parser searches for the first occurrence of the root element at the first level. It then searches for the first occurrence of e1 at the second level and for the second occurrence of e2 at the third level. The content of the last element (“Example Value”) is set as the value for a specified variable.
<?xml version="1.0" encoding="UTF-8" ?>
<root>
  <dummy>
     <e1>
        <e2>Data_1</e2>
        <f/>
        <g attr="abc">text</g>
        <e2>Data_2</e2>
     </e1>
  </dummy>
  <e1>
     <e2>illegal/value</e2>
     <f/>
     <g attr="abc">text</g>
     <e2 attr="fghij">Example Value</e2>
  </e1>
</root>
&#9679;      To disable the check the adapter performs for the element data, set the Disable Security Checks indicator.
Otherwise, the adapter checks whether the element data contains characters that could lead to security risks in the file system environment. The check includes the characters “/“, “\“, and “..“.

Similar Messages

  • Receiver File Adapter:Variable substitution :FATAL  ERROR

    HI all
    as per the previous thread :
    <b>Receiver File Name Variable Substitution :payload: Fatal Error
    in our idoc to file sceanrio, we are using simple <b>graphical mapping.</b>
    for dynamic file name , variable field is at <b>Target message type</b>,So  on using <b>Variable substitution</b>, again the error is same :
    SAXException while parsing XML payload: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) .
    <b>Our XI  Component version : 2004
    WAS 6.4 SP 15</b>
    Thanks
    AR

    Ashutosh,
       There is nothing to do with your mapping programs. Its the mistake in ur reciever file adapter configuration for variable substitution.I asked u whether u changed message mapping in order to implement the UDF!!
    Did u tried checking the audit log. Ok just to see where u are going wrong, instead of using Payload :... in Variable substitution use Message:..... and give some interface name so that to check whether the file is created with Interface name.
    Juz give a try!!!
    Best regards
    raj.

  • File adapter - Variable Substitution

    Hi all,
    I’m trying to use Variable Substitution functionality in my receiver file adapter. The objective is: During process message XI read the payload of an xml message and picks the value of tag <ORIGEM> coming with the File Name and do the substitution of File Name Schema of receiver file adapter.
    This is what I have donned in the configuration of receiver file adapter:
    File Name Schema: <b>R3%var1%.xml</b> (file construction mode: Add Time Stamp)
    Variable Substitution: <b>Enable</b>
    Variable name: <b>var1</b>     
    Reference: <b>payload:nr1:IfContabilizacao_Source_Log,1,INFO_CONTROLO,1,ORIGEM,1</b>
    The XML Message:
    <?xml version="1.0" encoding="utf-8"?>
      <nr1:IfContabilizacao_Source_Log
    xmlns:nr1="http://xi/XI/InterfaceContabilistico">
        <INFO_CONTROLO>
          <ORIGEM>TESTE</ORIGEM>
          <DESTINO>This is a string 2</DESTINO>
          <IDENTIFICACAO>This is a string 3</IDENTIFICACAO>
          <DATA>1999-01-24</DATA>
          <VERSAO>This is a string 4</VERSAO>
        </INFO_CONTROLO>
        <INFO_DADOS>
          <HEADER_DOCUMENTO>
            <BLDAT>1999-01-24</BLDAT>
            <BLART>C</BLART>
            <BUKRS>C</BUKRS>
            <BUDAT>1999-01-24</BUDAT>
        </INFO_DADOS>
      </nr1:IfContabilizacao_Source_Log>
    When I execute the process both sxmb_moni flags are ok! But in the adapter monitoring I receive this error message:
    2005-12-20 10:51:25 WET: Message processing failed: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1
    Var1 is the name that I have defined in variable name! Is wrong? Anybody see something wrong in this configuration or something in reference payload of  tags hierarchy… I think that I have checked all…
    Thanks in advance,
    Ricardo.

    Renjith,
    Adapter monitoring continues with this error mesage: VariableDataSourceException: The following variable was not found in the message payload: var1
    This error means that the reference showed bellow have something wrong! But I can't see where is the error!!!
    payload:IfContabilizacao_Source_Log,1,INFO_CONTROLO,1,ORIGEM,1
    Anybody see where is the error of my reference, or any other idea?
    Thanks in advance,
    Ricardo.
    Message was edited by: Ricardo  Quintino

  • PI File Adapter variable substitution

    Hi everybody,
    I do have the following message:
    <?xml version="1.0" encoding="utf-8"?>
    <ns:MT_FileIn_Budget xmlns:ns="urn:rlp.de:test:budgeting">
         <BudgetRecord>
              <Monat>Pa</Monat>
              <Jahr>b_Lie</Jahr>
                                               ................. etc.
    I want to extract the "Monat"  variable in the Receiver File Adapter as a substitution variable in the "Advanced" Tab  in the
    Receiver File Adapter configuration.
    I have the following value in the Substitution table :
    var1     payload:BudgetRecord,1,Monat,1
    (and then use var1 in the filename)
    If I use Header Mapping instead , everythings works.
    Any ideas? something misspelled?
    cheers hs

    Hi Michael,
    maybe you can clarify a better solution for my problem:
    The reason why I am using variable substitution is, that I am not using graphical mapping here.
    I am using a XSLT style sheet translation (PI 7.11) as a mapping step. 
    I need to set the file name depending on the operation mapping.
    For every specific situation (about 10) , there is one OM. This OM (XSLT, no SAP Graphical Mapping) should set a specfic filename.  for every specific situation there is an integration scenario with the specific OM.
    The Business Component with one comm channel should only be there once (we don't want 10 communication channels)
    Do you have a recommendation ?
    thx
    hs

  • Receiver File Name Variable Substitution :payload: Fatal Error

    Hi all
             i have a scenario of  idoc to file.., i need to create a dynamic file name taking 1 field variable from the payload.  The idoc -xml structure in XI is :
                       <b><INVOICE03></b>
                          <b> <IDOC BEGIN="1"</b>>
                              <b><EDI_DC40 SEGMENT="1"></b>
                                          <field1> ashu </field1>
                             <b> </EDI_DC40>
                               <ENEDL20></b>
                                           <field2> rawat</field1>
                              <b> <ENEDL20>
                           </IDOC>
                        <INVOICE03></b>
    i need to pick th value of field2 , for the target file name..
    In variable substitution i had given  var = INVOICE03,1,IDOC,1,E1EDL40,1,E1EDL20,1,VBELN,1
    <i>
    STILL I AM GETTING THE ERROR </i> :varsubst.VariableDataSourceException: Caught SAXException while parsing XML payload: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) .
    NOTE : my target variable is getting populated properly.
    i tried a lot of combinations in REFERENCE VARIABLE , even  giving ( payload: xxx)
    but for all  changes it is giving the same error....
    i referred the following blogs also :
    Re: Variable substitution
    Regards
    AR

    HI
    the target payload is :
      <?xml version="1.0" encoding="UTF-8" ?>
    - <DELVRY03>
    - <IDOC BEGIN="1">
    + <EDI_DC40 SEGMENT="1">
      <TABNAM>EDI_DC40</TABNAM>
      <MANDT>900</MANDT>
      <DOCNUM>0000000002093240</DOCNUM>
      <DOCREL>46C</DOCREL>
      <STATUS>30</STATUS>
      <DIRECT>1</DIRECT>
      <OUTMOD>2</OUTMOD>
      <IDOCTYP>DELVRY03</IDOCTYP>
      <MESTYP>DESADV</MESTYP>
      <STDMES>DESADV</STDMES>
      <SNDPOR>SAPQA1</SNDPOR>
      <SNDPRT>LS</SNDPRT>
      <SNDPRN>ZLOG900</SNDPRN>
      <RCVPOR>XIDEV</RCVPOR>
      <RCVPRT>KU</RCVPRT>
      <RCVPFC>WE</RCVPFC>
      <RCVPRN>8300000717</RCVPRN>
      <CREDAT>20070820</CREDAT>
      <CRETIM>143341</CRETIM>
      <SERIAL>20070703104747</SERIAL>
      </EDI_DC40>
    - <E1EDL20 SEGMENT="1">
    <b> <VBELN>0083030974</VBELN> </b>
      <VSTEL>5000</VSTEL>
      <VKORG>STK</VKORG>
      <INCO1>C&F</INCO1>
      <INCO2>Melsele</INCO2>
      <VSBED>03</VSBED>
      <BTGEW>12000.000</BTGEW>
      <NTGEW>0.000</NTGEW>
      <GEWEI>GRM</GEWEI>
      <VOLUM>0.000</VOLUM>
      <ANZPK>00000</ANZPK>
      <PODAT>20070703</PODAT>
      <POTIM>104747</POTIM>
    + <E1EDL22 SEGMENT="1">
      <VSTEL_BEZ>ID Warehouse</VSTEL_BEZ>
      <VKORG_BEZ>Stock Transfer</VKORG_BEZ>
      <INCO1_BEZ>Cost & Freight</INCO1_BEZ>
      <VSBED_BEZ>Road</VSBED_BEZ>
      </E1EDL22>
    + <E1EDL21 SEGMENT="1">
      <LFART>ZRUS</LFART>
      <EXPKZ>X</EXPKZ>
      <LPRIO>03</LPRIO>
      <TRAGR>0001</TRAGR>
    - <E1EDL23 SEGMENT="1">
      <LFART_BEZ>Delivery:Russian Exp</LFART_BEZ>
      <LPRIO_BEZ>High</LPRIO_BEZ>
      <TRAGR_BEZ>On pallets</TRAGR_BEZ>
      </E1EDL23>
      </E1EDL21>
    + <E1EDL18 SEGMENT="1">
      <QUALF>ORI</QUALF>
      </E1EDL18>
    + <E1ADRM1 SEGMENT="1">
      <PARTNER_Q>WE</PARTNER_Q>
      <PARTNER_ID>8300000717</PARTNER_ID>
      <LANGUAGE>EN</LANGUAGE>
      <FORMOFADDR>M/s.</FORMOFADDR>
      <NAME1>NYK Logistics</NAME1>
      <STREET1>Keetberglaan 2</STREET1>
      <POSTL_COD1>B-9120</POSTL_COD1>
      <CITY1>Melsele</CITY1>
      <COUNTRY1>BE</COUNTRY1>
      <REGION>RII</REGION>
      </E1ADRM1>
    + <E1ADRM1 SEGMENT="1">
      <PARTNER_Q>OSP</PARTNER_Q>
      <PARTNER_ID>5000</PARTNER_ID>
      <LANGUAGE>EN</LANGUAGE>
      <NAME1>I/D WAREHOUSE : DELHI</NAME1>
      <NAME2>B-84/1, Okhla Phase II, New Delhi</NAME2>
      <CITY1>New Delhi</CITY1>
      <TELEFAX>CST:LC/87/051655/05/61</TELEFAX>
      <COUNTRY1>IN</COUNTRY1>
      <REGION>DEL</REGION>
      </E1ADRM1>
    + <E1ADRM1 SEGMENT="1">
      <PARTNER_Q>OSO</PARTNER_Q>
      <PARTNER_ID>STK</PARTNER_ID>
      </E1ADRM1>
    + <E1EDT13 SEGMENT="1">
      <QUALF>006</QUALF>
      <NTANF>20070703</NTANF>
      <NTANZ>000000</NTANZ>
      <NTEND>20070703</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    + <E1EDT13 SEGMENT="1">
      <QUALF>003</QUALF>
      <NTANF>20070703</NTANF>
      <NTANZ>000000</NTANZ>
      <NTEND>20070703</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    + <E1EDT13 SEGMENT="1">
      <QUALF>001</QUALF>
      <NTANF>20070703</NTANF>
      <NTANZ>000000</NTANZ>
      <NTEND>20070703</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    + <E1EDT13 SEGMENT="1">
      <QUALF>007</QUALF>
      <NTANF>20070703</NTANF>
      <NTANZ>000000</NTANZ>
      <NTEND>20070703</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    + <E1EDT13 SEGMENT="1">
      <QUALF>010</QUALF>
      <NTANF>20070703</NTANF>
      <NTANZ>000000</NTANZ>
      <NTEND>20070703</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    + <E1EDT13 SEGMENT="1">
      <QUALF>015</QUALF>
      <NTANF>20070703</NTANF>
      <NTANZ>000000</NTANZ>
      <NTEND>20070703</NTEND>
      <NTENZ>000000</NTENZ>
      <ISDD>00000000</ISDD>
      <ISDZ>000000</ISDZ>
      <IEDD>00000000</IEDD>
      <IEDZ>000000</IEDZ>
      </E1EDT13>
    + <E1EDL33 SEGMENT="1">
      <ALAND>IN</ALAND>
      <EXPVZ>4</EXPVZ>
      <ZOLLA>0001</ZOLLA>
      <IEVER>3</IEVER>
    - <E1EDL34 SEGMENT="1">
      <EXPVZ_BEZ>Air</EXPVZ_BEZ>
      <ZOLLA_BEZ>New Delhi</ZOLLA_BEZ>
      <IEVER_BEZ>Road</IEVER_BEZ>
      </E1EDL34>
      </E1EDL33>
    + <E1EDL24 SEGMENT="1">
      <POSNR>000010</POSNR>
      <MATNR>000000000001005372</MATNR>
      <ARKTX>ALPRAZOMED TAB 0.5MG 5X10B BE</ARKTX>
      <MATKL>S5202</MATKL>
      <WERKS>5000</WERKS>
      <LFIMG>2.000</LFIMG>
      <VRKME>15S</VRKME>
      <LGMNG>10.000</LGMNG>
      <MEINS>S10</MEINS>
      <NTGEW>0.000</NTGEW>
      <BRGEW>12000.000</BRGEW>
      <GEWEI>GRM</GEWEI>
      <VOLUM>0.000</VOLUM>
      <VOLEH>CMQ</VOLEH>
      <LADGR>Z002</LADGR>
      <TRAGR>0001</TRAGR>
      <VTWEG>ST</VTWEG>
      <SPART>20</SPART>
      <GRKOR>000</GRKOR>
      <POSEX>000000</POSEX>
    - <E1EDL25 SEGMENT="1">
      <LADGR_BEZ>Injectibles- for MP</LADGR_BEZ>
      <TRAGR_BEZ>On pallets</TRAGR_BEZ>
      <VTWEG_BEZ>Stock Transfer</VTWEG_BEZ>
      <SPART_BEZ>Formulations</SPART_BEZ>
      </E1EDL25>
    - <E1EDL26 SEGMENT="1">
      <PSTYV>NLN</PSTYV>
      <MATKL>S5202</MATKL>
      <PRODH>010080010010100102</PRODH>
      <UMVKZ>5</UMVKZ>
      <UMVKN>1</UMVKN>
      <UEBTO>0.0</UEBTO>
      <UNTTO>0.0</UNTTO>
      <XCHBW>1</XCHBW>
      <MVGR1>U</MVGR1>
      <MVGR2>U</MVGR2>
      <MVGR3>U</MVGR3>
      <MVGR4>U</MVGR4>
      <MVGR5>U</MVGR5>
    - <E1EDL27 SEGMENT="1">
      <PSTYV_BEZ>StandStockTransItem</PSTYV_BEZ>
      <MATKL_BEZ>Belgium</MATKL_BEZ>
      <PRODH_BEZ>Tablets</PRODH_BEZ>
      <WERKS_BEZ>Export Warehouse</WERKS_BEZ>
      <MVGR1_BEZ>Unasigned</MVGR1_BEZ>
      <MVGR2_BEZ>Unassigned</MVGR2_BEZ>
      <MVGR3_BEZ>Unassigned</MVGR3_BEZ>
      <MVGR4_BEZ>Unasigned</MVGR4_BEZ>
      <MVGR5_BEZ>Unassigned</MVGR5_BEZ>
      </E1EDL27>
      </E1EDL26>
    - <E1EDL35 SEGMENT="1">
      <GRWRT>0.00</GRWRT>
      </E1EDL35>
    - <E1EDL43 SEGMENT="1">
      <QUALF>V</QUALF>
      <BELNR>7200000025</BELNR>
      <POSNR>000010</POSNR>
      </E1EDL43>
      </E1EDL24>
      </E1EDL20>
      </IDOC>
      </DELVRY03>
    i need <VBELN>0083030974</VBELN>  in file name
    Regards
    AR

  • File Reciver adapter - Variable Substitution

    Hi all,
    i am creating a file with dynamic file name.
    My structure looks like this:
    Row - 0-unbound (all the data)
    FileName - 1
    I don't want the file name to appear in the file I just want it for the Variable Substitution.
    so in the content conversion i use only the row.fieldFixedLengths
    but in the file i get an extra empty line because of the file name.
    Thanks,
    Naama.

    Hi,
    Its better to go for Adapter specific attributes with dynamic configuration. That will avoid you from usage of Filename field in target structure.
    Refer - Dynamic Configuration for file name
    Dynamic  File Name for Receiver File Adapter
    Dynamic File Name using XI 3.0 SP12 Part - I
    Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
    Thanks
    swarup

  • File adapter: Variables in OS command

    Hi All,
    Is it possible to put variable (from variable substitution) into OS command line? I need to create a specific filename, that issues from its payload. But substitution doesn't work - filename appears with percentage symbols and var names.
    Thank you.

    Guys,
    Let me explain situation in details.
    I have on source message split into several target messages. Then these messages are written as xml files. Finally, these files should be packed into zip archive, and zip archive should be named according to payload values.
    In this scenario I can't use payloadzipbean - it creates many archives for each final message, while I need many in one. That's why I've decided to use os command to archive files:
    jar -cvf pack_%var1%_%var2%.zip file_xml*
    And it works, but at the end archive's name is pack_%var1%_%var2%.zip.
    So, I know how variable substitution works, and how os command does... I just need to know if their collaboration is possible...

  • File Adpater: Variable Substitution

    Hi experts,
    I have a few questions regarding the variable substitution in the File-Adapter. I want to have it for my filename.
    For the variable substitution I can only take elements from the target structure, is that right? I know that I can take attributes from the header information like the interface_name etc. <b>But can I take attributes from the target structure?</b> Is it possible?
    With best regards
    Christopher

    Thanks for this, but there is the following runtime exception:
    14:38:41 Teststart
    Kompilierung von PICC_US_ZHINVOIC_INVOIC02_ZHINVOIC01_to_INVOICE_PICC_UDF war erfolgreich. Runtime exception during processing target field mapping /xdoc/Invoice/purno. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._PICC_US_ZHINVOIC_INVOIC02_ZHINVOIC01_to_INVOICE_PICC_UDF_ method Filename_purno$[5075, com.sap.aii.mappingtool.tf3.rt.Context@10cfad9] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /xdoc/Invoice/purno. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._PICC_US_ZHINVOIC_INVOIC02_ZHINVOIC01_to_INVOICE_PICC_UDF_ method Filename_purno$[5075, com.sap.aii.mappingtool.tf3.rt.Context@10cfad9] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:347) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:398) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._PICC_US_ZHINVOIC_INVOIC02_ZHINVOIC01_to_INVOICE_PICC_UDF_ method Filename_purno$[5075, com.sap.aii.mappingtool.tf3.rt.Context@10cfad9] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:56) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:291) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:398) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:47) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:291) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:398) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.NullPointerException at com.sap.xi.tf._PICC_US_ZHINVOIC_INVOIC02_ZHINVOIC01_to_INVOICE_PICC_UDF_.Filename_purno$(_PICC_US_ZHINVOIC_INVOIC02_ZHINVOIC01_to_INVOICE_PICC_UDF_.java:227) ... 25 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /xdoc/Invoice/purno. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._PICC_US_ZHINVOIC_INVOIC02_ZHINVOIC01_to_INVOICE_PICC_UDF_ method Filename_purno$[5075, com.sap.aii.mappingtool.tf3.rt.Context@10cfad9]
    14:38:42 Testende
    <u>The Code of my UDF:</u> --- "purno" is the input string
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(key, purno);
    return purno;
    Can somebody explain me, what the DynamicConfigurationKey is? And for which task the following code is responsible for?
    conf.put(key, purno);
    With kind regards
    Christopher

  • Dynamic file and variable substitution

    Hi Experts,
    I am working on a scenario where filename is reading from payload.based on header value ,i am creating file along with item records.I did variable substitution also.whenever header value changes ,a new file shud be created.
    I placed two records in my input message...
    <ns1:MT_DC_Send xmlns:ns1="http://urn:psr/ff/DC">
             <Source>
               <b> <FName>XYZ</FName>
                <FType>F</FType>
                <Input>Item1</Input></b>         </Source>
             <Source>
               <b> <FName>ABC</FName>
                <FType>F</FType>
                <Input>Item2</Input></b>
             </Source>
          </ns1:MT_DC_Send>
    but only one file is getting created with name XYZ.txt(I used cont conversion)
    output fiile data is
    <b>
    Item1
    Item2</b>
    Regards,
    Srinivas

    Srini,
    Thanks for the patience. The link which u sent is not working.
    Please find the total scenario in the below URL's, if u find any discrepancies , please let me know.
    <b>Structures defined</b>:http://www.flickr.com/photo_zoom.gne?id=956871756&size=o
    Create corresponding message types & Interfaces(Outbound:OB/Inbound:IB)
    <b>Mapping Logic:</b>
    First change the message occurrence:
    http://www.flickr.com/photo_zoom.gne?id=956027877&size=o
    Part1 :http://www.flickr.com/photo_zoom.gne?id=956871778&size=o
    Part2 :http://www.flickr.com/photo_zoom.gne?id=956871880&size=o
    Part3 :http://www.flickr.com/photo_zoom.gne?id=956871906&size=o
    UDF used in Part3 mapping:
    Test_Function[Cache:Queue, Input:FName, data]
    String local ="";
    for(int j=0;j<FName.length;j++)
    if(j==0)
    result.addValue(""data[j]"");
    local =FName[j];
    else
    if(FName[j].equals(local))
    result.addValue(""data[j]"");
    local =FName[j];
    else
    result.addContextChange();
    result.addValue(""data[j]"");
    local =FName[j];
    Message Mapping results:http://www.flickr.com/photo_zoom.gne?id=956027763&size=o
    <b>Interface Mapping:</b>
    http://www.flickr.com/photo_zoom.gne?id=956027893&size=o
    <b>Interface Determination:</b>
    http://www.flickr.com/photo_zoom.gne?id=956027913&size=o
    <b>Check your ID Objects:</b>
    http://www.flickr.com/photo_zoom.gne?id=956888454&size=o
    <b>Receiver Comm.Channel:</b>
    http://www.flickr.com/photo_zoom.gne?id=956027857&size=o
    Thats it!!!
    Now run the scenario. I used the same data which I used in the above URL's
    <b>SXMB_MONI</b>:http://www.flickr.com/photo_zoom.gne?id=956871938&size=o
    <b>Outputs</b>:http://www.flickr.com/photo_zoom.gne?id=956027957&size=o
    In the output file the first line which u see in the csv files are Item tag as per ur input. The second line is the filename , I don't know how to suppress the filename element in the output file. <b><i>Our friends has to help it out</i></b>.
    <b>Note:</b> While copying the test data from Mapping editor don't forget to remove the Messages element from the source.
    I hope it helps you!!!!!
    Best regards,
    raj.

  • Sender file adapter with content conversion  Simple XML

    Hi experts,
    I'm trying to parametrize my sender file adapter content conversion.
    I'm receiving a text file with one single line like:
    AA1;AA2; AA3;
    and I want to convert it to an XML like
    <MT_A1>
    <field1>AA1</field1>
    <field2>AA2</field2>
    <field3>AA3</field3>
    </MT_A1>
    Actually I know how to do somenthing like
    <MT_A1>
        <LINE>
              <field1>AA1</field1>
              <field2>AA2</field2>
              <field3>AA3</field3>
         <LINE>
    </MT_A1>
    What I want is remove the <LINE> tag from my XML.
    Regards
    Gonzalo
    Edited by: Gonzalo del Castillo on Nov 28, 2008 2:18 PM

    Hi
    Use this help document for receiver FCC
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Content Conversion (Pattern/Random content in input file)
    File conversion text to xml (Few Last Post)

  • Variable Substitution for IDOC-XML-Flat File

    Hello
    I have a scenario where I need to populate the Idoc number into my file name. the Source is an Idoc and the Target is XML but the target is then converted to an Flatfile via a module in the processing sequence. When I try to use the variable sub method it errors out as the final target structure is a flat file and not the XML structure that I hav used in the graphical mapping. Any help on how I can go abut doing this will be greatly appreciate.
    Thanks
    Lavanya

    IF I remove my adapter that converts the XML file to Flat file from the module sequence this works perfectly. So is there a way for me to now read the xml file for the target file name in variable sub. but still have the Flat file structure derived for the processing seq.

  • Variable substitution in external XML

    I'm loading an external xml file using the Loader class, and
    then assigning the loaded content to a variable when the loading is
    complete, like this:
    function x_loaded(e:Event) {
    var rotation_value:String = "-180";
    mc_xml = XML(x_loader.data);
    If I include in my xml file a value to be substituted, for
    example <image rotation={rotation_value}/>, the parsing of
    the xml fails when assigning to the mc_xml value.
    Is it possible to substitute values in externally loaded xml?
    alternatively, is there a way to simply SET the values,
    something like image.attribute("rotation")="180";
    thanks in advance

    Thanks, k
    I think all the code that's germane is in my first post, but
    here's a bit more detail. It turns out I was using URLLoader, sorry
    to confuse the issue. Your help is appreciated. The failure occurs
    on the line that reads "mc_xml = XML(x_loader.data);" and the error
    message is: "TypeError: Error #1090: XML parser failure: element is
    malformed."
    my code:
    var mc_xml:XML;
    var x_loader:URLLoader = new URLLoader();
    var x_url:String = "motion.xml";
    var x_req:URLRequest = new URLRequest(x_url);
    x_loader.addEventListener(Event.COMPLETE,x_loaded);
    x_loader.load(x_req);
    function x_loaded(e:Event) {
    var rotation_value:String = "-180";
    mc_xml = XML(x_loader.data);
    Here's the (simplified) external xml file. It's generated by
    a "Copy motion as ActionScript 3.0" and everything works fine
    before I try to substitute some variables in the xml. You can see
    the substitution in the penultimate line.
    <Motion duration="20" xmlns="fl.motion.*"
    xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">
    <source>
    <Source frameRate="25" x="784.3" y="78.1" scaleX="1"
    scaleY="1" rotation="180" elementType="movie clip"
    instanceName="mc" symbolName="Symbol 2">
    <dimensions>
    <geom:Rectangle left="0" top="0" width="288"
    height="209"/>
    </dimensions>
    <transformationPoint>
    <geom:Point x="0.2586805555555556"
    y="0.3923444976076555"/>
    </transformationPoint>
    </Source>
    </source>
    <Keyframe index="0">
    <tweens>
    <SimpleEase ease="0"/>
    </tweens>
    </Keyframe>
    <Keyframe index="19" x="-709.8" y="3.9000000000000057"
    rotation={rotation_value} />
    </Motion>
    Thanks in advance for any insight you can provide

  • Different files using variable substitution

    Hi,
    I've one scenario in which I'll be getting information like below
    Cust_Data      1..1
    VKORG          0..unbounded
         KUNNR      1..1
         NAME1      0..1
         LAND1      0..1
    now I am supposed to create various files containing customer data containing kunnr, name1, land1 only for each of VKORG
    I've tried using variable substittuion, in which i've given follwing information
    File Name Scheme : Customer_for_%vkorg%.txt
    Variable name                    Reference
    vkorg                                  payload:Cust_Data,1,VKORG,1
    but by providing this information, I am getting only one file having all the customer records.
    So My question is:
    1. How do I create different files for each of different VKORG
    2. How do I place customer data only pertaining to that VKORG only.
    Thanks,

    Go for 1:n multi-mapping. For details, you can refer to /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible and /people/ranga.rajan2/blog/2010/03/17/multi-mapping-with-a-simple-scenario--fledgling-kit .
    Regards,
    Sunil Chandra

  • File Adapter Variable structure Issue

    I have a requirement where i get a flat file in the format mentioned below:
    01,1218324735,73038740,021205,0601,464,80,1/
    02,73099000,12100035,1,021204,2359,/
    03,12998877650,USD,010,0,015,0,020,0,040,0,045,0,050,0,057,0,072,0,074,0/
    88,075,0,079,0,080,0,100,48930701,110,48930701,400,48930701,570,48930701/
    16,115,48930701,S,0,0,48930701,00051100896,0074014000,/
    16,577,48930701,,00722103104,1233333649/
    88,XXX TO 1233333649
    49,293584206/
    03,12332342319,USD,010,0,015,0,020,0,040,0,045,0,050,0,057,0,072,0,074,0/
    88,075,0,079,0,080,0,100,0,400,0/
    49,0/
    03,1233233772,USD,010,21311449,015,1255572,020,23673363,040,1255572/
    88,045,200000,050,190464,057,0,072,1055572,074,0,075,0,079,0,080,0,100,0/
    88,400,20055877,490,20055877/
    16,508,20055877,,00370004755,/
    88,XXX:021204004755
    88,ZZZ ZZ YYYYZ
    49,109109623/
    98,23827387079,3/
    99,754273628739,4,203/
    The description of the above file:
    Example 1 – List of multiple groups within a file and multiple accounts within a group:
    01 FILE HEADER Begins File
    02 GROUP HEADER Begins First Group
    03 ACCOUNT IDENTIFIER First Account
    16 TRANSACTION DETAIL First Account Detail
    49 ACCOUNT TRAILER Ends First Account
    03 ACCOUNT IDENTIFIER Second Account
    49 ACCOUNT TRAILER Ends Second Account
    98 GROUP TRAILER Ends First Group
    02 GROUP HEADER Begins Second Group
    03 ACCOUNT IDENTIFIER Begins Third Account
    88 CONTINUATION Continues Previous
    49 ACCOUNT TRAILER Ends Third Account
    98 GROUP TRAILER Ends Second Group
    99 FILE TRAILER Ends File
    How to read this kind of variable structure file in File Content Conversion?
    What kind of parameters should i configure in the content conversion parameters?
    Should i use user defined functions otherwise?
    Thanks for your help in advance.
    Regards
    Sudha

    Hi Sudha,
    Please do these in content conversion:
    Your structure which contains these fields
    Take paramater like this:
    <Structure>.fieldNames = allfields separated by commas
    <Structure>.fieldSeparator = ,
    <Structure>.endSeparator = '\n' means newline
    <Parent of this Structure>.endSeparator = '\n'
    use all field names in 1 variable whether they are being used in mapping or not.
    Reward with points if helpful.
    BR,
    Alok

  • Message traceability in PI - File Adapter

    Hi Experts,
    I have a Idoc to FTP scenario. Idocs are sent from SAP R/3 to PI where they are converted to file format and saved. Another communication channel reads these files one by one and sends them to an FTP folder.
    Now my question is, how will I trace/find the message which was generated by the second channel if I have Idoc number?
    Thanks,
    Netrey

    You can use variable substitution and you can name the file on the basis of Idoc number through dynamic configuration
    By this way the file name will be that of the IDoc number through which it is generated
    http://help.sap.com/saphelp_nwpi711/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/content.htm
    PI File Adapter variable substitution
    regards
    Ninad

Maybe you are looking for

  • Make clickable UI-elements for windows Phone 8.1 apps maps

    Windows Phone 8.1 App , C# I would like to let the user add Pushpins ( which apparently are called MapIcons ) to the map and when the user clicks the newly created Pushpin some other ui-elements should appear. But apparently MapIcons are not clickabl

  • Error when backup into tape?

    Dear all, I am copying the daily backup into tape in case of failure, however I got error message. Herer are the scripts: 1) backup_tape_uat.sh #!/bin/sh RS_EMAIL="[email protected]" cd /u02/db/backup/RMAN find *.bck -print | /usr/sbin/backu

  • ETC Spread date ??

    Hi All, Can any one expand ETC Spread date. That is the error I am facing while running concurrent program. thanks

  • Ipod not to be a detachable hard drive

    now i know what my problem is... how do i get my computer to not recognize my ipod as a detachable hard drive? i want it to recognize it as an ipod again.

  • Internet freezes up

    I'm hoping someone can help me with this problem. This all started about two months ago and it has progressively gotten worse. Whether I am using Internet Explorer 8.0 or Firefox 5.0.1 my internet connection will suddenly freeze up. I am able to some