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.
Similar Messages
-
Editable ALV - how to throw an error message for a specific line & field
Hi all,
I've implemented an editable ALV and also the ON_DATA_CHECK event to check the values, entered in the ALV. So this works fine and I can check the values.
But now, I want to throw an error message corresponding to the field in the ALV, where the error occured.
How can I throw this error message corresponding to a specific line/field in the ALV?
I was using REPORT_ATTRIBUTE_ERROR_MESSAGE and REPORT_ELEMENT_ERROR_MESSAGE but without success.
I'm also using a loop over the "CHANGES" in the ALV and within this loop, I use
elem_alv = node_alv->get_element( index = <change>-element_index )
to get the element for the message.
CALL METHOD lo_message_manager->REPORT_ELEMENT_ERROR_MESSAGE
EXPORTING
MESSAGE_TEXT = 'my message'
ELEMENT = elem_alv
* ATTRIBUTES =
* PARAMS =
* MSG_USER_DATA =
* IS_PERMANENT = ABAP_FALSE
* SCOPE_PERMANENT_MSG = CO_MSG_SCOPE_CTXT_ELEMENT
* MSG_INDEX =
* CANCEL_NAVIGATION =
* IS_VALIDATION_INDEPENDENT = ABAP_FALSE.
2.) is it right, that for an editable ALV, I can't use the WDDOBEFOREACTION to do the checks?
If I try to use this, I can't get the values of my ALV table to check it.
Thanks,
AndreasHi Andreas,
I have tried to replicate your problem and I am getting the desired output. I have a row by name TEMP_NEW in my ALV and I want to throw an error message whenever the user enters a value of 4 for that particular field. Please find my coding as below. The important thing is where we perform the actual comparison between the r_value and 4. r_value is defined in SALV_WD_S_TABLE_MOD_CELL as reference to type DATA. So suppose the user enters a value of say 3 in the TEMP_NEW field of the ALV then r_value would contain 3 but if you observe its type in debugging mode it would be as TYPE REF TO I and not TYPE I. So you cannot directly say something like:
"if ls_modified_cells-r_value = 3" as this would lead to a syntax error. Define a field-symbol say <temp> and then use it to get the actual value into it by saying like:
ASSIGN ls_modified_cells-r_value->* TO <temp>.
Then you can use this <temp> for comparison in your IF statement like:
IF <temp> = 3.
Find the entire coding as below:
METHOD check_data.
DATA: lr_node TYPE REF TO if_wd_context_node,
lr_element TYPE REF TO if_wd_context_element,
ls_modified_cells TYPE salv_wd_s_table_mod_cell.
FIELD-SYMBOLS <temp> TYPE data.
" get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
lr_node = wd_context->get_child_node( name = 'NODE' ).
LOOP AT r_param->t_modified_cells INTO ls_modified_cells.
lr_element = lr_node->get_element( index = ls_modified_cells-index ).
IF ls_modified_cells-attribute = 'TEMP_NEW'.
" Get the value extracted into the field symbol from the reference variable
ASSIGN ls_modified_cells-r_value->* TO <temp>.
" Use the value present in this field-symbol for your comparison
IF <temp> = 4.
" report message
CALL METHOD lo_message_manager->report_attribute_error_message
EXPORTING
message_text = 'Sample message text'
element = lr_element
attribute_name = ls_modified_cells-attribute.
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
Hope this helps resolve your problem.
Regards,
Uday -
DISPLAYING ERROR MESSAGE FOR TABLE
How can I dispaly error message for table havong input fields from message pools,so that when I clicks on that message,that should point to that particular field having error
Thanks
FahadHi Fahad,
From Message pool retrive data using text accessor
IWDTextAccessor textYesAccessor = wdComponentAPI.getTextAccessor();
String tempYes = textYesAccessor.getText(IMessageSample.<YES>);
You can report error message like.
if(tempYes !=null)
reportException(String message, boolean cancelNavigation);
See this link for Webdynpro API..
https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/index.html
Regards
Suresh -
How can we trigger error message in BADI PARTNER_UPDATE
Hi All,
I have implemented a BADI PARTNER_UPDATE. In this I have validation ( Error Message ) on saving buisness partner.
It is giving the error message but it freeze all the fields. On pressing enter it goes for short dump.
In short dump it gives error The COMMIT WORK processing must not be interrupted.
Kindly suggest me that how can we pass error message and it also does not freeze the fields.
Regards,
Narendra GoyalHi Narendra,
How are you trying to display message.
Is it using message service class instance of message statement (which should not be used, as that is for GUI messages) or using collect FM or by adding to genil message class container.
Please try different approaches and see what works for you.
Thanks,
Rohit -
How can I display the range for LastFullMonth in the header of a report
How can I display the month for LastFullMonth in the header of a report run in the past so that a report that ran sept 1 2009 selecting data for LastFullMonth (august 2009) displays sept 2009 in the header even if there is no data selected by the report?
Good,
Sometimes I answer these questions and completly miss it....
( lack of understanding on my part ) -
public class Userdefined extends Exception {
Userdefined(String sparam){
System.out.println(sparam);
Userdefined(){
private static int acno[]={100,105};
private static double bal[]={100.00,200.00};
public static void main(String args[]) {
try{
for(int i=0;i<2;i++)
System.out.println("ACCCCNO------>"+acno[i]+"BAl------>"+bal);
if(bal[i]<150.00)
Userdefined udexp=new Userdefined("bal less");
throw udexp;
catch(Userdefined e){
System.out.println("--->"+e);
How can i display the message "less amt" using my parmeterized constructor.VinayTK wrote:
How can i display the message "less amt" using my parmeterized constructor.Erm ... what? You can't --- at least not with the stuff you've got there.
A properly formed question, with some idea of what you're trying to accomplish would be a huuuuge help.
Winston
BTW: Congratulations. At my age, 'first's in computing are rare; but it's definitely the first time I've seen an Exception class with a main() method.
Edited by: YoungWinston on Sep 1, 2009 9:46 AM -
How can I overcome error message "missing or invalid personalisation info" when trying to re-install Elements 3. I need to re-install Elements 3,
@ Alternatively purchase an Elements 9 or 10. Holding Elements13 but that needs OS 10.8 (Lion) and much of my data is in Appleworks, which is incompatble
Apologies if I am using this incorrectly. My first time hereHi. Thanks for coming back to me. I am using Mountain Leopard (OSX 10.6.8). Had major problem and have re-formatted my H/D and re-installing software. Must have lost a file in the process. Would upgrade to Lion only I have a lot of vital data in Officeworks, but that is incompatible with Lion.
-
How can I set my Messages to view by date ?
How can I set my Messages to view by date ?
I don't like them to organize by thread.
Are there any software to help me?You can't. By design and intention messages are provided/organized in conversation/threaded format by each contact you exchange messages with and the messages within each conversation are sorted by date.
There is no 3rd party software/apps available that can change this with the included Messages application. -
HI,How can i set delta option for costumised Generic data source
Hi Sir/Madam,
How can i set delta option for costumised Generic data source.
Regards,
Vishali.R
Please search the forum before posting a thread
Edited by: Pravender on Aug 15, 2011 1:26 PMHi,
Go to RSO2 transaction and click on change then on the tool bar click on Generic Delta button. In the next popup you can set your delta.
Regards,
Durgesh. -
How can i display warning messages in user exit EXIT_SAPLMGMU_001 (MM02)
Hi all,
while modifying the material master using MM02, i have added new conditions to display messages in user exit EXIT_SPALMGMU_001.
But using this user exit i am not able to display warning messages.
Can you please help me with this?
Sample code which i have included in exit :
SELECT SINGLE mstav FROM mara
INTO w_mstav
WHERE matnr = wmara-matnr.
IF wmara-mstav NE w_mstav.
IF wmara-mstdv NE sy-datum.
wmara-mstdv = sy-datum.
MESSAGE w177(z03_mm) WITH text-s04 text-s21.
ENDIF.
ENDIF.
Thank you all in advance.As written in the SAP documentation of the Enhancement , you can only raise error message using a
MESSAGE .. RAISING APPLICATION_ERROR.
You could manage the "warning" yourself, sending an error first time and keeping a trace of the check in some STATICS variable, and not raising the error again if data input remains unchanged between two call of the include.
<i>----
EXIT_SAPLMGMU_001
Where Is the Customer Exit - EXIT_SAPLMGMU_001 called?
The customer exit is in function module MATERIAL_UPDATE_ALL. The
function module checks the data for errors (logical relationships,
foreign keys, fixed domain values, and so on) when the material master
is updated.
Use
o New fields
You can make checks possible for new fields of your own. These
checks must be identical to the checks that you carry out for your
new fields in online maintenance.
o Existing fields
For existing fields, you can extend and intensify the checks.
You can also change data for descriptions and general material data
(MARA). For example, the descriptions can be generated from attributes
of the material.
Limitations
You cannot bypass existing checks.
Interface to Application
The respective data of the current logical transaction is contained in
the structures, for example, in structure WMARA for MARA. Nonrelevant
structures are transferred with their initial values.
General material data that can be changed (CMARA) has the structure
MARU. This MARA view contains fewer internal fields than MARA itself. If
WMARA is filled, CMARA is also filled when accessed.
The customer exit contains the exception APPLICATION_ERROR for your
self-defined error situations.
Using the language element MESSAGE .. RAISING APPLICATION_ERROR, you can
terminate the current (logical) transaction and display your message in
the log. </i>
Regards -
How to create a error message for Deleted batch while creating a PO
Hi ,
Can any body tell me how to create error message for a deleted batch while creating a PO in ME21n,
when a PO is created for a deleted batch at GI &GR lebel it is showing a error message,
but i want to show a error message while doing the PO creation.
Thanks,
Sachhiin badi me_process_po_cust u can put this message
METHOD if_ex_me_process_po_cust~check. -
Display error messages for each material
Hi All,
I am using a BAPI which gives errors in return table.I am executing this BAPI for several materials in a LOOP.I need to display the error messages for each of these materials as shown below:
Material 1:
error1
error2
Material 2:
error 1
error 2.
What is the best way to display this?Also plz let me know how to use REUSE_ALV_HIERSEQ_LIST_DISPLAY?
Thanks,
Rakesh.I did the same thing in the below code, go thru it and check it.
* calling the BAPI to update the Asset Master AS02
loop at it_final into is_final.
* If updating of floor area only
if p_farea = 'X'.
* passing new area value to the BAPI
is_realestate-area = is_final-grufl.
is_realestatex-area = 'X'.
call function 'BAPI_FIXEDASSET_CHANGE'
exporting
companycode = is_final-bukrs
asset = is_final-anln1
subnumber = is_final-anln2
realestate = is_realestate
realestatex = is_realestatex
importing
return = it_return.
* If Asset Master is changed with out any errors
read table it_return with key type = 'E'.
if sy-subrc = 0.
flag = ' '.
else.
flag = 'X'.
* Call the COMMIT BAPI
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
wait up to 2 seconds.
endif.
* If the Asset Master is changed with out any errors
if flag = 'X'.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_green.
is_output-grufl_n = is_final-grufl.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting grufl_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
elseif flag = ' '.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_red.
is_output-grufl_n = is_realestate-area.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting grufl_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
endif.
endif.
* If updating of lease commencement date only
if p_ldate = 'X'.
* Passing new lease start date value to the BAPI
is_leasing-start_date = is_final-leabg.
is_leasingx-start_date = 'X'.
* Call the BAPI to change the Asset Master
call function 'BAPI_FIXEDASSET_CHANGE'
exporting
companycode = is_final-bukrs
asset = is_final-anln1
subnumber = is_final-anln2
leasing = is_leasing
leasingx = is_leasingx
importing
return = it_return.
* If Asset Master is changed with out any errors
read table it_return with key type = 'E'.
if sy-subrc = 0.
flag = ' '.
else.
flag = 'X'.
* Call the COMMIT BAPI
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
wait up to 2 seconds.
endif.
* If the Asset Master is changed with out any errors
if flag = 'X'.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_green.
is_output-leabg_n = is_final-leabg.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting leabg_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
elseif flag = ' '.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_red.
is_output-leabg_n = is_leasing-start_date.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting leabg_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
endif.
endif.
clear : is_final, is_realestate, is_leasing,
it_return, flag , is_output.
endloop.
* Display the report out with old and new values
PERFORM output_report.
*& Form output_report
* text
* --> p1 text
* <-- p2 text
*FORM output_report.
* DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
* is_layout TYPE slis_layout_alv.
** Sub routine for filling the field catalog
* IF it_fieldcat[] IS INITIAL.
* PERFORM field_fill USING it_fieldcat.
* ENDIF.
** Sub routine to set the layout
* PERFORM set_layout USING is_layout.
** Function module to display the data in ALV format
* CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
* EXPORTING
* i_callback_program = l_repid
* it_fieldcat = it_fieldcat
* is_layout = is_layout
* TABLES
* t_outtab = it_output
* EXCEPTIONS
* program_error = 1
* OTHERS = 2.
* IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
* ENDIF.
*ENDFORM. " output_report
*& Form field_fill
* text
* -->P_IT_FIELDCAT text
*FORM field_fill USING pt_fieldcat TYPE slis_t_fieldcat_alv.
* DATA : ls_fieldcat TYPE slis_fieldcat_alv,
* pos TYPE i VALUE 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'C_ICON'.
* ls_fieldcat-seltext_m = 'Change Status'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'BUKRS'.
* ls_fieldcat-ref_fieldname = 'BUKRS'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'ANLN1'.
* ls_fieldcat-ref_fieldname = 'ANLN1'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'ANLN2'.
* ls_fieldcat-ref_fieldname = 'ANLN2'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* IF p_farea = 'X'.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'GRUFL'.
* ls_fieldcat-ref_fieldname = 'GRUFL'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'GRUFL_N'.
* ls_fieldcat-seltext_l = 'New Floor Area'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ENDIF.
* IF p_ldate = 'X'.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'LEABG'.
* ls_fieldcat-ref_fieldname = 'LEABG'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'LEABG_N'.
* ls_fieldcat-seltext_l = 'New Lease St.Date'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ENDIF.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'MESSAGE'.
* ls_fieldcat-seltext_l = 'Status Message'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
*ENDFORM. " field_fill
Regards
Gopi -
How can I change the message for ( Find My I phone )
How can I change the message on ( Find my I phone )
I'm not sure if you can change the meesage but try here.
-
How can i display a message box when error comes in jsp?
Hi,
i need to display a message box whenever an error comes in my jsp. Actually my appln is that i am creating a bar chart using one applet by taking data from the database. When a user does not select a number data for y axis, now in the centre of the web page one java error is coming. "not in number format". it is looking very odd.
so i want to display the error in a message box whenever it comes as above. pls help me how can i do the same...
Regds,
Abhi...Hi,
thanx for ur response. so u mean to say that i can
display the errors in the web page itself instead of
displaying as a message box?Either way. You can have the JSP send a message to the applet to display a message box. Or you can just have the JSP do it. or you can have the applet detremine if the JSP would produce an error and then display the message it would display.
>
actually i am using servlets. jsp pages are used only
as the front end. all the background works are doing
in servlet only.It should be the same in any case. Is the applet connecting to the JSP pages or are you having the browser do it?
>
pls get back... -
How can i display units only for the result set
hi
i do not want to display units (example: $ or %) for my key figure columns but i want to display units to the result.
how can i do thatHi Surya,
I don't think it is possible to have both non-unit and unit in the same kf.
One potential workaround to do this is to create a calculated key figure/ formula that use the NODIM function for single values. Example: NODIM(0AMOUNT). Then, create a calculated key figure/formula that computes overall result on the same kf and supresses individual values but does not use NODIM....perhaps this can help you work out a solution.
Hope this helps.
Regards,
Petter
Message was edited by: M Petter
Maybe you are looking for
-
Moving iPhoto library to external drive
Is it possible to move an entire iPhoto library intact to an external drive. i.e. including all events and naturally all photo edits, descriptions, titles, and other META data? If so, how is it best accomplished please? (Using iPhoto 9.4.3)
-
I have a little sales point that only have one computer, i guess can i find some type of licence more economic than a professional or crm?
-
How can I output frequency readings of my signals using FFT?
Hi there, I need help in regard to the topic stated. Currently I have accquired a sine wave with frequency that vary, using one of the accquistion card by NI. I had converted it to a digital signal so that labview can read it. Now, I will like labvie
-
When I enter a new contact it disappears
I have been trying to add a new contact but when I do it disappears
-
Hi guys i have 2 files one will the header details and other will have line item details... how can i read both the files...combine the header and detail for particular sales order and then post and idoc for that .. for eg.. File Header SO1 header ..