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.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to attach documents at record level using GOS?

Former Member
0 Kudos

Hi Guys,

I have been using GOS for some time now and i am using GOS to attach documents at transaction level.

Now i need to design a utility where the user would first run a report and this report will bring a few records and the output should have an option to attach some PDF files for each record. Is this possible using GOS? Is there any other simple way to attach documents @ record level and not at transaction level? Any pointers??

Cheers

VJ

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos

<i>i need to design a utility where the user would first run a report and this report will bring a few records and the output should have an option to attach some PDF files for each record</i>

what are these records? whats the unique identifier for these records? let know these details, i will detail out the step you need to do.

Regards

Raja

11 REPLIES 11

Former Member
0 Kudos

check out these articles:

/people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background - part I

/people/rammanohar.tiwari/blog/2006/03/25/generic-object-services-gos--in-background--part-ii - part II

athavanraja
Active Contributor
0 Kudos

you need to create a custom business object xn SWO1) and specify the key as per your requirement, once this is done you can attach at record lever (as per the key)

Regards

Raja

0 Kudos

Hi Raja,

Can you provide some more details on how to achieve the same. Thanks in anticipation.

Cheers

VJ

Former Member
0 Kudos

Hi,

I have already used function module GOS_EXECUTE_SERVICE. Fill parameter IP_SERVICE with VIEW_ATTA, IP_POPUP with X, IP_RWMOD with E, IS_OBJECT, with objectkey en type.

Maybe you can also make use of the class CL_GOS_TOOLBOX_VIEW, method DISPATCH_SERVICE. Else you can look with SE24, fill in CL_GOS_*, hit F4, for more classes about GOS.

Regards,

Remco Broen

athavanraja
Active Contributor
0 Kudos

<i>i need to design a utility where the user would first run a report and this report will bring a few records and the output should have an option to attach some PDF files for each record</i>

what are these records? whats the unique identifier for these records? let know these details, i will detail out the step you need to do.

Regards

Raja

0 Kudos

Hi Raja,

The screen output will have shipment related data.

Delivery Order Item Data Qty

11223344 100 100.00

22112233 100 50.00

and so on. what we want to do is for each of the above record we want to attach the delivery note or the truck related information to identify which delivery was satisfied in which truck.

Let me know if you need more info.

Cheers

VJ

0 Kudos

two options:

1. you want to upload document/view document from your report only.

In this case

a. go to transaction SBDSV1

c. class name = "any name you desire without spaces"

class type = "other objects"

all other parameters copy from any other objects.

once this is done, in your program call fm

call function 'SWU_OBJECT_PUBLISH'

exporting

objtype = 'class name created in stepc'

objkey = 'concatenated devlierynumber item number variable'

exceptions

objtype_not_found = 1

others = 2.

this will bring up the icon for uploading document in the top left corner of your report. (call it after start of selection)

to manually test this process , go to transaction OAOR and use class name, type =OT and the key to view or upload the file.

2. you want to upload/view document from shipment document transaction.

in this case, you need to find the appropriate BO from SWo1 transaction which has go delivery number /item number as the key (for example look at BO LIPS from SWO1)

once this is done you can call the FM mentioned in the previous option by passing the classname and the delivery doc key. the upload/view can alos be done from the standard transaction for that document.

Hope this is clear.

Regards

Raja

0 Kudos

for option one, if you dont want the standard icon for uploading/viewing dont use the FM suggested earlier.

instead

write a clickable icon against each record on onclick of that call FM BDS_BUSINESSDOCUMENT_CREATEF and pass the document details.

more on BDS_BUSINESSDOCUMENT_CREATEF - search this forum, i had given code sample earlier.

Regards

Raja

0 Kudos

Hi Raja,

Many Thanks !! Appreciate your help on the same. I guess i got the pointer to proceed with my design.

One quick question. Any idea where this documents are stored?

Cheers

VJ

0 Kudos

if an external content server is setup it gets stored, else within the application server.

Regards

Raja

Former Member
0 Kudos

Hi,

I have similar requirement like this, where in i need to attach documents as icons (pdf, xls, word etc,) on program output so that users can doucble click on them to open those files.

I would appreciate if any one can help me regarding this.

Thanks,

Veduru