Select querry error

Hi,
while debugging values are populating for mkpftbl but not to msegtbl. can anyone suggest where i am going wrong.
if sy-batch = 'X'.
   select mblnr mjahr bldat cputm
          from mkpf
          into table mkpftbl
          where bldat eq wtoday
          and   tcode2 eq ctcode2.
else.
   select mblnr mjahr bldat cputm
          into table mkpftbl
          from mkpf
          where mblnr in mblnr
          and   mjahr in mjahr
          and   tcode2 eq ctcode2.
endif.
if not mkpftbl[] is initial.
loop at mkpftbl.
   select zeile charg matnr werks menge
          into corresponding fields of table msegtbl
          from mseg
         Appending table msegtbl
          for all entries in mkpftbl
          where mblnr eq mkpftbl-wmblnr
          and   mjahr eq mkpftbl-wmjahr
          and   bwart eq cbwart
          and   werks eq splant.
*endloop.

Hi Nihi
  Try making the changes as highlighted below:
<u><b>Declaration:</b></u>
data: begin of mkpftbl occurs 0,
        <b>wmblnr like mkpf-mblnr, "Material Document Number
        wmjahr like mkpf-mjahr, "Material Document Year
        wbldat like mkpf-bldat, "Document date in document
        wcputm like mkpf-cputm, "Time of Entry</b>
      end of mkpftbl.
data: begin of msegtbl occurs 0,
<b>        wmblnr like mseg-mblnr, "Material Document Number
        wmjahr like mseg-mjahr, "Material Document Year
        wzeile like mseg-zeile, "Item in Material Document
        wmatnr like mseg-matnr, "Material number
        wwerks like mseg-werks, "plant
        wcharg like mseg-charg, "batch number
        wmenge like mseg-menge, "Quantity
        wbldat like mkpf-bldat, "Document date in document
        wcputm like mkpf-cputm, "Time of Entry</b>
      end of msegtbl.
<u><b>Routine For Extraction:</b></u>
data: wrecord type i.
data: wtime type t.
data: wtoday type d.
move sy-datum to wtoday.
move sy-uzeit to wtime.
if wtime eq '000000'.
  wtoday = wtoday - 1.
endif.
status = 1.
if sy-batch = 'X'.
  select mblnr mjahr bldat cputm
  from mkpf
  into table mkpftbl
  where bldat eq wtoday
  and tcode2 eq ctcode2.
else.
  select mblnr mjahr bldat cputm
  into table mkpftbl
  from mkpf
  where mblnr in mblnr
  and mjahr in mjahr
  and tcode2 eq ctcode2.
endif.
if not mkpftbl[] is initial.
  select <b>mblnr mjahr zeile matnr werks charg menge</b>
  from mseg
  <b>into table msegtbl</b>
  for all entries in mkpftbl
  where mblnr eq <b>mkpftbl-wmblnr</b>
  and mjahr eq <b>mkpftbl-wmjahr</b>
  and bwart eq cbwart
  and werks eq splant.
  status = 0.
endif.
  Hope this helps you.
Kind Regards
Eswar

