Skip to Content
0
Former Member
Jan 20, 2006 at 04:16 PM

how to reduce the code while passing.

14 Views

hi,

I am passing the below statemnt to pass the field name and description to the sub_fieldcat.

since the report has got 100 fields i need to write for all the 100 fields like this, is there any possiblity to pass the field name and the description with less coding

PERFORM SUB_FIELDCAT USING '' 'BUDAT' 'Posting Date' G_COL 'X'.

ADD 1 TO G_COL.

.

.

.

.

FORM SUB_FIELDCAT USING L_TABNAME TYPE SLIS_TABNAME

L_FNAME TYPE SLIS_FIELDNAME

L_SEL TYPE DD03P-SCRTEXT_L

L_COL TYPE I

L_KEY TYPE C.

I_FIELDCATTAB_WA-REF_TABNAME = L_TABNAME.

I_FIELDCATTAB_WA-FIELDNAME = L_FNAME.

I_FIELDCATTAB_WA-SELTEXT_L = L_SEL.

I_FIELDCATTAB_WA-COL_POS = L_COL.

I_FIELDCATTAB_WA-KEY = L_KEY.

APPEND I_FIELDCATTAB_WA TO I_FIELDCATTAB.

ENDFORM. " SUB_FIELDCAT