<?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 Issues with RFC_READ_TABLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286649#M1724586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to reterive the record based upon two conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. With the Employee Number. &lt;/P&gt;&lt;P&gt;2. Last updated record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table will have more than one record for one particular Employee Number.&lt;/P&gt;&lt;P&gt;I am not sure how to specify the option to reterive only the lastupdated record (eg. Max of date).&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tOptions.Rows.Add&lt;/P&gt;&lt;P&gt;tOptions(1, "TEXT") =&amp;nbsp; "EMP = '101' AND "&lt;/P&gt;&lt;P&gt;tOptions.Rows.Add&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; text-decoration: line-through;"&gt;tOptions(1, "TEXT") =&amp;nbsp; "LAST = Max(LASTDATE)"&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Could anybody please help me how to specify the condition.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thanks in Advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Abirami&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2013 16:43:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-02-06T16:43:58Z</dc:date>
    <item>
      <title>Issues with RFC_READ_TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286649#M1724586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to reterive the record based upon two conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. With the Employee Number. &lt;/P&gt;&lt;P&gt;2. Last updated record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table will have more than one record for one particular Employee Number.&lt;/P&gt;&lt;P&gt;I am not sure how to specify the option to reterive only the lastupdated record (eg. Max of date).&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tOptions.Rows.Add&lt;/P&gt;&lt;P&gt;tOptions(1, "TEXT") =&amp;nbsp; "EMP = '101' AND "&lt;/P&gt;&lt;P&gt;tOptions.Rows.Add&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff; text-decoration: line-through;"&gt;tOptions(1, "TEXT") =&amp;nbsp; "LAST = Max(LASTDATE)"&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Could anybody please help me how to specify the condition.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thanks in Advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Abirami&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 16:43:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286649#M1724586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-06T16:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with RFC_READ_TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286650#M1724587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you need a select query?&lt;/P&gt;&lt;P&gt;IF yes.&lt;/P&gt;&lt;P&gt;_____________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from EMP_TABLE into table it_emp_tab where EMP_NO EQ '101'.&lt;/P&gt;&lt;P&gt;" Now internal table it_emp will have multiple records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort it_emp descending by last_updated_field.&lt;/P&gt;&lt;P&gt;READ it_emp into wa_emp index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not looking for select queries then please give more details about your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Bharathi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 17:11:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286650#M1724587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-06T17:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with RFC_READ_TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286651#M1724588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abirami, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table OPTIONS is meant to store WHERE clausules, I don't think you can order right there, I think you should only use Employee number, then you will get all the records corresponding to that employee, and then you can manipulate that information ( order it the way you want ) in the programming language you're using to consume that RFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;@hugo_dc &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 18:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286651#M1724588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-06T18:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with RFC_READ_TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286652#M1724589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.&amp;nbsp; That issue is resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have some other issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im taking input for the query from Excel sheet and writing back the extracted field. &lt;/P&gt;&lt;P&gt;My code is retrieving data from table only for the first record and for others its showing "INVALID FIELD"&lt;/P&gt;&lt;P&gt;Could you please help me to resolve this issue?&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;Sub CallFunctionModule()&lt;/P&gt;&lt;P&gt;Dim sap As Object&lt;/P&gt;&lt;P&gt;Dim conn As Object&lt;/P&gt;&lt;P&gt;Dim fb As Object&lt;/P&gt;&lt;P&gt;Dim tOptions As Object&lt;/P&gt;&lt;P&gt;Dim tFields As Object&lt;/P&gt;&lt;P&gt;Dim tData As Object&lt;/P&gt;&lt;P&gt;Dim RowData$()&lt;/P&gt;&lt;P&gt;Dim j, i, k, x, y As Long&lt;/P&gt;&lt;P&gt;Dim firsttime As Integer&lt;/P&gt;&lt;P&gt;Dim achange As String&lt;/P&gt;&lt;P&gt;Set sap = CreateObject("SAP.Functions")&lt;/P&gt;&lt;P&gt;Set conn = sap.Connection&lt;/P&gt;&lt;P&gt;conn.System = "xxx"&lt;/P&gt;&lt;P&gt;conn.client = "100"&lt;/P&gt;&lt;P&gt;conn.user = "ABIRAMI"&lt;/P&gt;&lt;P&gt;conn.Password = "xx"&lt;/P&gt;&lt;P&gt;conn.Language = "EN"&lt;/P&gt;&lt;P&gt;Set functionCtrl = CreateObject("SAP.Functions")&lt;/P&gt;&lt;P&gt;Set sapconnection = functionCtrl.Connection&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;If conn.logon(0, False) &amp;lt;&amp;gt; True Then&lt;/P&gt;&lt;P&gt;MsgBox "No connection to R/3!", vbOKOnly, "comment"&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For x = 2 To 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set fb = sap.Add("RFC_READ_TABLE")&lt;/P&gt;&lt;P&gt;With fb&lt;/P&gt;&lt;P&gt; .exports("QUERY_TABLE") = "TABLEDATA"&lt;/P&gt;&lt;P&gt; .exports("DELIMITER") = "|"&lt;/P&gt;&lt;P&gt;End With&lt;/P&gt;&lt;P&gt;Set tOptions = fb.tables("OPTIONS")&lt;/P&gt;&lt;P&gt;Set tFields = fb.tables("FIELDS")&lt;/P&gt;&lt;P&gt;Set tData = fb.tables("DATA")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For x = 1 to 10 &lt;/P&gt;&lt;P&gt;achange = Sheet1.Cells(x, 2).Value&lt;/P&gt;&lt;P&gt;MsgBox achange&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tOptions.Rows.Add&lt;/P&gt;&lt;P&gt;tOptions(1, "TEXT") = "AENNR = " &amp;amp; achange &amp;amp; " AND"&lt;/P&gt;&lt;P&gt;tOptions.Rows.Add&lt;/P&gt;&lt;P&gt;tOptions(2, "TEXT") = "REL_FLAG &amp;lt;&amp;gt; 'X' "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MsgBox "I am here point3"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tFields.Rows.Add&lt;/P&gt;&lt;P&gt;tFields(1, "FIELDNAME") = "BNAME"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If fb.call Then&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DE"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;j = tData.ROWCOUNT&lt;/P&gt;&lt;P&gt;MsgBox j&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If j &amp;gt; 0 Then&lt;/P&gt;&lt;P&gt;n = 14&lt;/P&gt;&lt;P&gt;k = 1&lt;/P&gt;&lt;P&gt;For i = 1 To j&lt;/P&gt;&lt;P&gt;RowData = Split(tData(i, "WA"), "|")&lt;/P&gt;&lt;P&gt;Sheet1.Cells(x, n).Value = RowData(k - 1)&lt;/P&gt;&lt;P&gt;n = n + 1&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;' MsgBox "Till Point3"&lt;/P&gt;&lt;P&gt;' MsgBox fb.Exception, vbOKOnly, "comment"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt; Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;SPAN lang="DE"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Next &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;SPAN lang="DE"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Set tFields = Nothing&lt;/P&gt;&lt;P&gt;Set tData = Nothing&lt;/P&gt;&lt;P&gt;Set tOptions = Nothing&lt;/P&gt;&lt;P&gt;Set fb = Nothing&lt;/P&gt;&lt;P&gt;conn.logoff&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;Set conn = Nothing&lt;/P&gt;&lt;P&gt;Set sap = Nothing&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;SPAN lang="DE"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN lang="DE"&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 12:12:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286652#M1724589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-07T12:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with RFC_READ_TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286653#M1724590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 11:48:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-rfc-read-table/m-p/9286653#M1724590</guid>
      <dc:creator>Sergiu</dc:creator>
      <dc:date>2013-08-28T11:48:38Z</dc:date>
    </item>
  </channel>
</rss>

