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

Regarding Select without Where clause

Former Member
0 Likes
5,045

Hi

we have below code for F4HELP on invoice input field.

you can see Select statement used without Where condition to fetch records from Ztable.

and deleting the duplicating records.

SCI error says,"Large table : it has no where condition. /No field of a table index in WHERE condition.

Is this potential problem?

How to handle this generally? does where condtion is must to use in Select statement.?

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_ZIVCNO-LOW.

* Search help setting of uFF62Invoice numberuFF63
  PERFORM F_F4HELP_RSTYP CHANGING S_ZIVCNO-LOW.


FORM F_F4HELP_RSTYP  CHANGING C_V_INVCNO TYPE ZGTSDE_ZIVCNO."Invoice number

  DATA:
*   Work area for Return the selected value
    WL_F4RETURN  TYPE DDSHRETVAL,
*   Internal table for Return the selected value
    TL_F4RETURN  TYPE STANDARD TABLE OF DDSHRETVAL,
*   Internal table for Processing result
    TL_INVOICE   TYPE TABLE OF TYP_INVOICE.

  SELECT ZIVCNO
  FROM   ZGTSDT01
  INTO   TABLE TL_INVOICE.

  CHECK TL_INVOICE[] IS NOT INITIAL.
  DELETE ADJACENT DUPLICATES FROM TL_INVOICE.


*  Search help is started
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      RETFIELD        = CG_FIELD_INVCNO   " Packing No
      VALUE_ORG       = CG_VALUE_S       " Value return
    TABLES
      VALUE_TAB       = TL_INVOICE       " Table of values
      RETURN_TAB      = TL_F4RETURN      " Return the selected value
    EXCEPTIONS
      PARAMETER_ERROR = 1
      NO_VALUES_FOUND = 2
      OTHERS          = 3.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,139

Since your F4 help on your selection-screen is independent, create a custom search help as suggested by Keshav.

As a suggestion Instead of,

SELECT ZIVCNO
  FROM   ZGTSDT01
  INTO   TABLE TL_INVOICE.
 
  CHECK TL_INVOICE[] IS NOT INITIAL.
  DELETE ADJACENT DUPLICATES FROM TL_INVOICE.

use,

SELECT DISTINCT(ZIVCNO)
  FROM   ZGTSDT01
  INTO   TABLE TL_INVOICE.

BR,

Suhas

Hi

we have below code for F4HELP on invoice input field.

you can see Select statement used without Where condition to fetch records from Ztable.

and deleting the duplicating records.

SCI error says,"Large table : it has no where condition. /No field of a table index in WHERE condition.

Is this potential problem?

How to handle this generally? does where condtion is must to use in Select statement.?

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_ZIVCNO-LOW.

* Search help setting of uFF62Invoice numberuFF63
  PERFORM F_F4HELP_RSTYP CHANGING S_ZIVCNO-LOW.


FORM F_F4HELP_RSTYP  CHANGING C_V_INVCNO TYPE ZGTSDE_ZIVCNO."Invoice number

  DATA:
*   Work area for Return the selected value
    WL_F4RETURN  TYPE DDSHRETVAL,
*   Internal table for Return the selected value
    TL_F4RETURN  TYPE STANDARD TABLE OF DDSHRETVAL,
*   Internal table for Processing result
    TL_INVOICE   TYPE TABLE OF TYP_INVOICE.

  SELECT ZIVCNO
  FROM   ZGTSDT01
  INTO   TABLE TL_INVOICE.

  CHECK TL_INVOICE[] IS NOT INITIAL.
  DELETE ADJACENT DUPLICATES FROM TL_INVOICE.


*  Search help is started
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      RETFIELD        = CG_FIELD_INVCNO   " Packing No
      VALUE_ORG       = CG_VALUE_S       " Value return
    TABLES
      VALUE_TAB       = TL_INVOICE       " Table of values
      RETURN_TAB      = TL_F4RETURN      " Return the selected value
    EXCEPTIONS
      PARAMETER_ERROR = 1
      NO_VALUES_FOUND = 2
      OTHERS          = 3.

2 REPLIES 2
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,139

SCi indiacates this error when there is no where clause. If your need is to eliminate this the n create a search help in SE11 and call it in your program. Check with your concerned person about this ...

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,140

Since your F4 help on your selection-screen is independent, create a custom search help as suggested by Keshav.

As a suggestion Instead of,

SELECT ZIVCNO
  FROM   ZGTSDT01
  INTO   TABLE TL_INVOICE.
 
  CHECK TL_INVOICE[] IS NOT INITIAL.
  DELETE ADJACENT DUPLICATES FROM TL_INVOICE.

use,

SELECT DISTINCT(ZIVCNO)
  FROM   ZGTSDT01
  INTO   TABLE TL_INVOICE.

BR,

Suhas