Skip to Content
0
Former Member
Jan 27, 2010 at 10:54 AM

Enhance the code logic

23 Views

Hi All ,

I am working on SAP-BI in that some code logic needs to be enhanced where for "Evaluation group" the report is picking the old record instead of the latest one.

HELP ME TO UNDERSTAND WHERE I CAN CHANGE IN THE CODE.

TYPES : BEGIN OF LX_HRP1050,

OBJID TYPE HROBJID, "Object ID

EVPTS TYPE P_EVPTS, "Evaluation points

EVGRD TYPE P_EVGRD, "Evaluation Group

END OF LX_HRP1050.

DATA: LT_HRP1050 TYPE STANDARD TABLE OF LX_HRP1050,

LW_HRP1050 TYPE LX_HRP1050,

SELECT OBJID EVPTS EVGRD FROM HRP1050 INTO CORRESPONDING FIELDS OF TABLE

LT_HRP1050 FOR ALL ENTRIES IN I_T_DATA WHERE

OBJID = I_T_DATA-PLANS.

READ TABLE LT_HRP1050 INTO LW_HRP1050 WITH KEY

OBJID = LW_IDATA-PLANS

BINARY SEARCH.

IF SY-SUBRC = 0.

  • FILLING THE DATA FOR THE NEWLY APPENDED FIELDS

LW_IDATA-ZEVPTS = LW_HRP1050-EVPTS.

LW_IDATA-ZEVGRD = LW_HRP1050-EVGRD.

ENDIF.

MODIFY I_T_DATA FROM LW_IDATA INDEX lw_index

TRANSPORTING ZPSTLZ

ZPOBOX ZORT01 ZEVPTS

ZEVGRD.

CLEAR LW_IDATA.

ENDLOOP.