SAP Function Modules

OIRB_STATUS_CREATE SAP Function module - Create a new status for the business location







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

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


Pattern for FM OIRB_STATUS_CREATE - OIRB STATUS CREATE





CALL FUNCTION 'OIRB_STATUS_CREATE' "Create a new status for the business location
  EXPORTING
    i_last_status =             " roirb0320     Last status (screen display table)
    i_pblnr =                   " oifspbl-pblnr
    i_rnbt =                    " oirarnbt-rnbt
    i_pbltyp =                  " oifspbl-pbltyp
    i_ds_rnbt =                 " oirarnbt-rnbt
    i_ds_trtyp =                " t180-trtyp
  IMPORTING
    e_oirbpblstat =             " roirbpblstat  New status (database update table)
    e_roirb0320 =               " roirb0320     New status (screen display table)
  EXCEPTIONS
    NO_STATUS_CREATED = 1       "
    .  "  OIRB_STATUS_CREATE

ABAP code example for Function Module OIRB_STATUS_CREATE





The ABAP code below is a full code listing to execute function module OIRB_STATUS_CREATE 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_e_oirbpblstat  TYPE ROIRBPBLSTAT ,
ld_e_roirb0320  TYPE ROIRB0320 .

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

SELECT single PBLNR
FROM OIFSPBL
INTO @DATA(ld_i_pblnr).


SELECT single RNBT
FROM OIRARNBT
INTO @DATA(ld_i_rnbt).


SELECT single PBLTYP
FROM OIFSPBL
INTO @DATA(ld_i_pbltyp).


SELECT single RNBT
FROM OIRARNBT
INTO @DATA(ld_i_ds_rnbt).


SELECT single TRTYP
FROM T180
INTO @DATA(ld_i_ds_trtyp).
. CALL FUNCTION 'OIRB_STATUS_CREATE' EXPORTING i_last_status = ld_i_last_status i_pblnr = ld_i_pblnr i_rnbt = ld_i_rnbt i_pbltyp = ld_i_pbltyp i_ds_rnbt = ld_i_ds_rnbt i_ds_trtyp = ld_i_ds_trtyp IMPORTING e_oirbpblstat = ld_e_oirbpblstat e_roirb0320 = ld_e_roirb0320 EXCEPTIONS NO_STATUS_CREATED = 1 . " OIRB_STATUS_CREATE
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_e_oirbpblstat  TYPE ROIRBPBLSTAT ,
ld_i_last_status  TYPE ROIRB0320 ,
ld_e_roirb0320  TYPE ROIRB0320 ,
ld_i_pblnr  TYPE OIFSPBL-PBLNR ,
ld_i_rnbt  TYPE OIRARNBT-RNBT ,
ld_i_pbltyp  TYPE OIFSPBL-PBLTYP ,
ld_i_ds_rnbt  TYPE OIRARNBT-RNBT ,
ld_i_ds_trtyp  TYPE T180-TRTYP .

ld_i_last_status = 'Check type of data required'.

SELECT single PBLNR
FROM OIFSPBL
INTO ld_i_pblnr.


SELECT single RNBT
FROM OIRARNBT
INTO ld_i_rnbt.


SELECT single PBLTYP
FROM OIFSPBL
INTO ld_i_pbltyp.


SELECT single RNBT
FROM OIRARNBT
INTO ld_i_ds_rnbt.


SELECT single TRTYP
FROM T180
INTO ld_i_ds_trtyp.

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