QMS$ERRORS ERROR_TYPE = 'M'
We're generating webforms using DesignerR6 with Headstart. After a procedure in a package has succesfully ended in the server, we want to display a message to the user in the calling webform.
We are trying to do that by calling QMS$ERRORS.SHOW_MESSAGE('xxx-12345') in the procedure. In QMS_MESSAGE_PROPERTIES the message has the SEVERITY = 'M'. But no message is being displayed. It seems that only messages with SEVERITY = 'E' are raised. We only want want to give information not an error.
Deep
Deep,
Are you using a version of Headstart that includes CDM Ruleframe? (Hsd2.1.2 wtih Patch 12 or Hsd65).
If so, then directly after the call to the server side program which can raise the message, you can add the following
statement:
qms$trans_errors.display_messages;
This will dump any messages that have been placed on the message stack by the serverside program.
Regards,
Lauri
Similar Messages
-
Qms$errors.show_message....
Hi everyone,
I want to know something more about this package/procedure.
Need to know something more about button handling when I call qms$errors.show_message and it displayes to me a question message with two buttons. How to know which button is pressed?
Where could I find more infos about that?
regards, ZlatkoHi,
I allready solved my problem.
I tried few solution and found out that I can solve it in this way...(for those who don't know this--> like me ).
IF QMS$ERRORS.SHOW_MESSAGE('STI-00019','some text!') THEN
message('btn1');
message('btn1');
ELSE
message('btn2');
message('btn2');
END IF;
If you press button Yes it displayes 'btn1' and if you press button No it will display 'btn2'.
...Zlatko... -
Urgent please -- got error while doing a simple update -- Thanks:)
Hi guys,
I have a procedure that updates a table, when I run the update manually from sqlplus it works and when I run the procedure by it self from sqlplus it also works the problem comes when I call that procedure from another procedure that I have I get the following error:
ERROR at line 1:
ORA-20998: Transaction Failed
ORA-06512: at "HSO.QMS$ERRORS", line 128
ORA-06512: at "HSO.QMS_TRANSACTION_MGT", line 900
ORA-06512: at "IAIGC.CG$AUS_CSH_LEDGER_HEADER", line 115
ORA-04088: error during execution of trigger 'IAIGC.CG$AUS_CSH_LEDGER_HEADER'
ORA-06512: at "IAIGC.CSH_GL_PKG", line 7634
ORA-06512: at "IAIGC.CSH_GL_PKG", line 266
ORA-06512: at line 1
This procedure was working fine until I took an export of my production dB and import it in my test database to test a fix in a diff procedure, here is my code
================================================
BEGIN
-- Get the Last day in the period
v_date := last_day(to_date(p_period,'RRRRMM'));
-- delete the trail revaluation etries from the detail
delete from csh_v_ledger_detail
where leh_period = p_period
and leh_own_id = p_own_id
and leh_jv_type in ('PR','RV');
-- delete the trial revaluation etries from the header
/*delete from csh_v_ledger_HEADER
where period = p_period
and own_id = p_own_id
and jv_type in ('PR','RV');
-- adjust difference between debit and credit in jvs
-- update balances
FOR ret_rec IN c_gen_mon_bal(v_date) LOOP
-- initialize balances for each account
v_bal_base := 0;
v_bal_fc := 0;
v_end_bal_fc := 0;
v_end_bal_base := 0;
v_trn_dr_fc := 0;
v_trn_cr_fc := 0;
v_trn_dr_base := 0;
v_trn_cr_base := 0;
v_ins := 0;
-- Get Beginning Balances for the period from the
-- csh_balances table
BEGIN
select round(amount_base,ret_rec.own_dec)
,round(amount_fc,ret_rec.bal_dec)
into v_bal_base
,v_bal_fc
from csh_balances
where gla_id = ret_rec.gla_id
and period = p_period
and own_id = p_own_id;
v_ins := 0;
EXCEPTION
WHEN NO_DATA_FOUND THEN v_bal_fc := 0;
v_bal_base := 0;
v_ins := 1;
END;
-- Get the sum of all debit and credit transaction
-- from the transactions table for the current month
select sum(round(entered_dr,ret_rec.bal_dec))
,sum(round(entered_cr,ret_rec.bal_dec))
,sum(round(accounted_dr,ret_rec.own_dec))
,sum(round(accounted_cr,ret_Rec.own_dec))
into v_trn_dr_fc
,v_trn_cr_fc
,v_trn_dr_base
,v_trn_cr_base
from csh_v_ledger_detail
where gla_id = ret_rec.gla_id
and to_char(leh_value_date,'RRRRMM') = p_period
and leh_own_id = p_own_id
and leh_closed_flag = 'N';
-- Add Balances for the month to all the transactions
v_end_bal_fc := nvl(v_bal_fc,0) - nvl(v_trn_dr_fc,0) + nvl(v_trn_cr_fc,0);
v_end_bal_base := nvl(v_bal_base,0) - nvl(v_trn_dr_base,0) + nvl(v_trn_cr_base,0);
-- Get the exchange rate for the month
v_rate := csh_acc_pkg.csh_get_rate(p_own_id,ret_rec.cur_id,v_date,'ACC');
if v_ins = 1 then
insert into csh_balances(
OWN_ID
,GLA_ID
,MONTH_END
,AMOUNT_BASE
,AMOUNT_FC
,CONVERSION_RATE
,PERIOD_STATUS
,PERIOD)
values(
p_own_id
,ret_rec.gla_id
,v_date
,v_end_bal_base
,v_end_bal_fc
,v_rate
,'C'
,p_period);
else
update csh_balances
set amount_fc = v_end_bal_fc,
amount_base = v_end_bal_base,
period_status = 'C',
conversion_rate = v_rate
where gla_id = ret_rec.gla_id
and period = p_period
and own_id = p_own_id;
end if;
END LOOP;
/* update csh_v_ledger_header
set closed_flag = 'Y'
where own_id = p_own_id
and period = p_period
and closed_flag = 'N'; */
csh_gl_pkg.csh_upd_leh_close(p_own_id,p_period);
END;
================================================There is a messages.sql script available at the hst\scripts folder of your headstart installation. When you run this script the error stack will be written to the output, this might give you the information why the procedure fails.
-
Ora-01403: no data found error in stead off messag
Hi all,
In a form there is a button that calls a stored procedure. In this procedure certain checks are made and if violated, QMS$ERRORS.SHOW_MESSAGE is called. Normally we can see the message text from the messages table. However, in this paricular situation we receive ora-01403: no data found. The message shows up later, when another message is invoked.
So, our conclusion is that the stack is not correctly read.
Problem occurs in Client server as in Webforms.
Architecture:
- Designer 6.0.3.9.0
- Forms 6.0.5.34.0
- Oracle 8.0.5.2.1
- Windows NT 4.0 SP5 on Client as on Server
- Oracle Forms Generator 6.0.3.2.0
- Headstart Template Package 5.0.4
Template Form (qmstpl50) 5.0.2
Object Library (qmsolb50 (WEB)) 5.0.4
Event Handler Library (qmsevh50) 5.0.3.2
Core Library (qmslib50) 5.0.4
Thanks in advance,
Joep Hendrix
[email protected]Sandra,
It just happens that I am confronted with the same ora message (0ra-01403) raised apparently under similar conditions. The solution you presented, however, does not help much I am afraid in my case.
I use a qms$errors.show_message statement in a procedure stored in a package on the database. This raises the same error that Joep receives (ora-01403). If I remove the qms$errors.show_message statement from the package no error is raised. If I use the statement in a form trigger I also do not encounter any problems. It therefore appears that the statement can not be raised from the serverside although according to the headstart 5.0.3 documentation that problem is resolved (issue 792479).
In the headstart documentation I find a reference to qms$errors.DisplayServerQMSError. However, maybe this is outdated. This component is not included the qms$error package I have.
Any suggestions to solve this?
My system
Forms 6.0.8.10.3
Designer 7.04
Headstart 5.04
Oracle 8i Enterprise Edition 8.1.7
Windows NT4
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Headstart Team:
Joep,
If you don't use the CDM RuleFrame version of the Headstart Template Package, normally only one message should be on the stack. It seems like in this case you have 2 messages on the stack: ORA-01403 and your custom message, and only the first is shown.
It should not occur that there are 2 messages on the stack. Have you debugged what causes the ORA-01403? Can you catch the exception so that only your own custom message is shown?
Hope this helps,
Sandra<HR></BLOCKQUOTE>
null -
Hi,
I have a form with a normal block.
In one item, I have a When-validate-item, which calls a db-package. In their, an error is raised by qms$errors.show_message.
What happens now is that the form shows the error-window (without the errortext being visible, but thats something else), but then starts revalidating the item. So the form hangs, because he is constantly switching between the two blocks/windows/items.
Has anyone experienced the same?
Thanks
PS: I have a work-around but it don't like to use it.Kristof,
I did experience the same behaviour.
From the When-Validate-Item a package procedure was called.
Procedure called a function, if the return value from the function returned false --> raise qms$errors.show_message.
Because the message was raised from the database the form will navigation to the error window.
This is being done with a go_block call, but you will return to the When-Validate-Item trigger.
Then the form will get in a loop.
The solution I used was to raise the qms$errors.show_message from within the form.
Instead of calling the package procedure, I called the package function.
If the return value of the function equals false I raise the qms$errors.show_message from within When-Validate-Item.
This way you won't navigate to the error-window and therefore the looping problem will not occur.
Regards,
Marcel -
When window closed shows qms$trans_errors window
Hello,
I want to report the following problem, regarding qmslib65.pll, revision 6.5.1.12.
To show the problem, I do the following actions:
1. In my form I delete a record (which has details record, that are not shown in the form)
2. I try to close the window and I see an popup window, asking me if I want to save the changes
3. I answer Yes and due to the restricted relation between this record and its details I see a popup window, telling me that this delete action is not allowed.
4. The next thing that happens is that the form is showing me the qms$trans_errors window with no information at all.
My guess is that this is due to the qms$window.when_window_closed procedure, present in the qmslib65.pll, especially the follwing code:
if l_last_window
then
if qms$errors.show_message('QMS-00158')
then
commit_form;
if name_in('system.form_status') <> 'QUERY'
then
go_block('QMS$TRANS_ERRORS');
raise form_trigger_failure;
end if;
else
exit_form(no_validate,full_rollback);
end if; -- show message
end if; -- last window
Notice the go_block('QMS$TRANS_ERRORS') line. In my opinion the violation of the FK restricted constraint is not handled by any business rule (qms$transaction) and therefore the go_block('QMS$TRANS_ERRORS'); statement is obsolete in this case.
What I want to do know is create a workaround to avoid showing the qms$trans_errors window if no business rule is violated, when closing the window. Any ideas?
With regards,
William de RondeThis is known bug #2283122. It was fixed in Headstart patch 6.5.2.2, which is available via the supplement option.
Basically, we added a bit of code to check the number of messages on the cg$errors message stack just before going to the QMS$TRANS_ERRORS block. We now only go to the block if the number of messages is > 0.
Regards,
Lauri -
Window Errors and Warning in this Transaction not shown
We're using Designer 6.5.82.3.0.
Business rules aren't generated according to CDM Ruleframe, no CAPI. But Table API/trigger logic.
=> Pre-Before-Insert-Row
BEGIN
if CDR_CPN.F_CPN_UNIQUE(:new.CODE)
then
-- a new code
null;
else
-- code already exists
QMS$ERRORS.SHOW_MESSAGE
('CDR-05000'
,:new.CODE);
end if;
END;
When an business rule fails the window Errors and Warning in this Transaction with the error-message is not shown. Instead we get the message Transaction failed
(when using sqlplus the same message appears, then running @messages.sql =>correct message)
According to a previous discussion the ON-ERROR of the module component should be modified (author Bart van Ges 22 May 2002). And this works, the window Errors and Warning in this Transaction is shown with the correct message.
Has anyone another solution, patch or any idea why the window doesn't appear without the modification?
Cheers,
BobAll,
Since Headstart for 6.0 (patch 12) and Headstart for 6i, Headstart default only functions well in combination with CDM RuleFrame. If you want to deviate from this standard, the functionality in the libraries should be adapted for this purpose. There are several ways to do this:
- show serverside errors in an error Alert window
- show serverside errors in the RuleFrame transaction and errors window.
Whatever approach you choose - in this thread several suggestions are being made - it is not documented in headstart how to do this. The Oracle Headstart group is not able at this moment to investigate time to workout the alternatives, though I will add an enhancement request to headstart to document these options in the headstart user guide.
Two extra suggestions:
- try to test your workaround as well as possible (try to raise errors from server, client, try to violate server constraints (pk, uk, fk, ck) and try to let serverside pl/sql fail.
- if you do not make use of ruleframe, you might run into a problem if you try to commit in the serverside logic, in this case remove the calls in the template package (qms$even_form) to open and close the transaction (pre-commit and post-forms-commit trigger events).
Regards,
Marc Vah[i]Long postings are being truncated to ~1 kB at this time. -
Error message does't show at modal form
Hi,
Can anybody tell me when and where the error should be displayed when the form is a modal form.
Please help me!
Kind regards
Edward de RidderI replay to my own message because I did not find the problem but I have a workaround that maybe interest some of you.
Copy the procedure DisplayServerQMSError from an early version of qmslib to qmslib65 qms$errors. Change than the call qms$trans_errors.Display_messages in the procedure unhandled_exception to DisplayServerQMSError and it works fine by me.
Of course there are nicer ways to do this, please tell me if you know one. -
Qms$trans_errors windows not active
Designer 9.0.2.7
Headstart 6.5
Oracle 8.1.7 database
When errors are raised from tapi's en capi's the error window works fine.
When I raise an error from a stored procedure the error window is raised but is NOT ACTIVE. The user first has to click somewhere in the error screen to see the error message.
Any ideas?More information
Form with a button which executes a stored procedure on the database.
Somewhere in the stored procedure a message is raised with: qms$errors.show_message
When I push the button the message is raised from the server into the qms$trans_errors windows. The problem is that this window is not active. I've found out that the Form navigates from the qms$trans_errors windows back to the main window. Why?? I don't know, How?? I wish i knew.
If i put the call to the stored procedure in the on-commit trigger (instead of in a button) the problem does not occur.
Meine -
Headstart error message... getting user response
Hi,
I'm trying to get an error message to come up in headstart.
I've so far managed to get normal error messages to popup and inform the user of an error. This is fine. My problem now is, I need to ask the user a 'Yes' / 'No' question (or 'OK' / 'Cancel') and use their response.
I've tried:
if qms$errors.show_message('Question here?','Q') then
--code if Yes/OK
else
--code if No/Cancel
end if;but this doesn't seem to work. It brings up an error message, but only with the 'OK' button and nothing else!
Any help greatly appreciated.
Thanks.Try using:
Create an entry in the QMS_MESSAGE_PROPERTIES (e.g. with code = 'ABC-00001') with SEVERITY = 'Q' and an entry in QMS_MESSAGE_TEXT
And then use
qms$errors.show_message( p_mesg => 'ABC-0001' )
The second parameter of qms$errors.show_message is param0 and that has nothing do to with "Q". Maybe you can use the parameter p_errtp => 'Q', but I remember vaguely that that is not working...
HTH
Roel -
Command button remains disabled after a request redirect to a PDF Servlet
Hi All,
I've a command button to generate PDF on the fly and used to work in JDev 10.1.3.3.
When we migrated to 11g, it works for the first time on a page, and the file Open/Save dialog will come up.
But then the command button remains grayed out, and clicking doesn't generate a server call.
If I do something on the page which does a partial or full submit, then the button will get enabled again.
Any suggestions?
Thanks,
Jaimon
Sample code:
Facelets:
<af:commandButton text="Create PDF" action="#{fs02.createPDF}" />
Java:
public String createPDF() {
//Validation checks here. If there are any errors, it gets added to FacesMessages to display on the same page.
if(!validate()) {
//sf.addInfoMessage('message here..');
}else {
FacesContext ctx = FacesContext.getCurrentInstance();
HttpServletRequest request = (HttpServletRequest)ctx.getExternalContext().getRequest();
HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse();
RequestDispatcher rd = request.getRequestDispatcher("/pdfdownloader");
rd.forward(request, response);
ctx.responseComplete();
return null;
pdfdownloader is mapped as a servlet, which writes the actual PDF content as a stream.Herewith the code which is triggered with the post-forms-commit trg. As far as I can see it, there is no code to disable/enable the save button in the menubar.
===
PROCEDURE validate_enbr_records IS
CURSOR c_enbr
IS
SELECT exlb.exlb_length
, enbr.enbr_ind_break
FROM dog_envelop_breaks enbr
, dog_extrnl_labels exlb
WHERE enbr_appl_cod = :flow_appl_cod
AND enbr_flow_cod = :flow_cod
AND enbr_sort_seqnr <> :enbr_sort_seqnr
AND enbr_appl_cod = exlb_appl_cod
AND enbr_exlb_cod = exlb_cod;
CURSOR c_exlb
IS
SELECT exlb_length
FROM dog_extrnl_labels
WHERE exlb_appl_cod = :flow_appl_cod
AND exlb_cod = :enbr_exlb_cod;
l_lengte_break_label NUMBER := 0;
l_lengte_sort_label NUMBER := 0;
l_length NUMBER := 0;
l_aant NUMBER := 0;
r_enbr c_enbr%ROWTYPE;
mi_id MenuItem;
BEGIN
FOR r_enbr in c_enbr LOOP
IF r_enbr.enbr_ind_break = 'Y'
THEN
l_lengte_break_label := l_lengte_break_label + r_enbr.exlb_length;
ELSE
l_lengte_sort_label := l_lengte_sort_label + r_enbr.exlb_length;
END IF;
l_aant := l_aant + 1;
END LOOP;
OPEN c_exlb;
FETCH c_exlb INTO l_length;
CLOSE c_exlb;
IF :enbr_ind_break = 'Y' THEN
l_lengte_break_label := l_lengte_break_label + l_length;
ELSE
l_lengte_sort_label := l_lengte_sort_label + l_length;
END IF;
IF l_lengte_break_label > 48
THEN
qms$errors.show_message('DOG-10194');
END IF;
IF l_lengte_sort_label > 50
THEN
qms$errors.show_message('DOG-10195');
--set_record_property(3,'enbr',status,changed_status);
END IF;
IF :system.record_status = 'CHANGED' THEN
set_menu_item_property('FILE_MENU.SAVE',ENABLED,'YES');
END IF;
END;
===
After the message has been throughn and the OK-button has been clicked, the code is never reaching the code:
IF :system.record_status = 'CHANGED' THEN
set_menu_item_property('FILE_MENU.SAVE',ENABLED,'YES');
END IF;
The save-button remains disabled.
Best regards
John. -
How can i display recent update/delete/insert records in form
Hai !!!!
i am new for forms,.......any body tell me, how can i display recent no of records updated or no of records deleted or no of records are inserted in a form. these records count are display in display items....give me detail explination......
Subbu.....the easiest way is copy and paste the oracle-forms example from the OU.
You need form-level-trigger ON-ERROR + ON-MESSAGE, POST-INSERT, POST-UPDATE, POST-DELETE, three global variables and a procedure:
ON-ERROR
handle_message( error_code, 'ERROR: ' || ERROR_TYPE || '-' || TO_CHAR(ERROR_CODE) ||': '|| ERROR_TEXT );
ON-MESSAGE
handle_message( message_code, MESSAGE_TYPE || '-' || TO_CHAR(MESSAGE_CODE) || ': ' || MESSAGE_TEXT );
PROCEDURE handle_message( message_number IN NUMBER, message_line IN VARCHAR2 ) IS
BEGIN
IF message_number IN ( 40400, 40406, 40407 )
THEN
DEFAULT_VALUE( '0', 'GLOBAL.insert' );
DEFAULT_VALUE( '0', 'GLOBAL.update' );
DEFAULT_VALUE( '0', 'GLOBAL.delete' );
MESSAGE('Save Ok: ' ||
:GLOBAL.insert || ' records inserted, ' ||
:GLOBAL.update || ' records updated, ' ||
:GLOBAL.delete || ' records deleted !!!' );
ERASE('GLOBAL.insert');
ERASE('GLOBAL.update');
ERASE('GLOBAL.delete');
ELSE
MESSAGE(message_line );
END IF;
END;
POST-INSERT
DEFAULT_VALUE('0', 'GLOBAL.insert');
:GLOBAL.insert := TO_CHAR( TO_NUMBER( :GLOBAL.insert ) + 1 );
POST-UPDATE
DEFAULT_VALUE('0', 'GLOBAL.update');
:GLOBAL.update := TO_CHAR( TO_NUMBER( :GLOBAL.update ) + 1 );
POST-DELETE
DEFAULT_VALUE('0', 'GLOBAL.delete');
:GLOBAL.delete := TO_CHAR( TO_NUMBER( :GLOBAL.delete ) + 1 );try it
Gerd -
How to wrap a cell in a xls file created from SQLplus
Hi,
I have the following sql script in Unix which creates a xls file for me -
set pagesize 9999 lines 130
set echo off
set termout off
set markup HTML on
set enpmap off
spool $test/userxyz/testfile.xls;
-- BEGIN: Data exctraction from REFINTEG
ttitle ' REPORT FOR DATABASE x1111y0'
select ' ' || error_message as ERROR, ' ' || error_type as TYPE, '&nbs
p;' || data_selection as DATA_SELECTION, ' ' || description as DESCRIPTION,
' ' || npp as NPP, ' ' || item as item
from refinteg;
spool off;
set markup HTML off;
EXIT;
/ The xls file I am getting needs to have the DESCRIPTION column as wrapped. i.e the contents will sizing the cell.
Could you provide any leads as to how to include this formatting in my sql script.
Thanks.I am trying to give a snapshot of how my csv is looking like currently and how I want it to be -
Error Type Data_Selection Description NPP Item
AAA new nsdancsjjsjqs abc=123 xy=12 pq=34 john 12345678
BBB old dsiuhfdcndhjd mno=345 cd=56 ij=89 kate 23456667
How I want it to look like (pls. note the Description column) -
Error Type Data_Selection Description NPP Item
AAA new nsdancsjjsjqs abc=123 john 12345678
xy=12
pq=34
BBB old dsiuhfdcndhjd mno=345 kate 23456667
cd=56
ij=89
i.e each of the new values in the description column of my spreadsheet would occupy a newline inside the same cell.I do not know how this can be achieved in the SQLplus. Do we need to add any formatting parameters in the sql file.
Thanks. -
Problem with two of my business rule triggers
Good morning every one,
I have a small problem with two of my business rule triggers.
I have these tables:
pms_activity
csh_cash
csh_integrate_leh
csh_integrate_led
and my process goes like this:
upon approval of a row in my pms_activity table I have a trigger that insert a row in my csh_cash - and in the csh_cash table I have a trigger that will insert in the csh_ingerate_leh and csh_integrate_led.
my problem is pms_activity does generate a row in csh_cash but the trigger in the cash does not fire to generate a row in the csh_integrate_leh and led tables.
I have generated in the following order after I created my business rule:
I have generated the table from the designer (server module tab)
I have generated the CAPI from the head start utility
I have generated the API from the designer
I have generated the CAPI from the designer
I have run the recompil.sql
I have checked that my business rule trigger is enabled and should run on insert and no where restriction
=== this is my business rule logic ======
l_rule_ok boolean := true;
begin
trace('br_csh001_cev (f)');
csh_gl_pkg.csh_gen_integ_jvs(p_id
,p_ref_num
,p_own_id
,p_trt_id
,p_value_date
,p_description
,p_amount
,p_cur_id
,p_gla_dr
,p_gla_cr
,p_gla_pl
,p_gla_rev
,p_gla_eqt);
return l_rule_ok;
exception
when others
then
qms$errors.unhandled_exception(PACKAGE_NAME||'.br_csh001_cev (f)');
end br_csh001_cev;
==== end =======================
Any help will be appreciated as I have struggled with this for two days.
Thankshmmm...
Try resetting it again and restoring with the same backup file...
Does the phone work properly once you've reset it before you try restoring? A lot of people here have experienced problems restoring from backups... could be worth forgetting about it and starting from scratch.
You could try contacting your nearest Nokia Service Centre (www.nokia.com/repair) and see if they can do anything - it may need the firmware reinstalling or upgrading... possibly... give them a call though and see.
Nokia History: 3110, 5110, 7110, 7110, 3510i, 6210, 6310i, 5210, 6100, 6610, 7250, 7250i, 6650, 6230, 6230i, 6260, N70, N70, 5300, N95, N95, E71, E72
Android History: HTC Desire, SE Xperia Arc, HTC Sensation, Sensation XE, One X+, Google Nexus 5 -
Given an url address how to send a mail?
Hi,
I would like to know the solution to this problem. Given the
address eg. [email protected] how to open or enter the mode similar
to reply button in hotmail.
thank you.
I did try this code. Doesn't work.
PROCEDURE kr_sendmail(
p_mail_subject IN VARCHAR2
,p_mail_to IN VARCHAR2
,p_mail_cc IN VARCHAR2 DEFAULT NULL
,p_mail_bcc IN VARCHAR2 DEFAULT NULL
,p_mail_body IN VARCHAR2 DEFAULT NULL
,p_attachment_source IN VARCHAR2 DEFAULT NULL
,p_attachment_name IN VARCHAR2 DEFAULT NULL
,p_display IN BOOLEAN DEFAULT TRUE
,p_cisoe_id IN NUMBER DEFAULT 0
,pio_entry_id IN OUT VARCHAR2)
IS
c_cisoe_id CONSTANT VARCHAR2
(30) := 'CISOEMAILID';
objArgL
OLE2.OBJ_TYPE;
objAppOutlook OLE2.OBJ_TYPE;
objNameSpace OLE2.OBJ_TYPE;
objInBox OLE2.OBJ_TYPE;
--objFolders OLE2.OBJ_TYPE;
--objFolder OLE2.OBJ_TYPE;
objMailItem OLE2.OBJ_TYPE;
objAttachments OLE2.OBJ_TYPE;
objAttachment OLE2.OBJ_TYPE;
objUserProperties OLE2.OBJ_TYPE;
objUserProperty OLE2.OBJ_TYPE;
v_id_new VARCHAR2(2000);
v_id_folder VARCHAR2(2000);
v_cisoe_id NUMBER;
v_test BOOLEAN;
BEGIN
-- Create Outlook Application Object
objAppOutlook := ole2.create_obj('Outlook.Application');
-- Get Namespace
objArgL := ole2.create_arglist;
ole2.add_arg(objArgL,'MAPI');
objNameSpace := ole2.invoke_obj
(objAppOutlook,'GetNamespace',objArgL);
ole2.destroy_arglist(objArgL);
-- Get InBox-Folder (Posteingang)
objArgL := ole2.create_arglist;
ole2.add_arg(objArgL,6);
objInBox := ole2.invoke_obj
(objNameSpace,'GetDefaultFolder',objArgL);
ole2.destroy_arglist(objArgL);
-- Create MailItem with properties
objArgL := ole2.create_arglist;
ole2.add_arg(objArgL,0);
objMailItem := ole2.invoke_obj
(objAppOutlook,'CreateItem',objArgL);
ole2.destroy_arglist(objArgL);
ole2.set_property(objMailItem,'To', p_mail_to);
ole2.set_property(objMailItem,'CC', p_mail_cc);
ole2.set_property(objMailItem,'BCC',p_mail_bcc);
ole2.set_property(objMailItem,'Subject',p_mail_subject);
ole2.set_property(objMailItem,'Body',p_mail_body);
--Test p_attachment_source
IF p_attachment_source IS NOT NULL THEN -- Create Attachment
--Test exist File
v_test := kr$fexists(p_attachment_source);
IF v_test = FALSE THEN --NOT TEXT_IO.IS_OPEN(v_test) THEN
--qms$errors.show_message(p_mesg=>'CKR-00022',p_param1 =>
1);
MESSAGE('Datei '||p_attachment_source||' ist nicht
existieren !');
RETURN;
ELSE
-- Create Attachment
objAttachments := ole2.get_obj_property
(objMailItem,'Attachments');
objArgL := ole2.create_arglist;
ole2.add_arg(objArgL,p_attachment_source);
ole2.add_arg(objArgL,1); --
property type
ole2.add_arg(objArgL,1); --
property position
ole2.add_arg(objArgL,p_attachment_name); -- property name
objAttachment := ole2.invoke_obj
(objAttachments,'Add',objArgL);
ole2.destroy_arglist(objArgL);
END IF;
END IF;
-- Create User Property
objUserProperties := ole2.get_obj_property
(objMailItem,'UserProperties');
objArgL := ole2.create_arglist;
ole2.add_arg(objArgL,c_cisoe_id); -- property name
ole2.add_arg(objArgL,3);
-- property type (number)
objUserProperty := ole2.invoke_obj
(objUserProperties,'Add',objArgL);
ole2.destroy_arglist(objArgL);
-- Set User Property
ole2.set_property(objUserProperty,'Value',p_cisoe_id);
-- Save
ole2.invoke(objMailItem,'Save');
-- Get Entry ID
v_id_new := ole2.get_char_property(objMailItem,'EntryID');
pio_entry_id := v_id_new;
-- Get User Property
v_cisoe_id := ole2.get_num_property(objUserProperty,'Value');
-- Create new Folder in InBox
-- objFolders := ole2.invoke_obj(objInBox,'Folders');
-- objArgL := ole2.create_arglist;
-- ole2.add_arg(objArgL,'MyFolder');
-- objFolder := ole2.invoke_obj(objFolders,'Add',objArgL);
-- ole2.destroy_arglist(objArgL);
-- Display Folder
-- ole2.invoke(objFolder,'Display');
-- Move Mail to new Folder
objArgL := ole2.create_arglist;
ole2.add_arg_obj(objArgL,objInbox); --objFolder);
ole2.invoke(objMailItem,'Move',objArgL);
ole2.destroy_arglist(objArgL);
v_id_folder := ole2.get_char_property(objMailItem,'EntryID');
-- Display or send
IF p_display
THEN
ole2.invoke(objMailItem,'Display');
ELSE
ole2.invoke(objMailItem,'Send');
END IF;
-- Release objects
ole2.release_obj(objUserProperty);
ole2.release_obj(objUserProperties);
--Test p_attachment_source
IF p_attachment_source IS NOT NULL THEN -- Create Attachment
ole2.release_obj(objAttachment);
ole2.release_obj(objAttachments);
END IF;
ole2.release_obj(objMailItem);
--ole2.release_obj(objFolder);
--ole2.release_obj(objFolders);
ole2.release_obj(objInBox);
ole2.release_obj(objNameSpace);
ole2.release_obj(objAppOutlook);
END kr_sendmail;An easier way is to use a perl-script for sending e-mail.
Using web.show_document, you can call this perl-script with
filled-parameters.
Call this perl-script in a blank window, let it close
automatically after the e-mail has been send.
Much less work, up to me...
(perl-script can be download for free at http://software.gyw.com)
Gr.,
.ob
Maybe you are looking for
-
Hi, I am running APP ver 6.0.3 on Win7. The following error appears while creating a Title: Premiere Pro Debug Event Premiere Pro has encountered and error [..\..\Src\VideoFrameFactory.cpp-78] Thanks, Gustavo
-
The iphone could not be restored error 23
**Hello to all I have a iPhone 3gs 3.1.3 Suddenly went Network and i Switched off the devices and turn it on again prepared But not open network and mark appears cable & iTunes And worked restor but an error message appears the iphone could not be re
-
Calculate difference in value based on two date parameters
Hi All, I have a table and need to calculate the difference in rent amount for a property based on two date parameters. I have uploaded sample data here: https://app.box.com/s/pu8oa4f3jhrhm0ylshdz2fuo7541vn4z Thanks Jag
-
Not able to connect to the EAS using web application
Hello I've upgraded Essasbe from 11.1.1.3 to 11.1.1.4. Before the upgrade am able to login into the EAS web application using the But after the upgrade to 11.1.1.4 am not able to login using the above said hostname but rather with the the new My ques
-
Different mfile in applicatio​n (EXE)
Hello, can You please help me? I have a problem with mfile in builded application. First, I have a main vi, in which is subvi with MathScript Node with 4 mfiles. These are stored in folder, where user can change them, but he doesn't change names of m