对于webdynpro 的GOS, 不可以做
但是可以用BDS实现部分

SAP BDS (Business Document Service) for storage of documents and attachments in SAP ECC
In some business scenarios there is need to attach/store external file to standard object like Material/ Purchase Order or to custom application like Loan Application; in such case we can use SAP standard methodology like SAP Office, BDS (Business Document Service), DMS (Document Management Service), GOS (Generic Document Services) to store actual files in system with logical relation with an object or Application so we can retrieve the same.

All these methodologies provide basic functionality which includes:

Attachment Creation for Object
This functionality will create logical relationship between attached object and actual SAP business object
Retrieving stored attachment and Display
BDS (Business Document Service)

Maintain Assignment of Business Objects to Document Classes – Tcode – SBDSV
As basic configuration, you need to create class (for Business Object) for your application e.g. Student Admission Application.
Maintain Storage Categories – Tcode – SBDSV2
Once you are done with creation of BDS Application Class, assign required document type such as BDS_ATTACH –Attachment, BDS_HTMLT- HTML template, BDS_IMAGE –Screen, BDS_SHEET          Table template, BDS_SLIDE Presentation, BDS_TEXT Text to BDS Application class name. You can create new Document class and document Type through SPRO configuration if needed.
BDN (Business Document Navigator)
BDN (Business Document Navigator) is a tool provided by SAP for mediating Documents.

Basic functions provided by BDN includes:

Store Document
Display Detail information about stored document
Display Documents
Display Version, Keyword for documents
Copy, Edit, Delete Documents
Store WWW address
These are some functionality examples provided by BDN.

These documents are stored in SAP Database Table (default for existing classes defined by SAP), but we can change this storage location, like if we want to store these documents in any external server. To achieve this we can create Content Repository, Content Category and assign it to Physical Document class.

Standard Function modules and BAPI’s are available to do all these functionality through ABAP code so we can use BDS to store documents for external applications. Below are some useful Function modules for BDS.

BDS_BUSINESSDOCUMENT_CREATEF

BDS_ALL_CONNECTIONS_GET

BDS_BUSINESSDOCUMENT_GET_INFO

BDS_BUSINESSDOCUMENT_GET_TAB

Class – CL_BDS_DOCUMENT_SET

1.1 Code for getting attachment from BDS and GOS

DATA lt_signature        TYPE STANDARD TABLE OF bapisignat.
  DATA lwa_signature       TYPE bapisignat.
  DATA lt_comp             TYPE STANDARD TABLE OF bapicompo2.
  DATA ls_comp             TYPE bapicompo2.
  DATA lwa_attachment_list TYPE ty_s_attachment_list.
  DATA lt_con              TYPE TABLE OF bdn_con.
  DATA ls_con              TYPE bdn_con.
  DATA lt_sig              TYPE TABLE OF bapisignat.
  DATA ls_sig              TYPE bapisignat.
  DATA lt_content          TYPE TABLE OF sdokcntbin.

DATA: l_sdok_objid TYPE sdokobject,
        l_lines TYPE i,
        l_len TYPE i,
        l_count TYPE sy-index,
        content TYPE xstring.

DATA: l_ess_emp TYPE ess_emp.
  DATA: ls_attachment  TYPE hap_s_attachments.
  DATA: li_document    TYPE REF TO cl_bsp_hap_document_if.
  DATA: lv_fcont_txt   TYPE string.
  DATA: lv_fcont_hex   TYPE xstring.
  DATA: lv_mime_type   TYPE string.
  CALL FUNCTION 'BDS_ALL_CONNECTIONS_GET'
    EXPORTING
      classname              = classname "'FIPP' " 如果是一个business object, 这里规定是哪个
      classtype              = classtype "'BO'   "这里BO是指它是一个business object
      objkey                 = object_key      " 这里是CONCATENATE 那个BO所有的keyfields
      all                    = ' '
      no_gos_docs            = ' '
*   CHECK_STATE            = ' '
   IMPORTING
     count                  = l_count
   TABLES
     signature              = lt_sig
     all_connections        = lt_con
  EXCEPTIONS
    no_objects_found       = 1
    error_kpro             = 2
    internal_error         = 3
    not_authorized         = 4
    OTHERS                 = 5
             .

LOOP AT lt_con INTO ls_con.

*-  file title
    lwa_attachment_list-title = ls_con-descript.

*-  Created by
    lwa_attachment_list-userid  = ls_con-crea_user.

CLEAR l_ess_emp.
    CALL FUNCTION 'Z_GERCFM_GET_EMPLOYEEDATA'
      EXPORTING
        iv_username = lwa_attachment_list-userid
      IMPORTING
        es_ess_emp  = l_ess_emp.
*-  Name
    lwa_attachment_list-creator =  l_ess_emp-name.

