How to make cursor record/variable dynamic or substitute variable

Hi
I have couple of cursor records define in my PL/SQL procedures, they are all same structure type.
For example
C_rec_1 c_currsor%ROWTYPE;
C_rec_2 c_currsor%ROWTYPE;
C_rec_3 c_currsor%ROWTYPE;
C_rec_4 c_currsor%ROWTYPE;
C_rec_5 c_currsor%ROWTYPE;
C_comm_rec c_currsor%ROWTYPE;
BEGIN
fetch .... into C_rec_1;
fetch .... into C_rec_2;
fetch .... into C_rec_3;
fetch .... into C_rec_4;
fetch .... into C_rec_5;
IF c_rec1.dept = 100 then
C_comm_rec := c_rec1;
END IF;
IF c_rec2.dept = 100 then
C_comm_rec := c_rec2;
END IF;
IF c_rec3.dept = 100 then
C_comm_rec := c_rec3;
END IF;
IF c_rec4.dept = 100 then
C_comm_rec := c_rec4;
END IF;
IF c_rec5.dept = 100 then
C_comm_rec := c_rec5;
END IF;
Here rather than coding 5 IF statement, Can I make c_rec_? dynamic?
Something like but this does not work :)
For i IN 1..5 loop
If c_rec_&l = 100 then
C_comm_rec := c_rec5;
End if
End loop;
END;

Hi Jaun,
You have to go CMOD  Transaction .
Create a project  and then write code in the exit EXIT_SAPLRRS0_001.
there is include
INCLUDE ZXRSRU01  double click on it and write code like below.
Coding for Variable
    WHEN 'ZTES'.     YOUR variable name
if     i_step = 1
      l_s_range-LOW = sy-datum +0(6).
      l_s_range-sign = 'I'.
      l_s_range-opt = 'EQ'.
      APPEND l_s_range TO e_t_range.
Hope this will help you.
Regards
vikas saini

