Link invoice with Business Document

Hi all,
I am looking for a way to link my invoices (from R/3 Invoice overview) with the original scanned invoice in TIFF format (business document).
I can see that this is possible using the "Attach Business Document" feature in the change invoice sreen, but I do not want to set this link up manually.
Is there anyway assign a "business document" to an invoice (or the other way around) automatically?
Thanks!

....you can use GOS (generic object serivces) to add attachments.
Here is a SD billing example....
Add this program to an output type in transaction NACE
*& Report  ZZCREATE_ATTACH                                             *
*& Triggered by billing output-type ZRD4                               *
*& Create a "service for object" attachement URL
report  zzcreate_attach.
tables: nast.
data: tmp_vbeln like vbrk-vbeln.
data:
*--Object_a
    p_botype like obl_s_pbor-typeid,
    p_bo_id  like obl_s_pbor-instid,
*--Object_b
    p_docty  like obl_s_pbor-typeid,
    p_msgtyp like sofm-doctp,
    p_url(300),
    p_title(30),
*--Relationship
    p_reltyp  like mdoblrel-reltype.
*-Include for BO macros -*
include : <cntn01>.
types: begin of ty_message_key,
        foltp     type so_fol_tp,
        folyr     type so_fol_yr,
        folno     type so_fol_no,
        doctp     type so_doc_tp,
        docyr     type so_doc_yr,
        docno     type so_doc_no,
        fortp     type so_for_tp,
        foryr     type so_for_yr,
        forno     type so_for_no,
       end of ty_message_key.
data : lv_message_key type ty_message_key.
data : lo_message type swc_object.
data : lt_doc_content type standard table of soli-line with header line.
data : tmp_oblguid16 type oblguid16.
*&      Form  entry
*       text
*      -->RETURN_CODE  text
*      -->US_SCREEN    text
form entry using return_code us_screen.
  perform create_url.
  return_code = 0.
endform.                    "ENTRY
*&      Form  create_url
*       text
*  -->  p1        text
*  <--  p2        text
form create_url .
  if nast-objky+10 ne space.
    nast-objky = nast-objky+16(10).
  else.
    nast-objky = nast-objky.
  endif.
  tmp_vbeln = nast-objky.
*-Load class. -*
  class cl_binary_relation definition load.
  class cl_obl_object      definition load.
*-Set default values -*
  p_botype = 'VBRK'.
  p_bo_id  = tmp_vbeln.
  p_docty  = 'MESSAGE'.
  p_msgtyp = 'URL'.
  p_title  = 'Web Hotel'.
  p_reltyp = 'URL'.
  p_url = 'www.mydoc.tiff'.                   "Here you must add your URL !!!
*-First derive the Attachment's ( MESSAGE )document type. -*
  p_docty = 'MESSAGE'.
  case p_reltyp.
*   In case of URls
    when 'URL'.
      p_msgtyp = 'URL'.
*   In case of Notes / Private Notes
    when 'NOTE' or 'PNOT'.
      p_msgtyp = 'RAW'.
    when 'ATTA'.
      p_msgtyp = 'EXT'.
*   Not implemented as yet...exit
      exit.
    when others.
*    ....exit
      exit.
  endcase.
*-Create an initial instance of BO 'MESSAGE' - to  -*
*-call the instance-independent method 'Create'.   -*
  swc_create_object lo_message 'MESSAGE' lv_message_key.
*-Define container to pass the parameter values -*
*-to the method call in next step.              -*
  swc_container lt_message_container.
*-Populate container with parameters for method-*
  swc_set_element lt_message_container 'DOCUMENTTITLE' p_title.
  swc_set_element lt_message_container 'DOCUMENTLANGU' 'E'.
  swc_set_element lt_message_container 'NO_DIALOG'     'X'.
  swc_set_element lt_message_container 'DOCUMENTNAME' p_docty.
  swc_set_element lt_message_container 'DOCUMENTTYPE'   p_msgtyp.
*-'DocumentContent' is a multi-line element ( itab ). -*
*-In case of URLs..it should be concatenated          -*
*-with &KEY& in the begining.                         -*
  case p_msgtyp.
    when 'URL'.
      concatenate '&KEY&' p_url into lt_doc_content.
      append lt_doc_content.
