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

Reading personal notes from generic object service

Former Member
0 Likes
1,090

Hi all,

I'd like to access the personal notes of a BOR object and read their content into an internal table. How can I determine the notes of an object and read their content? I didn't see any suitable methods in the classes such as CL_GOS_DOCUMENT_SERVICE. Thanks for any help!

Stefan

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
927

use the following code to get the personal note details of a object

ls_relopt-sign = 'I'.

ls_relopt-option = 'EQ'.

ls_relopt-low = 'PNOT'.

append ls_relopt to lt_relopt.

try.

call method cl_binary_relation=>read_links_of_binrels

exporting

is_object = ls_object

ip_logsys = lp_logsys

it_relation_options = lt_relopt

ip_role = 'GOSAPPLOBJ' "#EC NOTEXT

importing

et_links = lt_links

.

catch cx_obl_parameter_error .

catch cx_obl_internal_error .

catch cx_obl_model_error .

endtry.

Regards

Raja

use the following code to get the personal note details of a object

ls_relopt-sign = 'I'.

ls_relopt-option = 'EQ'.

ls_relopt-low = 'PNOT'.

append ls_relopt to lt_relopt.

try.

call method cl_binary_relation=>read_links_of_binrels

exporting

is_object = ls_object

ip_logsys = lp_logsys

it_relation_options = lt_relopt

ip_role = 'GOSAPPLOBJ' "#EC NOTEXT

importing

et_links = lt_links

.

catch cx_obl_parameter_error .

catch cx_obl_internal_error .

catch cx_obl_model_error .

endtry.

Regards

Raja

3 REPLIES 3
Read only

Former Member
0 Likes
927

Function Module Read_text can be used to read notes of a text object.

CALL FUNCTION 'READ_TEXT'

EXPORTING OBJECT = SELECTIONS-TDOBJECT

NAME = SELECTIONS-TDNAME

ID = SELECTIONS-TDID

LANGUAGE = SELECTIONS-TDSPRAS

IMPORTING HEADER = THEAD

TABLES LINES = LINES

EXCEPTIONS OTHERS = 1.

You can find object, text name and id of personal notes by viewing "Menu->Header Info" of personal notes.

Read only

athavanraja
Active Contributor
0 Likes
928

use the following code to get the personal note details of a object

ls_relopt-sign = 'I'.

ls_relopt-option = 'EQ'.

ls_relopt-low = 'PNOT'.

append ls_relopt to lt_relopt.

try.

call method cl_binary_relation=>read_links_of_binrels

exporting

is_object = ls_object

ip_logsys = lp_logsys

it_relation_options = lt_relopt

ip_role = 'GOSAPPLOBJ' "#EC NOTEXT

importing

et_links = lt_links

.

catch cx_obl_parameter_error .

catch cx_obl_internal_error .

catch cx_obl_model_error .

endtry.

Regards

Raja

Read only

0 Likes
927

It worked, thank you very much!

After method cl_binary_relation=>read_links_of_binrels, I called function module SO_OBJECT_READ.