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: 

long text in bapi

Former Member
0 Kudos

Hi

I am trying to save a long text for material. to do this, I have to fill a table of type bapi_mltx.

If I insert one line all works correctluy, but if I try to insert more than one line, other lines are ignored and I can see only the first seem to be read. This is my code.

it_mltx-langu = lang.
  it_mltx-langu_iso = iso_lang.

  " insert first line
  it_mltx-text_line = line1.
  it_mltx-format_col = '*'.
  APPEND it_mltx.

  " insert second line
  it_mltx-text_line = line2.
  it_mltx-format_col = '='.
  APPEND it_mltx.

I follow a precedent hint adding the format_col field with '*' for first line and '=' for following, but it does not work. Can anybody help me please?

thanks

gabriele

5 REPLIES 5

Pawan_Kesari
Active Contributor
0 Kudos

I hope rest all values are same of each line

APPLOBJECT

TEXT_NAME

TEXT_ID

LANGU

LANGU_ISO

former_member222860
Active Contributor
0 Kudos

Use Clear after every append.

APPEND it_mltx. CLEAR it_mltx.

former_member585060
Active Contributor
0 Kudos

Hi,

Use '*' for second line also, not '=' and see weather the second line coming or not.

it_mltx-langu = lang.
  it_mltx-langu_iso = iso_lang.
 
  " insert first line
  it_mltx-text_line = line1.
  it_mltx-format_col = '*'.
  APPEND it_mltx.
 
  " insert second line
  it_mltx-text_line = line2.
  it_mltx-format_col = '*'.                                        " Change here to *
  APPEND it_mltx.

Regards

Bala Krishna

0 Kudos

I tried the solutions suggested, but they don't work.

I don't know if it's important, but the bapi I am using to store material data is BAPI_MATERIAL_SAVEDATA .

0 Kudos

thanks

putting '*' all works

best regards

gabriele