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: 

error : the IN operator with "S_EBELN" is followed neither by an itab nor by a value list

Former Member
0 Kudos

Hi gurus ( this is my first question in here )

i m trying to develop an alv program and getting an error as mentioned in the subject.

please help me.

*** program's select options is :

SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-B01.

select-options : s_ebeln for ekko-ebeln.

selection-screen skip.

parameters : p_LIFNR type EKKO-LIFNR obligatory.

SELECTION-SCREEN END OF BLOCK A1.

*** my itab definition is :

data: lt_ekko type table of ekko,

         lwa_ekko type ekko.


and the error is in the foto


1 ACCEPTED SOLUTION

Former Member
0 Kudos

If FORM get_data is in  INCLUDE zvariables, then it should be placed below INCLUDE zselection. This syntax error should go away once you do that.

The data declarations should always precede the usage of the variables

Also since the INCLUDES are independent repository objects, it is always a good idea to name them with the similar prefix as main program. Names like zvariables, zselection are too generic and will clutter the search when anyone is doing a search on abap programs

10 REPLIES 10

Former Member
0 Kudos

So, when you double click on s_ebeln are you taken to it's definition.  I'm wondering if you have included the module that contains the screen definition.

If that's not it, then you probably have a syntax error above somewhere that prevents the code from being interpreted correctly.

Neal

0 Kudos

yes i ve tried your answer and double clicked it. then it went to selection screen. i checked my code but there is not any syntax error or i cant see. thanks for your reply.

former_member188217
Active Participant
0 Kudos

Hi,

Kindly confirm if you have declared ekko structure using table statement. Also plz post the complete source code.

Thanks,

anju

0 Kudos

hi i sended my code

former_member188282
Active Participant
0 Kudos

Hi Mustafa,

Try with by giving ebeln IN s_ebeln[] and check there is tables statement with ekko.

or

check is there any error in your selection screen by commenting all the remaining code.

Thanks,

Rajesh.

0 Kudos

s_ebeln[] isnt worked. thanks for your reply.

0 Kudos

Hi MuMustafa,

Did you checked is there any error in your selection screen by commenting all the remaining code.

Thanks,

Rajesh.

Former Member
0 Kudos

my all code is in here; but i have not finished yet and working on it.

NOTE: INCLUDE zlist_form contains forms of performs. but FORM get_data is in ZVARIABLES.

REPORT  ZMM_TASERON_ICMAL.

INCLUDE zvariables.

include zselection.

INCLUDE zlist_form.

START-OF-SELECTION.

perform get_data.

perform set_lout.

perform set_fcat.

perform get_eventtable using git_events.

perform top_of_page.

perform list_data.

end-of-selection.

----------------------------------------------------------------------------------------------------------------------------------------------

*&---------------------------------------------------------------------*

*&  Include           ZSELECTION

*&---------------------------------------------------------------------*

SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-B01.

select-options : s_ebeln for ekko-ebeln.

selection-screen skip.

parameters : p_LIFNR type EKKO-LIFNR obligatory.

SELECTION-SCREEN END OF BLOCK A1.

----------------------------------------------------------------------------------------------------------------------------------------------

TYPE-POOLS : slis.

tables: ekko, ekpo, bkpf, zsp_mmt_tsr_ok, ZSP_MMS_HAKEDIS, ZMM_TTH01,

         ZMMT000027, lfa1.

types: begin of fill_tab,

         ebeln like ekko-ebeln,      "belge no

         ebelp like ekpo-ebelp,       "kalem no

         lifnr like ekko-lifnr,           "satici

         haked type ZMM_TTH01-haked,       "hakedis no

*        bedat like ebdat,

         name1 like lfa1-NAME1,

         name2 like lfa1-NAME2,

         name3 like lfa1-NAME3,

         name4 like lfa1-NAME4,

         zzpckg_no      LIKE bapiesllc-pckg_no " toplam hakedis icin

         zzline_no     LIKE bapiesllc-line_no " kullanılacak

         zzext_line    LIKE bapiesllc-ext_line,

         zzsubpckg_no  LIKE bapiesllc-subpckg_no,

         netwr like esll-netwr,

*        netwr like ZSP_MMS_HAKEDIS-netwr,  "toplam sozlesme tutari

         kdvbr like ZSP_MMS_HAKEDIS-kdvbr,

         kbetr like ZSP_MMS_HAKEDIS-kbetr,    "kdv oranı

         kbamn like ZSP_MMS_HAKEDIS-kbamn,    " kdv tutari

         wrbk2 like ZSP_MMS_HAKEDIS-wrbk2,    " malzeme kesintileri

         qsatz like ZSP_MMS_HAKEDIS-qsatz,    " stopaj oranı

         stpor like ZSP_MMS_HAKEDIS-stpor,    " stopaj tutarı

         KBET4 like ZSP_MMS_HAKEDIS-KBET4,    " nakdi teminat oranı

         KAWR4 like ZSP_MMS_HAKEDIS-KAWR4,    " nakdi teminat tutari

         damgavrg type p decimals 2,

         tevkifat type p decimals 2,          " tevkifat tut hesplanack

         end of fill_tab.

