How to use DirectCast for multiple selected rows?

Hi<o:p></o:p>
Me.SecondBindingSource.DataSource = DirectCast(parentForm.FirstBindingSource.Current, DataRowView) works perfect for single items but how do I do it if I've selected multiple rows on datagridOne and want to pass only the selected rows to datagridTwo using DirectCast? 
Me.SecondBindingSource.DataSource = DirectCast(main.FirstBindingSource.Current, DataRowCollection) does not work??<o:p></o:p>

You have to put the rows into a datatable.  It is usually best if your original source is a datatable.  The filter the original datatable.  The selected rows of the datagrid are the same row numbers in the source datatable.
jdweng

Similar Messages

  • How to Calculate sum for the selected rows in ALV gird using custom button

    Hi I am trying to implement an ALV Grid display where the user can select few rows in the output and if he click on some custom button he should get the sum for only those rows.
    Can anyone give me some idea regarding this.
    Thanks in advance

    While building the fieldcatalog for amount field use gt_fieldcat-do_sum = 'X'. And use the below for doc type sorting and subtotal.
    *  ALV data declarations
      data: it_sortcat   type slis_sortinfo_alv occurs 1,
            wa_sort like line of it_sortcat.
    perform build_sortcat.
    *&      Form  build_sortcat
    *       Build Sort catalog
    FORM build_sortcat .
      wa_sort-spos      = 1.
      wa_sort-fieldname = 'EBELN'.
      wa_sort-SUBTOT    = 'X'. "subtotals any totals column by this field
    *  gd_sortcat-tabname
      APPEND wa_sort TO it_sortcat.
      wa_sort-spos      = 2.
      wa_sort-fieldname = 'EBELP'.
    *  gd_sortcat-tabname
      APPEND wa_sort TO it_sortcat.
    ENDFORM.                    " build_sortcat
    call function 'REUSE_ALV_LIST_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                it_sort                 = it_sortcat
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    Regards,
    Chandru

  • How to use IWEB for multiple websites?

    Okay.
    I have two websites. One on a 3rd party, one on .MAC.
    Computer 1 = .MAC website
    Computer 2= 3rd party website
    I want to use computer 2 to edit my .MAC website and moved the DOMAIN file but haven't open it in iWEB on the second computer as I need to know how to open and not destroy the 3rd party website.
    How is this done?
    Thanks.

    You can rename the domain file to something descriptive of the site and open them manually. But I find it much safer to use iWebSites for managing multiple sites, over 25. I use iWebSites to manage multiple sites.. It lets me create multiple sites and multiple domain files.
    If you have multiple sites in one domain file here's the workflow I used to split them into individual site files with iWebSites. Be sure to make a backup copy of your original Domain.sites files before starting the splitting process.
    This lets me edit several sites and only republish the one I want.

  • How to use Keychain for multiple users on one computer?

    I have a new Macbook Pro with Yosemite.  I just moved over from PC for my work computer and the Keychain thing is killing me!  I am a social media consultant so I manage multiple accounts for multiple clients.  I need a way to log in and out as them on many different platforms.  The reality is that I am the only user but I log in and out of different things as if this was a public computer with multiple users. 
    PC allowed me a drop-down option with each login.  For example the email box could be clicked and then I could select the client email that I needed to fill in.  The password would then auto-populate.  Is there any setting I can change to make this happen on a Macbook? I have been logging in, deleting the info in Keychain, then logging in for the next client, delete...etc.
    Most password managers don't work because of this same problem.  Please don't recommend a password manager app unless it can handle logging in and out of (for example)10 different LinkedIn profiles.
    Any advice would be greatly appreciated!

    Tanja Turtsanyi wrote:
    I have a new Macbook Pro with Yosemite.
    Apple>About This Mac>More Info>Service
    Please read the warranty paperwork that came w/your computer.
    You have 14 days to return the computer w/no questions asked. 
    You have 90 days of FREE phone tech support on top of your standard 1 year warranty unless you also purchased AppleCare which gives you an additional 2 years of coverage plus FREE phone support.
    Strongly suggest that you take FULL advantage of the above before it runs out.  Let Apple deal w/the problems.
    Mac OS X (10.4)
    Conflicting info:  Please update/correct your profile so that you can receive the correct troubleshooting suggestions.  This will assist the users in trying to help you.  Thank you.

  • How to provide checkbox for multiple selection in OBIEE

    Thanks in Advance
    Regards
    Frnds

    How's the "GUI" different from a prompt rendered in a dashboard?
    Try being more specific and especially...use relevant terms. Are you talking about a dashbaord page? Do you want it inside a request etc. etc.
    Edited by: Christian Berg on Feb 10, 2009 11:50 AM

  • How to apply List box for multiple selection of rows  in ALV report ?

    Hi Exprots,
    1: How to apply List box for multiple selection of rows  in ALV report ?
    Thanking you.
    Subash

    hi,
    check the below program.
    REPORT zalv_dropdowns.
    *Type pools declarations for ALV
    TYPE-POOLS : slis.
    *data declarations for ALV container,ALV grid, Fieldcatalogues & layout
    DATA: g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          gs_layout TYPE lvc_s_layo.*INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
    DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
          wa_outtab TYPE t517a.
    START-OF-SELECTION.*Call to ALV
      CALL SCREEN 600.*On this statement double click  it takes you to the screen painter SE51.
    *Create a Custom container and name it CCONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    *Now a normal screen with number 600 is created which holds the ALV grid.
    PBO of the actual screen , Here we can give a title and customized menus
    Here we also call the subroutine for ALV output.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      PERFORM alv_output.
    ENDMODULE.                    "pbo OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
    ENDMODULE.                    "pai INPUT
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat.
    DATA ls_fcat TYPE lvc_s_fcat.
    *Build the field catalogue
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'T517A'
        CHANGING
          ct_fieldcat      = gt_fieldcat.
    To assign dropdown in the fieldcataogue
      LOOP AT gt_fieldcat INTO ls_fcat.   
    CASE ls_fcat-fieldname.
       WHEN 'SLART'.
    *is the first list box
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
    is the second list box    
    WHEN 'ABART'.       
            ls_fcat-drdn_hndl = '2'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.   
    ENDCASE.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  ALV_OUTPUT
    FORM alv_output .*Create object for container
      CREATE OBJECT g_custom_container
             EXPORTING container_name = 'CCONT'.
    *create object for grid
      CREATE OBJECT g_grid
             EXPORTING i_parent = g_custom_container.
    Build fieldcat and set column
    *Assign a handle for the dropdown listbox.
      PERFORM build_fieldcat.
    *Build layout
      PERFORM build_layout.
    Define a drop down table.
      PERFORM dropdown_table.
    *fetch values from the T517A table
      SELECT * FROM t517a INTO TABLE gt_outtab.
    *Display ALV output
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_fieldcatalog = gt_fieldcat
          it_outtab       = gt_outtab.ENDFORM.                               "ALV_OUTPUT
    *&      Form  dropdown_table
          text
    -->  p1        text
    <--  p2        text
    FORM dropdown_table.*Declarations for drop down lists in ALV.
      DATA: lt_dropdown TYPE lvc_t_drop,
            ls_dropdown TYPE lvc_s_drop.
    First SLART listbox (handle '1').
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '01 Primary school'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '1'.
      ls_dropdown-value = '02 Lower Secondary'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '1'.
      ls_dropdown-value = '03 Upper Secondary'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '04 Professional School'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '05 College'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '06 University'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '09 Other Establishment'.
      APPEND ls_dropdown TO lt_dropdown.* Second ABART listbox (handle '2').  ls_dropdown-handle = '2'.
      ls_dropdown-value = '10 Primary School certificate'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '20 Lower secondary/Junior high'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '30 High school diploma(B-levels)'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '31 Vocational'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '32 Matriculation'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '40 Specialist vocational certificate'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '50 College degree Level1'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '51 College degree Level2'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '52 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '60 Univ Degree level1'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '61 Bachelors degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '62 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '63 Licenciate'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '64 Doctors Degree Ph.D'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '89 None'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '90 Unknown'.
      APPEND ls_dropdown TO lt_dropdown.*method to display the dropdown in ALV
      CALL METHOD g_grid->set_drop_down_table
        EXPORTING
          it_drop_down = lt_dropdown.ENDFORM.                               " dropdown_table
    *&      Form  build_layout
          text
    *layout for ALV output
    FORM build_layout .  gs_layout-cwidth_opt = 'X'.
      gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
      gs_layout-no_toolbar = 'X'.ENDFORM.                    " build_layout
    endform.
    Edited by: S.r.v.r.Kumar on Jun 1, 2009 2:48 PM

  • 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

  • How to set billing doc parameter for multiple selection ?????

    Hi all,
    Output for Billing
    VF31, SD70AV3A
    i would like to add ‘Multiple selection’ to the Billing Document parameter.  multiple Currently, it would only give data for one of the documents in the selection.
    According to me the billing parameter can be changed for multiple selection, need your suggestion for how to proceed with this..
    Thx in adv
    Megha

    VF31 <b>does</b> have multiple selection option for Billing document, at least in my world (4.7).

  • How to display multiple selected rows in a table inside a popup?

    Hi,
    I have a table on which multiple selection is enabled. I am able to get hold of multiple selected rows i.e. i am able to iterate over the selected row keys and print their values. Now, my problem is how to display the contents of all the selected rows in a popup? I get the details of only one row when I launch the popup.
    Thanks
    Karan

    Hi,
    Not confident if this works or not but just try it...
    1. create a ViewLink between the same view Object.
    The source and destination wil be the same Vo and the source and destination attribute will be the pk of both Vos.
    2. Update the changes in Appln Module.
    Open the AM and in DataModel tab .
    select the Same VO from which you created table in the DataModel Listbox and select the VL in the "Avaible View Objects" List Box. Add under it(selected vo in datamodel listbox).
    3. Refresh DataControl accordion.
    4. in your jsff page drag and drop the child vo as a table..
    See if it works
    Regards,
    Santosh.

  • How to use offset for select-option parameter ?

    Hi experts
    could anybody please let me know how to use offset for select-option parameter. i can able to use offset for table fields, variabiles and all , but don't know how to use for parameters.
    following is my code
    SELECT-OPTIONS: s_prctr  FOR vbsegs-prctr OBLIGATORY.
    here "prctr"  length is 10.
    i'm using two tables  1. vbsegd-bupla
                                    2. vbsegs-prctr
    here prctr+6(4) = bupla.
    "Bupla" length is 4
    SELECT belnr gjahr bukrs bupla sgtxt buzei FROM vbsegd INTO CORRESPONDING FIELDS OF TABLE it_vbsegd FOR ALL ENTRIES IN it_vbkpf
                                                                 WHERE belnr = it_vbkpf-belnr
                                                                   AND gjahr = it_vbkpf-gjahr
                                                                   AND bukrs = it_vbkpf-bukrs
                                                                   AND bupla IN s_prctr.  
    the above statement is not working as prctr and bupla lenths are different. here i want to use offset.
    SELECT belnr gjahr bukrs prctr sgtxt buzei FROM vbsegs INTO CORRESPONDING FIELDS OF TABLE it_vbsegs FOR ALL ENTRIES IN it_vbkpf
                                                                WHERE belnr = it_vbkpf-belnr
                                                                  AND gjahr = it_vbkpf-gjahr
                                                                  AND bukrs = it_vbkpf-bukrs
                                                                  AND prctr IN s_prctr.
    this is working as prctr and s_prctr lengths are equal.
    could anybody please help me out in this.
    Thanks in advance.
    regards
    satish

    Below code will work for you.
    SELECT-OPTIONS: s_prctr  FOR vbsegs-prctr OBLIGATORY.
    RANGES: s_bupla FOR vbsegd-bupla.
    s_bupla[] = s_prctr[].
    DELETE ADJACENT DUPLICATES FROM s_bupla.
    SELECT belnr gjahr bukrs bupla sgtxt buzei FROM vbsegd INTO CORRESPONDING FIELDS OF TABLE it_vbsegd FOR ALL ENTRIES IN it_vbkpf
                                                                  WHERE belnr = it_vbkpf-belnr
                                                                    AND gjahr = it_vbkpf-gjahr
                                                                    AND bukrs = it_vbkpf-bukrs
                                                                    AND bupla IN s_bupla.

  • How will i display the multiple select ids in the dashboard ?

    I have a form where there is a multiple select. When the form is submit, the ids for the multiple select is stored in the database as concatenate. For example, multiple select : 3,9,5,1.
    The ids of the multiple select is found in a table TABLE1 and the insertion is done in another table TABLE2.
    Now I have to display them in a dashboard.
    My question is how will i display the multiple select ids in the dashboard ?
    I have to do an innerjoin with TABLE1 to retrieve the names of the multiple select ids. I don't know how to do it because the column name for multiple select in TABLE2 is of type text and the column id in TABLE1 is of type int.
    Please help me solve this problem.
    Thanks in advance

    One general advice is, never store comma-delimited lists in the database. In fact, the reason is to avoid problems like the one you now face.
    The major suggestion here is to re-design your database. Make sure each selected item (for example 3, 9, 5 or 1) is stored in its own row.
    To solve the problem as it now stands, you could do something like
    <cfquery>
    select myItems
    from table2
    where id in (select id from table 1 where ...etc.)
    </cfquery>
    Then use ColdFusion's list functions to do what your dashboard requires you to do.

  • One search help for multiple select-options in webdynpro abap

    Hi,
    I need a way to use one search help for multiple select-options fields. My scenario is :
    I have a table for keeping different organizational units' values of different systems. I have pasted some sample data from this table at the end of this mail. On the screen I want to have 1 select-options filed for werks, and 1 select-options filed for vkorg. (In fact I will have more org. unit fields...) In the beginning of my application the user will select sid.
    If the user selects ADS as SID, when he opens search-help for the first org. unit (werks), he will see the records with SID: ADS, VARBL = $WERKS, LANGU = SY-LANGU.
    If the user selects AGT as SID, when he opens search-help for the second org. unit (vkorg), he will see the records with SID: AGT, VARBL = $VKORG, LANGU = SY-LANGU.
    I have created a search-help taking SIDD, VARBL and LANGU as import parameters; used field mapping and bound this search help to my table. I have created 2 context nodes : org1 and org2 having attributes SID, VARBL, VALUE, LANGU .
    I have assigned related SID, VARBL and Langu values to these attributes at runtime as I needed. That way, if I use input field and reference to the related context attributes org1-value and org2-value2 accordingly, search help works well as I want.
    However, when I use select-options field , I can not bind the field to the context data. I can give reference only to ddic structure. Is there any way to reference to a context attribute? I searched for this in SDN, but could find nothing.
    I think I won't be able to use this way. What do you say?
    As I read from forums maybe using OVS help will be suitable for me. But I have to use one search-help for all select-options fields. Do you know how I can determine the active select-options field and pass its name (for instance "werks" ) as parameter to this OVS search help. (Also I'll pass SID and LANGU.)
    MY TABLE (ZBYYT080) CONTENTS:
    SID     VARBL     VALUE     LANGU     VTEXT
    ADS     $WERKS     1     T     Werk 0001
    ADS     $WERKS     11     T     OZYAS  GIDA URETIM YERI
    ADS     $WERKS     5501     T     BOYA GEBZE FABRİKASI
    ADS     $WERKS     5502     T     BOYA CIGLI FABRİKASI
    AGT     $WERKS     2301     T     KAMLI DAMIZLIK
    AGT     $WERKS     9601     T     PANAR DENIZ URETIM YERI
    ADS     $VKORG     22     T     AA KİMYASALLAR
    ADS     $VKORG     8001     T     İINSAAT BOYALARI
    AGT     $VKORG     6500     T     DAMk St.Org
    AGT     $VKORG     5400     T     PANAR St.Org.
    I wish I'm clear enough..
    I will be gald if someone answers me as soon as possible...
    Thanks İn advance..
    MERAL

    Hi,
    Your ques is how to refer to a DDIC search help to refer to selection screen parameter ?
    Am I right ?
    If Yes, then in the interface IF_WD_SELECT_OPTIONS
    method ADD_SELECTION_FIELD, ADD_PARAMETER_FIELD etc
    have importing param like I_VALUE_HELP_TYPE and  I_VALUE_HELP_ID, I_VALUE_HELP_MODE, I_VALUE_HELP_STRUCTURE
    etc which may help you to link your create DDIC Search help to selection screen params.
    this is just a clue from my side. I haven't tried it myself.
    You can go to the where used list of this method and find some sample implementations which use these params.
    Hope this helps.
    Regards
    Manas Dua

  • How to use i for if condition in a for i in loop?

    Hi friends,
    I have a question on how to use i for IF condition in a loop, in order to get an efficient programming and results. Here is outlined SQL:
    cursor is
    select c1,c2,c3 from table1; -- 100 rows returned.
    open cursor
    loop
    fetch c1,c2,c3 into v1,v2,v3;
    for i in 1..3 loop
    if 'v'||i between 90 and 100 then
    v_grade := 'Excellent';
    elsif 'v'||i between 80 and 89 then
    elsif 'v'||i between 50 and 59 then
    end if;
    end loop;
    close cursor;
    This way, I don't need to use a lot of if..then for hard code v1,v2,v3,.... actually I have more v..
    But Oracle gave an error of this usage of 'if 'v'||i' or 'v'||to_char(i).
    Thanks for any advice in advance!

    user508774 wrote:
    Thanks for comments and advices. But I didn't get your inputs clearly. Are you saying I don't need to use PL/SQL to achieve this?Correct. Ronel and John showed you the basic approaches. SQL is not a mere I/O language for making read and write calls. It is a very capable, flexible and powerful language. One can solve a problem with a few lines of SQL code, that will take 100's of lines of PL/SQL or Java code.
    So do not underestimate what can be done in SQL.
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    EXECUTE IMMEDIATE v_cmd;This code is also wrong. Besides the fact that there is no need for dynamic SQL, this approach creates a brand new SQL statement each loop iteration.
    SQL is source code. It needs to be parsed (compiled). The end result is an executable program that is called a cursor. This cursor needs to be stored in server memory (the SQL Shared Pool in the SGA).
    The problem with your code is that it is slow and expensive - it generates lots of unique SQL statements that need CPU for parsing and server memory for storage.
    These add up to a very significant performance overhead. That is the wrong approach. The correct approach is the same one that you would use in any other programming language.
    Let's say you need to use Java to process a bunch of CSV files - exact same CSV layout used by each file. A file needs to be read, processed, and a log file created.
    Will you write a Java program that loops through the files, for each file found, write a Java program for processing that file, compile it, then execute it?
    Or would you write a Java program that takes the name of the file as input, and then process that file and writes the log file?
    The 2nd approach provides a program that can process any of those CSV files - one simply needs to pass the filename as an input parameter.
    Your code and approach use the 1st method. Not the 2nd. And that is why it is wrong.
    To create a SQL program with parameters is done by using bind variables. Instead of
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    The following SQL source code should be created:
    v_cmd := 'UPDATE parts_categ_counts SET w1=:v1, w2=:v2 ..., w9=:v9 WHERE seq= :vseq';
    The tokens with the colon prefix (such as :v1), are bind variables. Think of these as the parameters to the SQL cursor.
    The server parses this SQL into a cursor. You can now execute the same cursor over and over again, using different bind variables. (just like the 2nd approach above that one would use in Java)
    In PL/SQL, this is made even easier as you can code native SQL code with PL/SQL code and use PL/SQL variables in it. The PL/SQL compiler is clever enough to do the SQL parsing, variable binding, and cursor execution for you. So in PL/SQL, you would use:
    UPDATE parts_categ_counts SET w1=v1, w2=v2 ..., w9=v9 WHERE seq= vseq;
    Where v1 and the others are PL/SQL variables.
    That all said - PL/SQL is only used for data crunching, when the processing of data is too complex for the SQL language to deal with. And this is very seldom the case.
    The main reason for using PL/SQL it to provide processing flow control, conditional processing and error handling, for SQL code. As the SQL language does not have these features.

  • Routine for multiple selection in infopackage???

    hello guys
    I thought of creating one routine for Multiple selections aT Infopackage level....in Selections screen in infopackage,I found one option 'Use Conversion routine' with a check box and it is inactive.....Is it here I need to write my routine inorder to get multiple selection for a infoobject....or is it somehwhere else?How to activate thisoption?
    Thanks,
    Regards,
    S

    Hi,
    Conversion routines are used in the BI system so that the characteristic values (key) of an InfoObject can be displayed or used in a different format to how they are stored in the database. They can also be stored in the database in a different format to how they are in their original form, and supposedly different values can be consolidated into one.
    This will be there at info object level.
    Eg : ALPHA: Fills purely numeric fields from the left with zeroes (0).
    For multiple selections at info package , in data selection tab under type , u need to select 6 and write the code to select the value.When info package runs it takes the value from routine dynamically and extracts the data based on selection.
    Eg: There is a field FISCAL PERIOD For data selection, if u write the code to select current fiscal period. then whenever info package runs it extracts the data for current fiscal period from data source to PSA.
    Thanks,
    Joseph.

  • Using iTunes For Multiple iPod's

    Hey,
    Anyone know how to use iTunes for two iPod's without the songs being erased and all that ...kind of like having two seperate library folders.
    Thanks In Advance,

    Well there are two way to go about this.
    Number 1. Having seperate windows accounts, with iTunes on both, will give you seperate libraries.
    Number 2. Set both iPods to update Automatically but to only the playlists you select. This will keep your playlists on it and whatever you don't want on there off. Same goes for the other iPod.
    I myself use the number 2 option for my iPod Video and my Moms Nano. The only thind you got to remember, if you plan on updating or if you added new music and want it on your iPod, is to select the new playlist you made. This options works great

Maybe you are looking for

  • IPhone 5S cannot make purchase with App Store (login issue)

    Ok - I am rather irritated.  I tried to purchase a 99 cent app, and upon tapping the purchase button, the App Store insisted that I enter my Apple ID password (what happened to using your fingerprint, which worked when I bought the phone?).  Ok - so

  • How do I make Photoshop the default in Dreamweaver

    Hi, PhotoImpact is currently my default program in Dreamweaver CS6. I want to change the default to PhotoShop. I used Associated type or protocol to change from PhotoImpact to PhotoShop, but when I click on a jpg file in Dreamweaver, PhotoImpact stil

  • Haven't seen definitive answer... Hyperlinks don't work

    I am using iWeb 08 and I have created a links page (http://web.mac.com/a_arredondo/HarmonicesGaudi/Links.html) and for the life of me I can't get the links to work. They work just fine in iWeb but not on the published site. The underlined titles are

  • For all you old Mac Users

    Remember INITS? Small wonderful applications that you could install and just do about anything with. Though I am a obvious now a OS. X user I need a INIT type application. I am looking for a good, old fashioned Monitor/Display Utility, to simply adgu

  • Adding audio to movie

    Not sure if i am doing it right but it seems to me there is a lack of control with Lions version of iMovie.Previoulsy with Tiger it was easy for me to add soe  itines audio precisely where I wanted it which was normally at the end of any movie I made