How to raise multiple error messages at a time in a BADI
Hi all,
I'm using CHECK method of BADI ME_PROCESS_PO_CUST for some validation in ME21N/ME22N. I want to raise multiple error message at a time, when user clicks on Check button or Save button. Please let me know, is there any function module for this or is there any particular procedure for this?
Thanks in Advance,
Siva Sankar.
Hi,
Raising messages from within BAdis is not a good choice and from the look of it , it appears to be causing a dump.
Look if the BAdi interface has any exceptions defined for the method, if so, raise the exception with your message like:
MESSAGE e002(sy) WITH 'Error' RAISING <badi_exception>.
Otherwise call the FM POPUP_TO_CONFIRM To show msgs to user
Regards
Kiran Sure
Similar Messages
-
Hi all,
I have created a form with one data block MATURED_FD_DTL which looks like below:
ACCT_FD_NO
CUST_CODE
FD_AMT
FD_INT_BAL
TDS
CHQ_NO
ADD_FD_AMT
P_SAP_CODE
P_TYPE
CREATE TABLE MATURED_FD_DTL
ACCT_FD_NO VARCHAR2(17 BYTE) NOT NULL,
CUST_CODE NUMBER(9),
FD_AMT NUMBER(15),
FD_INT_BAL NUMBER(15),
TDS NUMBER(15),
CHQ_NO NUMBER(10),
ADD_FD_AMT NUMBER(15),
P_SAP_CODE NUMBER(10),
P_TYPE VARCHAR2(1 BYTE)
For MATURED_FD_DT.ACCT_FD_NO, Trigger: KEY_NEXT_ITEM, I have written the following code:
DECLARE
V1 NUMBER;
V2 NUMBER;
BEGIN
V1:=:MATURED_FD_DTL.ACCT_FD_NO;
MESSAGE('V1:'||V1);
MESSAGE(' ');
END;
GO_ITEM('MATURED_FD_DTL.CUST_CODE');
This is just a dummy code.
When ever i enter the value in the field of ACCT_FD_NO, it pops up a message saying "V1:Value of ACCT_FD_NO",
So i want to store that value .
Compare them & if it is egual, it should pop up a message saying duplicate value is entered and must not allow to enter, at form_level.
So how can I compare the ACCT_FD_NO value between FIRST_RECORD and NEXT_RECORD ??
Help Me .
Thank You.
Oracle Forms 6i.
Oracle 9i.Thank You HamidHelal.
Actually before posting the code, I went through the first link you have mentioned. I tried also, it is quite tedious procedure, however i dint get the proper result, may be i have done some mistake. Anyways , can you tell me how do i check in database table, if a value exists OR IF VALUE FOUND & then message and raise form trigger failure; something like below.
IF :MATURED_FD_DTL.ACCT_FD_NO EXISTS
THEN MESSAGE('YOU HAVE ENTERED AN EXISTING OR DUPLICATE VALUE');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END;
OR
IF :MATURED_FD_DTL.ACCT_FD_NO FOUND
THEN MESSAGE('YOU HAVE ENTERED AN EXISTING OR DUPLICATE VALUE');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END;
Is there any equivalent in the form in oracle forms 6i?? Please let me know how do i do this?? -
How to populate a Error message in WebUI Screen
Dear Experts,
I have a small issue in Lead creation screen. I need to restrict the followup document if the lead end date is lesser than the system date, if the end date lesser than the system date system should through a error message in web Ui Screen and the lead follow up creation should be stoped.
We found an enhancement spot in backend(GUI) of lead creation we raised the error message in the backend screen. Here its working fine, But we are not able to get any error message in WebUI lead creation screen.
We written the code in CREATE_ORDER Method of lead creation in GUI ( tcode : CRMD_ORDER). We tried to debug the program using external debuger from webui but its not getting triggered.
Pls suggest me, how to raise a error message for WEBUI lead follow up creation validation.
Kindly do the needful.
Reg,
AnandhanHI Anandhan,
Try this way,
This should work.
lr_global_messages type ref to cl_crm_genil_global_mess_cont,
lr_core type ref to cl_crm_bol_core,
"Instantiate the error message class.
lr_core = cl_crm_bol_core=>get_instance( ).
if lr_core is bound.
lr_global_messages ?= lr_core->get_global_message_cont( ).
endif.
if lr_global_messages is bound.
call method lr_global_messages->add_message
exporting
iv_msg_type = lv_msg_type
iv_msg_id = '
iv_msg_number =
iv_show_only_once = 'X'
iv_msg_v1 =
iv_msg_v2 =
endif. -
Raise an Error message in ME21N
Dear All,
I am using user exit (SRVDET: EXIT_SAPLMLSP_040) to raise an Error message, it will terminate ME21N by the Error message. Did anyone know how to make it return to ME21N after an Error message...
I try to set screen to 500, 210...etc. but it seems make the program hung after leave screen. Any idea? Thanks a lot!
BR,
WellHi
Try to use the BADI ME_PROCESS_PO_CUST
and raise the error message
see the sample code
BAdI Name: ZCHECK_PO_LINE_ITEM (Implementation name) PO Account assignment
Definition Name: ME_PROCESS_PO_CUST
Interface Name : IF_EX_ME_PROCESS_PO_CUST
Implementing Class: ZCL_IM_BADIN_ACCOUNT_ASSGN
Method : PROCESS_HEADER
METHOD if_ex_me_process_po_cust~process_header .
DATA : re_data TYPE mepoheader.
*get the item data
CALL METHOD im_header->get_data
RECEIVING
re_data = re_data.
re_header = re_data.
IF ( re_data-bsart NE 'ZOC' AND re_data-bsart NE 'ZPC' ).
IF ( re_data-bsart <> 'ZIC' AND re_data-bsart <> 'UB' ).
IF re_data-bukrs NE '1001'.
MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'Use only Sipchem Company'
'Code for External Procurement'.
ENDIF.
ENDIF.
ENDIF.
ENDMETHOD.
Method : PROCESS_ITEM
METHOD if_ex_me_process_po_cust~process_item .
DATA: v_menge TYPE bamng, " PR Quantity
v_statu. " PR Status
DATA : re_data TYPE mepoitem,
re_data1 TYPE mepoaccounting,
re_accountings TYPE purchase_order_accountings ,
header TYPE purchase_order_accounting.
*get the item data
CALL METHOD im_item->get_data
RECEIVING
re_data = re_data.
IF ( re_header-bsart NE 'ZOC' AND re_header-bsart NE 'ZPC' ).
IF re_header-bsart EQ 'ZRL'.
IF re_data-konnr EQ space.
MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant create a Release order'
'without a reference to Outline Agreeement'.
ENDIF.
ENDIF.
IF ( re_data-banfn EQ space AND re_data-anfnr EQ space ).
MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You can create a Purchase order'
'only with reference to a PR or RFQ'.
ENDIF.
IF re_data-knttp NE 'K' AND re_data-pstyp NE '9' .
IF syst-cprog EQ 'RM_MEPO_GUI'.
IF re_data-uebto IS NOT INITIAL OR
re_data-uebtk IS NOT INITIAL OR
re_data-untto IS NOT INITIAL.
MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant change delivery settings'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDMETHOD.
<b>Reward points for useful Answers</b>
Regards
Anji -
How to display an error message after validation in Formatted Search?
Hi SBO experts,
if an error is detected on validation in a Formatted Search, how to display an error message to the user entering the data?
Thanks & Regards,
Raghu Iyeri created a formatted search query & attached it to the field 'Quantity' at Line Item level in Sales Order screen. just for testing purpose, i eneterd the following code lines in the query validating 'Quantity'
if $[$38.11.0] > 50
begin
select @error = 1
select @error_message = 'Vendor code cannot begin to X sign.'
end
the system throws the error : Internal error (8180) occurred [Message 131-183]
actually, i need to display an error message to the user if Quantity is not in multiples of the OITM.SalFactor2
if $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode] = $[$38.1.0]) > 0
begin
select @error = 1
select @error_message = 'Error in Quantity.'
end
but, this expression to get the remainder itself seems to have some error
$[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode] = $[$38.1.0])
i guess, % operator is used for modulo (to find the remainder of one number divided by another.) ? am i right ?
Regards,
Raghu Iyer -
Multiple Error Messages, starting With 500 null Error
I've been experiencing multiple error messages with
ColdFusion 7.0 on Ubuntu Linux/Apache2 for the past several days,
starting with the 500 null error (see
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=f9e312a2),
which ocurred on only part of the site (a set of forms requiring
remote login). Now, the following errors are appearing on various
CF forms: "An I/O error while manipulating the sort index" and "An
exception occurred when setting up mail server parameters" and
finally, "No space left on device." All these errors are occurring
on add/edit forms and cffile upload forms that were working fine a
few hours ago and that haven't been changed.
Right now, I'm replacing the license.properties file to deal
with the 500 null error. My question is, has anyone else
experienced this smattering of other error messages in conjunction
with the 500 null error? Or fast on the heels of it? What's the
deal with the 500 null error, anyway? Has Adobe made any progress
with this issue?Okay, this is a followup to my previous post (
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=143&threadid=1165765&en terthread=y).
Replacing the license.properties file isn't sufficient in
addressing the 500 null error. We are running Ubuntu Linux. I
understand that I need to replace jvm 1.5 with jvm 1.4.2. I'm
honestly not sure how to detect on Linux which version of jvm is
running or how to make sure that version 1.4.2 is what is running
when we reinstall ColdFusion. If someone could help me with this,
I'd appreciate it. The 500 null error is eating my Web site like
the Langoliers. Even some static .cfm pages are failing now. -
How to show custom error message in WebADI Excel template?
Hi,
I've created a custom Web ADI integrator and associated it with a 'Procedure' based custom interface.
WebADI Interface API Returns is set to "Error Message".
I'm using raise_application_error(-20001, "Actual Error Message") for invalid rows,but custom error message from PL/SQL is not populated on the excel template.
Instead it is showing "SQL exception occurred during PL/SQL upload".
Am I missing anything? How to show custom error message from Pl/SQL procedure to WebADI Excel template?
TIA
NarasimhaThe custom API errors are visible in the BNE log but not on the Excel.
BNE Log=>
12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR BnePLSQLUpload.doUpload: Exception while uploading to PL/SQL API. Error Code: 20001, Message: ORA-20001: -Please enter CONTAINER_ID - Enter PO_NO -
ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
ORA-06512: at line 1
12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR BnePLSQLUpload.doUpload: Stack trace: java.sql.SQLException: ORA-20001: -Please enter CONTAINER_ID - Enter PO_NO -
ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
ORA-06512: at line 1
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at oracle.apps.bne.integrator.upload.BnePLSQLUpload.doUpload(BnePLSQLUpload.java:284)
at oracle.apps.bne.integrator.upload.BneSAXUploader.processDeepestLevel(BneSAXUploader.java:2346)
at oracle.apps.bne.integrator.upload.BneSAXUploader.startElement(BneSAXUploader.java:1182)
at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:234)
at oracle.apps.bne.integrator.upload.BneUploader.processUpload(BneUploader.java:301)
at oracle.apps.bne.integrator.upload.BneAbstractUploader.processUpload(BneAbstractUploader.java:114)
at oracle.apps.bne.integrator.upload.async.BneAsyncUploadThread.run(BneAsyncUploadThread.java:140)
12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 WARNING BneOracleWebAppsContext.getTimeZone CLIENT_TIMEZONE_ID has not been set
12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 ERROR BneOracleWebAppsContext.getExtraJDBCConnection recieved the same connection as the base connection. There may be transaction problems.
How to show the same error in the excel template?
Here is the package:
CREATE OR REPLACE PACKAGE BODY APPS.XXPO_COSTFACTS_WEBADI_PKG
AS
PROCEDURE upload_data (
P_CONTAINER_ID IN VARCHAR2
, P_SAIL_DATE IN DATE
, P_PO_NO IN VARCHAR2
) IS
--declare
lv_err_msg VARCHAR2(240);
lf_err_flag NUMBER := 0;
ln_temp NUMBER;
BEGIN
--------------------- checking for mandatory parameters---------------------------
IF (P_CONTAINER_ID IS NULL) THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg||'-'||'Please enter CONTAINER_ID - ';
END IF;
-------------Validation for Sail Date Format----------------------
IF (P_SAIL_DATE IS NULL) THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' ' || 'Enter Sail Date - ';
ELSE
BEGIN
SELECT 1
INTO ln_temp
FROM DUAL
WHERE P_SAIL_DATE = TO_DATE (TO_CHAR (P_SAIL_DATE, 'DD-MON-YYYY'), 'DD-MM-YYYY');
EXCEPTION
WHEN NO_DATA_FOUND THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format';
WHEN OTHERS THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format'|| SQLERRM;
END;
END IF;
-------------Validation for PO_Number----------------------
IF (P_PO_NO IS NULL) THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' ' || 'Enter PO_NO - ';
ELSE
BEGIN
SELECT count(1)
INTO ln_temp
FROM PO_HEADERS
WHERE Attribute4 = P_PO_NO;
EXCEPTION
WHEN NO_DATA_FOUND THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' No Oracle PO for Biceps PO#'||P_PO_NO;
WHEN OTHERS THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' Error getting the Oracle PO for Bicpes PO#'||P_PO_NO||' Error-' || SQLERRM;
END;
END IF;
-----------------------Insert Record----------------------------
IF lv_err_msg is NULL THEN
BEGIN
INSERT
INTO XXP2P_HW_COST_FACTORS_STG
CONTAINER_ID
,SAIL_DATE
,PO_NO
, ERROR_FLAG
, ERROR_MSG
,CREATED_BY
,CREATION_DATE
,LAST_UPDATED_BY
,LAST_UPDATE_DATE
,LAST_UPDATE_LOGIN
VALUES
P_CONTAINER_ID
,P_SAIL_DATE
,P_PO_NO
,lf_err_flag
,lv_err_msg
,FND_GLOBAL.USER_ID
, trunc (sysdate)
,FND_GLOBAL.USER_ID
, trunc (sysdate)
,FND_GLOBAL.LOGIN_ID
-- commit;
DBMS_OUTPUT.put_line
'-' || 'After ap_invoices_interface'
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' ' || 'error loading CONTAINER_ID-' || P_CONTAINER_ID || SQLERRM;
raise_application_error(-20001, lv_err_msg);
END;
ELSE
raise_application_error(-20001, lv_err_msg);
END IF;
END upload_data;
END XXPO_COSTFACTS_WEBADI_PKG; -
How to customize the error messages in web analysis reports
Does anyone know how to customize the error messages that web analysis shows ,
I want to customize the below error message with a custom error message
"Document does not exist or no authorization to open document.Error occurred while loading document"
Does anyone know how to do this ?Rajesh,
you may want to check these links
How to the Change the Application Stopped Message
How to Change the Dispatcher Running, No Server Connected Message
http://help.sap.com/saphelp_nw70/helpdata/en/65/18fc3f9ec4e669e10000000a155106/frameset.htm
Thanks
Bala Duvvuri -
How do you remove multiple email messages at one time
I have a iphone 4 and today it started piling up over 4000 undeliverable messages for no apparent reason. I somehow managed to stop the process but I am left with over 4000 messages that I need to delete. How do you remove multiple email messages at one time. I can "mark" all the messages at once but I cannot find the move or delete button to trash the messages. Can some one help me out.
Thanking you in advance.
PLJust figured it out - I can select multiple messages as you suggested when I am not in full screen mode.
So once I come out of full screen mode - then the multiple windows open.
QED -
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 -
I purchased a magazine using the Zinio app which I'd recently downloaded on to a recently purchased iPad. I received an error message at the time (can't recall the details) but have since been invoiced for the $8.99. How can I get the Magazine I purchased?
FOR ASSISTANCE WITH ORDERS - iTUNES STORE CUSTOMER SERVICE
For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.
Phone: 800-275-2273 How to reach a live person: Press 0 four times
Hours of Operation: Mon-Fri: 9am-5pm ET
Email: [email protected]
How to report an issue with Your iTunes Store purchase
http://support.apple.com/kb/HT1933
How to Get a Refund from the App Store
http://gizmodo.com/5886683/how-to-get-a-refund-from-the-app-store
Canceling a Digital Subscription
http://gadgetwise.blogs.nytimes.com/2011/10/14/qa-canceling-a-digital-subscripti on/
Cheers, Tom -
how to fix this error message The backup disk image “/Volumes/AirPort Disk/FARES DEL VALLE’s iMac.sparsebundle” could not be accessed (error -1).
The troubleshooting C17 is the specific article.
http://pondini.org/TM/Troubleshooting.html
This is generally a Lion error.. and you will need 5.6 utility to get access to the disk area.
So download the real utility. Run it instead of v6 toy version.
http://support.apple.com/kb/DL1482
Go to the manual setup, disk page and click on disconnect all users.. that will unmount all users connected to the disk and allow it to start working. But there are a number of other issues that are possible cause. Pondini lists some of them. -
How to delete multiple email messages from my Iphone 5c; email folder?
How to delete multiple email messages from my Iphone 5C; email folder.
there used to be option to keep last 50,100,200 messages/emails. We need that back. This is ridiculous to delete one by one.
-
IF_EX_ME_PROCESS_PO_CUST multiple error message in the CHECK
Hi All
i search a way for multiple error message in the CHECK Methode, because i check every line.
INCLUDE MM_MESSAGES_MAC.
ch_failed = 'X'.
mmpur_message 'E' "&1 sy-msgty
'00' "&2 sy-msgid
'398' "&3 sy-msgno
'Werk nicht in allen Positionen gleich' "&4 sy-msgv1
'' "&5 sy-msgv2
'' "&6 sy-msgv3
''. "&7 sy-msgv4
ThanksHi
ME21N has also a Error Message BAPI for view Errors and i need multiple Messages on these step for each position -
Multiple Error message at Item Level....
Hi all,
I have some doubt into display multiple error message from item level.
The scenario is, I have to run some validation at each line item. If validation fails error message is population. Now suppose user ignore the error message or with that error user creating new line item and again because of validation some error occurs, then both error message should display all together but system is displaying only last message not previous one. This is happening with both the classes CL_BSP_WD_MESSAGE_SERVICE' and CL_CRM_GENIL_GLOBAL_MESS_CONT.
But if I check same thing with standard validation all error message display all together.
Any suggestion through which I can combined all message and display together.
Thanks
GauravYes.I have tried ADD_MESSAGE method of the CL_BSP_WD_MESSAGE_SERVICE class.
Thanks
Gaurav
Any suggestion from experts..
Regards
Gaurav
Edited by: Gaurav Mehta on Dec 3, 2010 2:18 PM
Maybe you are looking for
-
ClassNotFoundException - JApplet
Hello, I am getting a class not found exception for a JApplet I have created. The class is in WEB-INF/classes/kk/Client.class <applet code="kk\Client.class" width=500" height="400"> Your browser does not support the applet tag. </applet> Can anyone g
-
I would like to cancel my subscription for my stat...
I do not want stateside number and I want to cancel what should I do?
-
I can't update to the latest Itunes
I have my Ipad 4, and I am trying to upload it to my laptop, but it's telling me that i don't have the latest ITunes installed. so I go to download it, and then it tells me congratulations for downloading ITunes!!! GRRR...it won't update my Itunes on
-
My calendar date is not automatically changing, what's the proper setting?
My calendar date is not automatically changing, what's the proper setting?
-
Why won't the new java update JDK 7 run on yahoo.games?
I have OS X 10.9 and am unable to run Yahoo.games with the new java JDK 7 update...can anyone help?