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

Problem w

Former Member
0 Likes
485

Hi,

Below is my code.

CASE sy-ucomm.

WHEN 'EXIT'.

PERFORM f_exit_program.

WHEN 'BACK'.

SET SCREEN 0.

CALL SELECTION-SCREEN 1000 . "DEVK933227

LEAVE to SCREEN 0.

WHEN 'CANCEL'.

PERFORM f_exit_program.

ENDCASE.

FORM f_exit_program .

CALL METHOD gc_zcontainer->free.

CALL METHOD cl_gui_cfw=>flush.

IF sy-subrc NE 0.

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

titel = sy-repid

txt2 = sy-subrc

txt1 = 'Error in Flush'(032).

ENDIF.

leave screen .

ENDFORM. " f_exit_program

It has two radio buttons local currency and group currency.

When I run the report using local currency output is displaying.

When I click on the back button it is going to selection screen.

when I again run the report using the group currency.

It is going to SAP Easy Access screen.

Please let me know, how this report run for the second time (group currency).

Thanks,

Pavan.

3 REPLIES 3
Read only

Former Member
0 Likes
452

I think if you clear the sy-ucomm field when you execute the back command.

i.e.

CASE sy-ucomm.

WHEN 'EXIT'.

clear sy-ucomm.

PERFORM f_exit_program.

WHEN 'BACK'.

clear sy-ucomm.

SET SCREEN 0.

CALL SELECTION-SCREEN 1000 . "DEVK933227

LEAVE to SCREEN 0.

WHEN 'CANCEL'.

clear sy-ucomm.

PERFORM f_exit_program.

ENDCASE.

Message was edited by: Anurag Bankley

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
452

Please make sure to clear sy-ucomm.




WHEN 'EXIT'.
<b>clear sy-ucomm.</b>
PERFORM f_exit_program.

WHEN 'BACK'.
<b>clear sy-ucomm.</b>
SET SCREEN 0.

CALL SELECTION-SCREEN 1000 . "DEVK933227

LEAVE to SCREEN 0.

WHEN 'CANCEL'.
<b>clear sy-ucomm.</b>
PERFORM f_exit_program.

ENDCASE.



Regards,

Rich Heilman

Read only

Former Member
0 Likes
452

Hi,

Assign a tcode for ur report and

use

when "BACK'.

LEAVE TO TRANSACTION tcod.

or try using submit

Regards,

Amole