Selecting fields uisng joins

Hi friends ,
can any one find my runtime error
types :
    begin of ty_first,
      mandt type mkpf-mandt,
      mblnr type mkpf-mblnr,
      mjahr type mkpf-mjahr,
      budat type mkpf-budat,
      xabln type mkpf-xabln,
      bukrs type mseg-bukrs,
      bwart type mseg-bwart,
      bwtar type mseg-bwtar,
      charg type mseg-charg,
      ebeln type mseg-ebeln,
      ebelp type mseg-ebelp,
      lgort type mseg-lgort,
      lifnr type mseg-lifnr,
      matnr type mseg-matnr,
      meins type mseg-meins,
      menge type mseg-menge,
      nplnr type mseg-nplnr,
      vkwrt type mseg-vkwrt,
      waers type mseg-waers,
      werks type mseg-werks,
    end of ty_first,
data :
    it_first  type standard table of ty_first,
    wa_first type ty_first.
   select mkpf~mandt
          mkpf~mblnr
          mkpf~mjahr
          mkpf~budat
          mkpf~xabln
          mseg~bukrs
          mseg~bwart
          mseg~bwtar
          mseg~charg
          mseg~ebeln
          mseg~ebelp
          mseg~lgort
          mseg~lifnr
          mseg~matnr
          mseg~meins
          mseg~menge
          mseg~nplnr
          mseg~vkwrt
          mseg~waers
          mseg~werks
          into table it_first
from mkpf inner join mseg
on mkpfmandt = msegmandt and mkpfmblnr = msegmblnr
                           and mkpfmjahr = msegmjahr
                     where MKPF~BUDAT in S_BUDAT AND
                           BWART =  c_mov101 or
                           BWART =  c_mov102 or
                           BWART =  c_mov105 or
                           BWART =  c_mov106.
when iam executing its showing me the follwoing run time error as
To few fields in into clause.
can any one check it.
Regards,
Priyanka

change the code to this..
REPORT  ztets.
TYPES :
BEGIN OF ty_first,
mandt TYPE mkpf-mandt,
mblnr TYPE mkpf-mblnr,
mjahr TYPE mkpf-mjahr,
budat TYPE mkpf-budat,
xabln TYPE mkpf-xabln,
bukrs TYPE mseg-bukrs,
bwart TYPE mseg-bwart,
bwtar TYPE mseg-bwtar,
charg TYPE mseg-charg,
ebeln TYPE mseg-ebeln,
ebelp TYPE mseg-ebelp,
lgort TYPE mseg-lgort,
lifnr TYPE mseg-lifnr,
matnr TYPE mseg-matnr,
meins TYPE mseg-meins,
menge TYPE mseg-menge,
nplnr TYPE mseg-nplnr,
vkwrt TYPE mseg-vkwrt,
waers TYPE mseg-waers,
werks TYPE mseg-werks,
END OF ty_first.
tables: mkpf.
data :
it_first TYPE STANDARD TABLE OF ty_first,
wa_first TYPE ty_first.
select-options: s_budat for mkpf-budat.
SELECT mkpf~mandt
mkpf~mblnr
mkpf~mjahr
mkpf~budat
mkpf~xabln
mseg~bukrs
mseg~bwart
mseg~bwtar
mseg~charg
mseg~ebeln
mseg~ebelp
mseg~lgort
mseg~lifnr
mseg~matnr
mseg~meins
mseg~menge
mseg~nplnr
mseg~vkwrt
mseg~waers
mseg~werks
INTO TABLE it_first
FROM mkpf INNER JOIN mseg
ON mkpf~mandt = mseg~mandt AND mkpf~mblnr = mseg~mblnr
AND mkpf~mjahr = mseg~mjahr
WHERE mkpf~budat IN s_budat AND
bwart = '101' OR
bwart = '102' OR
bwart = '105' OR
bwart = '106' ).
break-point.