data: gt_fill type table of fill_tab,

       gwa_fill type fill_tab.

" damga vergisi icin bu kullanilacak DMGVRG alanini alinacak

data: lit_ZMMT000027 type table of ZMMT000027,

       lrd_ZMMT000027 type ref to ZMMT000027.

data: git_out type table of zmm_thak,     "alv de listelenecek

       grd_out type ref to zmm_thak.

data: lit_tab type table of ZSP_MMS_HAKEDIS,   "verilerin cekilecegi it

       lrd_tab type ref to ZSP_MMS_HAKEDIS.

data : git_fcat type table of slis_fieldcat_alv,

        grd_fcat type ref to slis_fieldcat_alv.

data : git_lout type slis_layout_alv.

data : git_events type slis_t_event,

        gwa_events like line of git_events.

data : i_varyant like disvariant,

        i_varyant1 like disvariant.

data : i_list_top_of_page type slis_t_listheader.

DATA: gt_eslh type table of eslh"Servis paketinin başlık

       gwa_eslh type eslh,

       gt_esll type table of esll"Servis paketinin satırları

       gwa_esll type esll,

       gt_essr type table of essr"Servis paketinin satırları

       gwa_essr type essr.

DATA : gv_top_hak LIKE esll-act_wert.

constants : c_color(5) type c value 'COLOR',

             c_kapak type c value 'KAPAK',

             c_rapor type c value 'RAPOR',

             c_structure type tabname value 'ZMM_THAK'.

data : v_repid like sy-repid.

*&---------------------------------------------------------------------*

*&      Form  GET_DATA

*&---------------------------------------------------------------------*

form GET_DATA .

   data: lt_ekko type table of ekko,

         lwa_ekko type ekko,

         lt_ekpo type table of ekpo,

         lwa_ekpo type ekpo,

         lt_ZMM_TTH01 type table of ZMM_TTH01, "haked : hakedis no icin

         lwa_ZMM_TTH01 type ZMM_TTH01,

         lt_lfa1 type table of lfa1,     "sirket isimleri almak icin

         lwa_lfa1 type lfa1.

   select ebeln lifnr from ekko    "belge no ve satıcı ebeln lifnr

     into corresponding fields of table lt_ekko

     where ebeln in s_ebeln and

           lifnr = p_lifnr.

   select ebeln ebelp from ekpo        " kalem numaraları

     into corresponding fields of table lt_ekpo

     for all entries in lt_ekko

     where ebeln eq lt_ekko-ebeln.

   select ebeln haked from ZMM_TTH01     "hakedis numaralari

     into corresponding fields of table lt_zmm_tth01

     for all entries in lt_ekko

     where ebeln eq lt_ekko-ebeln.

   select lifnr name1 name2 name3 name4 from lfa1   " isim alnalari

     into corresponding fields of table lt_lfa1

     for all entries in lt_ekko

     where lifnr eq lt_ekko-lifnr.

     loop at lt_ekpo into lwa_ekpo."belge, kalem ve satıcı gt_fill ye yaz

       clear gwa_fill.

       gwa_fill-ebeln = lwa_ekpo-ebeln.

       gwa_fill-ebelp = lwa_ekpo-ebelp.

       read table lt_ekko into lwa_ekko with key ebeln = lwa_ekpo-ebeln.

       gwa_fill-lifnr = lwa_ekko-ebelp.

       read table lt_zmm_tth01 into lwa_zmm_tth01

         with key ebeln = lwa_ekpo-ebeln.

       gwa_fill-haked = lwa_zmm_tth01-haked.

       append gwa_fill to gt_fill.

     endloop.

     loop at gt_fill into gwa_fill.    "name alanları doldur

       read table lt_lfa1 into lwa_lfa1 with key lifnr = gwa_fill-lifnr.

       gwa_fill-name1 = lwa_lfa1-name1.

       gwa_fill-name2 = lwa_lfa1-name2.

       gwa_fill-name3 = lwa_lfa1-name3.

       gwa_fill-name4 = lwa_lfa1-name4.

       " ZZPCKG_NO ZZLINE_NO ZZEXT_LINE ZZSUBPCKG_NO alanlarini doldur

       perform get_toplam_hakedis_tutari using gwa_fill.

       modify gt_fill from gwa_fill.

     endloop.

   SELECT * INTO TABLE GT_ESLH FROM ESLH  "servis baslik tab. doldur

        FOR ALL ENTRIES IN GT_fill

       WHERE PACKNO EQ GT_fill-ZZPCKG_NO.

   SELECT * INTO TABLE GT_ESLL FROM ESLL  " servis kalem tablo doldur

         FOR ALL ENTRIES IN GT_fill

       WHERE PACKNO EQ GT_fill-ZZPCKG_NO

         AND INTROW EQ GT_fill-ZZLINE_NO

         AND EXTROW EQ GT_fill-ZZEXT_LINE

         AND ACT_MENGE NE 0.

                                          "servis paketinin satirlari

   select * from essr into corresponding fields of table gt_essr

     for all entries in gt_fill

     where ebeln eq gt_fill-ebeln and

           ebelp eq gt_fill-ebelp.

   loop at gt_fill into gwa_fill.

     read table gt_essr into gwa_essr

                         with table key ebeln = gt_fill-ebeln

                                        ebelp = gt_fill-ebelp.

     if not gwa_essr-lblne is initial.

       read table gt_esll into gwa_esll

                          with table key PACKNO = GT_fill-ZZPCKG_NO

                                         INTROW = GT_fill-ZZLINE_NO

                                         EXTROW = GT_fill-ZZEXT_LINE.

     endif.

   endloop.

