on 03-16-2016 11:43 AM
Hi
I have an xml file with 10 records. The structure has Record with header and five elements in that.
The first 4 records are of header information and want to delete or ignore from the mapping.
I can think of doing this in premapping before actual mapping as it is too complicated to do in original mapping.
Any udf or idea please?
Example structure where the first few records always comes with header information.
- <Record>
<Delivery>LIKP-VBELN</Delivery>
<Container>Z</Container>
<ProductNo>LIPS-MATN</ProductNo>
<HUNumberC>V51VE-EXIDV</HUNumberC>
<HUNumberV />
<Batch>LTAP-CHARG</Batch>
</Record>
Regards
Sam
Hi Sam,
You can use below UDF.
Execution Type : All Values Of Context
public void ignoreFirstRows(String[] input, ResultList result, Container container) throws StreamTransformationException {
for (int i = 0; i < input.length; i++) {
if (i < 4)
result.addSuppress();
else
result.addValue(input[i]);
}
}
Regards,
Praveen.
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.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.