<?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: Va05 Enhancement Runtime Error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174478#M1517709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How many entries in sale_orders[]?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a database limitation to the size of an SQL statement (determined bt your basis administrators). This could be the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Aug 2010 20:21:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-02T20:21:20Z</dc:date>
    <item>
      <title>Va05 Enhancement Runtime Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174475#M1517706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear gurus i have done some enhancement in va05 below is my code in include program &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MV75AFS0_SELEKTION_AUSFUEHREN&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM TVGRT INTO TABLE itab_group WHERE SPRAS = sy-langu.
  SELECT * FROM TVKBT INTO TABLE itab_office WHERE SPRAS = sy-langu.

  CLEAR  sale_orders.

  LOOP AT postab ASSIGNING &amp;lt;wa_postab&amp;gt;.

    AT NEW vbeln.
      wa_sale_order-sign   = 'I'.
      wa_sale_order-option = 'EQ'.
      wa_sale_order-low    = &amp;lt;wa_postab&amp;gt;-vbeln.

      APPEND wa_sale_order TO sale_orders.
    ENDAT.

    READ TABLE itab_matnr with TABLE KEY matnr = &amp;lt;wa_postab&amp;gt;-matnr TRANSPORTING NO FIELDS.
    IF sy-subrc is NOT INITIAL AND &amp;lt;wa_postab&amp;gt;-matnr IS NOT INITIAL.

      wa_matnr-matnr = &amp;lt;wa_postab&amp;gt;-matnr.
      INSERT wa_matnr INTO TABLE itab_matnr .

      CLEAR material.
      material-sign   = 'I'.
      material-option = 'EQ'.
      material-low    = &amp;lt;wa_postab&amp;gt;-matnr.

      APPEND material TO materials.
    ENDIF.

  ENDLOOP.