*-  Created date
    lwa_attachment_list-date = ls_con-crea_time+0(8).

*-  Mime type
    lwa_attachment_list-mime_type = ls_con-mimetype.

*-  Doc id
    lwa_attachment_list-doc_id = ls_con-loio_id.

*-  Doc ver no
    lwa_attachment_list-doc_ver_no = ls_con-doc_ver_no.

*-  Doc ver id
    lwa_attachment_list-doc_var_id = ls_con-doc_var_id.

*--- Get file content
    IF ls_con-stor_tab = '9'. "GOS

*     Get file content
      CLEAR ls_attachment.
      ls_attachment-id   = ls_con-loio_id.
      ls_attachment-name = ls_con-descript.
      ls_attachment-type = ls_con-docuclass.

CREATE OBJECT li_document.
      CLEAR: lv_fcont_hex, lv_fcont_txt, lv_mime_type.
      CALL METHOD li_document->document_display_attachment
        EXPORTING
          attachment       = ls_attachment
        IMPORTING
          file_content     = lv_fcont_txt
          file_content_hex = lv_fcont_hex
          mime_file_type   = lv_mime_type.

IF NOT lv_fcont_txt IS INITIAL.
*       Convert STRING to XSTRING
        CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
          EXPORTING
            text   = lv_fcont_txt
          IMPORTING
            buffer = content
          EXCEPTIONS
            failed = 1
            OTHERS = 2.
      ELSE.
*       No conversion required
        content = lv_fcont_hex.
      ENDIF.
      CONCATENATE lwa_attachment_list-title ls_con-docuclass
      INTO lwa_attachment_list-title SEPARATED BY '.'.

lwa_attachment_list-mime_type = lv_mime_type.
      lwa_attachment_list-content = content.

ELSE."BDS
      REFRESH: lt_comp, lt_sig.

CALL FUNCTION 'BDS_BUSINESSDOCUMENT_GET_INFO'
        EXPORTING
          classname           = classname
          classtype           = classtype
          object_key          = object_key
        TABLES
          signature           = lt_sig
*          connections         = lt_con
          extended_components = lt_comp
        EXCEPTIONS
          nothing_found       = 1
          parameter_error     = 2
          not_allowed         = 3
          error_kpro          = 4
          internal_error      = 5
          not_authorized      = 6
          OTHERS              = 7.
      LOOP AT lt_sig INTO ls_sig WHERE doc_id = ls_con-loio_id.
        EXIT.
      ENDLOOP.
      CHECK sy-subrc = 0.
      LOOP AT lt_comp INTO ls_comp WHERE doc_count = ls_sig-doc_count.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        l_sdok_objid-objid = ls_comp-objid.
        l_sdok_objid-class = ls_comp-class.
*--     Get content now
        REFRESH lt_content.
        CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'
          EXPORTING
            object_id           = l_sdok_objid
            raw_mode            = 'X'
          TABLES
            file_content_binary = lt_content
          EXCEPTIONS
            not_existing        = 1
            not_authorized      = 2
            no_content          = 3
            bad_storage_type    = 4
            OTHERS              = 5.
        IF sy-subrc = 0.
          l_lines = LINES( lt_content ).
          l_len = l_lines * 1022.
*--       Convert content to xstring format

CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
            EXPORTING
              input_length = l_len
            IMPORTING
              buffer       = content
            TABLES
              binary_tab   = lt_content
            EXCEPTIONS
              failed       = 1
              OTHERS       = 2.
          IF sy-subrc = 0.
            lwa_attachment_list-content = content.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.

APPEND lwa_attachment_list TO attachment_list.
    CLEAR: lwa_attachment_list,ls_con,ls_comp, l_sdok_objid,
           content.
  ENDLOOP.

For deleting attachment:

DATA lt_connections TYPE STANDARD TABLE OF bapiconnec.
  DATA ls_connections TYPE bapiconnec.
  DATA: lt_con TYPE TABLE OF bdn_con.
  ls_connections-classname = 'PDOTYPE_O'.
  ls_connections-classtype = 'BO'.
  ls_connections-object_key = '0150042977'.
  ls_connections-doc_id = ls_attach-doc_id.
  APPEND ls_connections TO lt_connections.
  CALL FUNCTION 'BDS_ALL_CONNECTIONS_GET'
    EXPORTING
*   LOGICAL_SYSTEM         =
      classname              = 'PDOTYPE_O'
      classtype              = 'BO'
     objkey                 = '0150042977'
*   CLIENT                 = SY-MANDT
*   ALL                    = 'X'
*   NO_AL_DOCS             = ' '
*   NO_GOS_DOCS            = 'X'
*   CHECK_STATE            = ' '
* IMPORTING
*   COUNT                  =
    TABLES
     signature              = lt_signature
      all_connections        = lt_con
