Application Development and Automation 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: 
Read only

Problem with FM 'ARCHIVOBJECT_GET_TABLE'

Former Member
0 Likes
8,759

Hi,

     I have a req to retrieve all archived PDF file for  particular OBJID & OBJTYP and attach it to mail using CL_DOCUMENT_BCS (for which I can use the method ADD_ATTACHMENT)

The problem is,

I have used the FM 'ARCHIV_GET_CONNECTIONS'

and passed parameters OBJTYP and OBJ ID to retrieve CONNECTIONS table with header line.

this CONNECTION table has fields ARCHIV_ID, ARC_DOC_ID and AR_OBJECT .

Then I have used the FM 'ARCHIVOBJECT_GET_TABLE' to retrieve the PDF in binary (is this approach right)

          Can I pass parameters CONNECTION-ARCHIV_ID , CONNECTION-ARC_DOC_ID & CONNECTION-AR_OBJECT to this FM.

If yes when I pass I get 404 error in SE37 itself. If wrong where am I wrong and is there any alternative for this FM 'ARCHIVOBJECT_GET_TABLE' .

Does it return data in Binary so tat I can directly attach it to CL_DOCUMENT_BCS->ADD_ATTACHMENT

Thanks,

Santhosh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
5,747

Actually this error occurs only when I try to simulate the FM ARCHIVOBJECT_GET_TABLE in SE37,

Guess what, it didn't throw up any error when I executed inside my program. Cant figure out why, But this is the solution.

Thank u others for participation!

13 REPLIES 13
Read only

FredericGirod
Active Contributor
0 Likes
5,747

Hi Santhosh,

I used this method :

* Alimentation de la clef.

  MOVE : 'I'          TO is_role-sign ,
         'EQ'         TO is_role-option ,
         'GOSAPPLOBJ' TO is_role-low.
  APPEND is_role TO it_roles.
  MOVE : 'I'          TO is_relation-sign ,
         'EQ'         TO is_relation-option ,
         'ATTA'       TO is_relation-low .
  APPEND is_relation TO it_relations.
  MOVE : 'BIN' TO w_file_type.

*   Extraction des liens.

  TRY.
      CALL METHOD cl_binary_relation=>read_links_of_objects
        EXPORTING
          it_objects          = it_objects
          it_role_options     = it_roles
          it_relation_options = it_relations
        IMPORTING
          et_links_a          = it_link.
    CATCH cx_obl_model_error.
    CATCH cx_obl_parameter_error.
    CATCH cx_obl_internal_error.
  ENDTRY.

regards

Fred

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
5,747

Hi Santhosh

We have been using this ARCHIVOBJECT_GET_TABLE FM for long time. We pass the archive id,document type and archive doc id.

It return us the binary contents. Did you pass document type you want to retrieve..?

What is the error message number and message class you get when message is thrown.

Nabheet

Read only

0 Likes
5,747

Hi Nabheet,

                    Am I correct in my approach of sending the o/p of FM 'ARCHIV_GET_CONNECTIONS' ie,  ARCHIV_ID, ARC_DOC_ID and AR_OBJECT to I/p for ARCHIVOBJECT_GET_TABLE FM ???

to be specific.... is AR_OBJECT = DOCUMENT_TYPE????

the error I get is

Thanks!

Read only

0 Likes
5,747

DOcument_type is not archiving object. It is like what kind of document PDF etc you stored

Read only

0 Likes
5,747

Hi Nabheet/ Frederic,

                   In debugging it is revealed that deep inside the FM ARCHIVOBJECT_GET_TABLE the FM SCMS_HTTP_GET fails and returns sy-subrc = 2. Hence I get the error. Any idea what migh be the cause????

More over if I execute the FM SCMS_HTTP_GET separately in SE37 still it throws errorsaying "ERROR GENERATING TEST FRAME"?????

Please help.


Read only

0 Likes
5,747

I have this error last time .. wait I try to remember

I had so much error, that was an IDES server.

I think it's a problem of user/password in the SICF

it try to open a link that didn't work

you could test it with : http://IP_OF_MY_SERVER:1090/ContentServer/ContentServer.dll?serverInfo

Read only

0 Likes
5,747

Yes Frederick, the sy-subrc = 2 says that the content is protected and has some issues accessing it. How did you solve the SICF problem???? how can I solve????

Read only

0 Likes
5,747

I'm not sure but ..

Go in SICF, start trans to see the whole tree.

Go in /default_host/sap/bc/contentserver

and check if there is a user / password set in the second tab. And check if the user is not lock, inactive, wrong passwd ..

Fred

Read only

Former Member
0 Likes
5,747

Hi,

     Do we have any alternative instead of using the FM ARCHIVOBJECT_GET_TABLE to retrieve the Archive document when I have the Archive ID, Archive doc id and document type?????

Read only

0 Likes
5,747

You didn't like my beautiful cl_binary_relation=>read_links_of_objects ?

Read only

0 Likes
5,747

Its too beautiful that it didn't solve my issue and didn't even throw any exception. That ugly ARCHIVOBJECT_GET_TABLE atleast threw some error.

Gave the same test data as urs. filled it_objects with the object id and type still in vain.

Read only

Former Member
0 Likes
5,748

Actually this error occurs only when I try to simulate the FM ARCHIVOBJECT_GET_TABLE in SE37,

Guess what, it didn't throw up any error when I executed inside my program. Cant figure out why, But this is the solution.

Thank u others for participation!

Read only

0 Likes
5,747

Hi Santhosh,

I am also trying the same way as you to read a pdf file from archive server. After calling the FM ARCHIVOBJECT_GET_TABLE, I got the data in table as RAW format of type TBL1024. I want to convert the same to binary. With FM SCMS_XSTRING_TO_BINARY I couldn't achieve this as we have multiple lines of data. Could you advise on how did you achieve this.

Thanks,

Faisal