Action based on type of DDL in Replicat question

Hi,
Our destination DB has 2 extra columns per table REPL_CREATE_DATE & REPL_UPDATE_DATE of type DATE. We want to populate REPL_CREATE_DATE when the DDL is an INSERT and we want to populate REPL_UPDATE_DATE when the DDL is an UPDATE.
In other words:
IF DDL is INSERT then REPL_CREATE_DATE = @DATENOW() ELSE REPL_CREATE_DATE = @COLSTAT(NULL)
IF DDL is UPDATE then REPL_UPDATE_DATE = @DATENOW() ELSE REPL_UPDATE_DATE = @COLSTAT(NULL)
Is something like this possible in Goldengate?

Hi, I found the answer in MOS!
How to maintain created date and updated date for a record using Oracle GoldenGate (Doc ID 1450299.1)
from the note:
ogg_create_date = @IF (@STREQ (@GETENV ("GGHEADER", "OPTYPE"), "INSERT"), @DATENOW(), @COLSTAT (MISSING)),
ogg_update_date = @IF (@VALONEOF (@GETENV ("GGHEADER", "OPTYPE"), "UPDATE", "SQL COMPUPDATE", "PK UPDATE" ), @DATENOW(), @COLSTAT (MISSING)));
So I must use the GGHEADER option of @GETENV to return information from the header portion of an Oracle GoldenGate trail record. The header describes the transaction environment of the record. OPTYPE returns the type of operation.
Create Date would be OPTYPE=INSERT
and
Update Date would be OPTYPE= UPDATE, SQL COMPUPDATE or PK UPDATE.
Possible reults for OPTYPE are INSERT UPDATE DELETE ENSCRIBE COMPUPDATE SQL COMPUPDATE UPDATE & TRUNCATE

