<?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: Help with Update task in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172304#M1371977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, we can try to achieve the functionality by using the bgRFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the method GET_UNIT_STATE  to get the State of the Unit and wait until, the method retruns &lt;/P&gt;&lt;P&gt;IF_BGRFC_CLIENT=&amp;gt;UNIT_STATE_EXECUTED. Use caution, it might go in endless loop, if the Unit encouters some error while processing.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/0a/78534269a81218e10000000a155106/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/0a/78534269a81218e10000000a155106/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'Z_TEST' IN BACKGROUND UNIT l_unit
  EXPORTING
    iv_matid = lv_matid
    iv_maktx = lv_maktx
    iv_langu = lv_langu .
 
COMMIT WORK.

" call method GET_UNIT_STATE and wait logic here...
 
select * from zupdate into corresponding fields OF TABLE lt_product.
&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;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Naimesh Patel on Sep 24, 2009 10:46 AM - Added COMMIT WORK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2009 15:32:15 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2009-09-24T15:32:15Z</dc:date>
    <item>
      <title>Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172291#M1371964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the below am trying to update a custom table using a call function in update task. I dont see the table getting updated can someone take a look at it and let me knw what the problem is? I have the commit work statement and also marked the function module as an update one in the attribute. Please help me . Thanks in advance! kathy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;  Include           ZINBOUND_TEST
*&amp;amp;---------------------------------------------------------------------*
Report: ZINBOUND_TEST.
DATA: l_dest     TYPE REF TO if_bgrfc_destination_inbound,
      l_unit     TYPE REF TO if_trfc_unit_inbound,
      l_inb_dest TYPE bgrfc_main_i_dst,
      lv_matid TYPE /sapapo/matid,
      lv_matnr TYPE /sapapo/matnr,
      lv_maktx type /SAPAPO/MAKTX,
      lv_langu  TYPE LANGU.

data: lt_product type  STANDARD TABLE OF ZUPDATE,
      ls_product type ZUPDATE.

lv_matid = '123'.
lv_langu = 'E'.
lv_maktx = 'Materia1'.


CALL FUNCTION 'Z_TEST' IN UPDATE TASK
  EXPORTING
    iv_matid = lv_matid
    iv_maktx = lv_maktx
    iv_langu = lv_langu .

COMMIT WORK.

select * from zupdate into corresponding fields OF TABLE lt_product.
if sy-subrc &amp;lt;&amp;gt; 0.
  write 'no records added'.
else.
  loop at lt_product into ls_product.

    write: / ls_product-MATID,
             ls_product-MAKTX.

  endloop.
endif.


FUNCTION Z_TEST.
*"----------------------------------------------------------------------
*"*"Update Function Module:
*"
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(IV_MATID) TYPE  /SAPAPO/MATID
*"     VALUE(IV_MAKTX) TYPE  /SAPAPO/MAKTX
*"     VALUE(IV_LANGU) TYPE  LANGU
*"----------------------------------------------------------------------
data: itab type standard table of zupdate,

wa_itab type zupdate.

wa_itab-matid = iv_matid.
wa_itab-maktx = iv_maktx.
wa_itab-langu = iv_langu.

