Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

REUSE_ALV_GRID_DISPLAY dropdown in one column

Former Member
0 Kudos

Hi Experts,

I need to create a drowndown in one of my column in my alv grid display using 'REUSE_ALV_GRID_DISPLAY'.

I have searched the requirement and I found this one.

So, I tried to use it but when I'm going to use an internal table as may reference table and fieldname it does not show a seach help.

Thanks.

here is my code:

DATA: BEGIN OF it_pumptyp OCCURS 0,

   hand TYPE i,

   type LIKE zpump_line-type,

   END OF it_pumptyp.


it_pumptyp-hand = '1'.

   it_pumptyp-type = 'Mobile'.

   APPEND it_pumptyp.

   it_pumptyp-hand = '2'.

   it_pumptyp-type = 'Stationary'.

   APPEND it_pumptyp.


PERFORM pf_write_fieldcat USING:

     'LINE'                  'IT_DATA'  'Line'                                         ' ' ''   '' '',

     'EQUNR'                 'IT_DATA'  'Equipment No.'                                ' ' 'X'  '' '',

     'TYPE'                  'IT_DATA'  'Pumpcrete Type'                               ' ' 'X'   'IT_PUMPTYP' 'TYPE',

     'STRC'                  'IT_DATA'  'Structure'                                    ' ' 'X'   '' '',

     'QPORD'                 'IT_DATA'  'Qty Poured'                                   ' ' 'X'   '' '',

     'UOM'                   'IT_DATA'  'UOM'                                          ' ' 'X'   '' '',

     'PRICE'                 'IT_DATA'  'Price                   .'                    ' ' ''   '' '',

     'TOTAL'                 'IT_DATA'  'Total                   .'                    ' ' ''   '' '',

     'RNOELB'                'IT_DATA'  'Required No. of Elbows'                       ' ' 'X'   '' '',

     'ANOELB'                'IT_DATA'  'Actual No. of Elbows'                         ' ' 'X'   '' '',

     'RNOPIP'                'IT_DATA'  'Required No. of Pipes'                        ' ' 'X'   '' '',

     'ANOPIP'                'IT_DATA'  'Actual No. of Pipes'                          ' ' 'X'   '' '',

     'OTHER'                 'IT_DATA'  'Other Charges'                                ' ' 'X'   'ZPUMP_LINE' 'OTHER',

     'TBA'                   'IT_DATA'  'Total Billed Amount'                          ' ' ''    '' '',

     'REMARKS'               'IT_DATA'  'Remarks                          .'           '30' 'X'  '' ''.

5 REPLIES 5

former_member183607
Contributor
0 Kudos

Hi,

     In order to get search field by default in alv , Give Reference tab & Reference Field of Standard Table.

0 Kudos

Hi,

Is there a way that I can create my own search help using an internal table?

Former Member
0 Kudos

Hi Jepoy

Use the standard FM  HELP_DOCULINES_SHOW

For testing this go to SE37--> and pass value into table HELPLINES (Tables Tab)

Pass TDFORMAT    AS

&      TDLINE           Testing for F1 Help

  

and execute


0 Kudos

Hi,

I tried this one and its for search help, I need to make it like a dropdown menu. wheneven i select a cell.

0 Kudos

Hi,

You can use the method g_grid->set_drop_down_table to assign the drop down option for the particular column. For Example.:

* drop down lists in ALV.
  DATA: lt_dropdown TYPE lvc_t_drop,
             ls_dropdown TYPE lvc_s_drop.

ls_dropdown-handle = '1'

ls_dropdown-value = 'Option1'

APPEND ls_dropdown TO lt_dropdown.

ls_dropdown-handle = '1'

ls_dropdown-value = 'Option2'

APPEND ls_dropdown TO lt_dropdown.

CALL METHOD g_grid->set_drop_down_table    

EXPORTING

      it_drop_down = lt_dropdown.

Please note : While defining the field catalog along with name and outputlen value pass the below for that column for which drop down is required.

ls_fcat-drdn_hndl = '1'

Please check out the structure LVC_S_FCAT --> DRDN_HNDL

Hope it helps.

Regards,

Akhila Bidare