Académique Documents
Professionnel Documents
Culture Documents
Naimesh Patel Apr 22, 2009 9:56 PM (in response to Dean Atteberry)
In SALV model, system creates the Field cataloge automatically based on the structure of the table. Yes, you need to
get the COLUMNS objects to be able to work with it.
lo_cols = me->wo_salv->get_columns( ).
* modify individual properties
DATA: lo_column
TRY.
lo_column = lo_cols->get_column( 'AVAILDATE' ).
lo_column->set_long_text( 'Avl Date' ).
"#EC NOTEXT
"#EC NOTEXT
"#EC NOTEXT
lo_column->set_output_length( 10 ).
CATCH cx_salv_not_found.
"#EC NO_HANDLER
ENDTRY.
Explore class CL_SALV_COLUMN for different methods to change the properties of the column.
Regards,
Naimesh Patel
http://zevolving.com/tag/salv-table/page/2/
http://zevolving.com/2008/09/salv-table-1-normal-alv-table-display/
wiki:
http://wiki.scn.sap.com/wiki/display/ABAP/ALV+Grid+Report++with+Object+Oriented+SALV+Classes
multiple header lines:
http://scn.sap.com/thread/1588852
Sravanthi Veeramachaneni Jan 25, 2010 11:28 AM (in response to Dan K.)
Hi,
DATA : obj_header
TRY.
CATCH cx_salv_error.
ENDTRY.
obj_header->create_label(
row
=1
column = 1
text
= 'Test line1' ).
obj_header->create_label(
row
=2
column = 1
text
= 'Test line2').
obj_output->set_top_of_list( obj_header ).
Display Table
obj_output->display( ).
Regards,
Sravanthi.V
Report Abuse
Like (0)
Reply
Report Abuse
Like (0)
Reply
= 1
).
document->add_text(
EXPORTING
text
sap_fontsize
= 'Large'
sap_color
= cl_dd_area=>list_key_int
).
CALL METHOD document->new_line.
document->add_gap(
width
= 4
).
document->add_text(
EXPORTING
text
= 'Report:
sap_fontsize
= 'Medium'
).
ZFRS6596'
= 4
).
document->add_text(
EXPORTING
text
= 'Date:'
sap_fontsize
= 'Medium'
).
CONCATENATE sy-datum+4(2) ' / ' sy-datum+6(2) ' / ' sy-datum(4)
into dl_text separated by cl_abap_char_utilities=>horizontal_tab.
call method document->add_text
exporting
text
= dl_text.
Vijay Dudla Aug 14, 2008 2:34 PM (in response to Praneet sai)
Using the Gird Functions it is not possible, you can get the with the help of ALV list function.
If you use this aproach you will loose some Functionalities, Your Report Output will Distorted.
cehck this image..
http://img100.imageshack.us/img100/3846/output6ef.th.gif
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'MALE'.
X_FIELDCAT-SELTEXT_L = 'MALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'FEMALE'.
X_FIELDCAT-SELTEXT_L = 'FEMALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
SY-VLINE,
(8) 'POSNR'(014) ,
SY-VLINE,
(8) 'MALE'(016) ,
sy-vline,
(8) 'FMALE'(017) ,
sy-vline.
FORMAT COLOR OFF.
ENDFORM.