cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC number should be passed with Time stamp

Former Member
0 Kudos

Here the scenario is IDOC to File.

Currently I am getting the date and time stamp but I want to pass the IDOC number after the torr_asn_20080522-010137-257.txt

torr_asn_?_20080522-010137-257.txt

Here in place of question mark I want to pass the IDOC number and how to pass

Let me know quickly as the issue is very urgent.

Points will be awarded.

Accepted Solutions (0)

Answers (5)

Answers (5)

vijay_b4
Active Contributor
0 Kudos

try this

dynamicConfiguration.put(keyDir,outputpath);

Reward points if this helps

Regards

Pragathi

vijay_b4
Active Contributor
0 Kudos

Hi Arjya,

If your requirement is to create , the file name dynamically for your receiver file adapter, you can do so using your FILE ADAPTER CONFIGURATION itself, and need not go for any JAVA Mappping / Java Code at all.

*The dynamic filename generation concept is as follows.8

In your filename field in the receiver file adapter, just give a variable with % symbols. (eg: %file% ).

Now, under the option Variable Name Substitution, you can give how the value has to be created.

It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.

For the former, your give

message:interface_name ,etc

and for the payload part you give,

Payload: "your element root which u wanna acecss"

Just check this link out,

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

And read the contents under variable substitution and it will help you understand the concepts better.

Also, in your FILE Adapter under the option FILE CREATION MODE, you have options like,

1.Add Counter,

2. Append

3. Create

4. Add Time Stamp

Reward points if this helps

Regards

Pragathi.

vijay_b4
Active Contributor
0 Kudos

HI Arjya,

You want to change the File name dynamically?

If so you can acheive this by enabling the Set Adapter specific message attribute in Communication Channel.

Reward points if this helps

Regards

Pragathi.

Former Member
0 Kudos

hi,

U need to make use of UDF here.....

thanks,

Madhu

Former Member
0 Kudos

you can achieve this by adapter specific message attributes in receiver file adapter

you can develop UDF as

pass IDOC number from EDI_DC segment to this UDF

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

here write a logic to concatenate torr_asn_ and Doc number(input parameter of UDF)

save in string and pass the final string to statement below

conf.put(key,final_string);

return final_String;

Map it root node of target.