cancel
Showing results for 
Search instead for 
Did you mean: 

Idoc to File -- Records will depend on repetition of particular segment.

Former Member
0 Kudos

Hi Experts,

Iam doing a Idoc to file scenario.

Based on the sales organization(VKORG),i need to create the multiple records in the file.

For example :

E1MARAM 0..Unbounded

|

|E1MARMM 0..Unbounded

|

E1MARMM

|

E1MARMM

|

E1MARMM

|

<b> E1MVKEM 0..Unbounded

|

E1MVKEM</b>

When E1MVKEM-VKORG = Z200 then i need to create a file with 4 records (for 4 E1MARAM segments 4 records will be created)

When one more E1MVKEM-VKORG = Z201 present then we need to create 4 more records for Z201 in the same file.

So now i will be getting a single file with 8 records.

Please suggest me how to approach these kind of scenario.

PS: we are not using BPM in our scenario.

Thank You.

Regards

Seema.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

DONE

Former Member
0 Kudos

hi,

u need to wirte userdefined function and along with it you use nodefunctions

Former Member
0 Kudos

Hi Sreeram,

Will you Please elaborate on the UDF and the Node functions on how to approach.

I have used the function <b>oneasmany</b> but the output is coming only for the first VKORG with 4 values in the file and it is not taking for the second VKORG value.

So finally for 4 E1MARMM records and for 2 MVKEM-VKORG values, the output is generating only 4 records (VKORG = Z200) instead of 8 records( 4 for Z200 and 4 for Z201).

Please suggest how to approach by using UDF and Nodefunctions.

Regards

Seema.

Former Member
0 Kudos

Hey seema,

This can be achieved using node function <b>createif</b>.

Refer this link which help you doing the same

http://help.sap.com/saphelp_nw04/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/frameset.htm

and also refer stefan's blog

/people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool

Hope it helps you

Regards,

Ramesh P