Ansicht
Dokumentation
ISU_SAMPLE_R998 - Event R998: Determines Last Print/Debit Entry Date in Prepayment Plan
ABAP Short Reference BAL Application Log DocumentationThis documentation is copyright by SAP AG.
Functionality
The function module called for event R998 determines the print/debit entry date, which is used to calculate the last due date of an advance payment plan.
The following data from the budget billing plan is available for this purpose:
- X_OBJ-EABP:,,,,Header data
- X_OBJ-T_EABPS:,,Item data
The following data is returned to the calling program:
- Y_SOLLDAT:,,,,Print/debit entry date
Notes
With the standard settings the end date of the budget billing period is used as the print/debit entry date for the last due item. The same applies if, in a customer function module, an initial value is returned.
Example
The print/debit entry date of the last due item is to follow the same cycle as its two predecessors:
function isu_advance_payment_r998.
data: v_duration type i,
v_anz_tag type i,
v_startdate like sy-datum,
v_enddate like sy-datum.
data: wa_eabps like eabps.
*==> Budget billing amounts are sorted in ascending order according to
*==> the print/debit entry date in order to read the last two dates.
sort x_obj-t_eabps by solldat descending.
loop at x_obj-t_eabps into wa_eabps.
case sy-tabix.
when 1.
v_enddate = wa_eabps-solldat.
when 2.
v_startdate = wa_eabps-solldat.
exit.
endcase.
endloop.
*==> Determination of time interval
call function 'DURATION_DETERMINE'
exporting
unit = 'TAG'
importing
duration = v_duration
changing
start_date = v_startdate
end_date = v_enddate
end_time = sy-uzeit
exceptions
others = 1.
if sy-subrc <> 0.
==> If an error occurs, the print/debit entry date is set to the end
==> date of the budget billing period
y_solldat = x_obj-eabp-endperiode.
else.
*==> Calculation of print/debit entry date
call function 'END_TIME_DETERMINE'
exporting
duration = v_duration
unit = 'TAG'
importing
end_date = y_solldat
changing
start_date = v_enddate
exceptions
others = 1.
if sy-subrc <> 0.
==> If an error occurs, the print/debit entry date is set to the end
==> date of the budget billing period
y_solldat = x_obj-eabp-endperiode.
endif.
endif.
endfunction.
Parameters
X_OBJY_SOLLDAT
Exceptions
Function Group
E21UAddresses (Business Address Services) BAL_S_LOG - Application Log: Log header data
This documentation is copyright by SAP AG.
Length: 4232 Date: 20240523 Time: 132814 sap01-206 ( 30 ms )