From cfcf507800ed7e1598205209934574f3d0eb08ec Mon Sep 17 00:00:00 2001 From: Nuno Godinho Date: Thu, 16 Mar 2023 16:54:21 +0000 Subject: [PATCH] Show TR details edge case Fetch TR details even in cases where VRSD has REPS and E071 has PROG. --- src/zcl_timem_request.clas.abap | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/zcl_timem_request.clas.abap b/src/zcl_timem_request.clas.abap index 6e8d6ad..05d3b6c 100644 --- a/src/zcl_timem_request.clas.abap +++ b/src/zcl_timem_request.clas.abap @@ -125,5 +125,15 @@ CLASS zcl_timem_request IMPLEMENTATION. ORDER BY as4date DESCENDING as4time DESCENDING. EXIT. ENDSELECT. + IF sy-subrc <> 0 AND object_type = 'REPS'. + " This is a unfortunate hack. I hope there is a way to avoid this. + " But for some reason in VRSD the object type for programs is REPS + " (which stands for report source) for a given TR, but in E071 the + " object type registered is PROG. This is a workaround to + " be sure the request details are found in those cases. + result = get_latest_task_for_object( + object_type = 'PROG' + object_name = object_name ). + ENDIF. ENDMETHOD. ENDCLASS.