Similar Messages

  • On closing Photoshop CC, I am getting an error message on screen that read's "Selective Palette error: no element found at line 1. Are you able to assist with this problem?

    Can anyone shed some light on this error message I am getting upon closing Photoshop CC
    I am getting an error message on screen that read's "Selective Palette error: no element found at line 1. Are you able to assist with this problem?

    Same issue here in WI and for me it was at 6:36p CST.
    I'm changed my password, removed iCloud from my phone ... tried 3G and WIFI with no luck. I also cannot check it on my Mac or iPad. I was able to get contacts and calenders back on my phone but no mail yet.
    Did the whole Apple support thing and apparently I'm part of the 1%
    EDIT: Question: are all of you former MobileMe users as well? Just wondering because I know there were going to be some changes as they completely move MobileMe over to iCloud and drop the "extra" services. I just can't remember if it was just a single cut off date or a series of dates. THAT email is stuck in my iCloud folders.

  • Dynamic select querry in sender jdbc adapter

    Hi,
          We are working on a scenario where in we will be using different source database tables , we were trying to see if it is possible that the select querry can be made dynamic so that the same communication channel can be used for all the different source tables.
         Request all to come up with suggestions as to if this is possible.
    Thanks ,
    Pravesh Puria.

    Hi All,
    Thanks VJ for your reply.
    Let me reframe my question.
    I have multiple database instances at source side. On all instances I have same table name.
    My requirement is to poll all these instances table and fetch data.
    Do I need to create multiple sender agreements or there is a way to dynamically change the datbase name in sender Communication channel.
    Any other solution is also appreciated.
    Same is the case with JMS adapter, Multiple instances of JMS are there at source side sending similar structure data in there own queue.
    Request you to kindly response.
    Regards,
    Pravesh

  • Dynamic select querry in sender JDBC channel

    Hi,
        We are working on a scenario where we need to read data from various database tables , we were trying to see if it is possible that the select querry can be set dynamically so that the same channel can be used to read from the various tables.
        Request all to please come up with suggestions as to whether this is possible.
    Thanks ,
    Pravesh Puria.

    Hi All,
    Thanks VJ for your reply.
    Let me reframe my question.
    I have multiple database instances at source side. On all instances I have same table name.
    My requirement is to poll all these instances table and fetch data.
    Do I need to create multiple sender agreements or there is a way to dynamically change the datbase name in sender Communication channel.
    Any other solution is also appreciated.
    Same is the case with JMS adapter, Multiple instances of JMS are there at source side sending similar structure data in there own queue.
    Request you to kindly response.
    Regards,
    Pravesh

  • Problem in select querry with select option

    Hi all,
    How have a problem with the select querry, Pls correct my querry
    select opbel gpart betrw fdgrp into table lt_balance from dfkkop
                      where fdgrp in s_augrp
                        and hvorg = '5000'
                        and tvorg = '0100'.
    Thanx in advance,
    Line

    Hi
    I have tried this select querry, but I am unable to fetch the data in the internal table
    select opbel gpart betrw fdgrp into correspondiing fields of table it_balance
    from dfkkop
    where fdgrp in s_augrp
    and hvorg = '5000'
    and tvorg = '0100'.
    Can you please tell me what is wrong in this querry,
    Line

  • Select querry for hr records.

    hi all,
    i was writing a hr report to to get the employee no's based on the employment status given in the selection screen. i was using the standard screen  from PNP databse.
    but when i was giving the from and to date and the employment status . and i am using GET PERNR  to fetch the records. but it is not considering the status.
    so i wrote a select querry to check the records fetched after  GET PERNR matches with the employment status given in the selection screen. but the select querry is not working.
    SELECT SINGLE STAT2 INTO PERNR-STAT2 FROM PA0000
             WHERE PERNR = PERNR-PERNR
             AND   BEGDA GE PN-BEGDA
             AND   ENDDA LE PN-ENDDA
             AND   STAT2 IN PNPSTAT2.
          CHECK PERNR-STAT2 IN PNPSTAT2.
           IF SY-SUBRC NE 0.
             REJECT.
           ENDIF.
    so please some one give the select querry to get the records from pa0000 tables based on the date range given and the employment status given.

    Hi Praveen,
    welcome to SDN.
    Please check that did you pass
    <b>Infotypes: 0000.</b>
    in the declaration part of the statement.
    Get Pernr will consider the status then.
    Regards,
    Amit
    P.S. Please close the issue and reward points to helpful answer once Query is solved.
    Message was edited by: Amit Khare

  • "Selective palette Error..." upon quitting PS CC

    Hi.
    Am using PS CC 2014.2.2 Release.
    On quitting the software, I keep getting this box pop-up, stating ...
    Selective palette Error
    XML parsing error: "no element found" at line 1
    I have no idea what this is.
    How do i resolve this?
    Thank you.

    Platform: Mac or Win?
    Other details?
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How to make SELECT querry to work for CONVERSION EXIT

    Dear All,
    I want to select some data from from table J_1IEXCTAX , and to limit that retrieval I have WHERE clause for fields VALIDFROM and VALIDTO
    My select querry is like
    SELECT SINGLE RATE ECSRATE
                         FROM J_1IEXCTAX
                         INTO (J_1IEXCTAX-RATE,J_1IEXCTAX-ECSRATE)
                         WHERE J_1ICHID = J_1IMTCHID-J_1ICHID and
                              ( VALIDFROM LE     T_GRREC-BUDAT and                   
                                VALIDTO      GE     T_GRREC-BUDAT ).  
    But the field  VALIDFROM and VALIDTO have data (i.e. dates) in different format
    So my selection doesnt happen..
    these formats can be converted to desired format using  CONVERSION EXITs at their domain level...
    But that increases coding and worsens performance.....
    Could anybody give me some other solution?
    Thanks in advance................
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:58 AM

    Hi,
    write T_GRREC-BUDAT to gv_date as <specify the format>
    now use gv_date in ur seelct query.
    Regards,
    Nagaraj

  • Select querry using inner join

    Hi Friends,
    I need to fetch data from two tables, I used inner join but I am not able to fetch the data in some fields can any one tell me what is wrong in this select querry.
    SELECT but000~partner
             but000~name_org1
             but000~name_first
             but000~name_last
             but000~bpext
          FROM but000 INNER JOIN dfkkop ON but000partner = dfkkopgpart
        INTO table lt_but000
        WHERE but000~partner IN so_part
        AND dfkkop~faedn IN so_faedn.
    Thanx in advance,
    Parvez

    hi Lutin,
    SELECT but000~partner
    but000~name_org1
    but000~name_first
    but000~name_last
    but000~bpext
    FROM but000 INNER JOIN dfkkop ON but000partner = dfkkopgpart  <------check this condition,it has to *satisfy  both table                                                                        
    INTO table lt_but000
    WHERE but000~partner IN so_part
    AND dfkkop~faedn IN so_faedn.
    Regards,
    siva
    Message was edited by:
            SivaKumar

  • ALV Filter Selection w/ error "WBS element 0000000000000000 does not exist"

    Hello,
    In a few ALV reports, we have WBS Element column showed in ALV list and WBS Element defined as type BSEG-PROJK, which has conversion routine ABPSP.
    When WBS Element is used for ALV list Filter, in Selection screen, error message "WBS element 0000000000000000 does not exist" is pop up as we hit Enter key or click on u201CSelection optionsu201D button with no value entered in Input fields.
    We get same error even after we enter an existing WBS Element in Low selection input field and hit Enter key.
    Itu2019s ok if we enter existing WBS Element value in both Low and High selection input fields.
    We know we have workaround by entering both Low and High input field, and we can fix ALV reports by using character based WBS Element, such as PRPS-POSKI.
    BUT, as users told me, they donu2019t have this problem before and it just happened. We checked the recent Transports and couldnu2019t see anything relevant.
    Could any of you let me know if you have any clue or if thereu2019s any other way to fix it besides changing report by report.
    Thank you.
    SL

    Hello,
    In a few ALV reports, we have WBS Element column showed in ALV list and WBS Element defined as type BSEG-PROJK, which has conversion routine ABPSP.
    When WBS Element is used for ALV list Filter, in Selection screen, error message "WBS element 0000000000000000 does not exist" is pop up as we hit Enter key or click on u201CSelection optionsu201D button with no value entered in Input fields.
    We get same error even after we enter an existing WBS Element in Low selection input field and hit Enter key.
    Itu2019s ok if we enter existing WBS Element value in both Low and High selection input fields.
    We know we have workaround by entering both Low and High input field, and we can fix ALV reports by using character based WBS Element, such as PRPS-POSKI.
    BUT, as users told me, they donu2019t have this problem before and it just happened. We checked the recent Transports and couldnu2019t see anything relevant.
    Could any of you let me know if you have any clue or if thereu2019s any other way to fix it besides changing report by report.
    Thank you.
    SL

  • Select querry

    hi experts.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE it_sym FROM ismp
                           JOIN  ismitop ON ( ismpismnr = ismitopismnr )
                           JOIN  ismitpr ON ( ismpismnr = ismitprismnr )
                      WHERE  ismp~ismnr IN s_sympt.
    i am using this select querry but when the ismnr is not mensioned in any of ismitop or ismitpr but is ther e in ismp. the table it_sym is null.
    i want full join. how should i write.
    plz suggest the code.
    with regards
    ajay

    select  ismp~ismnr
            ismp~ismtp
            ismp~ismart
            ismp~objnr
            ismp~valdtfrm
            ismp~valdtto
            ismitop~opgrp
            ismitop~opcod
            ismitpr~prgrp
            ismitpr~prcod
                      from ( ismp LEFT JOIN   ismitop ON ( ismpismnr = ismitopismnr )
                                  LEFT JOIN   ismitpr ON ( ismpismnr = ismitprismnr ) )
                                                        into corresponding fields of table IT_SYM
                                                          WHERE  ismp~ismnr IN s_sympt.
    even after writing this the record has not been fetched if the data is not mainsioned in any table of corresponding ismnr.
    please help..
    ajay

  • Select querry for maximum value

    Hi,
    I want to select fields A B C D from a database table TAB using some selection criteria from selection screen, but the greatest value of A has to be selected for all unique entries of B C and D. Please suggest an appropriate select querry.
    PS: I cannot use SELECT and then DELETE ADJACENT DUPLICATES as it will effect performance in some cases.
    Regards.

    Try using aggregate function MAX with SELECT statement.
    MAX Returns the greatest value in the column determined by the database field f for the selected lines. Specifying DISTINCT does not change the result. NULL values are ignored unless all values in a column are NULL values. In this case, the result is NULL .
    Have a look at below link:
    [Select Clause|http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/select_c.htm]
    I hope it helps.
    Best Regards,
    Vibha
    Please mark all the helpful answers

  • Unable to browse OPC Server from the selected machine / Error -2147221163 occurred at GetOPCServerList.vi

    Hallo,
    I just installed LabVIEW 8.2 DSC-Module and tried to configure a OPC Client Instance. I get the Error "Unable to browse OPC Server from the selected machine / Error -2147221163 occurred at GetOPCServerList.vi". I have no OPC-Server installed, but is there no Demo-Server?
    Thank you
    Thomas

    This issue might be related to opcenum not being registered correctly. Please follow the steps explained in this document to fix this problem.
    As OPCdemo follows the OPC 1.0 standard it is not supported by the OPC client in LV DSC 8.x which supports OPC 2.0 and 3.0 servers. You can download an OPC 3.0 compliant demoserver from Matrikon.
    I hope that helps,
    Jochen Klier
    National Instruments Germany

  • Tecra s3 select bay error

    hi
    my laptop posts the error " select bay error" during boot sequence and no opical drive is showing in windows xp
    have done a full restore from the recovery partition with same result please advise thanks

    tried and still not seeing
    heres my result so far :
    downloaded and installed latest bios
    done full reinstall of windows from the recovery partition
    set bios and tried to boot from optical drive but windows boots from harddrive
    dvd opens and closes and if you insert a dvd it spins up...
    trawled the net for solutions...
    posted questions on various tek sites on net
    and contacted toshiba service agent they reply with "
    This is an issue which needs to be physically assessed in our workshop.
    We are an authorized service agent for Toshiba and we can certainly help you.
    Once we receive your machine, we book it into our diagnostic queue. Once the engineer has done the initial diagnosis, you will be quoted for the cost of any repairs needed. If you choose not to go ahead with the repair then there is a minimum service fee of $85.00 + GST, otherwise if you proceed with the quoted repair then you will pay as per the quote."

  • Getting 'variable not in select list' error after extending VO

    Hi,
    My page is based on two VO. one VO has all transient attribute(LearnerSearchCritVO) and used to capture Search Criteria, The other VO is used for query(LearnerSearchVO).
    I have exteneded LearnerSearchCritVO to add 4 new additional Transient attributes
    and LearnerSerachVO and its IMPL class to add additional where clause.
    After substitution and personalization when I am querying through page I am getting the following error -
    ## Detail 0 ##
    java.sql.SQLException: ORA-01007: variable not in select list
    The query is working fine at backend and the same thing was working fine before instance is refreshed.
    I am not able to find why this error is coming.
    please help me out to sort this issue.

    Hi All
    Sorry to bring this one up again, but I've had a bit of a look around and done as much as I can based on the information given in this and other threads on the subject.
    I'm getting the java.sql.SQLException: ORA-01007: variable not in select list error from my extended VO/substitution.
    The query is based on a view for easy editing after deployment, so could that have anything to do with it?
    Here's the query from the error message:
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement:
    SELECT * FROM (SELECT
    SSH.FULL_NAME,
    SSH.ASSIGNMENT_NUMBER,
    SSH.JOB,
    SSH.GRADE,
    SSH.ANNUALIZED_SALARY,
    SSH.CURRENCY,
    SSH.CHANGE_DATE,
    SSH.SALARY_BASIS,
    SSH.PERSON_ID,
    SSH.ASSIGNMENT_ID,
    SSH.SUPERVISOR_ID,
    SSH.LAST_CHANGE_DATE,
    SSH.PAYROLL_NAME,
    SSH.NEXT_CHANGE_DATE,
    SSH.EMPLOYEE_NUMBER,
    SSH.CWK_NUMBER,
    SSH.PERSON_TYPE,
    SSH.EFFECTIVE_DATE,
    SSH.SUPERVISOR_ASSIGNMENT_ID,
    SSH.LEGISLATIONCODE,
    SSH.MANAGER_ENABLED
    FROM XX_SAL_SUP_HRCHY_VO_V SSH) QRSLT
    WHERE (((:1 = SUPERVISOR_ID)
    AND (:2 = EFFECTIVE_DATE)
    AND (:3 = SUPERVISOR_ASSIGNMENT_ID
    OR hr_general2.supervisor_assignments_in_use = 'FALSE')))
    ORDER BY FULL_NAME
    So... What's missing?
    Any help appreciated.
    CK

Maybe you are looking for