Hi Tarak,
i have used program lines in my smartforms to get corresponding texts in Main area of a table which is used in my smartform to print line item details.
I have written these following lines of code to get each text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id = 'F05'
language = sy-langu
name = v_po
object = 'EKKO'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
tables
lines = dt_lines
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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if dt_lines[] is not initial.
wa-head = 'Terms of delivery'.
wa-ebeln = imseg-ebeln.
wa-ebelp = imseg-ebelp.
loop at dt_lines.
read table dt_lines index 1.
if sy-subrc eq 0.
wa-text = dt_lines-tdline.
endif.
read table dt_lines index 2.
if sy-subrc eq 0.
wa-text1 = dt_lines-tdline.
endif.
read table dt_lines index 3.
if sy-subrc eq 0.
wa-text2 = dt_lines-tdline.
endif.
read table dt_lines index 4.
if sy-subrc eq 0.
wa-text3 = dt_lines-tdline.
endif.
concatenate wa-text '' wa-text1 '' wa-text2 '' wa-text3 into wa-text.
endloop.
append wa to itext.
clear wa.
clear : dt_lines.
refresh : dt_lines[].
endif.