Similar Messages

  • Custom action with XML type input and output parameter.

    Hi,
    I want to develop custom action with xml type input and/or output parameter.
    Is there sample code for java side. How is the definition of input and/or output parameter and set/get methods?
    does it need special .jar file to develop custom action like this?
    Thanks.

    Cemil - yes, you can use XML data types.  Use the class
    com.sap.lhcommon.xml.XMLDataType
    for your parameter type.  Here is a snippet from a custom action we use to log XML (instead of just returning the #text node like the default logger does):
    public class XMLLogger extends ActionReflectionBase
        private String source;
        private String eventType;
        private String textMessage;
        private XMLDataType xmlMessage;
        public XMLLogger()
            log = new Logger("UserLog");
            source = DEFAULT_SOURCE;
            eventType = TYPE_INFO;
            textMessage = "";
            xmlMessage = new XMLDataType();
        public XMLDataType getXmlMessage()
            return xmlMessage;
        public void setXmlMessage(XMLDataType xmlMessage)
            this.xmlMessage = xmlMessage;
        public void Invoke(Transaction transaction, ILog ilog)
            StringBuffer sb = new StringBuffer();
            sb.append('[');
            sb.append(source);
            sb.append("] ");
            sb.append(textMessage);
            sb.append(XMLUtils.convertXmlToString(xmlMessage));
    XMLUtils is a helper class we wrote - it's just a bunch of standard Java XML boilerplate code.  The important part you need to know is XMLDataType.getDocument() will return an org.w3c.dom.Document.
    I hope that was enough information to help.
    -tim

  • Quantity based condition type for excise duty  calculation in tax procedure

    Hi,
    If any one has worked on the issue of excise duty  calculation on Quantity of items purchased Quantity based condition type.
    [<b>For a formula based calculation procedure TAXAU]</b>
    Example : If quantity purchased = 10 units
              Duty to be calculated @ Rs.3 per unit
              Duty on the 10 units = Rs.30
    Other than SAP Note 816835 any help is appreciable.
    Thanks a lot,
    Uma
    Message was edited by: Uma

    I could not find this condition type/Tcode  in our client system.
    Even we are on 4.6c.
    Thanks,
    Message was edited by: Uma

  • Inserting a row in a schema-based xml type column

    i have problems while inserting a row in a schema-based xml type column
    it reports an error(schema and elemnt do not match)
    although they are matching if anyone can try it
    and if it worked plz send me the example

    SQL> DESC XML_TAB;
    Name Null? Type
    XML XMLTYPE
    SQL> INSERT INTO XML_TAB
    2 VALUES
    3 (xmltype('<request>
    4 <filter>(extshortname=bhagat)</filter>
    5 <attributes>dn</attributes>
    6 <context/>
    7 <scope>subtree</scope>
    8 </request>'));
    1 row created.
    If your problem persists,post ur lines of code..
    Good luck!!!
    Bhagat

  • Can I change Type Action "URI" to Type Action "Launch" in LiveCycle Designer ES 8.2?

    I am trying get a link in my pdf form to launch Windows Explorer to a folder or just launch the excel file in MS Excel. I used LiveCycle Designer ES 8.2 to create the form. My problem is most of my users have Chrome as their default browser. When they click on the link on the form it opens in the Chrome browser. If IE is their default browser it opens Windows Explorer so they can open and edit the file. But like I said, most of my users are using Chrome. In my search for a fix, I saw a discussion (see below) where they are trying to launch a pdf file with "Launch" vs. "URI".
    So I was wondering, can I change Type Action "URI" to Type Action "Launch" using LiveCycle Designer ES 8.2?
    ***Discussion link***
    MS Word 2007+ - can it encode hyperlinks using the PDF Action Type "Launch" instead of "URI" when publising a ".docx" fi…

    I have a link in the LiveCycle form that can be clicked by the user to open Windows Explorer and modify the file. The xml for the link is below:
            </draw>
             <draw name="Text" x="35.394mm" y="104.458mm" w="167.593mm" h="4.171mm">
                <ui>
                   <textEdit/>
                </ui>
                <value>
                   <exData contentType="text/html">
                      <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p style="tab-interval:0.5in;tab-stops:right 0.5in right 0.667in;font-family:'Times New Roman';text-decoration:none;letter-spacing:0in">Add new project to the Courseware Revision Status spreadsheet<span style="xfa-spacerun:yes"> </span><a href="file://///52TYMX-AS-TM040/FPMI_Common/Project Time Tracking/CW Revision Status"><span style="font-size:10pt">S:\Project Time Tracking\CW Revision Status\</span></a><span style="xfa-spacerun:yes"> </span></p></body>
                   </exData>
                </value>
                <para vAlign="bottom"/>
                <traversal>
                   <traverse ref="CheckBox1[20]"/>
                </traversal>
             </draw>
    I do not have access to notepad++ (hex editor) and as such am trying to make hex changes with Adobe LiveCycle if possible.
    Thanks for your response.

  • How can I get the selected action of content type by javascript from Firefox Options Applications?

    I works on my website, and it have to check the PDF file will be opened in which plugins
    So we have to implement some javascript to check the selected action of Content Type from Tool>Options>Application
    Do we have any javascript code to check this

    You can't check this with code that runs on the server or via JavaScript in the web page.
    Note that current Firefox version do not expose the built-in PDF Reader via the navigator.plugin array, so if you can't detect a plugin than maybe assume that the built-in PDF reader is used with Firefox version 19 and later.
    *Bug 840439 - Expose PDF.JS as a plugin navigator.plugins when enabled

  • Single form Multiple Actions based on button click

    Hi,
    I have to call two different actions based on button click from single <form > .
    How to achive this?.
    Thank you

    Hi,
    I am using struts <html:form> and my code is as follows
    <script language="javascript">
              function setAction(val){
         if(val==A){
                   window.open(document.forms[0].action="preview.do");
         }else if(val==B){
         document.forms[0].action="create.do";
              document.getElementById('fcreate').submit();
    </script>
    <html:form action="/create.do" >
    <html:text property="name">
    </html:form>
    action is mandatory for <html:form>
    Its not sending the form elements, when I click the preview button.
    Create button works fine. In struts-conig, I have taken same form name for create and preview actions
    Please give me some tips
    Thank you

  • How to show reasons of action based on PA?

    Experts
    We are in the process of implementing for different countries simultaneously. We have 10 actions which are common for all these countries. However these countries have different reasons of action for these diferent set of 10 actions. I want to show only country specific reasons of action based on PA. Is there any way by which it could be done.
    Regards

    Hi
    I feel so to....maybe you can create user groups and also then have different actions ..... but this is a high price to pay for the same. You may want to prefix your action reason with two character country code, and train your users accordingly, You can also then have a user exit based on which user needs to use which action.......that's if you want a very strict controll.....best regards

  • Performing action based on available memory

    I know java will let your query the freememory() available. My question is it possible to perform an action based on how much free memory is left? Like say if the memory is low you start storing things in a file rather than in memory to save on space. I'm thinking of something similar to virtual memory. It seems though that the freememory function isn't really reporting what is going on. I setup a test look that just creates new objects until the runtime crashes from low memory. Inside the for loop it would test for free memory each time around. If it was below a certain threshold i would print out something. But it doesn't ever seem to reach that point no matter how large i make it. Any idea's about freememory and how it works or how to use it?

    I setup a test look that
    just creates new objects until the runtime crashes
    from low memory. Inside the for loop it would test
    for free memory each time around. If it was below a
    certain threshold i would print out something. But it
    doesn't ever seem to reach that point no matter how
    large i make it.This suggests to me that you aren't keeping references to all those objects, so they are being garbage-collected.

  • Define Corrective Actions based on URL

    Hello,
    I'm new to using 10gR3 Grid control -
    Is there a way of defining a corrective action based on the success of a URL - so if a URL fails with say a 404 error or times out, an OS script can be run.
    I can only find ways of assigning corrective actions with pre-defined alert metrics.
    Thanks for any help

    At the risk of repeat-posting, I'll clarify. Say I create a file named routing.xml which defines some routes like this:
    <routing-config>
      <route>
        <name>Standard rule</name>
        <description>
          This route maps the first two parts in the path with the module and action
        </description>
        <url-pattern>/:module/:action.do</url-pattern>
      </route>
      <route>
        <name>Default Index</name>
        <description>
          Allows the module to be specified without the action for "Index" actions.
        </description>
        <url-pattern>/:module.do</url-pattern>
        <request-parameters>
          <parameter key="action" value="Index" />
        </request-parameters>
      </route>
      <route>
        <name>Homepage</name>
        <description>
          Loads the Home page
        </description>
        <url-pattern>/</url-pattern>
        <request-parameters>
          <parameter key="module" value="Home" />
          <parameter key="action" value="Index" />
        </request-parameters>
      </route>
    </routing-config>The bits like ":module" which be represented by the actual name of the module in the URL. Does anyone know if something like this already exists? :)
    I wrote this exact same thing in PHP5 just a few weeks ago but I really don't have the motivation to write it all over again in Java :P On a side-note, things like this usually come with helpers for turning unclean URIs into clean URIs.

  • Creating a number of Link to Actions based on the Output of an ALV

    Hello Experts,
    I have an ALV table as an output in WDA in which the number of records are unknown.
    I want to limit the number of records to 500 at a point of time.
    Below the table i need to have link to actions placed like 1-500 501-1000 10001-1500 and so on.
    As the number of records are unknown i need to have these link to actions divided among total records.
    And if the table shows 1-500 records the Link to Action 1-500 should become text so that the user will not be able to click on it.
    So my requirement is
    1.How to limit the number of records to 500.
    2.How to place the link to actions dynamically based on the number of output records.
    3.How to change the Link to Action to Text.
    Please help me in this.
    Thanks in Advance,
    Shravan

    Hello Shravan,
    If you know the total number of records at runtime then its simple. Otherwise you need to write some complex logic. I assume that at runtime while launching the application you will know the total number records .
    1.How to limit the number of records to 500.
    As Srinivas mentioned call the set_visible_row_count method by passing 500
    2.How to place the link to actions dynamically based on the number of output records.
    Logic for the same.
    data i_total type i value 1250. "say total number of records
    data i_max type i value 500. "your max records to be displayed in aLV at anypoint of time
    data i_num type i.
    data i_rem type i.
    i_num = i_total div i_max.
    i_rem = i_total mod i_max.
    data lv_end_text type string.
    data lv_start_text type string.
    data lv_final_text type string.
    data i_start type i.
    data i_end type i.
    do i_num times.
      i_start = ( i_max * ( sy-index - 1 ) + 1 ).
      lv_start_text = i_start.
      i_end = i_max * sy-index.
      lv_end_text = i_end.
      concatenate lv_start_text ' - ' lv_end_text into lv_final_text RESPECTING BLANKS.
       "Write the logic to create the Link to Action - as suggested by Srinivas
    enddo.
    if i_rem > 0.
      i_start  = i_max * i_num + 1.
      lv_start_text = i_start.
      i_end = i_max * i_num + i_rem.
      lv_end_text = i_end.
      concatenate lv_start_text ' - ' lv_end_text into lv_final_text RESPECTING BLANKS.
    " Write the logic to add the last linkToAction
    endif.
    3.How to change the Link to Action to Text.
    If you set the enable property of the LinkToAction to abap_false then it will be disabled and displayed as text.
    Hope this helps.
    BR, Saravanan

  • Getting Sequence object from pre-step substep of Sequence Call based step type

    How to obtain reference to Sequence object from within pre-step substep of Sequence Call based custom step type?
    Given: new custom step type which based on NI Sequence Call step type. There is Pre-Step substep exist for this step type.
    How to get reference to Sequence object representing Sequence which will run?
    Although there is possible to examine SequenceAdapter and SequenceCallModule properties, it seems redundant since module (Sequence) is already loaded by TestStand ("NI TestStand Reference Manual. Table 3-4. Order of Actions that a Step Performs"   Action #6, while my code is running as Action #13).
    Thanks.
    Misha

    Could you explain what you want to do ?
    Why do you want to get the sequence object within a pre-step substep ?
    I give you some informations but I don't know if it's the better way to do what you want (because I don't know what you want to do with the sequence object).
    If the substep uses the ActiveX adapter :
    You can get the sequence object but you should save the object reference in a StationGlobals variable.
    And you should release the object reference within your sequence when you don't need it any more.
    If the substep uses another module adapter: 
    Get the step module, then the sequence name (module property).
    Then get the sequence object by the sequence name from the sequence file.
    Here are the paths to use for both methods :
    Sequence Name property path : Step.Module.SeqName
    Sequence Object path : RunState.SequenceFile.GetSequenceByName (seqname)

  • How do I have the learner perform a conditional action based on a button selection?

    The learner needs to select a checkbox on the screen of a performance exercise.  I've put the widget in for the checkbox and it works fine.  After the select the checkbox, they need to select OK on the screen to move them onto the next screen.  However, I don't want the learner to just select OK without selecting the checkbox in order to replicate the sequence correctly. 
    I have a slide which shows the message  which tells them as to what they did wrong when they select OK without checking the box, but when I tie that to the correct response, it will go there whether they select the checkbox or not.
    I've tried adding multiple actions to the button, which doesn't work, becuase the OK button has to be tied to the learner conditionally selecting the checkbox to move on to the correct slide.  If I use multiple actions, and the first action is to SHOW  the slide with the incorrect message, if they correctly check the box and then hit OK, it will first SHOW them the incorrect slide.
    I think what I need is a variable and then add an advanced action with a conditional statement.  However, I don't really know how to do that.  Here's the variable I created, but I don't know what value I should assign.  Here's the screen shot of the variable and conditional statement.  Could someone tell me how to do the variable and the conditional statement so that the learner when selecting OK WITHOUT selecting the checkbox first will be redirected the the error slide and if they select the checkbox FIRST, and then OK, they move on to the next screen?  Thanks,

    Thanks, you definitely got me started on the right track on variables and advanced action statements.  The screen shots helped.
    Here's how the actual fix went to make sure the OK button on the screen had a conditional statement attached to it, with
    an advanced action:
    I created parameters for the widget to link to the variable:
    I created a variable:
    Then I created an advanced action conditional statement for that variable which enabled the button to advance to the next slide when the clickbox was checked:
    Then where I finally realized my final mistake was not setting the button properties to execute advanced action:

  • Follow up action 14 Inspection Type- Equipment status change

    could anyone tell me which follow up action for 14 inspection type is to be bought into for changing Equipment Availablity status to Non Availability status when I reject calibration lot for that particular equipment.

    hi
    kindly check whether this FM will work for you QFOA_OBJECT_STATUS_SET
    regards
    thyagarajan

  • Dynamic Action based on Interactive Report Select List Value

    I'd like to perform a Dynamic Action when a user selects one of 3 options from a Select List within an Interactive Report:
    select APEX_ITEM.SELECT_LIST(
    p_idx => 3,
    --p_value         =>   deptno,
    p_list_values => 'Copy;Copy,Delete;Delete,Export to PDF;Export to PDF',
    --p_attributes    =>   'style="color:red;"',
    p_show_null => 'YES',
    p_null_value => NULL,
    p_null_text => '--Select--',
    --p_item_id       =>   'f03_#ROWNUM#',
    p_item_id => 'P6_IR_SELECT_LIST',
    p_item_label => 'Label for f03_#ROWNUM#',
    p_show_extra => 'YES') "Actions"
    from dual;
    When building the Dynamic Action, I chose the following values from the Advanced wizard
    Event: Select
    Selection Type: DOM Object
    DOM Object: P6_IR_SELECT_LIST
    Condition: Equal to
    Value: "Delete"
    True Action: Execute Javascript Code: Alert('Here');
    Doesn't seem to be firing...can anyone help?
    Thanks in advance,
    John

    Hi,
    I am not sure if the "equal to" condition applies to a DOM object... after all, a DOM object can be anything (any HTML element) not only a field.
    Try using a javascript expression instead, like this:
    $v('P6_IR_SELECT_LIST')=='Delete'UPDATE: Sorry, I just tested and "equal to" condition works for DOM objects... should have tested before posting!
    Luis
    Edited by: Luis Cabral on Feb 29, 2012 4:45 PM

Maybe you are looking for

  • All Mac network setup?

    Hello all! This is my first post here. Thanks for taking the time to help me with an answer to my question below. I work for a small graphic design firm. We all work on iMacs here in our office (6 Macs total) with the exception of two PCs (1 for rece

  • Disk utility - can't restore image - button inactive

    Hi, Can anybody tell me why the restore button in disk utility / restore tab, is inactive? Even after choosing the source image it stays that way. It's a USB flash drive that I'm trying to restore on. Any help would be great! Thanks!

  • Dragging and copy and paste dont work.

    In the mail program I cannot drag e-mails to folders, and on any application I cannot copy or paste anything.

  • Missing "SAP XI Adapter engine" in CCMS Monitor

    Dear all, we try to configure PI CCMS monitor but we can't find the subtree "SAP XI Adapter engine " in Visual admin. In detail: the subtree "SAP XI Adapter engine "is not displayed in Visual administrato under server->service->monitoring->Monitor tr

  • Cd drive says no drive

    I put a disk into my iMac and it never read and when I hit the eject button on the keyboard nothing happens.  The eject button on the bar at the top of my screen says "no drive".  I can't get the disk out... What do I do?  Is the drive broken?  The d