on 01-12-2012 8:27 PM
Hi
I am working on idoc - file scenario. I need to get the idoc number as file name in the receiver side? How could it be done ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi sekhar,
As per my knowledge that is very simple by using u201CVariable Substitution conceptu201D
You requiremet is target file will be created on header info(idoc number )
Please refer below links:
For ex:
Step3 in below link
http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
and
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6a316af5a23672e10000000a114a6b/frameset.htm
thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sekhar,
Use the below code :
public String putDynamicConfiguration(String docnum, Container container) throws StreamTransformationException{
try
{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String filename = "Prefix_" + docnum + ".txt";
conf.put(key, filename);
return docnum;
}
catch (Exception e)
{
return docnum;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You may go for any one of the following approaches:
1. Enable variable substitution in the File receiver channel. Search SDN for details.
2. Use Dynamic Substitution to set the file name via Message Mapping and then use ASMA (Adapter Specific Message Attributes) to set the receiver file name accordingly in the FIle receiver channel. Search on SDN for details.
Hope this helps.
Regards, Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to use Dynamic Configuration to set the file name dynamically in your mapping. In your receiver Communication Channel, on the Advanced tab, mark the Use Adapter-Specific Message Attributes and File Name checkboxes. Please refer to this help if you need further information about it:
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/content.htm
Then create a user-defined function in your graphical message mapping, with the following code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = a;
return SourceFileName;
The "a" here is the importing parameter of the user-defined function. Map IDoc number to this function to have the parameter set.
Hope this solves your problem,
Grzegorz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I guess you are looking for this
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6a316af5a23672e10000000a114a6b/frameset.htm
Thanks...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.