SAP Function Modules

KBPS_SHOW_VERSIONS SAP Function module - Output of all available versions of an object







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

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


Pattern for FM KBPS_SHOW_VERSIONS - KBPS SHOW VERSIONS





CALL FUNCTION 'KBPS_SHOW_VERSIONS' "Output of all available versions of an object
  EXPORTING
    applik =                    " bpin-applik   Application
*   object = SPACE              " bpin-objnr
*   object = SPACE              " bpin-objnr    RW object number (order, project)
*   wrttp = SPACE               " bpin-wrttp
*   wrttp = SPACE               " bpin-wrttp    Value type, if initial - then plan
*   wrttp2 = SPACE              " bpin-wrttp
*   geber = SPACE               " bpin-geber
*   geber_all = SPACE           "               All sources of funds
*   im_kokrs = SPACE            " bpin-kokrs
*   im_cop_versn = SPACE        "
*   im_all_versn = SPACE        "
  IMPORTING
    version =                   " bpin-versn
    version =                   " bpin-versn    Selected version
    verstxt =                   " bpdy-txt      Text of the selected version
  EXCEPTIONS
    NO_VERSIONS = 1             "               No versions exist
    .  "  KBPS_SHOW_VERSIONS

ABAP code example for Function Module KBPS_SHOW_VERSIONS





The ABAP code below is a full code listing to execute function module KBPS_SHOW_VERSIONS 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_version  TYPE BPIN-VERSN ,
ld_version  TYPE BPIN-VERSN ,
ld_verstxt  TYPE BPDY-TXT .


DATA(ld_applik) = some text here

DATA(ld_object) = some text here

DATA(ld_object) = some text here

DATA(ld_wrttp) = some text here

DATA(ld_wrttp) = some text here

DATA(ld_wrttp2) = some text here

DATA(ld_geber) = some text here
DATA(ld_geber_all) = 'some text here'.

DATA(ld_im_kokrs) = some text here
DATA(ld_im_cop_versn) = 'some text here'.
DATA(ld_im_all_versn) = 'some text here'. . CALL FUNCTION 'KBPS_SHOW_VERSIONS' EXPORTING applik = ld_applik * object = ld_object * object = ld_object * wrttp = ld_wrttp * wrttp = ld_wrttp * wrttp2 = ld_wrttp2 * geber = ld_geber * geber_all = ld_geber_all * im_kokrs = ld_im_kokrs * im_cop_versn = ld_im_cop_versn * im_all_versn = ld_im_all_versn IMPORTING version = ld_version version = ld_version verstxt = ld_verstxt EXCEPTIONS NO_VERSIONS = 1 . " KBPS_SHOW_VERSIONS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_version  TYPE BPIN-VERSN ,
ld_version  TYPE BPIN-VERSN ,
ld_applik  TYPE BPIN-APPLIK ,
ld_verstxt  TYPE BPDY-TXT ,
ld_object  TYPE BPIN-OBJNR ,
ld_object  TYPE BPIN-OBJNR ,
ld_wrttp  TYPE BPIN-WRTTP ,
ld_wrttp  TYPE BPIN-WRTTP ,
ld_wrttp2  TYPE BPIN-WRTTP ,
ld_geber  TYPE BPIN-GEBER ,
ld_geber_all  TYPE STRING ,
ld_im_kokrs  TYPE BPIN-KOKRS ,
ld_im_cop_versn  TYPE STRING ,
ld_im_all_versn  TYPE STRING .


ld_applik = some text here

ld_object = some text here

ld_object = some text here

ld_wrttp = some text here

ld_wrttp = some text here

ld_wrttp2 = some text here

ld_geber = some text here
ld_geber_all = 'some text here'.

ld_im_kokrs = some text here
ld_im_cop_versn = 'some text here'.
ld_im_all_versn = '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 KBPS_SHOW_VERSIONS or its description.