Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Update long text description using BAPI_CLASS_CREATE

Hi,

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.


CALL FUNCTION 'BAPI_CLASS_CREATE'

     EXPORTING

       CLASSNUMNEW       = LV_CLASS_NAME    

       CLASSTYPENEW      = '001'                 

       CLASSBASICDATA    = lv_cls_bas_dat

       CLASSSTANDARD     = lv_cls_standard

     TABLES

       RETURN            =                     it_bapi_return

       CLASSDESCRIPTIONS = it_bapi_cls_desc

       CLASSLONGTEXTS    = it_class_long_texts.

Regards,

Vicky

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question