SAP Function Modules

OIK_TAS_DATA_MAINTAIN SAP Function module - IS-OIL/TAS: Maintenance of TAS-Data







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

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


Pattern for FM OIK_TAS_DATA_MAINTAIN - OIK TAS DATA MAINTAIN





CALL FUNCTION 'OIK_TAS_DATA_MAINTAIN' "IS-OIL/TAS: Maintenance of TAS-Data
  EXPORTING
    i_vbtyp =                   " oik01-vbtyp
    i_docno =                   " oik01-docno
    i_itemno =                  " oik01-itemno
    i_trtyp =                   " t185f-trtyp
*   i_valid_from = '00000000'   " oik01-fromdate
*   i_valid_to = '00000000'     " oik01-todate
*   i_roiklidscr =              " roiklidscr
*   i_multiple_lids = ' '       "
    i_hdyno =                   " sy-dynnr
*   i_lidtype =                 " oik01-lidtype
*   i_contrtyp =                " oik01-contrtyp
*   i_vehicle_id =              " oigv-vehicle
*   i_background = ' '          "
*   i_oikimport =               " roikimport
*   i_aktyp =                   " t180-aktyp    Activity category in SAP transaction
* TABLES
*   i_roiklidscr_tab =          " roiklidscr
*   i_oidmp_tab =               " vbpa          Sales Document: Partner
*   i_vbkd_tab =                " vbkd
  EXCEPTIONS
    DIALOG_CANCELLED = 1        "
    BACKGROUND_NOT_ALLOWED = 2  "
    NO_VALID_LID_FOUND = 3      "
    .  "  OIK_TAS_DATA_MAINTAIN

ABAP code example for Function Module OIK_TAS_DATA_MAINTAIN





The ABAP code below is a full code listing to execute function module OIK_TAS_DATA_MAINTAIN 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:
it_i_roiklidscr_tab  TYPE STANDARD TABLE OF ROIKLIDSCR,"TABLES PARAM
wa_i_roiklidscr_tab  LIKE LINE OF it_i_roiklidscr_tab ,
it_i_oidmp_tab  TYPE STANDARD TABLE OF VBPA,"TABLES PARAM
wa_i_oidmp_tab  LIKE LINE OF it_i_oidmp_tab ,
it_i_vbkd_tab  TYPE STANDARD TABLE OF VBKD,"TABLES PARAM
wa_i_vbkd_tab  LIKE LINE OF it_i_vbkd_tab .


SELECT single VBTYP
FROM OIK01
INTO @DATA(ld_i_vbtyp).


SELECT single DOCNO
FROM OIK01
INTO @DATA(ld_i_docno).


SELECT single ITEMNO
FROM OIK01
INTO @DATA(ld_i_itemno).


SELECT single TRTYP
FROM T185F
INTO @DATA(ld_i_trtyp).


SELECT single FROMDATE
FROM OIK01
INTO @DATA(ld_i_valid_from).


SELECT single TODATE
FROM OIK01
INTO @DATA(ld_i_valid_to).

DATA(ld_i_roiklidscr) = 'Check type of data required'.
DATA(ld_i_multiple_lids) = 'some text here'.
DATA(ld_i_hdyno) = 'some text here'.

SELECT single LIDTYPE
FROM OIK01
INTO @DATA(ld_i_lidtype).


SELECT single CONTRTYP
FROM OIK01
INTO @DATA(ld_i_contrtyp).


SELECT single VEHICLE
FROM OIGV
INTO @DATA(ld_i_vehicle_id).

DATA(ld_i_background) = 'some text here'.
DATA(ld_i_oikimport) = 'some text here'.

SELECT single AKTYP
FROM T180
INTO @DATA(ld_i_aktyp).


"populate fields of struture and append to itab
append wa_i_roiklidscr_tab to it_i_roiklidscr_tab.

"populate fields of struture and append to itab
append wa_i_oidmp_tab to it_i_oidmp_tab.

