SAP Function Modules

C14SX_DOCUMENT_TEXT_CHANGE SAP Function module







C14SX_DOCUMENT_TEXT_CHANGE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name C14SX_DOCUMENT_TEXT_CHANGE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: C14SX
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM C14SX_DOCUMENT_TEXT_CHANGE - C14SX DOCUMENT TEXT CHANGE





CALL FUNCTION 'C14SX_DOCUMENT_TEXT_CHANGE' "
  EXPORTING
    i_doccat =                  " draw-dokar
    i_docno =                   " draw-doknr
*   i_partdoc = '000'           " draw-doktl
*   i_version = '00'            " draw-dokvr
*   i_langu = SY-LANGU          " sy-langu
    i_doktext =                 " drat-dktxt
  EXCEPTIONS
    DOCCAT_NEEDED = 1           "
    DOCUMENT_NOT_EXISTS = 2     "
    DOCNO_NEEDED = 3            "
    .  "  C14SX_DOCUMENT_TEXT_CHANGE

ABAP code example for Function Module C14SX_DOCUMENT_TEXT_CHANGE





The ABAP code below is a full code listing to execute function module C14SX_DOCUMENT_TEXT_CHANGE including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

 

SELECT single DOKAR
FROM DRAW
INTO @DATA(ld_i_doccat).


SELECT single DOKNR
FROM DRAW
INTO @DATA(ld_i_docno).


SELECT single DOKTL
FROM DRAW
INTO @DATA(ld_i_partdoc).


SELECT single DOKVR
FROM DRAW
INTO @DATA(ld_i_version).

DATA(ld_i_langu) = 'Check type of data required'.

SELECT single DKTXT
FROM DRAT
INTO @DATA(ld_i_doktext).
. CALL FUNCTION 'C14SX_DOCUMENT_TEXT_CHANGE' EXPORTING i_doccat = ld_i_doccat i_docno = ld_i_docno * i_partdoc = ld_i_partdoc * i_version = ld_i_version * i_langu = ld_i_langu i_doktext = ld_i_doktext EXCEPTIONS DOCCAT_NEEDED = 1 DOCUMENT_NOT_EXISTS = 2 DOCNO_NEEDED = 3 . " C14SX_DOCUMENT_TEXT_CHANGE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_i_doccat  TYPE DRAW-DOKAR ,
ld_i_docno  TYPE DRAW-DOKNR ,
ld_i_partdoc  TYPE DRAW-DOKTL ,
ld_i_version  TYPE DRAW-DOKVR ,
ld_i_langu  TYPE SY-LANGU ,
ld_i_doktext  TYPE DRAT-DKTXT .


SELECT single DOKAR
FROM DRAW
INTO ld_i_doccat.


SELECT single DOKNR
FROM DRAW
INTO ld_i_docno.


SELECT single DOKTL
FROM DRAW
INTO ld_i_partdoc.


SELECT single DOKVR
FROM DRAW
INTO ld_i_version.

ld_i_langu = 'Check type of data required'.

SELECT single DKTXT
FROM DRAT
INTO ld_i_doktext.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name C14SX_DOCUMENT_TEXT_CHANGE or its description.