on 01-08-2008 9:16 AM
Hi,
I'm getting a CSV file from that i want to skip some records based on some validation.. for example:
I'm getting the following data :
EmpNo EmpName EmpDept
E101 ABC ABAP
E102 XYZ BW
E103 GFC XI
E104 BVM ABAP
E105 ASD BW
E106 YFC XI
SO, here where ever i'm getting EmpDept = XI .. i want to skip those all the records( that entire line i want to skip).. .. this can be possible through Message Mapping.. but i wnat to do this in the File Content Conversion.. how can we do this..
any helpful answers will appriciated..
Thanks
babu
This couldn't be achieved directly using FCC. Better to handle it in mapping.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do the regaular deisgn for this and only at the root level node of the sorce to the target right the IF Then condition....
EMPDept != XI then pass the source node to the target root node...this will filter the records that have XI value in it,.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Babu,
You can't have conditions in FCC, you have to do the validataions in Mapping itself.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
FCC is used to generate the XML structure so that XI can understood properly. You can not do any kind of validations or Skip the records based on Element value condition in FCC.
There are scenarios where you want to skip the lines that time you can use the below option in FCC but this is again not based on condition.
Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.
This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.
The best way to do is use the UDF:
Write an UDF on target root node.
take input in one context:
input a= Emp Dept:
for(i=o,i<a.length;i++)
{
if(a{i}.equals("X"))
{
result.addValue(SUPPRESS); this will supress the target root node if condition is equal to X
}
else
{
result.addValue("Constant"); this will generate the target root node.
}
}
Thnx
Chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.