Display error message in forms from function "verify_function"
Hi,
We have a number of users with our own created profile attached to them.
We have enabled the 'PASSWORD_VERIFY_FUNCTION' for our own profile.
Function "verify_function" is used to validate a user's password.
In "verify_function" we have used "raise_application_error" message in case password validation fails.
Example:
raise_application_error(-20001,'Password must be minimum 8 characters in length and maximum 30 characters long');Question) "raise_application_error" displays the error message only in SQL Plus prompt. How do I display the same message from Oracle forms?.
I have used DBMS_ERROR_TEXT & DBMS_ERROR_CODE in ON-ERROR trigger. This is not displaying the error message in forms in case validation failed in "verify_function". Oracle simply clears the username/password field with a new window. We want to display the error message that occured in "verify_function".
Thanks
use the following code in validating the item, e.g when-button-pressed
begin
verify_function;
exception
when others then
message(sqlerrm);
raise form_trigger_failure;
end ;
OR
instead of writing a procedure rewrite it as a function to return 1 if password is correct or 0 if password is wrong
Regards
Jihad
Similar Messages
-
How to send error message to forms from Database Trigger
Hi, Please help me to send error message to forms from Database Trigger?
RgDs,
Madesh.R.MYou are correct, the On-Error trigger is a Forms trigger. However, if your Form is going to display the error generated by the database stored procedure or trigger - you might not see the database error in your Form unless you check the DBMS_ERROR_CODE in the On-Error trigger and manually display the Error Code and associated Text. I've see this happen with a co-worker. The Form she was working on was based on a table with an Before-Insert trigger. Because she was not explicitely handling the error from the Before-Insert trigger in the Forms On-Error trigger, her Form appeared to halt for no reason at all. Once she added code to the On-Error trigger in the Form to handle the DBMS_ERROR_CODE, she discovered the trigger was producing an error and was able to show the error to the user in the On-Error trigger.
I understand the desire to keep as much as possbile in the database, but with that comes some extra coding in your Forms to handle this. This extra coding could easily be placed in a Forms Library, attached to a Form and called in the On-Error trigger. Your code could look like this:
DECLARE
/*This example assumes you have an Alert defined
in your Form called: 'ERROR' */
al_id ALERT;
al_text VARCHAR2(200); /* Max text of a Forms Alert message*/
al_btn NUMBER;
BEGIN
IF DBMS_ERROR_CODE != 0 THEN
/* Error code is ORA-00000 Normal Successful completion
So only handle non-zero errors */
al_text := DBMS_ERROR_CODE||':'||DBMS_ERROR_TEXT;
al_id := Find_Alert('ERROR');
set_alert_property(al_id, alert_message_text, al_text);
al_btn := show_alert(al_id);
END IF;
END;Your original question was "How to send error message to forms from Database Trigger?" The answer is you don't because Forms already gets the database error code and database message through the Forms DBMS_ERROR_CODE and DBMS_ERROR_TEXT functions. Look these up in the Forms help and it should clear things up for you.
Craig...
Edited by: CraigB on Jun 14, 2010 4:49 PM
Edited by: CraigB on Jun 14, 2010 4:49 PM
Edited by: CraigB on Jun 14, 2010 4:50 PM
Edited by: CraigB on Jun 14, 2010 4:51 PM
Edited by: CraigB on Jun 14, 2010 4:51 PM -
How to display error message in case of function module ?
In the report i was using " message-id " to display error message....
how to use in function module ?Hi,
Messages in Function Modules and Methods
Messages have two different functions in function modules and methods:
Normal Messages
If you use messages in function modules and methods without the RAISING addition in the MESSAGE statement, and the caller does not catch the message, the message is handled
normally according to the context in which it is called within the function module or method.
Triggering Exceptions with Messages
If you use messages in function modules and methods with the addition
... RAISING <exc>
the way in which the message is handled depends on whether the calling program handles the exception <exc> or not.
If the calling program does not handle the exception, the message is displayed and handled according to the context in which it occurs in the function module or method from which it
was called.
If the calling program handles the exception, the message is not displayed. Instead, the procedure is interrupted in accordance with the message type, and processing returns to the calling program. The contents of the message are placed in the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
Catching Message in the Calling Program
You can catch messages from function modules that are not sent using the RAISING addition in the MESSAGE statement by including the implicit exception ERROR_MESSAGE in the
EXCEPTIONS list of the CALL FUNCTION statement. The following conditions apply:
Type S, I, and W messages are ignored (but logged during background processing)
Type E and A messages trigger the exception ERROR_MESSAGE
Type X messages trigger the usual runtime error and short dump.
Catching messages is not currently supported for methods.
Regards,
Bhaskar -
How to display Error Message in APEX from Database Stored Procedure
Hello,
Using APEX version 3.2
DB version 9.2.0.8.0
Internet Explorer version 6
I have an After Submit Page Process that calls a stored procedure. In the exception section I'm using dbms_output.putline to display an error message, but the error message is not displayed in APEX. How can I have the error message generated from the stored procedure display in APEX?
Thanks so much.Hi Apex_Noob,
I created On Load - Before Header process that uses apex_application.g_notification := :P3_ROLE;I'm sorry but I'm not sure what you mean by "instead of using dbms_output.putline use :P1_ITEM"
I have the following code in my stored procedure
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Role does not exist');Thanks. -
Using Labview 6i and Matlab 6.1. I want to be able to see Matlab warnings and error messages either in the Matlab Command Window or in Labview itself. Currently Matlab is called by Labview (which is working). However I would like to debug and/or modify my Matlab script file to better understand how the two programs are interfacing. It is difficult since no data or messages can be displayed currently to the Matlab command window. I would like to change that if it is possible - Labview is suppressing that from happening. If not possible to send these
messages to Matlab Command Window can I make it at least possible to see Matlab's actual warnings and/or error messages in Labview?I don't think you can debug your Matlab script from labVIEW. The following webpage talks about this:
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/19106e318c476e608625670b005bd288?OpenDocument
My suggestion would be to write a script in Matlab and thoroughly test it before calling the script from a Matlab script node in LabVIEW.
Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect -
Raise_application_error is not displaying error message in my form
Hi,
I have created one procedure in order to display the error message in front end forms.But which is not display the error message in my form when call the procedure.
Please refer the code.
BEGIN
IF C_ERR%ISOPEN THEN
CLOSE C_ERR;
END IF;
OPEN C_ERR;
FETCH C_ERR INTO M_ERR_ARB_DESC;
CLOSE C_ERR;
RAISE_APPLICATION_ERROR(-20001,P_ERROR_CODE||' - '||M_ERR_ARB_DESC);
END;
Thanks & advance
Regards
MaranHi,
-------form program unit------
PROCEDURE RAISE_APP_ERR(P_ERR_CODE NUMBER) IS
alert_button NUMBER;
Raise_Exception EXCEPTION;
PRAGMA EXCEPTION_INIT(Raise_Exception, -20001);
BEGIN
--- called backend procedure
PRC_RAISE_APPLICATION(P_ERR_CODE);
EXCEPTION
WHEN Raise_Exception THEN
alert_button := SHOW_ALERT('raise_alert');
If alert_button = ALERT_BUTTON1 Then
Raise FORM_TRIGGER_FAILURE;
End If;
END;
---------- db proc----
CREATE OR REPLACE PROCEDURE PRC_RAISE_APPLICATION(P_ERROR_CODE IN HRM_ERR_CODE.HEC_ERR_CODE%TYPE
) AS
CURSOR C_ERR IS
SELECT HEC_ERR_ARB_DESC
FROM HRM_ERR_CODE
WHERE HEC_ERR_CODE = P_ERROR_CODE;
M_ERR_ARB_DESC HRM_ERR_CODE.HEC_ERR_ARB_DESC%TYPE;
BEGIN
IF C_ERR%ISOPEN THEN
CLOSE C_ERR;
END IF;
OPEN C_ERR;
FETCH C_ERR INTO M_ERR_ARB_DESC;
IF C_ERR%NOTFOUND THEN
M_ERR_ARB_DESC := 'UNKNOWN ERROR ';
END IF;
CLOSE C_ERR;
RAISE_APPLICATION_ERROR (-20001, P_ERROR_CODE||' - '||M_ERR_ARB_DESC);
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE_APPLICATION_ERROR (-20001, P_ERROR_CODE||'-'||'UNKNOWN ERROR ');
END ;
I tried the same but still i am not getting error message in Forms. -
A way to display error messages from the program
Dear all,
I am looking forward to display a set of error messages(in a internal table) during the execution of the program to the user.
I wanted to know the better way of displaying error messages from my program with more options.
Well I tried out using displaying errors as ALV list/Grid or as simple list processing.
But I found some stanadard transactions (Like in MM and FI where errors are shown in a better way, but failed to find out how they are done.
Please guide me.
Thanks in advance
AryanTry to use application logging it has a very good way to display a set of messages.
[http://abap4.tripod.com/Using_Application_Logging.html|http://abap4.tripod.com/Using_Application_Logging.html]
Run this report in se38 an example sap report to understand logging way to show a set of messages
Report Name : SBAL_DEMO_01
Edited by: Vighneswaran CE on Dec 19, 2010 3:01 PM
Edited by: Vighneswaran CE on Dec 19, 2010 3:11 PM -
How do i restore my iphone from "no Service". I tried to update my iphone 3G TO iOS 6.0. But it got stuck and now my itunes is displaying Error message: "there is no sim card installed in the iphone you are attempting to activate" and my iphone is without service. While i am trying to activate my ihone on wifi also it doesnt saying servers are temporary unavailable try after sometime. Kindly suggest
It sounds a lot like your phone was hacked or jailbroken to unlock it prior to your trying to update it.
If that is the case, it is nowpermanently bricked. -
How do i restore my iphone from "no Service". I tried to update my iphone 3G TO iOS 6.0. But it got stuck and now my itunes is displaying Error message: "there is no sim card installed in the iphone you are attempting to activate" and my iphone is without service. While i am trying to activate my ihone on wifi also it doesnt saying servers are temporary unavailable try after sometime. Kindly suggest
tariqrehmani wrote:
How do i restore my iphone from "no Service". I tried to update my iphone 3G TO iOS 6.0. ...
The iPhone 3G is Not Compatible with iOS 6...
It also appears that your phone may have been Hacked and / or Jailbroken...
If this is the case... you are out of luck... Because...
The discussion of Jailbroken Devices is against the Terms of Use of this Forum.
Why Jailbreak is Not Supported > http://support.apple.com/kb/HT3743 -
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 -
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 -
How to display error message ??
Hi,
I have a BDC program to upload data from an excel sheet. I could see that some records of data fail to pass and hence after my bdc run i would like to display error message for the failed records as follows:
costcenter:
cost element:
fiscal year:
etc etc
is it possible ?? how to do that ? please explain in detail.
for ur reference my program is pasted below.
thanks
*& Report ZBDC_BUDGET_UPLOAD
REPORT ZBDC_BUDGET_UPLOAD.
types: begin of tdata,
rec(150) type c,
end of tdata,
begin of tmtgp,
costcent LIKE CCSS-KOSTL,
costelem LIKE CCSS-KSTAR,
fisyear LIKE CCSS-GJAHR,
jan(10),
feb(10),
mar(10),
apr(10),
may(10),
jun(10),
jul(10),
aug(10),
sep(10),
oct(10),
nov(10),
dec(10),
end of tmtgp.
data: idata type table of tdata with header line.
data: imtgp type table of tmtgp with header line.
Data : fieldval(10) type c.
selection-screen begin of block b1 with frame title text-001.
parameters: p_file type localfile default 'C:\budget_data_csv.csv'.
selection-screen end of block b1.
include zbdcrecx1.
at selection-screen on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
exporting static = 'X'
changing file_name = p_file.
start-of-selection.
perform upload_data.
loop at imtgp.
Write imtgp-fisyear to fieldval.
perform open_group.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(04)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KPP0B-VALUE(04)'
fieldval.
Write imtgp-costcent to fieldval.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KPP0B-VALUE(06)'
fieldval.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-costelem to fieldval.
perform bdc_field using 'KPP0B-VALUE(09)'
fieldval.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(04)'.
perform bdc_field using 'BDC_OKCODE'
'=CSPB'.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-jan to fieldval.
perform bdc_field using 'Z-BDC03(01)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(02)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-feb to fieldval.
perform bdc_field using 'Z-BDC03(02)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(03)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-mar to fieldval.
perform bdc_field using 'Z-BDC03(03)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(04)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-apr to fieldval.
perform bdc_field using 'Z-BDC03(04)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(05)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-may to fieldval.
perform bdc_field using 'Z-BDC03(05)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-jun to fieldval.
perform bdc_field using 'Z-BDC03(06)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(07)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-jul to fieldval.
perform bdc_field using 'Z-BDC03(07)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(08)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-aug to fieldval.
perform bdc_field using 'Z-BDC03(08)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-sep to fieldval.
perform bdc_field using 'Z-BDC03(09)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(10)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-oct to fieldval.
perform bdc_field using 'Z-BDC03(10)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(11)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-nov to fieldval.
perform bdc_field using 'Z-BDC03(11)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(12)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-dec to fieldval.
perform bdc_field using 'Z-BDC03(12)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(12)'.
perform bdc_field using 'BDC_OKCODE'
'=CBUC'.
perform bdc_transaction using 'KP06'.
perform close_group.
endloop.
form upload_data.
data: filename type string.
clear idata.
refresh idata.
filename = p_file.
call function 'GUI_UPLOAD'
exporting filename = filename
filetype = 'ASC'
tables data_tab = idata
exceptions file_open_error = 1
file_read_error = 2
no_authority = 6
others = 17.
check sy-subrc = 0.
loop at idata.
clear imtgp.
split idata at ',' into imtgp-costcent imtgp-costelem imtgp-fisyear
imtgp-jan imtgp-feb imtgp-mar imtgp-apr imtgp-may imtgp-jun imtgp-jul
imtgp-aug imtgp-sep imtgp-oct imtgp-nov imtgp-dec.
append imtgp.
endloop.
endform.check the below code,.,
DATA : t_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.
CALL TRANSACTION '<DELIVERYTRANSACTION>' USING t_bdctab
mode 'N'
MESSAGES INTO t_bdcmsgcoll.
DESCRIBE TABLE t_bdcmsgcoll LINES g_lines.
READ TABLE t_bdcmsgcoll INDEX g_lines.
IF t_bdcmsgcoll-msgtyp = 'S' AND
t_bdcmsgcoll-msgid = <Msg id> AND
t_bdcmsgcoll-msgnr = <Msg number>.
* Trap your Call Transaction messages
t_success-deliverynumber = t_bdcmsgcoll-msgv1.
* You can format the message returned by call transaction using function 'FORMAT_MESSAGE' which will return g_mesg
t_success-message = g_mesg.
APPEND t_success.
CLEAR t_success.
ELSE.
* If there an Error-Do this..
READ TABLE t_bdcmsgcoll WITH KEY msgtyp = 'E'.
IF sy-subrc = 0.
* Format your message using FORMAT_MESSAGE "FM
CLEAR g_mesg.
t_error-msg = g_mesg_incl.
APPEND t_error.
CLEAR t_error.
ENDIF.
ENDIF.
* Clear for next run
CLEAR: t_bdcmsgcoll,
t_bdctab.
REFRESH: t_bdcmsgcoll[],
t_bdctab[]. -
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. -
How to display error message in abap
How to dispaly error message in report?
i have to check the range bewteen two days and if it is not in range have to display error message only once.
next time if i press the execute button report will get executed without showing the warning message.
i am calculating the days between two dates, i am displaying the error message but if i press the execute button i will not allow me to execute the report.it again shows me the error message.i have to skip this in 2nd time.
can any one suggest what to do with this?hello suman,
i am using select-option in my report. And i have to check the difference between two dates in select option input box( low-value and high-value). if it is greater then suppose 10 then i have to display warning message at once and then if click on execute button , the report should get executed without showing any warning messages in report.
here i am attaching my source code.please take a close look and tell me where should i have to make change.
SELECT-OPTIONS :s_bedat FOR ekko-bedat.
AT SELECTION-SCREEN ON s_bedat.
IF NOT s_bedat IS INITIAL.
PERFORM bedat_validate. " Perform for Purchasing Document Date Validation
ENDIF.
FORM bedat_validate . " Form for Purchasing Document Date Validation
DATA : diffr TYPE i.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = s_bedat-high
i_datum_von = s_bedat-low
I_KZ_EXCL_VON = '0'
I_KZ_INCL_BIS = '0'
I_KZ_ULT_BIS = ' '
I_KZ_ULT_VON = ' '
I_STGMETH = '0'
I_SZBMETH = '1'
IMPORTING
e_tage = diffr
EXCEPTIONS
DAYS_METHOD_NOT_DEFINED = 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.
ELSE.
IF diffr GT 31.
MESSAGE s009(zerrormsg) WITH text-000 DISPLAY LIKE 'W'.
LEAVE TO LIST-PROCESSING.
ENDIF.
ENDIF.
ENDFORM. " BEDAT_VALIDATE -
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.
Maybe you are looking for
-
My sound will only work when I plug in headphones in the jack. When I take them out, the volume button is on mute. When I go into the sound preference it says Digital Out for the output. Sometimes I get a red light when the headphone jack is at.
-
Business Connector email listener: some mails are processed twice
Hi, we set up an email listener in Business Connector Administration to receive small xml orders via mail. The listener works fine. The xml files are transferred to the flow service specified in the mail subject. So most of the time we don't have any
-
I start the connection manager and listener in the same oracle database server. I use local server name service ( tnsnames.ora ). Unfortunately, I hit a oracle error in client side ) oracle 12202 : internal netvigation error ), when I invoke sqlplus
-
Lorsque je télécharge un document et que je visualise si il y a des ' apostrophes, je ne vois que des signes confus qui remplacent l'apostrophe, du style $%?&%? . Si je regarde le même docuyment sans me servir du PDF, soit sur le site internet, to
-
I want to output my mbp through my apple tv, is this possible?
I recently purchased a ATV2 and was hugely suprised to find that outputing from my MBP to it does not seem possible, i have searched for a third party solutions but as yet have not found one. It seems strange that the ipad can produce this feature na