SAP Function Modules

FILL_ND_STRING SAP Function module - Append a field to the end of a string without break character







FILL_ND_STRING 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 FILL_ND_STRING into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM FILL_ND_STRING - FILL ND STRING





CALL FUNCTION 'FILL_ND_STRING' "Append a field to the end of a string without break character
  EXPORTING
    conve =                     " tcit-conve    Conversion exit
    conve =                     " tcit-conve    Conversion exit
    dblen =                     " tcid-dblen    Data base field length
    dblen =                     " tcid-dblen    Data base field length
    dtype =                     " tcit-dtype    Data type
    dtype =                     " tcit-dtype    Data type
    field =                     "               Field to be appended
    field =                     "               Field to be appended
    fldln =                     " tcid-fldln    Length defined by the user in tabl
    fldln =                     " tcid-fldln    Length defined by the user in table TCID
    locat =                     "               End of the used part of the string
    locat =                     "               End of the used part of the string
    strng =                     "               String
    strng =                     "               String
  IMPORTING
    rloct =                     "               New last position of the used stri
    rloct =                     "               New last position of the used string part
    rstrg =                     "               Resulting string
    rstrg =                     "               Resulting string
    .  "  FILL_ND_STRING

ABAP code example for Function Module FILL_ND_STRING





The ABAP code below is a full code listing to execute function module FILL_ND_STRING 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).

DATA:
ld_rloct  TYPE STRING ,
ld_rloct  TYPE STRING ,
ld_rstrg  TYPE STRING ,
ld_rstrg  TYPE STRING .


SELECT single CONVE
FROM TCIT
INTO @DATA(ld_conve).


SELECT single CONVE
FROM TCIT
INTO @DATA(ld_conve).


SELECT single DBLEN
FROM TCID
INTO @DATA(ld_dblen).


SELECT single DBLEN
FROM TCID
INTO @DATA(ld_dblen).


SELECT single DTYPE
FROM TCIT
INTO @DATA(ld_dtype).


SELECT single DTYPE
FROM TCIT
INTO @DATA(ld_dtype).

DATA(ld_field) = 'some text here'.
DATA(ld_field) = 'some text here'.

SELECT single FLDLN
FROM TCID
INTO @DATA(ld_fldln).


SELECT single FLDLN
FROM TCID
INTO @DATA(ld_fldln).

DATA(ld_locat) = 'some text here'.
DATA(ld_locat) = 'some text here'.
DATA(ld_strng) = 'some text here'.
DATA(ld_strng) = 'some text here'. . CALL FUNCTION 'FILL_ND_STRING' EXPORTING conve = ld_conve conve = ld_conve dblen = ld_dblen dblen = ld_dblen dtype = ld_dtype dtype = ld_dtype field = ld_field field = ld_field fldln = ld_fldln fldln = ld_fldln locat = ld_locat locat = ld_locat strng = ld_strng strng = ld_strng IMPORTING rloct = ld_rloct rloct = ld_rloct rstrg = ld_rstrg rstrg = ld_rstrg . " FILL_ND_STRING
IF SY-SUBRC EQ 0. "All OK 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_rloct  TYPE STRING ,
ld_rloct  TYPE STRING ,
ld_conve  TYPE TCIT-CONVE ,
ld_conve  TYPE TCIT-CONVE ,
ld_rstrg  TYPE STRING ,
ld_rstrg  TYPE STRING ,
ld_dblen  TYPE TCID-DBLEN ,
ld_dblen  TYPE TCID-DBLEN ,
ld_dtype  TYPE TCIT-DTYPE ,
ld_dtype  TYPE TCIT-DTYPE ,
ld_field  TYPE STRING ,
ld_field  TYPE STRING ,
ld_fldln  TYPE TCID-FLDLN ,
ld_fldln  TYPE TCID-FLDLN ,
ld_locat  TYPE STRING ,
ld_locat  TYPE STRING ,
ld_strng  TYPE STRING ,
ld_strng  TYPE STRING .


SELECT single CONVE
FROM TCIT
INTO ld_conve.


SELECT single CONVE
FROM TCIT
INTO ld_conve.


SELECT single DBLEN
FROM TCID
INTO ld_dblen.


SELECT single DBLEN
FROM TCID
INTO ld_dblen.


SELECT single DTYPE
FROM TCIT
INTO ld_dtype.


SELECT single DTYPE
FROM TCIT
INTO ld_dtype.

ld_field = 'some text here'.
ld_field = 'some text here'.

SELECT single FLDLN
FROM TCID
INTO ld_fldln.


SELECT single FLDLN
FROM TCID
INTO ld_fldln.

ld_locat = 'some text here'.
ld_locat = 'some text here'.
ld_strng = 'some text here'.
ld_strng = 'some text here'.

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 FILL_ND_STRING or its description.