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

Accessing GOS Functionality

Former Member
0 Likes
815

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.

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
596

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®

Read only

0 Likes
596

a®s -- Thanks for responding so quickly.