on 07-23-2014 8:02 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
I have a similar requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.