Skip to Content
0
Former Member
Aug 13, 2009 at 08:59 AM

Extract data into a document attached to a characteristic value ?

27 Views

Hi experts,

Could you help me to extract data from tables in my BI system and to put theses data into a document and linked it to a value of a characteristic ?

I would like to 'autodocument' my BI system, so I have created an infoobject 'ABAP Routine' and I would attached to each value of this infoobject a document including the complete ABAP code.

I have found this How to : https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/8046aa90-0201-0010-5e99-962948c83331&overridelayout=true

Here is my code, I have no error message but in rsa1 I don't see any document for this value of characteristic.

DATA:
     characteristic TYPE  rschanm,
     cha_value TYPE rschavl,
     doc_name TYPE skwf_urlp,
     overwrite TYPE rsod_overwrite_mode,
     doc_info TYPE rsod_s_content_info,
     l_t_data_tab_asc TYPE sdokcntascs,
     l_t_return TYPE bapiret2.

characteristic = '/BIC/XTCRIDTP'.
cha_value = '3Y75K13IBGPRUP8RTOV9RLZ40'.
doc_name = 'Routine_3XUHH6WO'.
overwrite = '1'.
APPEND 'toto blablabla' TO l_t_data_tab_asc.

doc_info-mimetype = 'text/plain'.
doc_info-file_size = 10000.

CALL FUNCTION 'RSOD_DOC_MAST_CHANGE'
  EXPORTING
    i_chanm                       = characteristic
    i_chavl                       = cha_value
*   I_DOC_TYPE                    =
    i_description                 = 'Routine Code'
    i_name                        = doc_name
    i_langu                       = sy-langu
    i_overwrite_mode              = overwrite
    i_with_content                = 'X'
    i_s_content_info              = doc_info
*   I_WITH_URL                    =
*   I_URL                         =
*   I_COPY_URL_CONTENT            =
 IMPORTING
*   E_NAME                        =
    e_s_return                    = l_t_return
 TABLES
    i_t_file_content_ascii        = l_t_data_tab_asc
*   I_T_FILE_CONTENT_BINARY       =
          .

BREAK-POINT.
WRITE l_t_return-message.

Many thanks for your help