2007 Jun 13 6:15 PM
Hello everybody.
I need to extract the personal notes attached to an employee. I mean:
Go to PB30; insert a pernr; then you have a little icon just down the tick of the transactions bar; click on the arrow and then click on "List of attachments" (Or something like that... I´m using the spanish version). Now you get a list of the attachments and you can click on one of them and read it. I need that to write them down into a SmartForm, so I need to extract them with code.
I´ve been able to input them with SO_OBJECT_INSERT and BINARY_RELATION_CREATE but I´m not able to output them.
Thanks in advance for your help.
2007 Jun 13 7:54 PM
Hi,
Please check the following method to get binary data from GOS
is_object-instid = v_bo_id.
is_object-typeid = v_botype.
is_object-catid = 'BO'.
try.
call method cl_binary_relation=>read_links_of_binrel
exporting
is_object = is_object
ip_relation = 'NOTE' " << I think it will NOTE or MESSAGE i am confused
importing
et_links = et_links.
then use
call function 'SREL_GET_NEXT_RELATIONS'
exporting
object = lo_is_object_a
ROLETYPE =
relationtype = p_reltyp
MAX_HOPS = 1
INCL_APPLRELS = ' '
EXCL_ROLES =
EXCL_RELATIONS =
tables
links = lt_links
ROLES =
APPLLINKS =
exceptions
internal_error = 1
no_logsys = 2
others = 3
if not worked then try
fm BDS_BUSINESSDOCUMENT_GET_TAB
and also check the following link.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-SendingGOSattachmentstoanemailaddress&
aRs
2007 Jun 13 7:54 PM
Hi,
Please check the following method to get binary data from GOS
is_object-instid = v_bo_id.
is_object-typeid = v_botype.
is_object-catid = 'BO'.
try.
call method cl_binary_relation=>read_links_of_binrel
exporting
is_object = is_object
ip_relation = 'NOTE' " << I think it will NOTE or MESSAGE i am confused
importing
et_links = et_links.
then use
call function 'SREL_GET_NEXT_RELATIONS'
exporting
object = lo_is_object_a
ROLETYPE =
relationtype = p_reltyp
MAX_HOPS = 1
INCL_APPLRELS = ' '
EXCL_ROLES =
EXCL_RELATIONS =
tables
links = lt_links
ROLES =
APPLLINKS =
exceptions
internal_error = 1
no_logsys = 2
others = 3
if not worked then try
fm BDS_BUSINESSDOCUMENT_GET_TAB
and also check the following link.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-SendingGOSattachmentstoanemailaddress&
aRs
2007 Jun 14 8:21 AM
Very interesting... But I need a bit more, do you mind??
In the link, you gave me a report to get an object and do whatever I want with it, but I need to get the objects attached to a PERNR. The notes of a certain person.
Can you help me?? Thank you very much.
Points in their way.
2007 Jun 14 9:54 AM
It´s done.
The answer is the table :SRGBTBREL
God bless the traces.
Thank you aRs.
2011 Aug 11 5:11 PM