SAP ISM_COA_READ_FOR_PART Function Module for IS-M: Read Contracts with a Specific BP Assignment
ISM_COA_READ_FOR_PART is a standard ism coa read for part 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: Read Contracts with a Specific BP Assignment 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 coa read for part FM, simply by entering the name ISM_COA_READ_FOR_PART into the relevant SAP transaction such as SE37 or SE38.
Function Group: JHWA2
Program Name: SAPLJHWA2
Main Program: SAPLJHWA2
Appliation area: J
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
![](https://www.se80.co.uk/training-education/wp-content/uploads/2019/07/normal-function-module.png)
Function ISM_COA_READ_FOR_PART 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_COA_READ_FOR_PART'"IS-M: Read Contracts with a Specific BP Assignment.
EXPORTING
PS_TJHVA = "Settings for Specific Sales Areas
PV_LFZEND = "
* PV_ENQMODE = CON_ENQUEUE_SHARED "Lock Mode
* PV_FLG_KONZ = "
GPNR = "
GPROLLE = "
PV_AVM_NR = "Order Number
PV_POS_NR = "Item Number
PV_GRF_NR = "
PT_AGPZ = "Order Partner
PV_LFZBEG = "
IMPORTING
VTNR_TAB = "
EXCEPTIONS
COA_LOCKED = 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_SAPLJHWA2_001 IS-M: Customer-Specific Fields in Assignment Overview
EXIT_SAPLJHWA2_002 IS-M: Fill Dynamic Part for View JHVGAV
IMPORTING Parameters details for ISM_COA_READ_FOR_PART
PS_TJHVA - Settings for Specific Sales Areas
Data type: TJHVAOptional: No
Call by Reference: Yes
PV_LFZEND -
Data type: JHTVKO-LFZENDOptional: No
Call by Reference: Yes
PV_ENQMODE - Lock Mode
Data type: DD26E-ENQMODEDefault: CON_ENQUEUE_SHARED
Optional: No
Call by Reference: Yes
PV_FLG_KONZ -
Data type: JPAM_XFELD_VAROptional: Yes
Call by Reference: Yes
GPNR -
Data type: JHTVGPZ-GPNROptional: No
Call by Reference: Yes
GPROLLE -
Data type: JHTVGPZ-GPROLLEOptional: No
Call by Reference: Yes
PV_AVM_NR - Order Number
Data type: JHAGPZ-AVM_NROptional: No
Call by Reference: Yes
PV_POS_NR - Item Number
Data type: JHAGPZ-POS_NROptional: No
Call by Reference: Yes
PV_GRF_NR -
Data type: JHAGPZ-GRUPPABRNROptional: No
Call by Reference: Yes
PT_AGPZ - Order Partner
Data type: JHA1_RJHAGPZ_TABOptional: No
Call by Reference: Yes
PV_LFZBEG -
Data type: JHTVKO-LFZBEGOptional: No
Call by Reference: Yes
EXPORTING Parameters details for ISM_COA_READ_FOR_PART
VTNR_TAB -
Data type: JHW1_VTNR_TABOptional: No
Call by Reference: Yes
EXCEPTIONS details
COA_LOCKED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ISM_COA_READ_FOR_PART 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_ps_tjhva | TYPE TJHVA, " | |||
lv_vtnr_tab | TYPE JHW1_VTNR_TAB, " | |||
lv_coa_locked | TYPE JHW1_VTNR_TAB, " | |||
lv_pv_lfzend | TYPE JHTVKO-LFZEND, " | |||
lv_pv_enqmode | TYPE DD26E-ENQMODE, " CON_ENQUEUE_SHARED | |||
lv_pv_flg_konz | TYPE JPAM_XFELD_VAR, " | |||
lv_gpnr | TYPE JHTVGPZ-GPNR, " | |||
lv_gprolle | TYPE JHTVGPZ-GPROLLE, " | |||
lv_pv_avm_nr | TYPE JHAGPZ-AVM_NR, " | |||
lv_pv_pos_nr | TYPE JHAGPZ-POS_NR, " | |||
lv_pv_grf_nr | TYPE JHAGPZ-GRUPPABRNR, " | |||
lv_pt_agpz | TYPE JHA1_RJHAGPZ_TAB, " | |||
lv_pv_lfzbeg | TYPE JHTVKO-LFZBEG. " |
  CALL FUNCTION 'ISM_COA_READ_FOR_PART' "IS-M: Read Contracts with a Specific BP Assignment |
EXPORTING | ||
PS_TJHVA | = lv_ps_tjhva | |
PV_LFZEND | = lv_pv_lfzend | |
PV_ENQMODE | = lv_pv_enqmode | |
PV_FLG_KONZ | = lv_pv_flg_konz | |
GPNR | = lv_gpnr | |
GPROLLE | = lv_gprolle | |
PV_AVM_NR | = lv_pv_avm_nr | |
PV_POS_NR | = lv_pv_pos_nr | |
PV_GRF_NR | = lv_pv_grf_nr | |
PT_AGPZ | = lv_pt_agpz | |
PV_LFZBEG | = lv_pv_lfzbeg | |
IMPORTING | ||
VTNR_TAB | = lv_vtnr_tab | |
EXCEPTIONS | ||
COA_LOCKED = 1 | ||
. " ISM_COA_READ_FOR_PART |
ABAP code using 7.40 inline data declarations to call FM ISM_COA_READ_FOR_PART
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 LFZEND FROM JHTVKO INTO @DATA(ld_pv_lfzend). | ||||
"SELECT single ENQMODE FROM DD26E INTO @DATA(ld_pv_enqmode). | ||||
DATA(ld_pv_enqmode) | = CON_ENQUEUE_SHARED. | |||
"SELECT single GPNR FROM JHTVGPZ INTO @DATA(ld_gpnr). | ||||
"SELECT single GPROLLE FROM JHTVGPZ INTO @DATA(ld_gprolle). | ||||
"SELECT single AVM_NR FROM JHAGPZ INTO @DATA(ld_pv_avm_nr). | ||||
"SELECT single POS_NR FROM JHAGPZ INTO @DATA(ld_pv_pos_nr). | ||||
"SELECT single GRUPPABRNR FROM JHAGPZ INTO @DATA(ld_pv_grf_nr). | ||||
"SELECT single LFZBEG FROM JHTVKO INTO @DATA(ld_pv_lfzbeg). | ||||
Search for further information about these or an SAP related objects