SAP /ACCGO/CAS_FM_MAINTAIN_APPGRP Function Module for Maintain Application Groups
/ACCGO/CAS_FM_MAINTAIN_APPGRP is a standard /accgo/cas fm maintain appgrp SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Maintain Application Groups 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 /accgo/cas fm maintain appgrp FM, simply by entering the name /ACCGO/CAS_FM_MAINTAIN_APPGRP into the relevant SAP transaction such as SE37 or SE38.
Function Group: /ACCGO/CAS_APPLGRP
Program Name: /ACCGO/SAPLCAS_APPLGRP
Main Program: /ACCGO/SAPLCAS_APPLGRP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function /ACCGO/CAS_FM_MAINTAIN_APPGRP 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 '/ACCGO/CAS_FM_MAINTAIN_APPGRP'"Maintain Application Groups.
EXPORTING
IM_V_GROUP_ID = "Application group ID
* IM_CONTRACT_HDR = "Trading Contract: Header Data
* IM_CONTRACT_ITEM = "Table Type for WBHI
* IM_COM_SUB = "Table type for trading contract commodity items
IM_V_POST_SAVE = "Checkbox
IM_V_APPLY = "Checkbox
* IM_T_AGRP_ITEMS = "Appdoc Items of the group ( database copy )
IM_V_COMMIT = "Checkbox
EXCEPTIONS
APPL_PROCESS_ERROR = 1
IMPORTING Parameters details for /ACCGO/CAS_FM_MAINTAIN_APPGRP
IM_V_GROUP_ID - Application group ID
Data type: /ACCGO/E_AGR_IDOptional: No
Call by Reference: No ( called with pass by value option)
IM_CONTRACT_HDR - Trading Contract: Header Data
Data type: WBHK_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
IM_CONTRACT_ITEM - Table Type for WBHI
Data type: WBHI_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
IM_COM_SUB - Table type for trading contract commodity items
Data type: /ACCGO/CAS_TT_COMSUBOptional: Yes
Call by Reference: No ( called with pass by value option)
IM_V_POST_SAVE - Checkbox
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
IM_V_APPLY - Checkbox
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
IM_T_AGRP_ITEMS - Appdoc Items of the group ( database copy )
Data type: /ACCGO/CAS_TT_AGRP_ITEMS_BLOptional: Yes
Call by Reference: No ( called with pass by value option)
IM_V_COMMIT - Checkbox
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
APPL_PROCESS_ERROR - exception in apply of application
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for /ACCGO/CAS_FM_MAINTAIN_APPGRP 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_im_v_group_id | TYPE /ACCGO/E_AGR_ID, " | |||
lv_appl_process_error | TYPE /ACCGO/E_AGR_ID, " | |||
lv_im_contract_hdr | TYPE WBHK_TAB, " | |||
lv_im_contract_item | TYPE WBHI_TAB, " | |||
lv_im_com_sub | TYPE /ACCGO/CAS_TT_COMSUB, " | |||
lv_im_v_post_save | TYPE XFELD, " | |||
lv_im_v_apply | TYPE XFELD, " | |||
lv_im_t_agrp_items | TYPE /ACCGO/CAS_TT_AGRP_ITEMS_BL, " | |||
lv_im_v_commit | TYPE XFELD. " |
  CALL FUNCTION '/ACCGO/CAS_FM_MAINTAIN_APPGRP' "Maintain Application Groups |
EXPORTING | ||
IM_V_GROUP_ID | = lv_im_v_group_id | |
IM_CONTRACT_HDR | = lv_im_contract_hdr | |
IM_CONTRACT_ITEM | = lv_im_contract_item | |
IM_COM_SUB | = lv_im_com_sub | |
IM_V_POST_SAVE | = lv_im_v_post_save | |
IM_V_APPLY | = lv_im_v_apply | |
IM_T_AGRP_ITEMS | = lv_im_t_agrp_items | |
IM_V_COMMIT | = lv_im_v_commit | |
EXCEPTIONS | ||
APPL_PROCESS_ERROR = 1 | ||
. " /ACCGO/CAS_FM_MAINTAIN_APPGRP |
ABAP code using 7.40 inline data declarations to call FM /ACCGO/CAS_FM_MAINTAIN_APPGRP
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.Search for further information about these or an SAP related objects