##NEEDED
DATA: lo_object TYPE REF TO cl_isu_edm_profile,
lv_profile TYPE e_profile,
lv_version TYPE cversno,
lt_prof TYPE teprofvalues_diff,
lv_valid_daterange TYPE eedm_date_time_from_to_utc.
CLEAR: et_prof_values, lo_object, lv_profile, lv_version, lt_prof, lv_valid_daterange.
* Internal conversions
lv_profile = |{ iv_profile ALPHA = IN }|.
lv_version = |{ iv_version ALPHA = IN }|.
CALL METHOD cl_isu_edm_profile=>get_valid_profile_timerange
EXPORTING
profile_number = lv_profile
timezone = iv_timezone
IMPORTING
timeslice = lv_valid_daterange
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
* IF profile is valid create object of class cl_isu_edm_profile
* Create Object
CREATE OBJECT lo_object.
* call open method to read the profile.
lo_object->open(
EXPORTING
profilenr = lv_profile
date_from = iv_date_from
time_from = iv_time_from
date_to = iv_date_to
time_to = iv_time_to
timezone = iv_timezone
read_values = abap_true
read_versions = abap_true
im_dialog = space "background mode
EXCEPTIONS
not_found = 1
OTHERS = 2 ).
IF sy-subrc = 0.
* by default profile is opened in display mode
* call method rebuild revision to get older version intervals.
lo_object->rebuild_version(
EXPORTING
version_number = lv_version
IMPORTING
version_value_tab = lt_prof
EXCEPTIONS
version_not_available = 1
not_allowed = 2
OTHERS = 3 ).
IF sy-subrc = 0.
et_prof_values = lt_prof.
ENDIF.
* close the processing
lo_object->close(
EXCEPTIONS
not_allowed = 1
OTHERS = 2 ).
ENDIF.
ENDIF.
Now Execute, the FM and pass the input values we will get the older version all interval profile values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
5 | |
4 | |
4 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 |