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 not returning full text in a line

Former Member
0 Likes
1,106

Hi,

I am using Read_Text function module to retrieve long text entered for line item in AR Invoice.

The issue is that the lines returned in thead are not complete.

Example:

Line entered in Long Text is as below:

Line Number one in the accounting document. Entered as 800 EUR including

VAT

When I check in debugging the lines returned by Read_Text is as below:

Line Number one in the accounting document. Entered as 800 EUR includi

VAT

The 'ng' of including in 1st line is not returned by read_text. The text 'ng' in line editor is placed in the position as shown below just after 7

........1........2........3........4........5........6....+....7..

ng

Kindly let me know if there is any way to get the whole line or a way in which we can restrict the line size alowed to enter till 7 only.

Warm Regards,

Abhishek

5 REPLIES 5
Read only

Former Member
0 Likes
856

Hi,

Declare it_lines as below and use in code:



TYPES: BEGIN OF ws_tline.
        INCLUDE STRUCTURE tline.
TYPES: END OF ws_tline.


DATA:  it_lines TYPE ws_tline.

    CALL FUNCTION 'READ_TEXT'
      EXPORTING
*
*
      TABLES
        lines                         =  *it_lines*
*   EXCEPTIONS

              .
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.


Reg,

Sachin

Read only

Former Member
0 Likes
856

Please check item text going through standard SAP transaction. It might happen that this text is entered in two separate lines. Else I do not see you should get this error.

Read only

0 Likes
856

Hi Sunil,

Thanks for your comments.

I have checked the item line. In place of item text a long text is maintained. It is this long text which needs to be displayed. I opened the long text and saw the saved lines. The word including does not spread to the next line, yet it is not retunred full in lines of thead.

Warm Regards,

Abhishek

Read only

Former Member
0 Likes
856

Hi,

The issue is resolved. It was a basis setting error. Through basis settings the size of line returned in tline can be controlled. Sometimes after upgrade or unicode project the line size increases, if this happens then it needs to be reduced by the basis person.

Abhishek

Read only

0 Likes
856

Dear Abhishek!

            Could you please provide me the solution for the basis setting .I am facing same problem in my program.