" IM FACING PROBLEM OVER HERE. WHEN I EXECUTE VA05 WITH DATE RANGE LIKE 01012010 TO 01082010 IT GIVE DUMP.
  SELECT kdauf KDPOS sum( ERFMG ) AS ERFMG ERFME FROM mseg INTO CORRESPONDING FIELDS OF TABLE itab_mseg
    WHERE kdauf IN sale_orders[]
    AND BWART = '601'
    GROUP BY kdauf KDPOS ERFME.

  SELECT kdauf KDPOS sum( ERFMG ) AS ERFMG ERFME FROM mseg INTO CORRESPONDING FIELDS OF TABLE itab_mseg_reversal
    WHERE kdauf IN sale_orders
    AND ( BWART = '653' OR BWART = '602' )
    GROUP BY kdauf KDPOS ERFME.

  SELECT vbeln posnr bstdk fbuda INTO CORRESPONDING FIELDS OF TABLE itab_vbkd FROM vbkd
    WHERE vbeln IN sale_orders.

  SELECT vbeln posnr mwsbp FROM vbap INTO CORRESPONDING FIELDS OF TABLE itab_vbap
    WHERE vbeln IN sale_orders.

  SELECT matnr mara~matkl wgbez FROM mara INNER JOIN t023t ON mara~MATKL = t023t~MATKL
    INTO CORRESPONDING FIELDS OF TABLE itab_mara WHERE MATNR in materials AND SPRAS = sy-langu..

  LOOP AT postab ASSIGNING &amp;lt;wa_postab&amp;gt;.

  CLEAR configuration.

  "Query to Call function to receive size and length
  SELECT SINGLE cuobj FROM vbap INTO conf WHERE vbeln = &amp;lt;wa_postab&amp;gt;-vbeln AND posnr = &amp;lt;wa_postab&amp;gt;-posnr.

  " Getting Reel Size &amp;amp; Reel length of this item in sales order
  CALL FUNCTION 'VC_I_GET_CONFIGURATION'
    EXPORTING
      instance            = conf
    TABLES
      configuration       = configuration
    EXCEPTIONS
      instance_not_found  = 1
      internal_error      = 2
      no_class_allocation = 3
      instance_not_valid  = 4
      OTHERS              = 5.

  IF sy-subrc = 0.
    "read value from internal table for Size
    READ TABLE configuration INTO wa_config WITH KEY atnam = 'REELSIZE'.
    IF sy-subrc = 0.
      &amp;lt;wa_postab&amp;gt;-zzsize = wa_config-atwrt.
    ENDIF.
    "read value from internal table for Length
    READ TABLE configuration INTO wa_config WITH KEY atnam = 'LENGTH'.
    IF sy-subrc = 0.
      &amp;lt;wa_postab&amp;gt;-zzlength = wa_config-atwrt.
    ENDIF.
  ENDIF.

  READ TABLE itab_mseg WITH TABLE KEY KDAUF = &amp;lt;wa_postab&amp;gt;-vbeln KDPOS = &amp;lt;wa_postab&amp;gt;-posnr ASSIGNING &amp;lt;wa_mseg&amp;gt;.

  IF sy-subrc IS INITIAL.
    &amp;lt;wa_postab&amp;gt;-ZZLFIMG = &amp;lt;wa_mseg&amp;gt;-ERFMG.
  ENDIF.

  READ TABLE itab_mseg_reversal WITH TABLE KEY KDAUF = &amp;lt;wa_postab&amp;gt;-vbeln KDPOS = &amp;lt;wa_postab&amp;gt;-posnr ASSIGNING &amp;lt;wa_mseg&amp;gt;.

  IF sy-subrc IS INITIAL.
    &amp;lt;wa_postab&amp;gt;-ZZLFIMG = &amp;lt;wa_postab&amp;gt;-ZZLFIMG - &amp;lt;wa_mseg&amp;gt;-ERFMG.
    &amp;lt;wa_postab&amp;gt;-ZZMEINS = &amp;lt;wa_mseg&amp;gt;-ERFME.
  ENDIF.

  &amp;lt;wa_postab&amp;gt;-ZZREM = &amp;lt;wa_postab&amp;gt;-KWMENG - &amp;lt;wa_postab&amp;gt;-ZZLFIMG.

  READ TABLE itab_VBKD ASSIGNING &amp;lt;wa_vbkd&amp;gt; WITH TABLE KEY vbeln = &amp;lt;wa_postab&amp;gt;-vbeln posnr = &amp;lt;wa_postab&amp;gt;-posnr.
  IF sy-subrc IS INITIAL.
    &amp;lt;wa_postab&amp;gt;-zzbstdk = &amp;lt;wa_vbkd&amp;gt;-bstdk.
    &amp;lt;wa_postab&amp;gt;-zzfbuda = &amp;lt;wa_vbkd&amp;gt;-fbuda.
  ENDIF.

  READ TABLE itab_vbap ASSIGNING &amp;lt;wa_vbap&amp;gt; WITH TABLE KEY vbeln = &amp;lt;wa_postab&amp;gt;-vbeln posnr = &amp;lt;wa_postab&amp;gt;-posnr.
  IF sy-subrc IS INITIAL.
    &amp;lt;wa_postab&amp;gt;-ZZTAX_VALUE = &amp;lt;wa_vbap&amp;gt;-mwsbp.
    &amp;lt;wa_postab&amp;gt;-ZZAFTER_TAX = &amp;lt;wa_vbap&amp;gt;-mwsbp + &amp;lt;wa_postab&amp;gt;-netwr.
  ENDIF.

  READ TABLE itab_mara ASSIGNING &amp;lt;wa_mara&amp;gt; WITH TABLE KEY matnr = &amp;lt;wa_postab&amp;gt;-MATNR.
  IF sy-subrc IS INITIAL.
    &amp;lt;wa_postab&amp;gt;-ZZMATKL = &amp;lt;wa_mara&amp;gt;-matkl.
    &amp;lt;wa_postab&amp;gt;-ZZWGBEZ = &amp;lt;wa_mara&amp;gt;-wgbez.
  ENDIF.

  READ TABLE itab_group ASSIGNING &amp;lt;wa_group&amp;gt; WITH TABLE KEY VKGRP = &amp;lt;wa_postab&amp;gt;-VKGRP.
  IF sy-subrc IS INITIAL.
    &amp;lt;wa_postab&amp;gt;-ZZSGD = &amp;lt;wa_group&amp;gt;-BEZEI.
  ENDIF.

  READ TABLE itab_office ASSIGNING &amp;lt;wa_office&amp;gt; WITH TABLE KEY VKBUR = &amp;lt;wa_postab&amp;gt;-VKBUR.
  IF sy-subrc IS INITIAL.
    &amp;lt;wa_postab&amp;gt;-ZZSDD = &amp;lt;wa_office&amp;gt;-BEZEI.
  ENDIF.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Saad nisar&lt;/P&gt;&lt;P&gt;please Help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Saad Nisar Ahmed Khatib on Aug 2, 2010 9:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 17:53:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174475#M1517706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-02T17:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Va05 Enhancement Runtime Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174476#M1517707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're not mind readers here. Nobody will be able to help you without some details of the dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 20:12:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174476#M1517707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-02T20:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Va05 Enhancement Runtime Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174477#M1517708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
     in
    procedure "SELEKTION_AUSFUEHREN" "(FORM)", nor was it propagated by a RAISING
     clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The SQL statement generated from the SAP Open SQL statement violates a
    restriction imposed by the underlying database system of the ABAP
    system.

    Possible error causes:
     o The maximum size of an SQL statement was exceeded.
     o The statement contains too many input variables.
     o The input data requires more space than is available.
     o ...

    You can generally find details in the system log (SM21) and in the
    developer trace of the relevant work process (ST11).
    In the case of an error, current restrictions are frequently displayed
    in the developer trace.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Missing RAISING Clause in Interface
    Program                                 SAPMV75A
    Include                                 MV75AFS0_SELEKTION_AUSFUEHREN
    Row                                     9
    Module type                             (FORM)
    Module Name                             SELEKTION_AUSFUEHREN



