‎2008 Jul 17 8:08 PM
Could you please give me a code sample for how to use the following GOS methods?:
1) CL_GOS_ATTACHMENT_QUERY -- should return a count of attachments, notes, etc for an object
2) GOS_ATTACHMENT_LIST_POPUP -- popup the Attachment List Window (I think?)
I want to be able to add a button to the toolbar in FB03 that will appear if the object has an attachment and popup the attachment list when clicked on. Where can I find out more documentation on GOS functions?
Thanks for your help.
Points will be credited for help.
‎2008 Jul 17 8:17 PM
For checking number of attachments
i_object1-typeid = 'KNA1'.
i_object1-catid = 'BO'.
i_object1-instid = docno.
call method cl_gos_attachment_query=>count_for_object
exporting
is_object = i_object1
ip_arl = space
receiving
rt_stat = i_stat1.
read table i_stat1 into wa_stat1 index 1.
if sy-subrc eq c_0.
move wa_stat1-counter to v_attno1.
endif.
For enabling a toolbar button in FB03 , you need to find a userexit or enhancement spot to accomodate the PF status with an additional button on the basis of V_ATTNO1 (from above said variable)
a®
‎2008 Jul 17 9:17 PM