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

dialog programming exit-command

Former Member
0 Likes
1,689

Hi SDN's

I have 2 screens. Screen 0100 and screen 0200.

Once i enter some data on Screen 0100 i press a button on appl tool bar it navigates to screen 0200. This is absolutely ok n working fine.

But on screen 0200 i have some mandatory fileds, and i have given the GUI status for Back, Exit, Cancle in screen 0200 which i have handled in a module <M1>at exit command.

So now if i click on the back exit or cancel it takes me back to the screen 0100, but the mandatory fields are not being prompted for entry.

What i want is i wnt to maintain Back, Exit and Cancel buttons at Exit-Command and i should not go to screen 0200 unless and until i enter the mandatory fields values in screen 0200.

Regards

Pratyusha

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
972

In the PAI of the screen put the process at EXIT-COMMAND after the check of mandatory fields.

CHAIN.
  FIELD mandatory_field1.
  FIELD mandatory_field2.
  MODULE are_mandatory_fields_filled.
ENCHAIN.
MODULE user_command AT EXIT-COMMAND.
CHAIN.
  FIELD non_mandatory_field1.
  FIELD non_mandatory_field2.
  MODULE other_checks 
ENDCHAIN.
MODULE user_command.

Another way could be to remove the Exit commands from status as long as the mandatory fields are not filled.

In PBO, before setting PF-Status, add the BACK and EXIT function to the removed function code table.

Regards

4 REPLIES 4
Read only

Former Member
0 Likes
972

Hi,

Change the function code type in the menu painter from E (at exit command) to blank

Then your back, exit and cancel will not trigger in at exit-command..

Thanks

Naren

Read only

0 Likes
972

But where do i handle the Back, Exit and Cancel command.

Is it in the USER_COMMAND of that screen. just by giving LEAVE to SCREEN 0100.

Regards

Pratyusha

Message was edited by:

Pratyusha

Read only

Former Member
0 Likes
972

HI,

when you clik the back or exit button

chek whether the mandatory fields are filled or not

if not give a message

'Enter the mandatory fields'.

else.

leave to screen 100.

endif.

regards,

Venkatesh

Read only

RaymondGiuseppi
Active Contributor
0 Likes
973

In the PAI of the screen put the process at EXIT-COMMAND after the check of mandatory fields.

CHAIN.
  FIELD mandatory_field1.
  FIELD mandatory_field2.
  MODULE are_mandatory_fields_filled.
ENCHAIN.
MODULE user_command AT EXIT-COMMAND.
CHAIN.
  FIELD non_mandatory_field1.
  FIELD non_mandatory_field2.
  MODULE other_checks 
ENDCHAIN.
MODULE user_command.

Another way could be to remove the Exit commands from status as long as the mandatory fields are not filled.

In PBO, before setting PF-Status, add the BACK and EXIT function to the removed function code table.

Regards