‎2008 May 27 6:17 AM
Hi all,
I want to throw one error message in selection screen .
This message is of more than 1000 chars. and i want to show these 1000 chars in a pop up window and when i press 'TICK' mark, it should stay only in the selection screen . It should not go to the output screen and it should not leave the transaction either..
Can anyone help me in this by providing the coding for this..
Regards,
Shanthi
‎2008 May 27 6:19 AM
Hi,
For this u need to create a Dialog modal type screen in SE51.
The In the PAI event pass the relevant message when it is triggerred.
Under At selection-screeen Event of ur main program
Call screen <Dialog modal screen number>.
U will get the dialog screen.
Regards,
Jagadish
‎2008 May 27 6:31 AM
Why not straightaway write
MESSAGE 'YOUR MESSAGE' TYPE E.
Iw will not go to the output screen and not leave the transaction as well
‎2008 May 27 6:31 AM
Hi
you can do the following way.
report ztest.
parameters p_tick as checkbox.
at selection-screen.
if p_tick eq 'X'.
call function 'POPUP_TO_INFORM'
exporting
titel = 'Title'
txt1 = 'Long text line 1'
txt2 = 'Long text line 2'
txt3 = 'Long text line 3'
txt4 = 'Long text line 4'.
endif.
Reward points, if it is useful.
Regards
Raja.
‎2008 May 27 6:32 AM
at the place to display the message
call screen (Pop up screen number)
diplays the message.
at the pai module...
at the user command of the popup screen
case ok_code.
when '(ok_code)'.
clear ok_code.
leave to screen 0.
endcase.
‎2008 Jun 01 2:58 AM
Hi Shanthi,
Your requirement is fulfilled by standard SAP message processing. Through message maintenance (TCode SE91), you define a message with a long text.
Let us say the message class is ZSHANTHI and the message number is 025. Besides the message short text you defined say 'Something wrong with &. Refer Long Text', un-check the checkk-box 'Self Explanatory', choose this message number and click on 'Long Text' button on the application toolbar. You will get long text editor and you can compose your 1000 lines or even 1000 pages story there.
Now let us see what you need to do in the report program. Your requirement is 'Issue the error message. When user hits Tick, display long text in a modal window and later stay in the same selection screen'.
You just issue this message in AT SELECTION-SCREEN event as:
MESSAGE e025(ZSHANTHI) WITH 'requirement'.
The error message will display on the status bar and when user hits the message X button, the long text with your story will appear in a modal box and still selection screen stays.
If your client is adamant in having only 'Tick' mark (this sucks me), you can add DISPLAY LIKE 'S' addition to the above message statement. But this addition works only 4.7 upwards.
If you want to issue this error message in list processing events like START-OF-SELECTION, then, you need to issue the following statements:
MESSAGE s025(ZSHANTHI) WITH 'still weird requirement'.
Note the message type 'S' above.
LEAVE LIST-PROCESSING.
Hope this helps.
Regards
Suresh Radhakrishnan