Skip to end of metadata
Go to start of metadata

AS2 communication setup usually involve identification of messages using "Message Subjects". However, there are instances where one of the communication partner have requirement to receive some unique AS2 Filename or they want to send a unique AS2 filename besed on which processing sould be done in PI. The communication channel itself does not have any field to provide the AS2 file name. However, this information is present in the header of AS2 message and therefore using Dynamic Configuration, we can populate the AS2 Filename parameter before sending the message to partner or after receiving a message from them.

AttribMapper

Seeburger provides an adapter module to populate the header data using Dynamic Configuration logic. The module name is AttribMapper. It is available with deployment of  SeeModuleCollectionPI.sca. The module configuration looks as below:

Module Name: localejbs/Seeburger/AttribMapper
Module Type: Local Enterprise Bean

 
 
Do not forget to have Dynamic Configuration tick in the respective AS2 channel
 

AS2 Receiver Configuration

If the receiving partner requires AS2 Filename in the header, you may use the parameters as shown:
This setting will send "MyFileName" as AS2Filename in AS2 message header.

AS2 Sender Configuration

If the sender sends the AS2 filename in the AS2 message sent, you may access this AS2 filename for any purpose. e.g. In the below example, the module is used in the receiver File channel to create the receiver Filename with the same name as the AS2 Filename is sent from third party.

There are many parameters available with AttribMapper which could be exploited to achieve various funationality within Seeburger or PI adapters.

  • No labels

6 Comments

  1. Unknown User (qes76m6)

    The Parameter value I use for my time stamp is: 

    @http://seeburger.com/xi/common/dtSubject & "_" & GetDateTime("ddMMyyyyHHmmss")

    1. Former Member

      I am reading the ASMA prameter value by (i.e. in @http://sap.com/xi/XI/System/SOAP/XHeaderName1 ) and i am getting value as ABC.z.TXT as Header value,  so after adding the timestamp i am getting the value as

      ABC.z.TXT19052017113922

      I want to remove .TXT extension coming from ASMA prameter value in ID only and want to concat timestamp & .TXT to it like below :

      ABC.z19052017113922.TXT

      Any suggestions?

       

      Thank you

      Rohit

  2. There are many such parameters supported by AttribMapper. Its good to see such examples making the topic more useful. Thanks Gerry.

  3. Unknown User (104odowcd)

    Hi Prateek,

    I have exactly opposite scenario (AS2 to File) and needs to populate file name in dynamic configuration. Please note that I am not using Seeburger AS2 adapter here but AS2 adapter provided by a company know and itelligence. I need to populate key "http://sap.com/xi/XI/System/File", "FileName", but since AS2 adapter does not have this key in dynamic configuration, I am getting error "Values in a DynamicConfiguration must not be null". Is there something similar to AttribMapper in File adapter that I can use to map sender file name to receiver file name?

    Thanks,
    Netrey

  4. Former Member

     

    Hi Prateek,

    Currently i am working on Interface, flow is:  External system(AS2) -->XI-->ECC(SFTP)

    External system is sending the PDF file with Delivery no(Delivery no will vary file to file) as filename, same file we need to place in ECC application directory. PI will just manage the file transfer(no ESR).

    Can you please help me, how to place the same file name (Source filename) in target directory.

    Thanks,

    MP Reddy

  5. Hi Prateek,

    I have a scenario with AS2 (Seeburger)(sender) to file (receiver). I added the attribmapper module on the receiving file adapter and configured to use ASMA and ticked File Name, but I get following error when receiving:

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------

    MP: processing local module localejbs/Seeburger/AttribMapper

    Exception caught by adapter framework: Object not found in lookup of AttribMapper.

    Transmitting the message to endpoint <local> using connection AS2_http://seeburger.com/xi failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.services.jndi.persistent.exceptions720.NameNotFoundException: Object not found in lookup of AttribMapper.

    -------------------------------------------------------------------------------------------------------------------------------------------------------------

    If I open the message in monitoring I see that there is a file name in message attribute dtAS2FileName:

     dtAS2FileName     http://seeburger.com/xi/AS2     image.jpg

    Is the configuration correct?