Filename in J2SE Adapter with Variable Substitution

Hello,
Within the J2EE receiver fileadapter (and ftp) from SP13 it is possible to compose the target filename and directory based on the payload of a message using variable substitution.
I wonder if it is also possible to use variable substitution with the J2SE fileadapter. For this it is not documented but i thougth that the same java libraries are used for the J2EE an J2SE file-adapters.
Aybody??
Really Nobody??
Message was edited by: Emile Hermans

Hello,
the J2SE Adapter does not support variable subsition. Therefore we created our own class which gets called from the main SAP XI class "XMB2FileProcessor.class" wich is in the jar "aii_msg_adapter.jar". In your own class you can do what ever you need to chane the file name. In the configuration you can set your own parameter to search the payload for a string you want to replace. We also had to come up with our own timestamp, e.g. file2005-11-10 which SAP does not let you do, only the full timestamp is possible.
One other nice thing is that you can develop our JAVA class local and test it with your local J2SE Adapter Engine on you PC before you deploy it.
Steps to do:
1. JAD the SAP class
2. Put a call in the SAP class
3. Compile the class
4. Put the class back in the archive
5. Create your own class
6. Create a jar file for it
7. Put the jar file in the tech_adapter directory
8. Change the run_adapter start cmd to include your jar file
It works great, the only issue is if you patch the J2SE engine you have to do step 1 to 4 again but that should it very easy to do.
Cheers
Stefan

