cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to file mapping problem

Former Member
0 Kudos

I have IDOC to file scenario....

I have a single message type segment in the receiver Message type.

My receiver Message type looks like

DT_SHIP

-- Head

-- first Segment10

-- Second segment10 (Contains same fields as the first segment)

-- Segment20

-- Segment30

-- Tail

Here we have a field in the IDOC named FLAG.When ever it gets a value X we should fill the first segment10 along with the second segment 10.

If we dont get the field then continue with the Second Segment10..

either of the cases second segment10 should be filled.....

what should we do now...is there any UDF or condition used to fill the first segment and second segment based on condition......here if we want ,we can delete the secondsegment10 and go with one....if only one segment10 suffice our requirement...

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Harsha,

You can check with the link:

You can do the same through the context objects also(if both the data types have one common field.):

Follow the steps:

In IR:

1.> Create 1 source and 1 target data types. And create a context object related to the common field.

2.> Create Message types.

3.> Create Interface types and in the outbound interface use that context object.

4.> Create Message Mapping

5.> Create Interface mapping

In ID:

1.> Create configuration scenario

2.> Create Bussiness service

3.> 1 sender commuincation channel, 2 Receiver communication channels

4.> sender agreement

5.> interface determination mention the condition for interface mapping related to the context object.

6.> Receiver agreement

7.> receiver determination

just check with the links:

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

Regards,

Nutan

sunil_singh13
Active Contributor
0 Kudos

Hi Harsha,

No need of UDF, this can be handled using graphical mapping.

As in both the case you have to pass Second segment10, so no nedd to do anything special here.

For first Segment10 use following logic

Constant[X]->equals->fieldInWhich[X]isComing->ifWithoutElse->first Segment10

Reward Points If Helpful

Thanks

Sunil Singh

Former Member
0 Kudos

Hi ,

thaks for ur replys...

here i have 16 fields in each segment..I mean in the first egment 10 and the second segment 10......if i get X as an input to FLAG field,how will i map all the other feilds in first segment 10......I mean based on this we need to fill the first segment fields .....so....how ?

Edited by: Harsha reddy on Aug 21, 2008 6:53 AM

Former Member
0 Kudos

HI,

You can use the Graphical Boolean APIs IF to achieve this.

IDOC--> flag -> if (equals "X") then--> Map to first Segment10

Same with all the fields in first Segment10 In any case you have to map the Second segment10 so no need of any logics...

No need of any UDFs also

Thanks

swarup

Former Member
0 Kudos

hi hrasha,

you can achieve this by using combination of boolean and node functions...

for second segement u can go ahead with direct mapping as you are checking for condition in either case.

regards.