SAP JV_AM_SUBNUMBER_SELECT Function Module for Selection of subnumbers according to vintage years
JV_AM_SUBNUMBER_SELECT is a standard jv am subnumber select SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Selection of subnumbers according to vintage years 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 jv am subnumber select FM, simply by entering the name JV_AM_SUBNUMBER_SELECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: GJAM
Program Name: SAPLGJAM
Main Program: SAPLGJAM
Appliation area: A
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function JV_AM_SUBNUMBER_SELECT 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 'JV_AM_SUBNUMBER_SELECT'"Selection of subnumbers according to vintage years.
EXPORTING
I_BUKRS = "Company Code
I_PSPNR = "Project Number
I_KUNNR = "Customer Number
I_BLDAT = "Document Dart
I_ZUONR = "Selection Field
* I_MATNR = "
I_ANLN1 = "Asset Main Number
I_VYEAR = "Vintage Year
* I_VMNTH = 000 "Vintage Month
I_ANBTR = "Amount
* I_WBWRT = 0 "Amount
I_BUJHR = "Fiscal Year
I_ZANLN1 = "Target Asset Number
I_AUFNR = "Order Number
IMPORTING
O_ANBTR = "Amount
O_SAVE = "Flag: Save Immediately
TABLES
T_LINE = "Asset Items
T_ANLA = "Asset Master Record Segment
T_ANLB = "Depreciation terms
T_ANLZ = "Time-Dependent Asset Allocations
IMPORTING Parameters details for JV_AM_SUBNUMBER_SELECT
I_BUKRS - Company Code
Data type: ANLH-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_PSPNR - Project Number
Data type: JVRAM01-PSPNROptional: No
Call by Reference: No ( called with pass by value option)
I_KUNNR - Customer Number
Data type: KNA1-KUNNROptional: No
Call by Reference: No ( called with pass by value option)
I_BLDAT - Document Dart
Data type: BKPF-BLDATOptional: No
Call by Reference: No ( called with pass by value option)
I_ZUONR - Selection Field
Data type: JVRAM01-H_ZUONROptional: No
Call by Reference: No ( called with pass by value option)
I_MATNR -
Data type: MARA-MATNROptional: Yes
Call by Reference: No ( called with pass by value option)
I_ANLN1 - Asset Main Number
Data type: ANLH-ANLN1Optional: No
Call by Reference: No ( called with pass by value option)
I_VYEAR - Vintage Year
Data type: ANLB-VYEAROptional: No
Call by Reference: No ( called with pass by value option)
I_VMNTH - Vintage Month
Data type: ANLB-VMNTHDefault: 000
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ANBTR - Amount
Data type: ANEP-ANBTROptional: No
Call by Reference: No ( called with pass by value option)
I_WBWRT - Amount
Data type: ANEP-ANBTROptional: Yes
Call by Reference: No ( called with pass by value option)
I_BUJHR - Fiscal Year
Data type: ANLC-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
I_ZANLN1 - Target Asset Number
Data type: ANBZ-ZANLN1Optional: No
Call by Reference: No ( called with pass by value option)
I_AUFNR - Order Number
Data type: JVRAM01-AUFNROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for JV_AM_SUBNUMBER_SELECT
O_ANBTR - Amount
Data type: ANEP-ANBTROptional: No
Call by Reference: No ( called with pass by value option)
O_SAVE - Flag: Save Immediately
Data type: TABWG-JVMANOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for JV_AM_SUBNUMBER_SELECT
T_LINE - Asset Items
Data type: JVASSTLINEOptional: No
Call by Reference: No ( called with pass by value option)
T_ANLA - Asset Master Record Segment
Data type: ANLAOptional: No
Call by Reference: Yes
T_ANLB - Depreciation terms
Data type: ANLBOptional: No
Call by Reference: Yes
T_ANLZ - Time-Dependent Asset Allocations
Data type: ANLZOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for JV_AM_SUBNUMBER_SELECT 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: | ||||
| lt_t_line | TYPE STANDARD TABLE OF JVASSTLINE, " | |||
| lv_i_bukrs | TYPE ANLH-BUKRS, " | |||
| lv_o_anbtr | TYPE ANEP-ANBTR, " | |||
| lv_i_pspnr | TYPE JVRAM01-PSPNR, " | |||
| lv_i_kunnr | TYPE KNA1-KUNNR, " | |||
| lv_i_bldat | TYPE BKPF-BLDAT, " | |||
| lv_i_zuonr | TYPE JVRAM01-H_ZUONR, " | |||
| lv_i_matnr | TYPE MARA-MATNR, " | |||
| lv_o_save | TYPE TABWG-JVMAN, " | |||
| lt_t_anla | TYPE STANDARD TABLE OF ANLA, " | |||
| lv_i_anln1 | TYPE ANLH-ANLN1, " | |||
| lt_t_anlb | TYPE STANDARD TABLE OF ANLB, " | |||
| lv_i_vyear | TYPE ANLB-VYEAR, " | |||
| lt_t_anlz | TYPE STANDARD TABLE OF ANLZ, " | |||
| lv_i_vmnth | TYPE ANLB-VMNTH, " 000 | |||
| lv_i_anbtr | TYPE ANEP-ANBTR, " | |||
| lv_i_wbwrt | TYPE ANEP-ANBTR, " 0 | |||
| lv_i_bujhr | TYPE ANLC-GJAHR, " | |||
| lv_i_zanln1 | TYPE ANBZ-ZANLN1, " | |||
| lv_i_aufnr | TYPE JVRAM01-AUFNR. " |
|   CALL FUNCTION 'JV_AM_SUBNUMBER_SELECT' "Selection of subnumbers according to vintage years |
| EXPORTING | ||
| I_BUKRS | = lv_i_bukrs | |
| I_PSPNR | = lv_i_pspnr | |
| I_KUNNR | = lv_i_kunnr | |
| I_BLDAT | = lv_i_bldat | |
| I_ZUONR | = lv_i_zuonr | |
| I_MATNR | = lv_i_matnr | |
| I_ANLN1 | = lv_i_anln1 | |
| I_VYEAR | = lv_i_vyear | |
| I_VMNTH | = lv_i_vmnth | |
| I_ANBTR | = lv_i_anbtr | |
| I_WBWRT | = lv_i_wbwrt | |
| I_BUJHR | = lv_i_bujhr | |
| I_ZANLN1 | = lv_i_zanln1 | |
| I_AUFNR | = lv_i_aufnr | |
| IMPORTING | ||
| O_ANBTR | = lv_o_anbtr | |
| O_SAVE | = lv_o_save | |
| TABLES | ||
| T_LINE | = lt_t_line | |
| T_ANLA | = lt_t_anla | |
| T_ANLB | = lt_t_anlb | |
| T_ANLZ | = lt_t_anlz | |
| . " JV_AM_SUBNUMBER_SELECT | ||
ABAP code using 7.40 inline data declarations to call FM JV_AM_SUBNUMBER_SELECT
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 BUKRS FROM ANLH INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single ANBTR FROM ANEP INTO @DATA(ld_o_anbtr). | ||||
| "SELECT single PSPNR FROM JVRAM01 INTO @DATA(ld_i_pspnr). | ||||
| "SELECT single KUNNR FROM KNA1 INTO @DATA(ld_i_kunnr). | ||||
| "SELECT single BLDAT FROM BKPF INTO @DATA(ld_i_bldat). | ||||
| "SELECT single H_ZUONR FROM JVRAM01 INTO @DATA(ld_i_zuonr). | ||||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_i_matnr). | ||||
| "SELECT single JVMAN FROM TABWG INTO @DATA(ld_o_save). | ||||
| "SELECT single ANLN1 FROM ANLH INTO @DATA(ld_i_anln1). | ||||
| "SELECT single VYEAR FROM ANLB INTO @DATA(ld_i_vyear). | ||||
| "SELECT single VMNTH FROM ANLB INTO @DATA(ld_i_vmnth). | ||||
| DATA(ld_i_vmnth) | = 000. | |||
| "SELECT single ANBTR FROM ANEP INTO @DATA(ld_i_anbtr). | ||||
| "SELECT single ANBTR FROM ANEP INTO @DATA(ld_i_wbwrt). | ||||
| "SELECT single GJAHR FROM ANLC INTO @DATA(ld_i_bujhr). | ||||
| "SELECT single ZANLN1 FROM ANBZ INTO @DATA(ld_i_zanln1). | ||||
| "SELECT single AUFNR FROM JVRAM01 INTO @DATA(ld_i_aufnr). | ||||
Search for further information about these or an SAP related objects