?
Solved

adding a placeholder

Posted on 2011-05-09
7
Medium Priority
?
365 Views
Last Modified: 2012-05-11
i added a placeholder in a package
the placeholder i added is NON PRODUCTION BANNER
<html>
<font face="Tahoma" size=2>
<NON_PRODUCTION_BANNER> <br><br>
<REALUSER> <br><br>
Your approved non-standard Deal will expire in 5 days.<br><br>

You may visit <MDM DSA> at <a href="<URL>"><URL></a> if you need to extend or modify the Deal listed below.<br><br>
<table border="0" align="center" cellspacing=0 width="100%">
<tr width="100%"><td width="30%"><font face="Tahoma" size=2>Deal ID</font></td>                    <td width="70%"><font face="Tahoma" size=2>: <DEALID></font></td></tr>
<tr width="100%"><td width="30%"><font face="Tahoma" size=2>Opportunity Name</font></td>            <td width="70%"><font face="Tahoma" size=2>: <DEALNAME></font></td></tr>
<tr width="100%"><td width="30%"><font face="Tahoma" size=2>Account Name</font></td>                <td width="70%"><font face="Tahoma" size=2>: <ACCOUNTNAME></font></td></tr>
<tr width="100%"><td width="30%"><font face="Tahoma" size=2>Opportunity Owner</font></td>        <td width="70%"><font face="Tahoma" size=2>: <OPTYOWNER></font></td></tr>
<tr width="100%"><td width="30%"><font face="Tahoma" size=2>Theater</font></td>                    <td width="70%"><font face="Tahoma" size=2>: <THEATER></font></td></tr>
<tr width="100%"><td width="30%"><font face="Tahoma" size=2>Area</font></td>                        <td width="70%"><font face="Tahoma" size=2>: <AREA></font></td></tr>
<tr width="100%"><td width="30%"><font face="Tahoma" size=2>Deal Status</font></td>                <td width="70%"><font face="Tahoma" size=2>: <DEALSTATUS></font></td></tr>

</table><br>

placeholder value for NON PRODUCTION BANNER is
select name into v_db_name from v$database;
      IF v_db_name <> 'DMPROD' THEN
      io_email_replace_vals (179).fieldvalue :=
      '============= THE FOLLOWING SECTION WILL NOT APPEAR ON PRODUCTION ============= ' || CHR(10) ||
      'DB = ' ||v_db_name  || CHR(10) ||
      'TO = <to>'  || CHR(10) ||
      'CC = <cc>'  || CHR(10) ||
      'BCC= <bcc>' ;
     
      ELSE
      io_email_replace_vals (179).fieldvalue := '';
      END IF;
 
 This placeholder is in the message_format of cq_message_type table
 now i need to get this placeholder in a different package
  now i need to get this placeholder in a different package  how do u get it  
0
Comment
Question by:thota198
  • 4
  • 3
7 Comments
 
LVL 61

Expert Comment

by:HainKurt
ID: 35721836
i dont get what are you trying to do...

placeholder is here

io_email_replace_vals (179).fieldvalue
0
 

Author Comment

by:thota198
ID: 35721893
i defined the placeholder in a different package there i wasnt getting the mail so i am trying in a new package where im getting mail so how should i use the place holder tht i added in a different package.
by the way both the packages are in same database so the message_format of cq_message_type table is same
0
 
LVL 61

Expert Comment

by:HainKurt
ID: 35721933
use

packege_name.property_name

in your other package... say you defined it as ph in package2

in package 1 you can access it as

package2.ph
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:thota198
ID: 35722008
can u explain or show a bit more in detail
 the new package name is cq_notification_pkg  
placeholder is nonproductionbanner as given in the beginning
old package is name is cq_pdr_send_email_pkg and procedure where i defined is built_replace_val_pr
do u use the replace func in the new package if so how
can u show it in detail in how much ever way u can
0
 
LVL 61

Accepted Solution

by:
HainKurt earned 2000 total points
ID: 35722081
here is a sample code:

create package old_package as
  ph varchar2(1000) := 'My place Holder';
  procedure sp1(...);
end;

create package body old_package as
  procedure sp1(...) as
  begin
    -- use ph here
  end;
end;

create package new_package as
  procedure sp2(...);
end;

create package body new_package as
  procedure sp2(...) as
  begin
    -- use old_package.ph here
  end;
end;
0
 

Author Comment

by:thota198
ID: 35724457

This is how i entered the code in the new package i got the error 'io_email_values' must be declared.
wht do u give for io_email_values and apart from declaration is this the right way to enter the code


 IF j.message_type IN ('DEAL_EXPIRE_5_DAYS')
                 THEN
                    CQ_PDR_SEND_EMAIL_NOTIFY_PKG.BUILD_REPLACEABLE_VALUES_TAB(IO_EMAIL_REPLACE_VALS);
         
             io_email_replace_vals (179).fieldname := '|NON_PRODUCTION_BANNER|';
             select name into v_db_name from v$database;
            IF v_db_name <> 'DMPROD' THEN
            io_email_replace_vals (179).fieldvalue :=
            '============= THE FOLLOWING SECTION WILL NOT APPEAR ON PRODUCTION ============= ' || CHR(10) ||
            'DB = ' ||v_db_name  || CHR(10) ||
            'TO = sthota@cisco.com' || CHR(10) ||
            'CC = sthota@cisco.com'  || CHR(10) ||
            'BCC= <bcc>' ;
     
          ELSE
          io_email_replace_vals (179).fieldvalue := '';
          END IF;
     
         v_mail_sent_from :='pdr_program@cisco.com';
         END IF;
0
 
LVL 61

Expert Comment

by:HainKurt
ID: 35731652
I dont see 'io_email_values' in your code...
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question