on 10-22-2013 1:57 PM
Dear Experts,
I'm having the most weird and basic errors in mapping. I am doing a 1:n Idoc scenario in PI 7.31 single stack. I am checking an RFC lookup from the source record values and if the lookup value is blank, then suppressing the root node of the idoc. However, the mapping is behaving weirdly where in, the child element values in the idoc are getting filled from the 1st record in source file.
So basically it is like: if my source file has total 20 records, and only one of those 20 records is valid and should create only one idoc in target then the values are getting populated from the first record of the source file and not from the actual record which was valid.
I have tried to suppress the root idoc node using multiple options like createif, ifwithoutelse keeping suppress values and ifwithoutelse but failed with all options.
Regards
Varun
Sorry guys.. False alarm
I was using a lookup and while populating, the source lookup value I was doing a toUpperCase, but not while retrieving. And this screwed things up.
Regards
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Varun,
Try using an UDF instead of standard function. In the UDF try comparing the value returned by the lookup and then forward a boolean output (true, false) to creatIf function. I think the standard function you are using are unable to capture the blank output. The sample UDF is shown below
public String defaultVal(String a, Container container) throws StreamTransformationException{
if(a==null || a.length()==0 || a.equals(""))
{
return false ;
}
return true;
}
lookup value----->UDF----->creatif---->root node
Secondly if possible could you please show a snapshot of the mapping. Since I would like to know how child element values are getting populated?
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
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.