Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

To Display fixed values instead of Short Description in ABAP Webdynpro

I am using knb1 table - ktzlf field( DropDownByKey ). My requirement is to get the fixed values, but am getting short description. How to resolve it???

Eg:

fixed values                                   short description

     A                                                  partially delivered

     B                                                  delivered    

     C                                                  not delivered

     SPACE                                        processing

Thanks in Advance.

Tags:
Former Member replied

Hi,

You can use the following code.

     DATA lo_nd_<node>                     TYPE REF TO if_wd_context_node.
    DATA lo_nd_<node>_info              TYPE REF TO if_wd_context_node_info.
    DATA lt_values                               TYPE wdr_context_attr_value_list.
    DATA lw_values                             TYPE wdr_context_attr_value.

        lw_values-text   =  'A'.
        lw_values-value =  'A'.

        APPEND lw_values TO lt_values.
        CLEAR lw_values.

        lw_values-text   =  'B'.
        lw_values-value =  'B'.

        APPEND lw_values TO lt_values.
        CLEAR lw_values.

         lw_values-text   =  'C'.
        lw_values-value =  'C'.

        APPEND lw_values TO lt_values.
        CLEAR lw_values.

        APPEND INTIAL LINE TO LT_VALUES . " For Blank = Processing

         SORT lt_values AS TEXT.

      lo_nd_<node>_info->set_attribute_value_set(
        EXPORTING
          name      =    " Web Dynpro: Name of Context Element
          value_set =  lt_values   " All Fixed Values of an Attribute with Texts
      ).

Hope it will be useful to you.Else pls revert.

Thanks

KH

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question