cancel
Showing results for 
Search instead for 
Did you mean: 

GOS 'Create Attachment' - Can we archive it to DMS?

Former Member
0 Kudos

Greetings All!

I know for sure that if we store using 'create attachment', these are stored in the database. If you store using "store business document" these can be stored in the content server. Is there anyway we can route create attachments to DMS instead of DB?

NOTE - Currently we have greyed out create attachments to stop users from using create attachments as our SOC3 and SOFTCONT1 tables are rapidly increasing.

All your help is much appreciated.

Regards

Sri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

there is no standard functionality to do this. why not just enable the store business document functionality as this is the correct method to do it anyway.

Former Member
0 Kudos

Athol

Thanks for your reply.

We already set Store business document to content server. Just wanted to know if there were any options to set the create attachments to content server?

Regards

Sri

Former Member
0 Kudos

No, you would need to do it with ABAP.

Former Member
0 Kudos

hi atol,

as the present scenario explained, if the attachments are stored in the sap DB, then there should be a specific object to which it is getting routed. Do you have any idea to which repository it is targeting to.

Regards,

Ravi

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi suresh,


My requirement is to store the documents in the DMS rather than in DB(SOC3 table), so i follow the first step (ZCL_GOS_SRV_ATTACHMENT_CREATE) u have maintain above but how to get those the file in the GOS attachment list

former_member183148
Contributor
0 Kudos

Hello Vishal,

            In this case you don’t need to use this custom method. You can use the standard methods with having the right configuration in place for DMS storing. It should help, otherwise let me know we can look in to it.

Thanks,

Kolusu

former_member183148
Contributor
0 Kudos

Travers,

Request to close the thread if it useful.

Thanks,

Kolusu

former_member183148
Contributor
0 Kudos

Travers,

Request to close the thread if it useful.

Thanks,

Kolusu

former_member183148
Contributor
0 Kudos

Hi Sri,

Check out this -     Will give a clue.

Thanks,

Kolusu

0 Kudos


Kolusu, your 'clue' didn't answer the question.  


Regards

Mark

former_member183148
Contributor
0 Kudos

Hello Travis,


If I understood Sri Latha posting correctly she wanted to store the documents in the DMS rather than in DB(SOC3 table) whenever a document is attached.  


I have very limited knowledge SAP DMS as I am more into ABAP & OT. So it is because of you I took 2 days to understand & configure SAP DMS and 2 hours to code for possibility check for storing the documents in the DMS. For which I am happy .


Before going a ahead I checked SOC3 table enteries to be "587.055".

In had take "SGOSATTR" to SM30 to see what is the class that responsible for attaching and displaying the documents and found

Now I copied them to ZCL_GOS_SRV_ATTACHMENT_CREATE & ZCL_GOS_SRV_ATTACHMENT_LIST respectively. To comment their "Execute" method code and placed the custom code.

I had hard coded the location from where the document needs to picked up from.  

I had put code such a way that document once stored get's display CV02n

Now I want to see the attachment(yet to adjust code to display as attachment currently displaying in other window).

In my previous posting I though referring the other answer would give a clue of modifying the respective class of the GOS menu's. Sorry, for confusing.


Now when I checked for the SOC3 table entries they are still "587.055". Which means they are not storing any more in DB(as per my limited knowledge )

Below is the raw code just checking the possibility :

ZCL_GOS_SRV_ATTACHMENT_CREATE(EXECUTE method)

DATA: ls_doc    type bapi_doc_draw2,

        ls_return type bapiret2.

DATA: lf_doctype    Type bapi_doc_draw2-documenttype,

      lf_docnumber  Type bapi_doc_draw2-documentnumber,

      lf_docpart    Type bapi_doc_draw2-documenttype,

      lf_docversion Type bapi_doc_draw2-documenttype.

DATA: lt_files      Type table of bapi_doc_files2 ,

      lt_drat       Type table of bapi_doc_drat  ,

      lt_drad       Type table of bapi_doc_drad  ,

      ls_files      Type bapi_doc_files2,

      ls_drat       Type bapi_doc_drat,

      ls_drad       Type bapi_doc_drad.

*

ls_doc-documenttype    = 'YBO'.

ls_doc-documentversion = '00'.

ls_doc-documentpart    = '000'.

ls_doc-statusextern    = 'IA'.

ls_doc-laboratory      = '002'.

REFRESH lt_files.

CLEAR lt_files.

*

ls_files-sourcedatacarrier = '%COMPUTERN'.

