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: 

Reg: Dropdown list box length in ALV

Former Member
0 Kudos

Hi All,

I'm getting dropdown list box length 128 char in ALV grid, this is standard length for all dropdown list box. I want this dropdown list box with size 20 char. I have declared that field with 20 char in the final internal table but in the output I'm getting 128 char. Also I treid putting output length in the field catalog. Can anybody tell me how to reduce that length to 20 char.

Regards,

Selva

1 ACCEPTED SOLUTION

SuhaSaha
Advisor
Advisor
0 Kudos

Did you check the sample program 'BCALV_EDIT_06' ?

8 REPLIES 8

SuhaSaha
Advisor
Advisor
0 Kudos

Did you check the sample program 'BCALV_EDIT_06' ?

Former Member
0 Kudos

Hi,

IN SLIS PACKAGE THERE ARE TWO PROGRAMS ON LIST BOX.

BCALV_EDIT_06

BCALV_EDIT_07

Regards and Best wishes.

0 Kudos

Yes , i checked these two programs but no use. These two reports give perfect output.

Regards,

Selva

0 Kudos

Can you post relevant parts of your code so that we can check ?

0 Kudos

Hi,

This is my code,

LOOP AT it_fieldcat INTO wa_fcat.

wa_fcat-just = 'C'.

IF wa_fcat-fieldname = 'SLOT'.

wa_fcat-edit = 'X'.

ELSEIF wa_fcat-fieldname = 'APPROVALSTATUS'.

wa_fcat-edit = 'X'.

wa_fcat-drdn_hndl = '1'.

wa_fcat-outputlen = 20.

ENDIF.

MODIFY it_fieldcat FROM wa_fcat.

ENDLOOP.

LOOP AT i_appr_text.

ls_dropdown-handle = '1'.

CONCATENATE i_appr_text-domvalue_l '-->' i_appr_text-ddtext

INTO v_appr.

ls_dropdown-value = v_appr.

APPEND ls_dropdown TO lt_dropdown.

ENDLOOP.

CALL METHOD g_grid->set_drop_down_table

EXPORTING

it_drop_down = lt_dropdown.

Regards

Selva

0 Kudos

How is the field v_appr defined? Is it CHAR20 ?

0 Kudos

Yes, You are right...

0 Kudos

Solved by own. there is field coloumn optimized width in the layout, I pass that field as Space. Now it is working