cancel
Showing results for 
Search instead for 
Did you mean: 

file sender content conversion

Former Member
0 Kudos

hello

I have a txt file sender content conversion in SAP PI.

I define in the content conversion 6 fields names(field1, field2, field3,field4,field5,field 6) but the fie that I am loading has only three field(field1,field2,field3). the file is still loading though there is a different in the structure between what I define in the PI to what is loading to the PI.

is there a way to send an error with out loading the file?

I read about the count function in the mapping. isnt there a build in function that suppose to load only the structure that is define?

Thanks

Kfir

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

You can use parameters:

NameA.missingLastfields error

NameA.additionalLastFields error

For some strange reason the default value in ignore, what does not really make sense.

Former Member
0 Kudos

Stefan

thanks for the reply.

didnt under stand where to use exactly this parameters

Kfir

stefan_grube
Active Contributor
0 Kudos

check online help for file content conversion, there you find the information.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

If your root node is example details. If details contains node Header and Header has 6 fields...

Then Header.missingLastFields values ignore or add or error.

similarly Header.additionalLastFields values ignore or add or error.

Refer step 12 on this link.. You get more ideas.

http://help.sap.com/saphelp_nwpi711/helpdata/en/44/6713ec3f914ddee10000000a1553f7/content.htm

Answers (1)

Answers (1)

former_member200962
Active Contributor
0 Kudos

If you define 6 fields and only 3 are present in the test file then you wont get an error (AFAIK)

However, if you define 3 fields and there are 6 present in the source file then you will get an error saying more number of parameters found.

isnt there a build in function that suppose to load only the structure that is define?

I dont think so....this may however be achieved using a custom adapter module.

Update:

Just remembered that SAP PI (7.1 and above) comes with inbuilt XML-validation function....check if that helps in your design.

Regards,

Abhishek.

Edited by: abhishek salvi on Dec 15, 2010 1:12 PM