SAP ANONYMOUS_CUSTOMER_GET Function Module for NOTRANSL: Bestimmung des anonymen Kunden
ANONYMOUS_CUSTOMER_GET is a standard anonymous customer get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Bestimmung des anonymen Kunden processing and below is the pattern details for this FM, 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 anonymous customer get FM, simply by entering the name ANONYMOUS_CUSTOMER_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: WVK0
Program Name: SAPLWVK0
Main Program: SAPLWVK0
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ANONYMOUS_CUSTOMER_GET 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 'ANONYMOUS_CUSTOMER_GET'"NOTRANSL: Bestimmung des anonymen Kunden.
EXPORTING
* PI_VKORG = "Sales Organization
* PI_VTWEG = "Distribution Channel
* PI_WERKS = "Plant
* PI_PLTYP = "Price List Category
* PI_WAERK = "SD Document Currency
IMPORTING
PE_ANDEB = "Debtor Number 1
PE_I_T001W = "Plants/branches
EXCEPTIONS
INVALID_INPUT = 1 INVALID_INPRO = 2 CALCTYPE_NOT_FOUND = 3 ANDEB_NOT_FOUND = 4 NO_CUSTOMER_FOR_PLANT = 5
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_SAPLWVK0_001 Determine Pricing Type per Customer
IMPORTING Parameters details for ANONYMOUS_CUSTOMER_GET
PI_VKORG - Sales Organization
Data type: VKORGOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_VTWEG - Distribution Channel
Data type: VTWEGOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_WERKS - Plant
Data type: WERKS_DOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_PLTYP - Price List Category
Data type: PLTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_WAERK - SD Document Currency
Data type: WAERKOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ANONYMOUS_CUSTOMER_GET
PE_ANDEB - Debtor Number 1
Data type: KUNNROptional: No
Call by Reference: Yes
PE_I_T001W - Plants/branches
Data type: T001WOptional: No
Call by Reference: Yes
EXCEPTIONS details
INVALID_INPUT - Insufficient Parameter Entries
Data type:Optional: No
Call by Reference: Yes
INVALID_INPRO -
Data type:Optional: No
Call by Reference: Yes
CALCTYPE_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
ANDEB_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
NO_CUSTOMER_FOR_PLANT -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ANONYMOUS_CUSTOMER_GET 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_pe_andeb | TYPE KUNNR, " | |||
| lv_pi_vkorg | TYPE VKORG, " | |||
| lv_invalid_input | TYPE VKORG, " | |||
| lv_pi_vtweg | TYPE VTWEG, " | |||
| lv_pe_i_t001w | TYPE T001W, " | |||
| lv_invalid_inpro | TYPE T001W, " | |||
| lv_pi_werks | TYPE WERKS_D, " | |||
| lv_calctype_not_found | TYPE WERKS_D, " | |||
| lv_pi_pltyp | TYPE PLTYP, " | |||
| lv_andeb_not_found | TYPE PLTYP, " | |||
| lv_pi_waerk | TYPE WAERK, " | |||
| lv_no_customer_for_plant | TYPE WAERK. " |
|   CALL FUNCTION 'ANONYMOUS_CUSTOMER_GET' "NOTRANSL: Bestimmung des anonymen Kunden |
| EXPORTING | ||
| PI_VKORG | = lv_pi_vkorg | |
| PI_VTWEG | = lv_pi_vtweg | |
| PI_WERKS | = lv_pi_werks | |
| PI_PLTYP | = lv_pi_pltyp | |
| PI_WAERK | = lv_pi_waerk | |
| IMPORTING | ||
| PE_ANDEB | = lv_pe_andeb | |
| PE_I_T001W | = lv_pe_i_t001w | |
| EXCEPTIONS | ||
| INVALID_INPUT = 1 | ||
| INVALID_INPRO = 2 | ||
| CALCTYPE_NOT_FOUND = 3 | ||
| ANDEB_NOT_FOUND = 4 | ||
| NO_CUSTOMER_FOR_PLANT = 5 | ||
| . " ANONYMOUS_CUSTOMER_GET | ||
ABAP code using 7.40 inline data declarations to call FM ANONYMOUS_CUSTOMER_GET
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.Search for further information about these or an SAP related objects