SAP MY_FOREIGN_INVOICE_EXCHANGE Function Module for









MY_FOREIGN_INVOICE_EXCHANGE is a standard my foreign invoice exchange SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for my foreign invoice exchange FM, simply by entering the name MY_FOREIGN_INVOICE_EXCHANGE into the relevant SAP transaction such as SE37 or SE38.

Function Group: NIW0
Program Name: SAPLNIW0
Main Program: SAPLNIW0
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MY_FOREIGN_INVOICE_EXCHANGE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'MY_FOREIGN_INVOICE_EXCHANGE'"
EXPORTING
I_XXKST = "
I_STDAT = "
I_WRBTR = "
I_DMBTR = "
I_AREWW = "
I_AREWR = "
I_WAERS = "
I_HWAER = "

IMPORTING
E_DELTA = "

EXCEPTIONS
EXCHANGE_ERROR = 1
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLNIW0_001
EXIT_SAPLNIW0_002
EXIT_SAPLNIW0_003

IMPORTING Parameters details for MY_FOREIGN_INVOICE_EXCHANGE

I_XXKST -

Data type: MY_XXKST
Optional: No
Call by Reference: Yes

I_STDAT -

Data type: MY_STDAT
Optional: No
Call by Reference: Yes

I_WRBTR -

Data type: EKBE-WRBTR
Optional: No
Call by Reference: Yes

I_DMBTR -

Data type: EKBE-DMBTR
Optional: No
Call by Reference: Yes

I_AREWW -

Data type: EKBE-AREWW
Optional: No
Call by Reference: Yes

I_AREWR -

Data type: EKBE-AREWR
Optional: No
Call by Reference: Yes

I_WAERS -

Data type: EKBE-WAERS
Optional: No
Call by Reference: Yes

I_HWAER -

Data type: T001-WAERS
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for MY_FOREIGN_INVOICE_EXCHANGE

E_DELTA -

Data type: EKBE-DMBTR
Optional: No
Call by Reference: Yes

EXCEPTIONS details

EXCHANGE_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MY_FOREIGN_INVOICE_EXCHANGE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_e_delta  TYPE EKBE-DMBTR, "   
lv_i_xxkst  TYPE MY_XXKST, "   
lv_exchange_error  TYPE MY_XXKST, "   
lv_i_stdat  TYPE MY_STDAT, "   
lv_i_wrbtr  TYPE EKBE-WRBTR, "   
lv_i_dmbtr  TYPE EKBE-DMBTR, "   
lv_i_areww  TYPE EKBE-AREWW, "   
lv_i_arewr  TYPE EKBE-AREWR, "   
lv_i_waers  TYPE EKBE-WAERS, "   
lv_i_hwaer  TYPE T001-WAERS. "   

  CALL FUNCTION 'MY_FOREIGN_INVOICE_EXCHANGE'  "
    EXPORTING
         I_XXKST = lv_i_xxkst
         I_STDAT = lv_i_stdat
         I_WRBTR = lv_i_wrbtr
         I_DMBTR = lv_i_dmbtr
         I_AREWW = lv_i_areww
         I_AREWR = lv_i_arewr
         I_WAERS = lv_i_waers
         I_HWAER = lv_i_hwaer
    IMPORTING
         E_DELTA = lv_e_delta
    EXCEPTIONS
        EXCHANGE_ERROR = 1
. " MY_FOREIGN_INVOICE_EXCHANGE




ABAP code using 7.40 inline data declarations to call FM MY_FOREIGN_INVOICE_EXCHANGE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single DMBTR FROM EKBE INTO @DATA(ld_e_delta).
 
 
 
 
"SELECT single WRBTR FROM EKBE INTO @DATA(ld_i_wrbtr).
 
"SELECT single DMBTR FROM EKBE INTO @DATA(ld_i_dmbtr).
 
"SELECT single AREWW FROM EKBE INTO @DATA(ld_i_areww).
 
"SELECT single AREWR FROM EKBE INTO @DATA(ld_i_arewr).
 
"SELECT single WAERS FROM EKBE INTO @DATA(ld_i_waers).
 
"SELECT single WAERS FROM T001 INTO @DATA(ld_i_hwaer).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!