Hi,
Can anyone please tell me how the values have been calculated using following ABAP code:-
TABLES: ...
DATA: l_number_of_days TYPE i.
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
USING COMM_STRUCTURE LIKE /BIC/CS8ZSD_D003
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING RESULT LIKE /BIC/VZSD_C004T-DLVVEYSC
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
*
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
if COMM_STRUCTURE-recordmode eq ' '
or COMM_STRUCTURE-recordmode eq 'N'.
IF COMM_STRUCTURE-dlvqeysc GT 0 and COMM_STRUCTURE-dlvqlesc eq 0.
RESULT = COMM_STRUCTURE-dlvqeysc * COMM_STRUCTURE-netpr_vkm.
endif.
elseif COMM_STRUCTURE-recordmode eq 'X'.
if COMM_STRUCTURE-dlvqeysc lt 0 and COMM_STRUCTURE-dlvqlesc eq 0.
RESULT = -1 * COMM_STRUCTURE-dlvqeysc * COMM_STRUCTURE-netpr_vkm.
endif.
ENDIF.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.