Application Development and Automation 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: 
Read only

Modify table RT

Former Member
0 Likes
998

Hi experts,

I'm trying to modify the payroll results (table RT) using the macro rp-exp-c2-r* but it doesn't work.

This is the code I've written:

cd-key-pernr = p_pernr.

rp-imp-c2-cd.

  LOOP AT rgdir 
  WHERE fpper EQ period
  AND srtza EQ 'A'.

    MOVE   p_pernr TO rx-key-pernr.
    UNPACK rgdir-seqnr TO rx-key-seqno.

    rp-imp-c2-rf.

    IF rp-imp-rf-subrc NE 0.
      REJECT.
    ENDIF.

    LOOP AT RT WHERE lgart EQ p_lgart.
      rt-betrg = p_betrg.
      MODIFY rt.
    ENDLOOP.

    versc-void = rgdir-void.
    versc-voidr = rgdir-voidr.
    versc-voidd = rgdir-voidd.
    versc-voidt = rgdir-voidt.

    rp-exp-c2-rf.

    WRITE: / 'Complete', rp-imp-rf-subrc.

    PERFORM prepare_update USING 'V'.

  ENDLOOP.

END-OF-SELECTION.
  INCLUDE rpcmgr00.
  INCLUDE rpppxm00.

Unfortunately, nothing changes.

Can anyone help me?

Many thanks,

A. Cepa

2 REPLIES 2
Read only

Former Member
0 Likes
668

Finally,

I've found the mistake.

This was missing and now it works properly.

DATA: BEGIN OF COMMON PART buffer.
INCLUDE rpppxd10.
DATA: END OF COMMON PART buffer.

instead of only the include:

INCLUDE rpppxd10.

Best regards,

A. Cepa

Read only

0 Likes
668

Hi Angel

Do you still have a source code for reference.

We performed exactly as per your self discovered solution by the RT result still could not get updated

thanks

Greg