Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get INSTID_B for the documents which are stored using Store Business Document functionality

former_member738384
Discoverer
0 Kudos

Dear experts,

I had activated the functionality of Store Business document and successfully stored documents in external server.

My client have a custom function module which is used to send emails.In that FM they used SO_DOCUMENT_READ_API1, SO_DOCUMENT_SEND_API1 function modules.They passed Instance Ident(SRGBTBREL->INSTID_B)(eg: FOL33000000000004EXT39000000000026) as export parameter to the FM 'SO_DOCUMENT_READ_API1' and get the attachment details and content.

Here my problem is I do not have entries in the table SRGBTBREL for the documents which are stored using the Store Business Document functionality and without INSTID_B I am unable to use the FM 'SO_DOCUMENT_READ_API1' to get the document details and content. Please help me to find INSTID_B for documents which are stored using Store Business Document functionality or please let me know if there is any other way to use FM 'SO_DOCUMENT_READ_API1' for documents which are stored using Store Business Document.

Thanks in advance.

Regards,

Kiran

3 REPLIES 3

former_member195402
Active Contributor
0 Kudos

Hi Kiran,

You can use the following method to get the information. For example if you want to get BO documents for a customer

CALL METHOD cl_binary_relation=>read_links
   EXPORTING
     is_object           = ls_lpor
     it_relation_options = lt_relat
   IMPORTING
     et_links            = lt_links.

then fill  ls_por-instid with a customer number (KUNNR), ls_por-typeid = 'KNA1' and ls_por-catid = 'BO'.

Table  lt_relat should contain a line option  for each document type (for example 'I' 'EQ' 'NOTE', 'I' EQ 'ATTA', 'I' EQ 'URL', ...

In table lt_links you will get your information.

Maybe some other methods of class CL_BINARY_RELATION may also solve your issue.

Regards,

Klaus

0 Kudos

Hi Klaus,

     Thank for your answer. Read_links method fetches SRGBTBREL table entries only. This method unable to fetch archived files information(i.e, files which are stored using Store Business Document functionality). Please let me know if there is any other ways.


Is there any function modules to fetch the content of archived files.


Regards,

Kiran

0 Kudos

Hi Kiran,

searching in SE24 there are several CL_ALINK_* classes and IF_ALINK_* interfaces that may solve your issue such as

  • CL_ALINK_BUSINESS_OBJECT
  • CL_ALINK_CONNECTION
  • CL_ALINK_QUERY_DOCLIST
  • CL_ALINK_QUERY_DOCLIST_RFC
  • IF_ALINK_BO_DOCUMENT_TREE_VIS
  • IF_ALINK_LINK
  • IF_DV_DOCUMENT_AO

and many more. Maybe one of them may be helpful for you.

Regards,

Klaus