Dynamic filename in receiver AS2 adapter in B2B Add-on

Hello Experts,
Can you please let me know how we can put dynamic filename in the receiver AS2 adapter for B2B Addon on SAP 7.4.
Thanks
Saurabh

Hi Ryan / Experts,
Let me explain you in more detail.
In the receiver AS2 Communication channel, if I keep the Filename field as blank as shown below, then in the Mendelson inbox folder, a file is generated with the name "ASJAVA_DX5" which is my business component name.
If I fill the filname field for example with "CONTRL", then in the Mendelson inbox folder, a file is generated with the name "CONTRL".
This is my requirement because, suppose i trigger this interface "first time", a file with static name (ASJAVA_DX5/CONTRL ) would be generated in the inbox folder. If I trigger this interface "second time", since the file already exists with same name, it is not overwritten and I cannot check the output of 2nd trigger . Contents are not overwritten.
To solve this problem + as a general requirement, I wish to have this name to be dynamic, atleast with date+timestamp.
Can you please help.

Similar Messages

  • Dynamic Filename on Receiver File Adapter

    Hi,
    I am running XI 3.0 SP 14.
    The scenario is
    SAP R/3 (IDOC) > XI (Receiver File Adapter)> FTP Server
    There is no mapping on the XI side, we just drop the IDOC XML on to the ftp server.
    I would like to configure a dynamic file name on the Receiver File Adapter where if the 'MSATZ' Field
    within the E1EPD04 segment of the IDOC is populated then I would like to send a separate
    Filename than the one specified on the 'File Name Scheme'.
    Has anybody done this or any suggestion how I should go about this please.
    Thank you.
    Warm  Regards,
    Ranjan

    Hi Guys,
    When I tried to create the User defined function as below, I got the Null value for the "StreamTransformationConstants.DYNAMIC_CONFIGURATION" object.
    My code looks like this,(this is part of the debuging code)
    Start
    public String Create(String a,String b,Container container){
    if (container.getTransformationParameters() == null)
    return "conf.null";
    if (container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION) == null)
    return "Dynamic.null";
    return b;
    --End
    On the output I get the value "Dynamic.null". I do not know why the object value is Null.
    Any suggestion pls.
    Thank you.
    Warm Regards,
    Ranjan

  • Dynamic Filename in Receiver mail adapter is it possible without module?

    Hi,
    I need to send the file name in email adapter dynamically.Presently iam getting the filename as untitled.xml in the email .The keep attachments is checked in the mail adapter.
    I need to rename the file based on the input field name and timestamp .for example if i get the input field xxxx then the filename should be set as xxxx + timestamp .xml.I tried to use the UDF for dynamic configuration but it didnot help me out.Please help me.
    Thanks
    Rajesh

    Use below code snippet... It should work. If you want timestamp different change accordingly. Currently I do date followed by time as per my requirement.
    SimpleDateFormat simpledatFormat = new SimpleDateFormat("yyyyMMdd");
    Date date = new Date();
    String datewithYear = simpledatFormat.format(date);
    SimpleDateFormat simpledatFormat1 = new SimpleDateFormat("HHmmss");
    Date date1 = new Date();
    String datewithMs = simpledatFormat1.format(date1);
    DynamicConfiguration conf = ((DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION));
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    String oldFileName=conf.get(key);
    String valueNew;
    if( oldFileName == null){
                           valueNew =oldFileNamedatewithYeardatewithMs+".xml";
    //set the new filename
    conf.put(key, valueNew);

  • How to pass dynamic filename to Receiver JMS channel

    Hi experts,
    I want to pass the dynamic filename to receiver JMS message Properties.
    for example
    I am passing directory name via adapter module AF_Modules/DynamicConfigurationBean with key and value combination like below. How to pass dynamic filename value to a dynamic property ( say DCJMSMessageProperty1)
    eg.
    key.0 - >insert http://sap.com/xi/XI/System/JMS DCJMSMessageProperty0
    value.0 - >  testdirectory ( which is static value)
    Note: Im have not created any ESR object . i just have to bypass the file to a jms queue. I have used AAE integrated configuration scenario ( file to jms )
    Regards,
    Balaji
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:45 PM
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:46 PM

    Already given link for the dynamic configuration code snippet in the earlier reply... Below is the code snippet
    Note: Use Adapter Specific Message Attributes for the target Communication Channel(CC).Check the indicator for filename in the advanced tab of CC
    //UDF code
    String filename="";
    String NameSpace = "http:/"+"/sap.com/xi/XI/System/JMS";
    try{
          DynamicConfiguration conf = (DynamicConfiguration) param.get(
            StreamTransformationConstants.DYNAMIC_CONFIGURATION);
          DynamicConfigurationKey key  =  DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File",   "FileName");
           // read filename value
           filename = conf.get(key);     
          // So far we extracted filename value .. now do your logic  something like this...
          DynamicConfigurationKey key2 = DynamicConfigurationKey.create(NameSpace,"yourjmsvalue goes here");
           conf.put(key2,filename);
         } catch(Exception e){

  • AS2 software to work with AS2 adapter of B2B Toolkit 1.0

    Hi Team,
    I am doing scenario on AS2 adapter of B2B ToolKit 1.0 to work with AS2 adapter i need AS2 software and i am thinking to use mendelson AS2 server to work with it does it support it or should i use another AS2 software please suggest me.
    Regards,
    Avinash

    Hi Avinash,
        you have this blog, Easy-to-use AS2 software - part I Easy-to-use AS2 software - part I
    You can find the part 2 and 3 of it. All the info has been explained very good.
    Best regards, i hope it helps you.

  • Query on Receiver as2 adapter

    Hi team,
    i am working on idoc to As2 interface.
    how to work with MDN s  at receiver side AS2 adapter?
    any differences between asynchronous MDN settings and Synchronous mdn settings at receiver as2 adapter.
    if difference are there could you please let me know.what are the differences?
    Regards
    Sachin

    Hi Experts,
    any inputs please
    Regards
    Sachin

  • Receiver AS2 Adapter : Empty Message Handling

    Hello Experts ,
    We are trying to work on following requirement .
    File -> PI -> AS2 ( File) ( We are using Pranke to drop our message to the receiver system) (MDN ack too is in place )
    There are times when none of the source records are valid and we have an empty payload post mapping.
    In AS2 adapter we are using StrictXML2Plain.
    Scenario works fine for all target messages which have data and a file is created at the receiver end. MDN ACK works fine too.
    Problem is when we have empty target payloads , We get following error in communication Channel monitoring.
    Information
    SEEBURGER/AttribMapper: Finished succesfully, 1 properties set or deleted
    Information
    MP: processing local module localejbs/ModuleProcessorExitBean
    Information
    Message entered AF MP exit bean and will be passed to the JCA adapter now.
    Information
    SEEBURGER/AS2: Received order from system.
    Error
    Message could not be forwarded to the JCA adapter. Reason: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond # , SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond #
    Error
    MP: exception caught with cause javax.resource.ResourceException: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond # , SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond #
    Error
    Adapter Framework caught exception: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond # , SEEBURGER AS2: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond #
    Has anyone handled such situation ? Is there any workaround at the SAP end to handle this issue ?
    Or is this to be handled at the Pranke end ?
    Attaching the Seeburger AS2 monitor error as well for empty messages ,
    State
    Error on send, will be retried
    Status Description
    Could not deliver as2 message to partner: org.apache.commons.httpclient.NoHttpResponseException: The server as2gw.pranke.com failed to respond # null
    Little urgent and your expertise is appreciated PI geeks
    Sayalee

    Hi,
    here is the my requirment one source -> two target interfacess (0..1)
    If u have 2 target interfaces,then this is not suffice..... u should make it as 0..unbounded both in operation mapping and message mapping.
    But based on ur requirements posted above i guess u have only one inbound interface at a time based on some conditions....
    But,
    <messages>
    <messages1>
    based on condition first message type not created in mapping.
    <messgaes2>
    The error u r getting is because.... u want only one interface in target at a time....
    Then u should not generate Message1 also in the target.
    So avoid mapping to message1 if u want only message2.
    If both message1 and message2 are created in target means... it is triggering for two interfaces.... so avoid one message1 or message2... based on some conditions u have..
    Still nt solved do post...
    Babu

  • Receiver AS2 Adapter issue.....Failed to get configuration from DATABASE. S

    Hi,
    Iam doing prototyping for File -AS2 adapter and ended up with below erros.
    Error type: COMPONENT_ERROR >> Error date: 6/17/11 8:04 AM >> Description: AS2 Adapter failure Outbound configuration error: Failed to get configuration from DATABASE. Sender configuration incomplete - perhaps AS2ID missing.. com.seeburger.as2.AS2Plugin.execute(AS2Plugin.java:379) [6/17/11 8:04 AM]
    and
    Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: AS2 Adapter failure # Outbound configuration error: Failed to get configuration from DATABASE. Sender configuration incomplete - perhaps AS2ID missing.., SEEBURGER AS2: AS2 Adapter failure # Outbound configuration error: Failed to get configuration from DATABASE. Sender configuration incomplete - perhaps AS2ID missing..
    The setting i have made during configation are :
    1> Reciver Party with Agency,Schema and Name entered.
    2>Identifiers for both Sender and reciver channel fileld with values seeburger and AS2ID.
    3>Used Sender uses Virtual reciver in sender aggremnet.
    4> Reciever CC have modules localejbs/Seeburger/solution/as2 and localejbs/ModuleProcessorExitBean in sequence.
    Please provide solutions to overcome the issue.
    As this is prototyping, i have downloaded Free As2 client and trying to send files to that client from PI.

    Hi Dinesh,
    make sure to also configure a report channel (refer to the sample chapter in the SEEBURGER AS2 documentation) in order to receive AS2 MDNs for your sent message. Additionally report channels are needed if the SEEBURGER specific TransmissionReports are requested.
    Hope that helps
    Greetings
    -Sascha-

  • Dynamic Filename for Reciever File Adapter

    Hi All,
    Can anyone answer to some of my quesries which are as follows
    a) . Currently Iu2019m working on an IDOC-to-File scenario in which I need to create zip file on file server by using a payload value.  I 
        search sdn and found a bean that can be used to create zip file which is PayLoadZipBean. Iu2019m referring the below weblog for creating file name dynamically.
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    My question is can anyone explain or provide me the step by step procedure in detail for the prerequisite which are mention in the weblog, i.e. 
    u201CAssuming that the following have been done and configured.
    1.A value table has been created in the ABAP stack of the WAS in which XI is running and the entries as the file types, which will be written into the files are maintained.
    2.Create a number range object in SNRO transaction in the same ABAP stack which will be having the sub objects as the file types maintained in the value table with their number ranges maintained. u201C
    b) .Can we use all mapping techniques (ABAP, Java, XSLT and Graphical) in a single scenario if yes then how to trigger them and which one executes much faster?
    c) .Can we trigger an RFC asynchronously and how?
    Your help is highly appreciated and
    Regards
    Faisal
    Edited by: Abdul Faisal on Nov 19, 2009 8:53 AM

    a) . Currently Iu2019m working on an IDOC-to-File scenario in which I need to create zip file on file server by using a payload value. I
    search sdn and found a bean that can be used to create zip file which is PayLoadZipBean. Iu2019m referring the below weblog for creating file name dynamically.
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    My question is can anyone explain or provide me the step by step procedure in detail for the prerequisite which are mention in the weblog, i.e.
    Hi  Use dynamic configuration UDF to create file name dynamically.its very easy search in sdn you will find the code,even you can create file directory name dynamically.
    In receiver file communication channel if you use PayLoadZipBean it will do Zipping of your message,for this you need to add this bean name additional parameters section in Receiver Channel.
    If you want to create zip file based on pay load value check the condition at mapping level based on that call the service,if you not required zip file in other case for that you need to create one more file receiver communication channel.
    u201CAssuming that the following have been done and configured.
    1.A value table has been created in the ABAP stack of the WAS in which XI is running and the entries as the file types, which will be written into the files are maintained.
    not claer,can you explain bit more
    2.Create a number range object in SNRO transaction in the same ABAP stack which will be having the sub objects as the file types maintained in the value table with their number ranges maintained. u201C
    b) .Can we use all mapping techniques (ABAP, Java, XSLT and Graphical) in a single scenario if yes then how to trigger them and which one executes much faster?
    We can use all mappings single scenario,how mean just add the mapping names in Operation/Interface mapping.
    As per my understanding Message Mapping works faster then JAVA then XSLT then ABAP,but it depends on how many lined of code you written.
    c) .Can we trigger an RFC asynchronously and how?
    Yes we can use RFC Asynchronous,search in sdn you will find it,if unable to find let me know.
    Regards,
    Raj

  • Dynamic naming of receiver file adapter

    Hello Friends,
    How to handle the dynamic file naming in XI at receiver side as file naming convention sequence to be incremented for every 1 hour...
    my Client expecting to handle at mapping...How to do this...
    Could any one give me the program if we need to do it in java...
    and pls also give another approach if any
    Setup dynamically ,

    >>as file naming convention sequence to be incremented for every 1 hour.
    Please elaborate this point. I'm again seeing same the question from your side.
    From Variable Substitution you can access only ASMA and can refer the payload element. But in the requirement is something else the you should have to go for Dynamic Configuration in Mapping program.
    Thanks
    Farooq
    Edited by: Farooq Farooqui on Aug 16, 2008 12:11 AM

  • Variable Substitution - dynamic names in receiver file adapter :)

    Hi,
    anyone tried this new feature yet?
    Variable Substitution
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    I hope it's working fine it may be a good answer to many questions on the forum:)
    I can't wait till I get my hands on XI SP12:)
    if anyone has a document the describes <b>all</b> of the changes that came with sp12 please post the link
    Regards,
    michal
    Message was edited by: Michal Krawczyk

    Hi,
    I can't wait to test the new test tool
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/874a4273bb3830e10000000a155106/content.htm
    it looks like a very helpful thing
    come on, come on I want my sp12:)
    Regards,
    michal

  • Dynamic User for Receiver RFC adapter

    Hi,
    I have a soap to rfc scenario. Any solution to use PI login user as RFC user to connect SAP backend?
    Thanks

    YOu might want to know about the concept of principal propagation.
    http://help.sap.com/saphelp_nw04/helpdata/en/45/0f16bef65c7249e10000000a155369/frameset.htm
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/808d3048-638c-2a10-35a6-faa48e50ad59
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1a65a5a7-0d01-0010-1b9d-df02d5666791
    Regards,
    Ravi

  • Seeburger AS2 Adapter - Dynamic Attributes

    Dear all,
    We have a scenario where, we are sending an IDOC from our SAP system via XI to one of our partner using AS2.
    We have to manipulate the file name at the receiver end using the dynamic attributes of the AS2 communication channel.
    As per the documentation and the following threads
    Re: File to AS2 File Name? we have done the necessary configuration in the communication channel. The following activites are done
    Selected the checkbox "Use dynamic attributes"
    Under the Module tab
    In Processing sequence added a new entry
    Number 1
    Module Name : localejbs/Seeburger/solution/as2
    Module Type  : Local enterprise bean
    Module Key   :  "dynfile"
    Under the Module Configuration added the following details
    Module key  :  "dynfile"
    Parameter Name : "http://seeburger.com/xi/AS2/dtAS2FileName"
    Parameter Value : "DYNFILENAME"
    However, I understand that this configuration is incomplete, as somewhere i need to pass the value to the variable "DYNFILENAME".
    As per the thred Re: File to AS2 File Name?, Mr Srinivas Reddy mentioned 5 steps, however I am not clear about the step 3 & 4.
    FYI : What I want to map as the file name is the Parter Profile in the EDIDC40 segment of the idoc and the date+time stamp
    Many thanks for the help , in advance
    Regards : Bobby Bal
    Edited by: Bobby Bal on Sep 20, 2010 9:52 PM

    Hi,
    Use the below UDF in your mapping..
    public String FileName(String a,Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://seeburger.com/xi/AS2","dtSubject");
    conf.put(key, a);
    As per your requirement, Use Concatenate function  Idoc + Date + Time .
    Pass the resultant value to the UDF and pass this to any unused Target node.
    IDOC + Time+Date --> UDF --> Target node.
    In your receiver AS2 adapter, Click on use dynamic attributes and  Subject check boxes.
    If you want to use other Dynamic attributes like dtAS2FileName, dtAS2ContentType ..
    Simply replace the dtSubject with dtAS2FileName or  dtAS2ContentType . No need to use any modules.
    Thanks
    Deepthi.

  • Dynamic filename in mail adapter

    Hi,
    how can I set the filename of a mail attachment dynamically in a receiver mail adapter (also dynamically configured)?
    I had to uncheck the "keep attachment" because of our scenario.
    If I check this box I get a .xml file which I can rename with the MessageTransformBean (but not dynamically?) but I get to much files in the mail.
    Now I get a .dat file and want to rename it dynamically in e.g. dynamicName.txt.
    Can you give me some input how to do that?
    Thanks in advance
    Dominic

    Hi
    <i>isn't it possible to set the filename of the attachment in the message-mapping?</i>
    --->
    Try writing this UDF so to get the name in mapping
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(key,a); // a - parameter given to UDF that specifies filename
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Hope this helps

  • Dynamic File name in Receiver File adapter

    Hi,
    My Scenario is Proxy to File.
    I must create filename dynamically in the receiver file adapter by taking the sales order number and divison from the source.
    How can i create a dynamic filename? i searched the forum, but i could not get the correct answer,
    Please help me out.
    Regards
    Srinivas

    Hi Srinivas,
    > My Scenario is Proxy to File.
    > I must create filename dynamically in the receiver file adapter by taking the sales order number and divison from the source.
    public String targetFileName(String Sono, String Div, Container container) throws StreamTransformationException
    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String MyFileName = sono + div + "<filename>"+".xml";
    conf.put(key, MyFileName);
    return MyFileName;
    File name you can format according to your requirement.
    And one more thing for this you have to specify the ASMA properties. For this check the below link step-1 and step-2.
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regards
    Ramesh

Maybe you are looking for

  • Struts html:select tag

    Hi All, I am using struts. I want a dropdown single select menu option on my Jsp page. Basically, the options would be a dropdown either US or CA (meaning USA or CANADA). Html selectoptions is easy. How to do it in struts ? Once page is displayed, US

  • Error message AE5 in cable box?

     Cable went out on oll three tv's, there's a message on a black screen that says 'if you want to watch Verizon Fios, press menu, otherwise turn off TV.', but when we press 'menu' on the verizon remotes, this appears on the cable box where the channel

  • How do I convert an Idesign CC epub to mobi

    I easily exported and Indesign CC file to epub, which works fine in IBooks.  How do I export it to mobi. Can I do it as easily? Thanks, Janis Friesler

  • Where are Page documents

    When I create Page documents on my iPad where are they on my Mac when iCloud is on?

  • How to upload podcast series artwork?

    I'm building my website with iWeb, hosting on my .mac account. I have a podcast on that site, which was approved by the iTunes store today. With that setup, how do I submit series artwork to the iTunes store? Thanks very much in advance!!