append wa_itab to itab.
update zupdate from table itab .

ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Edited by: ka reddy on Sep 24, 2009 4:14 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ka reddy on Sep 24, 2009 4:15 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ka reddy on Sep 24, 2009 4:16 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ka reddy on Sep 24, 2009 4:17 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ka reddy on Sep 24, 2009 4:21 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 14:14:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172291#M1371964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T14:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172292#M1371965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess what you are trying to do in your code is Synchronous type of RFC. You call the FM to save the data in RFC and as soon as it finishes, you do the select to find out if database was updated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bgRFC has more advanatages over the aRFC, qRFC, tRFC scenarios. Check this document: &lt;A href="http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0401ea9-0be5-2910-b389-ce9675ab8af9" target="test_blank"&gt;http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0401ea9-0be5-2910-b389-ce9675ab8af9&lt;/A&gt;&lt;/P&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>Thu, 24 Sep 2009 14:27:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172292#M1371965</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-09-24T14:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172293#M1371966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Use COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 14:28:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172293#M1371966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T14:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172294#M1371967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kathy - please check the help on UPDATE and MODIFY. In this case, I think you want to use MODIFY instead of UPDATE in your FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 14:31:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172294#M1371967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T14:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172295#M1371968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actual question was about the Background RFC. While I was answering the question, questioner has changed it and made it for Update Task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Moderators: This should not be ALLOWED.&lt;/P&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>Thu, 24 Sep 2009 14:36:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172295#M1371968</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-09-24T14:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172296#M1371969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Modify and update both didnt work. Is there something that am missing. &lt;/P&gt;&lt;P&gt;As far as i knw when it sees the commmit work it should excecute the FM but since the processing of the main prgm is not intrepreted the output should be 0 records and then the update to the table should have occured . Is it right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Commit work and wait also doesnt work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ka reddy on Sep 24, 2009 4:42 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 14:42:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172296#M1371969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T14:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172297#M1371970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nalmesh I had doubts on both update and BGRFC but i thought i would get the update clarified first and then switch to BGRFC. Sorry for the inconvience.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 14:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172297#M1371970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T14:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172298#M1371971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Actual question was about the Background RFC. While I was answering the question, questioner has changed it and made it for Update Task.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; @Moderators: This should not be ALLOWED.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards,&lt;/P&gt;&lt;P&gt;&amp;gt; Naimesh Patel&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;True - but hard to enforce short of locking or deleting. Kathy had asked an earlier question that I had locked because not enough research had been done. This shows more research so I didn't want to take action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 14:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172298#M1371971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T14:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172299#M1371972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;COMMIT WORK AND WAIT will stop the program exection until it finishes the High Priority Update Task type V1.&lt;/P&gt;&lt;P&gt;Check this help:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4dda79e11d1950f0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4dda79e11d1950f0000e82de14a/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To set your update FM as the high priority, you should use Update with immediate start or Update w. imm. start, no restart in the Update type specification of your FM.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4daa79e11d1950f0000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4daa79e11d1950f0000e82de14a/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'Z_TEST' IN UPDATE TASK
  EXPORTING
    iv_matid = lv_matid
    iv_maktx = lv_maktx
    iv_langu = lv_langu .
 
COMMIT WORK AND WAIT.  "&amp;lt;&amp;lt;
 
