Application Development and Automation 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: 
Read only

Attach file and display in module pool program

Former Member
0 Likes
3,717

Hi All,

I have a requirement where i am creating a screen (custom screen- module pool program) where user will enter all teh journal entry details and also has option to upload the supporting file if any and click on 'SUBMIT'. Then program should trigger the WF and once after the approval then it has to post the record in SAP through GB01 transaction.

The help required is, when user upload the supporting doc that has to be uploaded(stored somewhere in SAP database ) and attached to that document after posting (attached to the corresponding document generated). User should be able to see that attachmnet on teh screen (attachment path and double click on this link should be able to open the file)

1 approach is we can make use of GOS attachment. But in my case they need 'Upload' push button to upload the file and under some block the attachmnet link has to be displayed something that.

Kindly suggest something on this.

Thanks in advance.

Regards,

Ashwini

9 REPLIES 9
Read only

brunobex
Active Participant
0 Likes
2,209

Hi Ashwini,

See if that serves you:

[How to Attach Documents to Any Custom Program Using Generic Object Services|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de5fb3]

Regards

Bruno Xavier.

Read only

former_member195421
Participant
0 Likes
2,209

Hi ,

Posibly you can do it through the SAP content server and Archivelink configuration .

Regards,

Ratheesh BS

Read only

0 Likes
2,209

Hi Ajeesh,

Thanks for the reply. I uploaded the file and placed in SAP database (content repository).

Can u please tell me how can I read this file path (in SAP) and display it on my screen in order to read the file attached to that document. I can provide the document number and business object type as input for this.

Is there any standard function module for this? I want exactly the functionality of "GOS (Service: Attachment List) -Attachment list".

Please suggest on this.

Regards,

Ashwini

Read only

0 Likes
2,209

Hi ,

Please refer the below link .

Regards,

Ratheesh BS

Read only

0 Likes
2,209

Hi Ratheesh,

Thanks again. But the link u provided is useful when we need to open in web browser i guess.

I found 1 methd which i sgiving the attachment link refer teh link :

http://help-abap.zevolving.com/2009/02/generic-object-services-gos-toolbar-part-4-get-attachements/

With this I am almost nearer to results.What I need is :

I would like to know the type of document attached wheather PDF, JPG, text file etc. how could i find out for the attachments!

Ideally i could see these as an icons on the Attachment List window.

Here my requirement is i need to create a report program which lists title of the attachement and

type of the attachment.

Regards,

Ashwini

Read only

0 Likes
2,209

Can any one tell me is there any function module which will upload any file of any format (txt, doc, pdf, etc) from local desktop to an internal table in the program.

Actually I want to place this file in GOS trhough my code.I want same functionality as GOS create attachment (which support any file type)

GUI_UPLOAD is uploading doc/pdf files into internal table with some junk values.Please suggest.

Regards,

Ashwini

Read only

0 Likes
2,209

Hi ,

Please check this link , it describes achieving the GOS functionality through custom program .

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de5...

Regards,

Ratheesh BS

Read only

0 Likes
2,209

adding to the above post:

http://wiki.sdn.sap.com/wiki/display/ABAP/GOS%20-%20Attachments%20to%20SAP%20Documents?bc=true

in the above link using BIN format in GUI_UPLOAD. Same line I want my program should support any file format to be uploaded and placed in SAPoffice (same code continues as per teh link).Hope u got my requirement. Please help.

I want to know how GOS-Create attachment is working?

Regards,

Ashwni

Read only

Former Member
0 Likes
2,209

using THE CALL function 'UPLOAD' YOU COULD UPLOAD THE FILE AND READ