Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Align ALV

Former Member
0 Likes
544

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.

3 REPLIES 3
Read only

Former Member
0 Likes
512

Hi

Please search the SCN before you post .

[LINK1|http://help.sap.com/saphelp_nw04/helpdata/en/06/3fa1a89f2811d2bd68080009b4534c/frameset.htm]

[link2|;

regards

Read only

0 Likes
512

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 ?

Read only

Former Member
0 Likes
512

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