Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FBL5N document attachments detection

Former Member
0 Likes
2,314

hi all! i'm very new with SAP and i really need help on this one.

im trying to create a custom program that will detect if sales documents found on transaction FBL5N contain attachments or not. the FB03 transaction has a display attachment option and i was wondering on what table it retrieves the information of what attachment it contains.

i have tried table SOOD but i could not find any relation with tables BSEG or BSIS.

any input would really go a long way.

thanks!

chad

4 REPLIES 4
Read only

Former Member
0 Likes
1,232

Hi,

If the attached documents are archived then archive details are available in table TOA01. The attachement type can be of any type like PDF,BIN,HTM,FAX, etc....

Thanks,

Srilakshmi.

Read only

marcelo_ramos1
SAP Mentor
SAP Mentor
0 Likes
1,232

Hi Chad,

Welcome to SDN Forums

You must use the correct or most appropriate forum, so this thread will be moved from to .

The forum is dedicated to: General questions about the ABAP language and language implementations. If in doubt, use this forum and do not cross-post.

Please see the [Forum Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting.

Also read this thread .

Greetings,

Marcelo Ramos

Read only

Former Member
0 Likes
1,232

Thanks Srilakshmi! The documents however are not archived.

i found class CL_GOS_ATTACHMENT_QUERY, however i dont know how to use this. if i use the method COUNT_FOR_OBJECT, what should i use for IS_OBJECT? i tried entering the document number with an attachment but the result is 0.

i've also read that you could use tables SOOD and SRGBTBREL but i cant find a field i could use to link the two. the GUID and INSTID_A was suggested but it did not work.

finally, i've also tried fm BDS_ALL_CONNECTIONS_GET but the count is also 0.

any input would go a long way.

thanks in advance!

Chad

Read only

Former Member
0 Likes
1,232

Charles,

I was also in search of the solution or some clue to find out the way for the problem you posted.

I used the table SRGBTBREL. I created two attachments for a financial document in fb02. My document

number was 1800000000 and company code was 1000 and fiscal year was 2006.

When I was using fb03 and click the attachment lists option, it showed my two documents. In the heading part, below the toolbar, it was showing AttachmentFor100018000000002006 . (combination of company code, document number, fiscal year).

Now I went to se16,and entered the table name you specified SRGBTBREL, in the selection screen, in the field INSTID_A , I entered the value 100018000000002006. It gave me two records, those are related to the attachments which I created in the previous step in FB02. I could find out that by using the value 'ATTA' (attachment) in the field RELTYPE and TYPEID_A field value was 'BKPF' and CATID_A field value was 'BO'.

I found the counter = 2 using the method COUNT_FOR_OBJECT of class CL_GOS_ATTACHMENT_QUERY, since there are two attachments in my case. In the parameter ISOBJECT, I entered the value 100018000000002006 (combination of company code, document no, fiscal year) for INSTID parameter and value 'BKPF' for TYPEID parameter and value 'BO' for CA parameter. I found out which values should be entered in the reverse way by seeing the entries in the table SRGBTBREL.

Thank you very much for your post.

Sunny

Edited by: Sunny on Mar 9, 2009 11:49 PM