cancel
Showing results for 
Search instead for 
Did you mean: 

fie to idoc content conversion

rohit_goel
Participant
0 Kudos

I am working on file to idic scenario.

file has four types of lines :

Begin of file.(0..1)

header.(0...unbounded)

items.(0....unbounded)

end of file.(0..1)

each line has a element Record type and some other elements.for header record type is A , for item its B , for Begin of file its C and for end of file its D.

we have to check for every line that it should have record type as one of these four and if not so we have to send a mail through alert functionality.we have to send a mail which has all errors by checking the whole file for record types.we have to ignore these lines in the file and proceed with the rest.

is it possible with content conversion to convert falt file to xml structure and check this validation...???

if no can u pls give tell me hoiw to develop module for doint his and if u can pls give some sample code for that...

regards,

rohit

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

By using file content parameters its possible follow this links

/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping

/people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi

vijay_b4
Active Contributor
0 Kudos

Hi Rohit,

while doing content conversion you have to mention the field names in header of data type.fieldNames. hence if the key field is not present it will throw an error in adapter monitoring, FIELD NOT FOUND.

Then about the other query mapping cannot be performed with a flat file as XI understands only XML.hence content conversion required.

The official help is at http://help.sap.com/saphelp_erp2005/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

The parameters: NameA.fieldFixedLengths

, NameA.fieldFixedType

, NameA.fieldNames

, NameA.keyFieldValue

, etc should be useful to you.

Check this weblog, I found it very useful:

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

Reward points if this helps

Regards

Vani.

Former Member
0 Kudos

Hi,

Please find the below links

Reward points if needful.

Thanks,

RamuV