Divide two counts giving an error

I've a query in the following structure where im trying to divide in the select statement like this:
SELECT cnt1/ cnt2
FROM (SELECT count(*) cnt1, col1, col2
FROM emp),
(SELECT COUNT(*) cnt2, col1, col2
FROM all_tables);
How can i bring in additional fields from emp or all_tables (i.e col1 and col2)? I can get the divide calculation done but not able to get the other two fields in the main select statement as it gives me following error. These two columns col1 and col2 are there in both the tables.
00904. 00000 - "%s: invalid identifier"
Edited by: 1010059 on Jun 5, 2013 12:53 PM

Hi,
Welcome to the forum!
1010059 wrote:
I've a query in the following structure where im trying to divide in the select statement like this:
SELECT cnt1/ cnt2
FROM (SELECT count(*) cnt1, col1, col2
FROM emp),
(SELECT COUNT(*) cnt2, col1, col2
FROM all_tables);
How can i bring in additional fields from emp or all_tables (i.e col1 and col2)? I can get the divide calculation done but not able to get the other two fields in the main select statement as it gives me an error.How do you want to bring those columns in? I can't picture what the results would look like, or what you might want to achieve.
Whenever you have a problem, please post CREATE TABLE and INSERT statements for a little sample data, and the exact results you want from that data.
When you use an aggregate function, such as COUNT, the output of the query will contain 1 row for every group as defined by the GROUP BY clause. If there is no GROUP BY clause, the output will have 1 row.
You probably have hundreds of rows in all_tables, but even if you had only 2 or 3 rows, what would you want to display in the last 2 columns on the 1 row that the sub-query produces? The same goes for the sub-query on emp.
Take a few minutes to read the forum FAQ {message:id=9360002} It shows lots of ways to get better replies faster on this forum.

