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

Modul Pool Screen

Former Member
0 Likes
1,977

Hi all,

I am facing an issue in module pool.

I have a screen in which all fields are mandatory. the issue is when I press Back button the system gives "Fill in all required fields". In this case this should not happen. If I have inserted any value and then press back button then if system gives this message , then it s okay.

But If I have not inserted any value and I press back button then , it should allow me to go back.

So does anyone having idea how to do this?

14 REPLIES 14
Read only

0 Likes
1,952

Hi,

Make sure you have set back as an exit command.

Shruti

Read only

0 Likes
1,952

Thank you Shruti..

I applied your suggestion.. But still system does not allow me to go back.

Read only

0 Likes
1,952

Hi Yash,

You have to mention MOdule <name> at EXIT command.

In this case it will allow you to come out of the screen if you havnt entered the mandatory fields also.

BR

Sumeet

Read only

0 Likes
1,952

Sumeet, can you please tell me how to do this??

are you trying to say that I should make a module in PAI ??

If yes. then what should I write there as a code? I dont have any idea about this..

Read only

0 Likes
1,952

Sample code:

PROCESS BEFORE OUTPUT.
  MODULE status_0100.
PROCESS AFTER
INPUT.

  MODULE leave_100 AT EXIT-COMMAND.

  MODULE user_command_0100.

DATA: ok_code TYPE sy-ucomm,
      ...
MODULE status_0100
OUTPUT.

  SET PF-STATUS 'STATUS_0100'.

ENDMODULE.

MODULE
leave_100 INPUT.

  CASE ok_code.
    WHEN 'BACK'.
      ...

    WHEN 'CANCEL'.
      ...
    WHEN 'EXIT'.

      LEAVE PROGRAM.
    ...
  ENDCASE.
ENDMODULE.

Read only

0 Likes
1,952

Fos implicity: use this code.

PROCESS AFTER INPUT.

  MODULE leave_100 AT EXIT-COMMAND.

MODULE leave_100 INPUT.

  CASE ok_code.

    WHEN 'BACK'.

      LEAVE PROGRAM.

  ENDCASE.

ENDMODULE.

Read only

0 Likes
1,952

Thank You Shruti .

Read only

Former Member
0 Likes
1,952

One question...

Is it possible if this logic of exit-command can be applied to one server and if i use the same code in different server it is not working

Read only

0 Likes
1,952

What error are you getting? And also can you please tell me your scenario what exactly you want to achieve?

Read only

0 Likes
1,952

Thank you for the reply Sumeet.

My issue is : I have a screen. In which all the fields are mandatory.

If I press back button then system givem me an error of 'Fill required fields'. In my case this should not happen.

System should allow me to go back.

I tried this and it worked. Using Exit-command.

But when I applied the same logic in differnt server the system is not allowing me to go back.

Read only

0 Likes
1,952

Have you assign sy-ucomm for BACK button in screen painter in your current server?

What is happening when you press your BACK button?

Noting  happen or same error 'Fill all required fields' you are getting?

Read only

0 Likes
1,952

Problem Solved.

I assigned Exit Command in PF status of BACK Button.

Read only

0 Likes
1,952

I had given you suggestion at very first point. If you could scoll up the thread please. Glad to hear it solved.

Read only

0 Likes
1,952

Yes Shruti you are right.

Actually I forgot to do the same in the different server.