<?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: Different systems- table update in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-systems-table-update/m-p/4861263#M1136707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to create a RFC? Sorry, but I am not able to get to your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For updating/creating new record in HR database: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should always update Info type using HR_INFOTYPE_OPERATION because it updates the information of the employee for the HR database not just the table. Below Code will be of help to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT t_insert INTO w_insert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_pernr = w_insert-ownnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_READ_INFOTYPE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;pernr = w_pernr&lt;/P&gt;&lt;P&gt;infty = c_infty "'0105'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;infty_tab = t_0105&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;infty_not_found = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE t_0105 INTO w_0105 WITH KEY pernr = w_insert-ownnum"#EC *&lt;/P&gt;&lt;P&gt;subty = c_subu.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE w_0105 TO w_p0105.&lt;/P&gt;&lt;P&gt;w_p0105-usrid = w_insert-lanid.&lt;/P&gt;&lt;P&gt;CLEAR w_0105.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;w_p0105-pernr = w_pernr.&lt;/P&gt;&lt;P&gt;w_p0105-usrid = w_insert-lanid.&lt;/P&gt;&lt;P&gt;w_p0105-begda = sy-datum.&lt;/P&gt;&lt;P&gt;w_fnr = 'X'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;number = w_pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_p0105-pernr = w_pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF w_fnr = 'X'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_INFOTYPE_OPERATION'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;infty = c_infty "'0105'&lt;/P&gt;&lt;P&gt;number = w_p0105-pernr&lt;/P&gt;&lt;P&gt;subtype = c_subu "'0001'&lt;/P&gt;&lt;P&gt;validityend = w_p0105-endda&lt;/P&gt;&lt;P&gt;validitybegin = w_p0105-begda&lt;/P&gt;&lt;P&gt;record = w_p0105&lt;/P&gt;&lt;P&gt;operation = c_oprn "'INS'&lt;/P&gt;&lt;P&gt;tclas = 'A'&lt;/P&gt;&lt;P&gt;dialog_mode = '0'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = w_return.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_INFOTYPE_OPERATION'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;infty = c_infty "'0105'&lt;/P&gt;&lt;P&gt;number = w_p0105-pernr&lt;/P&gt;&lt;P&gt;subtype = c_subu "'0001'&lt;/P&gt;&lt;P&gt;validityend = w_p0105-endda&lt;/P&gt;&lt;P&gt;validitybegin = w_p0105-begda&lt;/P&gt;&lt;P&gt;record = w_p0105&lt;/P&gt;&lt;P&gt;operation = 'MOD' "'MOD'&lt;/P&gt;&lt;P&gt;tclas = 'A'&lt;/P&gt;&lt;P&gt;dialog_mode = '0'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = w_return.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR w_fnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;number = w_pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jayant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2008 08:11:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-25T08:11:06Z</dc:date>
    <item>
      <title>Different systems- table update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-systems-table-update/m-p/4861262#M1136706</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 need some of the HR data, personal name, pernr etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However systems are different and I can reach the HR data directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an alternative I have created a table in system I have used and want to fill this table or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update it whenever a new entry created or entered into HR system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to do that?&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;deniz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 08:04:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-systems-table-update/m-p/4861262#M1136706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T08:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Different systems- table update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-systems-table-update/m-p/4861263#M1136707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to create a RFC? Sorry, but I am not able to get to your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For updating/creating new record in HR database: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should always update Info type using HR_INFOTYPE_OPERATION because it updates the information of the employee for the HR database not just the table. Below Code will be of help to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT t_insert INTO w_insert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_pernr = w_insert-ownnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_READ_INFOTYPE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;pernr = w_pernr&lt;/P&gt;&lt;P&gt;infty = c_infty "'0105'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;infty_tab = t_0105&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;infty_not_found = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE t_0105 INTO w_0105 WITH KEY pernr = w_insert-ownnum"#EC *&lt;/P&gt;&lt;P&gt;subty = c_subu.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE w_0105 TO w_p0105.&lt;/P&gt;&lt;P&gt;w_p0105-usrid = w_insert-lanid.&lt;/P&gt;&lt;P&gt;CLEAR w_0105.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;w_p0105-pernr = w_pernr.&lt;/P&gt;&lt;P&gt;w_p0105-usrid = w_insert-lanid.&lt;/P&gt;&lt;P&gt;w_p0105-begda = sy-datum.&lt;/P&gt;&lt;P&gt;w_fnr = 'X'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;number = w_pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_p0105-pernr = w_pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF w_fnr = 'X'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_INFOTYPE_OPERATION'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;infty = c_infty "'0105'&lt;/P&gt;&lt;P&gt;number = w_p0105-pernr&lt;/P&gt;&lt;P&gt;subtype = c_subu "'0001'&lt;/P&gt;&lt;P&gt;validityend = w_p0105-endda&lt;/P&gt;&lt;P&gt;validitybegin = w_p0105-begda&lt;/P&gt;&lt;P&gt;record = w_p0105&lt;/P&gt;&lt;P&gt;operation = c_oprn "'INS'&lt;/P&gt;&lt;P&gt;tclas = 'A'&lt;/P&gt;&lt;P&gt;dialog_mode = '0'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = w_return.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_INFOTYPE_OPERATION'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;infty = c_infty "'0105'&lt;/P&gt;&lt;P&gt;number = w_p0105-pernr&lt;/P&gt;&lt;P&gt;subtype = c_subu "'0001'&lt;/P&gt;&lt;P&gt;validityend = w_p0105-endda&lt;/P&gt;&lt;P&gt;validitybegin = w_p0105-begda&lt;/P&gt;&lt;P&gt;record = w_p0105&lt;/P&gt;&lt;P&gt;operation = 'MOD' "'MOD'&lt;/P&gt;&lt;P&gt;tclas = 'A'&lt;/P&gt;&lt;P&gt;dialog_mode = '0'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = w_return.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR w_fnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;number = w_pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jayant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 08:11:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-systems-table-update/m-p/4861263#M1136707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T08:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Different systems- table update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-systems-table-update/m-p/4861264#M1136708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jayant,&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;Assume HPX as HR system and&lt;/P&gt;&lt;P&gt;             HPY the system I have created table(Assume table as ZPERSONEL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is to enter data into or update zpersonel table from HR system,HPX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So do I have to write code at HR system or in HPY?&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;deniz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 08:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-systems-table-update/m-p/4861264#M1136708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T08:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Different systems- table update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/different-systems-table-update/m-p/4861265#M1136709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the data is in another system i.e. HPX as in your case and you want to update the table ZPERSONEL in HPY system then you need to create two RFC's one in each system for data transfer. Use MODIFY statement in HPY system to update the entries in ZPERSONEL table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jayant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 08:24:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/different-systems-table-update/m-p/4861265#M1136709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T08:24:45Z</dc:date>
    </item>
  </channel>
</rss>