endform.                    " GET_DATA

*&---------------------------------------------------------------------*

*&      Form  GET_TOPLAM_HAKEDIS_TUTARI

*&---------------------------------------------------------------------*

*&  her ebeln icin (ESSL : tablosu) servis paketi bilgileri alinir

*&  TOPLAM HAKEDİS TUTARİNİ ALABİLMEK İCİN

*&---------------------------------------------------------------------*

form GET_TOPLAM_HAKEDIS_TUTARI  using  p_gwa_fill type gt_fill.

   data: LT_POSERVICES TYPE TABLE OF BAPIESLLC.

   call function 'BAPI_PO_GETDETAIL1'

     exporting

       purchaseorder            = p_gwa_fill-ebeln

*     ACCOUNT_ASSIGNMENT       = ' '

*     ITEM_TEXT                = ' '

*     HEADER_TEXT              = ' '

*     DELIVERY_ADDRESS         = ' '

*     VERSION                  = ' '

*     SERVICES                 = ' '

*     SERIALNUMBERS            = ' '

*     INVOICEPLAN              = ' '

*   IMPORTING

*     POHEADER                 =

*     POEXPIMPHEADER           =

    TABLES

*     RETURN                   =

*     POITEM                   =

*     POADDRDELIVERY           =

*     POSCHEDULE               =

*     POACCOUNT                =

*     POCONDHEADER             =

*     POCOND                   =

*     POLIMITS                 =

*     POCONTRACTLIMITS         =

      POSERVICES               = LT_POSERVICES

*     POSRVACCESSVALUES        =

*     POTEXTHEADER             =

*     POTEXTITEM               =

*     POEXPIMPITEM             =

*     POCOMPONENTS             =

*     POSHIPPINGEXP            =

*     POHISTORY                =

*     POHISTORY_TOTALS         =

*     POCONFIRMATION           =

*     ALLVERSIONS              =

*     POPARTNER                =

*     EXTENSIONOUT             =

*     SERIALNUMBER             =

*     INVPLANHEADER            =

*     INVPLANITEM              =

*     POHISTORY_MA             =

       .

       if sy-subrc eq 0.

         p_gwa_fill-ZZPCKG_NO  = LT_POSERVICES-PCKG_NO.

         p_gwa_fill-ZZLINE_NO  = LT_POSERVICES-LINE_NO.

         p_gwa_fill-ZZEXT_LINE = LT_POSERVICES-EXT_LINE.

         p_gwa_fill-ZZSUBPCKG_NO = LT_POSERVICES-SUBPCKG_NO.

       endif.

endform.                    " GET_TOPLAM_HAKEDIS_TUTARI

Former Member
0 Kudos

If FORM get_data is in  INCLUDE zvariables, then it should be placed below INCLUDE zselection. This syntax error should go away once you do that.

The data declarations should always precede the usage of the variables

Also since the INCLUDES are independent repository objects, it is always a good idea to name them with the similar prefix as main program. Names like zvariables, zselection are too generic and will clutter the search when anyone is doing a search on abap programs

0 Kudos

thanks Vishnu Tallapragada

that solved my problem and after that i ll be carefull for naming standarts. you are right.