ls_files-storagecategory = 'DMS_C1_ST'.

ls_files-docfile = 'C:\Users\Administrator\Documents\MARK_TRAVIS\TESTING_of_ MARK_TRAVIS_request.doc'.

ls_files-wsapplication = 'DOC'.

APPEND ls_files to lt_files.

CLEAR lt_drat.

REFRESH lt_drat.

ls_drat-language = 'EN'.

ls_drat-description = 'TESTING_of_ MARK_TRAVIS_request'.

APPEND ls_drat to lt_drat.

*

CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'

  EXPORTING

    documentdata         = ls_doc

  IMPORTING

    return               = ls_return

  TABLES

    documentdescriptions = lt_drat

    documentfiles        = lt_files.

*

IF ls_return-type CA 'EA'.

  ROLLBACK WORK.

  WRITE : ls_return-message.

ELSE.

  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    EXPORTING

      wait = '9'.

DATA: doknr TYPE doknr.

GET PARAMETER ID 'CV1' FIELD doknr.

CALL TRANSACTION 'CV02N' AND SKIP FIRST SCREEN.

ENDIF.


ZCL_GOS_SRV_ATTACHMENT_LIST(EXECUTE method)

data:  lt_stdokar type STANDARD TABLE OF CV100_RANGESDOKAR ,

        ls_stdokar type CV100_RANGESDOKAR,

   lt_stdoknr type STANDARD TABLE OF CV100_RANGESDOKNR  ,

   lt_stdokvr type STANDARD TABLE OF CV100_RANGESdokvr  ,

   lt_stdoktl type STANDARD TABLE OF CV100_RANGESdoktl  ,

   lt_stdwnam type STANDARD TABLE OF CV100_RANGESdwnam  ,

   lt_stbegru type STANDARD TABLE OF CV100_RANGESbegru  ,

   lt_staennr type STANDARD TABLE OF CV100_RANGESaennr,

   lt_stlabor type STANDARD TABLE OF CV100_RANGESlabor  ,

   lt_stdktxt type STANDARD TABLE OF CV100_RANGESDKTXT  .

  DATA dttrg TYPE draw-dttrg.

  DATA dappl TYPE draw-dappl.

  DATA status TYPE tdwst-stabk.

  DATA stseit TYPE mcdok-stseit.

  DATA stbis TYPE mcdok-stbis.

  DATA slng TYPE rsfin-langu.

  DATA restrict TYPE anzhl_s.

  DATA gf_cs_active     TYPE sy-datar.

  DATA cklah TYPE klah.

  DATA g_folder_key TYPE bapi_doc_keys.

  DATA srcdrad TYPE STANDARD TABLE OF seldrad.

  DATA ls_srcdrad TYPE  seldrad.

  DATA searchtab_orig TYPE STANDARD TABLE OF fist .

  DATA ls_searchtab_orig TYPE fist .

  DATA lt_loedk_ranges  TYPE TABLE OF cv100_rangesloedk.

  DATA ls_loedk_ranges  TYPE  cv100_rangesloedk.

  DATA lt_cadkz_ranges  TYPE TABLE OF cv100_rangescadkz.

  DATA ls_cadkz_ranges  TYPE  cv100_rangescadkz .

  DATA lt_tdraw TYPE STANDARD TABLE OF draw .

  DATA ls_tdraw TYPE  draw.

  DATA lt_ccomw TYPE STANDARD TABLE OF comw.

  DATA ls_ccomw TYPE  comw .

  stseit = 00000000.

  slng = 'E'.

  restrict   =                           100.

  gf_cs_active     =              'X'.

  ls_stdokar-sign =  'I' .

  ls_stdokar-option = 'EQ'.

  ls_stdokar-low = 'YBO'.

  APPEND ls_stdokar to lt_stdokar .

  ls_loedk_ranges-sign = 'I'.

  ls_loedk_ranges-option = 'EQ'.

  ls_loedk_ranges-low = ' '.

  APPEND ls_loedk_ranges to lt_loedk_ranges.

  ls_loedk_ranges-sign = 'I'.

  ls_loedk_ranges-option = 'EQ'.

  ls_loedk_ranges-low = 'X'.

  APPEND ls_loedk_ranges to lt_loedk_ranges.

  ls_cadkz_ranges-sign = 'I'.

  ls_cadkz_ranges-option = 'EQ'.

  ls_cadkz_ranges-low = ' '.

  APPEND  ls_cadkz_ranges to lt_cadkz_ranges.

  ls_cadkz_ranges-sign = 'I'.

  ls_cadkz_ranges-option = 'EQ'.

  ls_cadkz_ranges-low = 'X'.

  APPEND  ls_cadkz_ranges to lt_cadkz_ranges.

  CALL FUNCTION 'DMS_DOCUMENT_RETRIEVAL_ALV'

    EXPORTING

      sdttrg                 = dttrg

      sappli                 = dappl

      sdoksa                 = status

      sdatum1                = stseit

      sdatum2                = stbis

      slanguage              = slng

      restrict               = restrict

      pf_cs_active           = gf_cs_active

      classno                = cklah-class                 

      classtype              = cklah-klart                 

      folder_key             = g_folder_key

    TABLES

      objectlinks            = srcdrad

      searchtext             = searchtab_orig

      stdokar                = lt_stdokar

      stdoknr                = lt_stdoknr

      stdokvr                = lt_stdokvr

      stdoktl                = lt_stdoktl

      stloedk                = lt_loedk_ranges

      stcadkz                = lt_cadkz_ranges

      stdwnam                = lt_stdwnam

