Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

A couple of things regarding GOS and ArchiveLink for attaching Business Doc

Active Participant
0 Kudos

A couple of things regarding GOS and ArchiveLink for attaching Business Documents

Our project has implemented an OpenText archive server and we have integrated it to the SAP environment.

The first phase that we have implemented is simply to allow users to attach documents into the various business transactions in SAP. SAP uses the GOS button in order to store (Create->Store Business Document) and retrieve (Attachment List) documents associated with document types and classes that we are storing in the archive server.

Iu2019ve done some searching on the web and have seen that other people have complained about these same two issues that we are experiencing.

Issue #1:

Everything is working well, but weu2019ve got a few users starting to make some noise about how SAP handles the attaching of the documents. Iu2019ve done some investigation and it seems to me that it is just the way that SAP has architected itu2019s solution for connecting to repositories via ArchiveLink.

The users are complaining that they canu2019t attach documents when they are in u201Ccreateu201D transactions and can only do them in u201CDisplayu201D or u201CChangeu201D transactions. For example they can attach documents to customers in XD02 and XD03 but not XD01.

From a technology perspective I understand why this is the case. They havenu2019t included the GOS functionality in create transactions because the main input required for any GOS functions is the document number and the document hasnu2019t been created yet and therefore wonu2019t be able to update the link table. Even more so, the GOS function is executed as a separate DB transaction.

Iu2019ve told them that in order to make it work on u201CCreateu201D transactions I would have to do all sorts of custom development to re-architect how standard SAP uses GOS and ArchiveLink. This would of course be a big rework of standard SAP across many transactions. It would be a complicated piece of work where we would have to do some sort of a loose/late coupling in the link table. This is a path that I for sure donu2019t want to go down because it would be a Pandorau2019s box of stuff.

I mentioned to them that we could maybe use a different scenario where the attachment comes in as part of a workflow which triggers the u201CCreateu201D transaction and then as a final step attaches the document, but this isnu2019t what they are looking for, they want to attach various documents at the time of creation of the business transaction. Iu2019ve told them that they will have to use the u201CCreateu201D transaction, save and then use the u201CChangeu201D transaction so that they can access the ArchiveLink functionality.

Iu2019ve been explaining this to them, but unfortunately people donu2019t seem to believe me that every project would have this same problem and that it is a result of how SAP has architected the archive link functionality via the GOS button. They are asking me to check with other projects, so I wanted to find out if anyone had this same issue at their clients and if you have found a work around. I figure from what Iu2019ve seen of how SAP has architected it that there wouldnu2019t have been any easy work around.

Issue #2:

I wanted to see if you had come across one other annoying thing about how SAP does ArchiveLink functionality. If you use the GOS button to go to u201CAttachment Listu201D to view a document that has been stored via u201CCreate->Store Business Documentu201D then the title of the document is always listed as the Document Type and it doesnu2019t show the individual file name. Iu2019ve debugged through the standard SAP code and have seen that they donu2019t store the file name for business documents (Only for attachments stored in the SAP Database), but I wanted to see if anyone had had experience with any customers complaining about this. It ends up being annoying for users because for example they may attach to a customer master record multiple files for a document type called u201CCustomer Info Sheetu201D and now from the u201CAttachment Listu201D there is no way to differentiate between them. Seems that SAP didnu2019t think it through entirely I guess.

Any help is appreciated.



Active Contributor
0 Kudos

Reply to Issue # 1

We have this issue previously, we are attaching documents to a custom transaction using a custom business object (BOR) created thru SW01. During the create transaction , we also could not able to attach documents, due to SRGBTBREL(Table for Relationships in GOS Environment) link. So we educate the users to attach the documents only thry CHANGE transaction.

We have faced another issue that once user deletes a documents thru GOS (We are using class cl_gos_manager), but still links are not deleted sucessfully from SRGBTBREL table. due to this users goes in display or change mode of the transaction , in the attachment list deleted attachments are shown. When user double click on this system says displays information message that " document not found".

Please check this link.

0 Kudos

Thanks for your thoughts on it. I think that you're right that we might just have to go the route of user education, "So we educate the users to attach the documents only thry CHANGE transaction.".

It has been frustraiting becuase in debugging through the GOS and ArchiveLink architectures I've seen so many places where it could have been done in a more flexible way.

0 Kudos

Hi Subramony,

I have a similar requirement as you did, we have standard transaction EHSAMBTAET  and it does not have any standard GOS configuration for it, we even do not have a standard business object for the transaction. so we have created a custom business object, but dont know how to proceed further.

Can you please guid me how you have integrated or call the open text business content screen of Open text from your custom transaction so that we can add the documents related to the transaction.



Active Contributor
0 Kudos


this is what i´d try to do if possible:

1.- Try to find a user exit/badi for transaction XD01 that gets triggered

once the id(st_object0-instid see below) is generated

e.g. (found doing a search in the forum)



Business Add-in





2.- then within the exit/badi do something like

(this sample is for incoming invoices):

DATA: st_object0 TYPE sibflporb.

DATA: i_belnr0 TYPE rbkp-belnr,

i_gjahr0 TYPE rbkp-gjahr.

CLEAR: st_object0, i_belnr0, i_gjahr0.

i_belnr0 = invfo-belnr.

i_gjahr0 = invfo-gjahr.

