Error in small program

The following program shows error when I give input to Num1 and Num2 ,then press Add or Exit.It says "Invalid Format (Screen Error)" Any Help Please
REPORT  ZTODAY                                  .
data : num1 type i,
       num2 type i,
       NUM3 TYPE I,
       OK_CODE TYPE SY-UCOMM.
call screen 100.
*&      Module  USER_COMMAND_0100  INPUT
      text
MODULE USER_COMMAND_0100 INPUT.
case OK_CODE.
WHEN 'ADD'.
NUM3 = NUM1 + NUM2.
when 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&      Module  CNUM1  INPUT
      text
MODULE CNUM1 INPUT.
ENDMODULE.                 " CNUM1  INPUT

Hi,
  ON Screen the data type of screen fields are diffrent than the data type declared in Report.
Check it once.
Don't forget to reward if useful....

Similar Messages

  • Errors with small program

    Ok, I'm trying to get a small program to compile on my windows box. I'm a student and in the lab (on a linux box) the program compiled fine. I keep getting this error:
    Easypieces.java:52: cannot resolve symbol
    symbol : variable volume
    location: class EasyPieces
    System.out.println("Volume:" + volume);
    ^
    2 errors
    Here's the code:
    * Student should complete the five methods, document the class
    * and the methods, and test this well. You may remove the instructor
    * comments.
    public class EasyPieces {
    * Student should complete and document this method
    public void waterBalloons(int radius) {
         double cubedRadius = Math.pow(radius, 3);
         double volume;
         double volume = 4/3 * Math.PI * cubedRadius ;
    * Student should complete and document this method
    public void upsLoad(double computer, double monitor, double other) {
    * Student should complete and document this method
    public void carpool(int people) {
    * Student should complete and document this method
    public void checksum(int number, int base) {
    * Student should complete and document this method
    public void combinationLock() {
    * Instructor provided test cases. Student should add additional
    * test cases as necessary to make sure the program functions as
    * intended.
    public static void main(String[] args) {
    //Create an object of type EasyPieces to use for the testing
    EasyPieces testPiece = new EasyPieces();
    //Instructor provided test for waterBalloons
    testPiece.waterBalloons(6);
    System.out.println("Volume:" + volume);
    //Instructor provided test for upsLoad
    //testPiece.upsLoad(1.2,0.8,1.4);
    //System.out.println("----------------------------------------------------------------------");
    //Instructor provided test for carpool
    //testPiece.carpool(15);
    //System.out.println("----------------------------------------------------------------------");
    //Instructor provided test for checksum
    //testPiece.checksum(156,7);
    //System.out.println("----------------------------------------------------------------------");
    //Instructor provided test for combinationLock
    //testPiece.combinationLock();
    //System.out.println("----------------------------------------------------------------------");
    For some reason it doesn't want to print the variable out...
    Any help?
    Thanks, Greg

    << That code didn't compile on your linux box, guaranteed. :o) >>
    This program didn't but one similiar to it did, and I get the same error message when I try to compile it on my windows box:
    public class zeller {
         public static void main(String args[]) {
              int month = 2;
              int day = 29;
              int year = 2000;
              if (month == 2) {
                   year = year -1;
                   day = day +3;
              if (month == 1) {
                   year = year -1;
                   day = day;
              if (month == 3) {
                   year = year;
                   day = day + 2;
              if (month == 4) {
                   day = day + 5;
              if (month == 5) {
                   day = day;
              if (month == 6) {
                   day = day + 3;
              if (month == 7) {
                   day = day + 5;
              if (month == 8) {
                   day = day +1;
              if (month == 9) {
                   day = day +4;
              if (month == 10) {
                   day = day +6;
              if (month == 11) {
                   day = day +2;
              if (month == 12) {
                   day = day +4;
              int sum = year + year/4 - year/100 + year/400 + day;
              int dayOfWeek = sum % 7;
              System.out.println(dayofweek);
    I get this error in windows (the same error I get with the other program):
    D:\JAVA\jdk142\bin>javac zeller.java
    zeller.java:67: cannot resolve symbol
    symbol : variable dayofweek
    location: class zeller
    System.out.println(dayofweek);
    ^
    1 error
    Greg

  • Error in activating program---defining variable in exporting stmnt

    Hello ,
    i have created a small program, from the program we get 4 variables .
    We have to pass these variables to the smartfrom through EXPORTING .
    when i add the variables in the exporting like
    tax = p
    where p is a data type. I get an error while activating the program in se38 , field is unknown and is not specified in the data statement nor in the tables.
    Whereas when i wrote the small progarm i have defined it as follows:-
    data : tax = p
    Can anyone help me on this . Where am i going wrong .
    Thanks,
    Honey
    Edited by: Honey2008 on Oct 28, 2009 2:54 PM

    Thanks a lot. I defined it exactly the way u said .
    now when i run the print transaction , the statment is like
    tax = tax + taxval
    While debugging the program, taxval has the value .28 , so
    tax = .28 but the output is coming out as ZERO.
    Thanks anyways
    Honey
    Edited by: Honey2008 on Oct 29, 2009 11:13 AM
    Edited by: Honey2008 on Oct 30, 2009 10:44 AM

  • How would I set this small program to activate every 120 seconds?

    I have this small program that writes the value 0 to a file, but I want it to only activate every 120 seconds, so it doesn't take up a bunch of system resources by constantly running. Can I make it pause for 120 seconds, or set a timer for it, in such a way that it won't make my PC run slow? Here's my code. Thanks if you can help.
    import java.util.*;
    import java.io.*;
    import java.io.File;
    public class Purge extends Random implements Serializable {
         public Purge () {
              writePrimDoubles();
         public static void main (String [] args) {
              Purge test = new Purge();
         public void writePrimDoubles() {
              DataOutputStream outStream;
              long timerStart;
              long timerEnd;
              long size;
              int a = 1;
              try     {          
                   while (a==1) {
                        outStream = new DataOutputStream
                             (new FileOutputStream("packetlog.txt"));
                        timerStart = System.currentTimeMillis();
                        outStream.writeBytes("0");
                        timerEnd = System.currentTimeMillis();
                        outStream.close();
              catch(IOException e) {
                   System.out.println("Error writing to file");
    }

    java.util.Timer, I think may do the trick.

  • Error Message: "The program can't start because QTCF.dll is missing....."

    Full error message: "The program can't start because QTCF.dll is missing from your computer. Try reinstalling the program to fix this problem." I can't start iTunes because of this error. Any advice on what to do?

    I have discovered the reason this occurs. It is because the PATH in the environment settings no longer has the path to C:\Program Files (x86)\QuickTime\QTSystem which is where the .dll lives on a Windows 7 computer. Close the application giving you this warning if it is still open and use the following 10-step process to fix this:
    1. Search for the path to the QTCF.dll and upon finding it, copy it (Highlight it in the explorer address bar and press CTRL + C.)
    2. Open the control panel.
    3. Choose System and Security from the left.
    4. Choose Advanced system settings from the left and a dialog window pops up with the Advanced tab selected.
    5. Click the Environmental Variables... button near the bottom of the dialog box.
              (This opens a dialog box with 2 sections: User variables and System variables.)
    6. Scroll down through the  System variables section so that you can select (highlight) the Path variable in the left column.
    7. Click the Edit... button which opens a small dialog box and highlights the entire Variable value.
    8. Click once in the Variable value (to deselect the value so you don't mess it up) and then press the end key on your keyboard (to move your cursor to the last character of the very very long string in the text box).
    9. Paste (keyboard combination CTRL + V) the path to the QTCF.dll you copied earlier, and add a semi-colon, for example:
                         C:\Program Files (x86)\QuickTime\QTSystem;
    (Note that you don't need a trailing / or the actual .dll name in the path, but be sure to add a semicolon to the end of the path name you paste.)
    10. Click OK on each of the 3 open dialog boxes.
    There is no need to reboot your computer. You only need to restart the application and ensure that it starts without the warning that the .dll can not be found.

  • RUNTIME ERROR IN GENERATED PROGRAM. Overflow converting ''

    Hi,
    While executing the below code i am getting the error
    " RUNTIME ERROR IN GENERATED PROGRAM. Overflow converting ' ' am new to ABAP , can anyone kindly help me where i have went wrong ? .
    IF ( V_DO_CDS_NAME_MAIN <> '' ).
        ABAP.
            DATA: ref_it_tab TYPE REF TO data,
                  ref_wa TYPE REF TO data.
            FIELD-SYMBOLS: <fs_itab> TYPE ANY TABLE.
            FIELD-SYMBOLS: <fs_wa> TYPE ANY.
            FIELD-SYMBOLS: <fs_field> TYPE ANY.
            CREATE DATA ref_it_tab TYPE STANDARD TABLE OF (V_DO_CDS_NAME_MAIN) WITH NON-UNIQUE DEFAULT KEY.
            ASSIGN ref_it_tab->* TO <fs_itab>.
            SELECT * FROM (V_DO_CDS_NAME_MAIN) INTO TABLE <fs_itab> where C1 = V_WORK_ITEM_ID_MAIN.
            CREATE DATA ref_wa LIKE LINE OF <fs_itab>.
            ASSIGN ref_wa->* TO <fs_wa>.
            loop at <fs_itab> assigning <fs_wa>.
                assign component 'CLIENT' of structure <fs_wa> to <fs_field>.
                V_CLIENT = <fs_field>.
                assign component 'C0' of structure <fs_wa> to <fs_field>.
                V_C0 = <fs_field>.
                assign component 'C1' of structure <fs_wa> to <fs_field>.
                V_C1 = <fs_field>.
                assign component 'C2' of structure <fs_wa> to <fs_field>.
                V_C2 = <fs_field>.
                assign component 'C3' of structure <fs_wa> to <fs_field>.
                V_C3 = <fs_field>.
                assign component 'C4' of structure <fs_wa> to <fs_field>.
                V_C4 = <fs_field>.
                assign component 'C5' of structure <fs_wa> to <fs_field>.
                V_C5 = <fs_field>.
                assign component 'C6' of structure <fs_wa> to <fs_field>.
                V_C6 = <fs_field>.
                assign component 'C7' of structure <fs_wa> to <fs_field>.
                V_C7 = <fs_field>.
                assign component 'C8' of structure <fs_wa> to <fs_field>.
                V_C8 = <fs_field>.
                assign component 'MESSAGE_ID' of structure <fs_wa> to <fs_field>.
                V_MESSAGE_ID = <fs_field>.
                assign component 'TIMESTAMP' of structure <fs_wa> to <fs_field>.
                V_TIMESTAMP = <fs_field>.
                assign component 'EXTRACTKEY' of structure <fs_wa> to <fs_field>.
                V_EXTRACTKEY = <fs_field>.
                assign component 'STATEID' of structure <fs_wa> to <fs_field>.
                V_STATEID = <fs_field>.
                assign component 'DEVICE_ID' of structure <fs_wa> to <fs_field>.
                V_DEVICE_ID = <fs_field>.
            ENDLOOP.
        ENDABAP.
    ENDIF.

    Hi Mubeen,
    While Copying the cotes have come closer otherwise its working fine , i was able to find the error .
    There are ten predefined ABAP data types. There are 100 possible type combinations between these elementary data types. ABAP supports automatic type conversion and length adjustment for all of them except type D (date) and type T (time) fields which cannot be converted into each other.
    I commented the TimeStamp part where i had given the ABAP Type as D and it started working .
    But now i want to display the content of  "TimeStamp"  field but i am not able to do so .
    This is the format in which it has to be displayed 2009.011.915.3353.
    Which ABAPTYPE i need to use ?.
    i am able to display in this format 20090119153353
    regards
    Harsha

  • Runtime Error in MMBE- s yntax error occurred in program "SAPLMBBS " in inc

    Hi Gurus,
    Runtime Error in "MMBE" Transaction -
    The following syntax error occurred in program "SAPLMBBS " in include "LMBBSU07
    " in
    line 76:
    "The column name "MATNR" has two meanings . ."
    Any Input is Highly appreciated.
    Thanks and Regards,
    Selva

    Hi,
    This looks like an ABAP runtime error and the program concerned is a standard program. Please check the include and try debugging, suggest a breakpoint in line 76.
    Thanks

  • Error Your browser/program is not supported by Web Dynpro

    Hi,
    1. I am getting error "Your browser/program is not supported by Web Dynpro" while executing Web dynpro java application
    2. Portal is EP 7.0 with SP15
    3. Browser is IE 8.0
    4. Which browser(s) (& sp level)  are supported by web dynpro?
    5. Is it possible to customize this error message?
    6. If so, from where (Web dynpro java application or Visual Admin) 
    7. My web dynpro application supports multiple languages.
    8. Is it possible to maintain this message in messagecomponent.xlf file
    Thanks & regards,
    Nilesh

    Hi Nilesh
    IE8 and IE7 is not supported.
    For browser/program is not supported by Web Dynpro----
    check this forums link
    /message/6416540#6416540 [original link is broken]
    /message/2842083#2842083 [original link is broken]
    Re: browser/program is not supported by Web Dynpro!
    Hope this link information will help you
    Regards
    Ruturaj

  • Error while running Program YL_ADJUST_COMMITMENT

    Error while running Program YL_ADJUST_COMMITMENT, i think it actually comes from FN8C business operation for single posting w
    "Message" - No account refernce could be found - Error in update to Accounting - Distribution error -CoCd 601.
    Please help

    Resolved my self

  • Error while executing program

    Hi ,In sap bods,  im using abap dataflow as my source and target is flat files ,while im executing its showing error
    "Execute ABAP program <C:/Program Files/Business Objects/BusinessObjects Data Services/zcustdim.aba> error <    Open File Error"
    how can i solve this problem,
    Moderator message: please have a look in the forums for Business Objects.
    Edited by: Thomas Zloch on Mar 8, 2012

    Prem,
    Looking at the error that you have shown, looks like its a different error. Is there a control/GRID that is being used in the program.
    If you are using a CUSTOM CONTAINER and a GRID to display the data, whenever you executing the program, you should not create the container. Something like this ..
        if cl_gui_alv_grid=>offline( ) is initial.
          create object CUSTOM_CONTAINER
                 exporting container_name = CUSTOM_CONTROL
        endif.
    Regards,
    Ravi
    note : Please reward the helpful posts.

  • Error message c:\program files (x86)\itunes\ituneshelper.exe   r6034

    can not log into itunes, get the following error message:  c:\program files (x86)\itunes\itunes help.exe
    R6034
    I have uninstalled and reinstalled and still unable to login

    Apple's advice on this issue can now be found here: TS5376: iTunes 11.1.4 for Windows: Unable to install or open.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See the user tip Backup your iTunes for Windows library with SyncToy for a suggested strategy.
    If you have difficulty downloading the iTunes setup file try clearing your browser's cache or using an alternate browser.
    If content is missing from the library following the repair see Empty/corrupt iTunes library after upgrade/crash.
    For device connectivity issues following the repair see TS1538: iOS: Device not recognized in iTunes for Windows, in particular section 5.
    MobileMe is a discontinued service and should be removed if present. See HT2992: MobileMe: Uninstalling the MobileMe Control Panel for Windows for details.
    tt2

  • On Mac OS 10.9.5 : impossible to initialize Photoshop because of an error of the program

    I downloaded Adobe PhotoShop CC and Lightroom 5 (paid version). Lightroom 5 seams to work but Adobe PhotoShop gives an error message "impossible d'initialiser Photoshop en raison d'une erreur du programme" (sorry it's in French, in English this could be "impossible to initialize Photoshop because of an error of the program". Not any additionnal error code or comment.
    I tried to uninstall, dowload and install again, but I still get the same message after the new install.
    Has anybody experimented this problem ? Thanks for your kind help.

    Thanks for tour suggestion, but unfortunately  it does not work. I get a dialog box about virtual memory and the disks I want to choose for, but I cannot trash the prefs. I changed the disks to see and I still get the same message.

  • Syntax Error occured in Program  in include " CNTN01

    Hi,
    We are working on SAP 4.6C to ECC 6.0 Migration. While testing One Transaction, I am getting following error:
    The current ABAP program "CL_GOS_TOOLBOX_MODEL==========CP" had to be
    terminated because it has come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program
    "Z3I_CL_BASCULER_SCS_GOS=======CP " in include "<CNTN01> " in
    line 13:
    "Within classes and interfaces, you can only use "TYPE" to refer to ABA"
    "P Dictionary types, not "LIKE" or "STRUCTURE"."
    The include has been created and last changed by:
    Created by: "SAP "
    Last changed by: "SAP "
    Error in the ABAP Application Program
    This Error is coming while executing transaction in ECC 6.0 however in R/3 4.6C it is working fine.
    Pls Advice what should be done to resolve this issue. This issue is coing in alot of transactions.
    I will appreciate if anyone of you can guide me regarding same.
    regards
    Sandeep

    Hi,
    I was trying hand on one of my Z class which contain  include <CNTN01>. in its Local Types.
    I commented the existing include statement and added new statement as
    INCLUDE CNTN01_OO.
    After saving now when i try to activate the Z Class, it is giving me following error:
    INCLUDE CNTN01_OO
    You can only define classes and interfaces at the highest level of CLASS-POOL.
    CLASS Z5C_CL_MESSAGE, Internal classes in a class include "CNTN01_OO" does not start with the prefix (Z5C_CL_MESSAGE=======)of the current class pool.
    pls advice what i should do correct this issue.
    Sandeep

  • Hierarchy load - Error RSAR 683 Syntax error in generated program, row 0

    Hi guys,
    When I load the hierarchy on ZMATERIAL (load from 0MATERIAL hierarchy - source system BW), I have this error message : RSAR 683 Syntax error in generated program, row 0.
    I have found several SAP notes, especially [Sap Note 944842|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_whm/~form/handler], but the implementation on our system does not change anything.
    We are working on BW3.5 SP12.
    Can anyone could tell me what to do ?
    Will this issue be solved once we upgrade until SP18 as it is mentionned in the SAPNote ?
    Thanks,
    Alexandra
    Edited by: Alexandra Guillaux on Apr 1, 2009 4:36 PM

    Hello Alex,
    after implementing the corrrection part of note 944842 via SNOTE, plaese also:
    1. replicate datasource
    2. activate transfer structure (report RS_TRANSTRU_ACTIVATE_ALL)
    3. activate infoobject   (make dummy change to description
    of infoobject etc, save and activate it, remove change and save and
    activate it again).
    Hope it could resolve the incident.
    Thank you & Best regards,
    Vince

  • Syntax Error in generated program.

    Hi Experts -
    I saw a similar thread regarding the issue I'm having but I thought I'd open another thread.
    0CMMT_ITEM_FMCI_PU_HIER Syntax Error for Generated Program
    I'm doing an extraction for 0CRM_ORGUNIT_HR01_HIER in RSA3 of CRM.
    I get an error message:
    Message RJ028 : Error 6 in function module RSS_PROGRAM_GENERATE
    There is a syntax error in the code.
    How do you solve this issue?
    We applied OSS note 822323 but still get the same error. The code still has the syntax error.
    Any one saw this or have any solutions? Please let me know. Thanks a lot in advance!

    Hi,
    Use the program RSA1HCAT in SE38 to check your hierarchy.
    Transaction RSA3 was not developed for checking hierarchy DataSources.
    Rather, it is only for transaction and attribute/text datasources.  If
    you want to check the extraction of hierarchy datasources in the R/3
    system, you should use the report RSA1HCAT.  In this report, enter the
    name of the hierarchy datasource in the "DataSource with HierarchyType"
    field.
    For this problem look at the note: 632920.
    Regards,
    Srikanth.

Maybe you are looking for