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: 

Exit customized screen

Former Member
0 Kudos

Dear gurus,

i have one problem here. I am using the BADI 'ME_PROCESS_REQ_CUST' to perform a checking of PR before save.

When user click 'Save', i will direct them to one customized screen using Function Module which i call screen 100.

In the screen, i have one button 'Cancel' to cancel the transaction. i would like to go back to the PR screen and display an error message 'PR not created'. But when i click on the 'Cancel' button, it calls back to this screen (screen 100) instead of the PR screen. Please guide me.

I have the below code:

In customized function module to call screen


CASE OK_CODE.
WHEN 'CANCEL'.
        EXPORT ok_code TO MEMORY ID 'ANS'.
        LEAVE SCREEN.

IN BADI function module


  CALL FUNCTION 'ZFM_CAPITALISED_Q'.

  IMPORT ok_code TO to_ok_code FROM MEMORY ID 'ANS'.

  IF to_ok_code EQ 'CANCEL'.
    MESSAGE ID 'ZMSG' TYPE 'E' NUMBER '000' WITH 'PR not created'.
  ENDIF.

Thanks,

Starry99

1 REPLY 1

Former Member
0 Kudos

solved