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

module pool issue

Former Member
0 Likes
1,847

Hi,

The requirement is strange but the user wants it.

This is a module pool program- where a form gets executed on the click of button1.

if there is some issue- it throws a warning message on the screen.

On this message.. the user presses tab and space(strange but he does...)..tab takes it to next active button on the screen and space makes that button click... and thus the code for this button starts executing...

The program lines after the warning message are not at all executed. Is there any way... to go back to that portion of the code and execute it further...till it ends... (even if the user presses tab and space)

Any solution to this one??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,120

Hi

If you give a warning message, then program will come to same field with out triggering the PBO after displaying the message and if you do not change the value and press enter, it will continue executing the lines after the warning message.

I would suggest that you call a pop-up fm for displaying the error and code as per the requirement.

If you use keyword "Message", the events will be triggered depending on the current event and type of error.

Processing block Message type

-


A E I S W X

-


PAI module 1 2 3 4 5 6

PAI module for POH 1 7 3 4 7 6

PAI module for POV 1 7 3 4 7 6

PAI module for function "E" 1 7 3 4 7 6

-


AT SELECTION-SCREEN for PAI 1 8 3 4 9 6

AT SELECTION-SCREEN for POH 1 7 3 4 7 6

AT SELECTION-SCREEN for POV 1 7 3 4 7 6

AT SELECTION-SCREEN ON EXIT 1 7 3 4 7 6

-


AT LINE-SELECTION 1 10 3 4 E 6

AT PF## 1 10 3 4 E 6

AT USER-COMMAND 1 10 3 4 E 6

-


INITIALIZATION 1 11 3 4 E 6

START-OF-SELECTION 1 11 3 4 E 6

GET 1 11 3 4 E 6

END-OF-SELECTION 1 11 3 4 E 6

-


TOP-OF-PAGE 1 11 3 4 E 6

END-OF-PAGE 1 11 3 4 E 6

TOP-OF-PAGE DURING ... 1 10 3 4 E 6

-


LOAD-OF-PROGRAM 1 12 S 4 S 6

-


PBO module 1 A S 4 S 6

AT SELECTION-SCREEN OUTPUT 1 A S 4 S 6

-


If a different message type is specified under a message type "A", "E", "I", "S", "W" or "X", the original message type is converted to this type and the message is issued according to this type. A number under a message type indicates processing according to the following list:

1. The message is displayed in a dialog box. After the dialog box is exited, the program is terminated and processing returns to the calling position of the first program of the current call sequence. All internal sessions of the call chain are deleted and a database rollback is performed.

2. PAI processing is interrupted and the system returns to the current screen without triggering the event PBO. The message is displayed in the status bar of the current window as standard. If the error message is sent in a dialog module that is called in the dynpro flow logic outside a process chain defined with CHAIN following a FIELD statement, the input field specified after FIELD is the only field that is ready for input. If the error message is sent in a dialog module that is called within a process chain defined with CHAIN, all fields specified after FIELD in the process chain are ready for input. After a user action, PAI processing is continued at the point described under Handling of messages for the PAI event.

3. The message is displayed in a dialog box. After the dialog box is exited, the program is resumed after the statement MESSAGE.

4. The program is continued after the statement MESSAGE. The message is displayed as standard in the screen of the next dynpro in the status bar of the current window.

5. PAI processing is terminated and returns to the current screen without triggering the event PBO. The message is displayed in the status bar of the current window as standard. The fields described under point 2 are ready for input. If the user confirms the current field content using the Enter key without entering a new value, the program is resumed after the statement MESSAGE. If the user enters one or more new values, processing is resumed after a user action as described under point 2.

6. The program is terminated, a database rollback is executed, and the runtime error MESSAGE_TYPE_X is triggered. The short dump of the runtime error is displayed, which contains the ID, the short text, and the long text of the message.

7. The sending of error messages is not permitted during POH and POVprocessing and the handling of a function code of type "E". This triggers an untreatable exception.

