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

OTR Text

Former Member
0 Likes
1,247

I have created text using SOTR_EDIT. How do I retrieve the value of a text from within an ABAP function? I know I can use otr() from within a bsp, but I need to do this within an ABAP function.

I have created text using SOTR_EDIT. How do I retrieve the value of a text from within an ABAP function? I know I can use otr() from within a bsp, but I need to do this within an ABAP function.

8 REPLIES 8
Read only

Former Member
0 Likes
1,212

READ_TEXT.

Read only

0 Likes
1,212

Can you explain the parameters? Some of them are self-explanatory, but not sure of all of them. I know what to use for client, language, and I think name would be the otr text name.

*"  IMPORTING
*"     VALUE(CLIENT) LIKE  SY-MANDT DEFAULT SY-MANDT
*"     VALUE(ID) LIKE  THEAD-TDID
*"     VALUE(LANGUAGE) LIKE  THEAD-TDSPRAS
*"     VALUE(NAME) LIKE  THEAD-TDNAME
*"     VALUE(OBJECT) LIKE  THEAD-TDOBJECT
*"     VALUE(ARCHIVE_HANDLE) LIKE  SY-TABIX DEFAULT 0
*"     VALUE(LOCAL_CAT) DEFAULT SPACE

Read only

0 Likes
1,212

also try this FM...

SOTR_STRING_READ_TEXT_WITH_KEY

check this...

      
call function 'SOTR_STRING_READ_TEXT_WITH_KEY'
           exporting
             langu            = sy-langu
             context          = l_context
             sotr_key         = l_sotr_key
           importing
             header           = l_header
             entry            = l_text
           exceptions
             no_entry_found   = 1
             language_missing = 2
             others           = 3.
      if sy-subrc = 0.

      endif.

Regards

vijay

Message was edited by: Vijay Babu Dudla

Read only

0 Likes
1,212

You have to pass only the ID(ID with which this text is stored), NAME(This is typically the key fields, for example, if you are talking about material texts this will be material number, if you are talking about sales order item texts, then this is sales order number plus item number) and OBJECT(identifies what text object this one is like ST, VBBK etc).

Others you don't have to pass.

Read only

0 Likes
1,212

Look in SE37 for SOTR_*

Read only

Former Member
0 Likes
1,212

Hi,

use this Function module...

<b>LXE_OBJ_TEXT_PAIR_READ_SOTR</b>

Regards

vijay

Read only

0 Likes
1,212

Are you sure that is the right name? I can't find this function module.

Read only

0 Likes
1,212

How about SOTR_GET_TEXTS_WITH_KEYS

Regards,

Rich Heilman