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

Former Member
0 Likes
1,103

Hi all,

i've generated selection screen 1000 and one other screen 0100 which is called from the main program. i've generated gui status and gui title also. in gui status i've declared BACK EXIT & CANCEL buttons and activates. The problem is when i get to screen 0100 none of this buttons do what they are declared for. i allwayse need to terminate the program. Please any suggestions are welcome!

thank you in advance!

Maja

7 REPLIES 7
Read only

rahulkavuri
Active Contributor
0 Likes
998

hi capture the user command values for BACK CANCEL using variable of type OK-CODE, then it will work

Read only

0 Likes
998

Hi,

I allready have:

PROCESS AFTER INPUT.

MODULE user_command_0100.

***

**

*

MODULE user_command_0100 INPUT.

CASE sy-ucomm.

WHEN 'BACK'.

PERFORM free_memory.

WHEN OTHERS.

PERFORM free_memory.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

Read only

Former Member
0 Likes
998

Hello Maja,

If the buttons have to perfrom somethink u need to write code for it in the PAI module of screen 0100 like this.

PAI 

MODULE USER_COMMAND

CASE SY-UCOMM.
when 'BACK'.
****
WHEN 'CANCEL'.
****
ENDCASE.

Vasanth

Read only

Former Member
0 Likes
998

see u need to maintian the Pf status for each screen .

In ur case u have to have pf status for <b>both</b> screen 0100 and 1000 . see if u are missing this.

next .

in the pai of screen 1000 write the code as

case SY-ucomm .

when 'BACK'.

When 'CANC'.

When 'EXIT'.

endcase.

in these u need to handle the logic of leave to screen /leave program etc.

regards,

vijay.

Read only

Former Member
0 Likes
998

Hi,

Activate the Pf-status for screen 100.

Regards,

Sruthi

Read only

Former Member
0 Likes
998
MODULE user_command_9001 INPUT.

  CASE sy-ucomm.
    WHEN 'BACK'.
 CALL METHOD custom_container2->free.

  CALL METHOD cl_gui_cfw=>flush.

  IF sy-subrc NE 0.
    CALL FUNCTION 'POPUP_TO_INFORM'
         EXPORTING
              titel = lv_repid
              txt2  = sy-subrc
              txt1  = 'Error in FLush'(500).
  ENDIF.
      SET SCREEN '0'.
    WHEN 'EXIT' OR  'CANC'.
      PERFORM exit_program.
      LEAVE PROGRAM.
  ENDCASE.

ENDMODULE.                 “USER_COMMAND_9000 INPUT

make sur ethat the FUNCTION CODE provided by u in the screen painter shpuld be the same u r specifying here in teh CAPS.

Hope his helsp u.

Read only

Former Member
0 Likes
998

Hi Maja,

When u attach User Defined GUI status to ur program, the standard GUI buttons and their functionalities are disabled. U need to write ur own code even u activated the Standard Buttons like BACK, CANCEL, EXIT etc.

In PBO u can handle this,

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

WHEN 'CANCEL'.

LEAVE TO SCREEN 0.

WHEN 'EXIT'.

LEAVE TRANSACTION.

ENDCASE.

Regards,

Sreedhar