Create tcode for sapquery and SAP reportpainter reports

Source: Internet
Author: User
Tags sap gui
1. Create tcode for SAP Query)

Http://www.saphow.com/html/17/n-17.html

SAP
Query

Create

Tcode

There are two ways,

Yes

Directly use the program name

Create

Tcode

, You can also create

Tcode

.

I. Create with a program name

Tcode

  1. Se93

    Enter the required

    TC

    Ode

    , Which must contain letters

    Y

    Or

    Z

    .

  2. Enter the description in

    Start object

    Select the second option on the page

    "Program and selection screen (Report
    Transaction )"

    .

  3. Input

    Query

    Program name, select

    GUI support

    Page card

    "Sap gui
    Windows"

    And save it.

PS

: Query

Query

Program name,

Sq01 → query → more functions → display report
Name

Create by program name

Transaction code is a very convenient method, but it has certain risks, because in different

System

Medium,

Two different

Query

The program names may be the same, and errors may occur when the program is transmitted in the system. (The program name generated by the target system may change after transmission, so this method is not recommended)

Se93

: Maintain the transaction code

Se93

: Select

Program and
Selection screen (Report transaction)

Se93

: In

Program

Field Input

Query

Corresponding program name

Ii. Create start_report with Parameters

Tcode

Use this method to create

Query

Of

Tcode

, Need to fill in

Query

Of

Usergroup

And

Queryname

And so on

3

Fields

And the corresponding relationship

.

  • D_SREPOVARI-REPORTTYPE

    :

    AQ

  • D_SREPOVARI-REPORT

    :

    Usergroup

    +

    Space

    (

    Usergroup

    Should be added with spaces

    12

    Bit

    )

    +


    G

    (

    G

    Should be

    13

    Bit,

    Representative

    Global

    Area

    )

  • D_SREPOVARI-EXTDREPORT

    :

    Queryname

If necessary, you can also specify the variant for the transaction code:

D_SREPOVARI-VARIANT

.

Se93

: Select

Transaction with parameters (parameter transaction)

In

Default values
For

Under the tab,

Transaction

Field Filling

"Start_report"

And select

"Skip initial
Screen"

.

 

Se93

:

Is

Query

Create

Tcode

 

2. Create a tcode for SAP reportpainter (grr1, grr2)
In this example, start_report is basically the same as tcode for query. The parameters in the last step are different,
  • D_SREPOVARI-REPORTTYPE

    :

    RW

  • D_SREPOVARI-REPORT

    :

    Name of the RP Report Group


  • D_SREPOVARI-EXTDREPORT

    :

    Null

 

 

3. You can also customize a program to implement the function similar to start_report. When creating a query tcode, call the custom program .*&---------------------------------------------------------------------*
* & Program name: z_callquery
* T-CODE: zcaq
* & Porgram type: report
* & Description: Call ABAP Query
*&------------------------------------------------------------------
* & Author: longxu
* & Date: 2010.04.01
* & Email: fangkailove@gmail.com
* & Blog: blog.gnolux.com
*&------------------------------------------------------------------
* & Function Spec No .:
* & Funciton Desc:
*&
*&-------------------------------------------------------------------
* & Modification log:
* & Version Date Author description change request
*&-----------------------------------------------------------
*&
*&-------------------------------------------------------------------
* & Refrence object:
* & Name type DESC
*&-------------------------------------------------------------
*&
*&-------------------------------------------------------------------

Report z_callquery.

Parameters:
L_bgrup like AQADEF-BGNAME,
L_quold like AQADEF-QUNAME.

Data: l_reptname like AQADEF-PGNAME.

Call function 'rsaq _ report_name'
Exporting
Workspace = 'G'
Usergroup = l_bgrup
Query = l_quold
Importing
Reportname = l_reptname.

If SY-SUBRC <> 0.
Stop.
Endif.

Call function 'rsaq _ submit_query_report '"or submit_report
Exporting
Queryreport = l_reptname
Variante =''
Exceptions
Only_with_variant = 1
Variant_not_exist = 2
Others = 3.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.