*-In case of Notes or Private Notes, get the data -*
*-from files on appl server or from wherever ?    -*
*-(remember background).                          -*
    when 'RAW'.
      lt_doc_content = 'Hi How r u?' .
      append lt_doc_content.
*-In case of File attachments upload file -*
    when 'EXT'.
  endcase.
  swc_set_element lt_message_container 'DocumentContent' lt_doc_content.
  swc_call_method lo_message 'CREATE' lt_message_container.
*-Refresh to get the reference of        -*
*-create 'MESSAGE' object for attachment -*
  swc_refresh_object lo_message.
*-Get Key of new object -*
  swc_get_object_key lo_message lv_message_key.
*-Now we have attachment as a business object instance.      -*
*-We can now attach it to our main business object instance. -*
*-Create main BO object_a -*
  data: lo_is_object_a type sibflporb.
  lo_is_object_a-instid = p_bo_id.
  lo_is_object_a-typeid = p_botype.
  lo_is_object_a-catid  = 'BO'.
*-Create attachment BO object_b -*
  data: lo_is_object_b type sibflporb.
  lo_is_object_b-instid = lv_message_key.
  lo_is_object_b-typeid = p_docty.
  lo_is_object_b-catid  = 'BO'.
*-TRY -*
  call method cl_binary_relation=>create_link
    exporting
      is_object_a            = lo_is_object_a
*    IP_LOGSYS_A            =
      is_object_b            = lo_is_object_b
*    IP_LOGSYS_B            =
      ip_reltype             = p_reltyp
*    IP_PROPNAM             =
*    I_PROPERTY             =
     importing
       ep_link_id             = tmp_oblguid16
*    EO_PROPERTY            =
endform.                    " create_url

