cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Requirement

former_member621323
Participant
0 Kudos

Hi All,

I have a requirement for IDoc to JDBS scenario.

my tables structure is like this...

P_Sales_Price

-> dbTableName

-> action

-> table

-> access

<filed1> </filed>

............................

<flieldn> </filedn>

Now, in the source IDoc, when for an article there are multiple E1WBB07 segment for the same article then the source structure where E1WBB07 field KSCHL = VKA0 should take priority over source structure where E1WBB07 field KSCHL = VKP0, means I need to pass data of E1WBB07 segment to table when KSCHL = VKA0.

How can I achieve this?

Thnx in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

From your post what i can understand is

the Idoc will have multiple segment E1WBB07 for a single artice and you need to pass the segment which have E1WBB07- KSCHL = VKA0

This should be very easy.

Use "IFWithoutElse" fucntion and check if KSCHL = VKA0 .

this will ensure you sending only E1WBB07 with KSCHL = VKA0.

if there are no segment with KSCHL = VKA0.. the target will be supressed,

former_member621323
Participant
0 Kudos

Hi,

thnx fot the reply...

but when there is single segment....with VKP0. then how to achieve?

Former Member
0 Kudos

Hi,

>

> thnx fot the reply...

>

> but when there is single segment....with VKP0. then how to achieve?

it's depend on requirement, check with business what they waint

1) Pass blank to target?

2) Supresse the target field

3) Fail the message in PI

for option1,  use function "IF" and in the else part pass blank.

for option2,  as i said use function "IFWithOutElse" target field will be supressed


for option3,   use function "FWithOutElse" and make the target field mandatory.

former_member621323
Participant
0 Kudos

Hi,

I guess you are thinking it as too much simple. I have to populate the table structure based on the no of E1WBB07, i.e. based on E1WBB07, structure P_Sales_price will be populated 1st then the field under that. Now, there is already many checkin are present there. question is how PI can check multiple segment? If single segment is there then no problem, it will populate whatever KSCHL value is there but if multiple, PI have to filter out KSCHL = VKP0.

The logic is like below

Where there is more than one segment <E1WBB07>, select segment where <KSCHL> = VKAO and ignore <E1WBB07> segment where <KSCHL> = VKPO

Thnx..

Former Member
0 Kudos

Where there is more than one segment <E1WBB07>, select segment where <KSCHL> = VKAO and ignore <E1WBB07> segment where <KSCHL> = VKPO

do header mapping to populate P_Sales_price table like as follow if ther e are multiple segments.

IF E1WBB07-KSCHL = 'VKAO' Then Create Segment P_Sales_price.., This logic would populates receiver structure If there is single E1WBB07 segment with Value VKAO and multiple segments with both values. Use remove context to get desired output when there are multiple segments.

is your requirment to populate target structure if KSCHL = VKP0 and no VKAO values? If yes, then use ELSE part in above condition.

Cheers

Veera

Former Member
0 Kudos

Hi .. yes this is simple PI mapping.

you have to map the node structure P_Sales_price with what i have suggested.

the elements under this P_Sales_price node will be automatically populated with corresponding values ofsegment <E1WBB07>, where <KSCHL> = VKAO. This is the fundamental concept of PI.

Just give it a try and let me know what u r getting.