SAP Function Modules

CFX_FLDGRP_AUTH_SET SAP Function module - Sets the authorization for Field Group







CFX_FLDGRP_AUTH_SET is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CFX_FLDGRP_AUTH_SET into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CFX_OBJ_FLDGRP_API_AUTH
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM CFX_FLDGRP_AUTH_SET - CFX FLDGRP AUTH SET





CALL FUNCTION 'CFX_FLDGRP_AUTH_SET' "Sets the authorization for Field Group
* EXPORTING
*   i_object_id =               " sysuuid_c
*   i_fieldgroup_id =           " cfx_t_external_id
*   i_fieldgroup_ns =           " cfx_t_external_namespace  External Namespace
*   i_fieldgroup_int_id =       " sysuuid_c     UUID in character form
  IMPORTING
    es_fault =                  " cfx_api_ts_fault
    e_faultstring =             " cfx_api_t_faultstring
* TABLES
*   i_user_activities =         " aco_api_ts_user_authority
*   i_user_group_activities =   " aco_api_ts_user_grp_authority
*   i_user_role_activities =    " aco_api_ts_role_authority
    .  "  CFX_FLDGRP_AUTH_SET

ABAP code example for Function Module CFX_FLDGRP_AUTH_SET





The ABAP code below is a full code listing to execute function module CFX_FLDGRP_AUTH_SET including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_es_fault  TYPE CFX_API_TS_FAULT ,
ld_e_faultstring  TYPE CFX_API_T_FAULTSTRING ,
it_i_user_activities  TYPE STANDARD TABLE OF ACO_API_TS_USER_AUTHORITY,"TABLES PARAM
wa_i_user_activities  LIKE LINE OF it_i_user_activities ,
it_i_user_group_activities  TYPE STANDARD TABLE OF ACO_API_TS_USER_GRP_AUTHORITY,"TABLES PARAM
wa_i_user_group_activities  LIKE LINE OF it_i_user_group_activities ,
it_i_user_role_activities  TYPE STANDARD TABLE OF ACO_API_TS_ROLE_AUTHORITY,"TABLES PARAM
wa_i_user_role_activities  LIKE LINE OF it_i_user_role_activities .

DATA(ld_i_object_id) = 'some text here'.
DATA(ld_i_fieldgroup_id) = 'some text here'.
DATA(ld_i_fieldgroup_ns) = 'some text here'.
DATA(ld_i_fieldgroup_int_id) = 'some text here'.

"populate fields of struture and append to itab
append wa_i_user_activities to it_i_user_activities.

"populate fields of struture and append to itab
append wa_i_user_group_activities to it_i_user_group_activities.

"populate fields of struture and append to itab
append wa_i_user_role_activities to it_i_user_role_activities. . CALL FUNCTION 'CFX_FLDGRP_AUTH_SET' * EXPORTING * i_object_id = ld_i_object_id * i_fieldgroup_id = ld_i_fieldgroup_id * i_fieldgroup_ns = ld_i_fieldgroup_ns * i_fieldgroup_int_id = ld_i_fieldgroup_int_id IMPORTING es_fault = ld_es_fault e_faultstring = ld_e_faultstring * TABLES * i_user_activities = it_i_user_activities * i_user_group_activities = it_i_user_group_activities * i_user_role_activities = it_i_user_role_activities . " CFX_FLDGRP_AUTH_SET
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_es_fault  TYPE CFX_API_TS_FAULT ,
ld_i_object_id  TYPE SYSUUID_C ,
it_i_user_activities  TYPE STANDARD TABLE OF ACO_API_TS_USER_AUTHORITY ,
wa_i_user_activities  LIKE LINE OF it_i_user_activities,
ld_e_faultstring  TYPE CFX_API_T_FAULTSTRING ,
ld_i_fieldgroup_id  TYPE CFX_T_EXTERNAL_ID ,
it_i_user_group_activities  TYPE STANDARD TABLE OF ACO_API_TS_USER_GRP_AUTHORITY ,
wa_i_user_group_activities  LIKE LINE OF it_i_user_group_activities,
ld_i_fieldgroup_ns  TYPE CFX_T_EXTERNAL_NAMESPACE ,
it_i_user_role_activities  TYPE STANDARD TABLE OF ACO_API_TS_ROLE_AUTHORITY ,
wa_i_user_role_activities  LIKE LINE OF it_i_user_role_activities,
ld_i_fieldgroup_int_id  TYPE SYSUUID_C .

ld_i_object_id = 'some text here'.

"populate fields of struture and append to itab
append wa_i_user_activities to it_i_user_activities.
ld_i_fieldgroup_id = 'some text here'.

"populate fields of struture and append to itab
append wa_i_user_group_activities to it_i_user_group_activities.
ld_i_fieldgroup_ns = 'some text here'.

"populate fields of struture and append to itab
append wa_i_user_role_activities to it_i_user_role_activities.
ld_i_fieldgroup_int_id = 'some text here'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CFX_FLDGRP_AUTH_SET or its description.