on ‎2019 Apr 16 2:15 PM
Hello everybody,
I want to access the Function Module GRAC_API_RISK_ANALYSIS by pyrfc.
The result of the call is:
{'ET_ACT_EXEC_SUM': [], 'ET_ACT_MGMT_SUM': [], 'ET_ACT_VIOL_DET': [], 'ET_ACT_VIOL_SUM': [], 'ET_ANALYTICAL_REPORT_SUM': [], 'ET_CRACT_EXEC_SUM': [], 'ET_CRACT_MGMT_SUM': [], 'ET_CRACT_VIOL_DET': [], 'ET_CRACT_VIOL_SUM': [], 'ET_CROLEPROF_VIOL_SUM': [], 'ET_CRPRM_EXEC_SUM': [], 'ET_CRPRM_MGMT_SUM': [], 'ET_CRPRM_VIOL_DET': [], 'ET_CRPRM_VIOL_SUM': [], 'ET_MITIGATION_SUM': [], 'ET_PRM_EXEC_SUM': [], 'ET_PRM_MGMT_SUM': [], 'ET_PRM_VIOL_DET': [], 'ET_PRM_VIOL_SUM': [], 'EV_RETURN_MSG': {'TYPE': 'S', 'ID': 'GRAC_SOD_MESSAGES', 'NUMBER': '300', 'MESSAGE': 'Risk analysis finished successfully', 'LOG_NO': '', 'LOG_MSG_NO': '000000', 'MESSAGE_V1': '', 'MESSAGE_V2': '', 'MESSAGE_V3': '', 'MESSAGE_V4': '', 'PARAMETER': '', 'ROW': 0, 'FIELD': '', 'SYSTEM': ''}}
As you can see, all the values are empty.
But for Users with Roles/Profiles like SAP_ALL there should be a lot of risks.
How could I use the Function Module to get correct results?
Used Python Code:
value1 = {u'SIGN':'I',u'OPTION':'EQ',u'LOW':'USERNAME'}
value2 = {u'SIGN':'I',u'OPTION':'EQ',u'LOW':'CLIENTNAME'}
value3 = {u'SIGN':'I',u'OPTION':'EQ',u'LOW':'Global'}
value4 = {u'SIGN':'I',u'OPTION':'EQ',u'LOW':'0',u'HIGH':'4'}
result = conn.call('GRAC_API_RISK_ANALYSIS',
IT_OBJECT_RANGE = [value1],
IT_SYS_RANGE = [value2],
IT_RULESETID_RANGE = [value3],
IT_RISKLEVEL_RANGE = [value4],
IV_OBJECT_TYPE = 1,
#IT_USER_TYPE = 'A',
#IV_OFFLINE_ANALYSIS = 'X',
#IV_ANALYSIS_MODE = '01',
IT_REPORT_TYPE = '01',
)
Request clarification before answering.
I´ve got the solution:
The IT_RULESETID_RANGE parameter needs the name of the vlue of the parameter in upper letters. So if your name of the rule id is "test" you need to set "TEST".
You can check the input parameters by SE30 old, if you run a program which uses the needed function module.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
This function module works perfectly. Are you passing the following details highlighted?
Prerequisite: Just make sure rules are already setup in GRC system and are generated. Also cross check if you are able to get the risk analysis results when you execute the risk analysis directly from path NWBC -> Access Management -> User Level Analysis
Input Values

Output Values

Regards,
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhu,
thank you very much for your answer!
In NWBC I can execute the analysis successfully.
But in the SE80 Testsequence or by pyrfc I get no results.
I think my input parameters are wrong.
Could you please add a screenshot of your inputdata fields from the function model test?
My input variables are:
value1 = {u'SIGN':'I',u'OPTION':'EQ',u'LOW':'A12CLNTXXX'}
value2 = {u'SIGN':'I',u'OPTION':'EQ',u'LOW':'DXXX'}
value3 = {u'SIGN':'I',u'OPTION':'EQ',u'LOW':'Global'}
#value4 = {u'CONNECTOR':'A12CLNTXXX',u'S':'EQ',u'LOW':''}
rseult = conn.call('GRAC_API_RISK_ANALYSIS',
IT_SYS_RANGE = [value1],
IT_OBJECT_RANGE = [value2],
IV_OBJECT_TYPE = 1,
IT_REPORT_TYPE = '01',
IT_USER_TYPE = 'A',
IT_RULESETID_RANGE = [value3],
#IT_SIMULATION = [value4]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 11 | |
| 10 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.