on 07-17-2014 8:02 PM
I’ve created an abap proxy with a small schema containing PO and PO_Line with an attachment that is a zipped PDF file (.zip).
I have configured a File adapter with the payloadswapbean to place the attached .zip file in an FTP folder. Now I need to dynamically name the .zip file using the proxy payload values.
<PONUM>_ <POLine>.zip
Variable Substitution takes place after the payload has been swapped so I am not able to use that. How can I take my proxy XML payload and dynamically create the file name? I have tried DynamicConfigurationBean but it seems to come back null when trying to read the XI FileName:
Write http://sap.com/xi/XI/System/XI FileName I have flagged the Adapter Specific Message Attributes for FileName.
What options do I have?
Hi George,
You can use Dynamic Configuration UDF code to set ASMA FileName parameter for FTP in message mapping program. Search SDN for UDF code
Use the below UDF between source proxy field having filename and target top most node
try{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(KEY_FILENAME, var1); //var1 from proxy payload field
}
catch(Exception e){//Do some action if required}
return "1";
Regards,
Praveen Gujjeti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Praveen / Abhradeep! Used the UDF to set the ASMA filename and it worked just fine. This was the first time our shop used this function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi George,
Don't go for Variable substitution.
Use Dynamic configuration as suggested by Praveen and make sure you are calling the module in right sequence of manner.
/A.B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
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.