cancel
Showing results for 
Search instead for 
Did you mean: 

Q? how to change filename of receiver adapter includeing payload attribute?

Former Member
0 Kudos

hi all.

our scenario is IDOC - XI - FILE.

IDOC is standard type .xml"

Despite of searching help library, just read about how to change using payload value.

How to change the filename using payload attribute?

Message was edited by: ChangSeop Song

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Chang,

In the scenario that you are trying, ID is an attribute of a complex element <shipment> and so i guess it should work. Do try it out and let us know if it works fine.

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

Did you have a look at this

/people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios

Here they take the file name from the source payload structure.

Regards,

Anirban.

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

You can create the file name dynamically from the payload of the receiver adapter as follows.

From the requirement you have stated, you want your file to be named as,

TPSDLS<shipmentid>.

For this, in the reciver file adapter, give your filename as <b>TPSDLS%var%</b> and under variable name substitution,

<b>var</b> --> <b>payload:IDOCTYPE,1,Shipments,1,ShipmentID,1</b>

here, var acts as your variable name and it first looks for IDOCTYPE and its first occurence, shipment and its first occurence and finally, shipmentID and its first occurence. There by generating the filename dynamically.

For more info on this, check the topic <b>variable substitution</b> under this link.

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

hope this helps,

let me know if you have any clarification,

regards,

bhavesh

Former Member
0 Kudos

Thanks Mr. bhavesh

Already, I thought the usage you said, but I test not yet.

Is it possbile?

I have been known that your way is only possbile for element level, not attribute tag.

regards.