Showing posts with label Table. Show all posts
Showing posts with label Table. Show all posts

Friday, March 16, 2012

In sm30 add description column which is not a table fields

In se80 function group:

# Declaration in top include.

data : gv_mat_DESC type string.

# Add one column in layout.:column Name gv_mat_DESC

# In PBO

inside loop add one module .: module get_desc.

module GET_DESC output.

IF zct_stage_prod-BY_PROD is not initial.
select single maktx into gv_mat_DESC
from makt client specified
where mandt = sy-mandt
and matnr = zct_stage_prod-BY_PROD.
ENDIF.
endmodule. " GET_DESC OUTPUT

Hide table control columns

module zhide_fields output.

data : ls_line like line of tctrl_ztps_rept_hdr-cols.
loop at tctrl_ztps_rept_hdr-cols into ls_line.
case sy-tabix.
when '8'.
ls_line-invisible = 1.
modify tctrl_ztps_rept_hdr-cols from ls_line.
when '9'.
ls_line-invisible = 1.
modify tctrl_ztps_rept_hdr-cols from ls_line.
when '10'.
ls_line-invisible = 1.
modify tctrl_ztps_rept_hdr-cols from ls_line.
endcase.
endloop.
endmodule.