SAP TWVK_SINGLE_READ_GENERIC Function Module for NOTRANSL: Lese Tabelle TWVK (Erlaubte Konditionstabellen zur Verbuchung)









TWVK_SINGLE_READ_GENERIC is a standard twvk single read generic 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: Lese Tabelle TWVK (Erlaubte Konditionstabellen zur Verbuchung) 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 twvk single read generic FM, simply by entering the name TWVK_SINGLE_READ_GENERIC into the relevant SAP transaction such as SE37 or SE38.

Function Group: WVK0
Program Name: SAPLWVK0
Main Program: SAPLWVK0
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TWVK_SINGLE_READ_GENERIC 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 'TWVK_SINGLE_READ_GENERIC'"NOTRANSL: Lese Tabelle TWVK (Erlaubte Konditionstabellen zur Verbuchung)
EXPORTING
PI_VKALS = "
PI_KVEWE = "
PI_KAPPL = "
PI_KSCHL = "

TABLES
* PE_T_TWVK = "Sales Price Calculation: Allowed pricing levels

EXCEPTIONS
NO_ENTRY_FOUND = 1 VKALS_NOT_VALID = 2
.




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 TWVK_SINGLE_READ_GENERIC

PI_VKALS -

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

PI_KVEWE -

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

PI_KAPPL -

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

PI_KSCHL -

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

TABLES Parameters details for TWVK_SINGLE_READ_GENERIC

PE_T_TWVK - Sales Price Calculation: Allowed pricing levels

Data type: TWVK
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NO_ENTRY_FOUND -

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

VKALS_NOT_VALID -

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

Copy and paste ABAP code example for TWVK_SINGLE_READ_GENERIC 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_pi_vkals  TYPE TWVK-VKALS, "   
lt_pe_t_twvk  TYPE STANDARD TABLE OF TWVK, "   
lv_no_entry_found  TYPE TWVK, "   
lv_pi_kvewe  TYPE TWVK-KVEWE, "   
lv_vkals_not_valid  TYPE TWVK, "   
lv_pi_kappl  TYPE TWVK-KAPPL, "   
lv_pi_kschl  TYPE TWVK-KSCHL. "   

  CALL FUNCTION 'TWVK_SINGLE_READ_GENERIC'  "NOTRANSL: Lese Tabelle TWVK (Erlaubte Konditionstabellen zur Verbuchung)
    EXPORTING
         PI_VKALS = lv_pi_vkals
         PI_KVEWE = lv_pi_kvewe
         PI_KAPPL = lv_pi_kappl
         PI_KSCHL = lv_pi_kschl
    TABLES
         PE_T_TWVK = lt_pe_t_twvk
    EXCEPTIONS
        NO_ENTRY_FOUND = 1
        VKALS_NOT_VALID = 2
. " TWVK_SINGLE_READ_GENERIC




ABAP code using 7.40 inline data declarations to call FM TWVK_SINGLE_READ_GENERIC

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 VKALS FROM TWVK INTO @DATA(ld_pi_vkals).
 
 
 
"SELECT single KVEWE FROM TWVK INTO @DATA(ld_pi_kvewe).
 
 
"SELECT single KAPPL FROM TWVK INTO @DATA(ld_pi_kappl).
 
"SELECT single KSCHL FROM TWVK INTO @DATA(ld_pi_kschl).
 


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!