2008 Jun 09 11:53 AM
Hi,
I have 12 programs and whenever i run any of the programs a ztable shoud be updated (created by me) with program name , rundate and no of times it is executed.
This functionality should be written in a separate fumction module.
so could any pls send me some sample code for this
Thanks in advance
Hi,
I have 12 programs and whenever i run any of the programs a ztable shoud be updated (created by me) with program name , rundate and no of times it is executed.
This functionality should be written in a separate fumction module.
so could any pls send me some sample code for this
Thanks in advance
2008 Jun 09 12:05 PM
Hi,
for reports you may use a user-exit.
Transaction code SMOD:
-> enhancement S38MREP1 -> Function module EXIT_SAPLSABE_010.
regards
Walter Habich
2008 Jun 09 12:31 PM
Hi,
CALL FUNCTION 'z_update_fm'.
EXPORTING
repid = v_repid
check for any entry in table ztab with repid.
IF sy-subrc NE 0. "entry does NOT exist in the table
wa_ztab-rundt = sy-datum.
wa_ztab-repid = v_repid. " prog name
wa_ztab-count = 1.
APPEND wa_ztab TO it_ztab.
CLEAR wa_ztab.
IF it_ztab[] IS NOT INITIAL.
INSERT ztab FROM TABLE it_ztab.
ENDIF.
ELSE.
UPDATE ztab SET rundt = sy-datum
AND count = wa_ztab-count + 1
WHERE repid = v_repid. " prog name
ENDIF.
regards,
teja.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |