05-18-2009 3:56 PM
Hello,
I created an external document (URL) with GOS system.
Now I would like to retrieve the pathname of the file attached.
How can i do ? somebody speaks about the table SOOD , but this one don't give the url.
( only the description of the attachment... )
I need the url to automatically launch the printing of the attachment
Somebody can help me ?
Regards
Fred.
05-18-2009 4:14 PM
Use the method READ_LINKS of the class CL_BINARY_RELATION. Check this post: [Generic Object Services (GOS): Get Attachements |http://help-abap.blogspot.com/2009/02/generic-object-services-gos-toolbar_03.html]
After getting the Object, you can read the content using FM SO_OBJECT_READ. Check this post [Generic Object Services (GOS) : Get Note attachment contents|http://help-abap.blogspot.com/2009/02/generic-object-services-gos-toolbar_09.html]
You need to pass the object relation as the URL. Like:
* attachment type selection
DATA: lt_relat TYPE obl_t_relt,
la_relat LIKE LINE OF lt_relat.
la_relat-sign = 'I'.
la_relat-option = 'EQ'.
la_relat-low = 'URL'.
APPEND la_relat TO lt_relat.
Regards,
Naimesh Patel
Edited by: Naimesh Patel on May 18, 2009 10:15 AM
05-18-2009 4:14 PM
Use the method READ_LINKS of the class CL_BINARY_RELATION. Check this post: [Generic Object Services (GOS): Get Attachements |http://help-abap.blogspot.com/2009/02/generic-object-services-gos-toolbar_03.html]
After getting the Object, you can read the content using FM SO_OBJECT_READ. Check this post [Generic Object Services (GOS) : Get Note attachment contents|http://help-abap.blogspot.com/2009/02/generic-object-services-gos-toolbar_09.html]
You need to pass the object relation as the URL. Like:
* attachment type selection
DATA: lt_relat TYPE obl_t_relt,
la_relat LIKE LINE OF lt_relat.
la_relat-sign = 'I'.
la_relat-option = 'EQ'.
la_relat-low = 'URL'.
APPEND la_relat TO lt_relat.
Regards,
Naimesh Patel
Edited by: Naimesh Patel on May 18, 2009 10:15 AM
05-18-2009 4:23 PM
Hello Naimesh,
thank you very much for your quick response and effective , but i forget to say I am in SAP 46C.
I suppose it's not easy ! I saw several times the same question unresolved
Regards
Fred.
06-16-2009 9:38 AM
Frederic,
maybe this gives you an idea, I manage to get the GOS object attached, and
I delete it, but my problem is that a popup window is opened. I think the popup
window is opened because of the sentence "create object lo_list" :
ls_object-objkey = lv_objkey.
ls_object-objtype = 'FMPSO'.
create object lo_list
exporting
is_object = ls_object
.
IF sy-subrc <> 0.
ENDIF.
lt_output = lo_list->GO_LIST_VIEWER->gt_output.
FREE lo_list.
LOOP AT lt_output INTO ls_output.
IF ls_output-objdes CP lv_pattern.
lo_bor_browser = ls_output-objref.
lo_bor_item ?= lo_bor_browser.
ls_bor_obj = lo_bor_item->gs_bor_object.
ls_folderid = ls_bor_obj-objkey(17).
ls_objectid = ls_bor_obj-objkey+17(17).
CALL FUNCTION 'SO_OBJECT_DELETE'
EXPORTING
folder_id = ls_folderid
object_id = ls_objectid
.
lv_error = sy-subrc.
CHECK lv_error EQ 0.
CALL FUNCTION 'BINARY_RELATION_DELETE_COMMIT'
EXPORTING
obj_rolea = ls_object
obj_roleb = ls_bor_obj
relationtype = 'URL'
.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
Edited by: Joan Ayala on Jun 16, 2009 10:38 AM
Edited by: Joan Ayala on Jun 16, 2009 10:39 AM