09-09-2013 11:06 AM
Hi,
I'm looking for a possibility to restrict(deactivate to be more specific) some of the GOS fields. I found in this forum 2 possible options:
1) making a copy of the service class from SGOSM and use it as a Z class in SGOS
2) implementing the BADI GOS_SRV_SELECT.
Is there a more simple way to deactivate some fields? Like for example PCATTA_CREA or restrict it via authorisation, not sure if the authorisation role SAP_BC_GOS_ATTACHMENT_LIST will help here.
Thanks a lot.
Best Regards,
Ray
09-09-2013 3:34 PM
Last time I used GOS_SRV_SELECT to implement an authority-check. First I created an authorization object with fields BOROBJTYPE and a Z_CLSNAME referring data element SGS_SRVNAM and check table SGOSATTR.
Then I implemented BAdI GOS_SRV_SELECT.
METHOD if_ex_gos_srv_select~select_services.
* Local data
DATA: ls_option TYPE sgos_sels.
FIELD-SYMBOLS <service> TYPE sgosattr.
* Check authorization per service/object type
LOOP AT services ASSIGNING <service>.
AUTHORITY-CHECK OBJECT 'ZXXXXXX'
ID 'BOROBJTYPE' FIELD is_lpor-typeid
ID 'Z_CLSNAME' FIELD <service>-name.
IF sy-subrc NE 0.
ls_option-sign = 'E'.
ls_option-option = 'EQ'.
ls_option-low = <service>-name.
APPEND ls_option TO et_options.
ENDIF.
ENDLOOP.
ENDMETHOD. "if_ex_gos_srv_select~select_services
METHOD class_constructor.
* Read whole services list
SELECT *
INTO TABLE services " this is an attribute of the class
FROM sgosattr.
ENDMETHOD. "class_constructor
Regards,
Raymond
09-09-2013 3:34 PM
Last time I used GOS_SRV_SELECT to implement an authority-check. First I created an authorization object with fields BOROBJTYPE and a Z_CLSNAME referring data element SGS_SRVNAM and check table SGOSATTR.
Then I implemented BAdI GOS_SRV_SELECT.
METHOD if_ex_gos_srv_select~select_services.
* Local data
DATA: ls_option TYPE sgos_sels.
FIELD-SYMBOLS <service> TYPE sgosattr.
* Check authorization per service/object type
LOOP AT services ASSIGNING <service>.
AUTHORITY-CHECK OBJECT 'ZXXXXXX'
ID 'BOROBJTYPE' FIELD is_lpor-typeid
ID 'Z_CLSNAME' FIELD <service>-name.
IF sy-subrc NE 0.
ls_option-sign = 'E'.
ls_option-option = 'EQ'.
ls_option-low = <service>-name.
APPEND ls_option TO et_options.
ENDIF.
ENDLOOP.
ENDMETHOD. "if_ex_gos_srv_select~select_services
METHOD class_constructor.
* Read whole services list
SELECT *
INTO TABLE services " this is an attribute of the class
FROM sgosattr.
ENDMETHOD. "class_constructor
Regards,
Raymond
09-09-2013 3:37 PM
Hi,
I was used the badi GOS_SRC_SELECT and it was really simple ...
regards
Fred
09-10-2013 3:00 PM
Thanks a lot. We already look into this possibility, we are only trying to look if a customising table exist to deactivates this fields. I guess there is none.
Best Regards,
Ray
09-12-2013 10:07 AM
09-12-2013 2:34 PM
Hi, Frederic,
I understand and we know that option also. We are only looking if there is a customizing table exist were you don't need to delete entry in order to deactivate it.
Best Regards,
Raynard
09-13-2013 7:56 AM
But you don't need to delete entries with the badi ..
here an example :
the BADI :
data : is_option type SGOS_SELS.
* Si on est chez les clients. on active que le menu client.
IF is_lpor-typeid EQ 'KNA1'.
MOVE : 'I' TO is_option-sign ,
'EQ' TO is_option-option ,
'ZKNA1_001' TO is_option-low.
APPEND is_option to et_options.
MOVE : 'I' TO is_option-sign ,
'EQ' TO is_option-option ,
'ZKNA1_999' TO is_option-low.
APPEND is_option to et_options.
ENDIF.
The table SGOSATTR :
I have define my own entries for the customer, but the class are the same.
So when the users are in a transaction for customer and the press the GOS button, they only have two lines : One to enter doc, the second to get the list of the docs.
It's really simple and usefull.
Regards
Fred
09-13-2013 9:14 AM
Thanks Fred! We were trying to avoid the use of BADI or any other modification in the system but this is already helpful.
Thanks again.
Best Regards,
Ray