cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to JDBC- calling a stored proc for every field in a segment.

Former Member
0 Kudos

Hello experts,

I have a IDOC to JDBC scenario using one stored proc. The issue is- all the fields in a particular segment (ZE2LTETK) of idoc should go to a target field (TEXT) of the stored procedure in multiple calls i.e.; if the segment has 44 fields, the stored proc should be called 44 times every time taking one value from each field of the segment ZE2LTETK. and mapping with TEXT field of the procedure.

One way is to replicate the structure of the stored proc at the target side as many times as the number of fields present under the idoc segment and direct-map the segment fields to TEXT one by one. But this would lead to a huge data type at the target side.

Another approach can be UDF but i'm not sure how to implement it.

Please guide me with the best solution to achieve this.

Thanks !

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi.

You can call stored procedure only one time and save the results in a variable.

http://scn.sap.com/people/gabrielsagayaselvam.panneerselvam/blog/2011/05/05/jdbc-lookup-optimization

Regards.

Lucho