Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to delimit custom HRP1001 relation

I need to delimit a HRP1001 releation, i tried it with code below, the read works well, the cut returns sy-subrc 0 but the record is not updated with the new ENDDA.

Anyone have a clue???

Greetz Richard

REPORT z_rvveen_1001.

DATA lv_endda TYPE dats.

DATA lt_read_hrp1001 TYPE STANDARD TABLE OF p1001.

DATA lw_read_hrp1001 LIKE LINE OF lt_read_hrp1001.

data lt_cut_hrp1001 TYPE TABLE OF HRI1001.

data lw_cut_hrp1001 like LINE OF lt_cut_hrp1001.

CALL FUNCTION 'RH_READ_INFTY_1001'

EXPORTING

authority = 'DISP'

with_stru_auth = 'X'

plvar = '01'

otype = 'P'

objid = '94545454'

istat = '1'

extend = 'X'

subty = 'AZ01'

TABLES

i1001 = lt_read_hrp1001

EXCEPTIONS

nothing_found = 1

wrong_condition = 2

wrong_parameters = 3

OTHERS = 4.

IF sy-subrc EQ 0.

READ TABLE lt_read_hrp1001 index 1 into lw_read_hrp1001.

MOVE-CORRESPONDING lw_read_hrp1001 to lw_cut_hrp1001.

APPEND lw_cut_hrp1001 to lt_cut_hrp1001.

lv_endda = sy-datum - 1.

CALL FUNCTION 'RH_CUT_INFTY_1001_EXT'

EXPORTING

  • LOAD = 'X'

gdate = lv_endda

histo = ' '

  • DEL_SUCC = ' '

vtask = 'B'

  • ORDER_FLG = 'X'

COMMIT_FLG = 'X'

AUTHY = 'X'

  • PPPAR_IMP =

  • KEEP_LUPD =

  • WORKF_ACTV = 'X'

TABLES

innnn = lt_cut_hrp1001

  • ILFCODE =

EXCEPTIONS

error_during_cut = 1

no_authorization = 2

gdate_before_begda = 3

cut_of_timco_one = 4

relation_not_reversible = 5

corr_exit = 6

OTHERS = 7.

IF sy-subrc = 0.

commit work.

ENDIF.

ENDIF.

Former Member
Former Member replied

use this report RHGRENZ4 for setting new end date .

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question