Similar Messages

  • Report to link invoices with attached documents

    I am trying to spool a report from the oracle back end, for some senior staff at my organisation. The report would contain approved invoices along with their electronically attached documents. I have a similar query that works( see below) the problem is this query only accurately ties invoice ID's(PK1_Value) for invoices that were created using "AP_INVOICES" enitity_name, but majority of our users dont have the payables responsibility and hence can only create using the "AP_INVOICES_INTERFACE" enitity_name, and I cant tie the PK1_VALUE in the fnd_attached_documents table to the invoice ID, Please I need urgent help to locate (a) what PK1_VALUE is being used by AP_INVOICES_INTERFACE (b) How I can reference INVOICE_ID with that value.
    SELECT SUP.vendor_name SUPPLIER, INV.invoice_num INVOICE,
    INV.invoice_amount AMOUNT, INV.remit_to_supplier_name,
    INV.description, APVL.approval_history_id, APVL.approver_name, DOC.url
    FROM ap_suppliers SUP, ap_invoices_all INV, ap_inv_aprvl_hist_all APVL,
    fnd_documents DOC, fnd_attached_documents ATCH
    WHERE SUP.vendor_id = INV.vendor_id
    AND INV.invoice_id = APVL.invoice_id
    AND INV.invoice_id = ATCH.pk1_value
    AND DOC.document_id = ATCH.document_id
    AND INV.wfapproval_status = 'WFAPPROVED'
    AND ATCH.entity_name = 'AP_INVOICES'
    AND APVL.response = 'APPROVED'
    AND INV.cancelled_by IS NULL
    ORDER BY SUPPLIER, INVOICE, APVL.approval_history_id
    Thanks in anticipation.

    991923 wrote:
    @Billy
    This is an oracle related question, and its not an in-built developed model. I was actually refered to this forum from oracle support.Billy is correct. Whilst it may be an Oracle question, it is not an SQL or PL/SQL related question.
    Your question is referring specifically to functions and entities that are only available to people using one of Oracle Apps type things (I don't use them myself)... So probably one of the forums in the E-Business suite (https://forums.oracle.com/forums/category.jspa?categoryID=3) would be more suitable.
    Oracle Support would not (or certainly should not) be referring someone to ask their question in the forums if it is an urgent commercial issue as these forums are not for commercial support.
    In these forums, nothing is "urgent" and it is considered rude to presume otherwise, both to the volunteers who help here, and to the other people who would like their questions answered.
    The reason i mentioned the tables AP_INVOICES_ALL and AP_INVOICES_INTERFACE is to give as much information about my problem as possible.That's great, but those tables do not exist as part of the standard Oracle database installation, and this SQL and PL/SQL forum is for questions related to the SQL and PL/SQL languages, not for questions related to specific applications that people here are unlikely to have, and for which, when they are Oracle provided applications, they have their own specific forums.

  • APP - F110 - Payment of multiple invoices with different document type

    Hi
    Vendor X has been assigned with payment method same with two document types. One document type got 4 invoices and other document type got 1 invoice.
    During payment run (F110) for each document type, the system picked up both the document type but listed them as two separate lines in the proposal list. When we process the payment the system also created two payment documents.
    Is there a way for these two document types to be processed as a single proposal and payment.
    Any suggestion how can we process these invoices together in a single proposal/payment document?
    Thanks & Regards,
    Sam

    Thanks

  • MM Invoice with FI documents

    Hi All,
    In MIRO, we display Logistic Invoice which posted, if we click on follown-Documents, system will show all FI documents number.
    Could anybody tell me from which table system store, i.e MM invoice along with FI documents number.
    Regards,
    Venkat

    Hello Venkat,
    RBKP and RSEG tables store data related to MM Invoice (created by MIRO transaction).
    In BKPF table, for field AWKEY, if you put concatenated the values from RBKP-BELNR (Invoice Doc. Number) and RBKP-GJAHR (Fiscal Year), you will be able to get the respective FI document.
    Hope it helps you!
    Regards,
    Daniel.

  • Archive Link problem with redundant document names

    Hi all,
    I have a tricky problem in archive link. I would like to attach some different documents to an HR/PD Organisation unit ( objekttyp pdotype_o )
    All customizing works fine but the problem is, all documents attached to one busines object ID have the same name ( in this case objectnumber.pdf)
    I am not lucky with this issue because  the users must be able to see all documents ( via document finder ) attached to the org. unit  and all what the users get, is a list of  one or more documents with exactly the same name.
    In some cases this are about 10 different documents and this issue is a very bad solution because users have to open all attached docs to recognize which one they need.
    During the import/check in of the documents via transaction OAAD and OAWD, SAP renames the original document name.pdf  into the related object ID.pdf and there is no way to rerename it or influence this process.
    I tried to use some scan software with SAP interface but unfort. with the same result because software of this kind use the archive link interface too and cannot influence the process of check in and rename.
    Has anybody an idea ( third party software, customer development or something like this ) to prevent this problem and give me the possibility to stay with the original document names or change it after check in?
    Thank you in advance
    Rayko

    How you fix this problem?
    I'm with the same problem. Could you help me please?
    Edited by: broullon on Jul 16, 2009 5:31 PM

  • Link check with clearing documents

    I have a situation where, users cleared vendor manually.
    Now when we look at the cleared line item from FBL1N and select the payment to look at the check details, It doesn’t allow me to see check details from there. “It says No check information exist for this line item”
    What should I do in order to link the link the check with that payment so that I can see even check info for line items from FBL1N?

    Hi,
    I am sure you cannot print checks using transaction code F-44. This transaction is used only for clearing the Vendor open items either to a GL Account or debits and credits in a Vendor account.
    I guess, user would have used F-44 and posted the amount to the Bank account or Bank clearing account. This will not update even the check register. May be the check is written manually.
    The solution to resolve this is to reverse the document created using F-44 using transaction code FBRA (reverse and reset) and post a new document using transaction code F-58. This will update the check register as well as tracking of documents clearing for the payment.
    Thanks
    Murali.

  • Naming, arranging linked photos with Excel document info

    Hello!
    I am attempting to make a newspaper layout consisting for graduates from our local high schools. I have been provided a disc with literally hundreds of pictures. The photos in the layout need to be arranged in alphabetical order, but the file names are non-sequential numbers that are not in order. However, I have been given an Excel document that has the file name with the name of the student in the cell next to it.
    Is it possible to somehow use this data in the Excel document to properly arrange the images like I need them in the layout? If it has to be done manually, that's fine, but I thought it would be worth a shot to ask. We have InDesign CS3 and CS4.
    Thank you!

    It's probably easier to solve this outside of InDesign.
    Construct a spreadsheet with string contatenation that produces commands to rename the files. Under Windows:
    RENAME 1234.JPG F4332.JPG
    or under Mac OS X:
    mv 1234.jpg f4332.jpg
    And then save the results to a .BAT file (Windows) or a .sh file (OSX) and then execute it (filename.bat or "sh file.sh").
    Then all your files are renamed and you should be able to autoplace them in InDesign.
    Or you could use Data Merge.

  • Error in Link  Invoice to Payment

    Hi
      I have problem in Link Invoice to payment, I could not adjusted A/P Invoice with outgoing payment. In that A/P Invoice, Asset items are used.  I got this error message  "Cannot link Invoice with different control account than the BP's Main control account".

    Hi,
    This is the limitation of SAP B1, due to the asset control account mapped in the business partner master data.(under that BP Master->accounting tab ->general tab->control account->asset account)
    By default the when payment processed thorugh outgoing payment(by using payment on account option),the payment will be accounted in the sundry creditors account.
    So the link to invoice option will not be able to reconcile the sundry creditors account and the asset account which mapped in the BP master.
    Now inorder to reconcile these accounts:
    Create a manual JE,where you can change the control account for that BP.
    Db. the control account(asset account mapped in the BP master data) for the BP and Cr. the default control account(Sundry creditors account).
    Then manually reconcile the BP.
    Inorder to avoid these complexity the payment by selecting the corresponding asset AP invoice,this would automatically reconcile the accounts.
    Hope this clarifies your issue!

  • Grouping of customer invoices based on document currency

    Dear All,
    In an intercompany scenario, documents would be posted in different currencies to the inter company customer. For example there are 10 invoices posted to this customer. out of the 10 invoices, 4 invoices are posted in USD, 3 are posted in EUR and 3 are posted in JPY currency. When the payment proposal (F110) is run for these customers, we would expect that all the invoices with same document currency are grouped together against each customer. However, currently it is not behaving the same. Could you please let us know the relevant configuration setting required for this grouping.
    Thanks & Regards
    Vasu

    Hi Deepa,
    Thanks for your reply. Let me claify the issue again. In the given example, when the proposal is run, we would expect one payment document created for all the invoices in USD currency, EUR & JPY separately. Precisely there should be only three payment documents. However, currently the system is not behaving in this manner. We would like to know the configuration required to meet this requirement.
    Thanks & Regards
    Vasu

  • Cancel option of Reconciliation and Link Invoice

    Hi !
           We by mistake have Linked Invoice with wrong amt. ie we linked invoice of value 1 lakh with 10000 payment. unfortunately the invoice got closed. How to reverse the linked invoice ?
    similarly we need to know the reversal options for reconciliation.
    shiva.

    payment-cancel incoming/outgoing payment.
    reconcillation-manage previous reconcillation.
    Jeyakanthan

  • Link ArchiveLink Document (outb. invoice) with inb. invoice

    Between the companies in our group we are having an ALE-handling for the invoicing process, incoming invoices are posted via IDoc. Actually it is possible to create in the SD-invoice the generated message as a pdf-Document on the external storage system (e.g. Content Server) by ArchiveLink means.
    After that, if the incoming invoice is posted in the same system, the document of the outbound invoice (SD) can be linked with business object "Incoming Invoice". This is manually in the Document Viewer with the function "Assign Document".
    Is there a SAP-standard functionality, with which this can be included  automated in an ALE-scenario ? (Transfer of DocID and subsequent link with the number of the incoming invoice in Log.inv.verification).
    Or is it necessary to establish this in the environment of Business Workflow and the creation of the additional link to the business object takes place here ?

    Between the companies in our group we are having an ALE-handling for the invoicing process, incoming invoices are posted via IDoc. Actually it is possible to create in the SD-invoice the generated message as a pdf-Document on the external storage system (e.g. Content Server) by ArchiveLink means.
    After that, if the incoming invoice is posted in the same system, the document of the outbound invoice (SD) can be linked with business object "Incoming Invoice". This is manually in the Document Viewer with the function "Assign Document".
    Is there a SAP-standard functionality, with which this can be included  automated in an ALE-scenario ? (Transfer of DocID and subsequent link with the number of the incoming invoice in Log.inv.verification).
    Or is it necessary to establish this in the environment of Business Workflow and the creation of the additional link to the business object takes place here ?

  • Object link with finanace Documents (Vendor Invoice) Tcode FB03

    Hi all,
    Can DMS object link be maintained with finance documents for ex Vendor Invoice?
    Tcode FB03.
    Thanks
    Ansih

    Hi,
    you can link documents to purchase order item or purchase requisition then obviously this will be displayed in vendor invoice.
    Best practice is to use SAP DMS standard functions. Don't go to link with vendor invoice.Anyhow MIRO and MIGO transaction are
    depeandent on purchase requisition.I hope this will resolve your query and is a best practice.
    Regards,
    Ravindra

  • Link business document with an existing archive when processing an IDoc

    Hi Gurus,
    I am trying to configure the linkage (Archivelink) of existing archive documents to new business documents created by processing an IDoc. Is there a standard parameterization that allows to input the Archivelink signature during the Business document creation process ?
    Many thanks in advance,
    Guillaume Secco

    I don't see what the problem is with printing to PDF using the Adobe PDF printer as you did with the other tool. Then open your new Excel PDF and do the same process as before (assuming it worked for you). Just go to the Tools>Interactive and add a button field (I assume this is what you did before) and put the file there. At least give it a try as I think that is what you said you used to do.

  • Link Invoice Document using Easy Document Management

    Hi All, is there any way to use Easy Document Management System to attach a scanned document like a PDF to an invoice document.
    If it is there, is it easy to customize?
    We are trying to evaluate different scanning solutions and trying to see if we can make DMS work without purchasing any other software.
    Thanks

    Wrong module. DMS is not designed for invoices. DMS is designed for documents that change and need versioning.
    ArchiveLink is the correct solution/module. This allows you to link incoming invoices directly to the object in SAP in MIRO and FB60.
    If its outgoing invoices, you can link them to sales orders. The document is stored in the GOS (generic object services) area of SAP and will appear in the attachment list. If you go to GOS you will see an option called "Store Business Document" which will be made available when you have configured this properly.
    There is no easy way to customise. You have to install a content server (See SAP HTTP content server) and then configure the document type and which object it will be linked to. You also have to configure the method of processing. I.e. early archiving, late archiving.
    It is possible to set this up using no external software except the SAP HTTP content server which is free with your SAP licensing.

  • Services for Object - Store Business Documents (issue with XLSX files)

    Hi,
    We are using the Services for Object > Store Business Document to be able to drag and drop files into (for example) Sales Inquiry, Sales Order, Sales Quotations etc.
    Within OAC2 we have set up the global document types and these have been linked to the relevant Object Types and Content Repositories in OAC3.  We have also set up the Content Repository as Document Area 'ARCHLINK'.
    The ArhciveLink Basic Settings in OAG1 have the 'Always Copy Document Class from Document Type' set under Storage Settings.
    The issue we are having is with XLSX document types.  When we drag and drop the XLSX documen type using the Store Business Document the file is stored against the Sales Order but when you come to view the attachments MS Excel opens but an error message appears saying 'Excel cannot open the file '******' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'?
    We have reviewed SAP notes 1925897, 1739026 and 1145885 however non appear to give me a clear answer as to why this is happening?
    I have found that if we unselect the option 'Always Copy Document Class from Document Type' in OAG1 then we can open the XLSX files.
    As we have a significant amount of documents attached to various objects, what would be the implications of making this change agianst existing records and new records?
    Any advice on this issue would be greatly appreciated.
    Gary B

    Hi David,
    No joy I'm afraid!!
    I added entry 'xlslx' with the relevant MIME Type, Application and Description into table TOADD for the ArchiveLink settings and also this entry was already in tables SDOKMIME and SDOKFEXT for KPro.
    I then following the process via the Services for Object within VA12 (Change Inquiry) to then Create > Store Business document > Select the relevant Document Type > Drag and Drop the XLSX file into the empty box.
    I then saved the record and tried to view the attachement but I am still getting the same message  'Excel cannot open the file '******' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'?
    Our client is on componet SAP_BASIS release 701 Support Level 0014 and Support Package SAPKB70114 and I can see that note 1237688 is for SAPKB70112?
    Regards
    Gary

Maybe you are looking for