2007 Dec 27 7:00 AM
Hi all,
Can we give more than one value for an Authorization field in Auth-Check.
Ex: AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
ID 'ACTVT' FIELD '02'
ID 'CUSTTYPE' FIELD <Value 1> <Value 2> <Value 3>.
IF SY-SUBRC <> 0.
MESSAGE E...
ENDIF.
If yes, please help me with exact syntax.
2007 Dec 27 7:09 AM
HI,
u can't pass more than one value there.
so keep all the values u want to check in an internal table(itab)
and do like this.
LOOP AT itab.
AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
ID 'ACTVT' FIELD '02'
ID 'CUSTTYPE' FIELD itab-var.
IF SY-SUBRC ne 0.
flag = 1.
exit.
ENDIF.
ENDLOOP.
if flag = 1.
MESSAGE E....
endif.
rgds,
bharat.
Hi all,
Can we give more than one value for an Authorization field in Auth-Check.
Ex: AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
ID 'ACTVT' FIELD '02'
ID 'CUSTTYPE' FIELD <Value 1> <Value 2> <Value 3>.
IF SY-SUBRC <> 0.
MESSAGE E...
ENDIF.
If yes, please help me with exact syntax.
2007 Dec 27 7:08 AM
Hi,
Check with the following code
AUTHORITY-CHECK OBJECT 'Z_MM_PLANT'
ID 'ACTVT' FIELD '03'
ID 'WERKS' FIELD p_werks
ID 'TCD' FIELD l_transaction_code.
IF sy-subrc NE 0.
MESSAGE e000(oo) WITH 'No authorization for plant:'(004) p_werks.
ENDIF.
Regards,
Vikas.
plz reward if helpful..
2007 Dec 27 7:09 AM
HI,
u can't pass more than one value there.
so keep all the values u want to check in an internal table(itab)
and do like this.
LOOP AT itab.
AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
ID 'ACTVT' FIELD '02'
ID 'CUSTTYPE' FIELD itab-var.
IF SY-SUBRC ne 0.
flag = 1.
exit.
ENDIF.
ENDLOOP.
if flag = 1.
MESSAGE E....
endif.
rgds,
bharat.
2007 Dec 27 11:48 AM
Think there is some method to give more values for the same auth-field like
ID <field name>: <value 1>, <value 2>
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |