Need functionality to pick any 3 random questions from 5 input fields

Hi Experts,
                 In our password reset web dynpro application, we are providing 5 security questions to be answered by users,
but can we have the option to give only any 3 input fields randomly from 5 and allowing to be filled.
Need functionality to pick 3 random questions from 5.
Thanks in Advance
Sateesh J

Hi,
modify the sample code accordingly or else use below code.
DATA :
  lv_mini TYPE i,
  lv_maxi TYPE i,
  lv_rndi TYPE i,
  lv_i TYPE i.
lv_mini = 1.
lv_maxi = 5.
lv_i = 3.
WHILE lv_i > 0.
  CALL FUNCTION 'QF05_RANDOM_INTEGER'
    EXPORTING
      ran_int_max   = lv_maxi
      ran_int_min   = lv_mini
    IMPORTING
      ran_int       = lv_rndi
    EXCEPTIONS
      invalid_input = 1
      OTHERS        = 2.
  CASE lv_rndi.
    WHEN 1.
        WRITE :/ 'Question - ',lv_rndi.
    WHEN 2.
        WRITE :/ 'Question - ',lv_rndi.
    WHEN 3.
        WRITE :/ 'Question - ',lv_rndi.
    WHEN 4.
        WRITE :/ 'Question - ',lv_rndi.
    WHEN 5.
        WRITE :/ 'Question - ',lv_rndi.
    WHEN OTHERS.
  ENDCASE.
  lv_i = lv_i - 1.
ENDWHILE.
Thanks,
Chandra

