Application Development 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: 

field is unknown. it is neither in one of specified tables nor defined by data statement

Former Member
0 Kudos

Hello,

I'm doing enhancement  to filter the data for the input parameters. Also I've coded implicit enhancement for the selection parameters to be displayed on standard IE05 selection screen.

Defined a block as follows in standard  program RIHEQUI20

selection selectio begin of block b1 with frame title text-099.

select-options:

                    cre_date for equi-zzcreate_date,

                    lp_pdate for equi-zzprint_date.

selection selectio end of block b1.

now to filter the data corresponding to the input in selection parameters i've explicit enhancement point in which added coded in where condition

as

zzcreate_date IN cre_date

AND zzprint_date IN lp_pdate

but error message showing the above heading

...

Solution for that....PLZ help!!

1 ACCEPTED SOLUTION

former_member201227
Active Participant
0 Kudos

Hi Sujeet,

As Peter suggested, declare your Select options in the INCLUDE 'MIOLESEL'. This include has the Selection Screen declarations and is inside the include 'MIEQUI20'.

And write your selection logic in the Include MIEQUI20. But, check whether MIEQUI20 is called in any other reports and if you need these changes for the other reports too, you can go ahead changing MIEQUI20 and MIOLESEL.

23 REPLIES 23

former_member201275
Active Contributor
0 Kudos

It menas that the data declaration, at the point that you are utilizing the variable doesn't exist. Check your declarations.

0 Kudos

Hello Sir,

the fields are included in table EQUI under CI_EQUI. is there any need to declare that variables again in program?

0 Kudos

Hi Sujeet,

Have you declared the table EQUI using TABLES statement. Otherwise, you cannot use it for defining select options.

Before your select options, declare TABLES: EQUI.

0 Kudos

Mam,

Tried to declare tables but system tells ''table already deaclared''..

and the code for filtering is in include miequi20 in enhancement section i'm implementing explicit enhancement and adding own code to where clause..

Former Member
0 Kudos

Please check below snap for details

0 Kudos

Hi Sujeet,

The Include MIEQUI20 is called before the enhancement.

You should declare your Selection parameters before this Include. That should work. Why have you commented the enhancement above "INCLUDE miequi20" statement?

0 Kudos

Hello,

declared the parameters before the include, gain same error appears as for the select query .

Former Member
0 Kudos

Hi Sujeet,

The include statement should be after your enhancement block.

0 Kudos

Hello,

declared the parameters before the include, gain same error appears as for the select query .

0 Kudos

Can you paste the code here.

0 Kudos

Hi  Sujeet,

Use     TABLES : EQUI

statement before selection screen.

will resolve issue.

0 Kudos

He said earlier that he has already declared it.

0 Kudos

Hello,

below is code for pragram RIHEQUI20...

ENHANCEMENT-POINT RIEQUI20_G6 SPOTS ES_RIEQUI20 STATIC.

*$*$-Start: RIEQUI20_G6-------------------------------------------------------------------------$*$*

ENHANCEMENT MGV_GENERATED_RIEQUI20.    "active version

START-OF-SELECTION.

ENDENHANCEMENT.

*$*$-End:   RIEQUI20_G6-------------------------------------------------------------------------$*$*

ENHANCEMENT-POINT RIEQUI20_G7 SPOTS ES_RIEQUI20.

*$*$-Start: RIEQUI20_G7-------------------------------------------------------------------------$*$*

ENHANCEMENT MGV_GENERATED_RIEQUI20.    "active version

   LOOP AT mgv_matnr_selopt_tab.

     CONCATENATE mgv_matnr_selopt_tab-name'[]' INTO

     mgv_matnr_selopt_tab-name.

     ASSIGN (mgv_matnr_selopt_tab-name) TO <mgv_matnr_selopt_conv>.

     IF sy-subrc IS INITIAL.

       CALL FUNCTION 'MGV_SELOP_AFTER_START_OF_SEL'

            EXPORTING

                 SELOPT_NAME = mgv_matnr_selopt_tab-name

            TABLES

                 RANGE       = <mgv_matnr_selopt_conv>.

     ENDIF.

   ENDLOOP.

ENDENHANCEMENT.

ENHANCEMENT ZPM_BARCODE_SCREEN_EHNANCMENT1.    "active version

*  SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

*    PARAMETERS: pa type equi-zzcreate_date.

*    SELECTION-SCREEN end of BLOCK b1.

ENDENHANCEMENT.

*$*$-End:   RIEQUI20_G7-------------------------------------------------------------------------$*$*

INCLUDE miequi20.

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Include RIEQUI20, End                                                                                                                             S

*$*$-Start: (1)---------------------------------------------------------------------------------$*$*

ENHANCEMENT ZPM_BARCODE_SCREEN_EHNANCMENT1.    "active version

*

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-099.

     select-OPTIONS:

       Cre_Date for equi-zzcreate_date,

       lp_pdate for equi-zzprint_date,

       lp_tdate for equi-zztag_date,

       lp_sdate for equi-zzscan_date,

       lp_count for equi-zzprint_no.

     SELECTION-SCREEN end of BLOCK b1.

ENDENHANCEMENT.

*$*$-End:   (1)---------------------------------------------------------------------------------$*$*


And for data to filter according to select-option , implemented an explicit enhancement in section.

code for that is in include miequi20


0 Kudos

Sujeet,

Where is the TABLES statement for EQUI declared? Is it inside the Include MIEQUI20?

Another way to declare data is:

DATA: ls_equi TYPE equi.

SELECT-OPTIONS: s_crdat     FOR      ls_equi-zzcreate_date.

Try this for all your select options values.

0 Kudos

Hello,

Tables statement is declared in include. I tried using this way but in select query i wrote where condition ...

zzcreate_date in s_crdat.

but error showing : "IN" operator with s_crdat  is followed niether by internal table nor by a value list

0 Kudos

Hi Sujeet,

When did you get this error - during Syntax check or at the time of execution? I tried the same with the below piece of code and it works.

DATA: ls_equi TYPE equi,

           lt_equi TYPE STANDARD TABLE OF equi.

*

SELECT-OPTIONS: s_equnr FOR ls_equi-equnr.

*

SELECT * FROM equi INTO TABLE lt_equi

  WHERE equnr IN s_equnr.

0 Kudos

Sujeet you need to have Tables stuff for EQUI as everyone else mentioned before using select option plus activate all include together.

Nabheet

UweFetzer_se38
Active Contributor
0 Kudos

Maybe a stupid question, but is the customer field zzcreate_date really part of EQUI? Is EQUI activated?

0 Kudos

Sir,

customer fields are included in CI_EQUI and active.

but problem its not getting filtered properly...

what can be the solutions ...?

PeterJonker
Active Contributor
0 Kudos

Try another enhancement spot like in INCLUDE MIOLESEL.

This is where the rest of the select-options have been declared as well.

You can find this include in INCLUDE MIEQUI20

UweFetzer_se38
Active Contributor
0 Kudos

It's simply the order of your statements:

first you have your INCLUDE with the SELECT statement and than you have your SELECT-OPTIONS (the data declaration). This will not work.

The SELECT-OPTIONS must be declared earlier.

former_member201227
Active Participant
0 Kudos

Hi Sujeet,

As Peter suggested, declare your Select options in the INCLUDE 'MIOLESEL'. This include has the Selection Screen declarations and is inside the include 'MIEQUI20'.

And write your selection logic in the Include MIEQUI20. But, check whether MIEQUI20 is called in any other reports and if you need these changes for the other reports too, you can go ahead changing MIEQUI20 and MIOLESEL.

0 Kudos

This message was moderated.