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 function Module

Former Member
0 Likes
1,725

Hi,

When i use READ_TEXT function Module,in output i get TD and TDLINE fields. For one input i am getting '*' in TD and 'XYZ' text in TDLINE and for another input i am getting ' ' in TD and 'ABC' text in TDLINE. So in how and where this TD line is maintained? As sometimes we i am getting * and sometimes it is initial.

We are using it in the Script for Purchase Order Output.

Please Suggest me...

4 REPLIES 4
Read only

former_member418469
Participant
0 Likes
1,193

hi,

check the table STXH / STXD, and see whether entry exists then asSign Value to function module.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,193

Hello,

The first column TDFORMAT corresponds to the tag column of your long text.

When you go to the line editor, the first column is your "tag column" & i the second column you have the text similar to TDLINE structure.

  • --> default paragrapd

` ` --> continuous text

BR,

Suhas

PS: You can go to SO10 & check this out

Read only

Former Member
0 Likes
1,193

Hi,

If you will read the documentation of that function module, it will give you much more information. I think you can get your solution form there.

Pls follow the path: Main menu -> Goto -> Documentation.

Regrads,

Lokesh.

Read only

Former Member
0 Likes
1,193

Hi,

You can go through this sample code below:



TABLES: PBIM. 
* stxh, stxl, stxb - trans tables for text 
* ttxit - text on text-ids 
* ttxot - Short texts on text objects 
* Transaction MD63 
SELECT-OPTIONS: S_MATNR FOR PBIM-MATNR, 
                S_WERKS FOR PBIM-WERKS. 
DATA: BEGIN OF HTEXT. 
        INCLUDE STRUCTURE THEAD. 
DATA: END OF HTEXT. 
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. 
ENDSELECT. 
LOOP AT DTEXT. 
  WRITE:/ DTEXT-MATNR, DTEXT-TDLINE. 
ENDLOOP. 

Hope it helps

Regards

Mansi