cancel
Showing results for 
Search instead for 
Did you mean: 

GOS toolbar in SAP WDA component

Former Member
0 Kudos

Hi ,

I have a requirement to add GOS toolbar in a web dynpro ABAP component. I am able to display the toolbar in a report and also tried using the method 'DISPLAY_TOOLBOX' of the class 'CL_GOS_MANAGER'. But I am unable to use the same in WDA views.

Could anyone please help me out with this requirement.

Thanks,

Divya Posanpally

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member204264
Participant
0 Kudos

Hi Divya and Kenneth,

I had similar requirements and in my case the following documents were very helpfully for me:

I modified LOAD_ATTACHMENT_CONTENTS method to retrieve content from 'Store Business Document' created using function:  ARCHIVOBJECT_GET_TABLE:


DATA: LENGTH TYPE SAPB-LENGTH,

         BINLENGTH TYPE SAPB-LENGTH,

         ARCHIVOBJECT TYPE TABLE OF DOCS,

         BINARCHIVOBJECT TYPE TABLE OF TBL1024.

     CALL FUNCTION 'ARCHIVOBJECT_GET_TABLE'

          EXPORTING

               ARCHIV_ID                = 'ZT'

               DOCUMENT_TYPE            = lv_doc_type

               ARCHIV_DOC_ID            = is_atta-arc_doc_id

          IMPORTING

               LENGTH                   = LENGTH

               BINLENGTH                = BINLENGTH

          TABLES

               ARCHIVOBJECT             = ARCHIVOBJECT

               BINARCHIVOBJECT          = BINARCHIVOBJECT

          EXCEPTIONS

               ERROR_ARCHIV             = 01

               ERROR_COMMUNICATIONTABLE = 02

               ERROR_KERNEL             = 03.


ls_attacont-content_x = cl_bcs_convert=>xtab_to_xstring( BINARCHIVOBJECT ).

I added attribute ARC_DOC_ID  to ATTACHMENTS node in Component Controller Context. This value is get from TOAAT in method LOAD_ATTACHMENT_LIST.

Method DO_SAVE is modified too when a new Store Business Document is created, using functions ARCHIVOBJECT_CREATE_TABLE and ARCHIV_CONNECTION_INSERT:


DATA: BINARY_TABLE TYPE TABLE OF  TBL1024,

                 SIZE         TYPE  SAPB-LENGTH,

                 DOC_TYPE     TYPE  TOADD-DOC_TYPE,

                 DOC_ID       TYPE  SAEARDOID,

                 lv_ar_object TYPE saeobjart.

            size = xstrlen( ls_attacont-content_x ).

            cl_bcs_convert=>XsTRING_to_XTAB( exporting IV_XSTRING = ls_attacont-content_x

                                             importing ET_XTAB = binary_table  ).

               IF sy-subrc = 0.

           CALL FUNCTION 'ARCHIVOBJECT_CREATE_TABLE'

           EXPORTING

             archiv_id                      = 'ZT'

             document_type                  = doc_type

             length                         = size

           IMPORTING

             archiv_doc_id                  = doc_id

           TABLES

             binarchivobject                = binary_table

           EXCEPTIONS

             error_archiv                   = 1

             error_communicationtable       = 2

             error_kernel                   = 3

             OTHERS                         = 4

             .

           IF sy-subrc <> 0.

           ELSE.

            SELECT SINGLE ar_object INTO lv_ar_object FROM toaom

               WHERE sap_object WD_THIS->GS_GOS_OBJ-TYPEID AND

                archiv_id  = 'ZT' AND

                doc_type   = doc_type.

             CALL FUNCTION 'ARCHIV_CONNECTION_INSERT'

                   EXPORTING

                      archiv_id             = 'ZT'

                      arc_doc_id            = LV_ARC_DOC_ID

                      ar_date               = sy-datum

                      ar_object             = lv_ar_object

                      mandant               = sy-mandt

                      object_id             = LV_OBJECT_ID

                      sap_object            = LV_SAP_OBJECT

                      doc_type              = LV_doc_type

                      filename              = LV_filename

                      descr                 = LV_descr

                      creator               = sy-uname

                    EXCEPTIONS

                      error_connectiontable = 1

                      OTHERS                = 2.


          ENDIF.

Regards.

Former Member
0 Kudos

Thank you for the reply Luis; but this is my first time working with Archive Objects.

I am unable to find the table TOAAT to get the value of ARC_DOC_ID. Also, I am not sure where to get the values for all the parameters used in FM 'ARCHIV_CONNECTION_INSERT'...??

I would be very helpful if you can send me the complete code for the methods....My e-mail Id is divya.posanpally@gmail.com You can send the documents to this. Could you please help me out...??

Thanks,

Divya Posanpally

former_member204264
Participant
0 Kudos

Hi Divya,

Can you check if you have 'SAOP' Package (ArchiveLink general) in your system? TOAAT table is included in it, and it's for store the File Attributes.

Regards.

Former Member
0 Kudos

Hi Luis,

I found the package 'SAOP' in my system but it does not have the table TOAAT in it.

- Divya

former_member204264
Participant
0 Kudos

Can you tell me classes registered in SGOS table (view entries in SM30) for CREATE_ATTA, VIEW_ATTA and ARL_LINK?

Regards.

Former Member
0 Kudos

Hi Luis...... I can't find the SGOS table either in my system....

former_member204264
Participant
0 Kudos

What support package level do you have installed in your system?

Former Member
0 Kudos

Its version 7.31 .... support pack level 4.


kmoore007
Active Contributor
0 Kudos

Thanks for the reply, Luis! 

kmoore007
Active Contributor
0 Kudos

I have a similar requirement.

Former Member
0 Kudos

ok Kenneth.... Please share if you happen to find a solution for this..... I will do the same.

Thanks,

Divya Posanpally

rahul_mb
Active Participant
0 Kudos

I hope this document may solve the issue. It explains how to attach a document using GOS in webdynpro.

kmoore007
Active Contributor
0 Kudos

Rahul, thanks for the reply.  But at the very bottom of the document, it says that solution does not work for 'Store Business Document' menu on GOS button, which is what I need to do.

Former Member
0 Kudos

Hi Rahul,

Even I need to access data that has been attached using 'Store Business Document' option. So this approach might not work for me; but thanks for the document anyways.

- Divya Posanpally