Skip to Content
0
Former Member
Feb 21, 2005 at 04:46 AM

Smartforms: how do i append o/p(spool) of a mere Report as Smartform pages

23 Views

Dear Murugesh

Many many thnx .

It has solved my problem (appending o/p of the SapScript)

1) One more New issue plz help

Similarly as o/p of SapScript ,

How do i append the o/p of a mere report(ZA3C) as smartform pages or as append it into the PDF file ?

Plz throw some light on this

Thnx

Moni

Have a look into my code below plz

REPORT ZSD_REP_MULTI_PRINT.

TABLES :

VBAK,

VBAP,

VBFA,

LIKP,

LIPS,

KONV,

t005t,

KNA1,

t001w,

T001,

ADRC.

DATA: FM_NAME1 TYPE RS38L_FNAM,

FM_NAME2 TYPE RS38L_FNAM,

FM_NAME3 TYPE RS38L_FNAM,

FM_NAME4 TYPE RS38L_FNAM,

P_E_DEVTYPE TYPE RSPOPTYPE,

P_JOB_OUTPUT_INFO TYPE SSFCRESCL OCCURS 2000 WITH HEADER LINE,

T_OTF LIKE ITCOO OCCURS 2000 WITH HEADER LINE,

T_OTF2 LIKE ITCOO OCCURS 2000 WITH HEADER LINE,

P_OUTPUT_OPTIONS TYPE SSFCOMPOP OCCURS 0 WITH HEADER LINE,

P_CONTROL_PARAMETERS TYPE SSFCTRLOP OCCURS 0 WITH HEADER LINE ,

P_DOC LIKE DOCS OCCURS 2000 WITH HEADER LINE,

P_LINES LIKE TLINE OCCURS 200,

P_BIN_FILESIZE TYPE I,

P_LANGUAGE TYPE SFLANGU,

P_BIN_FILE TYPE XSTRING,

OK_CODE LIKE SY-UCOMM.

DATA: T_ITEM TYPE ZSD_TABL_LITEM,

WA_ITEM TYPE ZSD_STRUCT_LITEM,

T_ADRS LIKE ZSD_STRUCT_ADRS OCCURS 0 WITH HEADER LINE,

MSLINES LIKE TLINE OCCURS 1 WITH HEADER LINE,

TIDNO LIKE STXL-TDID,

TNAME LIKE STXL-TDNAME,

TOBJT LIKE STXL-TDOBJECT,

SSORD LIKE VBAK-VBELN,

TOT LIKE VBAK-NETWR,

WORD LIKE SPELL,

ITNO LIKE VBAP-POSNR.

SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.

PARAMETERS: P_DELNO LIKE LIKP-VBELN OBLIGATORY,

P_INVNO LIKE VBRK-VBELN OBLIGATORY,

P_DATE LIKE SY-DATUM.

SELECTION-SCREEN END OF BLOCK blk1.

AT SELECTION-SCREEN.

CLEAR T_ADRS.

REFRESH T_ITEM.

T_ADRS-INVNO = P_INVNO.

T_ADRS-INVDAT = P_DATE.

SELECT SINGLE VBELV INTO VBFA-VBELV

FROM VBFA

WHERE VBELN = P_DELNO

AND VBTYP_N = 'J' .

SSORD = VBFA-VBELV.

*Exporter's Address

SELECT SINGLE BUKRS_VF INTO VBAK-BUKRS_VF

FROM VBAK

WHERE VBELN = VBFA-VBELV.

SELECT SINGLE ADRNR

INTO T001-ADRNR

FROM T001

WHERE BUKRS = VBAK-BUKRS_VF.

SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY

INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,

T_ADRS-POST_CODE1, ADRC-COUNTRY)

FROM ADRC

WHERE ADDRNUMBER EQ T001-ADRNR.

SELECT SINGLE LANDX

INTO T_ADRS-COUNTRY

FROM T005T

WHERE SPRAS = 'EN'

AND LAND1 = ADRC-COUNTRY.

*Consignee Address & Buyer Other Than Consignee

SELECT SINGLE KUNNR KUNAG INTO (LIKP-KUNNR, LIKP-KUNAG)

FROM LIKP WHERE VBELN = P_DELNO.

