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

Steps for creating T.code for SAP Query

Former Member
0 Likes
626

Hi Friends,

I have developed and SAP Query through SQ01, i want to assign an T.code for that.

What are the steps we have to do in SE93.

Regards

Kumar M

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
593

Hi

Create a report pgm with the following code & create a T.Code for this pgm in se93.

data: gv_test type sy-repid.

DATA: GV_USERGROUP TYPE AQADEF-BGNAME VALUE 'FI',
      GV_QUERY TYPE AQADEF-QUNAME VALUE 'ZCON_FI_QUERY',
      GV_RNAME TYPE AQADEF-PGNAME .

CALL FUNCTION 'RSAQ_REPORT_NAME'
  EXPORTING
    WORKSPACE        = ''
    USERGROUP        = GV_USERGROUP
    QUERY            = GV_QUERY
 IMPORTING
   REPORTNAME       = GV_RNAME
          .
* For the dynamic excution of the called query assisgn GV_RNAME to <gv_test>.
gv_test = GV_RNAME.
submit (gv_test) via selection-screen and return.

5 REPLIES 5
Read only

Former Member
0 Likes
594

Hi

Create a report pgm with the following code & create a T.Code for this pgm in se93.

data: gv_test type sy-repid.

DATA: GV_USERGROUP TYPE AQADEF-BGNAME VALUE 'FI',
      GV_QUERY TYPE AQADEF-QUNAME VALUE 'ZCON_FI_QUERY',
      GV_RNAME TYPE AQADEF-PGNAME .

CALL FUNCTION 'RSAQ_REPORT_NAME'
  EXPORTING
    WORKSPACE        = ''
    USERGROUP        = GV_USERGROUP
    QUERY            = GV_QUERY
 IMPORTING
   REPORTNAME       = GV_RNAME
          .
* For the dynamic excution of the called query assisgn GV_RNAME to <gv_test>.
gv_test = GV_RNAME.
submit (gv_test) via selection-screen and return.

Read only

Former Member
0 Likes
593

for that you have to choose the option Parameter Transaction,

after giving the description,

in the default value section, give the transaction code as START_REPORT, check skip initial screen

check all the Gui related check boxes.

D_SREPOVARI-REPORTTYPE = AQ

D_SREPOVARI-REPORT = User group

D_SREPOVARI-EXTDREPORT = Query name

Read only

0 Likes
593

Hi Vijay Babu,

I have tryed , but its giving me an error "The User Group 'XXXX' has not yet been created".

Regards

Kumar M

Edited by: mukesh kumar on Nov 3, 2008 10:17 AM

Read only

Former Member
0 Likes
593

"1)In menu bar click on Query>More Functions>Generate Program

"2)Then, in menu bar click on Query>More Functions>Display report name

"3)Copy the program name.

"4)Go to SE93, create Tcode for report with selection screen option and enter the above copied report name.

Read only

Former Member
0 Likes
593

Thanks for the replies