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

How to create notes to XD03 in background program

Former Member
0 Likes
1,008

Hi all,

I have to write a program to create notes in XD03. I have used FM 'SGOS_NOTE_CREATE' and it did create notes because I can display it using FM "SGOS_NOTE_DISPLAY". However, those notes I created using FM 'SGOS_NOTE_CREATE' don't show up in XD03. Anyone has any idea? Also, do you know what I fill in to ls_object-objkey and ls_object-objtype.

Thanks,

Charles

1 ACCEPTED SOLUTION
Read only

gokul_radhakrishnan3
Active Participant
0 Likes
830

The following may help you. You can use this instead of the function module to create the NOTE. Check the where used list to check about ES_LPOR & LS_ATTACHMENT.

    TRY.

        CALL METHOD cl_binary_relation=>create_link

          EXPORTING

            is_object_a            = es_lpor

            is_object_b            = ls_attachment

            ip_reltype             = 'NOTE'.

      CATCH cx_obl_internal_error cx_obl_model_error.

    ENDTRY.

With regards,

Gokul

Hi all,

I have to write a program to create notes in XD03. I have used FM 'SGOS_NOTE_CREATE' and it did create notes because I can display it using FM "SGOS_NOTE_DISPLAY". However, those notes I created using FM 'SGOS_NOTE_CREATE' don't show up in XD03. Anyone has any idea? Also, do you know what I fill in to ls_object-objkey and ls_object-objtype.

Thanks,

Charles

3 REPLIES 3
Read only

Former Member
0 Likes
830

This message was moderated.

Read only

gokul_radhakrishnan3
Active Participant
0 Likes
831

The following may help you. You can use this instead of the function module to create the NOTE. Check the where used list to check about ES_LPOR & LS_ATTACHMENT.

    TRY.

        CALL METHOD cl_binary_relation=>create_link

          EXPORTING

            is_object_a            = es_lpor

            is_object_b            = ls_attachment

            ip_reltype             = 'NOTE'.

      CATCH cx_obl_internal_error cx_obl_model_error.

    ENDTRY.

With regards,

Gokul

Read only

0 Likes
830

Hi Gokul,

I tried yours and looks like it worked the same way as my FMs. I finally figured out the issue was I used wrong Object Type. The small place really took long time.

Charles