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

GUI Status for Selection-screen

Former Member
0 Likes
5,943

Hello Everyone,

I have a customized GUI status for the selection-screen.

I have 5 push buttons(not in toolbar) in the first selection-screen. Upon selecting one button, another selection-screen is called upon.

This customized GUI status is making all buttons deactivated in the second selection-screen and also F8 is not working in the second selection-screen.

How to make the GUI status in first selection-screen to be active in the second selection-screen and also make F8 to work.

Thank you.


18 REPLIES 18
Read only

Former Member
0 Likes
3,534

Hello Vinod,

I would like to know how you are navigating to another selection screen, is that another report or something you designed on your own module pool screen.

i mean,which one you are using, CALL screen OR submit program OR call transaction statement in your AT selection screen event of first report selection screen.

Thanks and Regards,

bhaskar

Read only

0 Likes
3,534

Hello Bhaskar,

Thank you for the reply.

I'm using the executable program. At first, i'm defining a block where all the pushbuttons are defined. When pushbutton is pressed, I use CALL SELECTION_SCREEN which is defined in the same program.

Regards,

Vinod

Read only

0 Likes
3,534

Hello Vinod,

please try this way. Mention your customized GUI status in the second selection screen too.

I think, as you did not mentioned any in 2nd selection screen it is not showing up anything as we expected to.

If this is not working or this procedure(using same GUI status 2 times in single program) is not allowed in reports, you can still achieve this by making a duplicate GUI status. maintain the duplicate gui status in 2nd selection screen.

If that is also not working then you can create another report program with the 2nd selection screen and maintain with required GUI status. and in this call this report in you required event of 1st selection screen.

Let me know if any of above is helpful at any point.

Thanks and Regards,

Bhaskar

Read only

davis_raja
Active Participant
0 Likes
3,534

Please check the PBO of the second screen for the SET PF-STATUS statement.

And check whether any EXCLUDING part is added in the statement.

If its added, goto the internal table next to EXCLUDING keyword and find out whether the fcode for the buttons are appended in the EXCLUDING table.

There might be chances that the fcodes are added in the EXCLUDING part.

Read only

0 Likes
3,534

I have cleared the Excluding table before calling the GUI status. Its empty but still all the buttons are deactivated.

Read only

Former Member
0 Likes
3,534

Hi,

Try using the function RS_SET_SELSCREEN_STATUS


AT SELECTION-SCREEN OUTPUT.

  IF SY-DYNNR = 600. 

    CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

      EXPORTING

        P_STATUS = 'ZSTATUS'  "your status

      TABLES

        P_EXCLUDE = EXCLUDE

      EXCEPTIONS

        OTHERS = 1.

   ENDIF.

when you are defining the second selection screen, check if you need to include the push buttons defined in the first selection screen.

SELECTION-SCREEN BEGIN OF SCREEN 600 TITLE TEXT-100.
SELECTION-SCREEN INCLUDE: PUSH-BUTTON  BUTTON1,

                                                               PUSH-BUTTON  BUTTON2

PUSH-BUTTON  BUTTON3

PUSH-BUTTON  BUTTON4.

SELECTION-SCREEN END OF SCREEN 600.

These buttons should have been declared as pushbuttons in the first selection screen earlier in the same program. 

Read only

0 Likes
3,534

Hello Susmitha,

Thank you for your reply.

Your solution also is not working.

I will explain the problem in more detail.

In the first selection-screen, its a block having 5 push buttons. When one of the push button is clicked it goes to a entirely different selection-screen where values will be entered for fetching the report.

Similarly I have 5 different selection-screen for 5 push-buttons. In none of the selection-screen the customized GUI status is not working. So F8 is also not working.

Also I have one more problem, I have three pushbuttons in the defined selection-screen. Some of the fields are mandatory fields. I have a "Back" push button in the selection-screen. If no value is entered then also it should go back. I have "E" function type for the toolbar back button, but i'm not able to get how to avoid that error when "Back" pushbutton is clicked in the selection-screen.

Please guide me.

Regards,

Vinod

Read only

0 Likes
3,534

Hi

Which kind of status gui you've defined?

Max

Read only

0 Likes
3,534

Hello Max,

Sorry for the delay in the reply.

I copied from the below program RSSYSTDB & GUI status %_00.

Regards,

Vinod

Read only

0 Likes
3,533

Can you post te code?

Max

Read only

0 Likes
3,533

Hello Max,

I'll not be able to post the exact code but i'll give a fair idea as how I have written the code:

 

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE 'test'.

SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN : PUSHBUTTON 20(10) text-001 USER-COMMAND cli1,

PUSHBUTTON 45(10) text-002 USER-COMMAND cli2,

PUSHBUTTON 70(10) text-003 USER-COMMAND cli3,

PUSHBUTTON 70(10) text-004 USER-COMMAND cli4,

PUSHBUTTON 70(10) text-005 USER-COMMAND cli5.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS WINDOW TITLE 'test 1'.

select-options:

parameters:

SELECTION-SCREEN: PUSHBUTTON 20(10) text-006 USER-COMMAND cli6,

PUSHBUTTON 45(10) text-007 USER-COMMAND cli7.

SELECTION-SCREEN END OF SCREEN 200.

INITIALIZATION.

AT SELECTION-SCREEN.

CASE sscrfields.

WHEN 'CLI1'.

CALL SELECTION-SCREEN 200.

WHEN 'CLI2'.

WHEN 'CLI3'.

WHEN 'CLI4'.

WHEN 'CLI5'.

WHEN 'CLI6'.

WHEN 'CLI7'.

ENDCASE.

AT SELECTION-SCREEN OUTPUT.

REFRESH it_exclude[].

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = 'STANDARD5'

TABLES

p_exclude = it_exclude.

Read only

0 Likes
3,533

Hi

I've tried to follow your sample:

SELECTION-SCREEN PUSHBUTTON 1(10) BUT1 USER-COMMAND AAAA.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN PUSHBUTTON 1(10) BUT2 USER-COMMAND BBBB.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN PUSHBUTTON 1(10) BUT3 USER-COMMAND CCCC.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN PUSHBUTTON 1(10) BUT4 USER-COMMAND DDDD.

SELECTION-SCREEN BEGIN OF SCREEN 100.

PARAMETERS: P_BUKRS LIKE T001-BUKRS.

SELECTION-SCREEN END   OF SCREEN 100.

SELECTION-SCREEN BEGIN OF SCREEN 101.

PARAMETERS: P_GJAHR LIKE BKPF-GJAHR.

SELECTION-SCREEN END   OF SCREEN 101.

SELECTION-SCREEN BEGIN OF SCREEN 102.

PARAMETERS: P_BELNR LIKE BKPF-BELNR.

SELECTION-SCREEN END   OF SCREEN 102.

SELECTION-SCREEN BEGIN OF SCREEN 103.

PARAMETERS: P_VBELN LIKE VBRK-VBELN.

SELECTION-SCREEN END   OF SCREEN 103.

AT SELECTION-SCREEN.

   CASE SY-UCOMM.

     WHEN 'AAAA'. CALL SELECTION-SCREEN 100.

     WHEN 'BBBB'. CALL SELECTION-SCREEN 101.

     WHEN 'CCCC'. CALL SELECTION-SCREEN 102.

     WHEN 'DDDD'. CALL SELECTION-SCREEN 103.

     WHEN OTHERS.

   ENDCASE.

AT SELECTION-SCREEN OUTPUT.

   DATA: BEGIN OF T_EXCL OCCURS 0,

           CODE LIKE SY-UCOMM,

        END OF T_EXCL.

   CASE SY-DYNNR.

     WHEN '0100'.

       CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

         EXPORTING

           P_STATUS  = 'MYSTATUS'

         TABLES

           P_EXCLUDE = T_EXCL.

     WHEN OTHERS.

   ENDCASE.


It works.....only the status GUI MYSTATUS is copied from status %_CS of program RSSYSTDB


Max

Read only

0 Likes
3,533

Hello Max,

Thank you for the reply.

Now I can see my buttons are in active state. But when I press F8 it is going back to the previous screen and not going to the next screen. Can you kindly guide me.

Regards,

Vinod

Read only

0 Likes
3,533

Hi

F8 should back to calling point, so if you need a different behavior you need to manage it by yourself:

let me know what you need to do

Max

Read only

0 Likes
3,533

Hello Max,

Sorry for the late reply.. I was able to resolve the issue by handling it differently.. Now the problem is resolved.. I have posted another discussion about mail sending.. Van you please check that also.. 🙂

Read only

0 Likes
3,533

Thanks for posting the code, copying standard status %_00 of program RSSYSTDB worked nice for me.

Read only

Former Member
0 Likes
3,533
Read only

0 Likes
3,533

Hi Vinod,

Create a main screen say 1000 with a subscreen area and a GUI Status with your push buttons.

For each push button,create different subscreens with no PF-STATUS.

Now when you click on any push button  call your respective screens in subscreen area of main screen (1000)

Regards,

Ramiz R I