*   FRAMEWORK              =
   EXCEPTIONS
     no_objects_found       = 1
     error_kpro             = 2
     internal_error         = 3
     not_authorized         = 4
     OTHERS                 = 5
            .
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  delete lt_signature where doc_id ne ls_attach-doc_id.
  delete lt_signature from 2.

CALL FUNCTION 'BDS_BUSINESSDOCUMENT_DELETE'
      EXPORTING
        classname       =  <class name>
        classtype       = 'BO'
        object_key      = l_doc_key
        x_force_delete  = 'X'
      TABLES
        signature       = lt_signature
      EXCEPTIONS
        nothing_found   = 1
        parameter_error = 2
        not_allowed     = 3
        error_kpro      = 4
        internal_error  = 5
        not_authorized  = 6

OTHERS          = 7.
For storing attachment:

*-- Transer file content
    REFRESH lt_file_content.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer     = lw_attachment_list-content
      TABLES
        binary_tab = lt_file_content.

*-- Set file default path
*    l_file_pathlen = STRLEN( l_directory ).
*    IF NOT l_file_pathlen IS INITIAL.
*      l_file_pathlen = l_file_pathlen - 1.
*      l_file_path = l_file_path(l_file_pathlen).
*      IF l_file_path <> space AND l_file_pathlen < 250.
*        l_file_path_memory = l_file_path.
*        SET PARAMETER ID 'OAP' FIELD l_file_path_memory.
*      ELSE.
*        l_file_path_memory = space.
*        SET PARAMETER ID 'OAP' FIELD l_file_path_memory.
*      ENDIF.
*    ENDIF.

*    IF l_file_extension <> space.
*      SET LOCALE LANGUAGE sy-langu.
*      TRANSLATE l_file_extension TO UPPER CASE.
*      SET LOCALE LANGUAGE space.
*    ENDIF.

* -- fill components and signature structure                        -- *
    lw_component-doc_count  = 1.
    lw_component-comp_count = 1.
    lw_component-mimetype   = lw_attachment_list-mime_type.
    lw_component-comp_id    = lw_attachment_list-title.

APPEND lw_component TO lt_components.

lw_signature-doc_count  = 1.
    lw_signature-prop_name  = 'BDS_DOCUMENTCLASS'.
    lw_signature-prop_value = l_file_extension.
    APPEND lw_signature TO lt_signature.

lw_signature-prop_name  = 'BDS_CONTREP'.
    lw_signature-prop_value = ' '.
    APPEND lw_signature TO lt_signature.

lw_signature-prop_name  = 'BDS_DOCUMENTTYPE'.
    lw_signature-prop_value = ' '.
    APPEND lw_signature TO lt_signature.

lw_signature-prop_name  = 'DESCRIPTION'.
    lw_signature-prop_value = lw_attachment_list-title.
    APPEND lw_signature TO lt_signature.

lw_signature-prop_name  = 'LANGUAGE'.
    lw_signature-prop_value = sy-langu.
    APPEND lw_signature TO lt_signature.

* Created by
*  lw_signature-prop_name  = 'CREATED_BY'.
*  lw_signature-prop_value = lw_attachment_list-USERID.
*  APPEND lw_signature TO lt_signature.

*-- Save attachment list
    CALL FUNCTION 'BDS_BUSINESSDOCUMENT_CREA_TAB'
      EXPORTING
        classname       = <classname>
        classtype       = 'BO'" classtype_select
        object_key      = l_doc_key
        binary_flag     = 'X'
      TABLES
        signature       = lt_signature
        components      = lt_components
        content         = lt_file_content
      EXCEPTIONS
        nothing_found   = 1
        parameter_error = 2
        not_allowed     = 3
        error_kpro      = 4
        internal_error  = 5
        not_authorized  = 6
        OTHERS          = 7.

REFRESH: lt_components, lt_signature.
    CLEAR lw_attachment_list.

For employee, business obj should be BUS1065 ( I think so ). 
Other things to help in debugging: 
Fn : BINARY_RELATION_CREATE 
CL_GOS_DOCUMENT_SERVICE -> CREATE_ATTACHMENT
CL_GOS_SRV_ATTACHMENT_CREATE -> execute

Using all this info, I think the procedure should be like this: 
From WD XSTRING, convert it to binary, store it in BDS passing an emp no. 
Check in PA30 whether it is appearing against the employee or not. If it appears, it works.. If it does not appear, something is wrong. Let me know then J

