Displaying error message while entering selection screen fields
Moderator message: don't offer points
hi experts...
i generated a report.
in that report, the selection screen fields are plant and material type..
now my rqmt is like this :
if user enters any plant except '8210' in the selection screen, then a pop up should appear like.. enter 8210 plant only, and the cursor should remain in the same screen allowing user to enter correct plant.
and then same with the case of material type also..user should enter 'mcfe' material type only..
im using message classes like this:
if so_bwkey-low ne '8210' or so_bwkey-high ne '8210'.
message i000(zts).
endif.
if so_mtart-low is not initial and so_mtart-high is not initial and so_mtart-low ne 'mcfe'
or so_mtart-high ne 'mcfe'.
message i001(zts).
endif.
with this logic, when i enter plant..it is prompting
1) enter plant 8210 only..
and then when i press enter key it is again prompting
2)enter material type mcfe only..
but iam not entering material type here..
i want to get 2nd error message if and only if i enter material type..
help me regarding this issue..
<<text removed>>
thanks in advance,
harini.
Edited by: Matt on Feb 9, 2009 10:14 AM
Hi,
Use Error type message in SELECTION SCREEN EVENT.It will place the cursor in the relevant Field.
At SELECTION-SCREEN ON SO_BWKEY-Low.
if so_bwkey-low ne '8210' .
message E000(zts).
endif.
At SELECTION-SCREEN ON SO_BWKEY-HIGH.
if so_bwkey-high ne '8210'.
message E000(zts).
endif.
At SELECTION-SCREEN ON so_mtart-LOW.
if so_mtart-low is not initial and so_mtart-low ne 'mcfe' .
message E001(zts).
endif.
At SELECTION-SCREEN ON so_mtart-HIGH.
if so_mtart-high is not initial
and so_mtart-high ne 'mcfe'.
message E001(zts).
endif.
This will resolve the issue..
Regards,
Gurpreet
Similar Messages
-
Error message at the selection screen while processing screen logic
Hi All,
I need to show error message at the selection screen.
I am calling the screen inside the START-OF-SELECTION, and processing the calculation and putting the data into i_final internal table. If internal table I_FINAL is empty I have to show error message saying ' DATA is empty' , this error message should be shown at the SELECTION SCREEN (Report input screen 1000) and provide the user to enter the input values once again.
But whenever I am populating error message, I am getting a pop up to chose exit, and process is terminating.
Since I am in the middle of the screen processing whenever I am giving a error message.
Please let me know how can I populate error message without terminating the process while I was in the middle of the screen processing logic.
Regards,
Maheshhi
If u are trying to validate a field use
AT SELECTION_SCREEN ON <field>
if want to validate a block
AT SELECTION SCREEN ON <block>
If Universal Validation
AT SELECTION SCREEN
and display a 'E' Message inside the block.
You can Enter Correct Value and start processing Forward.
hope this will help.
Regards
Sumit Agarwal -
Prb display error message while creating PR at ME51n in ME_PROCESS_REQ_CUST
Hi All,
I have this requirement to check the cost center availability in PR screen (ME51n).
If cost center in the Account assignment tab is not empty, display error message and not able to create the PR.
With my code below, it doesn't triggered the error message and PR created.
Could anyone help?
METHOD if_ex_me_process_req_cust~process_account.
DATA: w_account_ref TYPE exkn.
w_account_ref = im_account_ref->get_data( )
IF w_account_ref-kostl IS NOT INITIAL.
MESSAGE e303(ME) WITH text-001 w_account_ref-kostl text-002.
ENDIF.
ENDMETHOD.
Thank you.
SWHi,
You have to use definition MMPUR_MESSAGE 'E' ME 303 text-001 w_account_ref-kostl text-002.
This will throw the error during check and save instead of message e303(me) .
Hope it helps.
Sujay
Edited by: Sujay Venkateswaran Krishnakumar on Oct 5, 2010 2:54 PM -
"Get Variants" button disabled after error message in AT SELECTION SCREEN
Hi,
In "AT SELECTION SCREEN" I throw an error message if certain criteria return no data.
After the error message is thrown, the button for choosing variants no longer appears to work. I click it and the variant selection box doesn't come up. It just changes the values that have been populated from red to black.
What is the code that remedies this? If an error is thrown, it should allow you to select a variant still.
Thanks,
Kevin"AT SELECTION SCREEN" is not an option here. Let me clarify.
In START-OF-SELECTION, I call another program with a SUBMIT statement. That program uses a logical database. So it makes no sense to move this to "AT SELECTION SCREEN". Even when I did that, I still couldn't solve this problem.
If the SUBMIT statement returns no data (if sy-subrc = '4') then I need to go back to the initial screen. I need to display some kind of message, of type I or E or S, I don't care.
It just needs to go back to the selection screen and VARIANTS need to WORK, and you need to be able to SAVE the variants.
For some reason, if I get no data with the SUBMIT statement, I can display a message and get back to the selection screen but variants do not work. I've tried EXIT, STOP, CALL SELECTION SCREEN 1000 (the only one in the program), END LIST-PROCESSING, etc. NOTHING WORKS! -
Need help in displaying error message on the same screen
Hi Experts,
I have written a report which gets called from IW52 by clicking one of the action items. Now in my report when I am trying display an error message it is getting displayed at the bottom of a blank screen. My requirement is to display it at the bottom of the IW52 screen, so that user can rectify the error.
Please help.
Regards,
Sambaran Ray.Hi,
Probably you need to find a way to enhance the standard code.
But make one thing sure that the code (included bu you) gets fired only when that specific report is being executed. Else it may harm the standard functionality.
Hope this helps you.
Regards,
Tarun -
Error Message while entering alternate UOM in BOM, despite being maintained
Hello PP Angels,
I wish for a solution for this issue.
When I am creating a BOM,
while entering the line item, with a material number,
when I enter the UOM for the material, which is the alternate UOM maintained in the material master (already)
I am still getting this error message
"Unit of measure DKG not supported for material XXXXX in plant XXXX"
Wishing for a solution at the earliest.Hi,
Thanks for the replies, but my issue is not yet solved.
I have checked that earlier
It works that way
But my issue is i have data ( in a different server), such that
the bom is accepting a UOM that is defined in the Alternate UOM and not maintained as the Unit of Issue.
I am trying to replicate the same thing here but when I add an alternate UOM, which is not in Unit of Issue, then error message is thrown while bom creation.
Are any configs to be checked
Awaiting more responses.
Thanks -
In Ztable creation, How can we display error message for a 'To date' field.
Hi all,
I have a requirement like this.
There r two fields in ztable. From date and To date.
The field 'To date' in table ZKM007 is taking before date than From date field.
To date should always be greater than from date i need to throw an error or don't allow to enter date if date is less than From date.
How can we do this?
Can any one help on this?
Rewards to all.
Thanks & Regards,
Anu.I have written below code at event "Creating a new entry" (05) in table maintainance generator.But it is not working. If we give the to date < From date ,
it is saving.
Can any one help on this code? Pls Give me code And which event i have to put this?
***INCLUDE LZEXE3F01 .
FORM AT_entry.
IF ZEXE3-TODATE LT ZEXE3-FROMDATE.
MESSAGE I001(0) WITH 'ENTER TO DATE GREATER THAN FROM DATE'.
ENDIF.
ENDFORM.
Rewards to all.
thanks
Anu. -
F4 Help for the selection screen field
Hi Gurus,
I have to display F4 help for a selection screen field. i am using following code:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CODE'
dynpprog = lw_repid
dynpnr = sy-dynnr
VALUE_ORG = 'S'
TABLES
value_tab = gi_text
field_tab = li_fields_tab
return_tab = pi_return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
001 test
001 test1
but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
Please help me out.
Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.Sachin,
I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
REPORT zktest01 .
DATA :
BEGIN OF value_tab OCCURS 0,
field LIKE e070-trkorr,
text LIKE e07t-as4text,
END OF value_tab.
DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
PARAMETERS : p_field LIKE value_tab-field,
p_text LIKE value_tab-text. "NO-DISPLAY.
INITIALIZATION.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'FIELD'.
t_fldtab-langu = 'E'.
t_fldtab-position = 1.
t_fldtab-offset = 0.
t_fldtab-fieldtext = 'Key'.
t_fldtab-reptext = 'Key'.
t_fldtab-leng = 20.
t_fldtab-intlen = 20.
t_fldtab-outputlen = 20.
t_fldtab-datatype = 'CHAR'.
t_fldtab-inttype = 'C'.
t_fldtab-headlen = 20.
t_fldtab-keyflag = 'X'.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'TEXT'.
t_fldtab-position = 2.
t_fldtab-offset = 20.
t_fldtab-fieldtext = 'Text'.
t_fldtab-reptext = 'Text'.
t_fldtab-leng = 60.
t_fldtab-intlen = 60.
t_fldtab-outputlen = 60.
t_fldtab-headlen = 60.
t_fldtab-keyflag = ' '.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
value_tab-field = '101'.
value_tab-text = 'dddd'.
APPEND value_tab.
value_tab-field = '202'.
value_tab-text = 'aaaa'.
APPEND value_tab.
t_dynmap-fldname = 'FIELD'.
t_dynmap-dyfldname = 'P_FIELD'.
APPEND t_dynmap.
t_dynmap-fldname = 'TEXT'.
t_dynmap-dyfldname = 'P_TEXT'.
APPEND t_dynmap.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FIELD'
dynpprog = 'ZKTEST01'
dynpnr = '1000'
dynprofield = 'P_FIELD'
value_org = 'S'
TABLES
field_tab = t_fldtab
value_tab = value_tab
return_tab = t_rettab
dynpfld_mapping = t_dynmap
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
ENDIF.
START-OF-SELECTION.
Jeffrey Satriadi -
Regarding Selection-Screen Field Display
Hi All,
I have issues with Selection-Screen field display.
The Actual issue is i had declared a selection screen field as: <b>s_exgen FOR embk-exgen</b>.
<b>EMBK-EXGEN</b> is actually <b>20</b> Char length field.
But in output display it is being shown as <b>18</b> Char field though i can type in all <b>20</b> characters.
But <b>display</b> restricted to <b>18</b> Characters only.
Can anybody give me the solution for the same!
Thanks in advance.
Thanks & Regards,
Prasad.Hi,
You can decrease the visible length of the field but you can not increase more than database field length. check SAP help on this :
select-options: s_exgen FOR embk-exgen VISIBLE LENGTH 5.
... VISIBLE LENGTH vlen
Effect
This addition allows you to shorten the visible length of the corresponding screen field on the selection screen to vlen.
Variant 2
SELECT-OPTIONS sel FOR (f).
Additions as in variant 1.
Effect
In this variant, (f) must be a field containing the name of the actual reference field at runtime. The system creates the LOW and HIGH fields as character fields with length 45. However, their appearance on the selection <b>screen is inherited from the reference field whose name is contained in field f at runtime.</b>
Regards
Appana -
While creating po i want to display 'ERROR MESSAGE'
Hi
experts
In tcode ME21N .
when we created PO under COMPANY CODE if vendor is not in company code PO is craeted .
eg
comapny code 1000 .
vendor = rajesh .
if comapny code 2000 and vendor 'RAJESH' is not in comany code then
when we save 'i want to diplay ERROR MESSAGE '(WHILE SAVING PO).''VENDOR IS NOT IN COPMANY CODE'
PLZ HELP ME OUT.
THANKS
AJAY.hi
i used badi but if the vendor between 1000 or 2000 then po wiil be save but it gives error whille saving po.
error"enter proper vendor".
I also used *FUNCTION EXIT_SAPMM06E_012. same problem is comming.
.*method IF_EX_ME_PROCESS_PO_CUST~CHECK.
BREAK:MIL_ABAP.
data it_items type purchase_order_items.
data wa_item type purchase_order_item.
data wa_data type mepoitem.
data it_data type table of mepoitem.
data wa_header type mepoheader.
DATA: IT_DATA1 TYPE TABLE OF MEPOHEADER.
CLEAR wa_header.
call method im_header->get_data
receiving
re_data = WA_HEADER.
IF NOT wa_HEADER-LIFNR EQ '1000' or not wa_HEADER-LIFNR EQ '2000'.
MESSAGE e000(zmm01) WITH 'Enter Poper Vendor'.
ENDIF.
endmethod.
THANKS
AJAY. -
Display error message as as status message on the screen
Hi all,
How to display error message as as status message on the screen
The requirement is if I call the screen, it should get with the error message in the status bar. If I write with error message 'E' error mesage information displays and when I click on exit, it leave the current transaction.
if i display success message and use display like 'E' it display the error message but if i save it save the transaction.
i cannot use leave to screen also because of subscreen. if i use leave to screen system display set screen not allowed in subscreen.
so i want to stop the processing or do not allow the transaction to complete on the message.Hi
displaying error message like status message will help u?
try the below code
MESSAGE 'Error' TYPE 'E' DISPLAY LIKE 'S'.
cheers
shibu -
Display error message from SLG1 on shopping cart screen
I have implemented a 'BBP_CATALOG_TRANSFER' badi. I am adding all the custom error messages in ET_SC_MESSAGES export parameter of this badi. As a result of this, all the custom error messages added in the above parameter, gets logged in the application log SLG1 automatically and I can see those custom messages in SLG1. Now how to display this message from SLG1 on the shopping cart screen on the top where you normally see standard error messages in red.
Can anyone please help me on this?
Thanks,
KrupaHi
Which SRM version are you using ?
I have not tried this... but I think this is not possible to display error messages
using BBP_CATALOG_TRANSFER BADI.
<u>Try to code your logic in using BBP_DOC_CHECK_BADI for filter type - BUS2121 (shopping cart). You need to add your custom message in ET_MESSAGES [] table.</u>
<b>For sample coding, refer to the link below -></b>
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/bbp_doc_check_badi-CheckPurchasingDocument&
<b>Hope this will definitely help.</b>
Do let me know.
Regards
- Atul -
Selection screen fields in which values have been entered
Hi All,
Is there any standard function module which enables us to determine which fields on the selection screen have values entered for them. In other words, I wish to determine which selection screen fields are no longer initial.
Thanks and Regards,
Vidya.Hi,
Why cant you simply use in this way?
if sel_screen_field1[] is not initial. "for selet-options
endif.
if sel_screen_field1 is not initial. "for parameters
endif.
is it not suitable for your case?
//Kothand -
How to display the selection screen fields for selected checkboxes
Hi all,
I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
Thanks
sriman.hi,
Try this code
report z_13317_sdn2.
tables : mara, marc, dd03l.
parameters : p_chk1 as checkbox user-command ABC,
p_chk2 as checkbox user-command PQR,
p_chk3 as checkbox user-command XYZ.
select-options : s_matnr for mara-matnr modif id A,
s_ersda for mara-ersda modif id A,
s_werks for marc-werks modif id B,
s_lvorm for marc-lvorm modif id B,
s_tab for dd03l-tabname modif id C.
data: v_chk1,
v_chk2,
v_chk3.
at selection-screen output.
loop at screen.
if screen-group1 = 'A' or
screen-group1 = 'B' or
screen-group1 = 'C'.
screen-input = 0.
modify screen.
endif.
endloop.
loop at screen.
if v_chk1 = 'X'.
if screen-group1 = 'A'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk2 = 'X'.
if screen-group1 = 'B'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk3 = 'X'.
if screen-group1 = 'C'.
screen-input = 1.
modify screen.
endif.
endif.
endloop.
at selection-screen.
if sy-ucomm = 'ABC'.
if v_chk1 = ' '.
v_chk1 = 'X'.
else.
v_chk1 = ' '.
endif.
endif.
if sy-ucomm = 'PQR'.
if v_chk2 = ' '.
v_chk2 = 'X'.
else.
v_chk2 = ' '.
endif.
endif.
if sy-ucomm = 'XYZ'.
if v_chk3 = ' '.
v_chk3 = 'X'.
else.
v_chk3 = ' '.
endif.
endif.
Regards,
Sailaja. -
Error message for the select options
hi.
i want to throw thw error message if the user enters the value not valid(not in the range) for the zregion1 of zbwcntry of the select options.
and user should be able to correct it before moving ahead.
Also,iis not a mandatory field,So if it is initial,it can b blank.
but if the input doesnot lie in the range,it should give error message on the selction screen.
please guid with the line of codes.Check out this code:
TABLES: PERNR.
SELECT-OPTIONS VO_PERNR FOR PERNR-PERNR.
AT SELECTION-SCREEN ON VO_PERNR.
IF VO_PERNR IS INITIAL.
MESSAGE 'Enter some employee IDs' TYPE 'E' DISPLAY LIKE 'S'.
ELSE.
IF '000001' NOT IN VO_PERNR.
MESSAGE 'Employee id: 1, not selected' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
ENDIF.
Maybe you are looking for
-
Error while Loading the validator-rules.xml in Struts 1.2
Hello Guys, I am trying to use the Struts 1.2.4 on Jdk1.3 inside WSAD5.1 and i get the following error when loading the application. It breaks on the fist line inside validator-rules.xml witht hte following error. My first line in the validator-rules
-
Query on Mail Receiver Adapter
Hello Experts, I am using Asyn Proxy to Mail Scenario. Mail receiver adapter generating the Mail with Excel file attachment by using the following details. R3 coding (Proxy calling code):- G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-FROM = From M
-
Header Text for Purchase Requisition
Problem Description: Is there a way Header text can be configured / customized for purcahse requisitions just as we do for POs and then defined to be copied to purchase order? I know Header Note is available on Pur Req but comments in this section re
-
How to set the option Bit-mapped indexes to true ?
Hi, I a not a an Oracle Administrator. Usually, I just use Oracle as developper. I have got a Oracle 10g database. I can not import data in my database because the Bit-mapped options is not set. When I type select banner from v$version I get this res
-
Transparency Issues in Adobe Flash Cs3
Insert>New Symbol>Movie Clip File>Import>Import to stage>then I import my series of images I made in Photoshop that I saved as transparent png. images. that have transparent backgrounds. Then I go back to scene 1. I insert some keyframes on the time