cancel
Showing results for 
Search instead for 
Did you mean: 

use of read_text fm

Former Member
0 Kudos

hi,

My requirement is in Packing List layout, I have to display some long text which is fatch from va02 and use in layout to display long text.

How to use read_text and how fm can link to print program of scripts, explan me regardng which parameters i have to pass and how.

helpful with how to code in print program and code in sapscript layout form

regards,

vamsykrishna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Go through the code


form get_standard_text  using     pr_spras     type spras
                        changing  pr_i_tline   type gt_t_line.

 constants:
   lc_txtid      type   tdid       value  'ST',
   lc_name       type   tdobname   value  'Z_TEST',    "Form Name
   lc_object     type   tdobject   value  'TEXT'.

 constants:
   lc_text       type   tdobject value 'TEXT'.  "std. parameter

*call this function module to retrieve the text content.
  call function 'READ_TEXT'
    exporting
      client                  = sy-mandt
      id                      = lc_txtid      "Text Id
      language                = pr_spras      "Language
      name                    = lc_name       "Standard Text
      object                  = lc_object     "TEXT
    tables
      lines                   = pr_i_tline
    exceptions
      id                      = 1
      language                = 2
      name                    = 3
      not_found               = 4
      object                  = 5
      reference_check         = 6
      wrong_access_to_archive = 7
      others                  = 8.

*SY-SUBRC check is not required.If no value found blank gets printed



endform.

regards

Sandipan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Also check this thread for sample code.

Sample:

DATA: leng TYPE thead-tdspras,
l_fname TYPE thead-tdname.
DATA: il_tline LIKE tline OCCURS 0 WITH HEADER LINE.
leng = 'ES'.
l_fname = is_dlv_delnote-hd_gen-deliv_numb.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = '0001'
language = leng
name = l_fname
object = 'VBBK'
TABLES
lines = il_tline.
comentario = ''.
LOOP AT il_tline.
CONCATENATE comentario il_tline-tdline INTO comentario SEPARATED BY space.
ENDLOOP.

Regards,

Sreenivasa Sarma K.

Former Member
0 Kudos

Hi Kashi,

what i have to give in place of l_fname.

regards,

vamsykrishna.

Former Member
0 Kudos

Hi,

u have to give your form Smartform/SAPSCRIPT name there.

Regards

Sandipan

Former Member
0 Kudos

Hi sandipan,

This is a script, Where i should write this funcion module Read_Text ( before or after ) write_form in print program. Some conditions reuired

Former Member
0 Kudos

Hi,

u have to write it before Write_form

Regards

Sandipan