Similar Messages

  • Need help to get the user entered value from a input field in Table in OA

    I have a table in my OA page.
    Here one column is there which should take in put from user.
    i.e an item quantity field text input is there which should take the updated value when the add to cart link which is next column in the table. On clicking of the link I am trying to get the updated value entered by user. for the respected row for which addto cart link get clicked.
    For that link I have defined some parameter through SPEL,( like this parameter name: item_quantity value : ${oa.MisibeItemSearchVO.ItemQuantity} ) which has fireaction. But when i am clicking the addto cart link I am not getting the current value entered by the user.
    Can any body guide me how to get that related value for which the add to cart link got clicked.
    for this when i am doing pageContext.getParameter("item_quantity"));
    I am not getting the value entered by user.
    please suggest me
    Thanks!
    Smarajeet

    The below is my Vo query for item quanity i am using a dummy query "(select null from dual) as ITEM_QUANTITY"
    in the below query and item type is number. and this is a messageTextINput in OA page and is maped to ItemQuantity vo attribute.
    SELECT idsi.section_item_id
    ,idsi.inventory_item_id
    ,(select concatenated_segments from mtl_system_items_kfv mstk
    where mstk.inventory_item_id = idsi.inventory_item_id
    and mstk.organization_id =idsi.organization_id) ITEM_NAME
    ,(select description from mtl_system_items_tl mtll
    where mtll.inventory_item_id = idsi.inventory_item_id
    and mtll.organization_id =idsi.organization_id
    and language = USERENV('LANG') ) ITEM_Description
    ,(SELECT CASE
    WHEN instr(msib.segment6,'NAMED USER') > 0 THEN 'NAMED_USER'
    WHEN instr(msib.segment6,'PROCESSOR')>0 THEN 'PROCESSOR'
    ELSE msib.segment6
    END
    FROM MTL_SYSTEM_ITEMS_B msib
    WHERE msib.INVENTORY_ITEM_ID = idsi.inventory_item_id
    AND msib.ORGANIZATION_ID = idsi.organization_id) LICENSE_TYPE
    ,(SELECT CASE
    WHEN instr(msib.segment6,'1 YR') > 0 THEN '1YR'
    WHEN instr(msib.segment6,'2 YR') > 0 THEN '2YR'
    WHEN instr(msib.segment6,'3 YR') > 0 THEN '3YR'
    WHEN instr(msib.segment6,'4 YR') > 0 THEN '4YR'
    WHEN instr(msib.segment6,'5 YR') > 0 THEN '5YR'
    WHEN instr(msib.DESCRIPTION,'Perpetual') > 0 THEN 'PERPETUAL'
    END TERM FROM MTL_SYSTEM_ITEMS_B msib
    WHERE msib.INVENTORY_ITEM_ID = idsi.inventory_item_id
    AND msib.ORGANIZATION_ID = idsi.organization_id) TERM
    ,(select qll.operand
    FROM qp_list_lines qll
    ,qp_pricing_attributes qpa
    WHERE qll.list_line_id = qpa.list_line_id
    AND qpa.product_attr_value = to_char(idsi.inventory_item_id)
    AND qll.list_header_id = 439381
    AND sysdate between NVL(qll.start_date_active, sysdate) and NVL(qll.end_date_active, sysdate+1)
    AND qpa.list_header_id = qll.list_header_id
    AND qpa.product_attribute = 'PRICING_ATTRIBUTE1'
    AND qpa.product_attribute_context = 'ITEM'
    AND NVL(qpa.pricing_attribute_context,'MIXED') = 'MIXED') ITEM_PRICE
    ,(select null from dual) as ITEM_QUANTITY
    ,(select currency_code from qp_list_headers_b where list_header_id =439381) currency_code
    ,(select segment1 from mtl_system_items_b msib
    where msib.inventory_item_id = idsi.inventory_item_id
    and msib.organization_id =idsi.organization_id) PART_NUMBER
    FROM ibe_dsp_section_items idsi
    ,ibe_dsp_msite_sct_items idmsi
    ,( select distinct child_section_id
    from IBE_DSP_MSITE_SCT_SECTS b
    connect by PRIOR child_section_id = parent_section_id
    start with parent_section_id =:1
    and mini_site_id =1
    UNION
    select distinct child_section_id
    from IBE_DSP_MSITE_SCT_SECTS b
    where child_section_id =:1
    and mini_site_id =1
    ) csi
    WHERE idsi.organization_id = 101
    AND idmsi.section_item_id = idsi.section_item_id
    AND idsi.section_id = csi.child_section_id
    AND idmsi.mini_site_id = 14409

  • Mass Approval of Leave Request...need function module or any program

    Hi All,
    I have developed Custom Application in webdynpro java  for Leave,Travel,now i got the new requirements for mass approval of Leave and Travel can any baddy provide me any input ,i don't know which functional module or program i use , help gurus...
    Regards,
    Pramod gupta

    Refer below links to get an idea :
    uwl mass Approval- Select all option
    UWL Mass Approval XML changes or Custom App
    Mass leave approval?
    As an alternative to this service, you can use the Leave Request: Mass Approval report (RPTARQMASS_APPROVAL) in the back-end system. These reports enable you to approve multiple leave requests in batch.

  • Displaying random questions from the backend

    Hi,
    Is it possible to randomly select a question and display it on the page with different options. Say for example, if I have a question and that has three values as answers which are to be displayed in radio button style, will it be possible to display it dynamically by selecting the values from tables?"
    The questions and the options are stored in the table.

    Hi Suzi,
    Radio buttons can appear vertically or horizontally on a page - to set them horizontally, you need to specify "Number of columns" on the radio item's definition. As you won't know exactly how many items there will be, you can just set this to the highest possible number of options.
    When the page is submitted, you should have the question number (created using the random number generator I mentioned before) plus the value of the option selected - this would be the return value for the item rather than the display value, so if the user sees "Yellow", but the return value is "1", then the item is set to 1 not Yellow. How this gets onto the database will depend on how you have set the page up. Most likely, you would just have a simple page process that does something like:
    BEGIN
    INSERT INTO ANSWERS (QUESTION, ANSWER) VALUES (:P1_QUESTION, :P1_ANSWER);
    END;This should be conditional on a Submit button
    Andy

  • Need Functional help to get the MIRO  Number from deferent seanario.

    Hai All
    I developed One report to get the Accounting document number by using PO number.
    CASE 1. In My Case One single PO is having Multiple GRN each GRN amy Have Single MIRO number or Multiple MIRO Number.
    I ll get this By Using PO with Line Item Number this is not an Issue.
    CASE2.  In One PO Multiple GRN is there and One Single ITEM is having Two GRN Number, Each GRN is having single Accounting Number (MIRO) number.
    Tell me how can i do this
    actually I am using RSEG and BKPF table to get accounting Number.
    Which table i have to use to get the Accounting number by using GRN number.
    Please Help me.
    Jagadish.

    iText. PdfReader.getNumberOfPages()

  • I am trying to design a VI that will identify the position of any overshoots and undershoots from an input array of 100 elements

    I am trying to design a VI that will identify the position and number of all overshoot and undershoot values. I have been trying for the past three weeks to solve this problem but I am having difficulty with the output arrays which will store the overshoot/undershoot values. I am using a for loop but when I connect the array indicator the wire from the o/p tunnel to the array indicator shows an errror? Any help would be greatly appreciated
    Regards,
    Kadeel

    Hi Kadeel,
    what error do you get? What happens when you right-click the loop output and select Create->Indicator?
    Why not attach your vi, that you have been working on for 3 weeks?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to pull random text from a text field?

    I'm trying to pull out the headers and then the text that goes with that header. The headers change, are inconsistently used, and sometimes aren’t present at all.  I'm using crystal reports 2008.  I bolded the headers below in the sample data.  How can I accomplish this? 
    The sample text:
                              DIAGNOSIS:  Left long finger retained foreign body and nail bed injury.      PROCEDURE:  Left long finger
                                    foreign body removal, nail bed repair.      SURGEON:  Jane,Doe MD      ANESTHESIA: Local and
                                    sedation.      INDICATIONS:  Jane Doe is a very pleasant woman who sustained a sewing needle injury to
    This is what I'm trying to accomplish.
    Header
    NOTE_TEXT
    PREOPERATIVE DIAGNOSES: 
    1.  Right shoulder rotator cuff tear.  2.  Right shoulder biceps tendon disease with superior labral tearing. 
    POSTOPERATIVE DIAGNOSES:
    1.  Right shoulder rotator cuff tear.  2.  Right shoulder biceps tendon disease with superior labral tearing. 

    Before:
    1       DIAGNOSIS:  Left long finger retained foreign body and nail bed injury.     PROCEDURE:  Left long finger
                                    foreign body removal, nail bed repair.      SURGEON:  Jane,Doe MD      ANESTHESIA:  Local and
                                    sedation.      INDICATIONS: Jane Doe is a very pleasant woman who sustained a sewing needle injury to
    After:
    Header
    Note Text
    DIAGNOSIS:
    Left long finger retained foreign body and nail bed injury.     
    PROCEDURE:
    Left long finger foreign body removal, nail bed repair
    SURGEON:
    Jane,Doe MD     
    ANESTHESIA:
    Local and sedation.
    INDICATIONS:
    Jane Doe is a very pleasant woman who sustained a sewing needle injury to

  • XSLT mapping requirement.. Only numbers need to be picked..!!

    Hi ,
    XSLT mapping requirement.
    I will be getting the value as mix of numbers and alphabets like " 1343: -BIZ USA ".
    I need to pick only number '1343' from the input field.
    Is there any function in XSLT to pick only numbers and ignore alphabets?
    Thanks
    Deepthi

    Hi There,
    The below piece of code could cater your requirement, for flltering the non digit chars from your field,
    <xsl:value-of select="translate(<your field name>, translate(<your field name>, '0123456789', ''), '')"/>
    This would separate the non numeric chars from your field in mapping.
    Let me know this works.
    Regards,
    Rajesh Kumar T

  • HTML random question score incorrect.  SWF works fine

    Version 8.0.1.242
    Question pool 25 questions. Random Question slides inserted. All questions set to score 1.  24 are multichoice, all standard.
    Published as HTML
    Score reported is 1 out of x. 
    I have tested with 3, 5 and 25 random questions from the pool.  But the score is always 1 out of x
    Published as SWF
    Works correctly
    I really need the HTML version.
    Closed, reloaded.  Saved as - retested. Turned it off and turned it back on. Sacrificed a mouse...
    Andy

    Correct questions
    ....Should be same as total points scored anyway as there is 1 point for
    each question.

  • [captivate 3] random question slide doesn't work

    hello,
    I'm noob in Captivate.
    I use Captivate demo (in french).
    I want to make a quizz for my students.
    So, I create a "question pool manager" with 1 pool project
    "reseau_locaux".
    This pool project have 13 questions.
    Then I click "slides" on the filmstrip, I add a "Random
    question slide" and I click on the "Question pool menu" to select
    my pool project "reseau_locaux"
    After generating project, I have only 1 question from my
    question pool project.
    I read the help guide but it's not help me.
    It gets me crazy...
    I hope you understand my english.
    thanks

    Welcome to our community, Anthony
    Basically you are doing everything right. I'm a bit unclear
    on what you were expecting to see. Perhaps it will help you if I
    explain how the Question Pools and Random Questions work.
    You define a pool of questions using the Question Pools
    Manager. You advise you have done that. So far so good.
    You then insert a Random Question Slide. When you insert one
    of these, you point the slide at a Question Pool. You advise that
    you have done that too.
    I'm guessing here that perhaps you expected that by inserting
    a single Random Question Slide you would end up presenting all 13
    questions from the pool. Just in random order?
    If so, that's not how it was designed to work. What happens
    is that a single random question from the pool is presented. If you
    desire to see all 13 of your questions, but in random order, you
    need to insert 13 Random Question Slides and point them at your
    Question Pool.
    You may wonder at this point if you do this, will it would be
    possible to see perhaps question 2 multiple times. And the answer
    to that is no. Once a question has been presented, it is removed
    from consideration in the pool. So after the first one is
    presented, Captivate randomizes from what remains in the pool.
    Hopefully that helps better explain it.
    Cheers... Rick

  • Grabbing Random Questions for the Question Pool

    Hi Everyone,
    I am interested in exactly how the Random Question Pool
    works. Let's say there are 50 questions in the question pool and
    you want 10 questions from that question pool of 50. When you
    publish I understand you will get 10 random questions from the 50
    questions. Then when you run your published project are you always
    going to get the same 10 questions or another 10 of the 50 pooled
    questions everytime your run that same published project? Or do you
    have to publish again, calling the quiz another name to get another
    10 of 50 questions from the question pool? I appreciate the help on
    this.

    Hi slewis6337
    It is my understanding that each time you
    display the Captivate output, you see a totally random
    question. So if your question pool contains 50 questions, each time
    your Captivate output presents the random question and draws from
    the pool, it is truly drawing a totally random question.
    I do believe that Captivate does keep track of which
    questions have been used in the pool. To test this, try creating a
    pool containing three questions. Then create four random question
    slides that point at the pool. Then try running the Captivate. You
    should see that as random question number four is encountered, the
    screen goes totally gray. This is happening because you have
    exhausted the question pool.
    Sincerely... Rick

  • Scorm will not load random questions

    Good afternoon.
    Moodle 1.9
    Cp7
    My SCORM will not load when I have used random questions from a pool. I published the same course with a set amount of questions and it loads perfectly.
    Does anyone know of an issue with using random questions?
    Thank you in advance.

    Blackboard Learn in Compass 2G
    Cp8
    Our SCORM reports when using random questions not-from-a-pool, but the report is useless. It says, for instance, that the user selected answer b for question 1, but because we randomized questions, we have no idea what answer b was for that student.
    If anyone knows of a way to get the actual question into the report, please respond. Meanwhile, we're turning the randomizing off.
    This seems like a pretty big hole in the data reporting architecture. I am working with my Compass administrator to see if we figure out if Captivate is reporting the data to Blackboard, or if it's the SCORM reporting implementation in Captivate that is responsible.

  • I forget the answers for the secret questions,, i need to reset them,,any help please

    I forget the answers for the secret questions,, i need to reset them,,any help please

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (97479)

  • I have a MacBook Pro running 10.6.8 model 7.1; need to upgrade to Mavericks.  My question concerns 3 software apps:  Reunion 10, Quicken 2007, Appleworks 6.2.9.  Any recommendations?

    I have a MacBook Pro model 7.1 running 10.6.8; need to upgrade to Mavericks...question concerns 3 software apps:  Reunion 10, Quicken 2007, Appleworks 6.2.9 (word processing docs).  Any recommendations?

    Quicken Essentials is universally loathed on this forum.  Quicken 2007 updated for Lion, Mt. Lion and Mavericks for $15 is the way to go:
    http://quicken.intuit.com/personal-finance-software/quicken-2007-osx-lion.jsp
    Appleworks 6:
    Partition your hard drive or add an external drive and install Snow Leopard and use the "dual-boot" method to run Appleworks; and/or
    Install Snow Leopard Server (available by telephone order only from the Apple Store 1.800.MYAPPLE [1.800.692.7753]; part number - MC588Z/A) into Parallels and run Appleworks (and most other PowerPC apps) concurrently with Mavericks:
                                  [click on image to enlarge]
    Review Roger Wilmut's excellent series of articles, Abandoning Appleworks:
    http://www.wilmut.webspace.virginmedia.com/notes/aw/page1.html

  • Presenter 8 -- need help with proper settings to allow quiz retake (with a NEW set of questions from a random pool)

    We are publishing a Presenter 8 quiz to an LMS in a SCORM format.  I am having trouble with the following:  the quiz is built with multiple question groups, and a limited number of questions are being selected from each group.  E.g. we have 80+ questions in total, and 25 are presented to a user on a given attempt.
    When a user fails the quiz and exits the quiz normally, we want them to study and try again.  I set the quiz settings to allow infinite attempts, and set the LMS settings to make sure the quiz is not presented in "review mode".  When I test this quiz by failing it the first time, when I reenter the quiz, I am taken to the last slide in the quiz (which is the last one I viewed), and I can retake the quiz by navigating back to the first question.
    Here's the problem:  I am presented with the SAME set of questions, rather than a NEW set of random questions.  This will facilitate cheating (all a user has to do is take the quiz once, review the answers, and then take it again to pass it).
    How do I insure that the user is presented with a NEW set of questions when I retake the quiz?
    I am open to upgrading to Adobe Presenter 10, but would rather not have to do so.  There must be some setting I'm missing.
    Scott Richardson

    If you move a mailbox from one server to another, Outlook will automatically repair the Outlook profile.  Have you tried this, instead of trying to force a profile update using a PRF?

Maybe you are looking for