Similar Messages

  • How to Make SelectedItem be a Dynamic Variable?

    Hi,
    My client wanted me to create something that allows certain
    DataGrid to display to allow users to edit and update the database
    records. The only dilemma I am having here is how to actually
    create something from Flex's end to allow users update several rows
    of the database at once. Since everything in my HTTPService is in
    DataGrid, how can I get Flex to recognize each of the updated
    variables while I update the database? I tried using dg.
    .id in my code, but I kept getting errors that say it is not
    defined. Is there some way where I can make selectedItem be a
    dynamic variable?
    Thanks in advance.
    Alice
    This is the current code I have:
    Attach Code:
    <mx:HTTPService id="save_scenario" method="POST" url="
    http://localhost/save_scenario.php"
    useProxy="false">
    <mx:request xmlns="">
    <scenario_name>{scenario_name}</scenario_name>
    <id_no>{dg.selectedItem.id}</id_no>
    <region_name>{dg.selectedItem.region_name}</region_name>
    <population>{dg.selectedItem.population}</population>
    <market>{dg.selectedItem.market}</market>
    </mx:request>
    </mx:HTTPService>

    "alice_data" <[email protected]> wrote in
    message
    news:ggen1o$a3c$[email protected]..
    > Hi,
    >
    > My client wanted me to create something that allows
    certain DataGrid to
    > display to allow users to edit and update the database
    records. The only
    > dilemma I am having here is how to actually create
    something from Flex's
    > end to
    > allow users update several rows of the database at once.
    Since everything
    > in my
    > datagrid would be defined as selectedItem whenever a
    user accesses the
    > entry,
    > how can I get Flex to recognize each of the updated
    variables while I
    > update
    > the database?
    Add like an updated property to each item in the collection.
    Then set it
    when the user has changed something. Then filter the
    collection to items
    that have been updated and send them to the server.

  • How to make a record. Of the one phone call to keep it, How to make a record. Of the one phone call to keep it

    Poleasse someone can to help me, i want. To know how to make a phone call and record it 

    gabriellafrombologna wrote:
    how to make a backup of the whole content of iPhone: calendar, notes, contacts, iExpenses,......and also many other app I bought?
    Sync the phone with your computer.  That's what it's for.

  • How to create a record structure dynamically

    Hi,
    I would like to create a record structure dynamically in the body of my pl/sql procedure.
    I don't want to create the structure in the declaration because my record structure depends on some parameters that the procedure will receive.
    Thank you

    > I would like to create a record structure dynamically in the body of my pl/sql procedure
    Terrible idea. Why? Because if the structure is dynamic then you need to write pretty complex code to handle this structure that could be anything. Complex code means buggy code. Inconsistent code. Weird run-time errors. Etc.
    Yes, you can create dynamic "structures" - for example, you can create a user defined type that at execution time can decide what properties it has. Similar to a an object in an o-o language that has a RTTI (Run Time Type Information) interface.
    But this is complex. And what did I say about complex code above? Not the best of ideas most of the time.
    There is however a very easy way to deal with dynamic data via a "dynamic" structure that is in fact a statically defined structure. Arrays aka collections aka associative arrays.
    E.g.
    create or replace type TStrings as table of varchar2(4000);
    Using this I can create a SQL statement (cursor) on any table, with any predicates, and pass the results (dynamic list of columns) to a procedure for processing:
    select TStrings(object_id,object_type,object_name) as DYNAMIC_LIST from user_objects order by object_type, object_name
    Using this I can create a procedure that accepts a dynamic list of values and process these:
    create or replace procedure DynamicProcess( list TStrings ) as ...
    So when thinking "dynamic structures" - think it through carefully. There is a difference between an UNKNOWN structure and a DYNAMIC structure.
    The former needs a RTTI interface. You have no idea what the structure contains. You need an interface to call in order for it to describe the structure for you. This is complex stuff.
    The latter means that you know the structure as it is pre-defined (statically defined). At run-time, it can contain any number of elements - thus making the structure dynamic. This is easy stuff.
    I would rather go for the easy stuff than the complex stuff any time of the day - even when on my 3rd cup of coffee...

  • How to make cursor as dynamic table

    Hi all,</p>
    <p>I have a system that will make a new table everyday. I have write the
    procedure to all of this table.</p>
    <p>Can i make  a cursor in the procedure for dynamic, Are the below
    statement will run correctly? ; Can anyone help me.?</p>
    <font FACE="Courier" SIZE="2" COLOR="#0000ff">
    <p style="margin-top: 0; margin-bottom: 0">cursor</font><font FACE="Courier" SIZE="2">
    T1Cursor</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">(</font><font FACE="Courier" SIZE="2"><font color="#800000"><b><span style="background-color: #FFFF00">tablename_in</span></b></font>
    </font><font FACE="Courier" SIZE="2" COLOR="#ff0000">varchar2</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">,</font><font FACE="Courier" SIZE="2">
    <b><font color="#800000">id_in</font></b> </font>
    <font FACE="Courier" SIZE="2" COLOR="#ff0000">number</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">)</font><font FACE="Courier" SIZE="2">
    </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">is</p>
    <p style="margin-top: 0; margin-bottom: 0">Select</font><font FACE="Courier" SIZE="2">
    eventtsname, locationname</font><font FACE="Courier" SIZE="2" COLOR="#0000ff">
    FROM</font><font FACE="Courier" SIZE="2">
    <span style="background-color: #FFFF00"><b><font color="#800000">tablename_in</font></b>
    </span></font></p>
    <p style="margin-top: 0; margin-bottom: 0">
    <font FACE="Courier" SIZE="2" COLOR="#0000ff">where</font><font FACE="Courier" SIZE="2">
    eventid </font><font FACE="Courier" SIZE="2" COLOR="#0000ff">&gt;</font><font FACE="Courier" SIZE="2">
    <b><font color="#800000">id_in</font></b></font><font FACE="Courier" SIZE="2" COLOR="#0000ff">;

    You would have to use dynamic SQL, e.g:
    CREATE OR REPLACE PROCEDURE p (p_tablename VARCHAR2, id_in VARCHAR2)
    AS
       c_results SYS_REFCURSOR;
    BEGIN
       OPEN c_results FOR
          'SElECT * FROM ' || p_tablename || ' WHERE dummy > :b1'
       USING id_in;
       CLOSE c_results;
    END p;
    /Alternatively if there could be a view that combined all the tables within UNION ALLs you wouldn't need dynamic SQL. The view would need to be created dynamically though, perhaps as part of the same process that adds the new tables.

  • How to make a record as Non Updatable

    Hi all
    I want to make the whole record(multi record block) as non updatable. My condition is, I have one status field in the base table block, when I query the form if the "status" field containing value 'Y', the user should not be able to update any item in the record. How to acheive the functionality?
    Thanks in advance
    ram.

    Hi,
    Have you tried using the set_item_instance_property('',update_alowed,..) built_in in the when_new_record_instance trigger on the block level?
    You can check there the :block.status field,and set the item instances in that record to non updatable.

  • Does anyone know how to make my following statement dynamic?

    hello experts,
    In my statement I am getting data for 3 months, however this is static It doesn't give business users the ability to pick the dates they want for the 3 months. So, I want to make it where if one picks a date, lets say Feb 12 to May 12, he will get the 3 months data or if he/she want datfor Feb 15 to May 15th then they can see that.. Below is my static statement, how do I tweak it to be dynamic
    FILTER("Fact - Project Cost"."Cost" USING ("GL Calendar"."Fiscal Date" >=timestampadd(SQL_TSI_MONTH, -3, current_date) and "GL Calendar"."Fiscal Date"<=current_date))
    many thanks as always
    Edited by: 994621 on May 15, 2013 2:07 PM

    Use this and also set "GL Calendar"."Fiscal Date" as Is Prompted
    FILTER("Fact - Project Cost"."Cost" USING ("GL Calendar"."Fiscal Date" <=timestampadd(SQL_TSI_MONTH, 3, "GL Calendar"."Fiscal Date") and "GL Calendar"."Fiscal Date">="GL Calendar"."Fiscal Date"))

  • How to make bookmark tree open dynamically when moving in the content?

    Intro: When viewing a PDF-file with a bookmark tree, I can unfold(open) nodes in the bookmark tree and make the view window jump to the corresponding destination.
    If the bookmark tree is open (unfolded) I can observe a selection mark moving downwards in the bookmark tree as I move down in the content.
    Question: Is it possible to make the folded bookmark (outline) tree open dynamically as I move down in the content? I would like to see the bookmark tree unfold automatically and move the highlight to the bookmark (outline) node for the bookmark position nearest to (above) the view point in the content window.

    Dave,
    thank you for quick and precise answer.
    Magne

  • How to make excel and Xcelsius dynamic?

    Hello,
    I have Xcelsius version 4.0.4.7.  I use it for creating our departments dashboard for metrics.  I have 6 departments to create metrics for.  I use Excel for the spread sheet.
    Data is displayed via bar charts showing different categories on how they perform over a one year period.  For example from October 2007 to October 2008.  The graphs look great.  However, I am the one updating the metrics and my boss would like to see it become all dynamic.  Where all the department managers could enter the data and have the charts automatically update.
    I am in charge of our departments' web site and would still have to update the SWF to the server.   Which is fine.
    My question is "can Xcelsuis 20080 be able to handle this request?".
    Regards,
    DJ

    Dynamic datasources for Xcelsius
    find this please
    good luck
    Amr

  • How to make table control rows dynamic/unlimited using TC with Wizard

    Hi Friends ,
    I have designed a table control layout using table control with wizard.
    Now the problem is when we design a TC layout ,then we have to design it on the page . The page has upper & lower limits. so the maximum size & maximum rows in layout is limited. I have tried to create a TC layout with maximum size & maximum rows . Maximum rows created in Layout is 25.
    Now suppose if enduser wants 100 entries to enter by coping a file of 100 records in my TC present on entry screen , then ONLY 25 entries are displayed on entry scren before doing any user action or saving and after saving only these 25 entries are sved in DB. Means enrtries from 26 to 100 are not displayed on entry screen or saved in DB.
    So my requirement is to display all 100 entries at a time in entry screen before saving with scrolling up & down facility and these 100 entries should also get saved in DB after clicking save button. In short I want dynamic entry screen table control which can show/dieplay Any Number . of entries whatever the number may be entered by enduser .
    Plz note that I have used all 3 facilliteis i.e.
    1. Scrolling
    2. INSERT/DELETE
    3. SELECT/DESELECT
    while designing TC with wizard .
    Scrolling buttons like FIRST PAGE, PREV. PAGE, NEXT PAGE, LAST PAGE are displayed.
    BUT they are not functioning though there is system generated code present in both MPP and in PBO & PAI. After clicking any of them , data which is dislaying on entry screen ( Here it is 25 entries ) is getting cleared/disappeared from enry entry screen.
    Waiting for ur response & solutions.
    Thanks & Regards,
    Sudhir

    Hi Ashish ,
    Do one thing .
    At PAI of screen holding TC , there is module name tc_mark on request .
    in this module , there is work area declared g_tc_wa .
    Now go to tc_init module of pbo , where u have given your select command .
    select * from ........................................
    use this code .
    if g_tc_wa is initial .
       SELECT * FROm
       g_tc_wa = 'X'.
       REFRESH CONTROL 'TC' FROM SCREEN dynnr.
       ENDIF.
    Just do this , m sure all buttons, insert, delete , scroll bar.. everything will work .

  • SRM 7 - How to make a custom field dynamically retrieved trigger a refresh?

    Hi all,
    we're working on a brand new installation of SRM 7.
    For contracts and purchase order, we created an enhancement on the webdynpro that manages header document data; in such view, custom fields are obtained dynamically and populate a Transparent container; by code, some tray group visually all the custom fields related to a specific section.
    Now, the task is quite general; some of these "dynamically retrieved" fields should refresh, when populated, the view.
    That is to say, in our context, that some custom field should automatically trigger the WDDOMODIFYVIEW method (which has been extended via overriding with an enhancement) when a value is inserted.
    This would be a simple task if the field is explictly visible in the layout screen, since I could easily associate an event to the field itself.
    But, since these custom field are automatically extracted in the WDDOMODIFYVIEW method, we don't know how to manage these field's behavior, e.g. after an input value has been inserted.
    Each dynamic custom field is a type ref to cl_wd_uielement; we wonder if we have a way to associate an event (e.g., onEnter) to such an element.
    Thanks in advance for any suggestion or help you will give us
    EDIT: I guess this could not be the best section for such a kind of question ... I'd gently ask moderators eventually to move the thread to the Webdynpro section, if necessary. Thanks in advance.
    Edited by: Matteo Montalto on Oct 7, 2010 6:01 PM

    Closed. I opened a thread on this topic in a more convenient section of SDN forums (Specifically, web dynpro abap). Thanks anyway:)

  • How to make few records editable in oracle ADF form.

    Hi,
    I am working on one scenario. here, we are sending few records to user in an ADF task form, using BPEL Human task. Now, the requirement is to put a checkbox in each row and enable that particular row-fields for editing purpose.
    please respond if there is a way to put any condition in check box design to enable row-data for editing.
    thanks,
    rps

    Hi,
    actually to implement check boxes in front of a table you need some sort of transient field that can keep persistence. One way of achieving this is to wrap the BPEL service in a WS proxy client and create a POJO DC from it. This then allows you to add an additional field to implement a solution similar to this in ADF BC
    http://sameh-nassar.blogspot.com/2009/12/use-checkbox-for-selecting-multiple.html
    Because ADF Faces tables are stamped upon rendering, rows arent created with instances of the cell renderer. For this reason you need to keep track of the select state in the model, which you can do using a transient attribute, which then makes sure the select information is part of the row object. So similar as today, you would parse the available rows but - before changing the update state - check if the user intended the update
    Frank

  • How to make a border around a frame with variable line weights?

    I want to draw lines in Muse. I understand that it can only be done with the help of rectangles. In a free Muse Theme that I have downloaded I have found a quite nice line, that I have saved as graphic style. When  I read the properties I find the following definition: 'border weight (bottom: 1 left: 0 right: 0 top: 0).' It gives you the possibility to have only one line at the bottom. I very much would like to know how you can apply these variable settings to a border. I looked everywhere but can't find a way to do it. Any help would be greatly appreciated.

    Hi Dimitri,
    Select the rectangle you wish to use from your Muse page.
    Click on the blue 'Stroke' and a box will pop up where you can set the border styles for all four borders individually.

  • 3 column page - how to make each full height of page, with variable content in each?

    Hi everyone. . . I'm a relatively unsophisticated page designer, and I appreciate if you excuse my lack of experience.  I'm putting together a page for a business.  The page has three columns, one of which would be considered to be the main body of the page. . . the one with all the important content.  The column on the left is for a navbar and some affiliate badges, and the column on the right will be for an image that describes for the viewer which page they're on. 
    The question I have is how to, when the content of the center column is very long, make the left and right column divtags extend all the way to the footer, with their borders and background colors, to make a clean page.  When the content of the center column is short, like a paragraph or two, the left divtag will have a minimum height due to the presence of the badges, but the right divtag is quite short.
    I uploaded a test page here: http://www.thermalifegroup.com/test/about_us.html
    Nevermind the visual appearance of the page. . . the spry widget is all over the place, but that's just because I uploaded a few files onto the server.  On my pc it's all copacetic and not an issue.  The code source is up there, so is the stylesheet. 
    I'm hoping I can just add a few attributes to the columns so that they automatically reach down to the bottom extents of the page.  Thanks for any advice you can throw my way.
    Keith

    manliusvalerius wrote:
    Hi everyone. . . I'm a relatively unsophisticated page designer, and I appreciate if you excuse my lack of experience.  I'm putting together a page for a business.  The page has three columns, one of which would be considered to be the main body of the page. . . the one with all the important content.  The column on the left is for a navbar and some affiliate badges, and the column on the right will be for an image that describes for the viewer which page they're on. 
    The question I have is how to, when the content of the center column is very long, make the left and right column divtags extend all the way to the footer, with their borders and background colors, to make a clean page.  When the content of the center column is short, like a paragraph or two, the left divtag will have a minimum height due to the presence of the badges, but the right divtag is quite short.
    I uploaded a test page here: http://www.thermalifegroup.com/test/about_us.html
    Nevermind the visual appearance of the page. . . the spry widget is all over the place, but that's just because I uploaded a few files onto the server.  On my pc it's all copacetic and not an issue.  The code source is up there, so is the stylesheet. 
    I'm hoping I can just add a few attributes to the columns so that they automatically reach down to the bottom extents of the page.  Thanks for any advice you can throw my way.
    Keith
    in your #main css style add following attributes
    float:left
    background-color:#eeeeee
    u can change ur color
    try

  • How to make cursor lines appear in saved file

    I have a graph that has 3 cursor lines.  They are visible on the graph.
    When saving the graph to a file (.png or .jpg) the graph waveform is visible, but the cursor lines are not.
    The image data does not contain the cursor lines.  How do I include those to the image data.
    I verified the image data using an image indicator and the appropriate VI..  So for some reason, the image that is being saved is of the indicator (Waveform Graph) and the waveform (data), but not the cursor lines. 
    I'm sure I've saved images of a graph that included the cursor lines in the past (LV7.x), but I cannot remember what I did. 
    Thanks,
    RayR

    Thanks Christian,
    I (may) have found the problem...  At one point, I clear all cursor lines.  I may have a race condition between clearing the lines & saving image to file.
    I did see the cursor lines in one instances when I stopped the program prematurely. 
    I knew it had to be siomple.  I didn;'t recall doing something special the last time I did this..
    Thanks!
    RayR

