Skip to Content
avatar image
Former Member

Update long text description using BAPI_CLASS_CREATE


I created a class for class type "001" using BAPI_CLASS_CREATE. It works fine. But have issues while updating the Long Text :

How to populate the long text and pass it as a parameter to the CLASSLONGTEXTS Bapi ?

Here is my code trying to update multiple lines for the long text.

data: it_class_long_texts LIKE BAPI1003_LONGTEXT OCCURS 0 WITH HEADER LINE.

**Class Long Texts En

*Long text line 1

it_class_long_texts-LANGU = 'EN'.

it_class_long_texts-LANGU_ISO = 'EN'.

it_class_long_texts-TEXT_DESCR = 'line 1 for long text'.

it_class_long_texts-TEXT_LINE = 1.

APPEND it_bapi_class_long_texts.

*Long text line 2

it_class_long_texts-LANGU = 'EN'.

it_class_long_texts-LANGU_ISO = 'EN'.

it_class_long_texts-TEXT_DESCR = 'line 2 for long text'.

it_class_long_texts-TEXT_LINE = 2.

APPEND it_bapi_class_long_texts.





CLASSBASICDATA = lv_cls_bas_dat

CLASSSTANDARD = lv_cls_standard


RETURN = it_bapi_return

CLASSDESCRIPTIONS = it_bapi_cls_desc

CLASSLONGTEXTS = it_class_long_texts.



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Apr 11, 2016 at 03:51 PM

    If the class is already created then you may have to use 'BAPI_CLASS_CHANGE' not 'CREATE'.

    OR else the issue is with 'append it_bapi_class_long_texts'. It should be 'append it_class_long_texts'.


    Add comment
    10|10000 characters needed characters exceeded

    • Can you just add one line and see what happens? Just use the following code:

      it_class_long_texts-langu = 'EN'.

      it_class_long_texts-text_descr = 'line 1 for long text'.

      append it_class_long_texts.

      If it does not work then copy and paste your code.