on 09-17-2007 3:33 PM
Hi!
I am building a solution to write out tagged / XML IDOCs to a file adapter. I am using variable substitution to build the file name to include the message type, sending partner etc... in the target directory and filename.
Is there a way to wildcard nodes in the variable substitution? For example:
<i>Currently</i>
payload:WMMBID01,1,IDOC,1,EDI_DC40,1,RCVPRN,1
<i>Desired</i>
payload:*,1,IDOC,1,EDI_DC40,1,RCVPRN,1
where * is any wildcard.
Reason is that we have multiple IDOC types and I want to avoid having to create multiple communication channels.
Help appreciate and rewarded. Many thanks, Duncan.
Hi Duncan,
could you write a custom adapter module to solve your problem,
/people/francesco.bersani/blog/2007/03/27/rename-attachment-adapter-module
Best Regards,
Niki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matias
Thanks for the reply. I am not running any mapping in this process. I am simply mining the IDOCs as they are delivered from the SAP backend system. Unfortunately, anything that needs to be done during mapping is not an option.
Thanks, Duncan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Duncan !
Maybe you can use the interface name to include the name of the idoc type, and then use variable substitution with : message:interface_name to get that info and build your target filename..I think you will need to take that info from the message header instead of the payload, and create message header object names according to your need..it is a shame that idoc xml structure does not have a common root tagname...
Other interesting link (does not need mapping)
/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean
Regards,
Matias
Hi Duncan !
By mapping...I mean using XI mapping, NO R/3 mapping...just in case..it is very easy..you could also export the IDOC xsd imported from R/3 in repository, add a common root tag and the import it to repository as inbound message type, then map all fields automatically (because all have same names) and use that artificial "root" node for variable substitution.
Regards,
Matias.
Hi Duncan !
You can create the desired target filename and target directory by using dynamic configuration via java UDF in mapping. This allows you to create a target filename and/or directory based on a string..then you could use only one comm channel.
to access info:
// access dynamic configuration
DynamicConfiguration conf = (DynamicConfiguration) param.get(
StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","<b>FileName</b>");
// read value
String Filename = conf.get(KEY_FILENAME);
// to write value:
conf.put(KEY_FILENAME, "MyNewFileName");
Regards,
Matias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.