cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping pricing conditions cond_a

Former Member
0 Kudos

I am working on sending pricing condition records from SAP to XI - idoc (cond_a) to flat file scenario.

In the mapping, on the source side, there is segment - E1KOMG (Occurence - 0..1) that is mapped to - UpdateInsertKOMG (Occurence - 0..Unbounded) on the right (target).

Right now we get one KOMG record in the flat file. We need two KOMG records in the flat file.

I was told to modify the UpdateInsertKOMG on the right (target) to accomplish this.

How to accomplish this?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

In the mapping, on the source side, there is segment - E1KOMG (Occurence - 0..1) that is mapped to - UpdateInsertKOMG (Occurence - 0..Unbounded) on the right (target).

hi, as i can see in your exmaple, you will alwasy receive one KOMG record coz the ocurrance is 0.1. if you need to receive more segments of E1KOMG you have two possibilities:

1-change the ocurrance of the segment to 0.N

2-change the ocurrance of the field into the segment E1KOMG to 0.n.

by the way before change anything, how many segment of E1KOMG do you receive in the source structure? could you post and example of the source structure??

Former Member
0 Kudos

Hello,

1-change the ocurrance of the segment to 0.N

If I want to use this approach, how do I change the occurance from 0 to N.

In the source I will always have one segment of KOMG and mulitple KONP.

Thanks.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

1-change the ocurrance of the segment to 0.N

If I want to use this approach, how do I change the occurance from 0 to N.

the abap team has to do this

In the source I will always have one segment of KOMG and mulitple KONP.

you need all the values of KONP in the file?

for exmaple this is your structure:

<IDOC>

-


<E1KOMG>0.1

-


<KONP>0.n

-


<KONP>123

-


<KONP>aasd

-


<KONP>gtr

-


</E1KOMG

</IDOC>

the file should be

XXXX,XXX,123,aasd,gtr

something like that? actually you have the structure of the IDoc as my example and you only get one value into the file??

if that is true, you need to modify your mapping like:

KONP-->targetsegment --> doing this you will create at target side many segments as KONP values you receive

KONP>splitByValue(eachValue)->targetfield -->many field in the target segments as KONP values.

Former Member
0 Kudos

I am still working on it. Will let you know if successful. Thanks for your great responses!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Brent.

Try this.

Right click on node E1KOMG - target - you select duplicate node and you can see two nodes.

Former Member
0 Kudos

Also change the target structure to cater the no of occurences of the segment on the source side.

Regards,

Vishal

Former Member
0 Kudos

As suggested by Luis, I don't see duplicate nodes anywhere.

If I right click on E1KOMG on source, I get - Where used, Copy path and Dependencies

If I right click on UpdateInsertKOMG on right (target), I get - Copy path, Create template based on mapping and Dependencies.

Also as suggested by Vishal how do I change the target structure to cater the no of occurences of the segment on the source side?

Former Member
0 Kudos

Hi.

Do you map this new node?

Former Member
0 Kudos

Sorry, I was in Display mode. In Edit mode, I have the following options on Target side -

Duplicate subtree

Add variables

Disable field

Copy path

Show suitable templates

Create template based on mapping

Dependencies

Former Member
0 Kudos

Hi.

Choose duplicated subtree . and map this new node.