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: 

stay in PAI

former_member533538
Participant
0 Kudos

Hi experts,i have a dialog requirement,this dialog has 1 main screen,3 subscreen,there is a 'display' button in main screen, when the user click display button in edit mode, it would pop up a confirm window, prompt user to save data or not, my question is:if user choose 'cancle' in pop up window, how can i let it do nothing? no PAI validation, not go to PBO to refresh data, thanks.

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

Hi,

Executing PBO and PAI are the big principles of dynpro programming. Why is it an issue that the PAI and PBO are called, if you just do nothing? (first action in PAI, you do EXIT, and when the PBO is started, you do nothing as you know that you are in the situation of the popup being cancelled).

The PAI is always called (or the POH for F1, or the POV for F4 function key).

So, you will have to display your popup during the first PAI module (of the main screen, not in the subscreens).

The only situation where the PBO is not called again is when you issue a warning or error message: the PAI is interrupted at the module where it's issued, the screen is displayed, and at the next action, the PAI is restarted at the start of the module where the message was issued.

The issue is that fields of subscreens will be protected agains input. The only way to remove it is to finish the PAI and restart the PBO (sorry it's not what you want but no choice!) You may define a new "reset" function key to do this: define it as an exit key (you process it in the module XXX on exit-command), and do nothing in the PAI. Note: in the PBO, you simply do nothing in that situation.

So, you will call your popup from the first PAI module, after this popup, you test if user pressed "Cancel" and if so, display an error message, the subscreen fields are automatically protected. You have to press a key and continue the main screen's PAI.

Regards,

Sandra

4 REPLIES 4

Former Member
0 Kudos

Once the control goes to PAI, PBO will always execute.

which is a good practice. - so, basically define change and display mode in your program and set the fields according to the mode.

If you still insist -

You can put the transaction type of "DISPLAY" as "Exit Command". and write your confirmation code in Module .... AT EXIT-COMMAND.

But again, you will face issues when you actually have to change the mode.

0 Kudos

hi chinmay,yes, i have set "DISPLAY" as "Exit Command",now my only problem is how can i set the pop up window 'cancel' button invalid,just let it close the window, i want the user to edit the data he just input.

Sandra_Rossi
Active Contributor
0 Kudos

Hi,

Executing PBO and PAI are the big principles of dynpro programming. Why is it an issue that the PAI and PBO are called, if you just do nothing? (first action in PAI, you do EXIT, and when the PBO is started, you do nothing as you know that you are in the situation of the popup being cancelled).

The PAI is always called (or the POH for F1, or the POV for F4 function key).

So, you will have to display your popup during the first PAI module (of the main screen, not in the subscreens).

The only situation where the PBO is not called again is when you issue a warning or error message: the PAI is interrupted at the module where it's issued, the screen is displayed, and at the next action, the PAI is restarted at the start of the module where the message was issued.

The issue is that fields of subscreens will be protected agains input. The only way to remove it is to finish the PAI and restart the PBO (sorry it's not what you want but no choice!) You may define a new "reset" function key to do this: define it as an exit key (you process it in the module XXX on exit-command), and do nothing in the PAI. Note: in the PBO, you simply do nothing in that situation.

So, you will call your popup from the first PAI module, after this popup, you test if user pressed "Cancel" and if so, display an error message, the subscreen fields are automatically protected. You have to press a key and continue the main screen's PAI.

Regards,

Sandra

davis_raja
Active Participant
0 Kudos

Dear Damon,

     You might be using using FM POPUP_TO_CONFIRM to display the popup.

     Find the import parameter value.

     Based on the import parameter, do the necessary things.

     May be this will help you.

     If you want exact answer, kindly post your code.

Regards

Davis