Similar Messages

  • Code order in sq02, Problem in the selection fields in sq01

    Hi all,
    I'm writing a query with sq01 and sq02.
    In sq02 I have some joined tables, and 2 extras fields named: "TIME" and "LEFT_ER".
    in this fields I wrote a code to calculate something from fields in the tables.
    The problem is:
    1. When I write the code in the coding section "Additional field/structure" for each field, If I want to use this fields in the selection fields (in sq01) the query can't find any record.
    But if I run this query without any selection in this fields, I get all the records, with my calculated fields.
    2. I tried to write this code in the coding section "Record processing", and it seems that I can use this fields in the selection fields (in sq01), and get all the records I wanted.
    But in the sq02 I get a Warning messages:
    "Access error in code for additional field *GET******
    *GET****** has sequence number 00
    Access to LEFT_ER with sequence number 00"
    In this case my field LEFT_ER has no code.
    And when I change the order of the sequence number, I didn't get the Warning message, but I could not use my fields in the selection fields (in sq01), like at the beginning.
    HELP ME PLEASE.
    Itzhak.
    Message was edited by: Itzhak Tanami

    Hi,
    i've an idea .
    pls define your help-fields :
    1) as sel-option : s_f1 for bseg-dmbtr
    and
    2) as calculate-field  : c_f1 for bseg-dmbtr
    so for event e.g. GET BSEG .
    you <b>1st</b> calculate your field .
    e.g.
    if bseg-shkzg = 'H'.
       c_f1 = Bseg-wrbtr * -1.
      else.
       c_f1 = Bseg-wrbtr.
    endif.
    and 2nd  your restriction from sel-screen:
    <b>check c_f1 in s_f1.</b>
    good luck
    Andreas

  • Infoset/query : how to fix a selection field value?

    I am writing queries with SQ01 and designing Infosets with SQ02.
    I have to restrict the results of a query to a specific plant.
    This can be done by adding the plant field in the selection screen of the query and by asking the users to fill always the same fixed  plant number when the query is started. Another solution is to filter the output.
    Isnt it possible to simplify this by forcing the plant number in the initialization of the Infoset values without display of this field in the selection screen? This value has to be initialized before the table containing the Plant field is joined to the other tables?

    Open SQ01 transaction,give your query name, click on infoset query button.
    On the right side of the screen you can define default values for those fields.
    If you want to disable the same field in selection creteria then open your infoset in SQ02
    transaction and click change, click on extras buttonin appllication tool bar,on right hand side
    in code tab you can add your logic.

  • Select Query using Joins

    Hi,
    Please give me the Select query
    I have to fetch   EBELN,BUKRS,LIFNR,BSART,EKORG,EKGRP,WAERS,WKURS  from EKKO and
                          EBELP,LGORT,MATKL ,WERKS,BEDNR,IDNLF,BPRME,NETPR   from EKPO and
                         MENGE, SAKTO,AUFNR,ANLN1,GSBER,PS_PSP_PNR                from EKKN and
                         LPEIN,EINDT,SLFDT,                                                                    from EKET.
    I have to fetch all the data into an single internal table(Mandatory) by a select query using Joins.
    EKKO is having EBELN as primary key
    EKPO is having EBELN,EBELP as primary key
    EKKN is having EBELN,EBELP as primary key
    EKET is having EBELN,EBELP as primary key
    Can anybody Please give me the Select query.
    With Regards
    Ajay

    Hi ,
    I am sending this sample coed for the Inner joins .Hope this will help you:
    Inner joins using 3 tables 
    Try this :-
    SELECT stpostlnr stpoidnrk mastmatnr maramtart stpo~menge 
    INTO CORRESPONDING FIELDS OF TABLE zmat1 FROM mast 
    JOIN stpo ON stpostlnr = maststlnr 
    JOIN mara ON maramatnr = mastmatnr 
    WHERE stpostlty = 'M' "AND stpoidnrk IN s_matnr 
    AND mast~werks = 1000. 
    Here s_matnr is a select-options on the selection-screen. 
    Or this. 
    Code: 
         Select single VbrkBukrs VbrkKunrg    Vbrk~Vbeln 
                       VbrkFkdat VbrkBstnk_Vf Vbrk~Zterm 
                       Tvzbt~Vtext 
                       VbakVbeln VbakBstdk 
                       LikpVbeln Likplfdat    Likp~Lfuhr 
           into w_vbrk 
           from vbrk 
          inner join       Tvzbt on TvzbtZterm        = VbrkZterm      and 
                                    Tvzbt~Spras        = sy-langu 
          Inner join       Vbfa  as SalesLnk 
                                 on SalesLnk~vbeln     = pu_vbeln        and 
                                    SalesLnk~vbtyp_v   = c_order 
                inner join Vbak  on VbakVbeln           = SalesLnkVbelv
          Inner join       Vbfa  as DeliveryLnk 
                                 on DeliveryLnk~vbeln   = pu_vbeln       and 
                                    DeliveryLnk~vbtyp_v = c_Delivery 
                inner join Likp  on LikpVbeln          = DeliveryLnkVbelv 
          where vbrk~vbeln = pu_Vbeln. 
    This code locates sales, delivery and payment terms info from a billing document number. 
    or
    Here, this one also works fine :
    select zfpcdcadivi zfpcdproforma zfpcdfactura zfpcdaniofactura 
    zfpcdmontousd zfpcdmontoap zfpcdebeln zfpcdinco1 
    zfpcdlifnr lfa1name1 zcdvsstatus zfpcdconint 
    into it_lista 
    from zfpcd inner join zcdvs 
    on zfpcdebeln = zcdvsebeln 
    and zfpcdproforma = zcdvsproforma 
    and zfpcdlifnr = zcdvslifnr 
    inner join lfa1 
    on zfpcdlifnr = lfa1lifnr 
    where zcdvs~status = '04'. 
    Also Here is another solution that just uses inner joins:
    SELECT vbakvbeln vbfaerdat INTO (itab-vbeln, itab-wadat)
    FROM ( vbak INNER JOIN vbap
    ON vbapvbeln = vbakvbeln )
    INNER JOIN vbfa ON vbakvbeln = vbfavbelv
    WHERE vbak~kunnr = m_wm AND
    vbak~vbtyp = 'C' AND
    vbfa~erdat IN s_date AND
    vbap~matnr = 'MZ1807F' AND
    vbfaposnv = vbapposnr AND
    vbfa~vbtyp_n = 'J'.
    <REMOVED BY MODERATOR>
    Cheers,
    Chandra Sekhar.
    Edited by: Alvaro Tejada Galindo on Apr 10, 2008 5:20 PM

  • Is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?

    is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?

    No

  • How to get multiple selected fields in list

    Hello all,
    I am trying to get multiple selected value from a list but i dont know how to get multiple selected fields from a list though AS3.
    Actually i want to pass the selected fields to php, so for that i need to get the selections and send to php.
    Thankx..

    i want to put the selected fields of list in an array through AS3....
    actually......i figured it out how to do that...........
    Its simple......use
    list.selectedItems[index]
    and to get the number of items selected......
    list.selectedItems.length
    simple.....

  • Is it possible to display only dynamically selected fields in the out put?

    Is it possible to display only dynamically selected fields in the out put? i need to display set of columns in the selection criteria, but in the output i have display only input given fields. because i need to convert it into .csv file. So i have to display selected fields from internal table. In oracle they are using"execute immediate". is there any equivalent in SAP?
    thanks in advance.

    Hi Remya,
    Are you talking about dynamic programming in ABAP ?
    If yes, there are concepts like RTTS which facilitates it.
    Yes, the select query also supports dynamic selection of fields. ( Please care about ( ) in dynamic sql ).
    Do more research on Field Symbols and statements like ASSIGN COMPONENT OF.
    Regards,
    Philip.

  • How can I enforce automatic spell checking for selected fields of data entered by form users?

    I'd like to be able to enforce spell checking of selected fields in the forms that I've created using LiveCycle Designer 8.2 at run time, as opposed to design time.  I understand the version LCD 8 has a nifty new spell checker for form designers.  But I want to spell check the data entered by users using Acrobat Reader.  And I want to enforce the spell checking automatically on selected fields only.
    Presently it seems that users filling in my forms, must know how to manually right-click on each field and select "Spell Check" from the resulting dialog box in order to check for spelling errors in the data the user has entered in the form.
    I would like to discover a way to enforce spell checking in selected fields, just as I am able to do in forms created using Acrobat Pro.  In Acrobat Pro, I can set a property for each field to require spell checking.  but that feature seems to be missing in Livecycle Designer.
    I've check the Object model for XFA forms hoping that I might find a method I can call with a Javascript, to check spelling based on an event such as onBlur.  But I haven't found a spell check method.
    Am I missing something simple?  Is there a way to set each field to be spell checked when a user is filling in the form using the free Acrobat Reader?
    Our users are not sophisticated and requiring them to spell check each field separately just won't cut it...
    Any help on this will be greatly appreciated.
    Thanks!
    -David Bartholomew

    Hi David,
    Two things...
    At design time set the locale of the form to one that Acrobat spell checks. For example English (US) and English (UK) locales have spell checkers; however English (Ireland) does not. Check the Warnings tab to see if spell checking is supported for your locale.
    If your form locale supports spell checking then you can go to the button script below.
    If you form locale does NOT support spell checking then Stephanie has a great work around to force spell checking (http://forums.adobe.com/message/2233945#2233945).
    Bring a regular button onto the form and in the click event have the following:
    app.execMenuItem("Spelling:Check Spelling");
    Which will open the spell checker for all fields.  Thanks to Paul for extracting all of the accessible menu items (http://forums.adobe.com/message/1912914#1912914).
    Good luck,
    Niall

  • Problem with selection fields in SAP Quick Viewer

    Hi Friends
    I am using SQVI t-code to develop the SAP queries. I have developed a query using tables KNA1, VBAK and VBAP. Initially I used customer number, customer name, city, document creation data, document type and document number as selection fields. Now I have removed customer name, city, document creation data, document type from selection fields.  I am executing this query through a Function module "RSAQ_REMOTE_QUERY_CALL". While passing the data to selection table, even after deleting the 4 selection fields, still I have to pass the sales document number positioning as 6. Is there any way to solve this and make its position as 2.
    I have gone through the FM "RSAQ_IMPORT_QUERY", there one table parameter O_DBSE will retrieve the values for selection fields are designed for that query, again its tedious process, I have create a customized function module and make the required changes. Instead of using this FM, is there any table which stores the data of the selection fields of a query. I have tried for the table and I failed to find that.
    Please help me in this regards
    Regards
    Praveen

    Hello, I am trying to create LSMW to upload KP06 also, we have been uploading by copying and pasting once we run the iverview layout and then save. The problem is that we can only do this by G/L account. We want to use one file to upload all. Can you give me some tips how you were able to accomplished. I am familiar with LSMW, but tcode KP06 behaves in different ways. Do you use the flexible upload to load the fiel thru LSMW? Can you tell me which fields you touch in KP06 when you were recording?
    Thanks You,

  • How to hide selection fields when using logical database PNP

    hi.
    i m using a logical database PNP and report catagory 1PY_DEF in my program.
    but when i execute it , it shows to selection box. one name is period and second is selections.
    but i just want to show only period box selection fields , not the selection box fields.
    how it iz possible.

    HI,
    In my case i haved used the PNP logical database..in the selection box i don't wnat to display Contorling area,Cost Center & Organizational Unit. i have written this code to hide those fields..
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name CS 'PNPKOKRS' OR
           screen-name CS 'PNPKOSTL' OR
           screen-name CS 'PNPORGEH'.
          screen-active = '0'.
          screen-invisible = '1'.
          MODIFY SCREEN.
          CLEAR screen.
        ENDIF.
      ENDLOOP.
    Try modify hide the total block instead of individual fields in that block.

  • Customizing user selection fields of Logical database PNP

    Dear Gurus,
    I had made a z-copy of payslip program for incorporation of Logo. Now we need to put this report in Enterprise Portal (EP). Now since we would not want any user to view any other person's payslip, I need to disable the selection field (PERNR) for user selection.
    Problem is this field for user selection is coming from standard Logical Database (LDB - PNP) used in the program. So how can I make this field hardcoded as sy-uname and non-modifiable without making z-copy of LDB-PNP.
    Also I wish to harcode Payroll Area writing some code (from table PA000) but again I cannot write this in std. PNP LDB and writing it in driver program will not help.
    Thanks in advance.
    Regards,
    Amit

    Write the highlighted coding in initialization ...
    initialization .
    select single pernr from pa0105
           into pernr-pernr
           where usrid = sy-uname.
    if sy-subrc = 0.
      PNPPERNR-sign = 'I'.
      PNPPERNR-option = 'EQ'.
      PNPPERNR-LOW = pernr-pernr.
      Append PNPPERNR.
    endif.
    loop at screen.
    if screen-name = 'PNPPERNR-LOW' or
    screen-name = 'PNPPERNR-HIGH'.
    screen-input = '0'.
    endif.
    modify screen.
    endloop.
    at selection-screen output.
    loop at screen.
    if screen-name = 'PNPPERNR-LOW' or
    screen-name = 'PNPPERNR-HIGH'.
    screen-input = '0'.
    endif.
    modify screen.
    endloop.

  • Selection Field in Report Painter Report

    Dear All,
    Could any one tell me the procedure to add new field at selection screen for the report painter report ? To change the report painter selection screen i have to change the Report group or Report of the report group?
    Thank in stack

    In general data selection, i have already cost center, but it is not apprearing at selection screen. Only three field are appearing (Year + Period + Forecast),  and i want to add cost center at the selection screen. How to make cost center field at selection field from General data selection option. Please guide me
    Thank in stack
    Nilesh Shete

  • Settinf selection fields in Report painter

    hi,
    i need to know how to select fields in report painter as selection fields or input fields?
    i just have an idea of library where we select fields.
    but how to select selection screen fields?

    hiiii 
    refer to following link..it will help you for report painter
    http://www.virtuosollc.com/PDF/Get_Reporter.pdf
    regards
    twinkal

  • In a query, for the selection field 'KNB1-ZWELS' a match-code isn't availab

    Hi All,
    Creating a query, for the selection field 'KNB1-ZWELS' a match-code isn't available.
    Could anyone tell me the reason?
    Thanks
    Gandalf

    Hi,
    Match Code Object is not available for the field ZWELS. If required, You need to contact a Developer for creating one .

  • Is there a way to import a choice list in multiple (or single) selection fields?

    Is there a way to import a previously created choice list in multiple (or single) selection fields in forms central? 

    Hello Dr. Ryan,
    Unfortunately there is no way to move this data into FormsCentral.
    As far as your question about using PDFs with FormsCentral, 'soon' is actually 'now'! You have two options:
    1) Author a new form with FormsCentral. From the distribute tab, save a submission-enabled PDF form. You can send this form out to your recipients and their responses will be collected on FormsCentral.
    2) Import an exsiting PDF form into FormsCentral from the dashboard, and then submission-enable it. Distribute the submission-enabled version and responses will be collected on FormsCentral.
    Thanks!
    Shannon

