SAP ISM_NEW_AVM_OBJECT_GET Function Module for IS-M: Define New Key for an Order Object During Copying
ISM_NEW_AVM_OBJECT_GET is a standard ism new avm object 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 IS-M: Define New Key for an Order Object During Copying 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 ism new avm object get FM, simply by entering the name ISM_NEW_AVM_OBJECT_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: JHA2
Program Name: SAPLJHA2
Main Program: SAPLJHA2
Appliation area: J
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ISM_NEW_AVM_OBJECT_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 'ISM_NEW_AVM_OBJECT_GET'"IS-M: Define New Key for an Order Object During Copying.
EXPORTING
PV_AVM_LEVEL = "
PT_OLD_NEW_OBJ = "
PV_OLD_AVM_NR = "
* PV_OLD_POS_NR = "
* PV_OLD_UPOS_NR = "
* PV_OLD_EIN_NR = "
* PV_OLD_MOTIV = "
* PV_OLD_GRUPPABRNR = "
IMPORTING
PV_NEW_AVM_NR = "
PV_NEW_POS_NR = "
PV_NEW_UPOS_NR = "
PV_NEW_EIN_NR = "
PV_NEW_MOTIV = "
PV_NEW_GRUPPABRNR = "
EXCEPTIONS
OBJECT_NOT_FOUND = 1
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_SAPLJHA2_001 IS-M/AM: Copy Order Objects
IMPORTING Parameters details for ISM_NEW_AVM_OBJECT_GET
PV_AVM_LEVEL -
Data type: TJHMSTZ-STAT_EBENEOptional: No
Call by Reference: No ( called with pass by value option)
PT_OLD_NEW_OBJ -
Data type: JHA1_OLD_NEW_OBJ_TABOptional: No
Call by Reference: Yes
PV_OLD_AVM_NR -
Data type: JHAE-AVM_NROptional: No
Call by Reference: No ( called with pass by value option)
PV_OLD_POS_NR -
Data type: JHAE-POS_NROptional: Yes
Call by Reference: No ( called with pass by value option)
PV_OLD_UPOS_NR -
Data type: JHAE-UPOS_NROptional: Yes
Call by Reference: No ( called with pass by value option)
PV_OLD_EIN_NR -
Data type: JHAE-EIN_NROptional: Yes
Call by Reference: No ( called with pass by value option)
PV_OLD_MOTIV -
Data type: JHAMOT-MOTIVOptional: Yes
Call by Reference: No ( called with pass by value option)
PV_OLD_GRUPPABRNR -
Data type: JHAGA-GRUPPABRNROptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ISM_NEW_AVM_OBJECT_GET
PV_NEW_AVM_NR -
Data type: JHAE-AVM_NROptional: No
Call by Reference: No ( called with pass by value option)
PV_NEW_POS_NR -
Data type: JHAE-POS_NROptional: No
Call by Reference: No ( called with pass by value option)
PV_NEW_UPOS_NR -
Data type: JHAE-UPOS_NROptional: No
Call by Reference: No ( called with pass by value option)
PV_NEW_EIN_NR -
Data type: JHAE-EIN_NROptional: No
Call by Reference: No ( called with pass by value option)
PV_NEW_MOTIV -
Data type: JHAMOT-MOTIVOptional: No
Call by Reference: No ( called with pass by value option)
PV_NEW_GRUPPABRNR -
Data type: JHAGA-GRUPPABRNROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
OBJECT_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ISM_NEW_AVM_OBJECT_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_pv_avm_level | TYPE TJHMSTZ-STAT_EBENE, " | |||
| lv_pv_new_avm_nr | TYPE JHAE-AVM_NR, " | |||
| lv_object_not_found | TYPE JHAE, " | |||
| lv_pv_new_pos_nr | TYPE JHAE-POS_NR, " | |||
| lv_pt_old_new_obj | TYPE JHA1_OLD_NEW_OBJ_TAB, " | |||
| lv_pv_old_avm_nr | TYPE JHAE-AVM_NR, " | |||
| lv_pv_new_upos_nr | TYPE JHAE-UPOS_NR, " | |||
| lv_pv_new_ein_nr | TYPE JHAE-EIN_NR, " | |||
| lv_pv_old_pos_nr | TYPE JHAE-POS_NR, " | |||
| lv_pv_new_motiv | TYPE JHAMOT-MOTIV, " | |||
| lv_pv_old_upos_nr | TYPE JHAE-UPOS_NR, " | |||
| lv_pv_old_ein_nr | TYPE JHAE-EIN_NR, " | |||
| lv_pv_new_gruppabrnr | TYPE JHAGA-GRUPPABRNR, " | |||
| lv_pv_old_motiv | TYPE JHAMOT-MOTIV, " | |||
| lv_pv_old_gruppabrnr | TYPE JHAGA-GRUPPABRNR. " |
|   CALL FUNCTION 'ISM_NEW_AVM_OBJECT_GET' "IS-M: Define New Key for an Order Object During Copying |
| EXPORTING | ||
| PV_AVM_LEVEL | = lv_pv_avm_level | |
| PT_OLD_NEW_OBJ | = lv_pt_old_new_obj | |
| PV_OLD_AVM_NR | = lv_pv_old_avm_nr | |
| PV_OLD_POS_NR | = lv_pv_old_pos_nr | |
| PV_OLD_UPOS_NR | = lv_pv_old_upos_nr | |
| PV_OLD_EIN_NR | = lv_pv_old_ein_nr | |
| PV_OLD_MOTIV | = lv_pv_old_motiv | |
| PV_OLD_GRUPPABRNR | = lv_pv_old_gruppabrnr | |
| IMPORTING | ||
| PV_NEW_AVM_NR | = lv_pv_new_avm_nr | |
| PV_NEW_POS_NR | = lv_pv_new_pos_nr | |
| PV_NEW_UPOS_NR | = lv_pv_new_upos_nr | |
| PV_NEW_EIN_NR | = lv_pv_new_ein_nr | |
| PV_NEW_MOTIV | = lv_pv_new_motiv | |
| PV_NEW_GRUPPABRNR | = lv_pv_new_gruppabrnr | |
| EXCEPTIONS | ||
| OBJECT_NOT_FOUND = 1 | ||
| . " ISM_NEW_AVM_OBJECT_GET | ||
ABAP code using 7.40 inline data declarations to call FM ISM_NEW_AVM_OBJECT_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.| "SELECT single STAT_EBENE FROM TJHMSTZ INTO @DATA(ld_pv_avm_level). | ||||
| "SELECT single AVM_NR FROM JHAE INTO @DATA(ld_pv_new_avm_nr). | ||||
| "SELECT single POS_NR FROM JHAE INTO @DATA(ld_pv_new_pos_nr). | ||||
| "SELECT single AVM_NR FROM JHAE INTO @DATA(ld_pv_old_avm_nr). | ||||
| "SELECT single UPOS_NR FROM JHAE INTO @DATA(ld_pv_new_upos_nr). | ||||
| "SELECT single EIN_NR FROM JHAE INTO @DATA(ld_pv_new_ein_nr). | ||||
| "SELECT single POS_NR FROM JHAE INTO @DATA(ld_pv_old_pos_nr). | ||||
| "SELECT single MOTIV FROM JHAMOT INTO @DATA(ld_pv_new_motiv). | ||||
| "SELECT single UPOS_NR FROM JHAE INTO @DATA(ld_pv_old_upos_nr). | ||||
| "SELECT single EIN_NR FROM JHAE INTO @DATA(ld_pv_old_ein_nr). | ||||
| "SELECT single GRUPPABRNR FROM JHAGA INTO @DATA(ld_pv_new_gruppabrnr). | ||||
| "SELECT single MOTIV FROM JHAMOT INTO @DATA(ld_pv_old_motiv). | ||||
| "SELECT single GRUPPABRNR FROM JHAGA INTO @DATA(ld_pv_old_gruppabrnr). | ||||
Search for further information about these or an SAP related objects