<?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 Delphi7 and Sql statment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delphi7-and-sql-statment/m-p/7861359#M1592990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi al Friends this is my first post, my question is simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do a select similar to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BUKRS KUNNR BELNR GJAHR BUZEI WRBTR WAERS&lt;/P&gt;&lt;P&gt;        INTO-CORRESPONDING FIELDS OF TABLE TBSID&lt;/P&gt;&lt;P&gt;        FROM BSID&lt;/P&gt;&lt;P&gt;        WHERE: KUNNR IN S_KUNNR,&lt;/P&gt;&lt;P&gt;        BUKRS = P_BUKRS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am work with ActiveXcomponent, and have this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;procedure TForm1.SAPLogonControl1Click(Sender: TObject);&lt;/P&gt;&lt;P&gt;begin&lt;/P&gt;&lt;P&gt; Connection := SAPLogoncontrol1.newConnection;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (* In some GUI-versions the username *)&lt;/P&gt;&lt;P&gt;  (* must be written in uppercase !!!  *)&lt;/P&gt;&lt;P&gt;  Connection.User := AnsiUpperCase('XXXXX'); //Ok&lt;/P&gt;&lt;P&gt;  Connection.System            := 'XXX';  //Ok&lt;/P&gt;&lt;P&gt;  Connection.Client            := '400';  //Ok&lt;/P&gt;&lt;P&gt;  Connection.ApplicationServer := '192.168.1.71';  //&lt;/P&gt;&lt;P&gt;  Connection.SystemNumber      := '44';  //Ok&lt;/P&gt;&lt;P&gt;  Connection.Password          := 'xXxXxXxX'; //Ok&lt;/P&gt;&lt;P&gt;  Connection.Language          := 'EN' ; //Ok&lt;/P&gt;&lt;P&gt;  Connection.SAPRouter         :='/H/188.122.133.22/H/';   //Ok&lt;/P&gt;&lt;P&gt;  SAPLogonControl1.Enabled     := false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if Connection.LogOn(0,true) = true then&lt;/P&gt;&lt;P&gt; (* parameter "true" : SilentLogOn *)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  begin&lt;/P&gt;&lt;P&gt;    ShowMessage('Logon O.K.');&lt;/P&gt;&lt;P&gt;    Button1.Enabled:= true;&lt;/P&gt;&lt;P&gt;  end&lt;/P&gt;&lt;P&gt;  else&lt;/P&gt;&lt;P&gt;  begin&lt;/P&gt;&lt;P&gt;    ShowMessage('Error on logon :-(((');&lt;/P&gt;&lt;P&gt;    SAPLogonControl1.Enabled:=true;&lt;/P&gt;&lt;P&gt;  end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my connection work: say me: ShowMessage('Logon O.K.');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my question is wich is the next step for execute a normal Sql statment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am interested in get all the (journalentries) accounting registers (accounting policy) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 May 2011 22:27:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-05-13T22:27:25Z</dc:date>
    <item>
      <title>Delphi7 and Sql statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delphi7-and-sql-statment/m-p/7861359#M1592990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi al Friends this is my first post, my question is simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do a select similar to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BUKRS KUNNR BELNR GJAHR BUZEI WRBTR WAERS&lt;/P&gt;&lt;P&gt;        INTO-CORRESPONDING FIELDS OF TABLE TBSID&lt;/P&gt;&lt;P&gt;        FROM BSID&lt;/P&gt;&lt;P&gt;        WHERE: KUNNR IN S_KUNNR,&lt;/P&gt;&lt;P&gt;        BUKRS = P_BUKRS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am work with ActiveXcomponent, and have this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;procedure TForm1.SAPLogonControl1Click(Sender: TObject);&lt;/P&gt;&lt;P&gt;begin&lt;/P&gt;&lt;P&gt; Connection := SAPLogoncontrol1.newConnection;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (* In some GUI-versions the username *)&lt;/P&gt;&lt;P&gt;  (* must be written in uppercase !!!  *)&lt;/P&gt;&lt;P&gt;  Connection.User := AnsiUpperCase('XXXXX'); //Ok&lt;/P&gt;&lt;P&gt;  Connection.System            := 'XXX';  //Ok&lt;/P&gt;&lt;P&gt;  Connection.Client            := '400';  //Ok&lt;/P&gt;&lt;P&gt;  Connection.ApplicationServer := '192.168.1.71';  //&lt;/P&gt;&lt;P&gt;  Connection.SystemNumber      := '44';  //Ok&lt;/P&gt;&lt;P&gt;  Connection.Password          := 'xXxXxXxX'; //Ok&lt;/P&gt;&lt;P&gt;  Connection.Language          := 'EN' ; //Ok&lt;/P&gt;&lt;P&gt;  Connection.SAPRouter         :='/H/188.122.133.22/H/';   //Ok&lt;/P&gt;&lt;P&gt;  SAPLogonControl1.Enabled     := false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if Connection.LogOn(0,true) = true then&lt;/P&gt;&lt;P&gt; (* parameter "true" : SilentLogOn *)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  begin&lt;/P&gt;&lt;P&gt;    ShowMessage('Logon O.K.');&lt;/P&gt;&lt;P&gt;    Button1.Enabled:= true;&lt;/P&gt;&lt;P&gt;  end&lt;/P&gt;&lt;P&gt;  else&lt;/P&gt;&lt;P&gt;  begin&lt;/P&gt;&lt;P&gt;    ShowMessage('Error on logon :-(((');&lt;/P&gt;&lt;P&gt;    SAPLogonControl1.Enabled:=true;&lt;/P&gt;&lt;P&gt;  end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my connection work: say me: ShowMessage('Logon O.K.');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my question is wich is the next step for execute a normal Sql statment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am interested in get all the (journalentries) accounting registers (accounting policy) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 22:27:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delphi7-and-sql-statment/m-p/7861359#M1592990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-13T22:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delphi7 and Sql statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delphi7-and-sql-statment/m-p/7861360#M1592991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i get part of the answer on /server irc.freenode.org on the cahnnel #sap by E0x i need use RFC_READ_TABLE&lt;/P&gt;&lt;P&gt;now i get the information of the table 'CSKT' with this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Funct.exports('QUERY_TABLE').value := 'CSKT';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get 70 records the value of the first record is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'200S1000000000111099991231Administracion      Administracion                          ADMINISTRACION'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i am working in this 2 things (same as the topic)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) How to Exceute a SQLstatment or similar by sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get all records from 'CSKT' table but only the Depths: 'Administracion' hot do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) how to get/extract all the table names of SAP? 'CSKT', 'AGKO', 'ANAT' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP_TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any advice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2011 06:24:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delphi7-and-sql-statment/m-p/7861360#M1592991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-17T06:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Delphi7 and Sql statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delphi7-and-sql-statment/m-p/7861361#M1592992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Call the "RFC_READ_TABLE" with OPTIONS to select specific rows that meet certain criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Query table "DD02L" for list of tables in SAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2011 20:24:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delphi7-and-sql-statment/m-p/7861361#M1592992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-17T20:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Delphi7 and Sql statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delphi7-and-sql-statment/m-p/7861362#M1592993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to Clear RFC Tables when using RFC_READ_TABLE in a loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i:=0 to 50 do&lt;/P&gt;&lt;P&gt;begin&lt;/P&gt;&lt;P&gt;  FunctDetail.exports('QUERY_TABLE').value := 'LFA1';&lt;/P&gt;&lt;P&gt;  FunctDetail.Tables.Item('FIELDS').AppendRow.Value('FIELDNAME'):='LIFNR';&lt;/P&gt;&lt;P&gt;  FunctDetail.Tables.Item('FIELDS').AppendRow.Value('FIELDNAME'):='NAME1';&lt;/P&gt;&lt;P&gt;  FunctDetail.Tables.Item( 'OPTIONS' ).AppendRow.Value( 'TEXT' ) :=  'LIFNR = '''&lt;EM&gt;Ng1.Cell[wc1LIFNR,Ng1.RowCount-1].asstring&lt;/EM&gt;'''';&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;my problem is how to clear the Table Items, the first time work, but in the next loop (when i=1) say a error. SYSTEM_FAILURE and then other error: "No connection to SAP System Available"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think the problem is each time clear the Table.Items (or reuse the items) i try for delte the items:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FunctDetail.Tables.Item(1).Delete;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FunctDetail.Tables.Item(1).Remove;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2011 02:08:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delphi7-and-sql-statment/m-p/7861362#M1592993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-20T02:08:41Z</dc:date>
    </item>
  </channel>
</rss>

