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: 

modify or use custom status in report program

hassimkhan
Explorer
0 Kudos

Hello,

how can i modify the standard gui status or use a custom status in a report program. i've already tried:

INITIALIZATION.

     SET PF-STATUS 'ZGUI'.


it work, but i dont where to put the case sy-ucomm as show below:


CASE sy-ucomm.

       when 'BACK'.

         leave to screen 0.

       WHEN '&CON'.

                 leave to screen 0.

ENDCASE.



i only need one custom button and the rest is just like standard toolbar... help please

8 REPLIES 8

PeterJonker
Active Contributor
0 Kudos

You can copy the status you want to use and add the button to this status.

In your example, copy status ZGUI to status ZGUI_COPY.

But that would be too easy, so I guess you have another problem. You also said that you don't know where to put the sy-ucomm checks.

I suppose you are using dialogue programs. Is it a custom program or a standard SAP program (if standard, which one). Normally you would put the case statement on sy-ucomm in the PAI event. (Process After Input)

Former Member
0 Kudos

AT SELECTION-SCREEN.

Regards

hassimkhan
Explorer
0 Kudos

does not work at selection screen...

VenkatRamesh_V
Active Contributor
0 Kudos

Hi Hassim,

Hope it help full.

Go to SE 41


Program Name: SAPLSLVC_FULLSCREEN.

Status:                STANDARD_FULLSCREEN


Make the copy of Program and Status to Z, add your custom icon.



Regards,

Venkat .

rosenberg_eitan
Active Contributor

Hi,

You can add your own functions (up to 5) .

TABLES: sscrfields .

SELECTION-SCREEN: FUNCTION KEY 1 .

INITIALIZATION.
  PERFORM at_initialization .
 
AT SELECTION-SCREEN .
  PERFORM at_selection_screen_input .

FORM at_initialization .
  sscrfields-functxt_01 = text-e01 .
ENDFORM .

FORM at_selection_screen_input .

CASE sscrfields-ucomm .
    WHEN 'FC01' .
      PERFORM do_edit_text .
      RETURN .
  ENDCASE .

ENDFORM .

Regards.

Former Member
0 Kudos

Hi Hassim,

What`s kind of your program? Only a selection screen or a dialogue program?

regards,

Archer

0 Kudos

it's a report program. selection screen etc.... i want to  create only a custom button + all default standard status button and i want to capture which button was clicked and do thing accordingly

raymond_giuseppi
Active Contributor
0 Kudos

INITIALIZATION.

     SET PF-STATUS 'ZGUI'.


it works, ...

Does it not ?

On report (SELECTION-SCREEN) SET-PF STATUS does not affect the GUI status, you should have used FM RS_SET_SELSCREEN_STATUS or RS_EXTERNAL_SELSCREEN_STATUS, that may be the root of your problem.

Else as already written (and can be found in online help) define structure SSCRFIELDS (with a TABLES statement) and check SSCRFIELDS-UCOMM in AT SELECTION-SCREEN ON events.

Regards,

Raymond