12-30-2005 9:50 AM
Hi everyone,
I have to add a pushbutton on a QM notification screen, to hilight wether or not attachments are available for notification header / tasks. The pushbutton and the attachment list are no problem but I need to check first if any attachments are available for the notification. I tried to use the method Check_Available of cl_gos_attachment_list but this always seems to return 'X' as result. Does anyone have another solution or tell me where I can find the sap table in which the attachments are stored ?
You'd make a desperate man very happy !
Thanks in advance for you answers...
Cheers
Christof Desmet.
12-30-2005 11:04 AM
Hello Christof,
It's just like Raja said. I will just complete the code a bit more with an example of mine:
CALL METHOD cl_gos_attachment_query=>count_for_object
EXPORTING
is_object = object
ip_arl = space
RECEIVING
rt_stat = lt_stat.
READ TABLE lt_stat INDEX 1 into ls_stat.
count = ls_stat-counter.
The object has to be a concatenation of your document, like this:
CONCATENATE object-instid tab-gjahr INTO object-instid.
ELSE.
CONCATENATE tab-bukrs tab-belnr tab-gjahr INTO
object-instid.
ENDIF.
MOVE 'BKPF' TO object-typeid.
MOVE 'BO' TO object-catid.
I hope this helped.
Regards,
Nuno
12-30-2005 10:12 AM
Hi Desmet,
The class you had used is marked obsolete.
Did you try the class CL_ATTACHMENT_LIST ?
You can even try method READ_ATTACHMENT of class CL_HRRCF_ATTACHMENTS.
Regards,
Raj
Message was edited by: Rajasekhar Dinavahi
12-30-2005 10:16 AM
welcome to SDN.
you can use
CL_GOS_ATTACHMENT_QUERY=>COUNT_FOR_OBJECT
and pass
is_object-instid = "key of the object"
is_object-typeid = "class"
is_object-catid = "BO"
Regards
Raja
12-30-2005 1:07 PM
07-19-2007 4:26 PM
Friends,
We have a custom Transaction for which we have activated the GOS icon on the screen. We have that icon and we care able to save the document to the Content repository fine.
The issue is immediately after attaching the documents, if you use the
" Attachment list" option from the GOS menu, it brings the attached documents.
But if you leave the transaction and get in for the same document, the same function is not working.
Kindly pl throw in your ideas on this issue.
Thanks
Vinodh Balakrishnan
12-30-2005 11:04 AM
Hello Christof,
It's just like Raja said. I will just complete the code a bit more with an example of mine:
CALL METHOD cl_gos_attachment_query=>count_for_object
EXPORTING
is_object = object
ip_arl = space
RECEIVING
rt_stat = lt_stat.
READ TABLE lt_stat INDEX 1 into ls_stat.
count = ls_stat-counter.
The object has to be a concatenation of your document, like this:
CONCATENATE object-instid tab-gjahr INTO object-instid.
ELSE.
CONCATENATE tab-bukrs tab-belnr tab-gjahr INTO
object-instid.
ENDIF.
MOVE 'BKPF' TO object-typeid.
MOVE 'BO' TO object-catid.
I hope this helped.
Regards,
Nuno
12-30-2005 1:06 PM