8. Selection screen processing is interrupted and the system returns to the current selection screen without triggering the event AT SELECTION-SCREEN OUTPUT. The message is displayed in the status bar of the current window as standard. The input fields of the selection screen are ready for input that were specified by the additions of the statement AT SELECTION-SCREEN of the current event block. After a user action, selection screen processing is continued with the current selection screen event. Previous selection screen events are not triggered.

9. Selection screen processing is interrupted and the system returns to the current selection screen with triggering the event AT SELECTION-SCREEN OUTPUT. The message is displayed in the status bar of the current window as standard. The fields described under point 8 are ready for input. If the user confirms the current field contents with the Enter key without entering a new value, the program is resumed after the statement MESSAGE. If the user has entered one or more new values, selection screen processing is resumed after a user action as described under point 8.

10. The event block of the current list event is terminated and the list level at which the list event was triggered remains displayed. The message is displayed in the status bar of the current window as standard.

11. The program is terminated and an empty screen is displayed with an empty GUIstatus. The message is displayed in the status bar of the current window as standard. After a user action, processing returns to the calling position of the program.

12. As of release 6.40, the program is terminated with the runtime error SYSTEM_LOAD_OF_PROGRAM_FAILED. Before release 6.40, the system behaved according to the context in which the program was loaded, whereby the context after a call with SUBMIT is handled in the same way as the context PBO.

While a message is displayed, the user can display the long text, if applicable, by a single click with the mouse on the Help button if the message is displayed in a dialog box, or by clicking in the status bar. If no long text is defined, it is generated using the content of the short text.

Regards

Navneet

Message was edited by:

Navneet Saraogi

4 REPLIES 4
Read only

Former Member
0 Likes
1,121

Hi

If you give a warning message, then program will come to same field with out triggering the PBO after displaying the message and if you do not change the value and press enter, it will continue executing the lines after the warning message.

I would suggest that you call a pop-up fm for displaying the error and code as per the requirement.

If you use keyword "Message", the events will be triggered depending on the current event and type of error.

Processing block Message type

-


A E I S W X

-


PAI module 1 2 3 4 5 6

PAI module for POH 1 7 3 4 7 6

PAI module for POV 1 7 3 4 7 6

PAI module for function "E" 1 7 3 4 7 6

-


AT SELECTION-SCREEN for PAI 1 8 3 4 9 6

AT SELECTION-SCREEN for POH 1 7 3 4 7 6

AT SELECTION-SCREEN for POV 1 7 3 4 7 6

AT SELECTION-SCREEN ON EXIT 1 7 3 4 7 6

-


AT LINE-SELECTION 1 10 3 4 E 6

AT PF## 1 10 3 4 E 6

AT USER-COMMAND 1 10 3 4 E 6

-


INITIALIZATION 1 11 3 4 E 6

START-OF-SELECTION 1 11 3 4 E 6

GET 1 11 3 4 E 6

END-OF-SELECTION 1 11 3 4 E 6

-


TOP-OF-PAGE 1 11 3 4 E 6

END-OF-PAGE 1 11 3 4 E 6

TOP-OF-PAGE DURING ... 1 10 3 4 E 6

-


LOAD-OF-PROGRAM 1 12 S 4 S 6

-


PBO module 1 A S 4 S 6

AT SELECTION-SCREEN OUTPUT 1 A S 4 S 6

-


If a different message type is specified under a message type "A", "E", "I", "S", "W" or "X", the original message type is converted to this type and the message is issued according to this type. A number under a message type indicates processing according to the following list:

1. The message is displayed in a dialog box. After the dialog box is exited, the program is terminated and processing returns to the calling position of the first program of the current call sequence. All internal sessions of the call chain are deleted and a database rollback is performed.

2. PAI processing is interrupted and the system returns to the current screen without triggering the event PBO. The message is displayed in the status bar of the current window as standard. If the error message is sent in a dialog module that is called in the dynpro flow logic outside a process chain defined with CHAIN following a FIELD statement, the input field specified after FIELD is the only field that is ready for input. If the error message is sent in a dialog module that is called within a process chain defined with CHAIN, all fields specified after FIELD in the process chain are ready for input. After a user action, PAI processing is continued at the point described under Handling of messages for the PAI event.

3. The message is displayed in a dialog box. After the dialog box is exited, the program is resumed after the statement MESSAGE.

