Multiple selection in a detail block

In a scenario where there is a master-detail-detail block structure, is it possible to select several records of the first detail block and enter a record for them in the second detail block?
Thanx in advance.
P.S. please excuse me if the question sounds weird.

use this code: i used this for multiple selection in a detail block to delete the selected record. the trick is u need to create a Check box.
DECLARE
Num_Total_Records NUMBER;
Num_Loop_I NUMBER;
BEGIN
GO_BLOCK(<BLOCK_NAME>);
FIRST_RECORD;
LAST_RECORD;
Num_Total_Records := TO_NUMBER(NAME_IN('SYSTEM.CURSOR_RECORD'));
FIRST_RECORD;
FOR Num_Loop_I IN 1..Num_Total_Records LOOP
IF <CHECKBOX> = 1 THEN
<................................................>
END IF;
NEXT_RECORD;
END LOOP;
<................................................>
END;

Similar Messages

  • Multiple Selection from a data block

    Hello,
    I have a data block returning the names and surnames of employees. Can I select multiple rows from that data block?
    Thank you

    You could put a checkbox on the row and if it is ticked then interpret this as a selected row.
    Sometimes it is useful to store this type of selection in some type of structure like a record group or index by table and process those rows rather than read the data block

  • Multiple Selection on a block

    Hi experts,
    How can i make multiple selection on a detail block (in ascending order) and save the selected data on database.?
    can i have a sample code please?
    Thanks,
    mr. baguhan

    baguhan,
    then replace with this code.
    DECLARE
    Num_Total_Records NUMBER;
    Num_Loop_I           NUMBER;
    BEGIN
    GO_BLOCK(<BLOCK_NAME>);
    FIRST_RECORD;
    LAST_RECORD;
    Num_Total_Records := TO_NUMBER(NAME_IN('SYSTEM.CURSOR_RECORD'));
    FIRST_RECORD;
    FOR Num_Loop_I IN 1..Num_Total_Records LOOP
    IF <CHECKBOX> = 1 THEN
    <................................................>
    END IF;
    NEXT_RECORD;
    END LOOP;
    <................................................>
    END;
    Regards,
    Manu.

  • How to validate that only one check box is checked in detail block

    Hi All,
    I am using oracle Forms 10G on windows.
    I need help on how to validate that only one check box is checked in detail block. I have multiple records in the detail block and I have check boxes for each record in the detail block.
    I have a button to select the values from the detail records where the check box is checked. But I want to make sure that only one record is check not more than one.
    How do I validate this on a push button trigger?
    Thanks

    When I've done this kind of thing, I create a Form level variable of TYPE number and then add or subtract to this variable as I check and uncheck the checkboxes. If the value of the variable is 1, then you know that only one checkbox is selected. If the value is greater than 1, then you know the user has selected more than one check box. You could also add code to your When-Checkbox-Changed trigger to test the variable and instruct the user to un-check selected record before selecing a new record.
    With respect to the Form level variable, you can use a GLOBAL, PARAMETER or Program Unit package specification. I prefer to use the PU Package Spec as this method has a smaller memory footprint. For example, in the Program Unit node of the object navigator create the following;
    /* Form variables package spec */
    PACKAGE Form_Vars IS
      CheckBox_Cnt     NUMBER := 0;
    END;Now in your When-Checkbox-Changed trigger...
    BEGIN
       IF ( Form_Vars.CheckBox_Cnt = 0 ) THEN
          Form_Vars.CheckBox_Cnt  := Form_Vars.CheckBox_Cnt  + 1;
       ELSE
          /* it's assumed the value is greater than 0 */
          Message('Please uncheck selec ted record before choosing a new record.');
          RAISE Form_Trigger_Failure;
       END IF;
    END;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Feb 3, 2011 10:15 AM

  • File Dialog (Details View and Multiple Selections for View File Type)

    I would like to use the generic windows dialog box found in the toolbar under:
    File I/O/Advanced File Functions/File Dialog
    What I would like to do is have multiple selections for the file type, for example one menu selection is *.txt, another is *.rtf, another is *.csv, etc. Listing a single type is straightforward.
    Also does anyone know if there is a way to have the dialog open in the DETAILS view automatically?
    Thanks for any help!
    Carlton

    Hi,
    You can do it in following ways:
    1. Write in pattern input the string "*.txt; *.csv; *.rtf". This will show to the user only files with this extensions in the dialog.
    2. Another way is to create ring or menu where user could specify the extension. Depending on this extension you could wire the appropriate string to the pattern input of "File Dialog.vi"
    I have made an example.
    Good luck.
    Oleg Chutko.
    Attachments:
    fileopen.vi ‏42 KB

  • PCUI - Multiple Selection at Position 2 (Details Area 1 onwards)

    hi,
    Is it possible to select more than one records on a list appearing in the "Detail area 1"?
    I was not able to find a list functionality with multiple selection for anything other than result list.
    Is there a way we can simulate the multiple selection on a list in "Detail Area 1"?
    Looking forward to a speedy reply.
    Cheers
    Aniruddha

    Hi,
    It is possible. You have to set the screen type as multi selection .You can find it in PCUI Service contract item level.
    Thanks and Regards,
    Abdul Raheem S

  • Inserting multiple records in a table through detail block

    hi,
    i am new to oracle forms. i want to enter more than one records in a table through a master detail forms.
    the records will be entered by user in the detail section. can any ody help me?

    Hi Lance,
    Try creating records in detail block in the when new block instance trigger of
    detail block. Set the validation unit property of the form to FORM before trying this.
    Hope this might be helpful to you.
    V.Senthil Kumar

  • Multiple Row Selection in a data block

    In a datablock i can select a row by clicking on it or by using the arrow key.
    For this....
    I created a visual attribute(Background Color - Gray) and assigned it in the 'current record visual attribute' tab...which allows me to select a single row.
    Is there a way to select multiple rows using Ctrl Key or Shift Key.
    I tried one of the solutions provided earlier to a similar question but the multiple selection was only for a column not for the complete row.

    What you can do is take a recordgroup and loop from col 1 to col n to get all columns.
    Then if someone clicks on the next row (do the same again).
    This should work, there is an example in the ADVANCED FORMS AND REPORTS book.
    Also in the form builder course (University)
    Regards

  • Create a custom multiple selection on screen - not selection-screen block

    Dear expert,
    I created a text field on screen for input selection, e.g field bname for USR02-BNAME. How can i create a CUSTOMIZE multiple selection plus a paste (from clipboard) feature on this screen (e.g. SCREEN 0002) like standard selection-screen from SAP when we create a report.
    For a better view on what i want:
    This text field already use F4 customize search help. I need a multiple selection lines (like standard selection-screen a button on the right side of select-options field).
    Remember, i don't create textfield from select-options parameter (e.q. SELECT-OPTIONS : XBNAME FOR USR02-BNAME),
    but on a screen.
    Anyone can help my case?.
    Thanks and Warm regards,
    Dondi.

    Had the same question from my users. This was the first hit i found but unfortunately without an answer. So for those with the same question, this is how i solved it (goede voornemen voor 2014). In my case the request is a complex selection on the LFA1 table.
    The screen contains two fields to enter the low/high value for lifnr (zdy_droogteschade-lifnr and zdy_droogteschade-lifnr_tot)
    Created a button on the screen, mark this as output only, when pressed the routine multi_select_crediteuren is performed wich uses the fm 'COMPLEX_SELECTIONS_DIALOG'.
    To top it all of, the icon on the button changes depending on the contains of the range table (in a routine called from the PBO).
    This only works when the button is marked as 'output only',
    Include the icon type pool: 'type-pools: icon.'

  • Multiple master blocks populating the same detail blocks

    Hey guys. Im doing something a little weirder than I usually do but I can't get it to work correctly and im wondering if any of you have accomplished this before.
    I have a call center application which processes applications by either the application or by follow up. The application and follow up are each a block by themselves located on a separate pages on a tab canvas. Both these blocks are master blocks to the detail blocks which would be user_phones, user_addresses, user_bank_accounts, etc. The idea is I can use either page of the tabs and flip through either the follow up, or application master block and have it populate the user tables according to the user_id found on the master blocks. I figured I could use a when-new-block-instance trigger to switch off which block fires the on-populate-details trigger.
    The problem is.... complicated. If I go to the follow up block and execute query, it brings back the right information on the detail block. The strange thing is it seems like when I move the cursor to a different record on the same block, forms is almost setting a SET_BLOCK_PROPERTY DEFAULT_WHERE action. This is un-noticeable until i go to the other master detail block. When I start using the applications block, it seems like all the detail records actually MATCH the user_id that the cursor was on in the follow up block...
    phew! thats a lot of description for such a strange problem..
    Anyways. Anyone encountered this before? Has anyone ever built a two master block form to populate the same detail block? Is it possible? I haven't found a thread in the forum about this subject..
    Any help would be great. Thanks in advance :)

    Having one detail block for two master blocks was never a use case that we considered for Forms. It sounds like you are trying to make a many-to-many relationship work with two master blocks. I suggest you think about having an intermediate block (hidden or not) that drives the detail block and make each master block drive that intermediate block instead of driving the detail block directly.

  • Multiple Details Blocks

    Hi All,
    I have created detail within detail block
    example
    Master block is - B1
    Detail Block is - B2
    B3(Detail block of B2)
    B4(Detail block of B3)
    When I enter in B3 block. First time No problem is coming but when click on 2nd record on B3 block, that time message is coming
    "Do you want to save the changes you have made"
    Please tell me what is solution of such type requirement.
    With Regards,
    chandra Shekhar

    983576 wrote:
    Hi All,
    I have created detail within detail block
    example
    Master block is - B1
    Detail Block is - B2
    B3(Detail block of B2)
    B4(Detail block of B3)
    When I enter in B3 block. First time No problem is coming but when click on 2nd record on B3 block, that time message is coming
    "Do you want to save the changes you have made"
    Please tell me what is solution of such type requirement.
    Hi, chandra Shekhar
    It's the normal behavior of forms. most probably you are entering date at block B4 associate to first record of Block B3. then want to navigate to second record of block B3. right ?
    More over, this question asked several times in forum. just search at forms forum. for exact search use this
    "Do you want to save the changes you have made"Hope this helps
    Hamid
    Mark correct/helpful to help others to get right answer(s).*
    Edited by: HamidHelal on Mar 19, 2013 3:11 PM

  • How to display data in detail block from a table.

    Dear members,
    i have 2 blocks. 1 is master block and another is detail block with multiple records.
    the requirement is when i navigate to the detail block the data from a table is displayed in it. using a where clause depend on the value in an item in the master block.
    i wrote the following code and tried in when-new-block-instance, when-new-record-instance, pre-block and post-block
    but...
    DECLARE
         CURSOR ITEM_CUR IS
         SELECT ITEM_ID, QTY_APPROVED
         FROM IN_REQUEST_FORM_DETAIL
         WHERE RF_MASTER_ID = :IN_MASTER_PO.RF_ID;
    BEGIN
         FOR ITEM_REC IN ITEM_CUR LOOP
              :IN_PO_DETAIL.ITEM_ID := ITEM_REC.ITEM_ID;
              :IN_PO_DETAIL.DIS_APPROVED_QTY := ITEM_REC.QTY_APPROVED;
              NEXT_RECORD;
              END LOOP;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         MESSAGE ('THERE IS NO REQUESTS');
    END;

    thanks dear simon,
    i want to display the data from a table not included in this form. and these two tables are connected via a relation.
    i have the following tables.
    in_master_po
    PO_ID pk
    PO_DATE
    RF_DETAIL_ID fk (in_request_form_detail)
    in_po_detail
    DETAIL_PO_ID pk
    ITEM_ID fk
    PO_ID fk (in_master_po)
    QTY
    the above 2 tables are datablocks connected via relation
    the following is the from which i want to bring the data to display
    in_request_form_detail
    RF_DETAIL_ID pk
    ITEM_ID fk (items)
    QTY_REQ
    i tried my code on the sample tables with scott/tiger there it works good.
    thanks
    Muhammad Nadeem

  • RE: HR ABAP Multiple selection problem on input selection-screen

    hi friends,
    I AM Facing one problem in HR abap report  selection-screen , in my report  employee details data getting based on payroll area
    of selection-screen. Here iam  SELECTION-SCREEN  declarations made in program level NOT created REPORT CATEGORY FOR
    PNP LDB.
    ACTUAL MY PROBLEM IS IF I SELECT SINGLE PAYROLL AREA IN SELECTION-SCREEN IT GETTING DATA PERFECTLY FOR THAT
    PAYROLL AREA  
    EX. ZA - PAYROLL AREA IF I SELECT IN SELECTION SCREEN IT FETCHING THAT PAYROLL  AREA DATA PERFECTLY, PROBLEM
    IS IF I SELECT MULTIPLE PAYROLL AREAS IN SELECTION-SCREEN PAYROLL AREA FIELD  ZA AND ZB PAYROLLS IT FETCHING
    ONLY ZA -PAYROLL DATA ONLY IT IS NOT FETCHING DATA FROM ZB PAYROLL AREA.MY REQUIREMENT IS IT SHOULD FETCH
    BOTH PAYROLL DATA  AND SHOWING  .
    HERE  IAM GIVING MY SELECTION SCREEN DECLARATION SYNTAX.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:
                    S_ABKRS FOR P0001-ABKRS NO INTERVALS," NO-EXTENSION,     " PAY ROLL AREA
                    S_PERSA FOR P0001-WERKS NO INTERVALS," NO-EXTENSION,     " PERS.AREA
    SELECTION-SCREEN END OF BLOCK B2 .
    PLEASE Any body knows solution for this selection give me reply.
    regards,
    gopal

    If you are using Logical DB PNP why are you coding Selection Fields for ABKRS and WERKS?   Both of these fields are defined in the PNP Selection Screen and if you use those fields then SAP will handle filtering the data.

  • How to display total in a block without total showing up in relevant detail block

    Hi there,
              I create a worksheet, including two block, one of which have detail information with multiple characts and one key figure, another block only have sumerization information takes one cell, which is summarized key figure for that detail information block.
             I implement this summary cell with formula 'GETDATA', but it is only effective after I show total for detail block.
            such as for detail block:
                         employee_no,  wage type,  earning_amount.
                         overall result                        total for earning_amount
            for summary block:
                         summary of earning_amount for all employees in the detail block.
    please tell me how to display summary block without pulling in overall result for detail block.
    Many Thanks,

    Hi bo zhang,
    This can be a work around
    As Michael Tocik suggested
    goto components tab, right click on data source and select copy
    do not insert cross tab
    then use the formula for DS_2 like
    =SAPGetData("DS_2","earning_amount","employee_no=TOTAL")
    this should work.
    and if you do any drill down for DS_1, the above total will not chnage because that is dependent on DS_2
    Hope it helps
    Best Regards,
    Subhash

  • How to call adobeform multiple times for multiple selection.

    Hello Experts,
    Good morning.
    I am new to ABAP,
    I am working on one program which is used for printing a bank voucher for that i have to select multiple document number (BELNR), it is running fine with selecting a single document but for multiple selection i have to call adobeform multiple times.
    Can anyone give me the solution how to do this.
    Any suggestion will be appreciated.
    Regards,
    Dipen Pandya.

    Yes i have done the same way.
    Please have a look at my code.
    REPORT zfi_print_bank_voucher.
    TABLES: bkpf,
             bseg,
             skat.
    TYPES : BEGIN OF  lv_main,
            belnr TYPE bkpf-belnr,
            xblnr TYPE bkpf-xblnr,
            ebeln TYPE bseg-ebeln,
            bankn TYPE lfbk-bankn,
            budat TYPE bkpf-budat,
            bldat TYPE bkpf-bldat,
            bedat TYPE ekko-bedat,
            bankl TYPE lfbk-bankl,
            lifnr TYPE lifnr,
            END OF lv_main.
    TYPES: BEGIN OF st_bseg,
             ebeln TYPE bseg-ebeln,
             bukrs TYPE bseg-bukrs,
             buzei TYPE bseg-buzei,
             hkont TYPE bseg-hkont,
             bschl TYPE bseg-bschl,
             saknr TYPE skat-saknr,
             txt20 TYPE skat-txt20,
             kostl TYPE bseg-kostl,
             mwsts TYPE bseg-mwsts,
             dmbtr TYPE bseg-dmbtr,
             belnr TYPE bseg-belnr,
           END OF st_bseg.
    TYPES: BEGIN OF i_desc,
             spras TYPE skat-spras,
             saknr TYPE skat-saknr,
             txt20 TYPE skat-txt20,
       END OF i_desc.
    TYPES: BEGIN OF st_bkpf,
            belnr TYPE bkpf-belnr,
            xblnr TYPE bkpf-xblnr,
            budat TYPE bkpf-budat,
            bldat TYPE bkpf-bldat,
       END OF st_bkpf.
    TYPES: BEGIN OF st_lfbk,
             bankn TYPE lfbk-bankn,
             bankl TYPE lfbk-bankl,
       END OF st_lfbk.
    TYPES: BEGIN OF st_ekko,
             ebeln TYPE ekko-ebeln,
             bedat TYPE ekko-bedat,
       END OF st_ekko.
    DATA: it_bseg TYPE STANDARD TABLE OF st_bseg,
           wa_bseg TYPE st_bseg.
    DATA: it_bkpf TYPE STANDARD TABLE OF st_bkpf,
           wa_bkpf TYPE st_bkpf.
    DATA: it_desc TYPE STANDARD TABLE OF i_desc,
           wa_desc TYPE i_desc.
    DATA: it_lfbk TYPE STANDARD TABLE OF st_lfbk,
           wa_lfbk TYPE st_lfbk.
    DATA: it_ekko TYPE STANDARD TABLE OF st_ekko,
           wa_ekko TYPE st_ekko.
    DATA: fname TYPE funcname,
           ls_outputparams TYPE sfpoutputparams,
           logo_bin TYPE xstring.
    DATA: ls_result TYPE sfpjoboutput.
    DATA: it_main TYPE STANDARD TABLE OF lv_main,
           wa_main TYPE lv_main.
    DATA: i_bseg TYPE ztt_bseg WITH HEADER LINE.
    DATA: ok_code TYPE sy-ucomm.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE t001.
    SELECT-OPTIONS  bukrs FOR bkpf-bukrs OBLIGATORY DEFAULT '1000' NO-EXTENSION NO INTERVALS.
    SELECT-OPTIONS  belnr FOR bkpf-belnr OBLIGATORY.
    PARAMETERS: year LIKE bkpf-gjahr DEFAULT sy-datum+0(4) OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    INITIALIZATION.
       t001 = 'Enter Specific Details'.
    START-OF-SELECTION.
       PERFORM feeding_data.
       PERFORM print_form.
    *&      Form  print_form
    *       text
    FORM print_form.
       CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
         EXPORTING
           i_name     = 'ZFI_BANK_VOUCHER_FORM'
         IMPORTING
           e_funcname = fname.
       ls_outputparams-bumode = 'M'.
       CALL FUNCTION 'FP_JOB_OPEN'
         CHANGING
           ie_outputparams = ls_outputparams
         EXCEPTIONS
           cancel          = 1
           usage_error     = 2
           system_error    = 3
           internal_error  = 4
           OTHERS          = 5.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
       LOOP AT it_main INTO wa_main.
    *at new belnr.
         PERFORM controll_internal.
         CALL FUNCTION fname "'/1BCDWB/SM00000237'
           EXPORTING
    *   /1BCDWB/DOCPARAMS        =
             belnr_d                  = wa_main-belnr    "bkpf
             lifnr                    = wa_main-lifnr
             xblnr                    = wa_main-xblnr      "bkpf
             ebeln                    = wa_main-ebeln      "bseg
             bankn                    = wa_main-bankn      "lfbk
             budat                    = wa_main-budat      "bkpf
             bldat                    = wa_main-bldat      "bkpf
             podat                    = wa_main-bedat      "ekko
             bankl                    = wa_main-bankl      "lfbk
             itab_bseg                = i_bseg[]
    * IMPORTING
    *   /1BCDWB/FORMOUTPUT       =
          EXCEPTIONS
            usage_error              = 1
            system_error             = 2
            internal_error           = 3
            OTHERS                   = 4
         IF sy-subrc <> 0.
    * Implement suitable error handling here
         ENDIF.
       ENDLOOP.
       CALL FUNCTION 'FP_JOB_CLOSE'
         IMPORTING
           e_result       = ls_result
         EXCEPTIONS
           usage_error    = 1
           system_error   = 2
           internal_error = 3
           OTHERS         = 4.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    ENDFORM.                    " PRINT_FORM
    *&      Form  FEEDING_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM feeding_data .
       SELECT ebeln
               bukrs
               buzei
               hkont
               bschl
               kostl
               mwsts
               dmbtr
               belnr
          FROM bseg INTO CORRESPONDING FIELDS OF TABLE it_bseg
                    WHERE bukrs IN bukrs
                        AND belnr IN belnr.
       SELECT saknr txt20  FROM skat
         INTO CORRESPONDING FIELDS OF TABLE it_desc
           FOR ALL ENTRIES IN it_bseg
                 WHERE saknr = it_bseg-hkont AND
                       spras = sy-langu.
       IF it_desc IS NOT INITIAL.
         LOOP AT it_bseg INTO wa_bseg.
           READ TABLE it_desc INTO wa_desc WITH KEY saknr = wa_bseg-hkont.
           IF sy-subrc = '0'.
             wa_bseg-txt20 = wa_desc-txt20.
             MODIFY it_bseg FROM wa_bseg.
           ENDIF.
         ENDLOOP.
       ENDIF.
       SELECT  * FROM bseg
               INTO CORRESPONDING FIELDS OF TABLE it_main
               WHERE belnr IN belnr AND
                     shkzg = 'S'.
       LOOP AT it_main INTO wa_main.
         SELECT SINGLE lifnr FROM bseg
           INTO wa_main-lifnr
           WHERE belnr = belnr-low.
         SELECT SINGLE bankl bankn FROM lfbk
                INTO (wa_main-bankl, wa_main-bankn)
                WHERE bankl = wa_main-lifnr.
        SELECT SINGLE budat bldat FROM bkpf
          INTO (wa_main-budat, wa_main-bldat)
          WHERE belnr = belnr-low.
         SELECT SINGLE bedat FROM ekko
                INTO wa_main-bedat
                WHERE ebeln = wa_main-ebeln.
         MODIFY it_main FROM wa_main.
         CLEAR wa_main.
       ENDLOOP.
    ENDFORM.                    " FEEDING_DATA
    *&      Form  CONTROLL_INTERNAL
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM controll_internal .
       LOOP AT it_bseg INTO wa_bseg.
    *  lw_bseg = wa_bseg.
         AT NEW belnr.
           i_bseg-buzei = wa_bseg-buzei.
           i_bseg-hkont = wa_bseg-hkont.
           i_bseg-bschl = wa_bseg-bschl.
           i_bseg-txt20 = wa_bseg-txt20.
           i_bseg-kostl = wa_bseg-kostl.
           i_bseg-mwsts = wa_bseg-mwsts.
           i_bseg-dmbtr = wa_bseg-dmbtr.
           APPEND i_bseg.
          ENDAT.
       ENDLOOP.
    ENDFORM.                    " CONTROLL_INTERNAL

Maybe you are looking for