on 03-29-2016 10:08 AM
Hi,
We're trying to implement notifications for approvers. We already have the BADI USMD_SSW_SYSTEM_METHOD implemented to notify the requestors. To identify the approvers (we have a few), we were thinking of getting the current processors from the user agent table based on the current step in the rule-based workflow.
Is there a way (Class, API,etc) to try and get the user agent on the rule-based workflow?
Hi Luqman,
Please see below sample code.
TYPES ts_range TYPE if_fdt_range=>ts_range .
TYPES: BEGIN OF s_table_data,
col_no TYPE int4,
row_no TYPE int4,
expression_id TYPE if_fdt_types=>id,
r_value TYPE REF TO data,
ts_range TYPE ts_range,
END OF s_table_data .
DATA: lt_data TYPE ts_table_data.
DATA: lo_factory TYPE REF TO if_fdt_factory,
lo_query TYPE REF TO if_fdt_query.
DATA: lv_name TYPE fdt_name,
lt_object_id TYPE if_fdt_types=>ts_object_id,
lv_objid TYPE if_fdt_types=>id,
lo_exp TYPE REF TO if_fdt_expression,
lo_exp_typ TYPE REF TO cl_fdt_decision_table.
lv_name = 'DT_USER_AGT_GRP_YCRTYP' " Give your User agent Decision table name
IF lo_factory IS NOT BOUND.
lo_factory = cl_fdt_factory=>get_instance( ).
ENDIF.
lo_factory->get_query(
EXPORTING
iv_object_type = 'EX' " Objekttyp
iv_expression_type_id = '0000EEEE000240FFFFFFFFFFFFFFFFFF'
RECEIVING
ro_query = lo_query
).
lo_query->get_ids(
EXPORTING
iv_name = lv_name " Beschreibung
iv_object_type = 'EX' " Objekttyp
IMPORTING
ets_object_id = lt_object_id " Object IDs
).
READ TABLE lt_object_id INTO lv_objid INDEX 1.
lo_factory->get_expression(
EXPORTING
iv_id = lv_objid " Universal Unique Identifier
RECEIVING
ro_expression = lo_exp " Expression
).
lo_exp_typ ?= lo_exp.
lo_exp_typ->if_fdt_decision_table~get_table_data(
IMPORTING
ets_data = lt_data " Output Data
).
Message was edited by: MDG User
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to assign them on specific step type in the user agent decision table, select the User type as AG but make sure you have defined your users in PFCG transaction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Luqman,
Did you try the code ? Whether able to read User Agent decision table data ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.