cancel
Showing results for 
Search instead for 
Did you mean: 

Seeburger AS2 Adapter - Dynamic Attributes

0 Kudos

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

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 , 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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Bobby,

How you got this resolved. Did you put the udf in mapping ?

Regards

Ravijeet

Former Member
0 Kudos

Hi Bobby,

I guess you are looking for the below udf , which you can map in your message mapping.

-


AbstractTrace trace;

java.util.Map map;

trace = container.getTrace();

try{

// To Retrieve the FileName from the AS2 Adapter

map = container.getTransformationParameters();

DynamicConfiguration conf = (DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey targetFile = DynamicConfigurationKey.create("http:/"+"/seeburger.com/xi/AS2","dtAS2FileName");

String targetFileName = Docnum + ".txt";

conf.put(targetFile, targetFileName);

}catch(Exception e)

{

trace.addWarning("Error");

}

return "";

-