Professional Documents
Culture Documents
SRV000498 Detailed Requirements-Tech
SRV000498 Detailed Requirements-Tech
Requirement
1 New program to copy IFRS4 balances from
company code EXIM into the new MFRS17
environment (i.e business area RS17).
Remarks
The new program will work as shown below.
Selection screen
- Source company code (Range)
- Source G/L accounts (Range)
- Period/Year (eg. 01/2023)
- Option buttons: Posting, Reversal
- Test run checkbox
Log Table
Fields in the log table:
- Company code (Key)
- G/L Account (Key)
- Year (Key)
- Period (Key)
- Run No. (Key)
- Amount (Key)
- Document number (Key)
- Reversal document number
Program logic
Option radiobutton 1: Posting (test run/actual run) - the program will perform the following steps:
1. Check balance (PER_SALES) from BAPI_GL_ACC_GETPERIODBALANCES in the previous period and compare against the amo
If there has been multiple runs for a period, check the latest Run No for the Period/Year.
> If last Run No. in log table is reversal, show error message "Posting for period 1/2023 is incomplete".
> If there are differences, show error message and do not allow posting for selected period.
----> Recalculate previous period for accounting line items with BA = blank and compare against last posting of run no. and GL
> If the amount in the log table matches the amount in the BAPI, proceed to step 2.
Tech: BAPI has no filter by business area. Need to find other BAPI or call submit FBL3N report in background.
2. Check the log table to see if document has already been posted for G/L account in period & year (note: no need to check am
> If already posted, check if document has been reversed.
If there has been multiple runs for a period, check the latest Run No for the Period/Year.
> If there is no reversal document, show error message.
> If there is reversal document, proceed
> If not posted (i.e Company code and Period/year not found in log table), proceed
Posting, Test Run --> BAPI_ACC_DOCUMENT_CHECK
Posting, Actual Run --> BAPI_ACC_DOCUMENT_POST
Option radiobutton 2: Reverse (test run/actual run) - the program will perform the following steps:
1. Check document number and reversal document number from the log table based on Company code, Period/Year
If there has been multiple runs for a period, check the latest Run No for the Period/Year.
> If document has already been reversed, show error message
> If reversal document is blank, proceed
Reverse, Test Run --> BAPI_ACC_DOCUMENT_REV_POST
Reverse, Actual Run --> BAPI_ACC_DOCUMENT_REV_POST
Output
ALV Report
Notes
1. Scheduled job is not required. The program will be manually run by the users as part of their month end process.
> Program is not required for schedule job. User can run Ad-hoc either foreground or background.
2. Document date / Posting date will be the last day of the selected period. Eg. 01/2023 selected, posting date = 31.01.2023.
3. Document type = ZM
Reference
FM to retrieve GL balances: BAPI_GL_ACC_GETPERIODBALANCES
Retrieve amount from 'PER_SALES' based on period entered in the selection screen.
For positive value, assign posting key 40. For negative value, assign posting key 50.
Document / Posting date will be determined from the Period/Year field. Eg. 01/2023 selected, document / posting date = 31.0
suggest to use FM 'LAST_DAY_IN_PERIOD_GET'
PIC
Functional &
Technical
Log Table
Company code (Key) G/L Account (Key) Year (Key) Period (Key) Run No. (Key) Amount (Key)
Scenario 1
EXIM 400500 2023 1 1 3000
100000999 1
100000999 1 100001000
100001001 1
100000999
100000999
100000999 100001000
100000999 100001000
100000999 1
100000999 2
100000999 999
100001000 1
100000999 1 100001001
100000999 2 100001001
100000999 999 100001001
100001000 1 100001002
Notes
Selection Screen
- File path – application server (Note: how this works will be similar to t-code YF27, i.e file paths maintained in a mapping table
- File path – workstation
- Test run checkbox
Mapping file
Logic
Test Run --> BAPI_ACC_DOCUMENT_CHECK
Actual Run --> BAPI_ACC_DOCUMENT_POST