cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically selection of Message Subject in AS2 adapter. Urgent Help..!!

Former Member
0 Kudos

Hi All,

I need to send the message to partner by using AS2 adapter.

And i need to keep the Message Subject by taking dynamically from the payload message.

ie. Iam sending the Purchase Order to Partner and i need to pass OrderNO which is coming in one field of my strcture to the message subject.

How i can select dynamically the Orderno and pass into message subject of AS2 Receiver adapter??

In the Seeburger AS2adpter manual, they provide the answer by using module parameters like

http://seeburger.com/xi/common/dtsubject DYNSUBJECT

But i don't know how to put particular field into it.

Any idea abt this?

Regards

Deepthi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use Dynamic configuration for your requirement.

Regards,

Indira D

Former Member
0 Kudos

Hi Indira,

I know i need to use Dynamic configuration.

But how to use it with AS2 adapter?

Can you please breif me?

Thanks

Deepthi

Former Member
0 Kudos

I do not know how Seeburger's adapters deal with DC, but you could give a try with this :

DynamicConfiguration dynConf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey dynKey = DynamicConfigurationKey.create("http://seeburger.com/xi/common/dtsubject","DYNSUBJECT");

dynConf.put(dynKey,keyValue);

where keyValue would be a string storing the value you want to set DYNSUBJECT to ...

I'm assuming Seeburger's adapters feature the dynamic configuration as any other standard SAP XI adapters do

Rgds

Chris

Answers (1)

Answers (1)

varun_k
Contributor
0 Kudos

Hi Deepthi,

I think this would help you in configuring Dynamically selection of Message Subject.

Supported dynamic attributes are:

dtSubject – if the subject parameter is set in the XI message and the AS2 receiver channel is

configured to use all non-empty or subject attribute, it will be treated as the message subject

by the AS2 adapter;

dtAS2FileName – the name of the payload. This is an attribute of the Content-Disposition

header. With this AS2 is compatible with AS2 Filename Preservation draft.

dtAS2ContentType – for Example application/xml, depending on the payload type

To enable the usage of Dynamic Attributes, there is a special dedicated section in receiver channel.

Dynamic attributes are used if the “Use dynamic attributes” setting is checked in the receiver channel.

If the the setting “Use non-empty attributes” is not selected, all known attributes are used for

configuration if the attribute is present.

Mention Check boxes for these

Use dynamic Attributes

Subject

Dynamically set attributes override static channel attributes. Example: the subject attrib

in receiver channels overrides the channel attribute.

Here is an example how to set them. Channel tab “Module”->”Module Configuration”:

Module Key: 1

Parameter Name: http://seeburger.com/xi/common/dtsubject

Parameter Value: DYNSUBJECT

Message Subject: This subject will be compared with the subject in the received message. This is used to find the correct channel for the inbound message.

Wildcards are allowed.

Regards,

Varun Reddy.K

Former Member
0 Kudos

Hi Varun,

I already saw the same matter in manual.But still i have doubt how to implement it.

For example, If we are sending the Purchase Order to Partner and we need to pass OrderNO which is coming in one of the field of my structure to the message subject.

Take below as the struture of my payload.

PURCHASEORDER

HEADER

ORDERNUMBER

I need to pass ORDERNUMBER dynamically every time to the Message subject of AS2 Receiver Channel.

In the Seeburger AS2adpter manual, they provided to use Module parameters

Parameter Name Parameter Value

http://seeburger.com/xi/common/dtsubject DYNSUBJECT

In this case what's the Module Name we need to use?

How can we pass the XPath (like PURCHSEORDER.HEADER.ORDERNUMBER) or value of ORDERNUMBER in the Module Parameters?

We could not find much information about these in the manuals.

Appreciate your help in this case. It’s a bit urgent for us.

Regards

Deepthi.

Former Member
0 Kudos

Hi Deepthi,

Have you ever solved this problem?

Former Member
0 Kudos

Yes.

Chiristopher answer helped me.I used this UDF.

DynamicConfiguration dynConf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey dynKey = DynamicConfigurationKey.create("http://seeburger.com/xi/common/dtsubject","DYNSUBJECT");

dynConf.put(dynKey,keyValue);

where keyValue would be a string storing the value you want to set DYNSUBJECT to ...

Thanks

Deepthi

Former Member
0 Kudos

Hi Deepthi,

But what did you use for the module name in the module chain/sequence ?