cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC --- XI ---- IDOC

Former Member
0 Kudos

Hi Experts,

I am working on a scenario SQL Database -


XI -


SAP(IDOC)

Iam using JDBC as Sender Adapter and IDOC as Receiver Adapter,

Through JDBC iam getting the records from the SQL D/B and iam sending the data to R/3.

1) Now how can i limit the number of records to be fetched for one polling.

2) Suppose if it gets 5 records at a time,now i must map one record to one idoc?how can i do this?

Please help me regarding this.

Regards

Srinivas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

2) Suppose if it gets 5 records at a time,now i must map one record to one idoc?how can i do this?

I have just implemented this following Michal's blog, it works just fine.

Basically you:

- export the IDOC to XSD

- change the occurance of the IDOC-element to unbounded

- import the XSD as en external definition

- Use the external definition in your message mapping

- Use the original IDOC everywhere else but the mapping (as interface)

You cannot change the target message type to 0..unbounded. This will not create several separate IDOCS, just several IDOCS in the same message.

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

The "trick" is with changing the IDOC occurance 0...unbound. Just refer the above michal's bolg and change the occurrance of IDOC. After changing the occurrance you will get the same number of IDOCs equalent to incoming records.

Regards,

Sarvesh

Former Member
0 Kudos

Hi,

Restricting the number of records should be done using Select statement.Check SQL statements for SQL DB for this functionality

1) This has to be captured to Source Interface (For DB) using row (0.. unbound)

2) Map this node (0 .. unbound) to (0..unbound) node of IDOC and do rest of the mapping as per bussiness requirement

regards

srinivas

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Mapping In scenario follow

Make Source Data Type Structure in format

Example

DT_Source

-Row Occurrence 0...unbounded

--EMPName 1

--AGE 1

In Message Mapping

Change Target Message Type occurrence to 0...unbounded.

Now Map Row --->MT_REC(Receiver Message Type) 0...unbounded.

Test Your Mapping Using Duplicate Field Row

Other Field Map according to your Business Requirement

Former Member
0 Kudos

you can use ROWCOUNT / ROWNUM if it is Oracle.

Former Member
0 Kudos

Try using SELECT..UPTO n rows

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

To limit Rows use this thread