Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

issue in simple select statement

Hi,

     i am not knowing where i am going wrong,i checked with entries in se11 for faglflexa, there are many records in table but i am not able to fetch,

     please check below code,and find the error where iam going wrong.

types: BEGIN OF ty_faglflexa,

        RYEAR  TYPE GJAHR,

        DOCNR  type BELNR_D,

        RLDNR  TYPE FAGL_RLDNR,

        RBUKRS TYPE BUKRS,

        RRCTY  TYPE RRCTY,

        RACCT  TYPE RACCT,

        RCNTR  TYPE KOSTL,

        PRCTR  TYPE PRCTR,

        RFAREA TYPE FKBER,

        RBUSA  TYPE GSBER,

        KOKRS  TYPE KOKRS,

        poper  TYPE POPER,

        gjahr  TYPE gJAHR,

        END OF ty_faglflexa.

data:it_faglflexa TYPE TABLE OF ty_faglflexa,

      wa_faglflexa TYPE ty_faglflexa.

TABLES :skb1,faglflexa.

SELECTION-SCREEN :BEGIN OF block b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS :S_BUKRS for FAGLFLEXA-RBUKRS ,"OBLIGATORY,"comp code

S_SAKNR for  FAGLFLEXA-RACCT,"gl account

S_POPER for FAGLFLEXA-POPER ."OBLIGATORY. "posting period

PARAMETERS :S_year type FAGLFLEXA-RYEAR ,"OBLIGATORY," fiscal year

P_RRCTY type FAGLFLEXA-RRCTY.

SELECTion-SCREEN :END OF BLOCK b1.

START-OF-SELECTION.

SELECT RYEAR DOCNR RLDNR RBUKRS RRCTY RACCT RCNTR PRCTR RFAREA RBUSA KOKRS POPER GJAHR from

faglflexa into TABLE it_faglflexa where RYEAR = S_YEAR AND rbukrs in S_BUKRS and rrcty = p_rrcty

and racct in s_saknr and poper in s_poper.

if it_faglflexa is NOT INITIAL.

  endif.

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question