cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: Dynamic file name substitution in receiver SOAP Axis adapter

former_member189440
Participant
0 Kudos

Hi,

My scenario was when i am sending one idoc from R3 based upon some field name like idoc number i need the populate the field name as receiver xml name in the soap axis adapter.Can you please let me know how we can get this.

Points will be awarded for right solution and suggestions.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Uday

What I understand is that if you get BELNR with a value 123456 then you need to create the xml file with name BELNR.XML.

I understand that BELNR is constant but the name need to be created only when the value is present in the field (correct me if I am wrong)

Based on above understanding following is the solution:

You need to enable ASMA parameters in your receiver soap adapter. then use following code in UDF to name the outgoing file, take the value of BELNR as one of the input to the udf

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

if(valueOf(BELNR)==123456)
  dynamicconfiguration.put(key, "BELNR");/

former_member189440
Participant
0 Kudos

Hi Nirmal,

basically the belnr will be unique and it wil be different for different idocs and coming to next point here i use soap adapter in transfer protocol as  HTTP axis and msg protocol as axis , so in receiver we don't have ASMA.so i need the place the soap resposne  in particluar folder with belnr.xml(12345.xml)

Former Member
0 Kudos

Dear Uday

I suggest ylu use java mapping (sax parser). Here you can access the tag name and use it to create the filename using dynamic configuration code I provided.

peter_wallner2
Active Contributor
0 Kudos

Hello Arun Kumar,

Were you able to solve this issue? I am facing a similar issue, trying to use Axis Receiver channel and writing a specific file name into Dynamic configuration.

Thank you for your reply,

Peter

Former Member
0 Kudos

Hi Arun,

When u r tryin to use a web service at receiver side it will not be file.

R u thinking of constructing a dynamic URL?

former_member184681
Active Contributor
0 Kudos

Hi,

This can be achieved with Dynamic Configuration. Find similar threads with solution of identical problem here:

http://scn.sap.com/thread/991417

http://scn.sap.com/thread/2026946

Hope this helps,
Greg

former_member189440
Participant
0 Kudos

My requirement was when idoc was populating the belnr number as 12345, then i need to send the mapped xml to a path with the name of belnr.xml

ex

:

belnr as 123456 which comes from idoc

and the mesg will be put in the below url as

https://edi.sap.xxx.xom/masterdata/otc/123456.xml

and our receiver was soap adapter with tp as http axis.and sender adapter was idoc.

Points will be awarded.