on 12-15-2008 5:45 AM
Hi,
I am having IDoc -> File Scenario.
I just want to create a separate folder depends on Vendor Code and dump the files in that folder.
Am using Shell script here.
I just want to pass the LIFNR values dynamically.
Is there any way??
Please help me..
regards,
kanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kanda,
You should be able to use Variable Substitution or Adapter-Specific Message Attributes, but passing
the value to the script may not work the way you might expect.
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
Variable Substitution will depend on an exact path, but itu2019s not xpath. For example:
Var Name | Reference
-------------------------------------------------------
vendor | payload:ORDERS05,1,IDOC,1,E1EDKA1,3,LIFNR,1
You can then use %vendor% in the target directory: /tmp/%vendor%
One potential issue with this approach is that LIFNR may not always be in the 3rd E1EDKA1 segment.
You can also use Adapter-Specific Message Attributes and set the directory name in your map.
https://www.sdn.sap.com/irj/scn/thread?forumID=44&threadID=108738&messageID=1211235#1211235
The UDF code to set the directory will look slightly different than the thread and blogs listed in the link above:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
conf.put(key, yourTargetDir);
Iu2019m not sure what your script is doing, but I donu2019t think you can pass the vendor variable to the OS
command directly. However, if you use one of the methods above, you can pass the full file name using
the %F variable. The %F variable will include the directory and filename so the vendor will be part of it.
Your script will need to parse the input string to extract the vendor value. If you just need the script to
create the dir, then you should be able to select u201CCreate Target Directoryu201D in the File Adapter.
Thanks,
-Russ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.