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: 

IDOC: How to increase tdline length from 70char

dhinesh_thirugnanam
Active Participant
0 Kudos

Hi All,

I would like to increase the field length of tdline from char 70 to 132.

Any ideas how to do it.

7 REPLIES 7

Sandra_Rossi
Active Contributor
0 Kudos

You probably don't need to extend it. Why do you want so?

dhinesh_thirugnanam
Active Participant
0 Kudos

I have text that extends more than 70 char.But tdline holds only 70 char.

Sandra_Rossi
Active Contributor

It's not a problem to continue texts on the next line via TDFORMAT value:

  • empty/two spaces
  • = ("long line")

Meaning:

  • Space : concatenate current line with previous line, considering there's one space between ("All text lines directly after it which have blanks in this field belong to this paragraph. These lines are handled as continuous text lines and are always formatted by the SAPscript editor so that as many words as possible fit into an editor line.")
  • = : concatenate current line with previous line, considering there's NO space between

More information: SAP Library - Structure TLINE of the Lines Table

EDIT:

If you need to resize TDLINE in case you move it to a shortest place (e.g. from 72 or 132 to the 70 characters of E1EDKT2-TDLINE), you may use FORMAT_TEXTLINES:

DATA lines TYPE TABLE OF tline.
CALL FUNCTION 'FORMAT_TEXTLINES'
  EXPORTING
    formatwidth = 72
    linewidth   = 70
  TABLES
    lines       = lines
  EXCEPTIONS
    bound_error = 1
    OTHERS      = 2.

0 Kudos

Hi Sandra,

Thank for the reply.

However the issue I am facing is not in S010 text. I have text maintained in So10 then using a exit I populate the Idoc.

(<lfs_line>-tdline) is the work area which has 72 char.

While I need to populate the text in the lwa_e1edkt2-tdline that has a field length of 70char.

Below is the code:

lwa_e1edkt2-tdline = <lfs_line>-tdline.

If I pass the tdline,the last 2 char is left and added to the next line.

0 Kudos

Difficult to understand which version of your question is the right one, either to go from 70 to 132, or from 72 to 70...

Anyway, I have edited my answer.

0 Kudos

I have text which is more than 70char length.However tdline field length is only 70.

So,I want the tdline field length to be extended to 132.

I am passing my text to e1edkt2-tdline where tdline can accomdate only 70 char.Is there a way to extend to 132char.

As I already said, if you understand ITF (you should, it's documented and it's a very simple format), most of the time you don't need to extend to 132, keep it at 70, and it will be interpreted exactly in the same way (except if some custom applications are buggy). The only case it would not be interpreted correctly is if you have a long line with no space at all (all dash for instance), i.e. using paragraph format = especially.

If you want to go from 70 to 132 technically speaking, read carefully my answer which explains how to go from 72 to 70, you can change the numbers of course.