IF LIKP-KUNNR = LIKP-KUNAG.

SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR

INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,

T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,

T_ADRS-CTELF1, KNA1-ADRNR)

FROM KNA1

WHERE KUNNR = LIKP-KUNNR.

SELECT SINGLE COUNTRY INTO ADRC-COUNTRY

FROM ADRC

WHERE ADDRNUMBER EQ KNA1-ADRNR.

SELECT SINGLE LANDX

INTO T_ADRS-CCOUNTRY

FROM T005T

WHERE SPRAS = 'EN'

AND LAND1 = ADRC-COUNTRY.

T_ADRS-ONAME1 = T_ADRS-CNAME1 .

T_ADRS-ONAME2 = T_ADRS-CNAME2 .

T_ADRS-OSTREET = T_ADRS-CSTREET .

T_ADRS-OCITY = T_ADRS-CCITY.

T_ADRS-OPCODE = T_ADRS-CPCODE .

T_ADRS-OREGIO = T_ADRS-CREGIO.

T_ADRS-OTELF1 = T_ADRS-CTELF1 .

T_ADRS-OCOUNTRY = T_ADRS-CCOUNTRY.

ELSE.

SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR

INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,

T_ADRS-CCITY, T_ADRS-CPCODE, T_ADRS-CREGIO,

T_ADRS-CTELF1, KNA1-ADRNR)

FROM KNA1

WHERE KUNNR = LIKP-KUNNR.

SELECT SINGLE COUNTRY INTO ADRC-COUNTRY

FROM ADRC

WHERE ADDRNUMBER EQ KNA1-ADRNR.

SELECT SINGLE LANDX

INTO T_ADRS-CCOUNTRY

FROM T005T

WHERE SPRAS = 'EN'

AND LAND1 = ADRC-COUNTRY.

*Buyer Other than Consignee

SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR

INTO (T_ADRS-ONAME1, T_ADRS-ONAME2, T_ADRS-OSTREET,

T_ADRS-OCITY, T_ADRS-OPCODE, T_ADRS-OREGIO,

T_ADRS-OTELF1, KNA1-ADRNR)

FROM KNA1

WHERE KUNNR = LIKP-KUNAG.

SELECT SINGLE COUNTRY INTO ADRC-COUNTRY

FROM ADRC

WHERE ADDRNUMBER EQ KNA1-ADRNR.

SELECT SINGLE LANDX

INTO T_ADRS-OCOUNTRY

FROM T005T

WHERE SPRAS = 'EN'

AND LAND1 = ADRC-COUNTRY.

ENDIF.

*Other's Ref

TIDNO = 'Z071'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-OREF = mslines-tdline(50).

EXIT.

ENDLOOP.

*Buyer's Order No Ref

TIDNO = 'Z023'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-BUYER = mslines-tdline(50).

EXIT.

ENDLOOP.

*Exporter Ref

TIDNO = 'Z072'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-XPREF = mslines-tdline(50).

EXIT.

ENDLOOP.

*Pre-Carraige By

TIDNO = 'Z074'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-PCRG = mslines-tdline(50).

EXIT.

ENDLOOP.

*Place Of reciept by Pre-Carraige

TIDNO = 'Z073'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-PLPCRG = mslines-tdline(50).

EXIT.

ENDLOOP.

*Vessel/Flight No

TIDNO = 'Z075'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-VFNO = mslines-tdline(50).

EXIT.

ENDLOOP.

*Port Of Loading

TIDNO = 'Z077'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-PLOAD = mslines-tdline(50).

EXIT.

ENDLOOP.

*Port Of Discharge

TIDNO = 'Z076'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-PDISG = mslines-tdline(50).

EXIT.

ENDLOOP.

*Final Destination

TIDNO = 'Z070'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-FDEST = mslines-tdline(50).

EXIT.

ENDLOOP.

*Terms Of Delivery & Payment

TIDNO = 'Z080'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-TERMS = mslines-tdline(50).

EXIT.

ENDLOOP.

  • APPEND T_ADRS.

*BODY SECTION FOR LINE ITEMS

SELECT POSNR KWMENG VRKME WAERK

INTO (VBAP-POSNR, VBAP-KWMENG, VBAP-VRKME, VBAP-WAERK)

FROM VBAP

