cancel
Showing results for 
Search instead for 
Did you mean: 

mapping FLAT File to Idoc

Former Member
0 Kudos

Hi,

I have to implement a flatfile --> XI ---> IDOC scenario and I have a question about the mapping.

Suppose I have a Flat Fiel as following with the first 2columns as key:

100991;001;text1;posting date

100991;002;text2;posting date

100992;001;text4;posting date

100992;002;text6;posting date

I have to pass this items to a IDOC strucutured with header and positions.

By mapping how can I group key data to pass to single Idoc?

Thanks

marco

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Please help me understand your requirment. For the given set of input; you will create 2 idocs?

One for

100991;001;text1;posting date

100991;002;text2;posting date

and the second for :

100992;001;text4;posting date

100992;002;text6;posting date

Please correct if i am wrong ?

Former Member
0 Kudos

Hi Puneet,

Yes for the example indicated I have to cerate two Idoc..

thank You

Marco

Former Member
0 Kudos

Hi ,

You could use " Split By Value Change " function on each of the field and achieve the result , Considering the other side you have a IDOC structure to map I think using Graphical Mapping is a better option .

Thanks & Regards

Kavitha

Former Member
0 Kudos

For Abap Mapping take a look here:

http://www.riyaz.net/blog/sap-pi-abap-mapping-simplified/technology/sap/837/

@Kavitha Golagani: How can he map father-sons association into idoc structure with graphical mapping?

Former Member
0 Kudos

Hi ,

I have done it with ORDERS IDOC Structure .

Since the source is a flat file you could take a simple structure with row and all the fields following it ( say filed1 , field2, field3).

Take a bottom up approach for the child :

Change the context of all the individual fields to the root then apply split by value on field3 ( this introduces context changes )

Then format its parents Queue (Field2) based on Field3 Queue for this use the function Format By Example .

Use the resulting queue as one of the argument and Field1 to generate the link .

Using Graphical this requirement is achievable . How ever it is upto your ease to choose which way you want to do it .

Thanks & Regards

Kavitha

Former Member
0 Kudos

Thanks for your information Kavitha,

but I'm not very expert in PI Mapping and for me its not very claire how I have to do to solve this question..

please could you explane me more details of this procedure?

thank you

Marco

Former Member
0 Kudos

Hi Marco,

You donu2019t need to be an expert to close this one , just try it out

As you have to generate multiple IDOCs , change the IDOC XSD if it is not done yet

100991 u2013 Field 1

01 Field 2

text1 Field 3

Once your are done with FCC the data should appear in the above fields ( say ) then map the Field1 to the IDOC Header after using the split by value change function to it .

Follow the further steps as I have mentioned above . Let us know how it progressed .

Thanks & Regards

Kavitha

Former Member
0 Kudos

Hi Marco,

You can use a Java Mapping or a Abap Mapping, to group raw by key.

c you by an italian member

Former Member
0 Kudos

Thank you,

but coud you tell me some instructions to use in ABAP MAPPING to group rows?

do you have some examples?

ciao

Marco