*     stbegru                = lt_stbegru

**     staennr                = lt_staennr

*     stlabor                = lt_stlabor

*     stdktxt                = lt_stdktxt

*     tdraw                  = lt_tdraw

      clsc_class_selection   = lt_ccomw

    EXCEPTIONS

      parameter_insufficient = 2.

 


Hope this help's you understand this time. Please feel free to comment on any thing. 


Thanks,

Kolusu



Former Member
0 Kudos

Great post and if you want I can open a new thread to assign helpful/correct answers because this is a very close solution to the question I had. I wanted to search the forums before posting a new thread.

My question is when you declare the location to pick the document up from, is there a BAPI or FM we can use to prompt users for that location? Sorry I am not an ABAPer by trade but your response is almost exactly what I was looking for.

Thanks!

former_member183148
Contributor
0 Kudos

Brownfield – Pls feel free to do so. Sky is the limit. SCN is made for it 

~ Kolusu

Former Member
0 Kudos

Yes, It is possible to route the documents using DMS to Archive server.

If the user doesn't change the attachment meaning if he is not creating version of the document, then you can think of Document archiving. DMS will be suitable for AutoCAD designs of machineries, Design document for Materials, Design of BOMs, .......

Based on your requirement we can suggest wether DMS will help or Document archiving.

If you want to just store all the reference documents such as Fax, Customer request order, Invoice receipts .......so on and attached to particular SAP business document then you can go with Document Archiving.

You can store reference documents of different SAP business in different location. For example- For SAP Sales order user has attached a reference document comes from customer in A1 storage space of archive server.

Similarly for Account receivable you can attach the customer payment acknowledgment in A2 storage space of archive server.

All these things can be done from GOS or from the Workflow.

You have also mentioned that authorization of GOS to user is not given since it is going to table SOFFCONT1. If you are only concern with SOFFCONT1 table then can map all the documents attached through GOS into archive server by mentioning the New category in SKPR08 transaction along with other required configurations.

If you want proper management of your documents of your various business area then document archiving, DMS will help.

Hope this as help you.

-Thanks,

Ajay

0 Kudos

Ajay,

You and Anirudh clearly did NOT answer the question.   The question was this:

1) Users are going to GOS and attaching documents to 'Create Attrachment' and when they do this, those documents get stored as BLOBs in a database table.

2) His question is there a technical method that can be configured to reroute the attachment to a traditional Content Server, say like FileNet or Open Text Archive Server.

That is the question.   This question was not about DMS. 

Former Member
0 Kudos

Hi,

To avoid sap db tables being filled rapidly, it is possible to reroute the GOS attachments to be saved in DMS content server. Probably you can use this option instead of greying create attachment option in GOS.

Anirudh,

Former Member
0 Kudos

Anirudh

Thanks for your reply. Can you elaborate more.

Regards

Sri

Former Member
0 Kudos

Hey Srilatha,

The document storage can be routed through the desired content server. If you have noticed while storing any document (when we create originals) then it asks for the content server (you call it database) location.

Please make the other content servers invisible to users to whom you want to avoid the changes in document attachments.

Hope this will help you solve your problem.

Regards,

Nishit Jani

Former Member
0 Kudos

That won't work Nishit. he is referring to Generic Object Services, not SAP DMS itself. There is no popup asking you where you want to store the document with the create attachment option in Generic Object Services.