<?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: Short dump - CX_SY_OPEN_SQL_DB in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117265#M1510610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;But would it be possible to write INTO CORRESPONDING FIELDS if APPENDING is using?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Yes, but why you are using APPENDING ? This will is used when we don't want to refresh the content of internal table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it's important to you have an internal table with only the desired fields, otherwise you will spend memory for nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define a type:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_nast,
  objky   TYPE nast-objky,
  cmfpnr TYPE nast-cmfpnr,
END of ty_nast.

DATA:
  gt_nast TYPE SORTED TABLE OF ty_nast WITH UNIQUE KEY objky,
  gs_nast TYPE ty_nast.

FIELD-SYMBOLS:  "if you use field symbols...
  &amp;lt;fs_nast&amp;gt; TYPE ty_nast.

SELECT objky cmfpnr INTO TABLE gt_nast
FOR ALL ENTRIES IN gr_objky
WHERE objky EQ gr_objky-low
  AND kschl = 'ZRIV'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About internal tables: &lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jul 2010 15:22:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-20T15:22:22Z</dc:date>
    <item>
      <title>Short dump - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117260#M1510605</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;Thanks to you I already finished my program &lt;SPAN __jive_emoticon_name="grin"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in test phase I get strange situation. For some period of time it works withour a problem. And for other it dumps with error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Runtime Errors         DBIF_RSQL_INVALID_RSQL
Exception              CX_SY_OPEN_SQL_DB&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; on this part:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* Get invoice headers for selection screen
  SELECT belnr gjahr blart bldat budat usnam tcode cpudt xblnr bukrs lifnr waers rmwwr wmwst
    FROM rbkp
    INTO CORRESPONDING FIELDS OF TABLE gt_rbkp
  WHERE belnr   IN s_belnr
    AND gjahr   IN s_gjahr
    AND blart   IN s_blart
    AND bldat   IN s_bldat
    AND budat   IN s_budat
    AND usnam   IN s_usnam
    AND cpudt   IN s_cpudt
    AND cputm   IN s_cputm
    AND xblnr   IN s_xblnr
    AND bukrs   IN s_bukrs
    AND lifnr   IN s_lifnr
    AND bktxt   IN s_bktxt
    AND ivtyp   IN gr_ivtyp
    AND rbstat  IN gr_rbstat.

* Set object key for MM invoices
  IF LINES( gt_rbkp ) IS NOT INITIAL.
    PERFORM set_objky.
* Get message status for MM invoices
    SELECT *                                                      {color:red}&amp;lt;----------{color}
       APPENDING TABLE gt_nast
       FROM nast
     WHERE objky IN gr_objky
       AND kschl = 'ZRIV'.
    SORT gt_nast BY objky erdat eruhr.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand there is problem with range size, but how to manage with no dump?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 14:14:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117260#M1510605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-20T14:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Short dump - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117261#M1510606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kbordzan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your assumption is correct, the code below can provoke this kind of dump if you have huge number of records on gr_objky. In fact the limitation is on the SQL prepared to be sent to database (it's a parameter, and for Oracle I'm guessing it's 64k):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, you must do not change the parameter but the way you are retrieving the data from:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * APPENDING TABLE gt_nast
FROM nast
WHERE objky IN gr_objky
  AND kschl = 'ZRIV'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;To (assuming that you put the object keys on value low):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF gr_objky[] IS NOT INITIAL.
  SELECT * APPENDING TABLE gt_nast
  FROM nast
  FOR ALL ENTRIES IN gr_objky
  WHERE objky EQ gr_objky-low
    AND kschl = 'ZRIV'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Fernando Da Ró&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 14:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117261#M1510606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-20T14:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Short dump - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117262#M1510607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fernando,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but using EQ gr_objky-low, will choose only one record from NAST table, against 15 for IN gr_objky.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 14:58:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117262#M1510607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-20T14:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Short dump - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117263#M1510608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you included the FOR ALL ENTRIES clause?&lt;/P&gt;&lt;P&gt;What occurred inside PERFORM set_objky?&lt;/P&gt;&lt;P&gt;Also with performance in mind, do not select * but only the fields you want use like objky, cmfpnr...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Fernando Ros on Jul 20, 2010 5:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 15:01:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117263#M1510608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-20T15:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Short dump - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117264#M1510609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My mistake, I wrongly write coding &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; Missing IF and FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt; I also add this kind of check for table CMFP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in this perform I have:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM SET_OBJKY .
  CLEAR gs_rbkp.
  CLEAR gr_objky.

  gr_objky-sign   = 'I'.
  gr_objky-option = 'EQ'.

* Object key for MM invoice
  LOOP AT gt_rbkp INTO gs_rbkp.
    CONCATENATE '$$$$' gs_rbkp-belnr gs_rbkp-gjahr '000000' INTO l_objky.
    gr_objky-low = l_objky.
    APPEND gr_objky.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But would it be possible to write INTO CORRESPONDING FIELDS if APPENDING is using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kbordzan on Jul 20, 2010 5:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 15:07:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117264#M1510609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-20T15:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Short dump - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117265#M1510610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;But would it be possible to write INTO CORRESPONDING FIELDS if APPENDING is using?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Yes, but why you are using APPENDING ? This will is used when we don't want to refresh the content of internal table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it's important to you have an internal table with only the desired fields, otherwise you will spend memory for nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define a type:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_nast,
  objky   TYPE nast-objky,
  cmfpnr TYPE nast-cmfpnr,
END of ty_nast.

DATA:
  gt_nast TYPE SORTED TABLE OF ty_nast WITH UNIQUE KEY objky,
  gs_nast TYPE ty_nast.

FIELD-SYMBOLS:  "if you use field symbols...
  &amp;lt;fs_nast&amp;gt; TYPE ty_nast.

SELECT objky cmfpnr INTO TABLE gt_nast
FOR ALL ENTRIES IN gr_objky
WHERE objky EQ gr_objky-low
  AND kschl = 'ZRIV'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About internal tables: &lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 15:22:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117265#M1510610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-20T15:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Short dump - CX_SY_OPEN_SQL_DB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117266#M1510611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I see using both is not possible.&lt;/P&gt;&lt;P&gt;But I used APPENDING because I thought that I need this when range with a lot of records is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS. But it is possible to write: APPENDING CORRESPONDING FIELDS OF TABLE &lt;SPAN __jive_emoticon_name="grin"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kbordzan on Jul 20, 2010 6:05 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 16:04:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/short-dump-cx-sy-open-sql-db/m-p/7117266#M1510611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-20T16:04:19Z</dc:date>
    </item>
  </channel>
</rss>

