cancel
Showing results for 
Search instead for 
Did you mean: 

List of sales orders with Attachment

siva_vasireddy2
Active Contributor
0 Kudos

Hi All,

Iam looking for a Report where we can see list of sale orders with Attachments.

Users need to Generate the Report and Access the Attachments which are attched through services for objects in VA02

Thank you

Siva

Accepted Solutions (1)

Accepted Solutions (1)

moazzam_ali
Active Contributor
0 Kudos

Hi

There is no standard report. We have created a report in which we can see the list in ALV and we can also open attachment directly from this ALV report. We used tables srgbtbrel ,sood,vbak,bsad,vbkd,kna1. You can discuss with your ABAPER and ask him to make a report for you. Or you can also create a report in SQVI or SQ02, SQ01 by joining these tables.

Thank$

siva_vasireddy2
Active Contributor
0 Kudos

HI,

Thank u for the reply

i have joined the tables in the sequence plz can you specify the Fields i need list in the Report and the Fields i need to select  for running the report

siva_vasireddy2
Active Contributor
0 Kudos

Hi,

Plz confirm on the same

moazzam_ali
Active Contributor
0 Kudos

Hi

Let me check this in my system on Monday and then I will confirm you. Meanwhile did you create this using query tool or you have done it through ABAP?

Thank$

siva_vasireddy2
Active Contributor
0 Kudos

Hi,

Thank you for the reply

first i am trying with SQVI

moazzam_ali
Active Contributor

Hi Siva

I've just checked this in my system and I SQVI won't work here. System is not allowing me to join these fields. You have to go with coding. If ABAP report is possible then that would be nice otherwise you may try in SQ02 by creating additional field. I am giving you coding which we used in our ABAP report for selecting this attachment.

SELECT * FROM srgbtbrel
      WHERE instid_a = it_docf-so_vbeln.
    IF sy-subrc = 0.
      SELECT  objtp
              objyr
              objno
              objdes
        INTO (it_att-objtp,
              it_att-objyr,
              it_att-objno,
              it_att-objdes)
        FROM sood CLIENT SPECIFIED
        WHERE mandt = sy-mandt
          AND objtp = srgbtbrel-instid_b+17(3)
          AND objyr = srgbtbrel-instid_b+20(2)
          AND objno = srgbtbrel-instid_b+22(12).

        MOVE: it_docf-so_vbeln TO it_att-vbeln.
        APPEND it_att.
        count = count + 1.
      ENDSELECT.

For your information when we attach a file in sale order you can check that in table SRGBTBREL by giving sale order number in field INSTID_A. You have to give 10 character here. If you sale order number is 12345 then you have to give 0000012345 here because system saves value like this. On execution you'll see that in Relation Type field ATTA Has the Attachment will be there which means this order has attachment.

Moreover I found a link which you may use with the help of your ABAPER. Just go through this link as well.

Thank$

Answers (2)

Answers (2)

former_member186385
Active Contributor
0 Kudos

Hi Siva,

There is no standard report available

may be you have to write a new report combining VBAK and DRAW tables

regards,

santosh

Lakshmipathi
Active Contributor
0 Kudos

Check this thread

G. Lakshmipathi