Similar Messages

  • Error file adapter with variable substitution in PI 7.31

    Hello,
    I'm trying to create a file with a dynamic name, based on the payload of the message.
    We're trying to create a filename with the bold content in the name %batchId%.xml. The subtitution we use is
    payload:batch,1,batch-info,1,id,1
    <ns1:batch xmlns:ns1="http://www.atosworldline.com/archivingPortal/receivers">
    - <ns1:batch-info id="test" isTest="true"> 
    <ns2:sender-identifier xmlns:ns2="http://www.atosworldline.com/archivingPortal/batchInfo">String 2</ns2:sender-identifier>  
    <ns2:nb-elements xmlns:ns2="http://www.atosworldline.com/archivingPortal/batchInfo">3</ns2:nb-elements>  
    <ns2:batch-integration-mode xmlns:ns2="http://www.atosworldline.com/archivingPortal/batchInfo">String 4</ns2:batch-integration-mode>  
    <ns2:creation-datetime xmlns:ns2="http://www.atosworldline.com/archivingPortal/batchInfo">1999-05-31T13:20:00Z</ns2:creation-datetime>  
    </ns1:batch-info>
    - <ns1:receivers> 
    - <ns1:receiver> 
    <ns1:id>String 5</ns1:id>  
    <ns1:action>String 6</ns1:action>  
    <ns1:contact-details />  
    - <ns1:tokenSets> 
    - <ns1:tokenSet startDate="1999-05-31T13:20:00Z" endDate="1999-05-31T13:20:00Z"> 
    - <ns1:token> 
    <ns1:tokenvalue>String 7</ns1:tokenvalue>  
    </ns1:token>
    - <ns1:token> 
    <ns1:tokenvalue>String 9</ns1:tokenvalue>  
    </ns1:token>
    </ns1:tokenSet>
    - <ns1:tokenSet startDate="1999-05-31T13:20:00Z" endDate="1999-05-31T13:20:00Z"> 
    - <ns1:token> 
    <ns1:tokenvalue>String 11</ns1:tokenvalue>  
    </ns1:token>
    - <ns1:token> 
    <ns1:tokenvalue>String 13</ns1:tokenvalue>  
    </ns1:token>
    </ns1:tokenSet>
    </ns1:tokenSets>
    </ns1:receiver>
    </ns1:receivers>
    </ns1:batch>
    The following error is shown, when processing the message through the receiving fileadapter.
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: batchId
    kind regards,
    Pieter

    AFAIK - Variable substitution does not support attributes. It only support the elements. (- <ns1:batch-info id="test" isTest="true">)
    May be you can go with dynamic configuration instead of variable substitution.

  • Dynamic target directory with variable substitution

    Hi everyone.
    I'm trying to save a file in a folder with receiver adapter.
    This folder is determined in runtime and passed to the adapter with variable substitution. My problem is that in RWB i get a error like this : 'Content of variable XXXXX is not safe'
    Does anybody have done a variable substituion for output directory receiver file adapter?
    Regards,
    Inigo.

    Hi,
    Check this links,
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Regards,
    Phani

  • Problem with variable substitution.

    Hello,
    I asked this before but now I want to change the question focus.
    I have scenario from IDOC to XML file.
    The scenario is digital invoice for our company in Mexico and I end this scenario with java mapping that I import from SAP marketplace.
    Now I have request to add to the XML file name the content of the field "<ODN_NUMBER>" from the XML data.
    I try to use with variables substitution.
    My payload is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ZINVOIC02>
    - <IDOC BEGIN="1">
    - <EDI_DC40 SEGMENT="1">
    <TABNAM>EDI_DC40</TABNAM>
    <MANDT>400</MANDT>
    <DOCNUM>0000000006599015</DOCNUM>
    <DOCREL>700</DOCREL>
    <STATUS>30</STATUS>
    <DIRECT>1</DIRECT>
    <OUTMOD>2</OUTMOD>
    <IDOCTYP>INVOIC02</IDOCTYP>
    <CIMTYP>ZINVOIC02</CIMTYP>
    <MESTYP>INVOIC</MESTYP>
    <STDMES>ZEDI</STDMES>
    <SNDPOR>SAPDEV</SNDPOR>
    <SNDPRT>LS</SNDPRT>
    <SNDPRN>DEV400ECC</SNDPRN>
    <RCVPOR>SAPDEV</RCVPOR>
    <RCVPRT>LS</RCVPRT>
    <RCVPFC>LS</RCVPFC>
    <RCVPRN>MX_INV</RCVPRN>
    <CREDAT>20100118</CREDAT>
    <CRETIM>075931</CRETIM>
    <SERIAL>20100118075931</SERIAL>
    </EDI_DC40>
    - <E1EDK01 SEGMENT="1">
    <CURCY>USD</CURCY>
    <HWAER>MXN</HWAER>
    <WKURS>10.55530</WKURS>
    <ZTERM>0090</ZTERM>
    <KUNDEUINR>ACH971209KRA</KUNDEUINR>
    <BSART>INVO</BSART>
    <BELNR>0100017295</BELNR>
    <BRGEW>0.045</BRGEW>
    <GEWEI>KGM</GEWEI>
    <FKART_RL>LR</FKART_RL>
    <RECIPNT_NO>0000012977</RECIPNT_NO>
    <FKTYP>L</FKTYP>
    - <Z1EDK01 SEGMENT="1">
    <XML_VERSION>2.0</XML_VERSION>
    <ODN_PREFIX>A</ODN_PREFIX>
    <ODN_NUMBER>1883</ODN_NUMBER>
    <DATE_TIME>2009-11-01T17:05:10</DATE_TIME>
    <DOC_SUB_TOTAL>4.22</DOC_SUB_TOTAL>
    <DOC_DISCOUNT>3.00</DOC_DISCOUNT>
    <DOC_TOTAL>1.40</DOC_TOTAL>
    </Z1EDK01>
    And the xml that I create is:
      <?xml version="1.0" encoding="utf-8" ?>
    - <Comprobante xmlns="http://www.sat.gob.mx/cfd/2" version="2.0" serie="A" folio="1883" fecha="2009-11-01T17:05:10" sello="NxZCWU8hMJMiEc2fSZafpS81Z9rUScbBotvJ8lcW76GGpmcD2lFyAV7DlNQKecYMnQJnwMVoHfGjzhpFJrjLuRcyqU3nOnH1mE1JMxY/MjLkal0Ybo2aRKCorQxx+F/Vy5ucvyeDDFAt2gx0PeHJhFS3tJ6ssc6nryz3iUr8c=" noAprobacion="49806" anoAprobacion="2009" formaDePago="Pago en una sola exhibiciףn" noCertificado="00001000000100891274" condicionesDePago="90 DAYS FROM BILL OF LADING" subTotal="4.22" descuento="3.00" motivoDescuento="Customer DiscountCustomer Discount" total="1.40" tipoDeComprobante="ingreso">
    - <Emisor rfc="NMS940324RY6" nombre="Netafim Mexico S.A. de C.">
      <DomicilioFiscal calle="Leibnitz" noExterior="20" noInterior="901" colonia="Anzures" localidad="Mexico city" municipio="Miguel Hidalgo" estado="Distrito Federal" pais="Mexico" codigoPostal="11590" />
      </Emisor>
    - <Receptor rfc="ACH971209KRA" nombre="AGRICOLA 5 HERMANOS SA DE CV">
      <Domicilio calle="JUAN DE LA BARRERA NO 1249 NORTE" localidad="COL. CHAPULTEPEC" municipio="CULIACAN" estado="Sinaloa" pais="Mexico" codigoPostal="80040" />
      </Receptor>
    -     <Conceptos>
    I try to use with this variable:
    payload:ZINVOIC02,1,IDOC,1,E1EDK01,1,Z1EDK01,1,ODN_NUMBER,1
    I received in RWB the error:
    Attempt to process file failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var_filename
    Thank you in advance for your help
    Elad

    But my target is looks very strange:
      <?xml version="1.0" encoding="utf-8" ?>
    - <Comprobante xmlns="http://www.sat.gob.mx/cfd/2" version="2.0" serie="A" folio="1883" fecha="2009-11-01T17:05:10" sello="NxZCWU8hMJMiEc2fSZafpS81Z9rUScbBotvJ8lcW76GGpmcD2lFyAV7DlNQKecYMnQJnwMVoHfGjzhpFJrjLuRcyqU3nOnH1mE1JMxY/MjLkal0Ybo2aRKCorQxx+F/Vy5ucvyeDDFAt2gx0PeHJhFS3tJ6ssc6nryz3iUr8c=" noAprobacion="49806" anoAprobacion="2009" formaDePago="Pago en una sola exhibiciףn" noCertificado="00001000000100891274" condicionesDePago="90 DAYS FROM BILL OF LADING" subTotal="4.22" descuento="3.00" motivoDescuento="Customer DiscountCustomer Discount" total="1.40" tipoDeComprobante="ingreso">
    - <Emisor rfc="NMS940324RY6" nombre="Netafim Mexico S.A. de C.">
      <DomicilioFiscal calle="Leibnitz" noExterior="20" noInterior="901" colonia="Anzures" localidad="Mexico city" municipio="Miguel Hidalgo" estado="Distrito Federal" pais="Mexico" codigoPostal="11590" />
      </Emisor>
    - <Receptor rfc="ACH971209KRA" nombre="AGRICOLA 5 HERMANOS SA DE CV">
      <Domicilio calle="JUAN DE LA BARRERA NO 1249 NORTE" localidad="COL. CHAPULTEPEC" municipio="CULIACAN" estado="Sinaloa" pais="Mexico" codigoPostal="80040" />
      </Receptor>
    I need to add folio field
    Elad

  • How to acces the filename from Message Header during variable substitution

    Hi,
    We need to access the attribute filename from Message Header during Variable Substitution.We are able to access the following attributes of 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 we want to specify the interface name from the message header in the target directory or in the file name scheme, we enter message:interface_name as the reference.
    In the same way i need to access the filename which we get in the Message Header(which we get in the Message Header when we check the Adaptor specific message properties and filename in sender CC).Any suggestions on the same
    Thanks and Regards,
    Bhargav
    Message was edited by:
            bhargav gundabolu
    Message was edited by:
            bhargav gundabolu

    Hi Bhargav,
    Use this UDF to retreive the file name from the Dynamic Configuration Payload in the mapping.
    getFileName(UDF) -
    > Filename(node in the target structure).
    public String getFileName(Container container)
       //write your code here
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Create a node in the target structure top hold the filename returned by the UDF.
    Now your payload will have the filename along with the actual data.
    U can use the variable substution now as u use for the other data in the payload since the filename is now a part of your payload.
    Regards
    San

  • Issue with Variable Substitution

    Hi,
    We have a scenario where we need to use the data from Payload for further processcing of the messeges.The payload looks like the one given below.
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:MT_NOTIFICATION xmlns:ns1="http://WM_ERRHAND"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <PROXYRESPONSE>
      <STATUS>YES</STATUS>
      <NAMESPACE>WM_INVOICE</NAMESPACE>
      <INTERFACENAME>MI_INVOICE_MOORE_ACK_IN</INTERFACENAME>
      <PROXYNAME>ZXIII_MI_INVOICE_MOORE_ACK_IN</PROXYNAME>
      </PROXYRESPONSE>
      </ns1:MT_NOTIFICATION>
    In adapter, for variable substitution we have specified as below:
    payload:MT_NOTIFICATION,1,PROXYRESPONSE,1,NAMESPACE,1
    but getting an error "Message processing failed: Error during variable substitution: java.text.ParseException: Variable 'namespace' not found in variable substitution table"
    Is the variable that we have declared is right or is there anything we have missed out. Any helpful answers will be rewarded
    Thanks and regards,
    Ram.

    Hi Ram,
    The substitution looks fine.
    Did you read this,
    <i>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 “..“.</i>
    Try seleting this option and checking the same.
    Regards,
    Bhavesh

  • Problem with Variable Substitution Receiver Adapter

    Hi,
    I need to use a dynamic filename so I'm using the variable substitution in my receiver adapter. BUT, the filename can't appear in the file. So i used this blog in reference --> Solution to the problem encountered using Variable Substitution with XI-SP12
    The PROBLEM is I still get and extra blank line in the file. How can I eliminate this extra line?
    Thanks in advance.
    Using XI 7.0

    Hi Gaurav,
    Data Type:
    Lines
       Line
    Config
       FileName
    XML - example:
    <?xml version="1.0" encoding="utf-8"?>
    <nr1:MT_TP_TipoCambio_Detalle_ECC_Req xmlns:nr1="urn:erplatam/tipocambio:tp:ecc">
    <Lines>
    <Line>USDSOL0000000000003.10000013-09-200813-09-2008V</Line>
    </Lines>
    <Lines>
    <Line>USDSOL0000000000002.50000014-09-200814-09-2008V</Line>
    </Lines>
    <Config>
    <FileName>SIGMA_TCSAP_F081031.DAT.TXT</FileName>
    </Config>
    </nr1:MT_TP_TipoCambio_Detalle_ECC_Req>
    Output - File, has 3 lines should have only 2:
    USDSOL0000000000003.10000013-09-200813-09-2008V
    USDSOL0000000000002.50000014-09-200814-09-2008V
    FCC parameters:
    RecordSet Structure: Lines,Config
    Lines.fieldSeparator 'nl'
    Lines.endSeparator 'nl'
    Config.fieldSeparator 'nl'
    Config.endSeparator 'nl'
    Thanks in advance!

  • Filename generation with variable substitution.

    Hi,
    I am currently working on a senerio in which file is receiver.The requirement is to generate file at target with the file name as message id.How can i use VARIABLE SUBSTITUTION and acheive this.
    (Add message id in configuration should not be done.)

    Hello shruthi,
                  Please try this for the filename creation,
    1. Create a UDF in the message mapping named getFileName, select only one input (to pass the messageid) and paste this coding there;
    /* getFileName User Defined  Function
    // function to create name of output file
    String filename;
    filename = strFile;
    try {
    // initialize DynamicConfiguration for create file with given name
    DynamicConfiguration conf = (DynamicConfiguration) container
           .getTransformationParameters()
           .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    //create file with the specified name 
    conf.put(key, filename);
    } catch (Exception ex) {
    return filename;
    2. In the target structure header field perform this mapping,
    Messageid -> getfFileName UDF -> Target Structure Headerfield
    3. Then in the Integration directory under the target tab
    check the Use - adapter specific message attributes and File Name
    Please follow the steps and let me know if u still face the same problem.

  • Error-Receiver File Adapter using Variable substitution when file is empty

    XI Experts,
    We are on PI 7.0, SP14.
    We are using variable subtitution to get the filename from source message. This works fine as long as we have data in the payload for filename element. But we have a scenario where we don't have to create file when certain condition does not exists in source message so in the message payload filename element will not exists in such condition and file will be empty and we should not create file.
    Parameter in the communication channel for Handling empty message is "Ignore".
    Does anyone knows how to handle this scneario. We don't want to default any file name in the message mapping if source file name element does not exists.
    We are following getting error in the Adapter engine.
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file
    Thanks
    MP

    You can implement this by writing the module to throw an exception or whatever method you want to execute.
    If you don't want to receive an error message then module is suitable for you.
    Gaurav Jain

  • Error with variable substitution..

    Hi
    I am getting following error message for variable substitution
    *Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: date_stamp: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: date_stamp
      <?xml version="1.0" encoding="UTF-8" ?>
    - <I813_EModMCS_IB_MT>
    - <Records>
      <ModMod>111</ModMod>
      <DesModdcr>222</DesModdcr>
    - <Date_Stamp>
      <Date_Stamp>20080338</Date_Stamp>
      </Date_Stamp>
      </Records>
      </I813_EModMCS_IB_MT>
    date_stamp             payload:I813_EModMCS_IB_MT,1,Records,2,Date_Stamp,3,Date_Stamp,1
    Would appriciate if you can correct the variable substitution...
    Regards

    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 (u201CExample Valueu201D) 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>
    Edited by: Progirl Progirl on Jul 17, 2008 8:04 AM

  • Parameter Filenames in Universal Adapter With Filenames In SrcFiles Dir

    Hello Experts,
    We are running DAC 10.1.3.4.1 and Informatica 9.0.1 HotFix2 and are in the process of trying to get an OOTB DAC Execution Plan to complete. We are able to build a plan but run into issues when running. We created a custom execution plan called TEST with one subject area (Financials - Cost of Goods Sold) and when the plan is built, 248 tasks are generated. Only 9 complete succcessfully.
    When looking at the details of a specific workflow within the Informatica Workflow Manbager, i.e. SDE_Universal_ProjectDimension, we find that within the workflow properties, the Parameter Filename Attribute = $PMSourceFileDir\SDE_Universal_Adaptor.SDE_Universal_ProjectDimension.txt. On our file system, the file is named, $PMSessionLogFile=FLATFILECONNECTION.DBCONNECTION_OLAP.SDE_Universal_Adaptor.SDE_Universal_ProjectDimension.txt. The task fails because it cannot find the file. We believe the different filenames are the reason but are posting this thread because we cannot figure why or how to get the filenames properly synched.
    So you know, we are using a data source that is not an Oracle supported data source, hence we are using DAC's Universal Adapter to bring in flatfiles, like the one above for instance.
    Please help,
    Thanks

    Hello,
    I don't think it was the source of your problem. It is always the case: DAC generates always SrcFiles with a name='Physical Data Sources Name'.'???'.'Informatica Folder Name'.'Mapping Name'
    Where does your file FLATFILECONNECTION.DBCONNECTION_OLAP.SDE_Universal_Adaptor.SDE_Universal_ProjectDimension.txt created ?
    Does this path equal to the DAC variable InformaticaParameterFileLocation declared in the DAC System Properties tab (menu Setup) ?
    Hope it helps,
    BLO

  • Mail sender adapter with Variable Transport Binding doesn't work

    Hi,
    we have PI/700 SP7.
    An external partner sends an email with one attachment (a simple csv file).
    I take "PayloadSwapBean" (with swap.keyName = payload-name) to get the attachment.
    Both, the Adapter-Specific Message Attributes indicator and the Variable Transport Binding indicator are set.
    I set the mail package format indicator too.
    What I need is the sender, receiver and subject of the mail plus the attachment.
    Unfortunately it is not possible to read in the email with this configuration - I get an error.
    If I unset the Variable Transport Binding indicator - I get the email but without "sender, receiver and subject" in "SHeaderFROM, SHeaderTO, SHeaderSubject". The "mail package" is overwritten by the attachment.
    Is it a problem of the namespace "http://sap.com/xi/XI/System/Mail"?
    Do I have to define this namespace or do I have to import a content (SAP BASE 700, SP7 is imported)?
    Please help...
    Regards
    Wolfgang

    Hi Wolfgang,
    I hope it is not due to the namespace.
    This might help you.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05
    Need some Guide regarding Configuration of Sender Mail Adapters....
    Regards
    Agasthuri Doss
    Message was edited by: Agasthuri Doss Baladandapani

  • Using a counter in addition with variable substitution

    Hi experts,
    i'm having a problem where i can not find a nice 'standard' solution. I'm also not sure if it is possible what i want.
    I'm using a receiver file adapter and sending a .CSV file. The naming convention of this file is: %delivery&-(counter).csv.
    The filling of the delivery is no problem, also the counter is added. But i want the counter to continue counting. Let me explain what happens now.
    Delivery 80000100 is sent by SAP R/3.
    Generated file name: 80000100-0001.csv
    Delivery 80000100 is sent again by SAP R/3 (a change). 
    Generated file name: 80000100-0002.csv
    Delivery 80000101 is sent by SAP R/3.
    Generated file name: 80000101-0001.csv
    In the last situation i do not want the 0001, but i want the 0003. Is this possible ?
    Thanks in advance,
    Peter

    Hello peter,
    We have implement exactly similar scenario.....
    What we did is maintain the counter in a database table field. In the mapping use a dblookup to fetch the last number.. then carry out a function which will carry out dynamic config for filename set.. and then another db call to set the counter incrementing by one...
    The code for setting filename by dynamic config is:
    public String setFilename(String value,Container container){
    //perform lookup
    // Defining AbstractTrace object to write trace messages
    AbstractTrace trace = container.getTrace();
    //Dynamic file name
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    try{
    trace.addInfo("Filename in set name: " + fileName);
    //set file name
    conf.put(key,fileName);
    }catch(Exception e)
         trace.addInfo("Exception: " + e);
    //return value as it is
    return value;

  • How to send HTML email with variable substitution in the email body section?

    Does anyone have some scripting examples that create a HTML formatted e-mail with the ability to have some fields be variables?
    I'm familiar with updating a XML document using a template file and the "keyword transform" function in the script.
    (Like setting an emergency close for a queue for example)
    I've also successfully written a script that sends an e-mail with a .wav file attachment.  I think I have the basics down on the e-mail part.
    Using the keyword transform gives me an xml document that shows the tags as well as the desired variable.  Functional but not very attractive
    The issue I'm really struggling with is the formatting of the e-mail body.
    Is there a way to have a "prettier" document with some basic HTML tags that allow the same function?
    For example I'd like a sentence in the body of the e-mail to say
    "Call received from number <VariableOfCallingNumber>  at <TimeVariable>
    I can do this in the subject easily enough but adding together some strings and variables. 
    I could do the same thing in the e-mail body DOC[], but as I understand it, I could only get 1 line so it would be pretty limited
    Can anyone point me in the correct direction?
    Thanks !!

    sorry, not possible
    http://stackoverflow.com/questions/5620324/mailto-with-html-body
    https://www.google.com/search?rlz=1C1CHFX_enUS566US566&{google:acceptedSuggestion}oq=mailto+with+mime+type&sourceid=chro…

  • Variable substitution in reciever file adapter

    will any one please help me in sloving this problem ,
    i have designed my reciever structure as shown in the below
    <RECORDSET>
          <HEADER>
               <NAME1/>
             <ADDRESS1/>
             <ADDRESS2/>
             <ADDRESS3/>
             <ADDRESS4/>
          </HEADER>
             <LINE>
             <QTY/>
             <UOM/>
             <UNIT_AMT/>
             </LINE>
       </RECORDSET>
       <FILENAME/>
    an i am using variable substitution
    variable name as filename
    reference         payload:MT_exxxxx_RECV,1,Filename,1
    i am getting a error in my message monitoring
    will anyone there to give me syntax for this

    Hi !
    I suggest to use Dynamic Configuration to assign the receiver filename using an UDF in graphical mapping. This little UDF can receive as input parameter the contents of the NAME field and write it to the specific tag in the header of the message, so the adapter will use that value as filename when writting the file on the receiver system, instead of variable sustitution.
    /people/sravya.talanki2/blog/2006/12/27/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-iii
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Regards,
    Matias
    ps:please award points if helpful.

Maybe you are looking for

  • Time in month view printing

    I do not want "time in month" view to print. I have unchecked the box in preferences, and it does not show on the screen in month view but still prints. Any suggestions to turn off when printing? Old iCal versions did not print "time in Month". Unwan

  • Titan 700 and 16:9 resolutions?

    Does the Titan 700 support any 16:9 resolutions under Windows XP? I tried to install several S3 Unichrome Pro drivers (MSI, Via, Asus), but all i get is 800x600, 1024x768, 1280x800, 1280x1024 and 1600x1200. I connected the Titan 700 to my LCD TV (LG

  • Install Essbase on solaris

    hello, I am looking for documentation to install hyperion essbase on solaris can someone send me a link, or install prerequisites. I searched on the Oracle I can not find. Thank you in advance.

  • Section break not breaking in the correct place??

    I'm in the process of creating an eBook. There is a cover page, then the rest of the book. I would like to: 1) have no headers or footers on the cover page. 2) have page numbering start on the page after the cover page. I would think that this would

  • Smart forms download 4.6C

    Hello, I'm working on SAP 4.6C system. I want to download and upload a smartform. Does anyone know a way to do that without using a transport. In 4.7 and higher it is easy to do. Is there another way to import or export a smartform. Thanx, Frank