cancel
Showing results for 
Search instead for 
Did you mean: 

How to pick the flat file without key field,field fixed lengths, size of the file in sap pi 7.5

0 Kudos

Hello Experts,

We have flat file without any key field value, field fixed length and size of the file. Have to pick the file using file adapter and then have to split the data, need to map different nodes to IDOC in SAP.

Currently we are using SAP PI 7.5 single stack.

Here is the file:

000007A030102=AA2=AC2=AD1=AF456789=AG1=AH0=AI20181206=AJ20190116 13:46:41=AN1=APGM=AR701,662=RE2345 (Header with set of fields and occurrence 0..1)
000007A030400 (Header field, occurrence 0..1)
000007A030501 (Header field , occurrence 0..1)
000007A030201=AA956=AB2=AC129=AD1=AE1=AF10000=AG10=AI739=AL19=AM95=BE20190116 13:48:10=BF20190116 13:48:10 (Line item with set of fields, occurrence 0..unbounded)
000007A030600 (Header filed , occurrence 0..1).

Thanks in advance for your response.

Regards,

Spandana Sree.

Accepted Solutions (1)

Accepted Solutions (1)

apu_das2
Active Contributor
0 Kudos

If there is no such recommendable pattern or key in the data, then you need to use UDF/JAVA mapping to read the complete data and map to the target staructure.

Answers (3)

Answers (3)

0 Kudos

Hi All,

Thanks for response.

It's done with UDFs.

Created 2 message mappings:

--> one for picking the file from server in single row and then mapped to structure(our actual source structure) by splitting the data.

--> second for source structure to IDOC.

Thanks,

Sree.

former_member207703
Active Participant
0 Kudos

Hi,

Read whole message in a Java Mapping and based on length of each lines you can segregate the lines belongs to which Record type. After that a simple for loop will do your work.

Then use a simple GM to map it with Idoc as creating Idoc with Java Mapping is a painful task. 🙂

apu_das2
Active Contributor
0 Kudos

If there is no such recommendable pattern or key in the data, then you need to use UDF/JAVA mapping to read the complete data and map to the target staructure.