SAP ANLH_READ_SINGLE Function Module for









ANLH_READ_SINGLE is a standard anlh read single 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 anlh read single FM, simply by entering the name ANLH_READ_SINGLE into the relevant SAP transaction such as SE37 or SE38.

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



Function ANLH_READ_SINGLE 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 'ANLH_READ_SINGLE'"
EXPORTING
F_ANLH = "ANLH segment, please fill key fiel
* I_LOCK = ' ' "Block ANLH
* I_RFUP = ' ' "Read access via SELECT SINGLE * FO
* I_WAIT = ' ' "If ANLH blocked go into wait loop

IMPORTING
F_ANLH = "ANLH segment, please fill key fiel

EXCEPTIONS
LOCKED = 1 NOT_FOUND = 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_SAPLANLR_001 Control Level Texts for FI-AA Reporting

IMPORTING Parameters details for ANLH_READ_SINGLE

F_ANLH - ANLH segment, please fill key fiel

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

I_LOCK - Block ANLH

Data type: ANLA-EIGKZ
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_RFUP - Read access via SELECT SINGLE * FO

Data type: ANLA-EIGKZ
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WAIT - If ANLH blocked go into wait loop

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for ANLH_READ_SINGLE

F_ANLH - ANLH segment, please fill key fiel

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

EXCEPTIONS details

LOCKED - Main number is blocked

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

NOT_FOUND - Entry not found

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

Copy and paste ABAP code example for ANLH_READ_SINGLE 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_f_anlh  TYPE ANLH, "   
lv_f_anlh  TYPE ANLH, "   
lv_locked  TYPE ANLH, "   
lv_i_lock  TYPE ANLA-EIGKZ, "   ' '
lv_not_found  TYPE ANLA, "   
lv_i_rfup  TYPE ANLA-EIGKZ, "   ' '
lv_i_wait  TYPE XFELD. "   SPACE

  CALL FUNCTION 'ANLH_READ_SINGLE'  "
    EXPORTING
         F_ANLH = lv_f_anlh
         I_LOCK = lv_i_lock
         I_RFUP = lv_i_rfup
         I_WAIT = lv_i_wait
    IMPORTING
         F_ANLH = lv_f_anlh
    EXCEPTIONS
        LOCKED = 1
        NOT_FOUND = 2
. " ANLH_READ_SINGLE




ABAP code using 7.40 inline data declarations to call FM ANLH_READ_SINGLE

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 EIGKZ FROM ANLA INTO @DATA(ld_i_lock).
DATA(ld_i_lock) = ' '.
 
 
"SELECT single EIGKZ FROM ANLA INTO @DATA(ld_i_rfup).
DATA(ld_i_rfup) = ' '.
 
DATA(ld_i_wait) = ' '.
 


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!