Application Development 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: 

Problem in Abap query

Former Member
0 Kudos

hello friends ,

thnanks for ur reply...

iam doing a small prog to assign a tcode for abap query as looking to the answer in sdn by callling function moduel

rsaq_report_name. i got answer that create small program and call this function and submit it ..i did it but what ever the query name iam passing either it shows dumop by saying "report not found" or there is no output ..the following is the code of mine..pls is something wriong it correct it or pls give me a example to do it.. i wnat to assign tcode to this progam and run the abap query .............

DATA: FUN(45) TYPE C.

DATA:QUERYREPORT LIKE AQADEF-PGNAME.

  • get name of queryreport

CALL FUNCTION 'RSAQ_REPORT_NAME'

EXPORTING

WORKSPACE = 'G'

USERGROUP = 'ZSKNFGRP1234'

QUERY = 'QUE_SHAMEEK_01'

IMPORTING

REPORTNAME = QUERYREPORT

EXCEPTIONS

OTHERS = 0.

SUBMIT (QUERYREPORT)

VIA SELECTION-SCREEN

USING SELECTION-SET 'ZNPIL_SUBMIT'

  • USING SELECTION-SETS OF PROGRAM 'REPORT00'

AND RETURN.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Go to se38 and create a report program.

REPORT ztest.
DATA: FUN(45) TYPE C.
DATA:QUERYREPORT LIKE AQADEF-PGNAME.


* get name of queryreport
CALL FUNCTION 'RSAQ_REPORT_NAME'
EXPORTING
WORKSPACE = 'G'
USERGROUP = 'ZSKNFGRP1234'
QUERY = 'QUE_SHAMEEK_01'
IMPORTING
REPORTNAME = QUERYREPORT
EXCEPTIONS
OTHERS = 0.

SUBMIT (QUERYREPORT)
VIA SELECTION-SCREEN
USING SELECTION-SET 'ZNPIL_SUBMIT'
* USING SELECTION-SETS OF PROGRAM 'REPORT00'
AND RETURN.

Now go to se93 and assign tcode to this program.

2 REPLIES 2

Former Member
0 Kudos

Go to se38 and create a report program.

REPORT ztest.
DATA: FUN(45) TYPE C.
DATA:QUERYREPORT LIKE AQADEF-PGNAME.


* get name of queryreport
CALL FUNCTION 'RSAQ_REPORT_NAME'
EXPORTING
WORKSPACE = 'G'
USERGROUP = 'ZSKNFGRP1234'
QUERY = 'QUE_SHAMEEK_01'
IMPORTING
REPORTNAME = QUERYREPORT
EXCEPTIONS
OTHERS = 0.

SUBMIT (QUERYREPORT)
VIA SELECTION-SCREEN
USING SELECTION-SET 'ZNPIL_SUBMIT'
* USING SELECTION-SETS OF PROGRAM 'REPORT00'
AND RETURN.

Now go to se93 and assign tcode to this program.

Former Member
0 Kudos

Hi Farukh,

Your code looks Ok. But you have to make one small change to avoid short dump.

Please pass import parameter WORKSPACE = ' ' (Blank) inplave of 'G'. This will avoid you the short dump.

DATA: FUN(45) TYPE C.

DATA:QUERYREPORT LIKE AQADEF-PGNAME.

  • get name of queryreport

CALL FUNCTION 'RSAQ_REPORT_NAME'

EXPORTING

<b>WORKSPACE = ' ' </b>

USERGROUP = 'ZSKNFGRP1234'

QUERY = 'QUE_SHAMEEK_01'

IMPORTING

REPORTNAME = QUERYREPORT

EXCEPTIONS

OTHERS = 0.

SUBMIT (QUERYREPORT)

VIA SELECTION-SCREEN

USING SELECTION-SET 'ZNPIL_SUBMIT'

  • USING SELECTION-SETS OF PROGRAM 'REPORT00'

AND RETURN.

After this you are good to go and create Transaction code via SE93.

Hope this may help you.

Lanka