Want to create multiple button based on no.of rows

sir,
I have one table and it has two columns. First column has Title and second column has Yes / No
My page should display the no.of buttons with tittle based on the creteria of Yes.
For example I have 5 rows. second columns has Yes in 3 Rows and No in 2 row
At the time of opening My page should display three buttons with title. On any event if i change second column value the number of button may change.
if i add no of rows, no of buttons with title also get changed. Hence creation and display of button should be based on the no.of rows and column value.
how to achieve it
yours
dr.s.raghunathan

Hi,
Begin
for i in (select label,flag from button_table) loop
if i.flag = 'Yes' then
htp.p('<input type = "submit" value ="'||i.label||'">');
end if;
end loop;
end;
where button_table is ur table and label and flag are your columns

Similar Messages

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • My client want to create realease strategy based on plant for PO

    Hi all,
    1.My clients want to create realease strategy based on plant for PO. Kinldy let me know the the possibilites and steps.If it is not possible let me know the reason so that I can explain to the client
    2.how can I take print of credit note and MIRO kindly let me know  T,code.
    hope to hear back from you all....
    Thanks&Regards,
    chand

    Hi chandysrm ,
    You can creatye Release strategy for plant specfic.
    Create charetestic (CT04) for plant : CEKKO-WERKS.
    Assign with Class (CL02) --032
    Create Rel. Group , Rel. Code & Rel. Strategy.
    create rel. strategy for each different plant.
    In classification view give the plant code.
    [http://wiki.sdn.sap.com/wiki/display/ERPSCM/RELEASE+PROCEDURE]
    [PO Release Resetting after Value Reduction;
    [Separate release procedure for PO and PO under contract]
    [release procedure for contract]
    [release procedure for contract]
    Credit note print out : MR90.
    SAM
    Edited by: Saminathan Gopalan on Jun 9, 2010 10:39 AM

  • I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".

    Hello,
    I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".
    Suppose , 
    Parameter value : person 1,person2,person3 
    table structure : 
    Project Name | officers 1 | officers 2
    here, officers 1 or officers 2 may contain names of multiple people.
    expected OUTPUT : distinct list(rows) of projects where person 1 or person 2 or person 3 is either officer1 or officer 2. 
    please explain or provide solution in detail 
    - Thanks

    Hi Visakh,
    Thanks for reply.
    But the solution you provided giving me right output only if officer 1 or officer 2 contains single value , not with comma seperated value.
    Your solution is working fine for following scenario : 
    Project 
    Officers 1
    Officers 2
    p1
    of11
    off21
    p2
    of12
    off22
    with parameter : of11,off22 : it will give expected output
    And its not working in case of :
    Project 
    Officers 1
    Officers 2
    p1
    of11,of12
    off21,off23
    p2
    of12,of13
    off22,off24
    with parameter : of11,off22 : it will not give any row in output
    I need patten matching not exact match :) 
    ok
    if thats the case use this modified logic
    CREATE PROC GetProjectDetails
    @PersonList varchar(5000)
    AS
    SELECT p.*
    FROM ProjectTable p
    INNER JOIN dbo.ParseValues(@PersonList,',')f
    ON ',' + p.[officers 1] + ',' LIKE '%,' + f.val + ',%'
    OR ',' + p.[officers 2] + ',' LIKE '%,' + f.val + ',%'
    GO
    Keep in mind that what you've done is a wrong design approach
    You should not be storing multiples values like this as comma separated list in a single column. Learn about normalization . This is in violation of 1st Normal Form
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Can I use stylesheets to create multiple button styles?

    I am trying to create a custom look-and-feel within UIX to get it as close as possible to
    our existing application's look-and-feel.
    As part of this, I customized the UIX button by overriding the following named style:
    ButtonServerText
    and also by providing my own icons for:
    buttonStart
    buttonEnd
    buttonTopBackground
    buttonBottomBackground
    The good news is that I was able to get the button component to look exactly like our existing
    application buttons.
    The bad news is that we have different types of buttons in our application
    for different purposes. (i.e. the image used for the button can be completely different based on the context e.g.
    yellow button for important actions and light-blue buttons for secondary actions)
    It seems like there is no way in which I can use this stylesheet mechanism to create different types of buttons
    and use them within my application. (sometimes different types of buttons can appear on the same page)
    Please let me know if there is a way.
    This is in fact a general question regarding overriding a stylesheet for customizing look-and-feel.
    Lets say I customize the "contentContainer" component using the stylesheet. This change would then be global.
    But I do want to have different types of contentContainers in the application. I would be forced to create my own custom
    UIX elements similar to contentContainer and write my own renderers.
    (I know contentContainer does have the light, medium and dark styles. I used this just as an example.)
    Please let me know what my options are.
    Thanks,
    Jayesh Kapoor

    Hi Jayesh -
    The good news is that I was able to get the button
    component to look exactly like our existing
    application buttons.Cool - I'm glad to hear you were able to get this working!
    The bad news is that we have different types of
    buttons in our applicationRight. This is a fundamental limitation of our look and feel customization functionality - we only support global customizations, not instance-specific customizations. I agree that there are many cases where instance-level customization would be useful, but this just instance supported yet.
    The only solution that I can think of for your button dilemma would be to use static images. It's pretty easy to wire up an image to behave like a button - just embed the image in a link and use <fireAction> as the link's primaryClientAction.
    Obviously, the downside of this approach is that you need to create the button images manually - which also isn't ideal if you are planning to translate your applications. One possible solution here might be to use UIX to pre-generate your button images. The idea would be to create custom LAFs for each style of button, then create a UIX page for each button style, including <button> instances for each translated value. Then, you could configure UIX to run in the desired look and feel, hit the corresponding page, and UIX will generate the required buttons into your image cache. Again, not ideal, but this might be easier than creating the buttons by hand.
    This is in fact a general question regarding
    overriding a stylesheet for customizing
    look-and-feel.
    Lets say I customize the "contentContainer" component
    using the stylesheet. This change would then be
    global.
    But I do want to have different types of
    contentContainers in the application. I would be
    forced to create my own custom
    UIX elements similar to contentContainer and write my
    own renderers.Right - this is a generic problem. But for some components, like content containers, an easier solution might be to leverage UIX's templating mechanism. Remember, you can embed arbitrary HTML contents in a UIX page/template by setting the namespace to "http://www.w3.org/TR/REC-html40". You can then reference these templates from your other UIX contents as if they were in fact UIX components. I'd recommend that you explore UIX's template support to see if this will meet your needs.
    Andy

  • This is a second question on the same topic. I want to create multiple drags to each drop. I give the drags group names. Step three: run line to drops. Step 4: click object actions Step 5: unclick all but the one group name. It works for 2 out of 3 groups

    I hope that someone will answer this. I want to create a drag and drop.  Each drop has multiple drag answers. I group the drags and give them a Type name. I initial the drops. I go to Object actions. I unclick "accept all" I unclick all but the group I want to go to that drop.  When I preview, two of the drops accept the three choices that they are supposed to accept. But the first one I try, only accepts one choice and lets the others bounce back.  I'd also like to have a reset button which I can't find.  I've spent hours and hours working on this.

    Got it.  When you go to unclick all the choices except the group you want, you have to also change the count. Even if the drags are in a group, the count still considers them individually

  • I want to create a Ajax based Chating application using java .

    hi . I want to create an chating Application , and ajax based chatting application using java as my server side language ..i have some idea about it .. but one thing that i m not understanding is that how i will communicate with other users because each user has its own session so what i will do to send one messge to all the users ???? . i m new to JavaEE and i have chosen this as my semester project .. i need some help regarding this .

    First get it working without AJAX.

  • List View Filter - I want to create List View based on a specific user

    I want to create a List View Filter based on specified user ID. I dont want to specify the [Me] for filtering the view based in current logged in User.
    I want the view to be based on specific user ID for Ex: "AD\JohnDoe"
    Thanks
    Nate

    The People/Group Picker field has several options for how the name is displayed. For example you can set it to be the friendly name or the account name. When you create your View Filter, make sure that you are using the same format as the field's display
    type.
    Dimitri Ayrapetov (MCSE: SharePoint)

  • Insert or create a button based scrolling Java script

    Goodmorning!
    Although I don't know yet how to write it, I was wondering if it is possible to create a Javascript (widget) myself for button based scrolling?
    I've been looking on the internet too, and there I can find many Javascripts. So if anyone could help me with a Javascript that does the above I would be very grateful.
    Hope anyone can help me!
    Greetz
    Bart Sijm
    Netherlands

    Can't be done with Reader. Acrobat? Maybe, but you'd be best to ask in the Acrobat forum.

  • Creating multiple tables based on existing tables

    Hi,
    I have to create 60 tables based on existing 60 tables. Instead of creating one by one how can I create all 60 at once.
    The current 60 tables are named FY11_ACC1, FY11_ACC2, FY11_SALES1, FY11_SALES2 ...... , but all 60 tables start with FY11. I need to create the same structured tables but with FY12 names like FY12_ACC1, FY12_ACC2, FY12_SALES1, FY12_SALES2 .....
    Currently I am using "create table FY12_ACC1 as select * from FY11_ACC1 where 1=0". Is there a way I can write all of them in one query?
    Thanks for your time and help.

    ssk1974 wrote:
    Hi,
    I have to create 60 tables based on existing 60 tables. Instead of creating one by one how can I create all 60 at once.
    The current 60 tables are named FY11_ACC1, FY11_ACC2, FY11_SALES1, FY11_SALES2 ...... , but all 60 tables start with FY11. I need to create the same structured tables but with FY12 names like FY12_ACC1, FY12_ACC2, FY12_SALES1, FY12_SALES2 .....
    Currently I am using "create table FY12_ACC1 as select * from FY11_ACC1 where 1=0". Is there a way I can write all of them in one query?
    Thanks for your time and help.Well, i'm assuming FY = Fiscal Year and 11 = 2011 and then ACC1 = Account #1.
    From the sounds of things, your design isn't likely "correct'.
    If you'd care to delve in to the requirements a little bit ... what you have and what you need (business speak wise) there are no shortage of experts here that i'm sure would be happy to help you.
    If you're stuck with what you've got (or don't care to change your 'design') and all you care about is achieving that please disregard this message.

  • How to create multiple idocs based on complex condition

    HI Users,
    my scenario is jms(xml file) to idoc. for each file have multiple records for each record i need to create multiple idocs.
    source structure:
    <lineitem>
    <student sid="cid">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="char">147</reference>
    </hreference>
    now condition is One input message must create only one output message for each unique  rtype="number" and sid="cid" combination.
    for example
    1. rtype="number" and sid="cid" the value combination means 123456 for this one idoc
    2.  rtype="number" and sid="cid" the value combination means 789456 for this one idoc
    --> the below file shows with out sid="cid"
    <lineitem>
    <student sid="abc">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="number">147</reference>
    </hreference>
    in this case we have to consider only rtype="number" so here we need to create  3 idocs.
    Could anyone help me in this regard.
    Thanks in advance

    Hi Swathip,
    Change the occurence of the IDoc to "unbounded", so that multiple IDocs can get create
    Try with below logic
    If (SID = "CID")
    Then
         If(rtype = "number")
              concat(student,reference ) ---> removeContext ---> Idoc          
    Else
         rtype ---> removeContext ---> Idoc
    If combination of unique  student and reference can occur more than once in the XML, use sort command and splitByValue (Value Change)
    Edited by: chandra shekhar on Jul 3, 2011 12:53 PM

  • Conditionally display button based on number of rows in rpt query results?

    I know that I can conditionally display a button based on the number of rows returned in a query entered in the condition. However, I have a report region button that I only want to display if any data was returned by a report query. Since I've already executed the query to generate the report, I do not want to execute it again to determine whether any rows were returned. Is there any way to detect whether any rows were returned for a report other than to reissue the query?

    http://htmldb.oracle.com/pls/otn/f?p=24317:52
    OK, so it looks like it contains the rowcount of the report region rendered just before the variable (apex_application.g_flow_total_row_count) is referenced.
    Sort of like how SQL%ROWCOUNT contains the no. of records affected by the last SQL DML statement.
    Note that the pagination scheme affects the result. In the example above, the 2nd report region is showing 10 rows with a 'Rows X to Y' pagination scheme. So g_flow_total_row_count=11 because I guess the reporting engine has to fetch the 11th row (and discard it) to determine whether to render the 'Next' pagination link.
    If you select a pagination scheme that forces the reporting engine to fetch all the rows 'Rows X to Y of Z', g_flow_total_row_count will always be Z, not the number of rows actually rendered on the screen.
    Thanks

  • Want to create some button like font color button in MS Word?

    hi all
    i am writing a editor like MS Word, but small version with some basic functions: font family, font size, bold, italic... and font color.
    so i need some UI for font color similar to the one in MS Word.
    now i created a panel with two button; one shows the current color, and another show up JColorChooser when it is clicked; called JColorButton.
    now the problem i am having now is i created the icon similar to the down-arrow in JComboBox. but the size of that arrow changes depending on Look & feel and i could not able to make it similar to it for my own created button.
    any suggestion? ideas? i really appreciate it.
    currently,i am trying to get the image of down-arrow from JComboBox on the fly. but no luck yet.

    hi there,
    thanks a lot for reply.
    i checked BasicArrowButton. I replaced it with my JColorButton as second one, like in MS Word or Back button in Internet Explorer. but the size of arrow is smaller than the one in JComboBox beside it because the size of that button is smaller than JComboBox's size. so it still did not solve the problem yet.
    i wonder if there is any button which function the same as Font color button in MS word or Back button in Internet Explorer.
    or is there any way i can get the information about L&F about arrow of JComboBox?
    and also i make JToolBar to be rollover, so the border of button show only when the mouse is over. but how can i do this same affect on my JColorButton, which is a panel with two buttons in it.
    thanks a lot. i really appreciate it.

  • I want to create a report based on date ranges...

    I have surfed the forum and seen all of the responses and can't get anything to work.
    This is where I am:
    select     OBJECT_ID,
         EVENT_CATEGORY,
         EVENTS_TITLE,
         EVENTS_DATE,
    OBJECT_ID "Click Icon For More Info"
         from EVENTS
    where     EVENT_CATEGORY = :P3_EVENT_CATEGORY and EVENTS_DATE between to_date(:P3_START_DATE,'DD-MON-RR HH:MI') and to_date(:P3_END_DATE,'DD-MON-RR HH:MI');
    When I input actual data for my querry:
    select     OBJECT_ID,
         EVENT_CATEGORY,
         EVENTS_TITLE,
         EVENTS_DATE,
    OBJECT_ID "Click Icon For More Info"
         from EVENTS
    where EVENT_CATEGORY = 'Category 1' and EVENTS_DATE between '04-MAY-06 10:57 AM' and '12-MAY-06 02:27 PM'
    It works!
    Please help

    Either
    1. Make sure the page is submitted so that those 2 items (P3_START_DATE and P3_END_DATE) get saved into session state and can be used by the report
    or
    2. Make sure both the items have the apppropriate Source or Default values defined so that the initial run of the page will display the report properly
    or
    3. Put a condition on the report region to not display until 1 (or both) of those 2 items have a non-null value.
    Hope this helps.

  • Button class not creating a button

    Hi,
    I have some AS3 code which I was hoping would create a
    re-usable button class but it does not. I just get a blank canvas.
    I am not getting any errors. Code is attached. Anyone see what is
    wrong?

    thanks for the response.
    to instantiate this class with the var code that you posted
    and I reposted. Would this code be added to the .as file or would I
    put that on frame 1 of the .fla file?
    Also I want to create multiple buttons and position them on a
    page within a grid. With the class code I have posted, how would I
    go about doing that? Lastly, I want one of two movie clips to
    display once the button is clicked. Can someone explain how I would
    go about that as well?
    thanks

Maybe you are looking for

  • Unexpected error;Primary key does not exist:CmscdomPK version=2,name=J2E

    Hi I am getting the following error when i try to access the CMS related WebDynpro application. First time i am able to access the CMS.I created the domain and track.after that i edited the Domain tab with new domain name J2E.During that time i tried

  • Where is the restore option in the Itunes? i have to do this to unlock my iphone, then i need to syncronise it

    where is the restore option in the Itunes? i have to do this to unlock my iphone, then i need to syncronise it. It says: Use the "restore" option within iTunes (located at the bottom of iTunes not the top) But i cant find it.

  • No DI Components

    I installed NW04S using the Rapid Installer. None of the DI components are available in my installation -- DTR, CMS or CBS. Also, the template installer does not include a DI template for use in post-installation. Is the NWDI not included in the Rapi

  • [AS] Set every character leading to auto

    I can't seem to get this to do what I expect. tell application "Adobe InDesign CS5.5" tell every text frame of page 1 of active document   set leading of properties of every character of every paragraph to auto end tell end tell The script I am worki

  • OIM 11GR2 Notification Service - Setting Receiver e-mail

    Hi, I am using notification service to send e-mail notification. There is a case where I would have to send notification to a DL or external e-mail which doesnt have any account in OIM. I do not find anything in the API where you can set the receiver