webdynpro GOS BDS 文档/附件 上传下载处理相关推荐

  1. 使用PicGo+阿里云OSS实现md文档图片上传

    使用PicGo+阿里云OSS实现md文档图片上传 这次给大家带来的是PicG0+阿里云Oss+typora的图床环境搭建,帮助大家提高工作效率+写博客速度! 1.typora安装 给大家一个链接:ty ...

  2. 闲人闲谈PS之二十一——SAP自定义程序增加附件上传下载功能

    惯例闲话:国庆假期后,状态不佳,闲人找回状态的方法,对电脑翻箱倒柜,整理文件,往往在整理鸡零狗碎时,会有一些新收获,这倒成了自我调整的一套规律- 这次整理捣鼓,还真是发现了一个解决长久以来SAP被人吐 ...

  3. plupload附件上传下载+百度富文本编辑器

    从github下载源码https://github.com/moxiecode/plupload/tree/master/js 从百度富文本官网下载源码https://ueditor.baidu.co ...

  4. 在线扫描服务器文件大小,还在找在线扫描文档并上传为图像的扫描工具?Dynamic Web TWAIN满足您的需求!...

    您是否正在寻找一个基于Web的文档扫描工具包供您的用户进行在线文档扫描并将其轻松上传到您的网站? 使用Dynamic Web TWAIN在线扫描文档 Dynamic Web TWAIN是一个客户端扫描 ...

  5. SharePoint 服务器端对象模型操作文档库(上传/授权/查看权限)

    来源于:http://www.cnblogs.com/jianyus/p/3258863.html 简介:上传文档到文档库,并对项目级授权,查看项目级权限方法         //在列表根目录下创建文 ...

  6. 针对文档加密系统,如何不破解将文档解密上传

    故事的开端 我们系统是对外系统,里面有表格上传功能,前几天有客户反馈,上传表格无法解析,远程后发现客户的电脑安装有文档加密系统,这种文档加密系统是为了 防止公司内部人员将公司机密的文档信息泄露出去而强 ...

  7. JSP实现word文档的上传,在线预览,下载

    前两天帮同学实现在线预览word文档中的内容,而且需要提供可以下载的链接!在网上找了好久,都没有什么可行的方法,只得用最笨的方法来实现了.希望得到各位大神的指教.下面我就具体谈谈自己的实现过程,总结一 ...

  8. 阿piu传-文档批量上传客户端-道客巴巴版使用帮助

    第一步:点击apiu.exe程序文件,运行上传软件,部分电脑需要鼠标右键选择管理员运行(如遇360等安全提示,请添加信任后,重新运行软件) 第二步:点击右上方,登录功能,弹出登录框 第三步:登录您要上 ...

  9. 阿piu传-文档批量上传客户端-原创力版使用帮助

    第一步:点击apiu.exe程序文件,运行上传软件,部分电脑需要鼠标右键选择管理员运行(如遇360等安全提示,请添加信任后,重新运行软件) 第二步:点击右上方,登录功能,弹出登录框 第三步:登录您要上 ...

最新文章

  1. 会员管理scrm系统精细化运营更好促进成交
  2. php依次替换文本字符串中的图片src地址
  3. 数字图像处理的三个层次
  4. OpenCV3计算机视觉+Python(五)
  5. h3csnmp管理命令_H3C S5500V2-EI系列以太网交换机 命令参考-Release 1118-6W100_网络管理和监控命令参考_SNMP命令-新华三集团-H3C...
  6. Redis实现分布式锁释放锁
  7. MVC学习IIS的不同版本(一)
  8. linux简单邮件系统,怎样简单搭建一个Linux操作系统邮件服务器
  9. Sliverlight中使用Path绘制复杂几何图形
  10. c#打印乘法口诀_小学数学所有公式和顺口溜都在这里了!建议家长收藏打印!...
  11. Hexo添加helper-live2d模型
  12. pygame详细安装教程
  13. 新城易居程伟健:民宿集群,正在走向产业标准化的趋势!
  14. python中e怎么计算_Python之循环结构——实战计算自然底数e,圆周率Π
  15. 链接元宇宙,开启新纪元
  16. Vue【vue-seamless-scroll】滚动组件及注意事项
  17. CDH6 安装 Apache atlas
  18. python3 urllib 内存泄露_【专家专栏】张昊 | 从urllib2的内存泄露看python的GC
  19. Python 爬取 201865 条《隐秘的角落》弹幕数据,发现看剧不如爬山?
  20. mysql租房house查询_多条件查询(php+mysql) 租房子例子

热门文章

  1. Springboot简单应用
  2. 为什么忘记commit也会造成select查询的性能问题
  3. 检测到在集成的托管管道模式下不适用的 ASP.NET 设置。
  4. 开源大数据查询分析引擎
  5. MAC地址表满,广播的去向
  6. 企业分布式微服务云SpringCloud SpringBoot mybatis (五)路由网关(zuul)
  7. LFS 8.3 中文翻译版本发布!
  8. mysql常见报错解决办法
  9. oracle各版本手动升级任我行-升级矩阵
  10. ora-03115:不支持的网络数据类型 oracle,Oracle10g新增DBMS_FILE_TRANSFER包(二)