Skip to Content
author's profile photo Former Member
Former Member

set field discreption in ALV display in wda

I am creating ALV report in this the field discretion is comming from data element but i wan to display my custom discretion in that can any body help me on this

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 01, 2009 at 08:39 AM

    HI

    Use the ALV header and set text method

    DATA: lr_column type ref to cl_salv_wd_column,
    lr_alv_header type ref to cl_salv_wd_column_header,
    lo_value type ref to cl_salv_wd_config_table.
    
    lr_column = lo_value->if_salv_wd_colmun_settings->get_column( 'COL1' ).
    
    CALL METHOD lr_column->get_header
              RECEIVING
                value = lr_alv_header.
            lr_alv_header->set_ddic_binding_field(
             if_salv_wd_c_ddic_binding=>ddic_bind_none ).
          lv_name = 'Flight name'.
           lr_alv_header->set_text( lv_name ).

    Regards,

    Lekha.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 01, 2009 at 09:48 AM
    DATA: l_column_settings TYPE REF TO if_salv_wd_column_settings.
      DATA: l_column_header  TYPE REF TO cl_salv_wd_column_header .
      DATA: lt_columns TYPE salv_wd_t_column_ref ,
            ls_columns TYPE salv_wd_s_column_ref .
    
    * Instantiate 
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
    
      lo_cmp_usage =   wd_this->wd_cpuse_usg_alv( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
    
    * Get Model
      DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
      lo_interfacecontroller =   wd_this->wd_cpifc_usg_alv( ).
    
      DATA lo_value TYPE REF TO cl_salv_wd_config_table.
      lo_value = lo_interfacecontroller->get_model(
      ).
    
    *---------- Column settings
      l_column_settings ?= lo_value.
    
    * Get columns
      lt_columns = l_column_settings->get_columns( ) . 
    
      LOOP AT lt_columns INTO ls_columns .
        CASE ls_columns-id   .
          WHEN 'COLUMN1'  .
            l_column_header = ls_columns-r_column->get_header( )  .
            l_column_header->set_ddic_binding_field(
               if_salv_wd_c_column_settings=>ddic_bind_none )  .
            l_column_header->set_text( 'Quanity' ) . " column heading
          WHEN 'COLUMN2'
             ......
         ENDCASE.
     ENDLOOP.

    Regards,

    Radhika.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2009 at 12:49 PM

    thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.