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: 

Material Long text assigning problem using FM 'SAVE_TEXT'

Former Member
0 Kudos

Hello All,

I am trying to populate the long text of a material(MM02) using FM 'SAVE_TEXT'.

I am passing the IT table to TABLES->LINES.

My IT contains the long text with 4 lines like below

Line No Text

1 Cartridge-Ausfü hrung

2 Anschl in NPT-Gew

3 ASTM-Werkstoffe für

4 Antriebseite

The long text is getting saved for the specified material. This can be verified by

MM03 select view Basic data 1 ->click on 'Additional data' tab-> click on 'Basic data' tab

Like below

Cartridge-Ausfü hrung Anschl in NPT-Gew ASTM-Werkstoffe für

Antriebseite

This Long text is getting saved two line but I want to save in the same format as it is in IT table above in the long text editor of material like

Cartridge-Ausfü hrung

Anschl in NPT-Gew

ASTM-Werkstoffe für

Antriebseite

I have used tdlinesize and tdtxtlines in header structure THEAD but did not work.

I looking for the greatefull answer.

Regards,

venkatesh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Concatenate CL_ABAP_CHAR_UTILITIES=>CR_LF at the end of each line in the internal table

3 REPLIES 3

Former Member
0 Kudos

Concatenate CL_ABAP_CHAR_UTILITIES=>CR_LF at the end of each line in the internal table

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

Pass TLINE-TDFORMAT (In LINES internal table ) as / (Slash). It works fine.

Thanks,

Vinod.

Former Member
0 Kudos

hi,

this is happening because for long text each line is of 132 lenghths.

Since your each line length is less than 132 charcters , it is concatenating the simultanious lines .

here you can have work around like add spaces after each line so that it has 132 length.

you can concatenate the line end character CL_ABAP_CHAR_UTILITIES=>CR_LF at end of each line so it treats all the lines differently.