‎2009 Oct 14 8:03 PM
Hi Gurus , i need help with something , i'm trying to put my ALV reporte aling to the rigth , normally it apearce align to the left but i need to put it to the left , just like a table in Word , hope you can help me.
‎2009 Oct 15 5:45 AM
‎2009 Oct 15 3:00 PM
i'm using one of the suggesttions , i'm using this method
CALL METHOD my_control->set_alignment
but now i don't know hoy should i declared my_control , first i declared cl_gui_alv_grid but it didn't work , how should i declared , i think it can be layout but it says is an error , what should i do ?
‎2009 Oct 15 5:53 AM
Hi,
For aligning ALV to the right,
See this sample Code below:
DATA : IT_FIELD TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELD TYPE SLIS_FIELDCAT_ALV.
DATA LV_COUNT TYPE I VALUE 0.
LV_COUNT = LV_COUNT + 1.
WA_FIELD-COL_POS = LV_COUNT.
WA_FIELD-FIELDNAME = 'MATNR'.
WA_FIELD-TABNAME = 'IT_FINAL'.
WA_FIELD-OUTPUTLEN = 10.
WA_FIELD-DDIC_OUTPUTLEN = 18.
WA_FIELD-REF_TABNAME = 'MARA'.
WA_FIELD-REF_FIELDNAME = 'MATNR'.
WA_FIELD-SELTEXT_L = 'MATERIAL NO'.
wa_field-JUST = 'R'. "<------- Add this for right alignment
APPEND WA_FIELD TO IT_FIELD.
CLEAR WA_FIELD.
Hope it helps
Regards
Mansi