Maybe you are looking for

  • How to define a generic structured type (deep structure) w/o LIKE

    Hi, I have been trying to define a generic structured type that would include a component (field) of type "table type". Look at my type [ty_compatibilite].  It is the structured type that needs to have a component called "mobile" which needs to be an

  • High-quality files on PC and smaller files on iPod

    I want to maintain CD quality files on my PC and have lower quality files on my iPod and my girlfriends iPod nano in order to be able to carry around more music, etc. I would like to continue using iTunes as we are already both familiar with its layo

  • Printing for small organiser pages

    Hi I can't print my calendar on to my diary/organiser pages (Filofax) because at 9.5 x 17cm , the pages are too small. Underneath the preview window on the print page I get a message saying: "The paper size is too small select a different paper size"

  • Does XSAN work with other HW SAN products

    Will XSAN work with SANs other than XRAID? I am investigating building an XSAN environment with a Xiotech SAN, a Cisco fabric and XSAN. James Xserve   Mac OS X (10.3.9)   two Fibre Channel Cards

  • Toolbar menu doesn't show quick tools

    It seems that my Adobe Reader upgrade to XI has messed with my toolbar. All of the default tools are not shown; they can only be accessed through a dropdown menu on the toolbar. There also aren't any quick tools and I can't even figure out how to get