Throwing error msg in selection screen
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
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
Similar Messages
-
Error Message in selection screen Status bar is getting truncated
Hi Guys,
Error Message in selection screen Staus bar is getting truncated (full message is not getting displayed).... can anybody tell me how to reslove thisHi
Maimum we can give the error message length is 50 char. If you give more than that it will get truncated.
What you can do this split 50 and 50 like that you can give 200 chnars.
Data : Text1 type char50
Text2 type char50
If sy-surc ne 0.
Message Text1 Text2 TYPE "E'' or 'S'
endif. -
Error msg, "Maximum selection does not contain value 9999999999.
Hi, I am getting this error wile doing Reclassification of HFM Movement.
Error msg, "Maximum selection does not contain value 9999999999 of subassignment HFM CD2 & Asset Type "
in the Data Monitor, ( in Reclass Net Reserve). While running BCF task for a company for period 16/2009
Actually, We have converted the consolidation area from XX(2009) to YY(2010).
Before this task, user has performed the balance carry forward.
My Analysis is as follows:-
Method Used in this Reclassification
RECYX (Reclassify HFM Movement at YE lvl 10)
TRIGGER
Items : 100-299, 9900-9999
HFM Movement Type : O200 to O300
Posting Level : 10
TARGET
Items : 100-299, 9900-9999
Move : O100C
Posting Level : 10
HFM CD2 and Asset type : Ticked
After TEST run in UCMON, the error message comes :-
The "HFM CD2 & Asset Type value 9999999999" is not maintained in Breakdown Categories Y500, Y700 etc.
Breakdown categories in Workbench
Maintained as "OPTIONAL, Initialized value allowed".
Single Selection
1A
1B
AR
GA
Default Selection
99999999999
BCS CUBE
HFM CD2 & Asset Type - coming blank
LOTR
HFM CD2 & Asset Type - Coming blank
Please help to go forward.
In Anticipation,
Deepankar JainThanks a lot Dan for the reply.
Yes, the single selection is 1A, 1B etc, I agree that including this default value 9999999999 in single selection will resolve this issue, but the BREAK DOWN TYPE is OPTIONAL, that means It will also consider a blank value, right?
Also, In the method defined for RECLASSIFICATION in workbench, in the TARGET parameters, the" HFM CD2 and Asset Type" is blank but the "DEFAULT is TICKED" which makes it a mandatory derivation rule.
Please correct me if I am wrong.
Your replies on it are highly appreciated.
Thanks and Regards,
Deepankar -
Error message in Selection Screen
Hi
reference no (p_ref) is in my selection screen.
If this field contains special characters (\ / : * ? " |, ) system must prompt error message in selection screen. How to do this. Pls help me
Regards
Anbuafter input form the user
use if condtion
and validate the field and through message.........
Reward IF........
Regards
Anbu
Edited by: Anbu B on Jun 17, 2008 8:04 AM
Edited by: Anbu B on Jun 17, 2008 8:06 AM -
Custom error messages in selection-screen
Hello All,
I have one query. I have developed a vendor aging report. In the SELECT-OPTIONS, there are 5 fields namely company code, business area, vendor group, vendor code and cash management group. What the user wants is if he enters any invalid value in any of the 5 fields, custom error message should be displayed like 'invalid company code' etc. I think we have to write these messages in 'at-selection-screen' event. Can u help me out with a sample code snippet w.r.t the above program? I have written the code as:
AT SELECTION-SCREEN.
IF S_BUKRS ne BSIK-BUKRS.
MESSAGE e000. 'invalid company code' TYPE 'E'.
ENDIF.
But not giving the correct output.i.e. even if I enter a valid company code, the error message is displayed. Can u help me in solving this problem?
Thanks and Regards,
Satvik
Edited by: Satvikpanchal on Jul 22, 2011 9:42 AMHi,
use AT SELECTION-SCREEN on S_BUKRS-low.
Use select query for checking the Company code in T001 table check the
Company code already exist or not? If it is not there show the message.
Code like
AT SELECTION-SCREEN on S_BUKRS-low.
select single bukrs into lv_bukrs
from T001 where bukrs = s_bukrs-low.
if sy-subrc NE 0.
MESSAGE e000. 'invalid company code' TYPE 'E'.
ENDIF.
i think you company code is select option so you have to check S_BUKRS-high also.
using the event AT SELECTION-SCREEN on S_BUKRS-high.
Regards,
DHina.. -
Error which validating selection screen data in subroutine
Hi,this is my code
selection-screen begin of block b_selection with frame title text-001.
SELECT-OPTIONS: s_belnr for rbkp-belnr, "Invoice number
s_gjahr for rbkp-gjahr NO-EXTENSION NO INTERVALS, "Fiscal year
s_stat for rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT c_status, "Invoice status
s_blart for rbkp-blart OBLIGATORY DEFAULT c_doc_type, "Document type
s_lifnr for rbkp-lifnr. "Vendor
selection-screen end of block b_selection.
at selection-screen.
select belnr gjahr from rbkp into table i_inv_data
where belnr IN s_belnr
and gjahr IN s_gjahr
and blart IN s_blart
and rbstat IN s_stat.
and lifnr IN s_lifnr.
if i_inv_data[] is initial.
message e000 with 'No record matching the search criteria'(001).
endif.
This is working fine...now when I try to modularise it, it is nt working
selection-screen begin of block b_selection with frame title text-001.
SELECT-OPTIONS: s_belnr for rbkp-belnr, "Invoice number
s_gjahr for rbkp-gjahr NO-EXTENSION NO INTERVALS, "Fiscal year
s_stat for rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT c_status, "Invoice status
s_blart for rbkp-blart OBLIGATORY DEFAULT c_doc_type, "Document type
s_lifnr for rbkp-lifnr. "Vendor
selection-screen end of block b_selection.
at selection-screen.
perform sub_validate_data.
FORM SUB_VALIDATE_DATA.
select belnr gjahr from rbkp into table i_inv_data
where belnr IN s_belnr
and gjahr IN s_gjahr
and blart IN s_blart
and rbstat IN s_stat.
and lifnr IN s_lifnr.
if i_inv_data[] is initial.
message e000 with 'No record matching the search criteria'(001).
endif.
ENDFORM. " SUB_VALIDATE_DATA
the error which I m getting is ' IN s_belnr should be followd by an internal table'Please tell how can I modularize this code and put the checking part in subroutineIf I remove the period after s_stat your code is compiling without problems:
SELECTION-SCREEN BEGIN OF BLOCK b_selection WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_belnr FOR rbkp-belnr,
s_gjahr FOR rbkp-gjahr NO-EXTENSION NO INTERVALS,
s_stat FOR rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT 'X',
s_blart FOR rbkp-blart OBLIGATORY DEFAULT 'X',
s_lifnr FOR rbkp-lifnr.
SELECTION-SCREEN END OF BLOCK b_selection.
AT SELECTION-SCREEN.
PERFORM sub_validate_data.
*& Form SUB_VALIDATE_DATA
* text
FORM sub_validate_data.
SELECT belnr gjahr FROM rbkp INTO TABLE i_inv_data
WHERE belnr IN s_belnr
AND gjahr IN s_gjahr
AND blart IN s_blart
AND rbstat IN s_stat
AND lifnr IN s_lifnr.
IF i_inv_data[] IS INITIAL.
MESSAGE e000(oo) WITH 'No record matching the search criteria'(001).
ENDIF.
ENDFORM. " SUB_VALIDATE_DATA
Check, if you have an additional period somewhere else, or any other subtle differenec.
Michael -
How to display error documents in selection screen level
Hi,
Currently Iam doing Smartforms for journal voucher. Iam taking multiple documents as input and displaying relavent item data for each.
Now, my requirement is i want to display invalid document numbers at selection screen level. For example there are 30 invalid document number i want to display them before start-of-selection.
Thanks in advance,
Regards,
Chinna..i have a query......say i am using a selet-options s_ebeln for ekko-ebeln.
i want to display error messages for
1>lower limit cant be greater than upper limit?
2>for special cahracters given in the select-options fields.....etc...
now when i am writing the code......
if s_ebeln-low gt s_ebeln-high.
message e001.
it is showing SAP's message not mine.
but ....if my s_ebeln-high field is 0.
then my message is showing.
pls give me the codes for these? -
Set cursor on error field in selection screen
Hi ALL,
How to place the cursor on a particular selection screen field?I am doing validation if validation fails for a particular field the program should give error mesg and the cursor should place on the error field only but it's going to the Ist field on the selection can somebody tell me how do this? I tried with set cursor field <fieldname) but not working I am doing validations on at-selection screen.
Thanks&Regard
maheshHi chandrasekhar find my code below
this code i am writing under at selection-screen.
*& Form Z_VALIDATE_TVKOV
FORM z_validate_tvkov .
DATA: i_vtweg LIKE vbak-vtweg.
IF NOT s_vtweg-low IS INITIAL.
SELECT SINGLE vtweg FROM tvkov INTO i_vtweg
WHERE vtweg = s_vtweg-low.
IF sy-subrc <> 0.
set cursor FIELD 'S_VTWEG-LOW'.
MESSAGE e000(z_sd) WITH text-052.
ENDIF.
ENDIF.
IF NOT s_vtweg-high IS INITIAL.
SELECT SINGLE vtweg FROM tvkov INTO i_vtweg
WHERE vtweg = s_vtweg-high.
IF sy-subrc <> 0.
MESSAGE e000(z_sd) WITH text-052.
ENDIF.
ENDIF.
ENDFORM. " Z_VALIDATE_TVKOV -
Hi,
Can you declare an error message under select statement?Hi..
You can use the Message statement for this..
PARAMETERS: P_MATNR TYPE MARA-MATNR.
AT SELECTION-SCREEN ON P_MATNR.
SELECT SINGLE * FROM MARA WHERE MATNR = P_MATNR.
IF SY-SUBRC NE 0.
<b> MESSAGE E100(ZCLASS).</b>
ENDIF.
<b>Reward if Helpful</b> -
Music app throws back to track selection screen
Sometimes when i choose a track in music app, my ipod 4g freezes for a couple of seconds, and then throws me back to song selection screen. I reinstalled iOS and synced all music again, but it still happening. It is really annoying. Any ideas?...
- Restore to factory settings/new iOS device.(not clear if" I reinstalled iOS and synced all music again, " iwas this)
If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
Error in adding selection screen fields
Hi All,,
I am getting error when i add a selection screen parameters in module pool.
I copied stadard program to custom one, when I add an input field to screen it gives information message saying
"Selection screen: Report generation makes screen changes ineffective".
If though if i add the selection screen, when i relogin newly added screeen disappears.
Can any one y this is happening?Hi,
You can find a lot of posts on the SDN. Please search for them.
[What create docking container on a subscreen?]
[Query Regarding 'cl_gui_docking_container'] are a few -
Displaying std field in enable mode after throwing error msg
Hi experts,
I have a requirement where i need to check the value enterred in standard field (final grade) of infotype 0022 and need to throw error message, when the user click save button in PA30.
But the problem is, if i throw Error message, that field becomes disable and the user have to go back and come back for entering the correct value. So, my requirement is taht the field should still be in enable mode even after getting the error message.
pls tell me how to achive the same?Hi Shanti,
You don't need to display a message of type ERROR as this will lock the screen and will prevent the user from providing further input. You can use the following thing
MESSAGE i001 DISPLAY LIKE 'E'.
This will serve your purpose by displaying the error but will not lock the screen field and thus will not prevent the user from further input.
Have a look at the following link for more details : [ MESSAGE KEYWORD|http://help.sap.com/abapdocu_70/en/ABAPMESSAGE_OPTIONS.htm]
Hope this will help.
Thanks,
Samantak. -
Oss note 870991 Error while changing selection screen error.
When i try to implement oss note I need to change the selection text of program J_1I_QER_EFILE.
A selection text IND . But when i try to delete or rename it it shows me an error ' Delimitation text IND is an original text and cannot be deleted or renamed'
Please advice.Thanx in advance..Try translating the texts before renaming/deleting.
Regards
Karthik D -
Error with 'At Selection-Screen' in Infoset query (Urgent)
Hi All,
I have defined a field as a selection criteria in Selections tab of Infoset & written a few lines of code. The syntax is ok, but when i try to run the query, the system prompts the message as below & terminates:
'Local SELECT-OPTIONS are not allowed (FORM routine or GET event is active).'
I would like to know what code should i enter in the GET / GET LATE section. Can someone help me?
Edited by: Vivek on Dec 31, 2007 10:27 AMMr. Atish,
Thanks for the reply, but wish to inform you, i have not written any code in GET / GET-LATE section of the infoset. I just read the SAP help files, where it mentions that i need to maintain some check code in GET / GET-LATE section if i have defined selection criteria in selections tab.
May i know what code should i maintain?
In selections tab i have defined 2 selection criterias, for one criteria i have maintained the code & for the other in Extras field i have maintained a Default value & entered 'NO-DISPLAY'.
Await your inputs to resolve this problem.
Vivek -
when iam previwing report this error is occured
System.Data.SqlClient.SqlException: Login failed for user 'FPS\hariprasad.a'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnechi pasted error .iam impleting custom code in ssrs like below
Public Shared Function DeleteData(Byval empno AS Integer) As String
Dim strResult As String
Dim conn As New System.Data.SqlClient.SqlConnection
conn.ConnectionString = "Integrated Security=SSPI;Data Source=172.16.1.111\DATA_SERVICES;Initial Catalog=Recounsiled"
Dim sql As String
sql = "sp_empno"
Dim com As New System.Data.SqlClient.SqlCommand
com.CommandText = sql
com.CommandType = System.Data.CommandType.StoredProcedure
com.Parameters.Add("@empno", System.Data.SqlDbType.Int).Value =empno
com.Connection = conn
Try
com.Connection.Open()
com.ExecuteNonQuery()
com.Connection.Close()
strResult = "Successful"
Catch ex As Exception
com.Connection.Close()
strResult = ex.ToString()
End Try
return strResult
End Function
Maybe you are looking for
-
How do I get CR-XI R2 to install?
What a nightmare! I was advised to update my CR-IX R1 (in the hopes that this would help with a failed Active-X call). I eventually determined that I could go from R1 to R2 by downloading a file 14-00806-085.zip, and running this. I removed R1 (us
-
Hyper-V Server 2012 Migration Questions
Hello All, This is my first post here, but I have used these forums many times for information. Sorry in advance for the long post. I have a few questions regarding migration to Hyper-V server 2012 for my production environment. I have done quite a b
-
Sound not working in Flash Builder. Help please.
So, here's my situation. I keep trying to put an mp3 in Flash Builder to try and make sounds happen, but each time I do it only plays the beginning of it and stops midway through. My music is working at 44100 Hz with a 32 bit rate (tried changing it
-
In my GREP style I want it to find a different / (forward slash) in glyph set
Hello! I have a GREP style that I have been using to find fractions and it works fine. The issue now, is we are not going to be using the standard / in the glyph set, but a different one. It's a unique one built into the font. This is the part of the
-
Hi, Can anyone plz tell me what is the max size of RS MMC card that can be handled by Nokia 6260