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

Scripts in ABAP

Former Member
0 Likes
578

Hello gurus!

I have a question about scripts in ABAP. We have a program that requires a lot of queries to obtain info from oracle; we already have a functional version of it but we need to upgrade and this means we have to write a lot more of queries in ABAP. Is there a way to import a script to put in a variable an execute it in ABAP to avoid all this code writing?.

Regards IA

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
543

Hi Armando,

if You want to use already programed Oracle SQL Queries in ABAP with no neccessity to recode them into Open SQL (SQL in ABAP), You can probably use [Native SQL|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3b8b358411d1829f0000e829fbfe/content.htm]. This can be done using [EXEC SQL statement|http://help.sap.com/abapdocu_70/en/ABAPEXEC_CURSOR.htm].

Regards,

Adrian

4 REPLIES 4
Read only

MartinMaruskin
Active Contributor
0 Likes
543

Hi Armando, what you mean by scripts? It is PL SQL scripts of DB? Or just SELECT statements that need to be executed in ABAP environment?

If it is 2nd case you can program SELECTs in ABAP dynamically. In this way you can dynamically create FROM value INTO value and WHERE conditions as well.

To see an example take a look into ABAP report: zbc402_demo_dyn_select

BR

m./

Read only

Former Member
0 Likes
543

You can create dynamic sql queries in abap.

Read only

Former Member
0 Likes
544

Hi Armando,

if You want to use already programed Oracle SQL Queries in ABAP with no neccessity to recode them into Open SQL (SQL in ABAP), You can probably use [Native SQL|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3b8b358411d1829f0000e829fbfe/content.htm]. This can be done using [EXEC SQL statement|http://help.sap.com/abapdocu_70/en/ABAPEXEC_CURSOR.htm].

Regards,

Adrian

Read only

Former Member
0 Likes
543

Hi everyone,

As every1 know Medruck is a script for PO generation.The standard print program available for it is a subroutine pool. For our customization purposes we copy it to a zname and then use it. But being a subroutine pool you cannot execute it. So could you tell me how to debug that program? Also how to debug the script?