<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Accessing Object Application Tool from user exit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-object-application-tool-from-user-exit/m-p/7736455#M1581419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create the note by calling the FM SO_OBJECT_INSERT in the user-exit (e.g. USEREXIT_SAVE_DOC_PREPARE) of Sales Order. You need to remember that the functionality of GOS will only be available once Sales Order is created i.e. VA02 and VA03. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* note header data
L_OBJ_DATA-OBJLA = sy-langu..
L_OBJ_DATA-OBJDES = 'Testing from user-exit'.
L_OBJ_DATA-OBJSNS = 'O'.
L_OBJ_DATA-FILE_EXT = 'TXT'.

* note content
append 'note line 1' to lt_objcont.
append 'note line 2' to lt_objcont.

* Get folder
  call function 'SO_FOLDER_ROOT_ID_GET'
       exporting
            region    = 'B'
       importing
            folder_id = folder_id
       exceptions
            others    = 1.

  call function 'SO_OBJECT_INSERT'
       exporting
            folder_id             = folder_id
            object_type           = 'RAW'
            object_hd_change      = l_obj_data
       importing
            object_id             = l_obj_id
       tables
            objhead               = lt_objhead
            objcont               = lt_objcont
       exceptions
            active_user_not_exist =   35
            folder_not_exist      =    6
            object_type_not_exist =   17
            owner_not_exist       =   22
            parameter_error       =   23
            others                = 1000.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Mar 2011 13:49:40 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2011-03-15T13:49:40Z</dc:date>
    <item>
      <title>Accessing Object Application Tool from user exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-object-application-tool-from-user-exit/m-p/7736454#M1581418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is an object application tool that shows on the sales order form that allows users to attachi files and create notes, among other things, to a sales order. The program associated with this tool is SAPLSGOSDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to use the CREATE NOTE portion of this tool to attach a note to my sales order from a user exit. I will know the title and note details at runtime and don't want the NOTE tool popping up on the screen waiting for the user to fill it out. I just want to access this tool from my user exit to create this note for a sales order behind the scenes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way programmatically to do this? Is there a simple method or function call I can make to do this or do I need to somehow call the SAPLSGOSDS program with parameters to hide the input screens, or just include a few of its include files in my program so I can instantiate the object for that and call the appropriate instance methods?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any samples would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 22:30:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-object-application-tool-from-user-exit/m-p/7736454#M1581418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-14T22:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Object Application Tool from user exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-object-application-tool-from-user-exit/m-p/7736455#M1581419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create the note by calling the FM SO_OBJECT_INSERT in the user-exit (e.g. USEREXIT_SAVE_DOC_PREPARE) of Sales Order. You need to remember that the functionality of GOS will only be available once Sales Order is created i.e. VA02 and VA03. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* note header data
L_OBJ_DATA-OBJLA = sy-langu..
L_OBJ_DATA-OBJDES = 'Testing from user-exit'.
L_OBJ_DATA-OBJSNS = 'O'.
L_OBJ_DATA-FILE_EXT = 'TXT'.

* note content
append 'note line 1' to lt_objcont.
append 'note line 2' to lt_objcont.

* Get folder
  call function 'SO_FOLDER_ROOT_ID_GET'
       exporting
            region    = 'B'
       importing
            folder_id = folder_id
       exceptions
            others    = 1.

  call function 'SO_OBJECT_INSERT'
       exporting
            folder_id             = folder_id
            object_type           = 'RAW'
            object_hd_change      = l_obj_data
       importing
            object_id             = l_obj_id
       tables
            objhead               = lt_objhead
            objcont               = lt_objcont
       exceptions
            active_user_not_exist =   35
            folder_not_exist      =    6
            object_type_not_exist =   17
            owner_not_exist       =   22
            parameter_error       =   23
            others                = 1000.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 13:49:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-object-application-tool-from-user-exit/m-p/7736455#M1581419</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2011-03-15T13:49:40Z</dc:date>
    </item>
  </channel>
</rss>