Trigger Location of Exception
    Program                                 SAPMV75A
    Include                                 ZVA05_CONFIGURATION_FIELDS====E
    Row                                     63
    Module type                             (FORM)
    Module Name                             SELEKTION_AUSFUEHREN&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 20:15:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174477#M1517708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-02T20:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Va05 Enhancement Runtime Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174478#M1517709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How many entries in sale_orders[]?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a database limitation to the size of an SQL statement (determined bt your basis administrators). This could be the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 20:21:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174478#M1517709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-02T20:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Va05 Enhancement Runtime Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174479#M1517710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;4109 entries in sale order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to unlimit the entries?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 20:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174479#M1517710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-02T20:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Va05 Enhancement Runtime Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174480#M1517711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a database limitation so difficult to get around. When I've run into this, I've converted the SELECT to use FOR ALL ENTRIES rather than IN &lt;SPAN __jive_macro_name="RANGE"&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 20:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174480#M1517711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-02T20:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Va05 Enhancement Runtime Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174481#M1517712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my declaration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF t_matnr,
    matnr TYPE matnr,
  END OF t_matnr.

  TYPES: BEGIN OF t_mat_group,
    matnr TYPE matnr,
    MATKL TYPE MATKL,
    WGBEZ TYPE WGBEZ,
  END OF t_mat_group.


  FIELD-SYMBOLS: &amp;lt;wa_postab&amp;gt; LIKE LINE OF POSTAB, &amp;lt;wa_mseg&amp;gt; TYPE mseg, &amp;lt;wa_vbkd&amp;gt; TYPE vbkd, &amp;lt;wa_vbap&amp;gt; TYPE vbap, &amp;lt;wa_mara&amp;gt; TYPE t_mat_group,
                 &amp;lt;wa_group&amp;gt; TYPE TVGRT, &amp;lt;wa_office&amp;gt; TYPE TVKBT.

  DATA: conf LIKE vbap-cuobj, configuration TYPE TABLE OF  conf_out,
        wa_config TYPE conf_out.

  DATA: itab_mseg TYPE HASHED TABLE OF mseg WITH UNIQUE KEY KDAUF KDPOS,
        itab_mseg_reversal TYPE HASHED TABLE OF mseg WITH UNIQUE KEY KDAUF KDPOS,
        sale_orders TYPE RANGE OF mseg-kdauf,
        wa_sale_order like LINE OF sale_orders,
        materials TYPE RANGE OF mseg-matnr, material like LINE OF materials,
        itab_matnr TYPE HASHED TABLE OF t_matnr WITH UNIQUE KEY matnr, wa_matnr TYPE t_matnr,
        temp_ERFMG TYPE ERFMG,
        itab_vbkd TYPE HASHED TABLE OF vbkd WITH UNIQUE KEY vbeln posnr,
        itab_vbap TYPE HASHED TABLE OF vbap WITH UNIQUE KEY vbeln posnr,
        itab_mara TYPE HASHED TABLE OF t_mat_group WITH UNIQUE KEY matnr,
        itab_group TYPE HASHED TABLE OF TVGRT WITH UNIQUE KEY VKGRP,
        itab_office TYPE HASHED TABLE OF TVKBT WITH UNIQUE KEY VKBUR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 05:44:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/va05-enhancement-runtime-error/m-p/7174481#M1517712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-03T05:44:02Z</dc:date>
    </item>
  </channel>
</rss>

