Help to display error message
Hi everyone, here is my code, I need help where there are question marks :
START-OF-SELECTION.
SELECT * INTO CORRESPONDING FIELDS OF TABLE t_table2
FROM ztmm_fourho.
IF ??????
SELECT belnr hkont shkzg mwskz wrbtr FROM bseg
INTO CORRESPONDING FIELDS OF TABLE t_table1
FOR ALL ENTRIES IN t_table2
WHERE hkont = t_table2-zaccnt AND
gjahr = p_year AND
bukrs = p_comp.
ELSE. ????
ENDIF.
My problem is the following : t_table2 is a table with 2 columns both containing a char type. I would like to perform the "SELECT" only if for at least one line contained in t_table2 both columns ARE filled, meaning that I would like to display an error message (in the "else" condition) if for some lines, only the first column contains some information. In the code above, ztmm_fourho is a custom database table previously filled in through transaction code SM30;
any help would be much appreciated and rewarded,
CK
START-OF-SELECTION.
SELECT * INTO CORRESPONDING FIELDS OF TABLE t_table2
FROM ztmm_fourho.
IF sy-subrc = 0.
loop at t_table2.
if t_table2-field2 is initial.
v_flag = 'X'.
exit.
endif.
endloop.
endif.
IF v_flag is initial.
SELECT belnr hkont shkzg mwskz wrbtr FROM bseg
INTO CORRESPONDING FIELDS OF TABLE t_table1
FOR ALL ENTRIES IN t_table2
WHERE hkont = t_table2-zaccnt AND
gjahr = p_year AND
bukrs = p_comp.
ELSE.
*error message ..
ENDIF.
Similar Messages
-
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 -
Display error message in user-exits for ME21n
Hi,
I want to give error message in exit EXIT_SAPMM06E_013
but it is getting displayed as information and gets roll back .
Can anyone help to display error message and stop there itself so that to give corret data and save.
the code in this exit is as below.
IF I_EKKO-BUKRS = '0800'.
CLEAR:V_FLAG.
READ TABLE TEKPA WITH KEY PARVW = 'ZN'.
IF SY-SUBRC NE 0.
MESSAGE E000(ZD)."'XXX' TYPE 'E'.
ENDIF.
ENDIF.
Thanks,
Sureshcheck this
EXIT_SAPMM06E_012 to display error message
especially look at the last post , adding the log. -
I have been using CS6 for two years without incident. Suddenly the Media Encoder stops working, showing APPCRASH and displaying error message about WatchFolder.dll - I tried uninstalling and re-installing to no avail - can anyone help?
Hi Mylenium,
Thanks for your response.
Here is the error information showing up:
Problem signature:
Problem Event Name: APPCRASH
Application Name: Adobe Media Encoder.exe
Application Version: 6.0.0.382
Application Timestamp: 4f62fcf1
Fault Module Name: WatchFolder.dll
Fault Module Version: 6.0.0.382
Fault Module Timestamp: 4f62f37f
Exception Code: c0000005
Exception Offset: 0000000000007899
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 4105
Additional Information 1: 9a62
Additional Information 2: 9a620826d8ae4a2fa8b984b39290a503
Additional Information 3: 1fb3
Additional Information 4: 1fb304eee594288faeefbf1271b70d37
I am using a PC Windows 7 -
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 -
Displaying error messages in table...
Hi All,
How can we display error messages in a table in a bsp page.
I am filling an internal table in OnInputProcessing on some event with all the error messages to be displayed.
Table sould have two columns
1)Graphic depending on error type.
2)Error message.
Thanks,
Anubhav.Hi Graham,
The solution is perfect!
One more thing...when the page is displayed with errors table , i need to set focus on the table.
My code is:
<htmlb:gridLayoutCell columnIndex="1" rowIndex="1" id="fourthmain">
<% if itab_message is not initial .%>
<table class=""urGridLayout" border="1" cellpadding="2" id="err_tab">
<%
loop at itab_message into wa_message.
%>
<tr>
<td class="urCoB2Whl">
<% case wa_message-typ.
when 'S'. %>
<htmlb:image src = "ICON_MESSAGE_INFORMATION" />
<% when 'error'. %>
<htmlb:image src = "ICON_MESSAGE_ERROR" tooltip="Error" />
<% when 'W'. %>
<htmlb:image src = "ICON_MESSAGE_WARNING" />
<% when 'I'. %>
<htmlb:image src = "ICON_MESSAGE_INFORMATION" />
<% when 'A'. %>
<htmlb:image src = "ICON_MESSAGE_CRITICAL" />
<% endcase. %>
</td>
<td><font size="2" face="Times">
<%= wa_message-msg%>
</font>
</td >
</tr>
<%
endloop.
%>
</table>
<% refresh itab_message. %>
<% endif. %>
</htmlb:gridLayoutCell>
I tried using
<phtmlb:focusRect focusElementId="err_tab"/>
and also:
<s cript="text/javascript">
daument.farm.elementid.focus();
</s cript>
But failed...pls help me out.
Thanks,
Anubhav. -
How to display error message in Billing Output Type (VF03).
Hi,
could anyone suggest how do i display error message via billing (VF03) output type?i want to display an error message from my sapscript program.
*determine discount
it_zmas-discount = it_zmas-gross_value - zkwert.
MODIFY it_zmas.
ELSE.
MESSAGE ID 'Z0' TYPE 'S' NUMBER '999' WITH 'Please maintain cust pricing grp 34 for ' wa_zmas-matnr.
p_proc_screen = 'X'.
ENDIF.
when user enter billing doc no in vf03, user will click 'issue output type' and select their output type to be printed out.
if there's an error in the print program, it should promt out an error message and do not allowed user to print preview and print the form out.
what i had did previously, i prompt the error message and disable the print preview button. i think its not a good solution and i am not sure how to stop the form from not printing it out.
i was wondering is there any user exit of the output type, vofm (which i had this solutions from my previous question, but unsure how to use it) or any other solutions.
please help. -
Display error message in WEBUI using BADI - ORDER_SAVE-CHECK_BEFORE_SAVE
Hi,
I am trying to display error message using BADI - ORDER_SAVE (Method-CHECK_BEFORE_SAVE) based on certain conditions when the document is saved from WEB UI.
I have written it like below:
If (some conditions).
Message E000 with 'Error in SAVE' RAISING DO_NOT_SAVE.
endif.
I mentioned my message class everything in class, and it is fine.
However, it is not displaying my error message. It is displaying standard information message saying "Document Could not be saved'.
Could you please help me out, how can I display my custom message.
Thanks,
SandeepHi Sandeep,
U can use FM to raise a message from order save badi.
Inside the if condition, u can raise do_not_save.
If (some conditions)
CALL FUNCTION 'CRM_MESSAGE_COLLECT'
EXPORTING
iv_caller_name = 'ORDERADM_H'
iv_ref_object = iv_guid
iv_ref_kind = 'A'
iv_msgno = '000'
iv_msgid = 'zcrm'
iv_msgty = 'A'
iv_msgv1 = c_text1
iv_msgv2 = c_text2
iv_msgv3 = c_text3
EXCEPTIONS
not_found = 1
appl_log_error = 2
OTHERS = 3.
IF sy-subrc NE 0.
ENDIF.
RAISE do_not_save.
ENDIF. -
Dear all,
I have a requirement in WEB DynPro, Our ESS system using WEB DynPro.
In ESS leave system need to display error message.ie
once leave approved, employees are not allowed to change the leave.
Any idea to write code to display error message.
Thanks.
Shruthi.Error messages can be displayed in two ways:
1. In the message area
2. As a popup
Below are the code snippets for it.
1.
* 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.
CALL METHOD lo_message_manager->report_error_message
EXPORTING
message_text = 'Error message'.
2.
"Display Popup
DATA: l_popup TYPE REF TO if_wd_window,
l_text TYPE string_table.
APPEND `Error Message` TO l_text.
l_popup = wd_comp_controller->wd_get_api( )->get_window_manager( )->create_popup_to_confirm(
text = l_text
close_button = abap_false
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_error
window_title = 'Error'
window_position = if_wd_window=>co_center ).
l_popup->open( ).
Hope this helps! -
Display error message in Campaigns - Planning profile templates
Hi experts,
I am facing an issue while trying to display error message in plannign profile template for campaigns.
Issue is that even though i am able to add the error message to the parent campaign message container, it is not being displayed on the UI screen message area(refresh is not happening) until the next screen refresh happens through another event like change of planning profile drop down / f2 pop up being closed on the message area etc.
I need to display the error message as soon as it gets added in the global message container.Is there any way that i can refresh the UI from this method which would display my error message? I think round trip might work here
I am tryign to add the message in the method IF_FLEX_DATA_PROVIDER~MODIFY_DATA of component KFPED_LAYOUT .
But it doesn't get reflected in the message area.
Appreciate a lot if anybody can help me out here.
Thanks
Swapna.Closing the thread. Resolved myself .
Thanks.
Swapna V. -
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 -
ITunes displays error message -69 when syncing iPhone
hi,
iTunes displays error message -69 when i sync my iPhone 3GS, this is just for syncing music to my iPhone. apps syncing is ok.
can anyone help please?
thanksFollow the directions in this support article:
http://support.apple.com/kb/HT1210 -
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 -
Display error message on the user profile modification page identity system
HI All,
I have created a workflow for chang attribute for email id. I have associated an external action to th workflow id which will check the emailid uniqueness in OID.
When an end user login to OAM user manager and clicks on update my profile, use can see a button with modify request beside email id. when user modifies email id and save the changes, we are able to display email id already exist message in the next page of user profile. but we need to display the message on the same page.
Can any one help us.
Thanks in Advance.You can do this using java script throwing an alert popup or you can check if the fields are initial in oninputprocessing and fill a variable like gv_error = 'Enter values of mandatory fields.' and display the same in layout using
<phtmlb:messageBar id = "messageBar"
type = "<%= gv_severity_str %>"
text = "error"/>
See this thread for more..
How to display error messages in bsp page
search the forum before posting a new thread.... -
Displaying error messages from application log
Hi,
I am using the function module RV_DELIVERY_CREATE for creating delivery in my program. If the sy-subrc is not zero i.e if delivery is not created, i have to display error messages collected inside the application.How can i do this ?
The object nd subobject are existing in SLG0 but when i
tried to see the object and subobject in SLG1 transaction , no logs were found.
Do we need to activate the object and sunobject somewhere before logging can take place??
I am using the following code in my program to display the logs but it is displaying no logs found:
CALL FUNCTION 'APPL_LOG_SET_OBJECT'
EXPORTING
object = 'ZCH_SCL'
subobject = 'DL'
LOG_HANDLE = ' '
NO_LOG = ' '
EXCEPTIONS
OBJECT_NOT_FOUND = 1
SUBOBJECT_NOT_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'APPL_LOG_INIT'
EXPORTING
OBJECT = 'ZCH_SCL'
SUBOBJECT = 'DL'
LOG_HANDLE = ' '
EXCEPTIONS
OBJECT_NOT_FOUND = 1
SUBOBJECT_NOT_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
PERFORM z_call_rv_delivery_create. " to call fm rv_delivery_create
IF sy-subrc ne 0.
CALL FUNCTION 'APPL_LOG_DISPLAY_INTERN'
EXPORTING
object = 'ZCH_SCL'
subobject = 'DL'
title_list_screen = 'Error Logs'
COLUMN_SELECTION = '11112221122 '
COLUMN_SELECTION_MSG_JUMP = '1'
EXTERNAL_NUMBER_DISPLAY_LENGTH = 20
I_S_DISPLAY_PROFILE =
IMPORTING
NUMBER_OF_PROTOCOLS =
EXCEPTIONS
OBJECT_NOT_FOUND = 1
SUBOBJECT_NOT_FOUND = 2
OTHERS = 3
thanks,
vartikaHi Vartika,
you need to save that log after creating and appending to it.
here is a code to save that log.
If log created, save to database
if e_bal_hndl is not initial.
refresh: bal_hndl.
append e_bal_hndl to bal_hndl.
call function 'BAL_DB_SAVE'
exporting
i_client = sy-mandt
i_in_update_task = 'X'
i_t_log_handle = bal_hndl
importing
e_new_lognumbers = log_no
exceptions
log_not_found = 1
save_not_allowed = 2
numbering_error = 3
others = 4.
u have to write this code after appending info to Log.
hope this will help.
regards,
vikas
Maybe you are looking for
-
2/4 user computers asking for login info for CR
Hello, I have deployed a VB application built in VS 2008 and my database is MySQL. My crystal reports version is 10.5. I deployed the VB application on 4 user computers and 2 of them I can run the application and the reports show up with no issues.
-
i am trying to send a file 17 pages pdf.......in an email, it trys to send then aol tell me problems with sending but nothing. Is the file too large to send as an attachement? Thanks
-
I cannot log in to Cornell bird count website
I am trying to log my bird count at the Cornell website for the Great Backyard Bird Count, but every time I try to log in Safari gives me an error message: too many redirects. I have emptied my cache and I have cleared history and website data. Stil
-
Deskjet 6980 will not print with Windows 7
This printer worked fine until a recently. Now I cannot print from Windows 7 desktop computer. The printer shows that it is offline. The report page from the printer tells me everything is connected and OK. I can print from my lap with XP Home Editio
-
Hi, I'm very new to CRM and I'm using CRM 2011. I have googled and got CRM SDK having sample C# codes for CRM customization. But Im confused how we integrate the code we are writing into CRM since it is a C# code that I can run separately through Web