Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error during runtime

Former Member
0 Likes
430

Hello:

Error during runtime :


  SELECT OBJNR  GJAHR  KSTAR  PAROB
         WTG001 WTG002 WTG003 WTG004 WTG005 WTG006 WTG007 WTG008
         WTG009 WTG010 WTG011 WTG012 WTG013 WTG014 WTG015 WTG016
  INTO TABLE gt_coss
  FROM COSS
  WHERE LEDNR = '00'      AND "Ledger para objetos de Controlling
        GJAHR = P_anyo    AND "Ejercicio
        WRTTP = '04'      AND "Tipo de valor
        VERSN = '000'     AND "Versión
        VRGNG = 'RKL'     AND "Operación
        PAROB IN r_parob_1

"The maximum size of an SQL statement has been exceeded."

.It is because r_parob_1 has many entries. There is any way to solve this?
I have tried adding:

%_HINTS DB2 '&prefer_in_itab_opt 0&&max_blocking_factor 100&'.

:There is no Error syntaxis but It doesn't do anything

There is any way to solve this without to split internal table?

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
399

I think r_parob_1 contains unique values of Partner objects, instead of using range , you can use for all entries statement in the select.


  SELECT OBJNR  GJAHR  KSTAR  PAROB
         WTG001 WTG002 WTG003 WTG004 WTG005 WTG006 WTG007 WTG008
         WTG009 WTG010 WTG011 WTG012 WTG013 WTG014 WTG015 WTG016
  INTO TABLE gt_coss
  FROM COSS
  FOR ALL ENTRIES IN R_PAROB_1
  WHERE LEDNR = '00'      AND "Ledger para objetos de Controlling
        GJAHR = P_anyo    AND "Ejercicio
        WRTTP = '04'      AND "Tipo de valor
        VERSN = '000'     AND "Versión
        VRGNG = 'RKL'     AND "Operación
        PAROB  EQ R_PAROB_1-LOW.    " I think you don't have any value in HIGH

aRs

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
400

I think r_parob_1 contains unique values of Partner objects, instead of using range , you can use for all entries statement in the select.


  SELECT OBJNR  GJAHR  KSTAR  PAROB
         WTG001 WTG002 WTG003 WTG004 WTG005 WTG006 WTG007 WTG008
         WTG009 WTG010 WTG011 WTG012 WTG013 WTG014 WTG015 WTG016
  INTO TABLE gt_coss
  FROM COSS
  FOR ALL ENTRIES IN R_PAROB_1
  WHERE LEDNR = '00'      AND "Ledger para objetos de Controlling
        GJAHR = P_anyo    AND "Ejercicio
        WRTTP = '04'      AND "Tipo de valor
        VERSN = '000'     AND "Versión
        VRGNG = 'RKL'     AND "Operación
        PAROB  EQ R_PAROB_1-LOW.    " I think you don't have any value in HIGH

aRs

Read only

0 Likes
399

OK, I don't have any value in HIGH.

Thanks!