data lt_makt type standard table of makt.
data lo_salv type ref to cl_salv_table.
select * from makt into corresponding fields of table lt_makt
where matnr = iv_matnr.
try.
" setup SALV
cl_salv_table=>factory(
importing r_salv_table = lo_salv
changing t_table = lt_makt
).
" prepare SALV
lo_salv->get_functions( )->set_all( ). " activate toolbar
lo_salv->get_columns( )->get_column( 'MANDT' )->set_technical( ).
lo_salv->get_columns( )->get_column( 'SPRAS' )->set_output_length( 8 ).
lo_salv->get_columns( )->get_column( 'MAKTGX' )->set_visible( abap_false ).
lo_salv->get_sorts( )->add_sort( 'MATNR' ).
lo_salv->get_sorts( )->add_sort( 'SPRAS' ).
" Display SALV
lo_salv->display( ).
catch
cx_salv_msg
cx_salv_not_found
cx_salv_data_error
cx_salv_existing into data(lo_x).
message lo_x type 'E'.
endtry.
Subscribe to:
Post Comments (Atom)
SAP ABAP: Determine Timezone for Plant
DATA: lt_tzone TYPE STANDARD TABLE OF tznzone WITH DEFAULT KEY, l_tzone TYPE tznzone. " get time zone for plant ...
-
Sometimes the backend doesn't return the selected rows of an SALV. For my case get_metadata( ) was the solution: go_salv-> get_met...
-
GUIDs or UUIDs can be created with the class cl_system_uuid . try . data (lv_uuid) = cl_system_uuid => if_system_uuid_static...
-
AA PR-AUF(E) Prozessauftrag (eröffnet) AB PR-AUF(F) Prozessauftrag (freigegeben) AC FE...
No comments:
Post a Comment