Skip to Content
0
Former Member
Feb 28, 2006 at 10:32 AM

col_pos in alv not do the job , why ?

285 Views

i write dynamic alv and i want to set the columns order ,

so i add code like this :

READ TABLE IT_PERIOD_ZFBDT WITH KEY MONTH_BEGIN = '10' .

LS_FCAT-COL_POS = IT_PERIOD_ZFBDT-COL_POS + 3.

CONCATENATE

IT_PERIOD_ZFBDT-YEAR

'_'

IT_PERIOD_ZFBDT-MONTH_BEGIN

'_'

IT_PERIOD_ZFBDT-MONTH_END

INTO FIELD .

LS_FCAT-COLTEXT = FIELD . "

  • LS_FCAT-COLTEXT = TEXT-007 .

CLEAR LS_FCAT-REF_TABLE.

LS_FCAT-INTTYPE = 'P' .

LS_FCAT-DATATYPE = 'QUAN'.

LS_FCAT-DO_SUM = 'X'.

LS_FCAT-TABNAME = 'IT_AGENT_BLNCE'.

LS_FCAT-FIELDNAME = 'PERIOD_10_12'.

LS_FCAT-REF_FIELD = 'PERIOD_10_12'.

MODIFY IT_COLUM_HEADER FROM LS_FCAT.

---

still , the order when the report display is not the

order that i build by COL_POS

thanks .