WHERE VBELN = SSORD.

*Mark/Case No

TIDNO = '0002'.

CONCATENATE SSORD

VBAP-POSNR

INTO TNAME.

TOBJT = 'VBBP'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

WA_ITEM-MARKNO = mslines-tdline(40).

EXIT.

ENDLOOP.

*Packing Type

TIDNO = '0003'.

CONCATENATE SSORD

VBAP-POSNR

INTO TNAME.

TOBJT = 'VBBP'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

WA_ITEM-PACKTYP = mslines-tdline(40).

EXIT.

ENDLOOP.

*Goods Description

TIDNO = '0001'.

CONCATENATE SSORD

VBAP-POSNR

INTO TNAME.

TOBJT = 'VBBP'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

WA_ITEM-GDESC = mslines-tdline(40).

EXIT.

ENDLOOP.

*Goods Quantity

WA_ITEM-QTY = VBAP-KWMENG.

WA_ITEM-VRKME = VBAP-VRKME.

*Goods Rate

SELECT SINGLE KNUMV INTO VBAK-KNUMV FROM VBAK WHERE VBELN = SSORD.

SELECT SINGLE KBETR WAERS

INTO (WA_ITEM-RATE, WA_ITEM-WAERS)

FROM KONV

WHERE KNUMV = VBAK-KNUMV

AND KPOSN = VBAP-POSNR

AND KSCHL = 'PR00'.

*Item Remarks

TIDNO = 'ZREM'.

CONCATENATE SSORD

VBAP-POSNR

INTO TNAME.

TOBJT = 'VBBP'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

WA_ITEM-REMARK = mslines-tdline(40).

EXIT.

ENDLOOP.

*Goods Amount

WA_ITEM-AMOUNT = WA_ITEM-QTY * WA_ITEM-RATE.

WA_ITEM-WAERK = VBAP-WAERK.

TOT = TOT + WA_ITEM-AMOUNT.

ITNO = VBAP-POSNR.

APPEND WA_ITEM TO T_ITEM.

ENDSELECT.

T_ADRS-TOT = TOT.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = TOT

CURRENCY = VBAP-WAERK

  • FILLER = ' '

LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = WORD

EXCEPTIONS

NOT_FOUND = 1

TOO_LARGE = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*Gross Wieght

TIDNO = 'Z078'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-GWT = mslines-tdline(40).

EXIT.

ENDLOOP.

*Net Wieght

TIDNO = 'Z079'.

TNAME = SSORD.

TOBJT = 'VBBK'.

PERFORM FINDTEXT.

LOOP AT MSLINES.

T_ADRS-NWT = mslines-tdline(40).

EXIT.

ENDLOOP.

T_ADRS-TOT_WORDS = WORD-WORD.

APPEND T_ADRS.

START-OF-SELECTION.

P_LANGUAGE = 'EN'.

CALL FUNCTION 'SSF_GET_DEVICE_TYPE'

EXPORTING

I_LANGUAGE = P_LANGUAGE

I_APPLICATION = 'SAPDEFAULT'

IMPORTING

E_DEVTYPE = P_E_DEVTYPE.

P_OUTPUT_OPTIONS-XSFCMODE = 'X'.

P_OUTPUT_OPTIONS-XSF = SPACE.

P_OUTPUT_OPTIONS-XDFCMODE = 'X'.

P_OUTPUT_OPTIONS-XDF = SPACE.

P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.

P_OUTPUT_OPTIONS-TDDEST = 'LOHP'.

APPEND P_OUTPUT_OPTIONS.

P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.

P_CONTROL_PARAMETERS-GETOTF = 'X'.

P_CONTROL_PARAMETERS-NO_CLOSE = SPACE.

APPEND P_CONTROL_PARAMETERS.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZSD_REP_MULTI_PRINT1'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME1

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION FM_NAME1

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = P_CONTROL_PARAMETERS

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = P_OUTPUT_OPTIONS

USER_SETTINGS = 'X'

IMPORTING

  • DOCUMENT_OUTPUT_INFO =

JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO

  • JOB_OUTPUT_OPTIONS =

TABLES

T_ADRS = T_ADRS

T_ITEM = T_ITEM

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.

APPEND T_OTF.

