on 04-20-2007 1:19 PM
Hi All,
Scenario is : IDOC to File
Name of the file to be created at receiver is sent in an IDOC that is, a field in IDOC contains file name. And the requirement is , this file name should be copied in the message mapping to the corresponding adapter specific message attribute.
I have a field ' filename ' in IDOC but <b>target structure does not contain any such field/element to map with.</b>
So without having a field ' filename' in target structure is there any way to achieve the requirement.
Your suggestions, clues are welcome.
Thanks.
Hi Mughda,
yes this is possible......just create a UDF in which you use dynamicconfiguration to set filename property......in UDF take input your idoc -> filename field.....in UDF, assign the filename property this input argument.......in mapping, take source filename field.....send it to UDF......take output of UDF to the topmost node of your target struc..........in ID, check the apdapter specific attributes and then check the filename attribute.......then your filename will be generated according to the filename field of your source idoc.
Thanks,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If you dont need to write that field in your file, in content conversion use the following
FileName.fieldFixedLengths -- 0
FileName.fixedLengthTooShortHandling --Cut
So that file name is omitted.make sure you should create this field in datatype as the last field.
Cheers
Tiger Woods
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the target structure just create another node & field for FileName.perform mapping from Idoc field to target field file name.So that in your target structure you are able to get the filename.
In your receiver file communication channel in Filename give as %filename%.txt and choose variable substiution, here give the refrence of payload like
payload:Message Type Name,1,FileName,1,FileName,1
Now you would be able to see your generated file with the name of your idoc field value.
Cheers
Tiger Woods
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
You can do it in UDF to create the dynamic file name.
see the below links
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
Regards
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.