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

ABAP program - How to use Standard Text

pintoo_d
Participant
0 Likes
2,604

Hi.

I want to read standard text. i know there are Fn module Read_text. but not sure how to call in program.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,232

Hello,

This link can help you.

[;

Thanks,

Jayant.

Search SCN before posting.

Hi.

I want to read standard text. i know there are Fn module Read_text. but not sure how to call in program.

Thanks

7 REPLIES 7
Read only

Former Member
0 Likes
1,232

HI,

check this and pass the required fields

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = <id>

language = <langu>

name = <name>

object =<object>

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

lines = itab

  • 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.

Read only

GauthamV
Active Contributor
0 Likes
1,232

SEARCH in SCN by giving READ_TEXT you will get lot of posts.

Read only

Former Member
0 Likes
1,232

Hi,

try like this....

CALL FUNCTION 'READ_TEXT'

EXPORTING

client =sy-mandt "

id = 'NAME'

language = sy-langu

name = ST'

object = 'TEXT'

TABLES

lines = lt_tline

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

Regards,

Kalp..

Read only

Former Member
0 Likes
1,232

Hi Pintoo,

Please be clear of what you are expecting from the FORUM.

to call a function module just click on the PATTERN button provided in ABAP editor.

feel free to come back to get the required solution.

Regards

Ramchander Rao.K

Read only

Former Member
0 Likes
1,233

Hello,

This link can help you.

[;

Thanks,

Jayant.

Search SCN before posting.

Read only

Former Member
0 Likes
1,232

hi,,,,


DATA: BEGIN OF LTEXT OCCURS 50. 
        INCLUDE STRUCTURE TLINE. 
DATA: END OF LTEXT. 

DATA: BEGIN OF DTEXT OCCURS 50. 
DATA:   MATNR LIKE PBIM-MATNR. 
        INCLUDE STRUCTURE TLINE. 
DATA: END OF DTEXT. 

DATA: TNAME LIKE THEAD-TDNAME. 

SELECT * FROM PBIM WHERE WERKS IN S_WERKS. 
  MOVE PBIM-BDZEI TO TNAME. 


CALL FUNCTION 'READ_TEXT' 
       EXPORTING 
*           CLIENT                  = SY-MANDT 
          ID                      = 'PB' 
          LANGUAGE                = 'E' 
          NAME                    = TNAME 
          OBJECT                  = 'PBPT' 
*         ARCHIVE_HANDLE          = 0 
     IMPORTING 
          HEADER                  = HTEXT 
     TABLES 
          LINES                   = LTEXT 
     EXCEPTIONS 
          ID                      = 1 
          LANGUAGE                = 2 
          NAME                    = 3 
          NOT_FOUND               = 4 
          OBJECT                  = 5 
          REFERENCE_CHECK         = 6 
          WRONG_ACCESS_TO_ARCHIVE = 7 
          OTHERS                  = 8. 
  LOOP AT LTEXT. 
    IF LTEXT-TDLINE NE ''. 
      MOVE LTEXT-TDLINE TO DTEXT-TDLINE. 
      MOVE PBIM-MATNR TO DTEXT-MATNR. 
      APPEND DTEXT. 
    ENDIF. 
  ENDLOOP. 

Thanks

Saurabh

Read only

former_member203501
Active Contributor
0 Likes
1,232

hi see this ...