Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8937

Re: Alv OO program error Message no. 0K534

$
0
0

Hi,

 

I don't know whether you require the custom container. Try the below code(I have removed the custom container section) and see if the error persists:

 

DATA: gr_data     Type Ref To DATA.
          DATA: la_data     Type Ref To data.
          FIELD-SYMBOLS: <gt_data> TYPE STANDARD TABLE.

 

my Full source code.

 

me->get_data( CHANGING c_data = <f_tab> ).

 


METHOD get_data.

       GET REFERENCE OF c_data INTO la_data.
       move la_data TO gr_data. " pass to global variable


        assign gr_data->* to <gt_data>.

         if table is not bound.
            try.
                "// Create ALV Instance
                cl_salv_table=>factory(
                  importing
                    r_salv_table   table
                  changing
                    t_table        = <gt_data>
                 ).
              catch cx_salv_msg.                              "#EC NO_HANDLER
            endtry.

           "// Setup ALV Attributes
           functions = table->get_functions( ).
           functions->set_all( abap_true ).

           columns = table->get_columns( ).
           columns->set_optimize( abap_true ).

           try.
               column = columns->get_column( 'MANDT' ).
               column->set_technical( if_salv_c_bool_sap=>true ).
             catch cx_salv_not_found.                        "#EC NO_HANDLER
           endtry.
           "// Dispalay ALV Model
           table->display( ).

         else.
           table->refresh( ).
         endif.

 

ENDMETHOD

 

If you want to use a custom container, u need to create a screen(say 9000 in SE51) for your program and create the custom container in it. U need to call this screen in your program for the ALV output. You can use PBO and PAI of the created screen for ALV display and coding user command section.


Viewing all articles
Browse latest Browse all 8937

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>