cancel
Showing results for 
Search instead for 
Did you mean: 

AS2 FileName with date

former_member188015
Participant
0 Kudos

Hi Experts,

There is an Scenario .  IDOC Sender Adapter --- PI ---- AS2 Receiver adapter.

File name Format : <Filename_MMDDYY_Sequence>.

I used AtrribuMapper module to get  Filename which is static and our client confimed that received succssfully.

My query is how should I achive date and sequence.

Thanks in advace.

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Srinivasa,

I'm thinking that you could use dynamic configuration + variable substitution for this purpose:

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=272171407

http://wiki.sdn.sap.com/wiki/display/XI/Combining+three+different+aspects+of+PI+in+one+shot

*I have not seen the AS2 adapter but if you could retrieve the file name, may be you could use patterns like the file adapter

Regards.

Answers (2)

Answers (2)

former_member184681
Active Contributor
0 Kudos

Hi,

I think using Dynamic Configuration could be a good idea. Have a look at this thread, it provides you with an example code for the UDF that sets the file name: . However, in your case it would get a little bit more complicated, since you need to provide the strfilename variable in the code with some value, containing the constant part, current date and the sequence number, which is my biggest concern here. How would you get the sequence number? As a starting point, you can have a look at this blog by : Sequence Numbers and Counters: Stuck in a world of Workarounds? and especially the first comment by Bhavesh Kantilal saying that seeburger gives you the counter functionality out of the box. You might want to search more on this topic.


By the way, thanks Iñaki for mentioning my Wiki. Although it is related to file adapter, I hope it explains the idea behind the DC quite well. Just bear in mind that DC and VS are two separate things that in most cases aren't used together (I think you might have confused it with DC + ASMA, that are used in many adapters).

Regards,

Greg

zameerf
Contributor
0 Kudos

Yes, you can check for the UDF provided by Jaideep Baid and then try to access the dtAS2FileName at receiver AS2 adapter using DynamicConfigurationBean module.

http://help.sap.com/saphelp_nw04/helpdata/en/45/da2239feb22e98e10000000a155369/content.htm

For the sequence part you can very well use the Seeburger Mapping Variables via UDF again.


But first try to achieve the FileName with Date alone, if it works then sequence number would not be an issue.

-Zameer

zameerf
Contributor
0 Kudos

Hi,

Did you try using DynamicConfigurationBean module?