cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Issue

Former Member
0 Kudos

Hi

i was doing file to Idoc mapping

File strutue contains the FileInfo and Header Info under Header info i have Patient info and GL info ..

In the FileFile Info comes onle ones ..

The structure look like this...

FileInfo

Identifier

date

HeaderInfo

Identifier

Date

ID

Subnode underHeaderinfo

PatientInfo

Identifier

ID

GLinfo

Identifier

ID

i want to crate the IDoc per Header Info ..

My idoc struture is look like this:

IDOC

ZEFILE 0..1 ( should map in to File info)

ZEHeaderINfo 0..1 (should map it to HeaderInfo)

-


>Under ZEHeaderinfo I have

ZEPATINfo 0..unbound ( Map it ot Patinfo)

ZEGLinfo 0..Unbound ( Map it to GLInfo)

I want to create the IDOC per Headerinfo From file ...

The problem i am facing i am not able to read the File info in to Idoc for the Second headerinfo..

I

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi SV,

Once you've set the occurrence of the IDOC to 0..unbounded, you can use this mapping for ZEFILE

FileInfo --> useOneAsMany --> splitByValue:EachValue --> ZEFILE

HeaderInfo

HeadreInfo

This should solve the problem of the ZEFILE node not being populated on instances of FileInfo that is greater than 1

Regards

Former Member
0 Kudos

Hi

When i tried that Its giving me the follwing error:

Cannot create target element /ZACC_GL_POSTING01/IDOC[2]/ZE1IDXHEADERINFO. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD

Answers (3)

Answers (3)

Former Member
0 Kudos

Solved

Former Member
0 Kudos

how can u solve this issue ?

Edited by: wongyu jung on Feb 16, 2009 2:00 PM

Former Member
0 Kudos

By using Java Mapping I solved the issue

Former Member
0 Kudos

for file info to repeat in every idoc,better try the below mapping.


Header info ----------\
                       Test---->Split By Value[Each value]-->tgt1
Identifier------------/


Header info ----------\
                       Test---->Split By Value[Each value]-->tgt2
Identifier------------/

tgt1 and tgt2 refer to node under ZEFILE where identifier and date shud be mapped.


public void Test(String[] a,String[] b,ResultList result,Container container)
{
  //write your code here
 for (int i=0; i<a.length;i++)
{
     result.addValue(b[0]);
}
}

Former Member
0 Kudos

Hi,

The occurance of IDOC node is 1..1 You need make it as Unbounded and then have to map the HeaderInfo node to the IDOC.

It will allow you to create the multiple IDOCs.

Refer the steps

Thanks

Swarup

Former Member
0 Kudos

Hi Swarup

Its creating the multiple idocs but in the second Idoc File info is not repeating..

i wanna get the file info in every Idoc ....but in the file File info occurs only once...