Similar Messages

  • PLSQL table Count giving NO_DATA_FOUND Error

    Hi Everyone,
    I am having a Associative array define below :
    TYPE SchQryRecTyp IS RECORD (
    load_port port_call.lcn_code%type
    , load_call port_call.call%type
    , dsch_port port_call.lcn_code%type
    , dsch_call port_call.call%type
    , vsl_code port_call.vsl_code%type
    , vsl_name vsl.vsl_name%type
    , voy_code port_call.voy_code%type
    , line_code port_call.line_code%type
    , etd port_call.etd%type
    , eta port_call.eta%type
    , transit_tm number
    , load_area_uid area_master_rly.area_uid%type
    , load_port_qry port_call.lcn_code%type
    , dsch_area_uid area_master_rly.area_uid%type
    , dsch_port_qry port_call.lcn_code%type
    , flag varchar2(4)
    , inact_flg varchar2(1)
    , final_or_doc_lock varchar2(1)
    TYPE SchQry_Tab_Typ IS TABLE OF SchQryRecTyp
    INDEX BY BINARY_INTEGER;
    1 ) Now in my code I am polulating the the PLSQL table SchQry_Tab_Typ and
    2) based on that PLSQL table data I am again trying to Fetch some other data.
    But I came accross a problem which i am mentioning below :
    When i am trying to perform the task (2) I am running a Loop i.e.
    IF vroute2.COUNT > 0 THEN
    FOR a IN 1..vroute2.COUNT LOOP
    -- dbms_output.put_line(vroute2(a).vsl_code); **--(But while accessing the value it is giving ORA-01403 - No Data Found )*
    END LOOP;
    END IF;
    But when i changed the loop like this
    IF vroute2.COUNT > 0 THEN
    FOR a IN vroute2.FIRST..vroute2.LAST LOOP
    -- dbms_output.put_line(vroute2(a).vsl_code); **--(Program executed successfully)*
    END LOOP;
    END IF;
    Can anybody help me if they have experienced such problem and the reason for this ?

    Wrong forum!
    Please mark this question ANSWERED and repost it in the SQL and PL/SQL forum.
    PL/SQL
    When you post provide your 4 digit Oracle version.

  • I have purchased three different audiobooks over the last two months and none will download. It keeps giving me error 3259. What is wrong?

    I have purchased three different audiobooks and none of them will download. It keeps giving me error 3259. It will let me download tv shows no problem. What is the problem?

    <after three tries, decided that it's just not worth responding to>

  • Hi I am using an iphone 4 and its was working fine.  Presently its giving browsing error.  Whenever I am trying to browse internet by using safari or any other browser it retruns with "server not responding" Can somebody give me a solution for this ?

    Hi I am using an iphone 4 and its was working fine.  Presently its giving browsing error.  Whenever I am trying to browse internet by using safari or any other browser it retruns with an error message "server not responding" Even the same thing is happening with youtube also. The worst part is am able to check my mails, able to chat and so on... only thing not able to browse through the browser.  I have tried restore option also.  This is happening with both Wlan and Data con. too
    Please help...

    I do not really know much about this kind of problem, but i may be your internet connection.
    If you are on your own #G network then:
    Go to Settings > then enable "Airplane Mode". Count to 10 and then disable it.
    Then wait patiently until you get a good connection and then try again.
    If you are on a nearby Wi-Fi connection then:
    Go to Settings > Wi-Fi > then disable then enable after counting to 10. Make sure that you are connected and then try again.
    If all else fails, then you need to contact your provider for assistance.
    Sprint:888-211-4727
    AT&T:?
    Verizon:?

  • How can I implement a get method that lets me divide two values, Help plz

    I need to implement a method that divides the values return by two other methods but I keep getting an error message, I think its divide by zero error ( I am not too sure on the exact error msg as I do not have java installed on this pc as yet), here is my example,
    I have two get methods that take an int value so say
    getValueOne() as method one
    getValueTwo() as method two
    Now I have a third method that does the following,
    Public int getValueThree() {
    int value =0;
    value = (getValueOne() / getValueTwo())
    return value;
    I am not two sure on the exact code but it does something like this and I get an error. Could someone please guide me how I can successfully implement a get method that divides two values that are returned by two methods.
    Thanks,
    Zub

    Hi, thanks for your reply. Right, how can I go about to throw an exception? I can definitely give the exact code and error message tomorrow when I can access my home pc.
    And you are right there are some values that are zero! I am not very sure what throwing an exception means to be honest. Could you please give an example?
    Thanks...

  • Synchroniz​ing two counter frequency inputs with multiple analog inputs

    Hello all,
    I'm fairly new to LabVIEW and I'm trying to collec​t data from multiple sources with synchronized tim​ing on the acquisition but I'm having trouble figu​ring it out. My problem is that I've got two count​er frequency inputs, one optical tachometer readin​g one pulse per revolution, and a max machinery fl​ow meter with a k factor of 12000. I can't seem to​ figure out how to sync the timing with my multiple analog inputs. I've be​en attempting to get the tachometer  to sync with ​the analog inputs first by following the example l​inked here. (https://decibel.ni.com/content/docs/DOC-10785) So far each time I run it I either get a timeout e​rror on the DAQmx read or a "Multiple sample clock​ pulses were detected" error (see attached image).  It seems if I slow the sampling rate way down to ​say 10 hz and ensure that the tachometer signal is​ over 800-1000 RPM (13-17 Hz) before starting the VI then the program will run without errors until ​the RPM drops below that threshold then the "Multi​ple sample clock pulses" error occurs.  The code is attached below.
    Does anyone know of a more effective way of syncin​g counter frequency inputs with analog inputs?  I'd like to have a VI that can show 0 RPM (and ev​entually 0 flow as well, but I think I need to fig​ure out the timing of one counter before I add ano​ther as it seems I can't have two counters in the ​same task). Any help on this would be greatly appr​eciated.
    LabVIEW version 13.0
    cDAQ-9178 Chassis with NI 9401 for the two counter inputs and NI 9205 for the analog inputs.
    Thanks!
    Richard
    Solved!
    Go to Solution.
    Attachments:
    SimpleDAQ.vi ‏44 KB
    LV_Error.JPG ‏31 KB

    Maybe third times the charm? 
    So I've finally got a good handle on why the VI is having problems at low RPM though I'm somewhat embarassed how long it took me to do that
    Because I have the counter time synced to my Analog input task if it doesn't see at least two pulses between the two clock pulses set by the analog input task I get the -201314 "Multiple sample clock pulses" error. This seems fine at first as it just sets a minimum RPM that I can measure and it's well below the area I'm interested in so no problems there.  I tried a simple error handler that would clear the error when it happend assuming the loop would keep iterating until the RPM went above that minimum at which point I would get a signal again. This is not the case, the read function just continues to spit out the -201314 error even after the RPM is back in the readable range. So then I tried adding two case structures so that when the error occured it would stop the task, clear the error, and then start the task again on the next loop iteration (Code Attached). This also doesn't work as the error shows up again on the stop task and then AGAIN on the start task on the next loop iteration. It seems this error is not actually being cleared and once it happens it stays with the task regardless of what the error cluster is carrying. 
    Anyone have any ideas?  The only solution I can think of is to just clear all tasks and recreate them each loop iteration until the RPM is readable again but that strikes me as a horribly clunky solution.
    Richard 
    Attachments:
    SimpleDAQ_1_Start Stop.vi ‏48 KB

  • How can I resolve Exception : "Count Field Incorrect" error

    Hi all,
    I am experiencing with "Count Field incorrect" error. What's wrong with it? How can I resolve it?
    This error is occured at UPDATE function of SQL. My JSP page is to update the old record.
    Sometimes, "Update statement error" message appear. These two problems I always confusing.
    What are the possible point of these error in my Java file and JSP page? I use package import to JSP Page.
    Pls help me.
    With thanks,

    Thanks,
    Your URLs help me exectly. But after I have changed my code, the error is changed to "Too Few Parameters : Expected 35". What's wrong with it? The following is my code.
    try {                                                                                                                                                                                                                
    String DRIVER = ("sun.jdbc.odbc.JdbcOdbcDriver");               
    String URL = "jdbc:odbc:Industrial_One_DSN";
    String sql = "UPDATE BusinessRegistration " +
    "SET [Date] = ?, ISIC = ?, BizName = ?, BizAddress = ?, " +
    "OwnerName = ?, OwnerNRC = ?, Investment = ?, EstablishedYear = ?, " +
    "L_Male = ?, L_Female = ?, F_Male = ?, F_Female = ?, " +
    "OwnershipType = ?, Remarks = ?, IndustialZoneName = ?, Unit = ?, " +
    "Fuel = ?, FactoryType = ?, FactoryName = ?, Township = ? " +
    "MainProductName = ?, MainProductCountType = ?, " +
    "MainProductQuantity = ?, MainProductValue = ?, RMName = ?, " +
    "RMCountType = ?, RMQuantity = ?, RMValue = ?, EnergyName = ?, " +
    "MachinePower = ?, AmountGallon = ?, StateDiv = ?, BizSize = ?  " +
    "WHERE RegistrationID = ?";
    Class.forName(DRIVER);
    Connection con = DriverManager.getConnection(URL);
    PreparedStatement pstmt = con.prepareStatement(sql);
    int ilmale = Integer.parseInt(lmale);
    int ilfemale = Integer.parseInt(lfemale);
    int ifmale = Integer.parseInt(fmale);
    int iffemale = Integer.parseInt(ffemale);
    int impq = Integer.parseInt(mpq);
    int impv = Integer.parseInt(mpv);
    int irmq = Integer.parseInt(rmq);
    int irmv = Integer.parseInt(rmv);
    int iamountgallon = Integer.parseInt(amountgallon);
    pstmt.setString(1, date);
    pstmt.setString(2, isic);
    pstmt.setString(3, bizname);
    pstmt.setString(4, bizaddress);
    pstmt.setString(5, ownername);
    pstmt.setString(6, ownernrc);
    pstmt.setString(7, investment);
    pstmt.setString(8, eyear);
    pstmt.setInt(9, ilmale);
    pstmt.setInt(10, ilfemale);
    pstmt.setInt(11, ifmale);
    pstmt.setInt(12, iffemale);
    pstmt.setString(13, ownershiptype);
    pstmt.setString(14, remark);
    pstmt.setString(15, izn);
    pstmt.setString(16, unit);
    pstmt.setString(17, fuel);
    pstmt.setString(18, ft);
    pstmt.setString(19, fname);
    pstmt.setString(20, township);
    pstmt.setString(21, mpn);
    pstmt.setString(22, mpct);
    pstmt.setInt(23, impq);               
    pstmt.setInt(24, impv);
    pstmt.setString(25, rmname);
    pstmt.setString(26, rmct);
    pstmt.setInt(27, irmq);
    pstmt.setInt(28, irmv);
    pstmt.setString(29, ename);
    pstmt.setString(30, mpower);
    pstmt.setInt(31, iamountgallon);
    pstmt.setString(32, statediv);
    pstmt.setString(33, bizsize);
    pstmt.setInt(34, Integer.parseInt(rid));
    pstmt.executeUpdate();
    }I have got 35 fields in my db. But i wanna edit 34 fields only. I have no primary key in my table. Is't alright?
    pls keep on helping me.
    With thanks,
    WTDAHL

  • ORA-03106: fatal two-task communication protocol error

    Hello everyone,
    we have a problem with one of our table.
    the problem occurs when i execute
    SQL> select * from t;
    select * from t
    ERROR at line 1:
    ORA-03106: fatal two-task communication protocol error
    but i can access the data by giving the column names for the whole table.
    also there is nothing wrong with the other tables in the schema.
    many thanx in advance

    first of all thanx in advance
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Productio
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> select comp_id, version, status from dba_registry;
    COMP_ID VERSION STATUS
    CATALOG 10.2.0.1.0 VALID
    CATPROC 10.2.0.1.0 VALID
    OWM 10.2.0.1.0 VALID
    JAVAVM 10.2.0.1.0 VALID
    XML 10.2.0.1.0 VALID
    CATJAVA 10.2.0.1.0 VALID
    EXF 10.2.0.1.0 VALID
    ODM 10.2.0.1.0 VALID
    CONTEXT 10.2.0.1.0 VALID
    XDB 10.2.0.1.0 VALID
    RUL 10.2.0.1.0 VALID
    COMP_ID VERSION STATUS
    ORDIM 10.2.0.1.0 VALID
    APS 10.2.0.1.0 VALID
    XOQ 10.2.0.1.0 VALID
    AMD 10.2.0.1.0 VALID
    SDO 10.2.0.1.0 VALID
    EM 10.2.0.1.0 VALID
    but i cannot understand why..
    as far as i know, nothing changed. but maybe the other admins:)
    as i said i can query all colums in table t without using a *,
    also i can use * when i include rowid in the query
    select m.*,rowid from t m;
    i am very confused now:S

  • Dividing multiple counts

    Hello everyone,
    I am trying to divide one count by another. I have pasted the part of the query I am struggling with below (sorry about the confusing aliases).
    count(distinct p.processno)/(select COUNT(distinct oa.noteid) as "Count"
    from W2PROCESSdch Pab, upmfolder fab, w2objectnote oa, w2processtype ptab, w2stage sab
    where fab.folderid = pab.keynumb
    and trunc(Pab.STAGESTARTDATE) >=  '07-SEP-11'
    and trunc(Pab.STAGESTARTDATE) <= '07-SEP-11'
    and pab.processname = ptab.proctypeid
    and sab.stageid = pab.stageid
    and oa.keynumb = pab.processno
    and oa.notetype = 'RN'
    and trunc(oa.ndate) = TRUNC(Pab.STAGESTARTDATE)
    and UPPER(sab.caption) like UPPER('View Rejection%')
    and p.userid = pab.userid)* 100 Unfortunately I get the error "01476. 00000 - "divisor is equal to zero"".
    I have tried using CASE but that isn't working either.
    I have tried searching for the solution but I have had no luck. If anyone could suggest how I should structure this part of the query I would be extremely grateful.

    Kim Berg Hansen wrote:
    What result of the division do you wish if your divisor actually is zero?
    Often I find that a result of null is preferable to show that the result of dividing by zero is undefined.
    For that purpose NULLIF is an easy way:
    ...snippet...
    count(distinct p.processno)/(select NULLIF(COUNT(distinct oa.noteid),0) as "Count"
    from W2PROCESSdch Pab, upmfolder fab, w2objectnote oa, w2processtype ptab, w2stage sab
    where fab.folderid = pab.keynumb
    and trunc(Pab.STAGESTARTDATE) >=  '07-SEP-11'
    and trunc(Pab.STAGESTARTDATE) <= '07-SEP-11'
    and pab.processname = ptab.proctypeid
    and sab.stageid = pab.stageid
    and oa.keynumb = pab.processno
    and oa.notetype = 'RN'
    and trunc(oa.ndate) = TRUNC(Pab.STAGESTARTDATE)
    and UPPER(sab.caption) like UPPER('View Rejection%')
    and p.userid = pab.userid)* 100
    ...snippet...The NULLIF states, that if the first parameter is equal to the second parameter, NULL is returned.
    So NULLIF(COUNT(...),0) returns NULL if the count is equal to zero.
    If you divide something by NULL, then the result is also NULL.
    That way you avoid the division by zero error - and the end result of the division becomes NULL signifying it is unknown .
    Maybe you cannot use NULL - maybe you have to simulate that a division by zero always returns 1 or something.
    But if you can use NULL, then NULLIF is an easy trick to avoid division by zero ;-) .I tried doing it this way and it worked! Thank you all so much for your help.
    What would be the best way to change the nulls to 0? If I can't I can just import it into Excel and change them.

  • Anybody with isues running office:mac 2011,  I am using Mac OS 10.6.8  It ran for years then recenty started giving me error message that it might not be compatible. I tried reinstaling with no luck.11?

    Anybody with isues running office:mac 2011,  I am using Mac OS 10.6.8  It ran for 2 years then recenty started giving me error message that it might not be compatible. I tried reinstaling with no luck.11?

    I think my problem has been that in Sytem Preferences>Mouse, my "Double-Click Speed" was set to the SLOWEST setting. After some experimentation, I now have the that setting two notches from the "Fast" end of the scale. In case it's important, the "Primary mouse button" in my Preferences is set to "Left".
    This not only solves the text selection issues described, but also seems to eliminate the strange "resolving alias to" problem.
    [For the curious, I have a Logitech Performance MX wireless mouse which can be configured with "Logitech Control Center". But the LCC software doesn't control double-click speed; this setting can only be made in the Mouse System Preference pane.]

  • (NOLOCK) is giving syntax error

    Hi,
    I have query which runs properly in 1 server and in the other server it gives syntax error because of (NOLOCK).
    When i remove (NOLOCK) its working fine.
    my query is a big one...
    But it is something like
    INSERT INTO @abc
    SELECT a.id,SUM(b.count) FROM
    (SELECT DISTINCT id FROM table1 (NOLOCK)) AS a
    INNER JOIN Table2 (NOLOCK) AS b
    GROUP BY a.id
    It is giving syntax error at only one (NOLOCK) that is near Table2 in one server and in other server it works fine...
    Both the server versions are exactly same...
    What is the reason?

    First, it is generally a bad idea to post a follow-up "me, too" response to an old and answered question.  Fewer people will look at an answered question generally. 
    Next, the reason this thread provides no information about the original problem and the solution is because the complete problem was not posted.  If your query generates an error message, it is important to see the complete and actual error message.
    Given the conversation, it is likely that there was a syntax error in the various statements that OP tried and it was a happy accident that the removal of the hint caused the error to go away. 
    Lastly one should refrain from using hints generally.  For some unfathomable reason there is a myth that it is a good practice to use the nolock hint. 

  • Failed to process the file in Input agent giving repository error

    Hi All,
    I have configured input agent on my machine and when I try to process the file, that file goes into STAGE folder and Error folder by giving the repository error.
    Please, anyone help me out.
    Thanks in advance.

    Hi Vikrant,
    I have checked the log its giving the following error log:
    [2013-04-30T07:38:39.633-06:00] [IPM_server1] [NOTIFICATION] [TCM-00129] [oracle.imaging.agents] [tid: [ACTIVE].ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: ecc27246272aba84:6c20b3cf:13e5aa0c54b:-8000-000000000000059c,0] [APP: imaging] Input Agent is checking for work.
    [2013-04-30T07:45:41.397-06:00] [IPM_server1] [ERROR] [] [oracle.imaging.ui] [tid: [ACTIVE].ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: ecc27246272aba84:6c20b3cf:13e5aa0c54b:-8000-00000000000005c6,0] [APP: imaging] A repository error occurred.[[
    oracle.imaging.ImagingException: TCM-00787: A repository error occurred.
         faultType: SYSTEM
         faultDetails:
         ErrorCode = oracle.stellent.ridc.protocol.ServiceException, ErrorMessage = Unable to execute service CHECKIN_NEW_SUB and function makeNewRevClass.
    The error was caused by an internally generated issue. The error has been logged.
         at oracle.imaging.repository.ucm.UcmErrors.convertRepositoryError(UcmErrors.java:161)
         at oracle.imaging.repository.ucm.UcmRepositoryOperationImpl.convertDocumentRepositoryError(UcmRepositoryOperationImpl.java:410)
    Also when I am checken in documents in content server , its giving the error : Unable to execute service CHECKIN_NEW_SUB and function makeNewRevClass.
    I think these two are because of the same problem.
    Please help me out.
    Thanks,
    Yogita

  • I am trying to capture from Sony HDV 1080i VTR FCP giving an error of not able to initialize

    i am trying to capture from Sony HDV 1080i VTR FCP giving an error of not able to initialize. I am not able to capture the content in DV mode. i am using a Firewire 800 to 400 converter and a 6 pin firewire cable to connect to the SonyHDV VTR. Please suggest me how do i do this.

    The 800-400 converter plugs have proved a problem for this. What version of the software are you using. It sounds like an older version of FCP, if so you should ask your question on the Final Cut Studio forum.

  • Report giving runtime error

    hi,
    i HAD MADE A REPORET IN which i havce to display the bolck stock ,it is giving runtime error as i had added 1 more table,plzz help me out as it is really urgent to me. here is d code:-
    *& Report  ZDEMO_SMARTFORM_COPY
    REPORT  ZDEMO_SMARTFORM_COPY.
    TABLES: MCHB,MARA,T001W.
    DATA: BEGIN OF ITAB OCCURS 0,
          ITEMID LIKE MARD-MATNR,
          SPEME LIKE MARD-SPEME,
          WERKS LIKE MARD-SPEME,
          LGORT LIKE MARD-LGORT,
          NTGEW LIKE MARA-NTGEW,
          MEINS LIKE MARA-MEINS,
          GEWEI LIKE MARA-GEWEI,
          CHARG LIKE MCHB-CHARG,
          WTKG LIKE MARA-NTGEW,
          STOCK TYPE P LENGTH 10 DECIMALS 3,
          DESC LIKE MAKT-MAKTX,
          TOTWT LIKE MARD-SPEME,
          WT TYPE P LENGTH 12 DECIMALS 3,
          END OF ITAB.
         ITEMID LIKE MCHB-MATNR,
         CSPEM LIKE MCHB-CSPEM,
         CHARG LIKE MCHB-CHARG,
         WERKS LIKE MCHB-WERKS,
    *PARAMETERS : PLANT LIKE MCHB-WERKS OBLIGATORY.
    PARAMETERS : PLANT LIKE MARD-WERKS OBLIGATORY.
    DATA : DESC LIKE MAKT-MAKTX.
      SELECT AMATNR ASPEME AWERKS ALGORT BNTGEW BMEINS BGEWEI CCHARG FROM MARD AS A
        INNER JOIN MARA AS B ON BMATNR = AMATNR
          INNER JOIN MCHB AS C ON CMATNR = AMATNR
            INTO TABLE ITAB WHERE AWERKS = PLANT AND ASPEME > 0.
    SELECT AMATNR ACSPEM ACHARG AWERKS  BNTGEW BMEINS B~GEWEI FROM MCHB AS A
       INNER JOIN MARA AS B ON BMATNR = AMATNR
         INTO TABLE ITAB WHERE AWERKS = PLANT AND ACSPEM > 0.
    WRITE: / 'ITEMID           DESCRIPTION                              STOCK.QTY  BATCH NO.           NETWT          TOTAL.WEIGHT '.
    ULINE.
    LOOP AT ITAB.
          IF ITAB-NTGEW <> 0 .
            CALL FUNCTION 'ZGET_ITEM_WEIGHT'
             EXPORTING
               P_BUID         = ITAB-WERKS
               P_ITEMID       = ITAB-ITEMID
               P_QTY          = ITAB-NTGEW
               P_UOM          = ITAB-GEWEI
               P_UOM1         = 'KG'
             IMPORTING
               P_RETVAL       = ITAB-WTKG.
          ENDIF.
       CONVERTING ITEM QTY IN KG
          ITAB-WT = ITAB-STOCK.
          IF ITAB-MEINS = 'G'.
            ITAB-WT = ITAB-STOCK / 1000000.
          ELSEIF ITAB-MEINS = 'KG'.
            ITAB-WT = ITAB-STOCK / 1000.
          ELSEIF ITAB-MEINS = 'TO'.
            ITAB-WT = ITAB-STOCK * ITAB-WTKG / 1000.
         ENDIF.
       ITAB-TOTWT = ITAB-WTKG * ITAB-CSPEM.
       ITAB-TOTWT = ITAB-WTKG * ITAB-SPEME.
       SELECT SINGLE MAKTX FROM MAKT INTO DESC WHERE MATNR = ITAB-ITEMID.
         WRITE:/ ITAB-ITEMID,15 DESC,50 ITAB-SPEME,ITAB-CHARG,ITAB-WTKG,ITAB-TOTWT.
       MODIFY ITAB.
       ENDLOOP.

    HI,
    i had tried to ftech data from mard and it isgiving runtime error. dis is the code:-
    TABLES: MCHB,MARA,MARD.
    DATA: BEGIN OF ITAB OCCURS 0,
          MATNR LIKE MARD-MATNR,
          SPEME LIKE MARD-SPEME,
          WERKS LIKE MARD-SPEME,
          LGORT LIKE MARD-LGORT,
          END OF ITAB.
          SELECT MATNR SPEME WERKS LGORT FROM MARD INTO CORRESPONDING FIELDS OF TABLE ITAB.
          LOOP AT ITAB.
          WRITE:/ ITAB-MATNR,ITAB-SPEME,ITAB-WERKS,ITAB-LGORT.
          ENDLOOP.

  • I forgot my passcode for the ipad and i can't connect to iTunes because it keeps giving me error message that i have to unlcok the ipad first... any advice on how to restore the ipad or unlock it?

    i forgot my passcode for the ipad and i can't connect to iTunes because it keeps giving me error message that i have to unlcok the ipad first... any advice on how to restore the ipad or unlock it?

    You have to restore the device within iTunes. You want to use the same computer that you always sync with so that you can restore your app data and settings. You can restore with any other computer, but you will lose everything on the iPad.
    This will tell you how to restore
    http://support.apple.com/kb/HT1414
    You will probably need to use recovery mode
    http://support.apple.com/kb/ht4097

Maybe you are looking for

  • SQL: Need help putting single quote around string

    I want to put single quotes around string in my output. I am running the following command as a test: select ' ' hello ' ' from dual; My expectation is to get 'hello' (Single quote around hello) However I am getting the following error: ERROR at line

  • Change the colour of title bar of frame

    how can we change the colour of title bar of any frame?

  • IMessage automatically sending as regular SMS after a while.

    I have been having an issue with iMessage and it's now starting to get really annoying.  When I sometimes send an iMessage text it shows up that its sent (meaning no read exclamation point) and makes the sent noise but does not say delivered.  Later

  • Writing from Stored Procedure directly into a file...

    Hi guys, I would like to write the results of a stored procedure into a file. Indeed, I am calling a Stored Procedure from a script and I would like to write the result of that procedure to a file and not a table. Thanks guys, Pipoca

  • Missing Reqisition Line details

    Hi, I've raised a requisition and approved it. Could not find the requisition lines in the notification. This is happening intermittently. Could not replicate the issue again. I received the notification with attribute name rather than attribute valu