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: 

save_text

former_member599326
Participant
0 Kudos

Hi

i m using save text function as below..

         WA_HEAD-TDOBJECT = 'CHARACTER'.

         CONCATENATE R_ATNAM-LOW WA_E1CAWTM-ATWTB INTO WA_HEAD-TDNAME.

         WA_HEAD-TDID = 'DML'.

         WA_HEAD-TDSPRAS = SY-LANGU.

         WA_HEAD-TDTITLE = 'TEST'.

         WA_HEAD-TDFORM = 'SYSTEM'.

         WA_HEAD-TDFUSER = SY-UNAME.

         WA_LINES-TDFORMAT = '*'.

         LOOP AT IT_E1TXTL1 INTO WA_E1TXTL1.

           CLEAR WA_LINES.

           WA_LINES-TDLINE = WA_E1TXTL1-TDLINE.

           APPEND WA_LINES TO GT_LINES.

           CLEAR WA_E1TXTL1.

         ENDLOOP.

         CALL FUNCTION 'SAVE_TEXT'

           EXPORTING

             CLIENT          = SY-MANDT

             HEADER          = WA_HEAD

             SAVEMODE_DIRECT = ' '

           TABLES

             LINES           = GT_LINES

           EXCEPTIONS

             ID              = 1

             LANGUAGE        = 2

             NAME            = 3

             OBJECT          = 4

             OTHERS          = 5.

         IF SY-SUBRC EQ 0.

           COMMIT WORK.

         ENDIF.

By this code value is getting created in table STXH but not visible in CT04 .. can u pls help ??

Regards,

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

I suppose there was no existing long text for the characteristic, so there should be (somewhere) a initial flag for long text; and CT04 don't read the saved long text.

First perform a call to BAPI_CHARACT_GETLONGTEXT to check existence of long text, and if none found, use BAPI_CHARACT_ADDLONGTEXT to add your text.

Regards,

Raymond

PS: Are you sure of object and id, should it be object FEATURE and id HEAD in CT04 ?

2 REPLIES 2

Former Member
0 Kudos

Hi,

I think before SAVE_TEXT. You need to use CREATE_TEXT function module...

Regards,

Venkat.

raymond_giuseppi
Active Contributor
0 Kudos

I suppose there was no existing long text for the characteristic, so there should be (somewhere) a initial flag for long text; and CT04 don't read the saved long text.

First perform a call to BAPI_CHARACT_GETLONGTEXT to check existence of long text, and if none found, use BAPI_CHARACT_ADDLONGTEXT to add your text.

Regards,

Raymond

PS: Are you sure of object and id, should it be object FEATURE and id HEAD in CT04 ?