SAP Function Modules

FVVN_COMPOSE_NUMBER SAP Function module - Composition Number







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

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


Pattern for FM FVVN_COMPOSE_NUMBER - FVVN COMPOSE NUMBER





CALL FUNCTION 'FVVN_COMPOSE_NUMBER' "Composition Number
* EXPORTING
*   fb_call_repid = SPACE       " sy-repid
*   fb_ranl = SPACE             " vdarl-ranl    Contract Number
*   num_object = 'FVVD_RANL'    " tnrot-object  Nummernkreisobjekt   (Intervall: Tab. TZN01)
*   num_target = 'VDARL-RANL'   " rs38l-importlike  Zieltabelle und -feld, für die Nr. erzeugt wird
*   srgrp = SPACE               " tpz12-appl    Anwendungsbereich für Partnersuche
*   i_memory = 'X'              " boole-boole   Memory bei Neuanlage von Objekten mit Stammnummer: TRUE (='X') und FALSE (=' ')
  IMPORTING
    selected_partner =          " but000        Main contract partner
    change_object =             " boole-boole   Objektdaten geändert: TRUE (='X') und FALSE (=' ')
  TABLES
    ivdarlobj =                 " vdarlobj
  CHANGING
    c_vdarl =                   " vdarl         Loan
  EXCEPTIONS
    CANCELED = 1                "               Termination by User
    NO_NUMBER = 2               "               keine Nummernkomposition aktiv
    ERROR = 3                   "               Nummer nicht korrekt generiert
    .  "  FVVN_COMPOSE_NUMBER

ABAP code example for Function Module FVVN_COMPOSE_NUMBER





The ABAP code below is a full code listing to execute function module FVVN_COMPOSE_NUMBER 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_selected_partner  TYPE BUT000 ,
ld_change_object  TYPE BOOLE-BOOLE ,
it_ivdarlobj  TYPE STANDARD TABLE OF VDARLOBJ,"TABLES PARAM
wa_ivdarlobj  LIKE LINE OF it_ivdarlobj .

DATA(ld_c_vdarl) = 'Check type of data required'.
DATA(ld_fb_call_repid) = '20210129'.

SELECT single RANL
FROM VDARL
INTO @DATA(ld_fb_ranl).


SELECT single OBJECT
FROM TNROT
INTO @DATA(ld_num_object).


DATA(ld_num_target) = some text here

SELECT single APPL
FROM TPZ12
INTO @DATA(ld_srgrp).


DATA(ld_i_memory) = some text here

"populate fields of struture and append to itab
append wa_ivdarlobj to it_ivdarlobj. . CALL FUNCTION 'FVVN_COMPOSE_NUMBER' * EXPORTING * fb_call_repid = ld_fb_call_repid * fb_ranl = ld_fb_ranl * num_object = ld_num_object * num_target = ld_num_target * srgrp = ld_srgrp * i_memory = ld_i_memory IMPORTING selected_partner = ld_selected_partner change_object = ld_change_object TABLES ivdarlobj = it_ivdarlobj CHANGING c_vdarl = ld_c_vdarl EXCEPTIONS CANCELED = 1 NO_NUMBER = 2 ERROR = 3 . " FVVN_COMPOSE_NUMBER
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_c_vdarl  TYPE VDARL ,
ld_selected_partner  TYPE BUT000 ,
ld_fb_call_repid  TYPE SY-REPID ,
it_ivdarlobj  TYPE STANDARD TABLE OF VDARLOBJ ,
wa_ivdarlobj  LIKE LINE OF it_ivdarlobj,
ld_change_object  TYPE BOOLE-BOOLE ,
ld_fb_ranl  TYPE VDARL-RANL ,
ld_num_object  TYPE TNROT-OBJECT ,
ld_num_target  TYPE RS38L-IMPORTLIKE ,
ld_srgrp  TYPE TPZ12-APPL ,
ld_i_memory  TYPE BOOLE-BOOLE .

ld_c_vdarl = 'some text here'.
ld_fb_call_repid = '20210129'.

"populate fields of struture and append to itab
append wa_ivdarlobj to it_ivdarlobj.

SELECT single RANL
FROM VDARL
INTO ld_fb_ranl.


SELECT single OBJECT
FROM TNROT
INTO ld_num_object.


ld_num_target = some text here

SELECT single APPL
FROM TPZ12
INTO ld_srgrp.


ld_i_memory = 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 FVVN_COMPOSE_NUMBER or its description.