22 Şubat 2012 Çarşamba

SAP/ABAP: GOS Objects, create, display, deletion, all

*  DATA:
*    ls_object_identity TYPE borident,
*    lo_gos             TYPE REF TO cl_gos_document_service.

*  ls_object_identity-objkey = p_equnr.
*  ls_object_identity-objtype = 'EQUI'.

*  CREATE OBJECT lo_gos.

*--------------------------------------------------------------------*
" Create an attachment...
*  CALL METHOD lo_gos->create_attachment
*    EXPORTING
*      is_object     = ls_object_identity
*    IMPORTING
*      ep_attachment = ls_object_identity-objkey.
*
*  COMMIT WORK.

*--------------------------------------------------------------------*
"Display an attachment content
*  CALL METHOD lo_gos->display_attachment
*    EXPORTING
**      is_object     = ls_object_identity
*      ip_attachment = ls_object_identity-objkey
*      .

*--------------------------------------------------------------------*
"Display all attachments in an itab...
  DATA: ls_object_identity TYPE sibflporb,
        et_atta            TYPE gos_t_atta.

  ls_object_identity-instid = p_equnr.
  ls_object_identity-typeid = 'EQUI'.
  ls_object_identity-catid  = 'BO'.
*
*  CALL FUNCTION 'GOS_API_GET_ATTA_LIST'
*    EXPORTING
*      is_object = ls_object_identity
*    IMPORTING
*      et_atta   = et_atta.

*--------------------------------------------------------------------*
"Display attachments in pop up

CALL FUNCTION 'GOS_ATTACHMENT_LIST_POPUP'
  EXPORTING
    is_object             = ls_object_identity
   IP_CHECK_ARL          = 'X'
   IP_CHECK_BDS          = 'X'
   IP_NOTES              = 'X'
   IP_ATTACHMENTS        = 'X'
   IP_URLS               = 'X'
   IP_MODE               = ''
* IMPORTING
*   EP_SAVE_REQUEST       =
* TABLES
*   IT_OBJECTS            =
          .

Hiç yorum yok:

Yorum Gönder

İnsdroid

Sabahtan beri çatada çutada çatada çutada… Bitmedi yine de… Neyse, yolumuz uzun, toparlıyorum çantamı, adaptörü falan tıkıştırıyorum bir şe...