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: 

Reading Text like Contains Pattern from So10

karthik_sub
Participant
484

Hi Experts,

I have some text stored in the xd03 header , I can fetch or store using READ_TEXT or SAVE_TEXT...No issue in that.

Iam looking for contains pattern so that i can search text name like text name - 0300006170* (contains pattern)

Because, I have lot of texts assigned to the BP...so im looking to search with the input text name = '0300006170*...

I can plan with STXH/STXL, Is there any other way to achieve the same.

5 REPLIES 5

raymond_giuseppi
Active Contributor
383

Did you try with FM READ_MULTIPLE_TEXTS which allow wildcards in most parameters.

Sandra_Rossi
Active Contributor
0 Kudos
383

Just the easy way?

DATA(like_tdname) = |{ '0300006170' }%|.
SELECT tdid, tdname FROM stxh WHERE tdobject = 'KNVV' 
                                AND tdname   LIKE @like_tdname
                                AND tdspras  = @sy-langu
    INTO TABLE @DATA(text_ids).
LOOP AT text_ids REFERENCE INTO DATA(text_id).
  CALL FUNCTION 'READ_TEXT'
    EXPORTING
      id       = text_id->tdid
      language = sy-langu
      name     = text_id->tdname
      object   = 'KNVV'
  ...
ENDLOOP.

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
383

Hi karthik_sub,

I noticed that all of your questions are tagged with "ABAP Connectivity", but they never seem to be related to that topic. This only leads to unnecessary actions, e.g. people who don't have know-how and cannot contribute anyway, spending time and looking at the questions.

Let me explain, what "ABAP Connectivity" stands for: it is for HTTP and RFC communication mainly between an external program (C/C++, Java, .NET, Python, etc.) and an ABAP system. (But also between two ABAP systems.) Please consider this, before assigning the tag "ABAP Connectivity". This question here also looks like it has nothing to do with Connectivity, so I'm removing the tag for now.

Regards, Ulrich

Sandra_Rossi
Active Contributor
0 Kudos
383
ulrich.schmidt Also, all these tags have no relationship with the question:

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
383

sandra.rossi, thanks for letting me know. Removing those as well...