on 12-02-2010 9:17 AM
Hi Experts,
I am using mail to proxy scenario.
The mail box is having differnt files suppose:
BOOKING_REF_DELIVERYNO_WB.pdf
BOOKING_REF_SALESORDER_WB.PDF
BOOKING_REF_CUSDECNO_WB.PDF
DELIVERYNO_WB.pdf
SALESORDER_WB.PDF
CUSDECNO_WB.PDF
BOOKING_REF_WB.pdf
-
BOOKING_REF_DELIVERYNO_BOLCOPY.PDF
BOOKING_REF_SALESORDER_BOLCOPY.PDF
BOOKING_REF_CUSDECNO_BOLCOPY.PDF
BOOKING_REF_BOLCOPY.PDF
DELIEVERYNO_BOLCOPY.PDF
CUSDECNO_BOLCOPY.PDF
SALESORDER_BOLCOPY.PDF
-
BOOKING_REF_AWB.PDF*
DELIVERYNO_AWB.PDF
SALESORDER_AWB.PDF
CUSDECNO_AWB.PDF
-
Depending upon the file name in the mail box, the file needs to be attached via proxy with particular code:(x for case 1, y for case 2 , z for case 3)..for attachment abap code wrtiiten for proxy.
how to compare the file name from the mail?
DO i need to write a UDF..mapped with filename field of the sender XSD?How to do that?
Please suggest.
Thanks,
Sushama
Hi,
in your target msg structure, create a field for filename........in msg mapping, fill this field by a UDF and getting source filename by using DynamicConfiguration.....then in proxy implementation, just see the filename and use the code which needs to be invoked using if then else statements.........
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
create a UDF and use below code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
String strFileName = conf.get(key);
return strFileName;
and map this UDF to target field for filename........
You can use the other UDF
public String Get_Input_File_Name(Container container) throws StreamTransformationException
{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = conf.get(key);
return SourceFileName;
}
the previous one was for XI 3.0 , may be some differnt requiement I am not sure.
http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
regards
Ninad
I am using mail to proxy scenario.
how to compare the file name from the mail?
What is the scenario exactly? Is it FILE to PROXY or MAIL to PROXY?
I have no idea if ASMA parameter of FILE Adapter (FileName) going to help in case of MAIL to PROXY Scenario.
Depending upon the file name in the mail box, the file needs to be attached via proxy with particular code:(x for case 1, y for case 2 , z for case 3)..for attachment abap code wrtiiten for proxy.
DO i need to write a UDF..mapped with filename field of the sender XSD?How to do that?
Check Stefan's reply and Salil's code from this thread:
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.