Skip to Content
0
Former Member
Jun 17, 2008 at 10:30 AM

In table maintance to save date and time.

10 Views

Hi,

I am trying to write a code in table maintenance for updating date, time and user id.

I have created a z include and written a below code which i got from help document. Thid code i have implemented in maintenance event 01. When i checked the code system is showing declare total. Where shall i declare this. Is this code is correct.

FORM abc.

DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found

LOOP AT TOTAL.

IF <ACTION> = desired constant.

READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.

IF SY-SUBRC EQ 0.

F_INDEX = SY-TABIX.

ELSE.

CLEAR F_INDX.

ENDIF.

(make desired changes to the line TOTAL)

MODIFY TOTAL.

CHECK F_INDX GT 0.

EXTRACT = TOTAL.

MODIFY EXTRACT INDEX F_INDX.

ENDIF.

ENDLOOP.

SY-SUBRC = 0.

ENDFORM.

Please any one suggest on this.

Thanks in advance,

Ravi