Skip to Content
author's profile photo Former Member
Former Member

How to find archiv_id and archiv_doc_id ?

Hi All,

I have a FM ALINK_DOCUMENTS_GET_CLIENT to download an archived document to the SAP directory of user login.

My requirement is to download a PDF document of an invoice to my system. Using the above FM i can achieve this, but i need the input parameters (archiv_id, document_class, archiv_doc_id) to pass to this FM.I have only the invoice number with me.

I saw TOA01 table, but i dont have any input to pass to this table to get these parameters values.

so ,how can i get these parameter values?

Whenever an invoice is archived, in which table archiv_doc_id and archiv_id will get stored?

Thanks in advance,

Srilakshmi.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2008 at 11:37 AM

    Hi,

    If you are using output types to archive the invoice, then

    First you will have to get the Archivelink meta data from TOAOM. using the

    sap_object = 'VBRK' , this is in case of billing document

    AND ar_object = 'SDOINVOICE' this is in case of billing document

    ND ar_status = 'X'. " active

    The output is stored in the table NAST, there you will find the optical archive number when the document was stored. Now if you concatnate the objkey and the optical archive number, you will get the toa01-object_id ( note there are number of spaces between the objkey and the optical archive number, which you can get from an existing record.

    Now to fetch the data from toa01 you will have to use the conditions :

    sap_object = 'VBRK' if it is Billing document, check other values in the table TOAOM,

    object_id = concatenated nast-objky some spaces and nast-optarcnr

    archiv_id = toaom-archiv_id

    ar_object = 'SDINVOICE' , if it is billing document else you can check what this value is in your case.

    Once you get the details from TOAOM, NAST and TOA01 tables, you call the function ARCHIVOBJECT_GET_TABLE to get the data in a binary format.

    regards,

    Advait

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.