select * from zupdate into corresponding fields OF TABLE lt_product.
&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>Thu, 24 Sep 2009 14:53:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172299#M1371972</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-09-24T14:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172300#M1371973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks naimesh. It worked.&lt;/P&gt;&lt;P&gt;Now my second question is how can i use the advantage of BGRFC in the code above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 14:59:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172300#M1371973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T14:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172301#M1371974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update Task and RFC both are different techniques used for different purposes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you might have realized that, Update Task is used to start the Asynchronous update of the database in the SAME client. This way system will execute the database update as its convience and user of the Update Task doesn't have to wait. You can make this update call as the Synchronous by using the COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas the RFC is used to perform certain activities, it might be Data Selection, Data Updation, Data manipulation on the same system or on the other System. There were 5 different types of RFC's till Netweaver 7 EP1. &lt;A href="https://www.sdn.sap.com/irj/sdn/abap?rid=/library/uuid/f078394a-4469-2910-c4bf-853c75674694" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/abap?rid=/library/uuid/f078394a-4469-2910-c4bf-853c75674694&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To overcome certain difficulties while doing aRFC, tRFC or qRFC (no sRFC) SAP has introduced the bgRFC from Netweaver 7 EP1. You can find the link of bgRFC in my first response. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would recommonde reading both documents before diving into bgRFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also find certaiin examples of bgRFC here in docupedia:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cw.sdn.sap.com/cw/docs/DOC-38369" target="test_blank"&gt;https://cw.sdn.sap.com/cw/docs/DOC-38369&lt;/A&gt;&lt;/P&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>Thu, 24 Sep 2009 15:08:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172301#M1371974</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-09-24T15:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172302#M1371975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see that one advantage of using BGRFC over update task is that we can create multiple independent LUW without closing the earlier one using commit work. Not quite sure how to implement this? Kindly help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 15:11:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172302#M1371975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T15:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172303#M1371976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Naimesh thanks for the reply. yeah i read that document way before and i started taking a stab at implementing it.&lt;/P&gt;&lt;P&gt;I started with update task to see how it behaves and then wanted to go with BGRFC tats when i had the update issue.&lt;/P&gt;&lt;P&gt;Now that am done with update i want to implement BGRFC. &lt;/P&gt;&lt;P&gt;I have modified the earlier prgm...Can you give me some ideas how to extend this? Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;  Include           ZBGRFC_INBOUND_TEST
*&amp;amp;---------------------------------------------------------------------*
Report: ZBGRFC_INBOUND_TEST.
DATA: l_dest     TYPE REF TO if_bgrfc_destination_inbound,
      l_unit     TYPE REF TO if_trfc_unit_inbound,
      l_inb_dest TYPE bgrfc_main_i_dst,
      lv_matid TYPE /sapapo/matid,
      lv_matnr TYPE /sapapo/matnr,
      lv_maktx type /SAPAPO/MAKTX,
      lv_matid1 TYPE /sapapo/matid,
      lv_matnr1 TYPE /sapapo/matnr,
      lv_maktx1 type /SAPAPO/MAKTX,
      lv_langu1  TYPE LANGU,
      lv_langu  TYPE LANGU.

data: lt_product type  STANDARD TABLE OF ZUPDATE,
      ls_product type ZUPDATE.

lv_matid = '125'.
lv_langu = 'E'.
lv_maktx = 'Materia3'.


**--Get the inbound destination for BGRFC.
  IF l_inb_dest IS INITIAL.
      SELECT SINGLE * FROM bgrfc_main_i_dst INTO l_inb_dest.
    ENDIF.
    l_dest = cl_bgrfc_destination_inbound=&amp;gt;create( l_inb_dest-destination ).
    l_unit = l_dest-&amp;gt;create_trfc_unit( ).

CALL FUNCTION 'Z_TEST' IN BACKGROUND UNIT l_unit
  EXPORTING
    iv_matid = lv_matid
    iv_maktx = lv_maktx
    iv_langu = lv_langu .


select * from zupdate into corresponding fields OF TABLE lt_product.
if sy-subrc &amp;lt;&amp;gt; 0.
  write 'no records added'.
else.
  loop at lt_product into ls_product.

    write: / ls_product-MATID,
             ls_product-MAKTX.

  endloop.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ka reddy on Sep 24, 2009 5:16 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 15:15:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172303#M1371976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T15:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Update task</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172304#M1371977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, we can try to achieve the functionality by using the bgRFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the method GET_UNIT_STATE  to get the State of the Unit and wait until, the method retruns &lt;/P&gt;&lt;P&gt;IF_BGRFC_CLIENT=&amp;gt;UNIT_STATE_EXECUTED. Use caution, it might go in endless loop, if the Unit encouters some error while processing.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/0a/78534269a81218e10000000a155106/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/0a/78534269a81218e10000000a155106/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'Z_TEST' IN BACKGROUND UNIT l_unit
  EXPORTING
    iv_matid = lv_matid
    iv_maktx = lv_maktx
    iv_langu = lv_langu .
 
COMMIT WORK.

" call method GET_UNIT_STATE and wait logic here...
 
select * from zupdate into corresponding fields OF TABLE lt_product.
&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;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Naimesh Patel on Sep 24, 2009 10:46 AM - Added COMMIT WORK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 15:32:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-update-task/m-p/6172304#M1371977</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-09-24T15:32:15Z</dc:date>
    </item>
  </channel>
</rss>

