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

Similar Messages

  • List box for the select-options

    Hi All
      Can anyone send me a sample code to create a list-box for the select-options.

    Hi vighnesh vasudevan,
    Do like this for your select options for low and high also.
    Parameters:
        p_quat  TYPE char20
                AS LISTBOX VISIBLE LENGTH 30
                LOWER CASE OBLIGATORY.
    *              AT SELECTION-SCREEN ON VALUE-REQUEST                    *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_quat.
      PERFORM fill_quarters.
      PERFORM display_quarters.
    *&      Form  fill_quarters
    *       text
    FORM fill_quarters .
      DATA:
    * Field string to fill quarters in the year
        lfs_quarters TYPE LINE OF vrm_values.
      REFRESH t_quarters.
      lfs_quarters-key  = '1'.
      lfs_quarters-text = text-qu1.
      APPEND lfs_quarters TO t_quarters.
      lfs_quarters-key  = '2'.
      lfs_quarters-text = text-qu2.
      APPEND lfs_quarters TO t_quarters.
      lfs_quarters-key  = '3'.
      lfs_quarters-text = text-qu3.
      APPEND lfs_quarters TO t_quarters.
      lfs_quarters-key  = '4'.
      lfs_quarters-text = text-qu4.
      APPEND lfs_quarters TO t_quarters.
    ENDFORM.                    " fill_quarters
    *&      Form  display_quarters
    *       text
    FORM display_quarters .
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'P_QUAT'
          values          = t_quarters[]
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      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.                    " display_quarters
    Note: I think we are not able to display the list box for select options because i am not ever seen the list box in select options . No Probs try like above code.
    See the following like it may help for you
    Listbox for Select Options
    Regards,
    Mahi.

  • Multiple selection of rows in alv output list

    experts,
    using 'REUSE_ALV_GRID_DISPLAY'
    the following is the sample code ,without using ctrl or shift key i am unable to select multiple rows .
    any resolvable answers.
    REPORT zpushbutton1.
    type-pools : slis.
    *structure declarations
    types : begin of ty_mara,
    matnr type matnr,
    ernam type ernam,
    mbrsh type mbrsh,
    CHKBOX TYPE CHAR1,
    end oF ty_mara.
    types : begin of ty_marc,
    matnr type matnr,
    werks type werks_d,
    pstat type pstat_d,
    end of ty_marc.
    *internal table declarations
    DATA : gi_mara TYPE STANDARD TABLE OF TY_MARA INITIAL SIZE 0.
    data : gi_fieldcat type slis_t_fieldcat_alv.
    *workarea declarations
    DATA : gs_mara TYPE TY_MARA,
    gs_fieldcat type slis_fieldcat_alv.
    SELECT matnr
    ernam
    mbrsh
    FROM mara
    INTO TABLE gi_mara
    UP TO 10 ROWS.
    perform build_fieldcat using :
    '1' 'CHKBOX' 'GI_MARA' 'SELECT' 'X' ,
    '2' 'MATNR' 'GI_MARA' 'MATEIRALNO' ' ',
    '3' 'ERNAM' 'GI_MARA' 'PERSON CREAT' ' ',
    '4' 'MBRSH' 'GI_MARA' 'INDUSTRY' ' '.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IT_FIELDCAT = GI_FIELDCAT
    TABLES
    t_outtab = GI_MARA
    *& Form BUILD_FIELDCAT
    form BUILD_FIELDCAT using
    PCOL TYPE CHAR2
    PFLDNAME TYPE CHAR10
    PTABNAME TYPE CHAR10
    PSELTEXT TYPE CHAR15
    PINPUT TYPE CHAR1.
    GS_FIELDCAT-COL_POS = PCOL.
    GS_FIELDCAT-FIELDNAME = PFLDNAME.
    GS_FIELDCAT-TABNAME = PTABNAME.
    GS_FIELDCAT-SELTEXT_M = PSELTEXT.
    GS_FIELDCAT-EDIT = PINPUT.
    APPEND GS_FIELDCAT TO GI_FIELDCAT.
    CLEAR GS_FIELDCAT.
    endform. " BUILD_FIELDCAT
    thanks and regards

    experts,
    can we set cursor properties during the output display
    ex : i have used function module reuse_alv_grid_display to display a list of records with passing parameter
    is_layout-box_fieldname and is_layout-box_tabname to list the first column as pushbutton.
    when i select a row ,gets selected now when i move the
    cursor (mouse) to the other row and select the row, the row previously selected will be deselected.
      solution to the above problem is to hold the ctrl or shift key for
    multiple selections.
    is there any other alternative procedure so that without holding
    ctrl or shift key multiple rows get selected.
    thks and rgrds

  • Select  mutiple rows in ALV report output

    Hi All,
    I want to select the Multiple records i in ALV report output with out holding the CNTL(Control Key).
    Is there any options in Layout?
    Please let me know
    regards,
    Ajay
    Edited by: Ajay reddy on May 30, 2010 3:27 PM

    Hi Ajay,
    To select several rows without Control button, if the rows are adjacent:
    - select the first and the last of the desired rows with Shift button pressed
    or
    - select a row, keep the mouse button pressed, and pass over the desired rows
    I don't know an option without Control if the rows are not adjacent.
    http://help.sap.com/saphelp_bw/helpdata/en/d1/7d9d37664e4d45e10000009b38f8cf/content.htm
    Regards,
    Paulo Carvalho

  • How to create the list box in the selection screen.

    hai friends..
    i want to create the list box for the selection screen input boxes.
    thanks,
    velu.

    hi..
    1. There are two important things :
    a)PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    b) Fm VRM_SET_VALUES
    2. just copy paste
    3.
    REPORT abc.
    TYPE-POOLS : vrm.
    DATA : v TYPE vrm_values.
    DATA : vw LIKE LINE OF v.
    PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
    vw-key = '1'.
    vw-text = 'Jan'.
    APPEND vw TO v.
    vw-key = '2'.
    vw-text = 'Feb'.
    APPEND vw TO v.
    vw-key = '3'.
    vw-text = 'Mar'.
    APPEND vw TO v.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'A'
    values = v
    EXCEPTIONS
    id_illegal_name = 1
    OTHERS = 2.
    regards,
    veeresh

  • "Dynamic List Box with Single Selection" Survey Suite in CRM 6.0

    Hi
    I am using CRM 6.0. There in Survey Suite there are 2 answering options "Dynamic List Box with Single Selection" & "Dynamic List Box with Multiple Selection". I am able to make out, how we can assign values to this. I have seen example "Example_Dynamic_survey" also.
    I believe we have to use programming for populating this. But how do we have to carry that out.
    Thanx and Regards
    Hitesh

    Hi Hitesh,
    There is no need of programming for populating values for Answer category 'List Box with Single Selection' or 'List Box with Multiple Selection'. You have to follow the following steps to populate values for those:
    - In the Answer Category select List Box with Single Selection from drop down list
    - Then on left hand side tree, right click on Answer and select Insert Answer Option (Answer->Insert Answer Option)
    - Then on right side, provide Text for the answer (value)
    - To add more values, repeat the process Answer->Insert Answer Option and providing text for those answers in the right side.
    Similarly you can populate values for 'List Box with Multiple Selection' also.
    This has to be done in the transaction CRM_SURVEY_SUITE.
    Hope this is clear to you
    regards
    Srikantan

  • How to move up the List Box for para. values in the "Edit Values" window?

    Hi,
    I am using Crystal Reprots 11.
    I create 10 subreports, and each subreport contains a Parameters Field.
    The 10 subreports are put in 10 footer sections in increasing order, i.e. subreport1, subreport2, subreport3, ..., subreport10.
    When I use "Print Preview" to take a look at the whole report, CR prompts a "Edit Values" window for selecting parameter values.
    Maybe because I created subreport3 & subreport4 after I completed other subreports, the List Box with the values required to select for subreport3 & subreport4 were located at the bottom of the "Edit Values" window.
    How to move List Box with the values required to select for subreport3 & subreport4 up to the proper location (based on the order of subreports) in the "Edit Values" window?
    Thank you in adavance.

    Hi,
    Yes, that is true. The subreport parameters are prompted in the order you insert the subreport.
    The only way to fix this is to save subreports from 5 through 10 (Right-click subreport > select Save Subreport as) first.
    So, now all you have is Subreports 1, 2 and 3. Go ahead and add the Subreports from 5 to 10 in order and the prompts should be in order too.
    -Abhilash

  • 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 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

  • 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

  • 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.

  • Add List box for one field in ALV GRID

    Hi All,
      I need to add drop down list box for one field in ALV Grid.
      If any body knows, please help.
    Thanks in advance.
    Regards
    Manglesh

    Hi,
    Here is the ex where i have used for date parameter in the sel screen
    type-pools: vrm.
    data: name type vrm_id,
          list type vrm_values,
          value like line of list.
    parameters :    p_date like p_date2
                                  as listbox visible length 15.
    at selection-screen output.
      name = 'P_DATE'.
      value-key = '1'.
      value-text = 'Today'.
      append value to list.
      value-key = '2'.
      value-text = 'Last 7 days'.
      append value to list.
      value-key = '3'.
      value-text = 'Last 30 days'.
      append value to list.
      value-key = '4'.
      value-text = 'Last 90 days'.
      append value to list.
      value-key = '5'.
      value-text = 'Last year'.
      append value to list.
    Call the ''VRM_SET_VALUES' to display the values in Listbox
      call function 'VRM_SET_VALUES'
        exporting
          id     = name
          values = list.
    at selection-screen.
      if sy-ucomm = 'CLI1'.
        sscrfields-ucomm = 'ONLI'(001).
      endif.
      if p_date = '1'.
        p_date11 =  sy-datum .
      elseif p_date = '2'.
        p_date11 = ( sy-datum - 7 ).
      elseif p_date = '3'.
        p_date11 = ( sy-datum - 30 ).
      elseif p_date = '4'.
        p_date11 = ( sy-datum - 90 ).
      elseif p_date = '5'.
        p_date11 = ( sy-datum - 365 ).
      endif.
    Hope this helps u..
    Please reward points if useful.
    Regards,
    Sreenivas

  • How do I import or move multiple selected photos to an existing album in iPhoto 9.6? In previous versions I could select and drag multiple photos into an album. Now I can only move one photo at a time. Help!

    How do I import or move multiple selected photos to an existing album in iPhoto 9.6? In previous versions I could select and drag multiple photos into an album. Now I can only move one photo at a time. Help!

    Try this general troubleshooting procedure:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home/Library/ Preferences folder.
    2 - delete the contents the following folder: User/Library/Containers/com.apple.iPhoto
    3 - reboot, launch iPhoto and try again.
    NOTE: For Mavericks and Yosemite,  go to your Home folder and use the View ➙ Show View Options menu to bring the this window:
    where you can check the Show Library Folder checkbox.

  • How to populate list box in module pool program

    How to populate list box in module pool program.
    Please give me reply as soon as posible
    regards,
    Venu.

    hi,
    go thrugh the folling code .
    TABLES sdyn_conn.
    DATA   ok_code TYPE sy-ucomm.
    Global data
    TYPES: BEGIN OF type_carrid,
             carrid type spfli-carrid,
             carrname type scarr-carrname,
           END OF type_carrid.
    DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.
    *& Processing Blocks called by the Runtime Environment                 *
    Event Block START-OF-SELECTION
    START-OF-SELECTION.
      CALL SCREEN 100.
    Dialog Module PBO
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    Dialog Modules PAI
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    Dialog Module POV
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    the following code should be included in flow logic of screen
    process on value-request.
      field scarr-carrname  module create_dropdown_box.
    in module pool select list box.
    hope it is useful.
    regards,
    sreelakshmi.

  • Index of Values in the List Boxes on a Selection Screen

    Hi,
    I have a list box on the selection screen for Month field. It has the values Jan, Feb, Mar....etc in it.
    These entries, I added thru the VRM_SET_VALUES.
    Now, I want to default the month to current month SY-DATUM+4(2).
    Is there any FM to which I can send this SY-DATUM+4(2) as an Index and the corresponding value gets set for the Month field.
    As an alternatvie, I could use<b> Case Sy-DATUM+4(2). when '01'. p_month = 'Jan'.  etc etc..</b> But I want to avoid this big case statement.
    Please suggest.
    Thanks,
    Suryakiran D.

    Hi Suryakiran,
      Try to use the func <b>MONTH_NAMES_GET</b>.It will
      return the month name along with the number.
      And also you can directly select from table <b>T247</b>
    Thanks&Regards,
    Siri.
    Message was edited by: Srilatha T

