Open all | Close all

ABAP code to manipulate program textpools



From within ABAP you are able to manipulate a programs textpool(text elements). See code
below to see how to read, delete and add new entries to a textpool.

*Data declaration for textpool manipulation
DATA: PROGRAM(30) VALUE 'ZTESTPROG',
      TAB LIKE TEXTPOOL OCCURS 50 WITH HEADER LINE.


*Read textpool
READ TEXTPOOL PROGRAM INTO TAB LANGUAGE SY-LANGU state 'A'.

*Delete textpool
DELETE TEXTPOOL program LANGUAGE 'E'.

*Add entry to text pool
READ TEXTPOOL PROGRAM INTO TAB LANGUAGE SY-LANGU state 'A'.
DELETE TEXTPOOL program LANGUAGE 'E'.
TAB-ID = 'S'. TAB-KEY = 'DATYP'.  TAB-ENTRY = 'Date Type'.
APPEND TAB.
SORT TAB BY ID KEY.
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE SY-LANGU.


SAP ABAP development help
More SAP ABAP development help and information


ABAP code and information
More SAP ABAP development tips and tricks

 
 

Number of SAP Development Users currently online hit counters