ENDLOOP.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZSD_REP_MULTI_PRINT2'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME2

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION FM_NAME2

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = P_CONTROL_PARAMETERS

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = P_OUTPUT_OPTIONS

USER_SETTINGS = 'X'

IMPORTING

  • DOCUMENT_OUTPUT_INFO =

JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO

  • JOB_OUTPUT_OPTIONS =

TABLES

T_ADRS = T_ADRS

T_ITEM = T_ITEM

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.

APPEND T_OTF.

ENDLOOP.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZSD_REP_MULTI_PRINT3'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME4

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION FM_NAME4

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = P_CONTROL_PARAMETERS

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = P_OUTPUT_OPTIONS

USER_SETTINGS = 'X'

IMPORTING

  • DOCUMENT_OUTPUT_INFO =

JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO

  • JOB_OUTPUT_OPTIONS =

TABLES

T_ADRS = T_ADRS

T_ITEM = T_ITEM

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT P_JOB_OUTPUT_INFO-OTFDATA INTO T_OTF.

APPEND T_OTF.

ENDLOOP.

*for capturing the o/p pages from ZPL3 and consolidating into table

  • T_OTF to get single PDF

SET PARAMETER ID: 'AUN' FIELD SSORD ,

'APO' FIELD ITNO.

CALL TRANSACTION 'ZPL3' AND SKIP FIRST SCREEN.

IF SY-SUBRC NE 0.

MESSAGE E001(ZQOTBANK).

ENDIF.

IMPORT A = T_OTF2 FROM MEMORY ID 'MEMID'.

LOOP AT T_OTF2 INTO T_OTF2.

APPEND T_OTF2 TO T_OTF.

ENDLOOP.

CALL FUNCTION 'CONVERT_OTF_2_PDF'

EXPORTING

USE_OTF_MC_CMD = 'X'

  • ARCHIVE_INDEX =

IMPORTING

BIN_FILESIZE = P_BIN_FILESIZE

TABLES

OTF = T_OTF

DOCTAB_ARCHIVE = P_DOC

LINES = P_LINES

EXCEPTIONS

ERR_CONV_NOT_POSSIBLE = 1

ERR_OTF_MC_NOENDMARKER = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

BIN_FILESIZE = P_BIN_FILESIZE

FILENAME = 'C:\SD6.pdf'

FILETYPE = 'BIN'

  • APPEND = ' '

  • WRITE_FIELD_SEPARATOR = ' '

  • HEADER = '00'

  • TRUNC_TRAILING_BLANKS = ' '

  • WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • CONFIRM_OVERWRITE = ' '

  • NO_AUTH_CHECK = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • WRITE_BOM = ' '

  • TRUNC_TRAILING_BLANKS_EOL = 'X'

IMPORTING

FILELENGTH = P_BIN_FILESIZE

TABLES

DATA_TAB = P_LINES

  • FIELDNAMES =

  • EXCEPTIONS

  • FILE_WRITE_ERROR = 1

  • NO_BATCH = 2

  • GUI_REFUSE_FILETRANSFER = 3

  • INVALID_TYPE = 4

  • NO_AUTHORITY = 5

  • UNKNOWN_ERROR = 6

  • HEADER_NOT_ALLOWED = 7

  • SEPARATOR_NOT_ALLOWED = 8

  • FILESIZE_NOT_ALLOWED = 9

  • HEADER_TOO_LONG = 10

  • DP_ERROR_CREATE = 11

  • DP_ERROR_SEND = 12

  • DP_ERROR_WRITE = 13

  • UNKNOWN_DP_ERROR = 14

  • ACCESS_DENIED = 15

  • DP_OUT_OF_MEMORY = 16

  • DISK_FULL = 17

  • DP_TIMEOUT = 18

  • FILE_NOT_FOUND = 19

  • DATAPROVIDER_EXCEPTION = 20

  • CONTROL_FLUSH_ERROR = 21

  • OTHERS = 22

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

&----


*& Form FINDTEXT

&----


  • text

----


FORM FINDTEXT.

REFRESH mslines.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = tidno

language = sy-langu

name = tname

object = tobjt

TABLES

lines = mslines

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

DELETE mslines WHERE tdline IS INITIAL.

ENDFORM. "FINDTEXT