cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc to JDBC scenario

Former Member
0 Kudos

Hi Gurus,

Hope you all are doing well. I am esigning an IDoc to JDBC scenario.

The IDOC structure ios as follows:

IDOC_name

IDOC

EDI_DC40

TABNAME

MANDT

DOCNUM

ARCKEY

SERIAL

E1COGH Occurs 0 to 99999 times

GROUPTYPE

GROUPNAME

E1COGHT Occurs 0 to 99 times

LANGU

DESCRIPT

E1COGHR Occurs 0 to 1 times

SNAME

PRTCLASS

E1COGS Occurs 0 to 99999 times

SUBGROUP

SUBGROUPSUFFIX

E1COGSR Occurs 0 to 1 times

PRTCLASS

LNAME

E1COGV Occurs 0 to 99999 times

FROMVALUE

TOVALUE

E1COGVT Occurs 0 to 99 times

LANGU

DESCRIPT

E1COGVR Occurs 0 to 1 times

PRTCLASS

LNAME

In the above structure, whenever E1COGV is present, E1COGS will be absent and vice versa.

When IDOC has E1COGV, data will be entered in one table while if IDOC has E1COGS data will be entered in another table.

I have created 1 message mapping having 2 JDBC statements.

I am using 'use one as many' function to repeat values under E1COGH node for each of the E1COGV/E1COGS nodes contained.

Problem is that values are showing as expected in the queue of the target field but when I am doing test mapping, the last statement does not have all the values.

For e.g. I have 3 E1COGH nodes containing 3 E1COGV nodes. Hence I should be having 3 statements corresponding to the 3 E1COGV nodes in which the main fields of E1COGH (For e.g. GROUPTYPE ..)

should repeated.

For the first two statements, replication is okay, but for the third statement, the repeating values are blank.

Can you please help me out to solve this scenario? Points will be awarded to the helpful replies.

regards

Debansu

Edited by: Debansu Sarkar on Jul 12, 2011 8:58 AM

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

use split by value after useoneAs many function.

Former Member
0 Kudos

If you have any If condition in the mapping (used the boolean If function), add a removeContext and splitByValue (each value) after the condition.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Thanks. The problem has been solved. I had to use UseOneAsMany alongwith Remove contexts.

regards

Debansu