4. The program is continued after the statement MESSAGE. The message is displayed as standard in the screen of the next dynpro in the status bar of the current window.

5. PAI processing is terminated and returns to the current screen without triggering the event PBO. The message is displayed in the status bar of the current window as standard. The fields described under point 2 are ready for input. If the user confirms the current field content using the Enter key without entering a new value, the program is resumed after the statement MESSAGE. If the user enters one or more new values, processing is resumed after a user action as described under point 2.

6. The program is terminated, a database rollback is executed, and the runtime error MESSAGE_TYPE_X is triggered. The short dump of the runtime error is displayed, which contains the ID, the short text, and the long text of the message.

7. The sending of error messages is not permitted during POH and POVprocessing and the handling of a function code of type "E". This triggers an untreatable exception.

8. Selection screen processing is interrupted and the system returns to the current selection screen without triggering the event AT SELECTION-SCREEN OUTPUT. The message is displayed in the status bar of the current window as standard. The input fields of the selection screen are ready for input that were specified by the additions of the statement AT SELECTION-SCREEN of the current event block. After a user action, selection screen processing is continued with the current selection screen event. Previous selection screen events are not triggered.

9. Selection screen processing is interrupted and the system returns to the current selection screen with triggering the event AT SELECTION-SCREEN OUTPUT. The message is displayed in the status bar of the current window as standard. The fields described under point 8 are ready for input. If the user confirms the current field contents with the Enter key without entering a new value, the program is resumed after the statement MESSAGE. If the user has entered one or more new values, selection screen processing is resumed after a user action as described under point 8.

10. The event block of the current list event is terminated and the list level at which the list event was triggered remains displayed. The message is displayed in the status bar of the current window as standard.

11. The program is terminated and an empty screen is displayed with an empty GUIstatus. The message is displayed in the status bar of the current window as standard. After a user action, processing returns to the calling position of the program.

12. As of release 6.40, the program is terminated with the runtime error SYSTEM_LOAD_OF_PROGRAM_FAILED. Before release 6.40, the system behaved according to the context in which the program was loaded, whereby the context after a call with SUBMIT is handled in the same way as the context PBO.

While a message is displayed, the user can display the long text, if applicable, by a single click with the mouse on the Help button if the message is displayed in a dialog box, or by clicking in the status bar. If no long text is defined, it is generated using the content of the short text.

Regards

Navneet

Message was edited by:

Navneet Saraogi

Read only

0 Likes
1,120

Hi Navneet,

"If you give a warning message, then program will come to same field with out triggering the PBO after displaying the message and if you do not change the value and press enter, it will continue executing the lines after the warning message."

No Navneet, this is a module pool program... the warning message will deactivate all the text fields and only the 4 button on my screen are active.

Secondly, when these fields are inactivate-the tab button takes the cursor to the next active element which is a button. And further, when the user presses space..the code for this button starts executing... the user is not pressing enter on getting the warning message. if he presses enter ... the problem is resolved.

Hope, i m not confusing you.

Read only

0 Likes
1,120

Hi

Warning message in PAI comes under point 5.

5. PAI processing is terminated and returns to the current screen without triggering the event PBO. The message is displayed in the status bar of the current window as standard. The fields described under point 2 are ready for input. If the user confirms the current field content using the Enter key without entering a new value, the program is resumed after the statement MESSAGE. If the user enters one or more new values, processing is resumed after a user action as described under point 2.

1) This is the help from SAP and yes i think it was understood that the screen element was declared along with keyword 'field' to make it input enabled. Yes, if you have not used keyword FIELD within chain- endchain, then these screen elements would be input disabled.

2) After warning message, only by changing the value and pressing Enter can trigger the event, you can not use message type 'W'.

You can set a flag before sending the message and give a type 's' message. Now after pressing tab button and then space, you can handle the 'SPACE' button and check if flag is set and execute the program accordingly.

Regards

Navneet

Read only

0 Likes
1,120

Hi Navneet,

The problem is that user does not press ENTER key.

But, adding the FM FC_POPUP_ERR_WARN_MESSAGE for warning message helped.

Thanks.