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: 

How to submit standard Tcode using Submit with variant?

svasi_08
Participant
0 Kudos
2,753

when i try to call report program Inside the Tcode its throwing error.

SUBMIT ZREPORT via selection-set 'Variant1'.

it throws error as vairant1 doesnt exists.

when I check this Report its been used in many tcodes.

So I am looking at PT_BAL00 Tcode. When I try to enter the Report inside PT_BAL00 i am getting no entry in table T52MENU for SE93.

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos
854

Transaction code PT_BAL00 is a report transaction which calls selection screen 1000 of RPMENUSTART00. Actually screen 1000 doesn't exist but this code is executed:

PERFORM get_smodn
     USING sy-tcode
  CHANGING lv_smodn.* get the name of the report from T596F+T77CCE_PRG_PRGCE+T77S0
CALL FUNCTION 'HRCCE_GET_REPORTNAME'
  EXPORTING
    smodn      = lv_smodn
  IMPORTING
    reportname = lv_reportname.
* get the variant for the report
PERFORM  get_start_variant
      USING sy-tcode
            lv_reportname
   CHANGING lv_stvar.
IF lv_stvar IS INITIAL.
  SUBMIT (lv_reportname) VIA SELECTION-SCREEN.           "#EC CI_SUBMIT
ELSE.
  SUBMIT (lv_reportname) VIA SELECTION-SCREEN            "#EC CI_SUBMIT
                         USING SELECTION-SET lv_stvar.
ENDIF.

So it's obvious that RPMENUSTART00 calls another program with a start variant.

Just debug a little bit, the code is very simple to understand!

5 REPLIES 5

FredericGirod
Active Contributor
0 Kudos
854

Could you copy/past your exact statement ? because it is SUBMIT ... USING SELECTION-SET ... not via

0 Kudos
854

Thank you for the response

submit RPMENUSTART00 using SELECTION-SET 'VARIANT1' EXPORTING LIST TO MEMORY AND RETURN.

0 Kudos
854

Do you have SAP HR System or PT_BAL00 in your System, just execute PT_BAL00 and Program insider it?

program should throw error.

Sandra_Rossi
Active Contributor
0 Kudos
855

Transaction code PT_BAL00 is a report transaction which calls selection screen 1000 of RPMENUSTART00. Actually screen 1000 doesn't exist but this code is executed:

PERFORM get_smodn
     USING sy-tcode
  CHANGING lv_smodn.* get the name of the report from T596F+T77CCE_PRG_PRGCE+T77S0
CALL FUNCTION 'HRCCE_GET_REPORTNAME'
  EXPORTING
    smodn      = lv_smodn
  IMPORTING
    reportname = lv_reportname.
* get the variant for the report
PERFORM  get_start_variant
      USING sy-tcode
            lv_reportname
   CHANGING lv_stvar.
IF lv_stvar IS INITIAL.
  SUBMIT (lv_reportname) VIA SELECTION-SCREEN.           "#EC CI_SUBMIT
ELSE.
  SUBMIT (lv_reportname) VIA SELECTION-SCREEN            "#EC CI_SUBMIT
                         USING SELECTION-SET lv_stvar.
ENDIF.

So it's obvious that RPMENUSTART00 calls another program with a start variant.

Just debug a little bit, the code is very simple to understand!

0 Kudos
854

Thank you Sandra I am searching for you thread and you delivered me the answer 🙂

I got the answer about to post it, RPTBAL00 is the answer

submit RPTBAL00 using SELECTION-SET 'VARIANT1' EXPORTINGLIST TO MEMORY AND RETURN.
ok I am able to do that submit working with Variant. Thank you very much