Application Development 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: 

OTR Text

Former Member
0 Kudos

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

Former Member
0 Kudos

READ_TEXT.

0 Kudos

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

0 Kudos

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

0 Kudos

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.

0 Kudos

Look in SE37 for SOTR_*

former_member188685
Active Contributor
0 Kudos

Hi,

use this Function module...

<b>LXE_OBJ_TEXT_PAIR_READ_SOTR</b>

Regards

vijay

0 Kudos

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

0 Kudos

How about SOTR_GET_TEXTS_WITH_KEYS

Regards,

Rich Heilman