Dynamically passing %rowtype

I've built an update row trigger on several tables. The purpose is to capture the old and new values in variables then passing these values to a package containing MANY functions/procedures that validate the data. Each table is structured differently. I've got about 183 tables that need to have this trigger applied to it.
Anyway, the workaround I've found for the first few tables is to overload the procedures in the package and pass in the literal table_name%rowtype (ex. emp%rowtype). This is at best a cumbersome solution because of the number of tables that will eventually be passed.
I've tried the following:
1) dynamically building the %rowtype variable then passing that variable (on compile I get an error saying table_name must be a table)
2) creating a global temporary table in a separate procedure using pragma autonomous transaction (when I run the update I get an ORA-03031 error because the user has insufficient priveliges. We want to assign priveliges by roles not by individuals, so this option doesn't work for us.)
3) create a cursor by inserting the new/old values into the cursor. (seems that we have to do a select statement to create the cursor then fetch records from the cursor into a variable. We really just want the table structure, not the data. Then we want to insert the values from the :old & :new values).
4) Our DBA doesn't like varrays, nested tables, or object types so that doesn't seem to be an option.
I know these triggers must be done all of the time, but I can't figure out how to do it.
tia, robin

Thanks for your response Nilanjan. I am doing exactly same thing but facing an issue. I am concatenating the LOCATIONS base members (retrieved using 2nd EVDRE) and referencing the cell with the concatenation value to the memberset of the ACCOUNT dimension (Location = cell reference). It works fine the first time but the moment I select a different LOCATION hierarchy in the control view, the formula is disturbed because the cell references change. For example: when I select H1, I have Japan and India as the first 2 members in the Row key of the 2nd EVDRE( LOCATION one). I get these row key range values in separate cells. And I pass these cell references in the Concatenation formula. But when I select a different hierarchy H2 and say in the second hierarchy India is at 7th position, then it does not work as the cell that had reference to the second row key range (with India value) still has India value instead of the 2nd value in the new hierachy which is say England i.e. the cell does not take value by reference. If you have any solution to this problem, please let me know. You help is much appreciated.
Thanks
Rahul

