on 02-04-2011 5:53 AM
Hi,
In my scenario target side in header level i am passing all the values are fixed values and line item vaues are getting from the source data.how to write udf for this scenario.It should be graphical mapping.
Please help to me
please reply fast
Thanks&Regards
Swathi
Edited by: SWATHIP on Feb 4, 2011 7:16 AM
Hi Swathip,
You can use graphical mappping.
You map constant values to the header fields at target side. After that map item level fields one to one as per your mapping logic from source field to target field.
Regards,
Nayan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The Heading of your post and the Content in the post are confusing..
Shall we know what is your exact requirement?
Are you looking for in the target file, Header will be in XML format and Details in Fixed lenght?
or something else?
Babu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1) If your values are numerical you can use the "FormatNum" function under Arithmetic Functions.
This will help you fix the length of the number and even the decimal part.
2) If you want to fix the length of field which is of type string, you can try the following code:
public String setLength(String var1, String var2, Container container) throws StreamTransformationException
{
/* var1 will have the String Value, in var2 pass a constant integer of fixed length you want */
int len = Integer.parseInt(var2);
String rslt = var1;
if( var1.length() < len)
{
for(int i = var1.length(); i < len; i++)
{
rslt = rslt + " "; // appending space
}
}
else
{
rslt = rslt.substring(0,var1.length - 1)l
}
return rslt;
}
regards,
Aravind
Edited by: ajnayak on Feb 7, 2011 7:25 AM
Hi ,
in the target file, Header will be in XML format and Details in Fixed lenght.
This is not possible with simple FILE Receiver Adapter.
Since the target file has both XML and also FCC, its difficult to achieve.
You should write a adapter module for this. Please check in SDN you will get lot of materials for the same..
Babu
Hi Aravind,
thanks for ur response
My Requirement is what ever the data in header it will be in xml as a target side and what ever the data in detail that is in fixed length file both in same file
My scenario idoc-jms
<REMOVED AS REQUESTED>
Edited by: Prateek Raj Srivastava on Feb 17, 2011 12:49 AM
Hi,
your requirement was not clear for me before.
1) For you requirement as said by Babu You need to develop Adapter module.
2) The file structure as mentioned by you wont be a valid xml structure.
For developing adapter module refer:
regards,
Aravind
Hi Swathi,
For your requirement, there is no need of UDF.
Map the header fields with Constants.
Map the line item fields with the source.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.