Maybe you are looking for

  • Photoshop CC Crashing (Mac)

    Got a new Mac and installed Creative Cloud and Photoshop CC. When I go to open PS, it crashes about 3 seconds in. I have signed out of CC and back in. I have validated all fonts through font book, removing those with errors. Process:     Adobe Photos

  • This Thing is a Frustrating Piece of Garbage...

    ...and Apple's user manual isn't a whole lot of help. So now that I've got your attention, I hope I can get some help. I bought an iPod Nano as my first mp3 player because of Apple's reputation for intuitive and kluge-free operation, but so far this

  • Is there a way to automatically shut down laptop when power button pressed?

    Of all the things I am having to struggle through a learning curve on MacOS (converted from Windows), this might seem like a rather benign concern, but I'm going to ask anyway. . . I would like for my laptop to automatically go through a shutdown pro

  • Hosting Zenworks 7 Application Files On Windows Server?

    Hi, Background: We currently host our Zenworks packages on Netware 6.5 servers. Our Zen7 is also installed on a Netware 6.5 server so we are running Novell Client 4.91 SP2 and the Zenworks agent on our Windows XP SP3 desktops (no middle tier). We are

  • Error -5000 and: Error when loading the transcode setting

    For a couple of days I've been trying to export my project on a DVD, but on the half way of the transcoding it comes the Error -5000, and then there is such a message, something about the navigation, can't be found etc... I work on a mac OS X, using