Generic Object Services - restrict toolbar functions?
Hello,
When I create a URL link to an object, there is always a 'delete' button in the toolbar of the attachment list. Apparently, there are no authorization checks being made and everyone can delete this link.
Is it possible to remove this button from the toolbar? Or at least making sure that not everyone can delete the link?
Thanks!
Hi,
I think you are using CL_GOS* class for this. then
module call_gos_attachment output.
"<< I have created a authorisation object and
" and called here if user have only display or change
" access then the ip_mode will get value passed
" accordingly
if ( sy-tcode eq c_yars2 or sy-tcode eq c_yars3 ).
i_borident-objtype = 'YARS_ATTA'.
i_borident-objkey = yarshdr-docno.
create object gos_manager
exporting
is_object = i_borident
it_service_selection = i_services
ip_no_commit = ' '
exceptions
object_invalid = 1.
else. " Display Mode
i_borident-objtype = 'YARS_ATTA'.
i_borident-objkey = yarshdr-docno.
create object gos_manager
exporting
is_object = i_borident
it_service_selection = i_services
ip_mode = 'D' "<<<<<< Check for display mode
exceptions
object_invalid = 1.
endif.
endmodule. " Call_gos_attachment Output
or if this suit your need then
create object gos_view
exporting
ip_mode = 'D'. " <<<<Display Mode
* Start GOS Service for attachement view
i_viewobj-objtype = 'YARS_ATTA'.
i_viewobj-objkey = yarshdr-docno.
call method gos_view->start_service_direct
exporting
ip_service = 'VIEW_ATTA'
is_object = i_viewobj.
This i have done it for one of the custom Generic object, i think this one will help you out.
a®
Similar Messages
-
Generic Object Services ; create attachment function grey out in Tcode KA03
Hi all,
I would like to know how can I enable create attachment function in GOS toolbar in Tcode KA03.
Currently it was grey out.
However, was tried to use the same function in KS03 and it works.Please help. Thanks!I just found the solution...
SAP note : 961572
Symptom</u>
In the transactions for displaying cost elements (KA03) and changing cost elements (KA02), the 'Services for Object' function does not work correctly, as most Generic Object Services are unavailable.
Other terms
KA03, KA02, SWO1, K_OBJECT_SERVICES_INITIALIZE, BUS1059, BUS1030
Reason and Prerequisites
The problem is caused by a program error.
Solution
Implement the attached program corrections
Then go to Transaction SW01 (Business Object Builder), enter BUS1059 as the object type, click Change, and make the following changes:
Navigate to Methods -> RevenueType.Display, press F2 to select it, and go to the 'ABAP' tab page: Select the 'Transaction' radio button, enter the name as KA03, and click 'Save'
Navigate to Attributes -> Attribute properties, select the 'Mandatory' checkbox, and click 'Save'
Then change the release status by navigating as follows:
Edit -> Change Release Status -> Object Type -> To implemented
Edit -> Change Release Status -> Object Type -> To released
Then double-click BUS1059 (or select using F2) in SWO1 to reach the 'General' tab page, which should appear as follows:
ObjectType BUS1059 Revenue element
Object Name RevenueType
Program RBUS1059
Objtype status generated Saved released -
Generic Object Services restrict user access
Hi
I have the following scenario, could anyone offer any pointers as to how to achieve a solution.
I have two groups of people, A and B, my requirement is to only allow group A to access/delete documents that have been created by users in group A, and for Group B to only have access to attachments created by users in group B.
An in addition to Ideally have two content repositories one for A and one for B
Thanks
JohnHi John,
Please adjust role with S_OC_ROLE and S_GOS_ATT.
1) If a user has a role with S_OC_ROLE with *, then he will be able to delete the attachements made by any othe user, then in this case S_GOS_ATT will not be checked.
2) If a user has a role with S_OC_ROLE with " ", then he will be NOT able to delete the attachements made by any othe user, unless S_GOS_ATT is assigned.
Thanks,
CB -
Attach Documents using Generic Object Services
With reference to Manual Bassani's SDN Contribution of code examples on how to attach documents using Generic Object Services - we have found that since implementing ECC 6 the following code no longer works (at the end of page 9):
CALL CREATE ATTACHMENT SERVICE FROM TOOLBAR
WHEN 'ATTACH'.
CALL METHOD MANAGER->START_SERVICE_DIRECT
EXPORTING
IP_SERVICE = 'CREATE_ATTA'
IS_OBJECT = OBJ
EXCEPTIONS
NO_OBJECT = 1
OBJECT_INVALID = 2
EXECUTION_FAILED = 3
OTHERS = 4.
It is necessary to use IP_SERVICE = 'PCATTA_CREA' to get this to function correctly.
The original document can be found at [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de5fb3]Check the Naimesh Patel Blog he explain very well
http://help-abap.blogspot.com/2009/02/generic-object-services-gos-toolbar.html -
Attach Documents to Custom Program Using Generic Object Services
Hi There,
I created Object type ZGOS and used in the custom program, when i try to attach documents it allows and then shows in attachment list.
But When I use that program next time that document attached is not available.
Is there any separate save Class or FM available for saving the document to the specified custom program.
I am using following code in the program,
CLEAR obj.
SET OBJECT TYPE TO 'ZGOS'
obj-objtype = objtype.
SET OBJECT KEY = REPORT NAME
SELECT SINGLE name
FROM trdir
INTO obj-objkey
WHERE name = sy-repid.
CALL GOS MANAGER WITHOUT CONTAINER (WILL BE DISPLAYED IN THE TOOLBAR)
CREATE OBJECT manager
EXPORTING
is_object = obj
EXCEPTIONS
OTHERS = 1.
Thanks in advance.Check the Naimesh Patel Blog he explain very well
http://help-abap.blogspot.com/2009/02/generic-object-services-gos-toolbar.html -
Missing Function within VC01N Generic Object Services (simple note)
We want to use the generic object services (GOS) within transaction VC01N. But we are missing the function to enter only a simple note. Behind the GOS Icon within VC01N menu step: Create -> Create note is not available.
This is different to other transactions with GOS functionality like VA02. There the menu step: Create -> Create note is available.
And idea why it is designed in this way and how we can make the simple note function available in CV01N.
Many Thanks in advance for your help,.
Klaus
Edited by: Klaus Reitz on Sep 10, 2008 7:56 PMWe want to use the generic object services (GOS) within transaction VC01N. But we are missing the function to enter only a simple note. Behind the GOS Icon within VC01N menu step: Create -> Create note is not available.
This is different to other transactions with GOS functionality like VA02. There the menu step: Create -> Create note is available.
And idea why it is designed in this way and how we can make the simple note function available in CV01N.
Many Thanks in advance for your help,.
Klaus
Edited by: Klaus Reitz on Sep 10, 2008 7:56 PM -
Attachments Activating Generic Object Services (GOS) in VA41/VA42 at item level
Hi to All,
I'm trying to manage attachments for sales document at item level.
I've already read this wonderfull post (Activating Generic Object Services Toolbar in SAP Objects) but I didn't understand how manage attachments at item level.
Please, if anyone has ideas of how to achieve it please share solutions.
Thanks & Best Regards,
UmbertoHi again,
Thanks for the answers, they were very helpful,
but the customer isn't happy with the "Store business Documents" and it's Drag n' drop interface.
I'm to develop a new GOS menu item, that will show
a normal Open File dialog, and a following popup
where the user can change the document title shown
in the Attachment list.
ARCHIVOBJECT_CREATE_FILE and ARCHIVOBJECT_GET_TABLE
along with ARCHIV_CONNECTION_INSERT should probably
cover the functionality I need.
I know both the BOR type ID and the object ID is
available to me in the Execute() method of the GOS menu handler I'm overriding, but for the ARCHIV_CONNECTION_INSERT, I'm supposed to supply an AR_OBJECT parameter (I know that this information is stored in the TOAOM table), but I have no clue where to get this information for the current object I'm trying to add an attachment for.
Regards,
Lars Wilhelmsen -
Create Attachments to Generic Object Services from Webdynpro appliccation
Hi,
I have requirement to Create Attachments to Generic Object Services(GOS) in equipment master (IE03) from webdynpro when a user clicks on upload button and also allow the user to delete the attachments .
Can anyone advice me of any Function Modules or logic to use from Web GUI.
I used below logic from R/3 to create attachments, but from webdynpro this method doesn't work.
DATA lo_attachment TYPE REF TO cl_gos_document_service.
CREATE OBJECT lo_attachment.
CALL METHOD lo_attachment->create_attachment
EXPORTING is_object = ls_object
IMPORTING ep_attachment = lp_attachment
Your inputs are appreciated.
Thanks
Rajesh YaldaHi,
try using the Class CL_GOS_SRV_ATTACHMENT_CREATE with Method EXECUTE_ITS.
best regards,
Michael -
How to use Generic Object Services(GOS) for each table control record.
Dear Expert,
I am using generic object services for document attachment but i am facing a problem while attaching document to a table control row. my requirement is to attach separate document for each and every row of table control but i am unable to attach document row wise of the table control.for each row GOS should display corresponding attached document not all the attached document.
Thanks in Advanced
Bhuwan Tiwari
Edited by: BHUWAN TIWARI on Feb 8, 2011 4:16 PM
Edited by: BHUWAN TIWARI on Feb 8, 2011 4:16 PMYou haven't explained what object and object key you're using, nor have you provided any indication of how you implemented the GOS attachment functionality. You need to provide more information to resolve an issue like this.
-
Display and Manage Attachments of Generic Object Services in Webdynpro
Hi All,
I need to have a button in the webdynpro that when a user clicks it will pop up a table that display a list of files already attached to a Generic Object Services(GOS) and also allow the user to delete the attachments and upload new attachments.
Can anyone advice me of any Function Modules or Methods that i can use to achieve those functions (retrive and display attachments in the GOS, delete existing attachment from GOS, upload new attachment to GOS).
Thanks and Regards,
weilongHi
You need to pass parameters as per the code below
****Data Types
CONSTANTS:lc_dokob TYPE dokob VALUE 'KNA1',
lc_dokar TYPE dokar VALUE 'LEG',
lc_dappl TYPE dappl VALUE 'BVO',
lc_sign TYPE c VALUE 'I',
lc_option(2) TYPE c VALUE 'EQ',
lc_docpart(3) TYPE c VALUE '000',
lc_docversion TYPE dokvr VALUE '00',
lc_status TYPE dokst VALUE 'AL',
ls_attc-doknr TYPE doknr,
ls_return TYPE bapiret2,
*****Function Module
CALL FUNCTION 'BAPI_DOCUMENT_DELETE_DIRECT'
EXPORTING
documenttype = lc_dokar
documentnumber = ls_attc-doknr
documentpart = lc_docpart
documentversion = lc_docversion
IMPORTING
return = ls_return.
Thanks
Vishal -
Generic Object Services - Create Attachment
Hi SDN experts
In the trip details page of the travel expense manager, may i know what Function Module does the "Create Attachment" functionality in the Generic Object Services trigger? Appreciate if anyone is able to provide me with an answer. Thank you
Regards
LVYou are in great trouble. Repeated posting of a single thread will really make you a Guest.
You have replicated this post in SEVEN forums.
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
As you are new to the forum please Read the [Forum Rules|http://wiki.sdn.sap.com/wiki/x/FgQ] before posting more.
Regards
Karthik D -
Generic Object Services using Web Dynpro
I am using Web Dynpro for ABAP and would like to access Generic Object Services (GOS) to view attachments to an SAP Business Object. Using the cl_gos* classes does not work when running WebDynpro as it uses the controls framework.
How can I access the functionality of GOS from a Web Dynpro application?
Regards,
BobHi,
I assume that you wantted to have the attachements in a mail.
Please check out the Adobe Forms(ie PDF attachements) and Office Control UI elements in WDA.
Regards
Lekha -
How to attach document using Generic Object Service
Hi all,
How can i create attachment to the parked invoice using Generic Object services? i want function modules which are used to do it.
Actually I want to do this from the business object method. I am having word document as one of the workitem step. once i get this document I need to attach this document to the parked invoice so that users can see that document by view object list.
Its urgent.
thanks.Hello,
Check your configuration of document type assignement to required business document - object type, Archivelink table, content repository in OAC3 transaction.
Goto respective business document > Click on GOS > Create > Store business document - Here you can see defined document type with desctiption. Double click on this the assign your document to this business document. Save it.
This will help in attaching the document to your required business document.
To verify you can check the archivelink table or by transaction OAAD.
Hope this will help you.
-Thanks,
Ajay -
GOS: Generic Object Services (BC-SRV-GBT)
Hi All,
I have a requirement to implement GOS for our Netting document - object type OIA_BUS001, we need to link a url to our document. And I managed to get the toolbox to appear besides the gui title, using both the FM SWU_OBJECT_PUBLISH and the OO codes that was provided in the SAP help.
But the results is not quite right - in both cases, when I click on the toolbox -> create, all the functions listed, 'Create attachement, 'create note', etc, are greyed out.
Is there something that I'm missing here?
That's not the least of my problems. When (being optimistic here) this ok, I need to find a way on how to update the url in the background....
Appreciate if anybody have some pointers here.
Regards,
NikTry the following code.
/people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background
Report Z_RMTIWARI_ATTACH_DOC_TO_BO
Written By : Ram Manohar Tiwari
Function : We need to maintain links between Business Object and
the attachment.Attachment document is basiclally a
business object of type 'MESSAGE'.In order to maintain
links, first the attachment will be crated as Business
Object of type 'MESSAGE' using Message.Create method.
Need to check if we can also use FM
'SO_DOC_INSERT_WITH_ORIG_API1' or SO_OBJECT_INSERT rather
than using Message.Create method.
REPORT Z_RMTIWARI_ATTACH_DOC_TO_BO .
Include for BO macros
INCLUDE : <CNTN01>.
Load class.
CLASS CL_BINARY_RELATION definition load.
CLASS CL_OBL_OBJECT definition load.
PARAMETERS:
Object_a
P_BOTYPE LIKE obl_s_pbor-typeid DEFAULT 'BUS2012', " e.g. 'BUS2012'
P_BO_ID LIKE OBL_S_PBOR-INSTID DEFAULT '4700000368', " Key PO No.
Object_b
P_DOCTY LIKE obl_s_pbor-typeid DEFAULT 'MESSAGE' NO-DISPLAY,
P_MSGTYP LIKE SOFM-DOCTP DEFAULT 'URL' NO-DISPLAY,
Relationship
P_RELTYP LIKE mdoblrel-reltype DEFAULT 'URL'.
types: BEGIN OF TY_MESSAGE_KEY,
FOLTP TYPE SO_FOL_TP,
FOLYR TYPE SO_FOL_YR,
FOLNO TYPE SO_FOL_NO,
DOCTP TYPE SO_DOC_TP,
DOCYR TYPE SO_DOC_YR,
DOCNO TYPE SO_DOC_NO,
FORTP TYPE SO_FOR_TP,
FORYR TYPE SO_FOR_YR,
FORNO TYPE SO_FOR_NO,
END OF TY_MESSAGE_KEY.
DATA : LV_MESSAGE_KEY type TY_MESSAGE_KEY.
DATA : LO_MESSAGE type SWC_OBJECT.
DATA : LT_DOC_CONTENT type standard table of SOLI-LINE with header
line.
First derive the Attachment's ( MESSAGE )document type.
P_DOCTY = 'MESSAGE'.
CASE P_RELTYP.
In case of URls
WHEN 'URL'.
P_MSGTYP = 'URL'.
In case of Notes / Private Notes
WHEN 'NOTE' OR 'PNOT'.
P_MSGTYP = 'RAW'.
WHEN 'ATTA'.
P_MSGTYP = 'EXT'.
Not implemented as yet...exit
EXIT.
WHEN OTHERS.
....exit
EXIT.
ENDCASE.
Create an initial instance of BO 'MESSAGE' - to call the
instance-independent method 'Create'.
swc_create_object LO_MESSAGE 'MESSAGE' LV_MESSAGE_KEY.
define container to pass the parameter values to the method call
in next step.
swc_container LT_MESSAGE_CONTAINER.
Populate container with parameters for method
swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTITLE'
'Title, created programatically'.
swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTLANGU' 'E'.
swc_set_element LT_MESSAGE_CONTAINER 'NO_DIALOG' 'X'.
swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTNAME' P_DOCTY.
swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTYPE' P_MSGTYP.
'DocumentContent' is a multi-line element ( itab ).
In case of URLs..it should be concatenated with &KEY& in the begining.
CASE P_MSGTYP.
WHEN 'URL'.
LT_DOC_CONTENT = '&KEY&http://www.gtservicing.com' .
append LT_DOC_CONTENT.
In case of Notes or Private Notes, get the data from files on appl
server or from wherever(? - remember background).
WHEN 'RAW'.
LT_DOC_CONTENT = 'Hi How r u?' .
append LT_DOC_CONTENT.
In case of File attachments
WHEN 'EXT'.
Upload the file contents using open dataset in lt_doc_content .
Some conversion ( Compress ) might be required.
Not sure at this point
ENDCASE.
swc_set_element LT_MESSAGE_CONTAINER 'DocumentContent' LT_DOC_CONTENT.
swc_call_method LO_MESSAGE 'CREATE' LT_MESSAGE_CONTAINER.
Refresh to get the reference of create 'MESSAGE' object for attachment
swc_refresh_object LO_MESSAGE.
Get Key of new object
swc_get_object_key LO_MESSAGE LV_MESSAGE_KEY.
Now we have attachment as a business object instance. We can now
attach it to our main business object instance.
Create main BO object_a
data: LO_IS_OBJECT_A type SIBFLPORB.
LO_IS_OBJECT_A-INSTID = P_BO_ID.
LO_IS_OBJECT_A-TYPEID = P_BOTYPE.
LO_IS_OBJECT_A-CATID = 'BO'.
Create attachment BO object_b
data: LO_IS_OBJECT_B type SIBFLPORB.
LO_IS_OBJECT_B-INSTID = LV_MESSAGE_KEY.
LO_IS_OBJECT_B-TYPEID = P_DOCTY.
LO_IS_OBJECT_B-CATID = 'BO'.
*TRY.
CALL METHOD CL_BINARY_RELATION=>CREATE_LINK
EXPORTING
IS_OBJECT_A = LO_IS_OBJECT_A
IP_LOGSYS_A =
IS_OBJECT_B = LO_IS_OBJECT_B
IP_LOGSYS_B =
IP_RELTYPE = P_RELTYP
IP_PROPNAM =
I_PROPERTY =
IMPORTING
EP_LINK_ID =
EO_PROPERTY =
*CATCH CX_OBL_PARAMETER_ERROR .
*CATCH CX_OBL_MODEL_ERROR .
*CATCH CX_OBL_INTERNAL_ERROR .
*ENDTRY.
Check if everything OK...who cares!!
commit work. -
Generic Object Services (GOS) + ArchiveLink against IXOS.
Hi all,
I'm currently working on a project where I'm supposed to extend the Generic Object Services (GOS) Icon with a menu item for storing documents down to IXOS through ArchiveLink, and a functionality for retrieving them / attaching them to an email.
So far, I concluded that I need to create a class, whose superclass is CL_GOS_SERVICE, and at least override the EXECUTE() method with some functionality.
The ARCHIVOBJECT function group contains some (probably)
useful function modules - like ARCHIVOBJECT_CREATE_FILE and ARCHIVOBJECT_GET_BYTES / ARCHIVOBJECT_GET_TABLE.
My problem so far is that I don't see the "connection",
ARCHIVOBJECT_CREATE_FILE takes ARCHIV_ID, DOCUMENT_TYPE
and PATH as arguments (parameters), and returns ARCHIV_DOC_ID - an unique ID to the stored document
But how is the link between the archived document and the business object (i.e. the current object of the transaction I'm in) maintained?
Thanks in advance,
regards,
Lars WilhelmsenHi again,
Thanks for the answers, they were very helpful,
but the customer isn't happy with the "Store business Documents" and it's Drag n' drop interface.
I'm to develop a new GOS menu item, that will show
a normal Open File dialog, and a following popup
where the user can change the document title shown
in the Attachment list.
ARCHIVOBJECT_CREATE_FILE and ARCHIVOBJECT_GET_TABLE
along with ARCHIV_CONNECTION_INSERT should probably
cover the functionality I need.
I know both the BOR type ID and the object ID is
available to me in the Execute() method of the GOS menu handler I'm overriding, but for the ARCHIV_CONNECTION_INSERT, I'm supposed to supply an AR_OBJECT parameter (I know that this information is stored in the TOAOM table), but I have no clue where to get this information for the current object I'm trying to add an attachment for.
Regards,
Lars Wilhelmsen
Maybe you are looking for
-
Home Directory is Full? And it is so not Full
Hi There: I have two users on my computer and for some reason I cannot launch my mail program on one of them. Both users are listed as administrators and I have 2 hard drives installed using a firmtek controller card. The first drive where the OS is
-
Problem in Infotype Creation.
Hi Experts, I have created a Infotype 9051. When i try to open it via PA30 it says that No read authorization for Travel and Trip Infotype Any pointers will be a great deal of help. TIA. Edited by: Matt on Nov 13, 2008 12:03 PM - asap text removed
-
How to query the username....
Hello folks, please can anyone help me on how to get the username of a user who is locking a specific row, for example if a user in a multi-user application is locking the record where emp_id=10 and name=X, how can I get his name????? and thank you i
-
What freedom do we have to modify Mission Control-desktops?
I mean: Can I label a desktop in Mission Control-View? Can I give priority or order a specific kind or just certain desktops/fullscreen-windows up there? (I'm open to developer-level modifications.)
-
I recently went from using windows vista to windows 8 and need to upgrade my photoshop elements 6