SAP AM_ASSET_SUBNUMBER_F4 Function Module for









AM_ASSET_SUBNUMBER_F4 is a standard am asset subnumber f4 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 am asset subnumber f4 FM, simply by entering the name AM_ASSET_SUBNUMBER_F4 into the relevant SAP transaction such as SE37 or SE38.

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



Function AM_ASSET_SUBNUMBER_F4 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 'AM_ASSET_SUBNUMBER_F4'"
EXPORTING
I_DYNAME = "Call program name
I_DYNUMB = "Screen number, to be completed
* I_FN_BUK = 'ANLA-BUKRS' "Screen field name for company code
* I_FN_AN1 = 'ANLA-ANLN1' "Screen field name for main number
* I_FN_AN2 = 'ANLA-ANLN2' "Screen field name for sub-number
* I_BUKRS = ' ' "Company code, if entered directly
* I_ANLN1 = ' ' "Main asset number, if entered directly
* DISPLAY = ' ' "

IMPORTING
E_ANLN2 = "Asset Subnumber
.



IMPORTING Parameters details for AM_ASSET_SUBNUMBER_F4

I_DYNAME - Call program name

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

I_DYNUMB - Screen number, to be completed

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

I_FN_BUK - Screen field name for company code

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

I_FN_AN1 - Screen field name for main number

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

I_FN_AN2 - Screen field name for sub-number

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

I_BUKRS - Company code, if entered directly

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

I_ANLN1 - Main asset number, if entered directly

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

DISPLAY -

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

EXPORTING Parameters details for AM_ASSET_SUBNUMBER_F4

E_ANLN2 - Asset Subnumber

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

Copy and paste ABAP code example for AM_ASSET_SUBNUMBER_F4 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_anln2  TYPE ANLA-ANLN2, "   
lv_i_dyname  TYPE D020S-PROG, "   
lv_i_dynumb  TYPE D020S-DNUM, "   
lv_i_fn_buk  TYPE DYNPREAD-FIELDNAME, "   'ANLA-BUKRS'
lv_i_fn_an1  TYPE DYNPREAD-FIELDNAME, "   'ANLA-ANLN1'
lv_i_fn_an2  TYPE DYNPREAD-FIELDNAME, "   'ANLA-ANLN2'
lv_i_bukrs  TYPE ANLA-BUKRS, "   SPACE
lv_i_anln1  TYPE ANLA-ANLN1, "   SPACE
lv_display  TYPE ANLA. "   SPACE

  CALL FUNCTION 'AM_ASSET_SUBNUMBER_F4'  "
    EXPORTING
         I_DYNAME = lv_i_dyname
         I_DYNUMB = lv_i_dynumb
         I_FN_BUK = lv_i_fn_buk
         I_FN_AN1 = lv_i_fn_an1
         I_FN_AN2 = lv_i_fn_an2
         I_BUKRS = lv_i_bukrs
         I_ANLN1 = lv_i_anln1
         DISPLAY = lv_display
    IMPORTING
         E_ANLN2 = lv_e_anln2
. " AM_ASSET_SUBNUMBER_F4




ABAP code using 7.40 inline data declarations to call FM AM_ASSET_SUBNUMBER_F4

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 ANLN2 FROM ANLA INTO @DATA(ld_e_anln2).
 
"SELECT single PROG FROM D020S INTO @DATA(ld_i_dyname).
 
"SELECT single DNUM FROM D020S INTO @DATA(ld_i_dynumb).
 
"SELECT single FIELDNAME FROM DYNPREAD INTO @DATA(ld_i_fn_buk).
DATA(ld_i_fn_buk) = 'ANLA-BUKRS'.
 
"SELECT single FIELDNAME FROM DYNPREAD INTO @DATA(ld_i_fn_an1).
DATA(ld_i_fn_an1) = 'ANLA-ANLN1'.
 
"SELECT single FIELDNAME FROM DYNPREAD INTO @DATA(ld_i_fn_an2).
DATA(ld_i_fn_an2) = 'ANLA-ANLN2'.
 
"SELECT single BUKRS FROM ANLA INTO @DATA(ld_i_bukrs).
DATA(ld_i_bukrs) = ' '.
 
"SELECT single ANLN1 FROM ANLA INTO @DATA(ld_i_anln1).
DATA(ld_i_anln1) = ' '.
 
DATA(ld_display) = ' '.
 


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!