Maybe you are looking for

  • Sun sparc Solaris 10 patches for Oracle E-Business Suit 11.5.10.2 + 10g R2

    Hi Experts, Please note that we have SUN SOLARIS 10 64-bit Operating system Installed on our Server. I would like to setup the E-Business Suit 11.5.10.2 with 10gR2. I would like to know the patches required for the solaris 10 os to support the EBS 11

  • How to assign SMB storage to CSV in HV failover cluster?

    I have a Hyper-V Cluster that looks like this: Clustered-Hyper-V-Diagram 2012 R2 Failover Cluster 2 Hyper-V nodes iSCSI Disk Witness on isolated "Cluster Only" Network "Cluster and Client" Network with nic-team connectivity to 2012 R2 File Server Sha

  • Process control workflow issue with Approvers

    Hello Experts In PCW, after creating a shopping cart i dont see the work item in the approvers work list. Can you please tell me how where to check out this / debug this problem. Thanks in Advance.

  • Sharing Data control Frame

    Guys, I have a issue with sharing data control frame. I have a search page. From the search results, if the users clicks on a result row, i have to open a NEW TAB providing details of the row. So everytime the user can go back to search tab, and clic

  • HT4489 Importing .vcf vCard to iCloud problems

    I am trying to copy my contacts list onto iCloud from Hotmail.  I exported it from Hotmail as .csv, converted it to vCard .vcf and tried to upload to iCloud, but got an error message saying I was exceeding size limits.  My contacts list is only 750 e