Application Development and Automation 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: 
Read only

BAPI_CHARACT_ADDLONGTEXT

former_member599326
Participant
0 Likes
1,313

I m using "BAPI_CHARACT_ADDLONGTEXT" to add the long text to character.. but when i m checking the tcode CT04 long text is not visible.. i m using commit after "BAPI_CHARACT_ADDLONGTEXT".. my code is as below..

REFRESH I_BAPI_CHAR_RET.

         CALL FUNCTION 'BAPI_CHARACT_GETLONGTEXT'

           EXPORTING

             CHARACTNAME  = R_ATNAM-LOW

             VALUE_CHAR   = WA_E1CAWNM-ATWRT

             KEYDATE      = SY-DATUM

             LANGUAGE_INT = SY-LANGU

           TABLES

             LONGTEXT     = IT_LONGTEXT

             RETURN       = I_BAPI_CHAR_RET.

         READ TABLE I_BAPI_CHAR_RET WITH KEY TYPE = 'S'.

         IF SY-SUBRC = 0.

         ELSE.

           REFRESH : I_BAPI_CHAR_RET, IT_LONGTEXT.

           LOOP AT IT_E1TXTL1 INTO WA_E1TXTL1.

             CLEAR WA_LONGTEXT.

             WA_LONGTEXT-TDFORMAT = WA_E1TXTL1-TDFORMAT.

             WA_LONGTEXT-TDLINE   = WA_E1TXTL1-TDLINE.

             APPEND WA_LONGTEXT TO IT_LONGTEXT.

             CLEAR WA_E1TXTL1.

           ENDLOOP.

           CALL FUNCTION 'BAPI_CHARACT_ADDLONGTEXT'

             EXPORTING

               CHARACTNAME  = R_ATNAM-LOW

               VALUE_CHAR   = WA_E1CAWNM-ATWRT

               KEYDATE      = SY-DATUM

               LANGUAGE_INT = SY-LANGU

             TABLES

               LONGTEXT     = IT_LONGTEXT

               RETURN       = I_BAPI_CHAR_RET.

           CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

         ENDIF.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,126

Did you check the RETURN table for error messages in the actual code (*)

(There may be errors related to interval value or invalid value of some parameters.)

Regards,

Raymond

(*) Usually I code a LOOP AT return INTO wa_bapiret2 WHERE type = 'E' OR type = 'A'. (and not looking for success message as some BAPIs don't return success message)

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,127

Did you check the RETURN table for error messages in the actual code (*)

(There may be errors related to interval value or invalid value of some parameters.)

Regards,

Raymond

(*) Usually I code a LOOP AT return INTO wa_bapiret2 WHERE type = 'E' OR type = 'A'. (and not looking for success message as some BAPIs don't return success message)

Read only

0 Likes
1,126

following is the return table messages..

Long text created in language "EN"

Processing characteristic SVB_TEST_S

Characteristic SVB_TEST_S changed

Read only

0 Likes
1,126

my values for FM "BAPI_CHARACT_ADDLONGTEXT" as follows..

CHARACTNAME - SVB_OTHR_I

VALUE_CHAR - C61D

LANGUAGE_INT - 'EN'

though there is no error in BAPI. the text is not visible in CT04 against value 'C61D' in values column...

Read only

0 Likes
1,126