Use of FM Read_Text
- Get link
- X
- Other Apps
In SAP we use Function Module to get the desire value maintaining different parameters.
Usually we need to call FM when value directly not in a table. In FM we need to pass ID, Object, Name.
Here ID mean where from it reads. Object : which object of text to be read. Name : Which name f text to be read. In below I share a demo code with you.Suppose here name = Client number +Inspection Lot Number+L, so we need to concatenate both of them and keep them in a variable.
DATA: CON LIKE THEAD-TDNAME .
DATA: CON1 TYPE STRING .
L_D = 'L'.
CONCATENATE SY-MANDT WA-PRUEFLOS INTO CON1.
CONCATENATE CON1 L_D INTO CON.
DATA: I_LINE TYPE STANDARD TABLE OF TLINE,
W_LINE LIKE LINE OF I_LINE.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'QAVE'
LANGUAGE = 'E'
NAME = CON
OBJECT = 'QPRUEFLOS'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
* OLD_LINE_COUNTER =
TABLES
LINES = I_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
After getting values we need to loop it and pass the internal table.
- Get link
- X
- Other Apps
Comments
Post a Comment