on 07-18-2017 10:53 AM
Dear All,
The PO environment is quite new for me.
I have created receiving communiction channel which uses SAP_XI_IDOC/IDOCXmlToFlatConvertor module, here is the configuration
and it is working fine. Then I wanted to specify filename based on the content of the IDoc, for instance:
And here is the problem, cause as I think the module
SAP_XI_IDOC/IDOCXmlToFlatConvertor is executed before, and the XML IDoc is already converted to Flat IDoc, and then the variable subsitution is not working, is there any workaround for this to?
Best regards,
Artur
Hi Artur,
Yes you are right . The module execution takes place before your variable substitution hence you are getting error.
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj,
Thanks for suggestions. I consider to create process integration scenario like below.
1. the document will be write into filesystem with desired name using variable substition,
2. Then using another channel will be transformed into Flat IDocs and send to the provider.
What do you think?
Best regards,
Artur
Hi Manoj,
Yesterday I have been trying to figure your solution out, and I think I have got it.
I have created MM, as a source and target message I have selected the same IDoc message, then from the source I dragged DOCNUM, MESTYP, RCVPRN and as a target only DOCNUM, and in the middle I have put UDF like below. It is working perfectly 🙂
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey keyFileName = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
String fileName = mestyp + "_" + rcvprn + "_" + docnum + "_" + ".idoc";
conf.put(keyFileName, fileName);
return docnum;
Let me know if you have any suggestions to my solution, as I mentioned PO is something new for me, and honestly it is my first MM and UDF 😉
Best regards,
Artur
Hi Artur ,
This looks perfect just make sure you have all IDOC fields are mapped 1:1 as there should not be any change in data . The only reason for going to MM is to set Dynamic UDF for File Name.
Take whatever input fields you need like DOCNUM, MESTYP, RCVPRN and perform the UDF . The above UDF looks perfect and map the output of the UDF to root note i.e "IDOC " in target structure.
And also make sure you enable " Adapter Specific Message Attributes " with Filename in receiver channel.
And the test end to end .
Br,
Manoj
Hi Manoj,
Yes, I have mapped all fields 1:1 using the button "Map Selected Fields and Substructures if names are identical"
I already test it and it is working like I wanted, but instead of mapping it to root node "IDOC" I mapped it do DOCNUM, cause in the UDF I am taking as a arguments DOCNUM, MESTYP, RCVPRN, and I am returing the DOCNUM (unchangeD), so actually it is like 1:1 mapping for DOCNUM.
Best regards,
Artur
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.