cancel
Showing results for 
Search instead for 
Did you mean: 

segment to idoc..

Former Member
0 Kudos

Hello all,

I am working on the scenario where i need to mapp a segment to idoc.

means if i am having 10 segments then 10 idocs should get created.

If there are 10 EDP10 segments in the inbound IDOC then we need to create 10 outbound Delins IDOCs, each with 1 EDP10 segment.

I have to display the header part from other segment with each idoc created.

Please explain in detail.

Thanks for all your help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

for segment and begin u hv to map constants.

Former Member
0 Kudos

thanks.. I will try with that.

Answers (4)

Answers (4)

Former Member
0 Kudos

Solved

Former Member
0 Kudos

Hi,

Hope u hv already posted the same question

what is ur problem nw?did u try the solution provided?

Former Member
0 Kudos

Hey ,

i have posted it previously, but i am still not getting the exact steps.

Actully i am not getting the exact results. it is creating the multiple segments but not idocs.

I am using segment ->remove context->splitvalue->collapse context->idoc.

what's wrong? also what i have to mapp for segment and begin for other idoc segments.

thanks for your reply.

Former Member
0 Kudos

The other solution is working fine 4r me ya..

Former Member
0 Kudos

Hello,

Are you using ABAP or graphic mapping?

Regards,

Radek

Former Member
0 Kudos

Hey thanks for your reply.

I am using Graphical mapping.

Former Member
0 Kudos

hey do you have any information of this???

Former Member
0 Kudos

Hi,

For segment map constant value "1" and for begin just blank constant.

To avoid problems try mapping just EDP10 -> IDOC without any changes in contexts.

Regards,

Radek

Former Member
0 Kudos

Ok.. i will verify that to.. thanks alot

Former Member
0 Kudos

Hey i am getting below error..

Compilation of MMTest successful Cannot produce target element /ZFIDCCP01/IDOC[2]/EDI_DC40. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

Former Member
0 Kudos

if i am having 10 segments then 10 idocs should get created.

-->

segment(set context one level up) --->IDoc...provided that you are using IDoc XSD wherein occurrence of IDoc node is set to 0..unbounded

I have to display the header part from other segment with each idoc created.

--->

if you want produce it in each occurrence of IDoc, then you will have to use useOneAsMany node function.. for more on the function refer

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

Former Member
0 Kudos

Hello Mugdha,

thanks for your reply.

But it didnt work.

if i am having 10 segments then 10 idocs should get created.

-->

segment(set context one level up) --->IDoc...provided that you are using IDoc XSD wherein occurrence of IDoc node is set to 0..unbounded

It is giving me error,

Cannot produce target element /ns0:Messages/ns0:Message1/DELFOR01/IDOC[2]/EDI_DC40. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

I have mapped the segment and begin to constant.

Please let me know if you have any solution.

Former Member
0 Kudos

Hi siddhesh,

Try the below logics...

It will working fine for me in Orders IDOC.

If you have a Multiple E1EDPO1 for each E1EDPO1 need to create a

Each IDOC.

and also Each IDOC have Only one E1EDPO1.

But Header segments Like EIEDKO1 comes only one time.

This also should be enable each IDOC in the Receiver.

First for Multiple IDOC:

E1EDPO1Remove ContextSplitByValue(Each)Collapse ContextIDOC

Second for enable each E1EDPO1 for each IDOC:

E1EDPO1SplitByValue(Each)E1EDPO1

other elements need to simple map.

Like..

Posex--Posex

Action--Action

Third For header need to use Each IDOC:

EIEDKO1(Context IDOC) ---

E1EDPO1(Change the context to IDOC)---UseOneAsMany-E1EDKO1

E1EDPO1 ---

Other elements also need to map like above.

Consider the field ACTION

ACTION(Context IDOC) ---

E1EDPO1(Change the context to IDOC)---UseOneAsMany-ACTION

E1EDPO1 ---

In useoneasmany we need to keep first and second node context should be same.

Regards,

Prakasu

Former Member
0 Kudos

Cannot produce target element /ns0:Messages/ns0:Message1/DELFOR01/IDOC[2]/EDI_DC40.

--->

As IDOC[2] is produced, that mapping works fine..

The error clearly mentions exact location.. node EDI_DC40 is having error.. you can disable this segment by right clicking on it...IDoc adapter will fill the necessary data..of course if you dont want it to be filled by payload.