Similar Messages

  • Dynamically Pass sql query in Database adapter

    hi',
    How can we dynamically pass sql query in Database adapter, is there any way, I am using SOA 11G.
    Thanks
    Yatan

    Hi,
    Tried that too. No luck. Gives me this.
    The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'selectUsingIn' failed due to: Pure SQL Exception.
    Pure SQL Execute of select interface_id, property_name, property_value from ( (?) ) failed.
    Caused by java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    Regards,
    Neeraj Sehgal

  • Dynamically passing data into a running while loop from a DAQ assist. in an ouside while loop

    Hello,  I'm currently a student working on a senior project and I'm trying to do a state machine that will turn off and turn on a compressor depending on time and coprocessor failure. 
    In the run state, wich is #1 on the case structure box I placed the DAQ assist.  Which takes in data from an accelerometer.  If the accelerometer's value is above the limit four times it will end the loop or if the time runs out it will end the loop. 
    The problem I am having is that i need to run four compressors.   I was thinking about having four case structures all within the outside loop, but I can only have the DAQ assist in one location.  This means that I now have to move the DAQ assist out of the run loop or run all four compressors in the one case structure.  If i remove the DAQ assist.  I can only get it take in data once when the loop starts and never again.  I understand why, but is there a way to dynamically pass data froma  DAQ assist.  into a running loop? 
    Also on a side note, i can't find a tutorial on how to really create a state machine using Enums.  Does any one know where to find this. 
    I have attached my curent program.
    Thank you for your help,
    Ryan
    Attachments:
    TEST STAND STATE MACHINE 2-28-07.vi ‏288 KB

    in labview choose file->new... then pick standard state machine and there are instructions.
    you can create a custom control and either use an enum, text ring or menu ring.  Edit the values and then save the control and drop into your vi and you can wire this to your case structure
    - James
    Using LV 2012 on Windows 7 64 bit

  • Dynamically Pass the Column Name cursor. || Dynamic Column Name

    Hi,
    I need to dynamically pass the column name based on a Mapping table in a loop ( Right now i have hardcoded stuff )just like using Execute immediate.... Inside the procedure, I have commented as where i hit the problem.
    Thanks for all of your time...
    Thanks
    Muthu
    CREATE OR REPLACE PROCEDURE xml_testing_clob AS
    doc xmldom.DOMDocument;
    main_node xmldom.DOMNode;
    root_node xmldom.DOMNode;
    user_node xmldom.DOMNode; item_node xmldom.DOMNode;
    root_elmt xmldom.DOMElement;
    item_elmt xmldom.DOMElement;
    item_text xmldom.DOMText;
    item_test xmldom.DOMText;
    nodelist xmldom.DOMNodeList;
    sub_variable varchar2(4000);
    x varchar2(200);
    y varchar2(200);
    sub_var varchar2(4000);
    CURSOR get_users IS
    SELECT FIRST_NAME,LAST_NAME,ROWNUM FROM USER_INFO_TBL WHERE WEIN_NUMBER = '1234' ;
    CURSOR get_cdisc_name IS
    select CTS_COL_NAME,CDISC_NAME from CTS2CDISC_DICTIONARY where CTS_TABLE_NAME = 'USER_INFO_TBL';
    BEGIN
    -- get document
    doc := xmldom.newDOMDocument;
    doc := xmldom.NewDomDocument;
    xmldom.setVersion(doc, '1.0');
    xmldom.setStandalone(doc, 'no');
    xmldom.setCharSet(doc, 'ISO-8859-1');
    -- create root element main_node := xmldom.makeNode(doc);
    root_elmt := xmldom.createElement(doc,'AdminData');
    root_node := xmldom.appendChild(main_node,xmldom.makeNode(root_elmt));
    FOR get_users_rec IN get_users LOOP
    item_elmt := xmldom.createElement(doc,'User');
    xmldom.setAttribute(item_elmt,'OID' , get_users_rec.rownum);
    user_node := xmldom.appendChild(root_node,xmldom.makeNode(item_elmt));
    FOR cv_get_cdisc_name IN get_cdisc_name LOOP
    EXIT WHEN get_cdisc_name%NOTFOUND;
    sub_var := cv_get_cdisc_name.cts_col_name;
    sub_variable := 'get_users_rec.';
    sub_variable := 'get_users_rec.'||cv_get_cdisc_name.cts_col_name;
    x := sub_variable;
    dbms_output.put_line(x); -------------- Here i just see the literal string
    y := get_users_rec.FIRST_NAME;
    dbms_output.put_line(y); -------------- Here i just see actual value ( data )
    item_elmt := xmldom.createElement(doc,cv_get_cdisc_name.cdisc_name);
    item_node := xmldom.appendChild(user_node,xmldom.makeNode(item_elmt));
    item_text := xmldom.createTextNode(doc,x ); ---- This is the place i am hitting with an error .
    If i use variable X then i am able to see only the literal
    string in the output. BUT if i put cursor name.coulmname,
    then the resumt (XML) is fine.I wanted acheive this
    dynamically just like execute Immediate
    item_node := xmldom.appendChild( item_node , xmldom.makeNode(item_text));
    END LOOP;
    END LOOP;
    -- write document to file using default character set from database
    xmldom.WRITETOCLOB(doc,);
    xmldom.writeToFile(doc, 'c:\ash\testing_out.xml');
    -- free resources
    xmldom.freeDocument(doc);
    END;
    +++++++++++++++++++++++++++++++++++ XML OUTPUT +++++++++++++++++++++++++++++++++++++++++
    <?xml version="1.0" ?>
    - <AdminData>
    - <User OID="1">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName> </User>
    - <User OID="2">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="3">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="4">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="5">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    ++++++++++++++++++++++++++++++++++++++++++++++++++++ MAPPING TABLE DETAILS +++++++++++++++++
    CTS_COL_NAME     CDISC_NAME     CTS_TABLE_NAME     XML_TAG     -----------> Column Name
    FIRST_NAME     FirstName     USER_INFO_TBL     Element     -----------> Records
    LAST_NAME     LastName     USER_INFO_TBL     Element     -----------> Records

    My scenario is little different, let me explain:
    My columns will remain same but values changes (based on column formula) according to the selected prompt value
    If I select 'Oct' from prompt then
    Curr will contain data for 'Oct' only
    Next1 will contain data for 'Nov' only
    Next2 will contain data for 'Dec' only
    Next3 will contain data for 'Jan' of next year only.
    Later if I select 'Jul' from prompt then
    Curr will contain data for 'Jul' only
    Next1 will contain data for 'Aug' only
    Next2 will contain data for 'Sep' only
    Next3 will contain data for 'Oct' only.
    I don't have different columns for each months but the columns are capable to reflect data for any month.
    So, how can I reflect the column name as month name for which that contains data.
    Regards,
    S Anand

  • Dynamic Passing of the Parameters In Inforview URL

    Hi,
    I have a requirement wherein I need to dynamically pass the prompt values through the infoview url. I am able to successfully pass the parameter value in the url and the report renders data based on the prompt value passed.
    When the report is opened when clicked on the link....there is  Refresh option to the user. My requirement is such that I do not want the user to be able to run the prompt again upon clicking the refresh button. Is there a way to restrict the user to be able not to see the prompt  ( for which the value is passed in the url)....The user needs to refresh the report to be able to enter values for other prompts that are declared ( date prompts )....but not the ones where its ids are passed...
    The url link which works is here  :
    http://development/businessobjects/enterprise115/InfoView/scripts/opendocument.aspxsType=wid&sRefresh=Y&sDocName=Prompt_Test&sWindow=New&lsSEnter%20Lines:=Leather&sPath=[A],[EFashionSamples]
    Please advice...
    Thanks,

    Hi,
    I have a requirement wherein I need to dynamically pass the prompt values through the infoview url. I am able to successfully pass the parameter value in the url and the report renders data based on the prompt value passed.
    When the report is opened when clicked on the link....there is  Refresh option to the user. My requirement is such that I do not want the user to be able to run the prompt again upon clicking the refresh button. Is there a way to restrict the user to be able not to see the prompt  ( for which the value is passed in the url)....The user needs to refresh the report to be able to enter values for other prompts that are declared ( date prompts )....but not the ones where its ids are passed...
    The url link which works is here  :
    http://development/businessobjects/enterprise115/InfoView/scripts/opendocument.aspxsType=wid&sRefresh=Y&sDocName=Prompt_Test&sWindow=New&lsSEnter%20Lines:=Leather&sPath=[A],[EFashionSamples]
    Please advice...
    Thanks,

  • Dynamically passing text and url-based images as an input parameter to cf8 report builder

    I'm unsuccessfully trying to dynamically pass text and url-based images to a group footer or the detail section via an input parameter or even hardcoded. The field has the attribute 'XHTML Text Formating' set to True. The following are failed samples of a simplified value:
    "<img height=’300’ alt=’Document’ width=’300’ src=’http://www.google.com/intl/en_ALL/images/logo.gif’ />"
    or
    "<img src=’http://www.google.com/intl/en_ALL/images/logo.gif’ />"
    This just results in the above text being output. The end result would have various text and images from a database as input by a user, thus the reason I cannot just use the hyperlink information attribute as I could if it were a single known image. I tried rtf and pdf report types. Ideas?

    HTH,
    Thanks. I'll keep that in mind, although I don't know how many images my user might need or what sizes so that might be tricky.
    Since my target output is rtf so that MS Word can be used to edit the result, I added a pagebreak to a MS Word doc and used the resulting html source to replace the rich text editor source code for the page break, but that did not help either. The page break was so a user could add an image later. Something is wrong with the Report Builder related to intepreting XHTML, especially anything that has an attribute, including URL-based image links. I hope they try to provide another update before CF9. I doubt my client will be going to CF9 for some time, since they are just completing the migration to CF8.
    BrianO

  • Dynamically passing the values to search help

    hi
    can I pass some values dynamically to search help input field.
    If I select a profit centre value from a drop down in separate field it should reflect the corresponding values in
    search help which is cost centre input field ( i/p fields is in a column of a UI element table).
    If I add one more row also the corresponding column should bears the search help...
    thanx in advance.......

    Data dictionary based search helps can have multiple importing parameters within Web Dynpro.  There are few rules that are documented in the online help however:
    Be aware that import and export parameters for the search help are determined only within the same context node (see also Transport of Values for the Input Help), and even then only if a Dictionary structure is assigned to the node.
    http://help.sap.com/saphelp_nw70/helpdata/EN/35/bdb6e2c48411d1950800a0c929b3c3/frameset.htm

  • Dynamically passing the values to IN query in JDBC

    Hi,
    I have a list which contains a single or multiple values which does have CustomerVO as a generic.Here i need to iterate the list pass these values to "IN" query.
    These should happen dynamically, as we dont know whether the list will hold a single or multiple value. If the list.size ==1 , then it contains a single value in it. Hence there is no need for a comma(,) in the IN query else we need to have it, like .... IN (Aaron,Bob). Please help me in this?
    Thanks.

    797836 wrote:
    I have a list which contains a single or multiple values which does have CustomerVO as a generic.Here i need to iterate the list pass these values to "IN" query.
    These should happen dynamically, as we dont know whether the list will hold a single or multiple value. If the list.size ==1 , then it contains a single value in it. Hence there is no need for a comma(,) in the IN query else we need to have it, like .... IN (Aaron,Bob).So basically you need to output the List (capital 'L') as a comma-delimited list (small 'l').
    The procedure for that is usually something like:
    1. Output the first element.
    2. For any further elements:
    2a. Output ","
    2b. Output the element.
    Winston

  • Dynamically pass subject via mail adapter without using mail package

    Hi,
    We have requirement to pass the Dynamic variable as Mail subject
    we can't use Mail Package as we need to capture the data from Dynamic SOAP header Data from incomming channel
    Dynamic SOAP Header variable (XHeaderName1) comming from Sender SOAP channel.
    Receiver side we need to capture that XHeaderName1 in Mail Adapter channel using ASMA and Variable transport binding so that value of XHeaderName1 should overwrite Subject under General/ Mail Atribute section.
    Could you please let me know, how to handle this requirement using module configuration?
    Also suggest the correct configuration to use ASMA and Variable transport binding.
    Regards
    Venky

    Hi Venky,
    Please have a look at the links below. They should help you.
    Configuring the Sender SOAP Adapter- https://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
    Configuring the Receiver Mail Adapter-https://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    Adapter-Specific Message Attributes in the Message Header  -https://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/content.htm
    Regards,
    Jannus Botha

  • Ho wto Dynamically Pass Parameters to a Query in Discoverer

    Hi All,
    I have a Query where I would to like to pass the Parameters Dynamically.In my query I have three selects and two UNION ALL's.In the three selects I have to pass Period & Year Parameters.In Each Select the Period Calculation is Different.Say in first & second select from the passed period parameter I calculate the previous Months.Whereas in the last select I do the the calculation with the Passed Period.How is it Possible with Discoverer..
    Thnx in Advance
    Rgds,
    Sai Srivatshav

    Hi,
    Well there is no straight forward way to do that.
    There is a work around to get that functionality by using outer tables or context.
    Take a look at the following posts:
    Re: Parameters in SubQuery
    Re: Parameters in Discoverer Administration
    Re: Passing multiple parameters into Custom Folder...

  • Dynamic passing of the structure in LVC_FIELDCATALOG_MERGE

    Hi ABAP Gurus,
    I'am doing report to read cluster results
    My requirement is :
    The report uses LDB -PNP in the selection screen in addition to that Clusterid is passed and what ever cluster id we select for the pernr that cluSter id results has to show in the report output
    The report has to dynamically change in the output (whole structure of the cluster id) how to pass in selected cluster id (what we selected in the selection screen) in the function module
    LVC_FIELDCATALOG_MERGE
    Importing
    I_STRUCTURE_NAME -  (HERE I WANT TO GET THE STRUCTURE OF THE SELECTED CLUSTER ID IN THE SELECTION SCREEN)
    Thanks and Regards,
    Deepthi.

    Recently I have been working on generic cluster access and I must say the task was challenging. What I've discovered is:
    -  generic access as per cluster ID is impossible via [IMPORT ... FROM DATABASE...|http://help.sap.com/abapdocu_70/en/ABAPIMPORT_SHORTREF.htm] -> in order to create a fully flexible access you would have to go for pure dynamic program generation by means of [GENERATE SUBROUTINE POOL|http://help.sap.com/abapdocu_70/en/ABAPGENERATE_SHORTREF.htm]
    - as there are houndreds of available cluster IDs it is very difficult to determine those relevant to particular employee. For just one table PCL2 there are multiple of unknown to me areas which are hard to distinguish from those (un)relevant to employee. First look at fixed values from domain RELID_PCL2 gives the feeling what we are struggling with.
    - focusing on all common clusters (only from PCL2) like CU, RX, ZL, B2, PS, PT can narrow the search result but still is a lot to be handled by one program
    - eventually looking deeper only on RX and possibly B2 areas seemed to be the best choice (as mostly we use only those - at least I do). So I focused on this area as generic payroll result can be easily extracted. What I needed was  extracting relid for given EE molga, then py result type for this relid, the simply using FM PYXX_READ_PAYROLL_RESULT to access py results itself for given cluster directory entry (table hrpy_rgdir )
    - the final challenge was how to show the results in user friendly form. As the result table I had was not only nested but deep too it wasn't so obvious. Luckily to me I was using Web Dynpro which allows to create table popins (showing the table within the table) but I don't think there is corresponding GUI control in SAP GUI. So considering how you want to show this data is really not an easy thing to do.
    - As for the structure of payroll result itself (or rather structure of each of its components) can be delivered using RTTI but you will also sweat a bit before getting that done.
    To conclude. There is no easy way of accessing clusters by just giving its RELID Even though you would focus on some specific part, it will take you more time then you expect at the beggining. So I would try to suppress the tempation for a moment and consider all these discussed (and those which I didn't think of) aspects.
    Regards
    Marcin

  • Need Help in Field Symbol for Dynamically passing  table field value

    Hi All,
    In my internal table I am having data.
    I am dynamically forming table field name and substitute for the another table field name to pass DATA.
    but I am getting the Variable name insted of Value ie Data.
    I am using Field Symbol for this.
    data:
    Field-symbols <TS> type any.
    field1 type string.
    LOOP AT TABLEFIELDS INTO WA_TABLEFIELDS.
                READ TABLE  TEST  WITH KEY NAME = WA_TABLEFIELDS-FIELDNAME.
                IF SY-SUBRC = 0.
                  CONCATENATE 'WA_' WA_TABLEFIELDS-TABNAME '-' WA_TABLEFIELDS-FIELDNAME INTO  Field1.
                  Assign Field1 to <TS>.
                    ALL_VAL-VALUE = <TS>
    "After substituting the <TS>  into ALL_VAL-VALUE  field I need a DATA to be passed but the variable name is appending"*    
             APPEND ALL_VAL.
                ENDIF.
              ENDLOOP.
    kindly how to pass the value into the table.
    Thanks in advance.
    San

    Hi,
    pls assign a break point in
    CONCATENATE 'WA_' WA_TABLEFIELDS-TABNAME '-' WA_TABLEFIELDS-FIELDNAME INTO Field1.
    Assign Field1 to <TS>.
    ALL_VAL-VALUE = <TS>
       " Put a break point here and check for the value in <TS>.
    if <TS> contains value then create a work area for ALL_VAL AND PASS the Field-Symbol to that and then  append thw wa into the table...
    Hope this works out!!
    thanks

  • Dynamically passing input to the OVS field??

    Hi Experts,
    I have Two custom BO's, CBO1 and CBO2. For custom BO CBO2 i have created a OVS with exposing few fields in the OVSValueSelectorInport.
    This OVS i am using in CBO1 .
    But i have a requirement where i need to pass the value to the exposed fields dynamically.
    Example : i have a common field called X in the both the BO's.
    When the CBO1 status field value is OPEN, i need to set the  CBO1 - X field value  to the CBO2 OVS Search parameters.
    When the CBO2 status field value is COMPLETED , I don't need to pass any value to the CBO2 OVS search parameters( In this OVS also i have X field?).
    i feel , Here i need two configurations of the OVS to acheive my requirement.!!
    Is there any way to create multiple configurations for OVS in C4C??
    When i am assigning OVS Component to the CBO2 field in the UI designer , If i bind the exposed X field value with the CBO2 field value , then in the both OPEN and COMPLETED Status of CBO2 it will filter the result and will show to me, but this is not what i want.??
    Can any one please share an idea??
    Thanks,
    Mani

    Hi Vinod,
    Thanks for the reply..!
    Its not triggering my event handler script and not taking the assigned values form the Script. I have tried in different ways to assign values to it.
    So i found one more work around, I have created a transient fields in my BO and in the after modify script file i am assigning the values to these transient field. Here i can differentiate the status and can fill the field values . the same transient field, I am using in OVS Import fields binding..
    Now its working as per my requirement..
    Cheers,
    Mani

  • Dynamically pass server-port address in web.show_document

    Dear All,
    we have hardcoded server and port in
    WEB.SHOW_DOCUMENT('http://10.4.2.2:7778/common/users/payroll/test.rtf');
    how can i pass "'http://10.4.2.2:7778/" dynamically to web.show_document,Is there any environment file setting from where it can dynamically pick up the
    <server>:<port> at runtime.
    thanks in advance
    Shikha

    thanks for ur advice.
    I have already tried .
    i declared
    my_web in .env file and assigned value http://10.4.4.2:7778/ to it.
    then used
    tool_env.Getvar(my_web,var),
    but when we use
    WEB.SHOW_DOCUMENT(var||mnt2/usegp1/user/payroll/test.rtf');
    it takes path
    http://10.4.2.3:7778/forms90/mnt2/users/shikha/common/psl/test.rtf');
    i don't know from where it is adding /forms90 in path.
    plz help.

  • Dynamically pass the username and password to report server to invoke reports

    Hi
    The scenario is as follows:-
    9iAS is installed under - Windows 2000 (web server and report Server 6i) and everything works fine.
    We have developed a page using pl/sql cartrige (oracle 8i), from that a report is invoked with some parameters. However, the userid and password is stored under keymap file (cgicmd.dat).
    Is there anyway to pass dynamically the username and password to report server in order to invoke the report.?
    Can any one advise?
    null

    Check out
    http://serverfault.com/questions/371907/can-you-pass-user-pass-for-http-basic-authentication-in-url-parameters
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

Maybe you are looking for