<?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: SOFFICEINTEGRATION In Background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846532#M1591458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try to explain what I am trying to achieve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As told before, I want to use the SOFFICEINTEGRATION to get some data from a &lt;EM&gt;Word&lt;/EM&gt; document which has &lt;EM&gt;form fields&lt;/EM&gt;. Like in the example report SAPRDEMO_FORM_INTERFACE where it uses the GET_DATA and SET_DATA methods of the I_OI_FORM interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the function module in an online dialog, I get all the objects created without a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when the funcion module is triggered by the BOR Document CHANGED event, &lt;/P&gt;&lt;P&gt;WF_RAISE_EVENT = 'X' in the SCMG_SP_DOCUMENT element type, the function module runs in background by the WF-BATCH user and I can't get to create the &lt;EM&gt;control&lt;/EM&gt; reference to later get the document proxy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD c_oi_container_control_creator=&amp;gt;get_container_control&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        control = control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ex_document TYPE REF TO  i_oi_document_proxy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD control-&amp;gt;get_document_proxy&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        document_type      = document_type&lt;/P&gt;&lt;P&gt;        register_container = 'X'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        document_proxy     = ex_document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD ex_document-&amp;gt;open_document_from_table     " here I get an error too&lt;/P&gt;&lt;P&gt;      ...&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        error               = error                           " CALL_NOT_FLUSHED&lt;/P&gt;&lt;P&gt;        retcode          = lt_retcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I debug the function module adding and infinite loop and accessing from the SM50 Tcode, so that I can see the background process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could get the &lt;EM&gt;Word&lt;/EM&gt; document &lt;EM&gt;form field&lt;/EM&gt; data if there was a BADI in the SCASE when the user saves the document, but I think that there is not such a BADI so I have tried to use the BOR Document CHANGED event which triggers the background process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Urtzi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 May 2011 11:23:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-05-16T11:23:31Z</dc:date>
    <item>
      <title>SOFFICEINTEGRATION In Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846526#M1591452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am implementing Office integration with templates similar to example SAPRDEMO_FORM_INTERFACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything works ok, but my problem is that I want it to run in background, activated by event CREATED of BOR DOCUMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Event is raised but I have problem with following code because container is not created in backgorund.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

CREATE OBJECT CONTAINER
            EXPORTING CONTAINER_NAME = 'CONTAINER'.

  CALL METHOD CONTROL-&amp;gt;INIT_CONTROL
                      EXPORTING R3_APPLICATION_NAME =
                                            text-BAS
                                INPLACE_ENABLED = inplace
                                INPLACE_SCROLL_DOCUMENTS = 'X'
                                PARENT = CONTAINER
                                REGISTER_ON_CLOSE_EVENT = 'X'
                                REGISTER_ON_CUSTOM_EVENT = 'X'
                                NO_FLUSH = 'X'.


  CALL METHOD CONTROL-&amp;gt;GET_DOCUMENT_PROXY
             EXPORTING DOCUMENT_TYPE = DOCUMENT_TYPE
                       REGISTER_CONTAINER = 'X'
             IMPORTING DOCUMENT_PROXY = DOCUMENT

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea about how to create control in batch mode?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Urtzi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 10:24:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846526#M1591452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-13T10:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: SOFFICEINTEGRATION In Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846527#M1591453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Office Integration requires GUI connection as it uses OLE so it won't work in background.&lt;/P&gt;&lt;P&gt;Imagine your app server is a UNIX...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 12:01:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846527#M1591453</guid>
      <dc:creator>former_member182670</dc:creator>
      <dc:date>2011-05-13T12:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: SOFFICEINTEGRATION In Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846528#M1591454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is also possible using a JAVABEAN...isn't¿?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now if it's UNIX, but it is not the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any alternative?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards.&lt;/P&gt;&lt;P&gt;Urtzi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 12:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846528#M1591454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-13T12:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: SOFFICEINTEGRATION In Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846529#M1591455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you need it for Excel?&lt;/P&gt;&lt;P&gt;If yes, I recommend abap2xlsx - &lt;A href="https://cw.sdn.sap.com/cw/groups/abap2xlsx" target="test_blank"&gt;https://cw.sdn.sap.com/cw/groups/abap2xlsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It has background capabilities.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 12:07:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846529#M1591455</guid>
      <dc:creator>former_member182670</dc:creator>
      <dc:date>2011-05-13T12:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: SOFFICEINTEGRATION In Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846530#M1591456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, it is for Word.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Urtzi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2011 06:53:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846530#M1591456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-16T06:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: SOFFICEINTEGRATION In Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846531#M1591457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Urtzi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you have said yourself, the container cannot be created in the background so the program you currently have will only work in foreground, and i for one am not clear on what is that you are doing in foreground so not able to relate that to a background process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could throw more light on your requirement and what exactly is that you are trying to achieve, i am sure you will get more helpful answers from the forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2011 08:28:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846531#M1591457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-16T08:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: SOFFICEINTEGRATION In Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846532#M1591458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try to explain what I am trying to achieve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As told before, I want to use the SOFFICEINTEGRATION to get some data from a &lt;EM&gt;Word&lt;/EM&gt; document which has &lt;EM&gt;form fields&lt;/EM&gt;. Like in the example report SAPRDEMO_FORM_INTERFACE where it uses the GET_DATA and SET_DATA methods of the I_OI_FORM interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the function module in an online dialog, I get all the objects created without a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when the funcion module is triggered by the BOR Document CHANGED event, &lt;/P&gt;&lt;P&gt;WF_RAISE_EVENT = 'X' in the SCMG_SP_DOCUMENT element type, the function module runs in background by the WF-BATCH user and I can't get to create the &lt;EM&gt;control&lt;/EM&gt; reference to later get the document proxy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD c_oi_container_control_creator=&amp;gt;get_container_control&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        control = control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ex_document TYPE REF TO  i_oi_document_proxy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD control-&amp;gt;get_document_proxy&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        document_type      = document_type&lt;/P&gt;&lt;P&gt;        register_container = 'X'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        document_proxy     = ex_document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD ex_document-&amp;gt;open_document_from_table     " here I get an error too&lt;/P&gt;&lt;P&gt;      ...&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        error               = error                           " CALL_NOT_FLUSHED&lt;/P&gt;&lt;P&gt;        retcode          = lt_retcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I debug the function module adding and infinite loop and accessing from the SM50 Tcode, so that I can see the background process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could get the &lt;EM&gt;Word&lt;/EM&gt; document &lt;EM&gt;form field&lt;/EM&gt; data if there was a BADI in the SCASE when the user saves the document, but I think that there is not such a BADI so I have tried to use the BOR Document CHANGED event which triggers the background process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Urtzi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2011 11:23:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sofficeintegration-in-background/m-p/7846532#M1591458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-16T11:23:31Z</dc:date>
    </item>
  </channel>
</rss>

