on 02-12-2019 3:26 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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. 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.