SAP Function Modules

OIA_FEE_COPY SAP Function module







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

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


Pattern for FM OIA_FEE_COPY - OIA FEE COPY





CALL FUNCTION 'OIA_FEE_COPY' "
* EXPORTING
*   tvak_lisof_e = ' '          " tvak-lisof    Create delivery immediately
*   vbtyp_new = ' '             " vbrk-vbtyp    Sales Document Category
*   quantity_old =              " vbrp-lmeng    Required quantity for mat.management in stockkeeping units
*   quantity_new =              " vbrp-fklmg    Billing quantity in stockkeeping unit
*   item_number_to =            " konv-kposn    Condition Item Number
*   item_number_from =          " konv-kposn    Condition Item Number
*   currency_new = ' '          " komk-waerk    SD Document Currency
*   currency_new_date =         " komk-prsdt    Date for Pricing and Exchange Rate
*   currency_new_local = ' '    " komk-hwaer    Local Currency
*   currency_new_rate =         " komk-kurrf    Exchange rate for FI postings
*   currency_new_type = 'M'     " komk-kurst    Exchange Rate Type
*   currency_old = ' '          " komk-waerk    SD Document Currency
*   document_number_from =      " konv-knumv    Number of Document Condition
*   document_number_to =        " konv-knumv    Number of Document Condition
* TABLES
*   so_oia_komf =               " komv          Pricing: Communications Condition Record
*   tkomv =                     " komv          Pricing: Communications Condition Record
    .  "  OIA_FEE_COPY

ABAP code example for Function Module OIA_FEE_COPY





The ABAP code below is a full code listing to execute function module OIA_FEE_COPY 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_so_oia_komf  TYPE STANDARD TABLE OF KOMV,"TABLES PARAM
wa_so_oia_komf  LIKE LINE OF it_so_oia_komf ,
it_tkomv  TYPE STANDARD TABLE OF KOMV,"TABLES PARAM
wa_tkomv  LIKE LINE OF it_tkomv .


SELECT single LISOF
FROM TVAK
INTO @DATA(ld_tvak_lisof_e).


SELECT single VBTYP
FROM VBRK
INTO @DATA(ld_vbtyp_new).


SELECT single LMENG
FROM VBRP
INTO @DATA(ld_quantity_old).


SELECT single FKLMG
FROM VBRP
INTO @DATA(ld_quantity_new).


SELECT single KPOSN
FROM KONV
INTO @DATA(ld_item_number_to).


SELECT single KPOSN
FROM KONV
INTO @DATA(ld_item_number_from).


DATA(ld_currency_new) = Check type of data required

DATA(ld_currency_new_date) = 20210129

DATA(ld_currency_new_local) = Check type of data required

DATA(ld_currency_new_rate) = Check type of data required

DATA(ld_currency_new_type) = some text here

DATA(ld_currency_old) = Check type of data required

SELECT single KNUMV
FROM KONV
INTO @DATA(ld_document_number_from).


SELECT single KNUMV
FROM KONV
INTO @DATA(ld_document_number_to).


"populate fields of struture and append to itab
append wa_so_oia_komf to it_so_oia_komf.

"populate fields of struture and append to itab
append wa_tkomv to it_tkomv. . CALL FUNCTION 'OIA_FEE_COPY' * EXPORTING * tvak_lisof_e = ld_tvak_lisof_e * vbtyp_new = ld_vbtyp_new * quantity_old = ld_quantity_old * quantity_new = ld_quantity_new * item_number_to = ld_item_number_to * item_number_from = ld_item_number_from * currency_new = ld_currency_new * currency_new_date = ld_currency_new_date * currency_new_local = ld_currency_new_local * currency_new_rate = ld_currency_new_rate * currency_new_type = ld_currency_new_type * currency_old = ld_currency_old * document_number_from = ld_document_number_from * document_number_to = ld_document_number_to * TABLES * so_oia_komf = it_so_oia_komf * tkomv = it_tkomv . " OIA_FEE_COPY
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_tvak_lisof_e  TYPE TVAK-LISOF ,
it_so_oia_komf  TYPE STANDARD TABLE OF KOMV ,
wa_so_oia_komf  LIKE LINE OF it_so_oia_komf,
ld_vbtyp_new  TYPE VBRK-VBTYP ,
it_tkomv  TYPE STANDARD TABLE OF KOMV ,
wa_tkomv  LIKE LINE OF it_tkomv,
ld_quantity_old  TYPE VBRP-LMENG ,
ld_quantity_new  TYPE VBRP-FKLMG ,
ld_item_number_to  TYPE KONV-KPOSN ,
ld_item_number_from  TYPE KONV-KPOSN ,
ld_currency_new  TYPE KOMK-WAERK ,
ld_currency_new_date  TYPE KOMK-PRSDT ,
ld_currency_new_local  TYPE KOMK-HWAER ,
ld_currency_new_rate  TYPE KOMK-KURRF ,
ld_currency_new_type  TYPE KOMK-KURST ,
ld_currency_old  TYPE KOMK-WAERK ,
ld_document_number_from  TYPE KONV-KNUMV ,
ld_document_number_to  TYPE KONV-KNUMV .


SELECT single LISOF
FROM TVAK
INTO ld_tvak_lisof_e.


"populate fields of struture and append to itab
append wa_so_oia_komf to it_so_oia_komf.

SELECT single VBTYP
FROM VBRK
INTO ld_vbtyp_new.


"populate fields of struture and append to itab
append wa_tkomv to it_tkomv.

SELECT single LMENG
FROM VBRP
INTO ld_quantity_old.


SELECT single FKLMG
FROM VBRP
INTO ld_quantity_new.


SELECT single KPOSN
FROM KONV
INTO ld_item_number_to.


SELECT single KPOSN
FROM KONV
INTO ld_item_number_from.


ld_currency_new = Check type of data required

ld_currency_new_date = 20210129

ld_currency_new_local = Check type of data required

ld_currency_new_rate = Check type of data required

ld_currency_new_type = some text here

ld_currency_old = Check type of data required

SELECT single KNUMV
FROM KONV
INTO ld_document_number_from.


SELECT single KNUMV
FROM KONV
INTO ld_document_number_to.

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