Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to delimit custom HRP1001 relation

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

use this report RHGRENZ4 for setting new end date .

2 REPLIES 2

Former Member
0 Kudos

Hi,

Try using the FM RH_UPDATE_DATABASE instead of commit work.

Regards

Bala

Former Member
0 Kudos

use this report RHGRENZ4 for setting new end date .