How to add custom error message in standard application log of change doc.
Hi,
While saving chnage document I need to add raise an error on specific condition. As Error messages is being shown in application log I added custom message in include LCRM_1O_UIF15 by using BAL_LOG_MSG_ADD FM however it is not showing in the screen. What could be the reason? Can anybody please explain?
Rgds
Sudhanshu
Muhammed,
Have you tried throwing a JboException in your AM code?
John
Similar Messages
-
Custom error message in SAP application log
Is there a way to add a custom error message to the SAP application log without passing the message variables MSGV1, MSGV2, MSGV3, MSGV4 and the Message class and number.
We want to pass a custom message from the BAPIRET2-MESSAGE without giving it a Message class and number. The reason for this is that we are using class based exceptions instead of the traditional message class with errors. When we catch the class based exception, we take the error text of the exception and put in in the BAPIRET2-message and set the BAPIRET2-TYPE as 'E'. Now we want to add this to the SAP application log.
The call to 'BAL_LOG_MSG_ADD' takes a structure BAL_S_MSG which is just like BAPIRET2. However this function builds the entry to the application log use the message variables MSGV1, MSGV2, MSGV3, MSGV4. There is no provision to pass in the BAPIRET2 message.
Add message to application log
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
i_log_handle = app_log_handle
i_s_msg = log_message
Thanks,
JayHi Jay,
Did you see <b>BAL_LOG_EXCEPTION_ADD</b>?
This FM is represented by the structure <b>BAL_S_EXC</b>. This can have various versions as described below:
<b>Data of BAL_S_EXC Structure / Use</b>
<b>EXCEPTION</b> / Exception class from which an exception text
is added to the log. This field must be filled.
<b>MSGTY</b> / Message type (MSGTY) of a T100 message.
This field must also be filled for exceptions.
<b>PROBCLASS,
DETLEVEL,
ALSORT, TIME_STMP</b> / Message or exception attributes, such as
problem class (PROBCLASS, for
example, "very important"), level of detail
(DETLEVEL, from 1 to 9), sort criterion
(ALSORT, unrestricted) and timestamp
(TIME_STMP). These fields can be displayed
in the log (except TIME_STMP).
<b>MSG_COUNT</b> / This attribute is not used for exceptions.
Follow the link below for more details:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/frameset.htm">SAP Help DOc</a>
Hope this helps.
Thanks
Sanjeev -
How to add an error message in the application module?
Hi,
I have some code running in the application module. I want to display error messages in the messages section of the screen if an error happens in my code.
How could I achieve this?
I am using JDeveloper 10G
ThanksMuhammed,
Have you tried throwing a JboException in your AM code?
John -
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 add an error message to an Output Type.
Hello SAPients,
Using a User Exit I'm modifying the segments of an outbound IDoc. When certain conditions apply I trigger an exception
RAISE DATA_NOT_RELEVANT_FOR_SENDING.
It's ok because the IDoc is not generated and the Output Type is set to "Incorrectly Processed" status.
But, when the user clicks the "Processing Log" button there is no informatio of the error occurred. How can I add an error message to the Processing Log of the Output Type?
Thanks in advance for your kind help.Hi,
Try this statement..
MESSAGE ID sy-msgid << Your msg class
TYPE sy-msgty << Your message type
NUMBER sy-msgno << Your msg no.
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 << Other info
RAISING data_not_relevant_for_sending.
Regards,
Joy. -
IDOC_INPUT_ORDER - How manage the custom error message ?
Hello,
on EXIT_SAPLVEDA_002 and EXIT_SAPLVEDA_003 I done some custom check, (I would show some custom message as a result of these check).
My question is: How to show these custom message on the standardc idoc spool (WE02) ??
There's DERRTAB internal table to manage the error, but is not available on there exit ...(EXIT_SAPLVEDA_002 and 3)
Any idea ??
thank youHello,
question is if you want to raise an error, which makes sense only if the document is not posted or just an information message.
Please consider that you can put messages into the idoc only connected with a status. If you set status 51 thge Idoc is reprocessible, if you set status 53 it is successfully processed.
In error case you can raise exception USER_ERROR. in exit EXIT_SAPLVEDA_002. Set SY-MSGTY, SY-MSGID, SY-MSGNO, etc before. In exit EXIT_SAPLVEDA_003 you can set changing parameter ok to space. Then SAP will add an error message.
/Michael -
ICI - How to display custom error messages in SAP CRM
Hello,
we are working on a custom Contact Center which interfaces with SAP CRM Version 7 with Enhancement Package over ICI.
The basic call functions like accepting, hanging up, holding and retrieving are fully implemented and are working already.
Our goal is to display error messages in the CRM so that clients know there is something wrong, for example why he can't be log in successfully (e.g. the telephony server isn't reachable).
We already found the ICI Documentation file which provides us the CRM SOAP error codes and tried to send SOAP Fault messages, but never got
them to screen.
Please find an attached example screenshot what we mean exactly, reproduced by trying to make a call with CRM user while BCM CDT isn't
running in the background.
Regarding to this topic we've the following questions:
- Is it possible to display custom error messages on the CRM or is this functionality limited to SAP?
- Could you provide us some further information on how to use this feature exactly (implementation details?) and how the SOAP XML should look like to get it work?
Thank you in advance!
Best regards
René HolyNewUser7 wrote:
Please correct me if I am wrong
I need to create an entity adapter and attach an error handler with the adapter? or can i handle that in the event handler itself. I coulnt find any api for handling errorsYou can do it both ways but since we are talking about event handler now, then in 9.x you need to extend com.thortech.xl.client.events.tcBaseEvent class for creating a event handler. In tcBaseEvent class there are various flavors of handleError method. So use that as per my note earlier and you should be good.
HTH -
How to create Custom error message in SharePoint 2013
Hi,
I have created one document library.On uploading the same file SharePoint throws error as"server error.The same file exit".
But my requirement is not to show the SharePoint default message.I wanted to create custom message and show the pop up for the same file upload.
Is there any way to create any custom error page or can I manipulate SharePoint default error page?
Any help?
Thank youHi,
You can create an event receiver to set the validation error messages. One such post to redirect the custom error page is as follows
https://social.msdn.microsoft.com/Forums/office/en-US/2bc851f6-e04b-4550-b87f-9b874a290482/sharepoint-event-receivers-and-custom-error-messages?forum=sharepointdevelopmentlegacy
Create custom error page for SharePoint event receiver
Please mark it answered, if your problem resolved or helpful. -
How to display custom error message if the Required field is not entered?
Hi,
I have made one input field as required field in a view.
I want to display one custom error message ,if the required input field is not entered.
Please help me regarding this.
Thanks,
Deepikahi deepika....
First go to message pool under webdynpro components.
Create a new message there..of type error.
Enter your text.
Now to avoid null pointer exception , in wdDoInit(), initialise the value
wdContext.currentDateTimeElement().setDate("");
now create an action for submission of data. If field is empty, then within the button write:
msg = wdComponentAPI.getComponent().getMessageManager();
if(wdContext.currentDateTimeElement().getDate().equals(""))
msg.raiseMessage(IMessageCompTodatDateTime.ERROR,new Object[]{""},true) ;
between begin others put:
regards,
pinki
IWDMessageManager msg = null; -
How to add an error message to script?
Hi, every one
I got this script
function paste in place to next master
I want to add an error message to it, if there was no such thing as master B, C,D,E,F,G
instead of system error.
Teetan
var
myDialog = app.dialogs.add({name:"Copy Selected item(s) to chosen Master",canCancel:true}),
mStringList = ["Master A", "Master B","Master C", "Master D", "Master E","Master F", "Master G"];
with(myDialog){
with(dialogColumns.add()){
staticTexts.add({staticLabel:"Select a Master you want to copy to"});
with(dialogRows.add()){
var mySelection = dropdowns.add({stringList:mStringList, selectedIndex:0});
app.doScript('main()', ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Paste in place");
function main(){
if (!app.documents.length || !app.selection.length)
alert( "Nothing selected!" );
exit();
if (myDialog.show() == true)
copy_to_next_master();
function copy_to_next_master() {
var
mChoice = mySelection.selectedIndex,
mMsg = "Done.\rWhat you select is pasted in place to next documents - " + mStringList[mChoice],
nSel = app.selection.length,
mDone = false,
i,n,nextDoc,curSel;
for ( i = 1; i < app.documents.length; i++) {
nextDoc = app.documents[i];
targetMaster = nextDoc.masterSpreads[mChoice];
if (!targetMaster.isValid) {
mMsg += "\rCan't detect " + mStringList[mChoice] + " in a doc: " + nextDoc.name;
continue;
mDone = true;
for ( n = 0; n < nSel; n++ ) {
curSel = app.selection[n];
curSel.duplicate( nextDoc.masterSpreads[mChoice] );
mDone ? alert(mMsg) : alert("Nothing copied");Sorry Jarek
I made a big mistake
I want add an error message in to this:
var curSel = app.selection[0];
for ( var i = 1; i < app.documents.length; i++) {
var nextDoc = app.documents[i];
if (!curSel) { alert( "Nothing selected!" ); exit(); }
curSel.duplicate( nextDoc.masterSpreads[1] );
in case of I just want to paste in place to only on choice
Teetan -
How to display custom error message in Job log for batch processing
Hi All,
I am rexecuting one R/3 report in batch mode and i want to display all the custom error i have handled in job log when its executed from SM36,SM37. The custom error are like 'Delovery/Shipmet doe not exits' or others which we can display in online mode like message e100(ZFI) or any other way and accordingly we can handle the program control like come out of the program ro leave to transaction'Zxxx' or anything. But i want my program to be executed completely and accumulate all the error in job log of batch processing.
Can anyone tell me how can i do so...
Thanks,
AmritaHi,
Thats what i have done from the begining. I have written message like this:
Message i100(ZFI).
I was hoping to see this message in the log. But i cant see. Can you help me pleae... -
How to add the error message into Delivery Error Log (VL10A,VL10X)
Hi,
I have a to add my custom message into Delivery creation error log (VBFS, VBSS)
This message should be shown in the Collective process log (VL10X, VL10A).
Please give me the soln to solve this problem.
I have searched in SDN, i didnt get the proper solution
Thanks
ShankarHI,
Make use of the BADi "LE_SHP_DELIVERY_PROC"
Use the method DELIVERY_FINAL_CHECK.
Pass the error messages in table CT_FINCHDEL.
Regards,
Ankur Parab -
How to display custom error message in custom page
Hi,
I would like to show the exception details of custom component in my custom idoc page. Please let me know how to get the exception which is cached in Custom component in page.
ThanksHi,
Do they get a 404 error? If it is the case, you can customize error pages : [Custom Error Pages|http://help.sap.com/saphelp_nw70/helpdata/en/ec/1273b2c413b2449e554eb7b910bce7/frameset.htm].
Regards,
Pierre -
How to throw Custom Error message in Portal
Hi Experts !
I am working on CRM 5.0 and using BADI CRM_ORDER_STATUS for LEAD transaction.
This BADI is checking the userid when user is trying to change the status of a lead. if userid is not correct than it is throwing an Error Message in GUI but this message is reflecting in Portal as an Exception but what I need here is a custom Message similar to GUI.
Pls suggest .
With Thanks & Regards
NavneetHi Experts !
I am working on CRM 5.0 and using BADI CRM_ORDER_STATUS for LEAD transaction.
This BADI is checking the userid when user is trying to change the status of a lead. if userid is not correct than it is throwing an Error Message in GUI but this message is reflecting in Portal as an Exception but what I need here is a custom Message similar to GUI.
Pls suggest .
With Thanks & Regards
Navneet -
Web composer option not displaying while Customizing Error Messages of Portal applications
Hi
I am trying to customize the error messages through web composer in sap portal but when i Choose System Administration → System Configuration → Knowledge Management → Content Management Web composer option is not shown . I am using netwearver 7.0
please guide me I searched google but couln't find any satisfactory answer.
ThanksHi Raima,
From your description I assume you are attempting to implement the steps outlined in the following documentation, is this correct -
Modifying Error Pages - Carrying Out the Initial Configuration - SAP Library
If you are navigating to the KM configuration through the steps you outlined and you do not see WPC Composer listed under 'Content Management' I would suspect that it is not deployed on your system (at least not successfully). It is not included as part of the default stack in EP 7.0 and must be deployed separately. If you do intent to deploy this component, you should also note that the SP level of the KMC-WPC SCA should match the SP level of the other KM and EP components.
Maybe you are looking for
-
Structure AENDB has status X -Handling Unit Can No Longer Be Changed
Hi, During TO confirmation using LT12 we are facing an issue with TO confirmation. we get the error ERROR-MsgNo :HUDIALO Handling unit / item has the status "cannot be changed" We identified that the AENDB value is set to X for the HU. Kindly can you
-
HP 54501A - Instrument Driver for LabView v.7 or v.8
Hi all, I'm looking for HP 54501A - Instrument Driver for LabView v.7 or v.8. I have NI gpib/usb controller installed, but cannot control the scope via Labveiw. The link I found at NI web site within drivers section seems to be broken so I couldn't d
-
Alright So I've tried to trouble shoot this myself and it wont install at all on my laptop. I run OS 10.8.5. I've tried the clean install thing too that didnt' work. These are the errors i keep getting. I need to have this program or whatever so i ca
-
Can I sync pdf books not to iBooks?
When I sync my pdf library to iPad they go to iBooks. I do not like it because every new pdf page size I should adjust. Is it possible to sync my pdf library to another reader? Thanks.
-
i buy my iphone 5 in uae but i live in other country i want use a facetime how can add this feature to my iphone 5 please help me