How to display errror message in a form based on a procedure
I created a single-level form based on a procedure. In this form, I would like to generate an error message inside of a custom button, so I used the following inside of that button:
p_session.set_value (p_block_name => 'DEFAULT',
p_attribute_name => '_STATUS',
p_value => 'Please choose a valid chair from the popup icon.');
Unfortunately, it returned a WWV-0000 error code without any error messages. I use that code in another single-level form based on a table/view, and it works fine, but I need a single-level form based on a procedure. Therefore, I want to know if that code snippet can be used in a form based on a procedure or not? Do we have any other ways to display error messages in pl/sql besides p_session.set_value(...);
Thanks in advance.
Somebody please response.
Similar Messages
-
How to autopopulate fields in a portal form based on database procedure?
Dear gurus, I am a newbie to the portal world and i have a rather unique problem. I have searched online but still cant find a solution to my problem. I have a portal form (AS version 10.1.4) based on a db procedure that accepts only one parameter. The form has about 12 fields, two of which are combo boxes. Because of the relationship b/n combo box 1 and combo box 2 and the rest of the form fields, the user has to start out by selecting a value in combo box 1. This auto populates combo box 2 (based on the previous selection). However, when the user selects a value from the populated combo box 2, this is supposed to trigger an action to query the database and retrieve values for the remainder of the form fields and populate them accordingly.
I tried to use p_session.get and set values but discovered that one cannot do this with form fields that are based on a procedure. I could write javascript to call a database procedure but i am not sure how to pass the return values from the database back to the javascript routine and then populate the remaining fields accordingly.
HELP ME PLEASE!!!
ThanksHi Venkat, create a section (section control) for each set of columns you want to hide/reveal. Put your columns in that section. Then set a rule on the dropdown so that if dropdown = "this" then show "this" section.
cameron rautmann -
How to display the values in the form based on another form option?
Hi,
I have two forms. Based on form 1 option the form 2 should display.
Form 2 values are stored in a separate table consists of step_id and step_name
For example:
In a Procedure there are multiple steps(step1, step2... step n).
If procedure 1 is choosen from form 1 and user clicks the start button and the page navigates to another form 2.
In form 2, step 1 of procedure 1 should display.
Hope it make some sense....
thank youYou can cachieve this my passing parameter through the Branc or by setting the items in computation / process.
1. On Page 1 on condition Proc1 chosen create a conditional branch that fires only when Proc 1 is chosen
2. In the Branch set the Items on Page 2 with values of Items as dictated by Proc 1.
That should do it.
It depends a lot on what Page 2 needs to dispaly the right stuff.
Regards, -
How to display error message with some variable
Hi
I want to display errror message along with material number which is thr in d LOOP .
Basically i want some variable to display along with error message .
Can anybody suggest me how can i go about it?
Edited by: sonal musale on Apr 14, 2009 12:06 PMHi,
In the message class, suppose you use 001 for invalid material message.
So keep it like:-
Invalid Material : &1
in the message class for 001.
Now in loop use as:-
loop at itab into wa.
"perform validations
"if validation fails for current material
MESSAGE e001 WITH wa-matnr.
endloop.
Similary you can use more variables:-
Invalid Material : &1 &2 &3
MESSAGE e001 WITH <variable1> <variable2> <variable3>.
Hope this helps you.
Regards,
Tarun -
How to display a message in an audit report?
hello all,
i would like to ask how do display a message in an audit report. here is my code...
CALL TRANSACTION tcode USING i_bdcdata
MODE c_n
MESSAGES INTO i_error2.
IF sy-subrc EQ 0.
ENDIF.
CLEAR i_error2.
LOOP AT i_error2.
IF i_error2-msgtyp EQ c_e.
MOVE v_pernr TO i_bdcerror2-pernr.
MOVE c_infotype TO i_bdcerror2-infty.
MOVE 'Error' TO i_bdcerror2-msgtype.
<b> SELECT SINGLE text
INTO v_msgtxt
FROM t100
WHERE sprsl = i_error2-msgspra
AND arbgb = i_error2-msgid
AND msgnr = i_error2-msgnr.
MOVE v_msgtxt TO i_bdcerror2-msgtxt.</b>
APPEND i_bdcerror2.
ENDIF.
ENDLOOP.
DESCRIBE TABLE i_bdcerror LINES v_bdcerrors.
IF v_bdcerrors <> 0.
SKIP 1.
WRITE: 'BDC Error Report'.
SKIP 1.
WRITE: 'PERNR',
'INFOTYPE',
'MESSAGE TYPE',
'MESSAGE TEXT'.
ULINE.
LOOP AT i_bdcerror.
WRITE: / i_bdcerror-pernr,
13 i_bdcerror-infty,
22 i_bdcerror-msgtype,
35 <b>i_bdcerror-msgtxt</b>.
ENDLOOP.
ENDIF.
the message text that i was getting contains &1, &2 and so on. how would i be able to replace it with the original value?
thanks!
-annAfter calling the transaction, this is what I do.
a) Call the function module, <b>MESSAGE_TEXT_BUILD</b> and pass the following values from <b>BDCMSGCOLL</b> or the internal table where you collect the messages.
i) MSGID
ii) MSGNR
iii) MSGV1
iv) MSGV2
v) MSGV3
vi) MSGV4
There is no need to fetch data using select from table t100.
It builds the message and returns in MESSAGE_TEXT_OUTPUT which can be then displayed to user.
Regards,
Subramanian V. -
How to display error message in Shopping Cart?
How to display error message in Shopping Cart and stop the shopping cart for further processing? I try MESSAGE w001(zshop) or MESSAGE e001(zshop). But it is causing run-time error.
Hi Paul,
In the DOC_CHECK or DOC_SAVE BADI, you have a global internal table named et_messages. The structure of this table is 'bbp_smessages_badi'. You can append your error message here by inputting the message type, ID and number. The message type is either 'E' for error or 'W' for warning and the number would depend on your message class(ID). You will be able to see the error message on top of the screen, can be a red or yellow highlight depending on your appended message. I don't think creating the error message via the MESSAGE syntax will be successful, maybe this is why you are getting a runtime error.
Regards,
Noel -
How to Display an Image on my FORM
Good Day!
I would like to ask some help from you guys with my problem on how to display an image on my form. I would like to display my uploaded image on my form but instead of an image, the get_blob_file is showing. By the way, I'm using Apex 4.1
I downloaded the Order Entry Sample Application and followed the Page 6, the Product Details. I even made snapshots of each details from Page Rendering to Page Processing in order not to miss a thing.
At the moment, I was able to upload or store the image on my created Oracle table and also able to retrieve it on the Download Link Text with Content Disposition value of Inline, provided by APEX Settings. If I invoke the Download link beside the file browser, a page with the image will be shown, below is the address:
http://127.0.0.1:8080/apex/apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6&p_content_disposition=inline
However, instead of showing the image on a region, below is the one showing on my Form:
<img src="apex_util.get_blob_file?a=200&s=339877802936975&p=230&d=7107921433296839&i=7107601420296838&p_pk1=54&p_pk2=&p_ck=7D6512D967336C4B94258EEA3CDF1BE6" />
As you can see the parameter values are the same but I know I missed something that's why I'm here :)
I would highly appreciate all the help you can provide and many thanks in advance.
I tried to change gear by making an html region of type PL/SQL (anonymous block) and a procedure but still no image :(
Below are the scripts.
declare
cursor cur is
select *
from wsemployee
where empid = :P230_EMPID;
begin
for rec in cur
loop
IF rec.mime_type is not null or rec.mime_type != '' THEN
htp.p( '<img src="my_image_display?p_image_id='||NVL(rec.empid,0)||'" height="'||100||'"/>' );
else
htp.p( 'No Image ');
END IF;
htp.p( ' ');
end loop;
end;
PROCEDURE
create or replace PROCEDURE my_image_display( p_image_id IN NUMBER)
AS
l_mime VARCHAR2 (255);
l_length NUMBER;
l_file_name VARCHAR2 (2000);
lob_loc BLOB;
BEGIN
SELECT MIME_TYPE, PHOTO_BLOB_CONTENT, PHOTO_FILENAME,DBMS_LOB.GETLENGTH(photo_blob_content)
INTO l_mime,lob_loc,l_file_name,l_length
FROM wsemployee
WHERE empid = p_image_id;
-- set up HTTP header
-- use an NVL around the mime type and
-- if it is a null set it to application/octect
-- application/octect may launch a download window from windows
owa_util.mime_header( nvl(l_mime,'application/octet'), FALSE );
-- set the size so the browser knows how much to download
htp.p('Content-length: ' || l_length);
-- the filename will be used by the browser if the users does a save as
htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(l_file_name,instr(l_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
-- close the headers
owa_util.http_header_close;
-- download the BLOB
wpg_docload.download_file( Lob_loc );
END my_image_display;
Edited by: user13831927 on Dec 22, 2012 3:24 PMHi Ying,
you can add a UDF to the table spp2 with a programm
but the table is not yet listed in the 'Manage User Fields' form.
there's no way to "enable" it - sorry -
How to display success message in function module
Hi Experts,
I am developing new function module regarding URL finder. As per my requirement ,
If USER ID is not provided -display SUCCESS MESSAGE and Provide sy-uname.
how to display success message.if possible can You write the code.
Thanks
rajuHello,
We can use an exporting parameter like single character field like 'S' for success and 'E' for error instead of a message.
Another option is you can use the Tables parameter and populate Return table with error or success message. Return table of type 'BAPIRET2'.
Hope this might help you!
Regards,
MM Jaffer. -
How to display a message dialog box
I need to know how to display a message box from my application.
Anyone can help me?
Thanks in advanceDear Zennen,
Use JOptionPane.
Ex
JOptionPane.showMessageDialog(this,"message","title",JOptionPane.INFORMATION_MESSAGE); Thanks
Joey -
How to display the message along with a value using BBP_CHECK_BADI
Hi Gurus,
I need to display a message dynamically when the user create's a shopping cart. I am using Check_badi for this. i.e., I need to display the buyer number and amount left for him dynamically. I am storing both of them in variables and don't know how to display the messages laong with some message " the amount left for <XXXXXX> is <$$$$$$$$>". Can you help me out.
Thanks,
NeelimaHi,
you can use the function module 'BBP_PD_MSG_ADD'. This is the function module normally used for the displaying the error messages in SRM.
See wether you can use already available error messages , use the transaction SE91 , and the message class being BBP_PD -
How to display the Message Pool Messages in CE 7.2
Hi Experts,
Please let me know how to display the Message Pool Messages in CE 7.2.
I have tried with reportContextAttributeMessage, but it is deprecated in CE 7.2.
Please do the needful.Its Urgent.
Thanks & Regards,
SatheshKumar RHi Sathesh,
Do the following steps:
1.) After creating a component, under it you will see Message Pools. Double click and open it.
2).Click "Add Message" and add a new message. (Give a message key, type of message (either warning, error etc ) and message text).
3). Save the metadata.
4). Raise this message where all you want by using following code(For example, on click of a button) :
IWDMessageManager msgnr = wdThis.wdGetAPI().getComponent().getMessageManager();
msgnr.reportMessage(IMessage<component name>.<message>,null,true);
For example, I have a component name TestAppComp and under message pool I have message called message1, then use lik this:
IWDMessageManager msgnr = wdThis.wdGetAPI().getComponent().getMessageManager();
msgnr.reportMessage(IMessageTestAppComp.MESSAGE1,null,true);
Reply me if you any doubt.
Regards,
Jithin -
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. -
How to display F4 values in one field based on other field selection
Hi All,
How to hide a UI element (i.e Link to action) highlited for Normal User and display the same to super user.
Component Name : /SAPSRM/WDC_DODC_SC_GAF_C
2.Can i know how to display the entries in supplier field based on Product category selection.
Right now all the entries are getting displayed in the supplier field.
I want to display only entries based on Product category.
Search Help Name : BBP_BUPA_CLL_PARTNER
Component Name : /SAPSRM/WDC_DODC_SC_I_LIM
How to enhance the web dynpro component with the filtered values.
Regards,
Krish.Hi Ashvin,
Thanks for the document. In the search help there is a standard FM which is getting executed.
Can i enhance that FM or should i copy and edit.
BBP_F4IF_SHLP_EXIT_CLL_PARTNER
If i creata a Z FM and make changes how to pass that values to my standard Component View UI Element.
If not then suggest me some alternative.
Regards,
Krish -
How to implement Search Help in Interacive Form based on WebDynpro Java?
Hi Experts,
How to implement Search Help in Interacive Form based on WebDynpro Java?
Could someone please provide the prerequisites and the code for the same.
Regards,
ShobhitExtend the controller and get the handle of the current row of the VO. Set set the attribute context filed accordingly. Also get the handle fo the flexbean and set the context. According rendering would change.
Regards
Sumit -
Return values for a Form based on a procedure
Hi,
I am fairly new to Portal Applications.
I have a form based on a procedure.
The procedure has an IN OUT parameter and what happens at the moment is that once the submit button is pressed the IN OUT parameter is displayed on a new page.
My question is...
How do I display the returned value in a field on the form?
Please help
ThanksHi,
This is how it works right now. It is not possible to show it in the same form.
Thanks,
Sharmila
Maybe you are looking for
-
When I used facetime on my Macbookair for the first time I facetimed my daughter's iphone and it also rang to my husbands iphone. How do I keep that from happening? We all use the same itunes account so does it have something to do with that? do we e
-
Hi FI Gurus, The vendor master have house bank key xxx1 ( SGD Bank a/c). while making payment to vendor through F110, I want to change house bank key with xxx2 (USD Bank a/c) in payment proposal with option re-allocate, but system won't allowed and
-
tell me subcontracting cycle with excise duty with Tcodes
-
Keep changing to limted service
help why does this tin can keep putting me in limted use mode and have turn off and wait reconnect
-
I haven't updated or installed anything, my phone is 5 days old. I loaded up some music last night with the Media Sync, worked fine. - added 4 more podcasts this morning - worked fine - tried to add some more files at lunch and I get the followoing e