Funktionsbaustein DELETE TEXT

Aus SAP-Wiki
Zur Navigation springenZur Suche springen

Dieser Funktionsbaustein DELETE_TEXT löscht einen Standard-Textbaustein. Diese Textbausteine lassen sich über die Transaktion SO10 pflegen.

Muster

CALL FUNCTION 'DELETE_TEXT'
  EXPORTING
"   CLIENT                = SY-MANDT
    ID                    =
    LANGUAGE              =
    NAME                  =
    OBJECT                =
"   SAVEMODE_DIRECT       = ' '
"   TEXTMEMORY_ONLY       = ' '
"   LOCAL_CAT             = ' '
" EXCEPTIONS
"   NOT_FOUND             = 1
"   OTHERS                = 2
          .
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

Coding

   Data: gs_header TYPE thead.

   ... "füllen gs_header

   CALL FUNCTION 'DELETE_TEXT'
     EXPORTING
       id                    = gs_header-TDID
       language              = gs_header-TDSPRAS
       NAME                  = gs_header-TDNAME
       OBJECT                = gs_header-TDOBJECT
*      SAVEMODE_DIRECT       = ' '
*      TEXTMEMORY_ONLY       = ' '
*      LOCAL_CAT             = ' '
     EXCEPTIONS
       NOT_FOUND             = 1
       OTHERS                = 2.
              
   IF sy-subrc <> 0.
     break-point.
   ENDIF.

Literatur