cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC to IDoc (ORDERS05) IDoc

jwalithtatikonda2
Participant
0 Kudos

Hi,

My scenario is JDBC (from 2 tables) to single IDoc ORDERS05.

There are 2 source tables , HEAD, ROW. For every row in HEAD I need to create one Sales order through IDoc in R3.

I am doing inner join on HEAD, ROW and say for example I am getting the following rows:

HEAD.ID ROW.ITEM

1 ABC

1 XYZ

1 PQR

2 ABC

2 JKL

3 IOP

Now for each unique HEAD.ID, I need to map to ORDERS05 IDoc. ( In our example I need to create 3 orders).

How do i do this?

And also, I need to map only (ABC,XYZ,PQR) in the first occurrence of ORDERS05, then (ABC,JKL) in the second occurrence and (IOP) in the third occurence.

Could you please help me, how to do this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Now for each unique HEAD.ID, I need to map to ORDERS05 IDoc. ( In our example I need to create 3 orders).

How do i do this?

-->write a UDF on HEAD.ID field to strip duplicates and map this to IDOC header.

your UDF shd take 1,1,1,2,2,3, and give you 1,2,3.

And also, I need to map only (ABC,XYZ,PQR) in the first occurrence of ORDERS05, then (ABC,JKL) in the second occurrence and (IOP) in the third occurence.

Could you please help me, how to do this?

-->you can use the same UDF in remaining fields. use IF statement and check with the UDF output to the HEAD.ID