Hi,
I am trying to insert some text into the infotype text (Edit -> Maintain Text) for infotype 40 programmatically.
I have written the sample code below but the text is not inserted into the infotype. Can someone advise me what could be wrong with the code ?
Many thanks in advance.
Regards
KC
=============================================
REPORT ZTEXTO .
TABLES : PERNR, PCL1, pcl2.
INFOTYPES : 0040.
INCLUDE RPPPXD00.
DATA : BEGIN OF COMMON PART BUFFER.
INCLUDE RPPPXD10.
DATA : END OF COMMON PART BUFFER.
INCLUDE RPC1TX00.
GET PERNR.
LOOP AT P0040.
MOVE-CORRESPONDING P0040 TO TX-KEY.
REFRESH PTEXT.
PTEXT-LINE = 'THIS IS A TRAIL INSERT INSERT INTO INFOTYPE TEXT'.
APPEND PTEXT.
RP-EXP-C1-TX.
ENDLOOP.
PERFORM PREPARE_UPDATE USING 'V'.
BUFFER ADMINISTRATION ROUTINE.
INCLUDE RPPPXM00.