2008 Jul 11 6:39 AM
Hi All,
I have one custom report. I want to execute that report automatically while execution of F110 transaction. Please tell me the way ...
Thanks in advance
Regards,
Venkat
Hi All,
I have one custom report. I want to execute that report automatically while execution of F110 transaction. Please tell me the way ...
Thanks in advance
Regards,
Venkat
2008 Jul 11 6:48 AM
Hi
Try this use function modules JOB_OPEN, JOB_CLOSE, and JOB_SUBMIT.
REPORT ZSAMPLE1.
DATA:
XDATE LIKE SY-DATUM, " report run date
XPERIV LIKE T001-PERIV, " Fiscal year variant
XPOPER LIKE T009B-POPER, " Posting period
XGJAHR LIKE BKPF-GJAHR, " fiscal year
XLASTDAYOFPERIOD LIKE SY-DATUM, " last date YYYYYMMDD of period
XLASTDAYTORUNRPT LIKE SY-DATUM. " last date of period to run rpt
XDATE = SY-DATUM. " base date
XPERIV = 'Z1'. " set your fiscal year variant !
determine fiscal period from a calendar date
CALL FUNCTION 'FI_PERIOD_DETERMINE'
EXPORTING
I_BUDAT = XDATE " base date to check
I_PERIV = XPERIV " Fiscal year variant
IMPORTING
E_GJAHR = XGJAHR " fiscal year
E_POPER = XPOPER " fiscal period
EXCEPTIONS
FISCAL_YEAR = 1
PERIOD = 2
PERIOD_VERSION = 3
POSTING_PERIOD = 4
SPECIAL_PERIOD = 5
VERSION = 6
POSTING_DATE = 7
OTHERS = 8.
get last calandar date in fiscal period
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
I_GJAHR = XGJAHR " fiscal year
I_PERIV = XPERIV " Fiscal year variant
I_POPER = XPOPER " fiscal period
IMPORTING
E_DATE = XLASTDAYOFPERIOD " last day in fiscal period
EXCEPTIONS
INPUT_FALSE = 1
T009_NOTFOUND = 2
T009B_NOTFOUND = 3
OTHERS = 4.
XLASTDAYTORUNRPT = XLASTDAYOFPERIOD - 6. " backup 1 week (7 days)
IF XLASTDAYTORUNRPT < XDATE.
WRITE: /1 ' OK to run report'.
ELSE.
WRITE: /1 ' Last week of period - do not run report'.
EXIT. " exit program without processing report
ENDIF.
Process logic
rest of report program goes here
START-OF-SELECTION.
*
END-OF-SELECTION.
this code might give you an idea...
Regards
Divya
2008 Jul 11 7:03 AM
BTE There are some events manageable in FIBF related to transaction F110 and automatic payment transactions like 00001810, 00001025, 00001030, 00001120 and 00001130.
Forms There are also Customizing for F110 call SPRO and look at Financial Accounting, Accounts Receivable and Accounts Payable, Business Transactions, Outgoing Payments, Automatic Outgoing Payments, Payment Media.
At which "event" of F110 do you want to submit your report?
Regards
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |