Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Native Sql Syntax similar to For All Entries

Former Member
0 Likes
951

Hi Experts,

I have a requirement to compare SAP Data with Other External Oracle Database & Show it in a ALV Report.

Using Oracle Native Sql i am extracting the data based on SAP data, by looping each SAP record

As the Looping each record & Native Sql is Leading to Performance issue.

Can we have For All entries kind of thing in Oracle Native Sql, if so please send me Syntax.

Please help .

Regards,

Vinay Rao

Hi Experts,

I have a requirement to compare SAP Data with Other External Oracle Database & Show it in a ALV Report.

Using Oracle Native Sql i am extracting the data based on SAP data, by looping each SAP record

As the Looping each record & Native Sql is Leading to Performance issue.

Can we have For All entries kind of thing in Oracle Native Sql, if so please send me Syntax.

Please help .

Regards,

Vinay Rao

2 REPLIES 2
Read only

Former Member
0 Likes
537

Hi Vinay,

Sorry but for all entries are not supported by Native SQL.

We would required to loop at all the records in SAP R/3 and get corresponding data from ORACLE data base.

Also you can go through the link http://scn.sap.com/thread/1875746

Regards,

Piyush

Read only

Arun_Prabhu_K
Active Contributor
0 Likes
537

Hi Vinay,

     I am afraid you don't have option like FOR ALL ENTRIES in Oracle native sql.

     You can make use of field-symbols for faster internal table processing.

     Once you have both SAP table data and External DB table data in separate internal tables, sort them. Then compare the data by making use of read statement with BINARY SEARCH for faster comparison.

     The above process will be very best.

For instance,

sort : isap_ztable,iora_ztable.

loop at isap_ztable ASSIGNING <fs_sap>.

       read table iora_ztable ASSIGNING <fs_ora> with key zfield = <fs_sap>-zfield BINARY SEARCH.

       if sy-subrc = 0.

         if <fs_ora> NE <fs_sap>.

               "DATA DIFFERS

          endif

        endif.

endloop.

Regards.