Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read_text parameters

Former Member
0 Likes
1,618

hi all ,

i need to print Bank Payment Instruction text taken from Billing doc. header text: Bank Payment Instruction

i need to use Read_Text what are the parameters i need to pass to function module Read_text

1 ACCEPTED SOLUTION
Read only

ravisankara_varaprasad
Active Participant
0 Likes
1,336

Hi,

You need to pass the Text id , Name , Language and Object . You will get this parameters from document header text.

Goto the Text and double click , now it will take you to the text editor .

Now choose Go to -> Header from Menu Bar, Here you will find Text Id, Name , Object and Language.

Kind Regards,

Ravi Sankar.Z

4 REPLIES 4
Read only

Former Member
0 Likes
1,336

Hi,

Read_Text FM will be useful to read the Long texts stored in the system, for example if you take Sales Order Text or Prod Order Text, in some cases you need to dispaly in SAP Script / send to some other systems, in such cases we will use READ_TEXT FM to read this based on object number.

Check this also.

http://help.sap.com/saphelp_nw04/helpdata/en/d6/0db764494511d182b70000e829fbfe/frameset.ht

THanks

VIkranth

Read only

Former Member
0 Likes
1,336

DEAR FRIEND

PLS GO THROUGH THE FOLLING CODE

YOU WILL GET ALL.

REWARDS ARE EXPECTING.

VIVEK

REFRESH i_thead.

CLEAR v1.

CLEAR v2.

CLEAR v3.

CLEAR v4.

CLEAR v5.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = v_id

language = sy-langu

name = v_name

object = v_object

TABLES

lines = i_thead[]

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.

CLEAR v_spec.

LOOP AT i_thead INTO w_thead.

MOVE w_thead-tdname TO v_head.

REPLACE '*' WITH space INTO v_head.

CONDENSE v_head.

IF sy-tabix = 1.

v1 = v_head.

ELSEIF sy-tabix = 2.

v2 = v_head.

ELSEIF sy-tabix = 3.

v3 = v_head.

ELSEIF sy-tabix = 4.

v4 = v_head.

ELSEIF sy-tabix = 5.

v5 = v_head.

ENDIF.

CONCATENATE v_spec v_head INTO v_spec.

CLEAR v_head.

ENDLOOP.

Read only

ravisankara_varaprasad
Active Participant
0 Likes
1,337

Hi,

You need to pass the Text id , Name , Language and Object . You will get this parameters from document header text.

Goto the Text and double click , now it will take you to the text editor .

Now choose Go to -> Header from Menu Bar, Here you will find Text Id, Name , Object and Language.

Kind Regards,

Ravi Sankar.Z

Read only

Former Member
0 Likes
1,336

Hi,

Pls find the below sample code.

here you have to pass the client,id,language,name, object parameters, you can find these parameters in STXH table.

take any of the entry from this table and execute this function module you will understand.

data:

tbl_tline1 TYPE STANDARD TABLE OF tline.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id

language

name

object

TABLES

lines = tbl_tline1

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 EQ 0.

write your further code here.

endif.

Thanks & Regards,

Sreeram.