Showing posts with label ALV. Show all posts
Showing posts with label ALV. Show all posts

Wednesday, March 20, 2013

ALV Color Coded


Below is color code for ALV. I'm using ALV OOO to generate this color.


  DATAlr_columns TYPE REF TO cl_salv_columns,
        lr_column  TYPE
 REF TO cl_salv_column_table.
*  Set Color
  
TRY.
      
DATAls_color TYPE lvc_s_colo.                      
      lr_column ?lr_columns
->get_column'DMBTR' ).
      ls_color
-col 4"greyblue_int
      ls_color-int 
1.
      ls_color-inv 
0.
      lr_column
->set_color( ls_color ).
    
CATCH cx_salv_not_found.                           
  ENDTRY.

Thursday, January 17, 2013

ALV Grid Object Oriented Example SAP




Below is the list of project or example given by SAP to using ALV Grid mostly coded in OO style


1. Key in SALV* for Factory Method ALV in SE38

OR

2. Key in BC*ALV in SE38.


SALV*

BC*ALV


Wednesday, September 26, 2012

Hide Specefic ALV Field at First Run


Below is the syntax to hide ALV field during  program run. This setting need to be applied at fieldcatalog level, user can view the field by used the layout setting.



ta_fieldcatalog-no_out 'X'.

Sunday, September 9, 2012

ALV total and sub total






  - To enable total and sub total in ALV Grid of the fieldcatalog should be in numerical format.

eg:


     valamt TYPE DECIMALS 2,"18.Value Amount
        amtpst TYPE DECIMALS 2,"19.Amt Posted
        sapostamt TYPE DECIMALS 5, "20.Amt Posted in SAP
  END OF ty_report.


  ta_fieldcatalog-fieldname 'AMTPST'.
  ta_fieldcatalog-seltext_l 'Amt Posted'.
  append ta_fieldcatalog to ta_fieldcatalog.
  clear ta_fieldcatalog.

  ta_fieldcatalog-fieldname 'SAPOSTAMT'.
  ta_fieldcatalog-seltext_l 'Amt Posted in SAP'.
  append ta_fieldcatalog to ta_fieldcatalog.
  clear ta_fieldcatalog.