CONCATENATE i_belnr0 i_gjahr0 INTO


st_object0-typeid = 'BUS2081'."Here goes your object

st_object0-catid = 'BO'.



is_object = st_object0

ip_mode = 'C'.

Best regards.

0 Kudos

As recommended, I thought about going the route of using a user exit or an enhancment point and triggering the attachment of the document after the save of the buisness object. Unfortuantly what they are looking for is a generic solution that will work on all of the transactions for which they have configured document types so I would end up having to do specific enhanments or user exits for all of the transactions. XD01 was actaully just an example of one there is a whole long list of them.


0 Kudos

Just to close off this thread, since there is no silver-bullet solution for it, I wanted to atleast share with eveyone something that I did experinment with and got working.

For the issue of attaching buisness documents during create the users were especially wanting this functionality in the ME51N transaction, so I figured out a nice work around.

ME51N unlike some of the older transactions in the system has the GOS button on it even though it is a create transaction, the problem is that the "Create->Store Buisness Document" menu is turned off since it requires the existing of a doucment number. So I wanted to see what it would take to build my own GOS functionality for attaching buisness documents in any create transactions that atleast have the GOS button on them.

Some investigation showed the following:

- The disabling of the option is handled through the method CL_ARL_SRV_LINK->CHECK_STATUS which has the logic to turn off the option if a document number doesn't exist yet.

- The option for "Create->Attachement" works on create transactions because it impliments the interface IF_GOS_SERVICE_ON_CREATE~ON_OBJECT_CREATED inside it's class CL_GOS_SRV_ATTACHMENT_CREATE. This method is triggered once the document is saved and assigned a document number. So during the actual EXECUTE method if a document number doesn't exist then it adds the document but doesn't create the link to the buisness object. Once the document number is assigned to the buisness object it then makes the links.

So what I did was:

- I made a copy of class CL_ARL_SRV_LINK. Originall I wanted to just inherit it but unfortuantly couldn't since it is marked final.

- I used SM30 to put a new entry into the GOS menu table SGOSATTR and linked it to my new class

- In my new class I udpated the EXECUTE method to if there is no document number then to generate a GUID and use this for the attaching (if you go to the link table you'll see it in there) and store this GUID on an attribute of the object.

- In my new class I added on interface IF_GOS_SERVICE_ON_CREATE~ON_OBJECT_CREATED, and put in logic so that once the document number is known it calls the ArchiveLink APIs to create a relationship to the attached buisness document and delete the temporary one using the GUID.

This works really nice except for two items:

- If a user aborts the transaction then the document has been stored in the content server and a link exists in the link table via the GUID. When the attachment is done via SAPOffice this is handled by having the doucment atleast still appear in the user's Office folders. I would have to do something like the linking of it to a a generic buisness object or something so that it is atleast but into a bucket.

- Most create transactions don't have the GOS button on them (only on change and display).

So I figured I'd atleast share this partial solution with everyone.


0 Kudos

I am very interresting in this soution. Can you please give us more details on the solution especially on these steps :

"- In my new class I udpated the EXECUTE method to if there is no document number then to generate a GUID and use this for the attaching (if you go to the link table you'll see it in there) and store this GUID on an attribute of the object. 

- In my new class I added on interface IF_GOS_SERVICE_ON_CREATE~ON_OBJECT_CREATED, and put in logic so that once the document number is known it calls the ArchiveLink APIs to create a relationship to the attached buisness document and delete the temporary one using the GUID."

Active Participant
0 Kudos

Unfortuantly didn't come up with a generic soultion that will work accross all Create trasactions.

Former Member
0 Kudos

In ECC6.0 I am able to see the relationship between business object and the documents attached to it ("attachment done using create attachment in GOS) through table SRGBTBREL.

But in SAP 4.6c system, this table is not available.

Please let me know, if there is any such table, which keeps the same relationships in old versions of SAP.

Thank you.

Former Member
0 Kudos


Are you able to find the resolution for Issue # 2 i.e. user defined document name in attachment list?

I am using ECC 6.0.

Thanks in advance.

Have a nice day ahead !

Ruhi Hira

Former Member
0 Kudos


Do you have resolution for Issue 2? If so can you share with us as we are encountering similar issue with our users

Thanks for your help.

0 Kudos

Been a couple of years since looking at it. At the time we never did find a solution to #2.

0 Kudos

Please check notes 1560955 and 1451769.

Former Member
0 Kudos

Hi Experts!

In my case we want to see the Creator in the GOS when we attached a bussiness document. We've already implemented notes 1451769 and 1560955 but it is still not working because if I attach a business document the field Creator in The GOS attachment list is not filled and the table TOAAT is empty. What more I have to do to see the name of the person who attach the bussiness document there?

Although I don't know if I have to see my bussiness document that I have attached in the table SRGBTBREL because I can't see them in this table. I can see them in the table TOA01 but not in this.

Thanks in advance!!!

0 Kudos

I first had the same problem when I implemented 1451769. I activated RESERVE1 in OAG1, but TOAAT was still empty after the attachment of new files.

My problem was that I manually amended function module ARCHIV_CONNECTION_INSERT to add the import parameters.

And when I automatically implemented note 1451769 via SNOTE the other necessary changes in ARCHIV_CONNECTION_INSERT

were NOT implemented (which included the update of TOAAT). I implemented them manually and then everything was okay.