adding a placeholder

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  
thota198Asked:
Who is Participating?
 
HainKurtConnect With a Mentor Sr. System AnalystCommented:
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
 
HainKurtSr. System AnalystCommented:
i dont get what are you trying to do...

placeholder is here

io_email_replace_vals (179).fieldvalue
0
 
thota198Author Commented:
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
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
HainKurtSr. System AnalystCommented:
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
 
thota198Author Commented:
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
 
thota198Author Commented:

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
 
HainKurtSr. System AnalystCommented:
I dont see 'io_email_values' in your code...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.