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

Retrieve filename of attachment for inspection lot

Hi all,

How to get the attachment list for a particular inspection lot number(those attachment that appeared in QA03)?

I have google around it seems like function module GOS_ATTACHMENT_LIST_POPUP might do the trick.

My objective is to get the filename of the attachment.Can anyone spread some idea on this?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on May 28, 2013 at 04:17 AM

    Go through note 927407 - Determining the content of GOS and SAPoffice documents.


    1. Determine the BOR object in question as Frédéric already pointed out.

    2. Use method CL_BINARY_RELATION=>READ_LINKS_OF_BINRELS to read the links. You are specially interested probably in those of type ATTA. In older SAP versions you call SREL_GET_NEXT_RELATIONS function module instead.

    3. Call function SO_DOCUMENT_READ_API1. In parameter DOCUMENT_DATA you'll find the file name. You also get the file contents with this one.

    I had the same doubt today, so I'm positive it works 😉


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for the precise explanation.

      For the solution:

      I have search through the object list in SWO1 and discover that BUS2045 is the SAP standard object for inspection lot.

      lwa_object-instid = iv_prueflos. "Inspection lot number

      lwa_object-typeid = 'BUS2045'.

      lwa_object-catid = 'BO'.

  • Posted on May 27, 2013 at 08:48 AM

    Hi Marlson,

    you have to find the object corresponding to the Inspection lot

    (have a look to the trans. OAM1, .. customizing .. ling .. )

    and after write a code like this :

    MOVE : it_qcpr-certno TO is_object-instid ,

    'BUS2117' TO is_object-typeid ,

    'BO' TO is_object-catid .

    APPEND is_object TO it_objects.

    * Création 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.

    CALL METHOD cl_binary_relation=>read_links_of_objects
    it_objects = it_objects

    * ip_logsys =

    it_role_options = it_roles
    it_relation_options = it_relations

    * ip_no_buffer = SPACE

    et_links_a = it_link_a.
    CATCH cx_obl_model_error .
    CATCH cx_obl_parameter_error .
    CATCH cx_obl_internal_error .



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Girod,

      Thanks for your reply. Anyway I just want to get the title of the attachment.

      What should I put for this field is_object-instid? Should I just put the inspection lot number(PRUEFLOS) for this field? I'm not quite understanding on how to get the object corresponding to the inspection lot.



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.