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

Link between the 2 tables VBAK and SOOD

Hello Gurus,
I'm developing an ALV report showing different information of sales documents.
In one of the columns, I need to show an icon when there are attached documents to the sales document.
When clicking on this icon a pop-up is open showing the list of the available attached documents.

I found that all the attached documents are stored in the table SOOD, but I can't find the link between these attached documents and the original Sales document stored in VBAK table

Any help would be appreciated.
Regards,
Driss

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jan 07, 2014 at 12:46 PM

    Hi,

    depends of your configuration.

    could you check the table TOA01 ?

    to get quickly the list of document link, you will have to used this method :

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 05:16 PM

    Frederic is right - forget about the tables. You might want to read a bit more about Generic Object Services (GOS), there are lots of posts on SCN.

    I worked with these a bit in the past, but it was usually saving attachments, not reading. Reading would be very similar though, the main part we need to understand is the concept itself (generic relationship).

    Here are some old posts that might be useful, search for 'GOS attachment' to find more:

    http://scn.sap.com/message/1187839#1187839

    http://scn.sap.com/thread/2041869

    The older posts might direct you to use the function modules, but the methods could be used as well, as mentioned by Frederic.

    You can find the right BUS... number and get other clues if you use SQL Trace and open the attachment in VA03.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 05:47 PM

    Hi Azmi

    You can create the button in the column of an ALV. Once user press this button call function module

    GOS_ATTACHMENT_LIST_POPUP. Pass to it VBAK as business object(check in SWO1 for sales order) and pass IP_MODE as display one. It will show the list of attachments

    Nabheet

    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.