Add a drop-down box to the ALV interface

Source: Internet
Author: User

1. Set the form properties in the ALV interface

If Wa_fieldcat-fieldname =  ' Yc_mark '              wa_fieldcat -edit =  ' X '              wa_fieldcat -drdn_field =  ' Dd_handle '              wa_fieldcat -drdn_hndl =  ' 1 '         endif

2. Assign a value to the drop-down box

Lth_list-handle=' 1 '.
Lth_list-value =  ' N '  < Span class= "L0S55".
  append lth_list to td_list   clear lth_list   lth_list-handle =  ' 1 '  < Span class= "L0S55".
  lth_list-value =  ' Y '   append lth_list to td_list   clear lth_list

3. Set It_events

Data: lt_eventTypeTableof Slis_alv_event,
Lw_eventType Slis_alv_event.

Perform Alv_fieldcat.

It_layout-cwidth_opt=X.
It_layout-box_fname=' SEL '.


Lw_event-name=' Caller_exit '.
Lw_event-Form=' Set_list '.
Append lw_eventTo Lt_event.


Pagerfunction' REUSE_ALV_GRID_DISPLAY_LVC '
Exporting
I_callback_program= Sy-repid
I_callback_pf_status_set=' Pf_status '
I_callback_user_command=' User_command '
Is_layout_lvc= It_layout
It_fieldcat_lvc= It_fieldcat
It_events= Lt_event
tables
T_outtab = Gt_excel
exceptions
Program_error = 1
others = 2.

< Span class= "L0S70" > < Span class= "l0s52" > < Span class= "L0S55" > 4. Assign a drop-down box to the ALV interface field

 

   call function  GET_GLOBALS_FROM_ Slvc_fullscr '
    importing
       E_grid               = lw_grid

     call method lw_grid< Span class= "L0S70" >->set_drop_down_table
          < Span class= "l0s52" >exporting

      IT_DROP_DOWN        = td_list

Add a drop-down box to the ALV interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.