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

Attachments: Read comments (Personal notes)

Former Member
0 Likes
1,150

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.

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
729

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

4 REPLIES 4
Read only

former_member194669
Active Contributor
0 Likes
730

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

Read only

0 Likes
729

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.

Read only

0 Likes
729

It´s done.

The answer is the table :SRGBTBREL

God bless the traces.

Thank you aRs.

Read only

0 Likes
729

Bad Answer To correct Question