cancel
Showing results for 
Search instead for 
Did you mean: 

one report with two transaction with different screen no.

Former Member
0 Kudos

hi all,

I have created a report with two transaction one as default screen 1000 and the other as 1001. But when i can the transaction with 1001 it is just coming out of the pgm.

help to that I have to execute the same program but with the little modification of second transaction

Regards,

Senthil

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi senthil,

THERE ARE 2 PROBLEMS :

1. The problem is

defining the tcodes

(in both give selection screen as 1000)

2. Secnd problem is while writing the program.

use screen numbers 2000 and 3000 (do not use 1000)

3. write if condition (as mentioned below)

Then it will work FANTASTIC.

4. see this code

REPORT abc.

SELECTION-SCREEN BEGIN OF SCREEN 2000.

PARAMETERS : a TYPE c.

SELECTION-SCREEN END OF SCREEN 2000.

SELECTION-SCREEN BEGIN OF SCREEN 3000.

PARAMETERS : b TYPE c.

SELECTION-SCREEN END OF SCREEN 3000.

IF sy-tcode = 'ZAMA01'.

CALL SELECTION-SCREEN 2000.

ENDIF.

IF sy-tcode = 'ZAMA02'.

CALL SELECTION-SCREEN 3000.

ENDIF.

Regards,

amit mittal.

Former Member
0 Kudos

Hi Suresh and amit,

Thank you very much It is working fine but as you told I have given 2000 and 300 but when we created tcode I left the screen no. as blank then only it is working fine.

thanks

senthil

Former Member
0 Kudos

Hi Senthil.

You can create two transaction codes for the same report ...

Let us see...

Your report name is Z_TEST. and created two tcodes like ztc1 and ztc2. When you execute ztc1 normal selection screen should be shown and when you execute ztc2 your own screen should be shown So do like this.

Report Z_test

parameter p(15).

initialization.

if sy-tcode <> 'ZTC1'.

call screen 100.

endif

Create ztc1 with reoprt transaction.

create ztc2 with dialog transaction with your own screen number.

Try out and see....Am i understanding your problem in right way?

Suresh B Mannem

Former Member
0 Kudos

Hi Suresh,

You are obsolutely right

But this the actual code of mine

*SELECTION-SCREEN BEGIN OF SCREEN 1000.

SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-bl1.

SELECT-OPTIONS : so_pspid FOR proj-pspid OBLIGATORY,

so_erdat FOR proj-erdat,

so_posid FOR prps-posid,

so_refeg FOR zcs_engine-zzrefeng,

so_pdaur FOR prte-pdaur,

so_pstrt FOR prte-pstrt,

so_pende FOR prte-pende,

so_appl FOR zcs_instal-zzinst_appl,

so_mvrnr FOR proj-vernr,

so_evrnr FOR prps-vernr,

so_rvrnr FOR prps-vernr,

so_stxt4 FOR tj02t-txt04,

so_utxt4 FOR tj30t-txt04.

SELECTION-SCREEN END OF BLOCK bl1.

SELECTION-SCREEN: BEGIN OF BLOCK 3 WITH FRAME TITLE text-017.

PARAMETERS: variant LIKE disvariant-variant.

SELECTION-SCREEN END OF BLOCK 3.

*SELECTION-SCREEN END OF SCREEN 1000.

*selection-screen begin of screen 1001

SELECTION-SCREEN BEGIN OF SCREEN 1001.

SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE text-bl2.

SELECT-OPTIONS : so_pspi1 FOR proj-pspid OBLIGATORY,

so_erda1 FOR proj-erdat,

so_posi1 FOR prps-posid,

so_refe1 FOR zcs_engine-zzrefeng,

so_pdau1 FOR prte-pdaur,

so_pstr1 FOR prte-pstrt,

so_pend1 FOR prte-pende,

so_appl1 FOR zcs_instal-zzinst_appl,

so_mvrn1 FOR proj-vernr,

so_evrn1 FOR prps-vernr,

so_rvrn1 FOR prps-vernr,

so_stxt1 FOR tj02t-txt04,

so_utxt1 FOR tj30t-txt04,

so_prctr FOR prps-prctr,

so_pbukr FOR prps-pbukr,

so_buped FOR bkpf-budat,

so_budat FOR bkpf-budat.

SELECTION-SCREEN END OF BLOCK bl2.

SELECTION-SCREEN: BEGIN OF BLOCK 4 WITH FRAME TITLE text-017.

PARAMETERS: variant1 LIKE disvariant-variant.

SELECTION-SCREEN END OF BLOCK 4.

SELECTION-SCREEN END OF SCREEN 1001.

*selection-screen end of screen 1001.

if sy-tcode eq 'ZPSFINWARR'.

call screen 1001.

endif.

In transaction code I have given as 1000 for tcode1 and 1001 for tcode2 i.e.ZPSFINWARR

but when I execute with tcode2 ZPSFINWARR it is simply coming out of the program and even stopping in the breakpoint if I put in the if condition.

thanks

Senthil

Former Member
0 Kudos

pls check this sample..similar to what you want...you have to define a custom selection screen as you can see (not a normal ABAP screen/dynpro)...

REPORT yytest88 LINE-COUNT 20 NO STANDARD PAGE HEADING.

parameters : p_scr1(10) obligatory.

selection-screen begin of screen 1001.

parameters : p_scr2(10) obligatory.

selection-screen end of screen 1001.

start-of-selection.

if p_scr1 is initial.

p_scr1 = 'EMPTY'.

else.

p_scr2 = 'EMPTY'.

endif.

write 😕 p_scr1, p_scr2.

transaction - ytest1

program YYTEST88

selection screen 1000

transaction ytest2

program YYTEST88

selection screen 1001

Former Member
0 Kudos

Hi Senthil,

You have to create 2 programs or rather copy the same program with a diff name & attach 2 transaction codes to them.

Former Member
0 Kudos

The default screen for reports is 1000 .

U cannot give other screen no's.

Even while U check the Transaction, this will give the

following message.

Screen 1001 of program XXXXXXXXX does not exist

Message no. EU044