"populate fields of struture and append to itab
append wa_i_vbkd_tab to it_i_vbkd_tab. . CALL FUNCTION 'OIK_TAS_DATA_MAINTAIN' EXPORTING i_vbtyp = ld_i_vbtyp i_docno = ld_i_docno i_itemno = ld_i_itemno i_trtyp = ld_i_trtyp * i_valid_from = ld_i_valid_from * i_valid_to = ld_i_valid_to * i_roiklidscr = ld_i_roiklidscr * i_multiple_lids = ld_i_multiple_lids i_hdyno = ld_i_hdyno * i_lidtype = ld_i_lidtype * i_contrtyp = ld_i_contrtyp * i_vehicle_id = ld_i_vehicle_id * i_background = ld_i_background * i_oikimport = ld_i_oikimport * i_aktyp = ld_i_aktyp * TABLES * i_roiklidscr_tab = it_i_roiklidscr_tab * i_oidmp_tab = it_i_oidmp_tab * i_vbkd_tab = it_i_vbkd_tab EXCEPTIONS DIALOG_CANCELLED = 1 BACKGROUND_NOT_ALLOWED = 2 NO_VALID_LID_FOUND = 3 . " OIK_TAS_DATA_MAINTAIN
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_vbtyp  TYPE OIK01-VBTYP ,
it_i_roiklidscr_tab  TYPE STANDARD TABLE OF ROIKLIDSCR ,
wa_i_roiklidscr_tab  LIKE LINE OF it_i_roiklidscr_tab,
ld_i_docno  TYPE OIK01-DOCNO ,
it_i_oidmp_tab  TYPE STANDARD TABLE OF VBPA ,
wa_i_oidmp_tab  LIKE LINE OF it_i_oidmp_tab,
ld_i_itemno  TYPE OIK01-ITEMNO ,
it_i_vbkd_tab  TYPE STANDARD TABLE OF VBKD ,
wa_i_vbkd_tab  LIKE LINE OF it_i_vbkd_tab,
ld_i_trtyp  TYPE T185F-TRTYP ,
ld_i_valid_from  TYPE OIK01-FROMDATE ,
ld_i_valid_to  TYPE OIK01-TODATE ,
ld_i_roiklidscr  TYPE ROIKLIDSCR ,
ld_i_multiple_lids  TYPE STRING ,
ld_i_hdyno  TYPE SY-DYNNR ,
ld_i_lidtype  TYPE OIK01-LIDTYPE ,
ld_i_contrtyp  TYPE OIK01-CONTRTYP ,
ld_i_vehicle_id  TYPE OIGV-VEHICLE ,
ld_i_background  TYPE STRING ,
ld_i_oikimport  TYPE ROIKIMPORT ,
ld_i_aktyp  TYPE T180-AKTYP .


SELECT single VBTYP
FROM OIK01
INTO ld_i_vbtyp.


"populate fields of struture and append to itab
append wa_i_roiklidscr_tab to it_i_roiklidscr_tab.

SELECT single DOCNO
FROM OIK01
INTO ld_i_docno.


"populate fields of struture and append to itab
append wa_i_oidmp_tab to it_i_oidmp_tab.

SELECT single ITEMNO
FROM OIK01
INTO ld_i_itemno.


"populate fields of struture and append to itab
append wa_i_vbkd_tab to it_i_vbkd_tab.

SELECT single TRTYP
FROM T185F
INTO ld_i_trtyp.


SELECT single FROMDATE
FROM OIK01
INTO ld_i_valid_from.


SELECT single TODATE
FROM OIK01
INTO ld_i_valid_to.

ld_i_roiklidscr = 'some text here'.
ld_i_multiple_lids = 'some text here'.
ld_i_hdyno = 'some text here'.

SELECT single LIDTYPE
FROM OIK01
INTO ld_i_lidtype.


SELECT single CONTRTYP
FROM OIK01
INTO ld_i_contrtyp.


SELECT single VEHICLE
FROM OIGV
INTO ld_i_vehicle_id.

ld_i_background = 'some text here'.
ld_i_oikimport = 'some text here'.

SELECT single AKTYP
FROM T180
INTO ld_i_aktyp.

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