cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC-IDOC :getting multiple segments of multiple rows with in one IDOC

Former Member
0 Kudos

Hi,

I am working on JDBC to IDOC scenario.

Is it possible to retreiv data from JDBC record by record instead of getting all records at once?

because of this, multiple records values are passing through segments in one IDOC which is not reuired. Instaed of that Each record needs to release one IDOC.

In RWB I see one message from JDBC with 3 records and there is one IDOC in which 3 subsegments are found.

If JDBC has one record then it SAP getting one IDOC which is okey but if there are more than 1 record then also it releasing one record with multiple segments which is not desirable.

I imported JDBC strcuture from DB and its occurance is

DT_Type

Row 0..unbound

..Filed1

..Field2

..fied3

IDOC has 1:1 but segments has 0..999 which is mapped to Filed2 and Field3 which are getting repeated.

Any suggetions?

Edited by: rajeev raj on Sep 3, 2009 4:58 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Raj,

You can read jdbc Data at once ,while mapping change the Occurence of Idoc 0 .... unbounded (Edit the Idoc occurence and Import using any XML ediotrs)Try mapping Record to idoc ,For every Record there will be One Idoc ,Map your Field1 Feidl2.. Occordingly to corresponding Segment get the Target Structure...

Hope This helps.

Thanks,

Madhu

Former Member
0 Kudos

HI,

I edited and reimported by changing IDOC occurance as 0..99999

when I do test in MM by creating dublicate node it showing 2 IDOCs:

In one IDOC iam getting all segments but in second IDOC iam not getting ZICTEXT segments..

MT_TYPE---1..1

-Row---0..1

-


Field1---0..1

-


Field2---0..1

-


Field3---0..1

-


Field4---0..1

ZIDOC

--IDOC

-


BEGIN

-


EDI_DC40

-


SEGMENT

-


EDIFOU

-


A

-


B

-


ZICTEXT---0..1

-


SEGMENT---REQUIRED

-


TEXTSEGMENT-----0..99

-


TEXT1---0..1

-


TEXT2---0..1

any idea how to get multiple IDOCs from multiple reocrds from JDBC?

Thanks

Rajeev

Former Member
0 Kudos

Hi for taht you need to change your logic in your message mapping to generated the nodes in the target.

you can try .use useofmany to duplicated values

Edited by: Luis Ortiz on Sep 3, 2009 10:35 AM

Former Member
0 Kudos

Hi,

I am unable to get dublicated segment and there values in the target structure in MM Test tab..where as original node values are populating

I mapped dublicated segment node with constant and mapped target field wiht source field.. this segment occurance is 1..1

IDOC

..E1EDK

..Seg1

....F1

....F2

..E1EDK2----1...1

....SEGMENT--Required

.....Field1----0..1

I dublicated E1EDK1 node and mapped as mentioned above: any idea?

Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

hi.

you can change the ocurrence for your IDOCs

Former Member
0 Kudos

Hi,

You mean to edit the IDOC occurance and reimport as a External defination?

Or

In Message Mapping signiture tab chance occurance from 1 to 0..Unbound?

Please suggest?

There is no other way to get one record every time instaed of retreiving multiple records from JDBC?

Thanks

Rajeev

Edited by: rajeev raj on Sep 3, 2009 5:07 PM

Former Member
0 Kudos

Yeah edit the IDOC and reimport.