How to check code for errors

how can I read code from a .java file and return whether it is compilable or if there are errors in the code?

I wrote this code:
public boolean Compilable ()
try
Process process = Runtime.getRuntime ().exec ("javac Test.java");
catch (Exception e)
return false;
return true;
but it throws this exception:
java.io.IOException: CreateProcess: javac Test.java error=2
     at java.lang.ProcessImpl.create(Native Method)
     at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
     at java.lang.ProcessImpl.start(ProcessImpl.java:30)
     at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
     at java.lang.Runtime.exec(Runtime.java:591)
     at java.lang.Runtime.exec(Runtime.java:429)
     at java.lang.Runtime.exec(Runtime.java:326)
     at Test.main(Test.java:7)
     at __SHELL27.run(__SHELL27.java:6)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at bluej.runtime.ExecServer$3.run(ExecServer.java:855)
what am I doing wrong?

Similar Messages

  • How to check code for syntax errors

    How do I check or validate my html code in dreamweaver. I wish to see if all the braces and tags are closed or not
    please guide me

    Hi There:
    You can check to make sure the tags, parentheses (( )), braces ({ }), and square brackets ([ ]) in your page are balanced. Balanced means that every opening tag, parenthesis, brace, or bracket has a corresponding closing one, and vice versa.
    Check for balanced tags
    Open the document in Code view.
    Place the insertion point in the nested code you want to check.
    Select Edit > Select Parent Tag.
    The enclosing matching tags (and their contents) are selected in your code. If you keep selecting Edit > Select Parent Tag, and your tags are balanced, eventually Dreamweaver will select the outermost html and /html tags.
    Check for balanced parentheses, braces, or square brackets
    Open the document in Code view.
    Place the insertion point in the code you want to check.
    Select Edit > Balance Braces.
    All of the code between the enclosing parentheses, braces, or square brackets is selected. Choosing Edit > Balance Braces again selects all of the code inside the parentheses, braces, or square brackets that enclose the new selection.
    And also make sure to validate your HTML code at - http://validator.w3.org/
    Regards
    Vinay

  • Could anyone check this code for errors for me??

    Hi! Could someone please tell me if you see any problems with this code?? a friend wants me to check it for errors, but can't find any. I just wanted to make sure, because there are probably a lot of better scripters than me reading this. Please answer soon!!
    heres the code:
    stop();
    addEventListener(Event.ENTER_FRAME, preLoad);
    function  preLoad(e:Event):void{
    var bytestoLoad):Number = loaderInfo.bytesTotal; 
    var numberLoaded:Number = loaderInfo.bytesLoaded;
    if (bytestoLoad ==  numberLoaded) {
    removeEventListener)Event.ENTER_FRAME, preLoad) 
    gotoAndStop(2);
    }else {
    preLoader.preLoaderFill.scaleX =  numberLoaded/bytestoLoad;
    preLoader.bytePercent.text = Math.floor  (numberLoaded/bytestoLoad*100) + "%";
    Thanks!!
    -Sammy

    I ran it on debug mode and changed it to this? see any problems now? or are they fixed? It looks to me like it took some actions out, I hope that doesn't
    effect it....
    stop();
    addEventListener(Event.ENTER_FRAME, preLoad);
    function preLoad(e:Event):void{
    var bytestoLoad):Number = loaderInfo.bytesTotal;
    var numberLoaded:Number = loaderInfo.bytesLoaded;
    if (bytestoLoad == numberLoaded) {
    removeEventListener)Event.ENTER_FRAME, preLoad)
    gotoAndStop(2);
    i'm kinda new to flash ((I started as a lua scripter (on Roblox)) so I'm a little confused about this. Thanks for the help!!

  • Reg:How to check Vendor for particular Asset

    HI
    How to check Vendor for particular Asset?
    regards
    JK rao

    Hi,
    Good morning and greetings,
    It would be very difficult to go into each and every asset and display the asset...instead create a quick viewer query using SQVI and use the table ANLA and the field name is LIFNR for Vendor Code and for Asset Number it is ANLN1.
    Please reward points if found useful
    Thanking you
    With kindest regards
    Ramesh Padmanabhan

  • How to write code for page up and page down buttons on alv screen?

    Hi,
    Page up and page down buttons are not working in general alv report. Thease buttons are in disable mode. But is stnd. transactions (tcode : fbl5n)  these are enabled and working properly, but we can't debug this with /h
    How to write code for page up and page down buttons on alv screen?

    Poonam,
    On doing the screen debugging it took me over to    Include LSTXWFCC ,kindly check the below code.
    module cc_display.
      fcode = sy-ucomm(4).
      case sy-ucomm(4).
        when 'P--'.
          perform cc_firstpage.
        when 'P-'.
          perform cc_prevpage.
        when 'P+'.
          perform cc_nextpage.
        when 'P++'.
          perform cc_lastpage.
        when 'EX--'.
          perform cc_firstcopy.
        when 'EX-'.
          perform cc_prevcopy.
        when 'EX+'.
          perform cc_nextcopy.
        when 'EX++'.
          perform cc_lastcopy.
    I guess it can give you some lead.
    K.Kiran.

  • How to check performance for Stored procedure or Package.

    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.

    user13483989 wrote:
    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.Oracle has provided set of Tools to monitor the Performance.
    Profilers being one of them; If you wish to understand more on PL/SQL Optimization, please read PL/SQL Optimization and Tuning.
    See example of DBMS_PROFILER.
    See example of PLSQL Hierarchial Profiler

  • How to write code  for totals and subtotals in alv programing?

    how to write code  for totals and subtotals in alv programing?

    hi,
    1. <u><b>TOTAL.</b></u>
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
    2. <u><b>How do I add subtotals</b></u>
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    Regards
    Anver

  • How  to write code for font family using swing?

    how to write code for font family using swing?
    i tried this code.but i got only font styles.but i need font family.observ this code
    import java.awt.*;
    import java.awt.event.*;
    public class fontSelect extends java.awt.Dialog implements AdjustmentListener, ItemListener, TextListener, ActionListener {
    public Font selectedFont; //to get result
    public boolean isSelected = false;
    public Color selectedBackground, selectedForeground;
         public fontSelect(Frame parent, boolean modal) {
              super(parent, modal);
         String fntName[] = getToolkit().getFontList();
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String[] names = ge.getAvailableFontFamilyNames();
              //{{INIT_CONTROLS
              setLayout(null);
              setVisible(false);
    //setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setSize(insets().left + insets().right + 380,insets().top + insets().bottom + 282);
              setBackground(java.awt.Color.lightGray);
    fontList = new java.awt.Choice();
              //fontList = new java.awt.List(0,false);
              add(fontList);
              fontList.setBounds(insets().left +25,insets().top + 50,137,144);
              //label1 = new java.awt.Label("Example:-");
              //label1.setBounds(insets().left + 220,insets().top + 36,84,30);
              //add(label1);
              exampleText = new java.awt.TextField();
              //exampleText.setText("sample string ");
              //exampleText.setBounds(insets().left + 40,insets().top + 50,84,21);
              //add(exampleText);
              label2 = new java.awt.Label("Font Family:-");
              label2.setBounds(insets().left + 25,insets().top + 30,70,19);
              add(label2);
              isBold = new java.awt.Checkbox("Bold");
              isBold.setBounds(insets().left + 320,insets().top + 90,60,18);
              isBold.setFont(new Font("Times New Roman", Font.BOLD, 12));
              add(isBold);
              isItalic = new java.awt.Checkbox("Italic");
              isItalic.setBounds(insets().left + 250,insets().top + 90,48,17);
              isItalic.setFont(new Font("Times New Roman", Font.ITALIC, 12));
              add(isItalic);
              showFont = new java.awt.Label("samplestring ",Label.CENTER);
              showFont.setBounds(insets().left + 240,insets().top +50,120,30);
              showFont.setBackground(java.awt.Color.white);
              add(showFont);
    label11 = new java.awt.Label("Size:-");
              label11.setBounds(insets().left + 290,insets().top + 120,70,19);
              add(label11);
              fontSize = new java.awt.Choice();
    add(fontSize);
              //label11 = new java.awt.Label("Example string");
              fontSize.setBounds(insets().left + 290,insets().top + 140,60,23);
              fontSize.setBackground(java.awt.Color.white);
              btnSelect = new java.awt.Button();
              btnSelect.setLabel("Select");
              btnSelect.setBounds(insets().left + 280,insets().top + 190,87,24);
              add(btnSelect);
              btnCancel = new java.awt.Button();
              btnCancel.setLabel("Cancel");
              btnCancel.setBounds(insets().left + 280,insets().top + 230,91,24);
              add(btnCancel);
              label3 = new java.awt.Label("Background:-");
              label3.setBounds(insets().left + 24,insets().top + 90,94,18);
              add(label3);
              rBackground = new java.awt.Scrollbar(Scrollbar.HORIZONTAL,255,0,0,255);
              rBackground.setBounds(insets().left + 24,insets().top +110 ,197,21);
              add(rBackground);
              gBackground = new java.awt.Scrollbar(Scrollbar.HORIZONTAL,255,0,0,255);
              gBackground.setBounds(insets().left + 24,insets().top + 135,197,21);
              add(gBackground);
              bBackground = new java.awt.Scrollbar(Scrollbar.HORIZONTAL,255,0,0,255);
              bBackground.setBounds(insets().left + 24,insets().top + 160,197,21);
              add(bBackground);
              label4 = new java.awt.Label("R");
              label4.setBounds(insets().left + 12,insets().top + 110,12,18);
              label4.setFont(new Font("Times New Roman", Font.BOLD, 12));
              label4.setForeground(java.awt.Color.red);
              add(label4);
              label5 = new java.awt.Label("G");
              label5.setBounds(insets().left + 12,insets().top + 135,12,18);
              label5.setFont(new Font("Times New Roman", Font.BOLD, 12));
              label5.setForeground(new Color(-16744448));
              add(label5);
              label6 = new java.awt.Label("B");
              label6.setBounds(insets().left + 12,insets().top + 160,12,18);
              label6.setFont(new Font("Times New Roman", Font.BOLD, 12));
              label6.setForeground(java.awt.Color.blue);
              add(label6);
              rBackValue = new java.awt.Label("255");
              rBackValue.setBounds(insets().left + 225,insets().top + 110,24,12);
              rBackValue.setFont(new Font("Times New Roman", Font.BOLD, 12));
              rBackValue.setForeground(java.awt.Color.red);
              add(rBackValue);
              gBackValue = new java.awt.Label("255");
              gBackValue.setBounds(insets().left + 225,insets().top + 135,24,12);
              gBackValue.setFont(new Font("Times New Roman", Font.BOLD, 12));
              gBackValue.setForeground(new Color(-16744384));
              add(gBackValue);
              bBackValue = new java.awt.Label("255");
              bBackValue.setBounds(insets().left + 225,insets().top + 160,24,12);
              bBackValue.setFont(new Font("Times New Roman", Font.BOLD, 12));
              bBackValue.setForeground(java.awt.Color.blue);
              add(bBackValue);
              label7 = new java.awt.Label("Foreground:-");
              label7.setBounds(insets().left + 20,insets().top + 185,94,18);
              add(label7);
              rForeground = new java.awt.Scrollbar(Scrollbar.HORIZONTAL,0,0,0,255);
              rForeground.setBounds(insets().left + 20,insets().top + 205,197,21);
              add(rForeground);
              gForeground = new java.awt.Scrollbar(Scrollbar.HORIZONTAL,0,0,0,255);
              gForeground.setBounds(insets().left + 20,insets().top + 230,197,21);
              add(gForeground);
              bForeground = new java.awt.Scrollbar(Scrollbar.HORIZONTAL,0,0,0,255);
              bForeground.setBounds(insets().left + 20,insets().top + 255,197,21);
              add(bForeground);
              label8 = new java.awt.Label("R");
              label8.setBounds(insets().left + 10,insets().top + 205,12,18);
              label8.setFont(new Font("Times New Roman", Font.BOLD, 12));
              label8.setForeground(java.awt.Color.red);
              add(label8);
              label9 = new java.awt.Label("G");
              label9.setBounds(insets().left + 10,insets().top + 230,12,18);
              label9.setFont(new Font("Times New Roman", Font.BOLD, 12));
              label9.setForeground(new Color(-16744448));
              add(label9);
              label10 = new java.awt.Label("B");
              label10.setBounds(insets().left + 10,insets().top + 255,12,18);
              label10.setFont(new Font("Times New Roman", Font.BOLD, 12));
              label10.setForeground(java.awt.Color.blue);
              add(label10);
              rForeValue = new java.awt.Label("255");
              rForeValue.setBounds(insets().left + 220,insets().top + 205,24,12);
              rForeValue.setFont(new Font("Times New Roman", Font.BOLD, 12));
              rForeValue.setForeground(java.awt.Color.red);
              add(rForeValue);
              gForeValue = new java.awt.Label("255");
              gForeValue.setBounds(insets().left + 220,insets().top + 230,24,12);
              gForeValue.setFont(new Font("Times New Roman", Font.BOLD, 12));
              gForeValue.setForeground(new Color(-16744384));
              add(gForeValue);
              bForeValue = new java.awt.Label("255");
              bForeValue.setBounds(insets().left + 220,insets().top + 255,24,12);
              bForeValue.setFont(new Font("Times New Roman", Font.BOLD, 12));
              bForeValue.setForeground(java.awt.Color.blue);
              add(bForeValue);
              setTitle("Choosing font");
              //{{REGISTER_LISTENERS
              exampleText.addTextListener(this);
              btnSelect.addActionListener(this);
              btnCancel.addActionListener(this);
              isBold.addItemListener(this);
              fontList.addItemListener(this);
              isItalic.addItemListener(this);
              fontSize.addItemListener(this);
              rBackground.addAdjustmentListener(this);
              gBackground.addAdjustmentListener(this);
              bBackground.addAdjustmentListener(this);
              rForeground.addAdjustmentListener(this);
              gForeground.addAdjustmentListener(this);
              bForeground.addAdjustmentListener(this);
    for (int i = 0; i < (int)fntName.length; i++)
    fontList.addItem(fntName);
              showFont.setFont(new Font(fntName[0], Font.PLAIN, 12));
    // GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    //String[] names = ge.getAvailableFontFamilyNames();
    for ( int i=0; i<names.length; i++ )
    System.out.println( names[i] );
              selectedBackground = showFont.getBackground();
              selectedForeground = showFont.getForeground();
              int i = 8;
              do {
                   fontSize.addItem(""+i);
                   if (i<=30) i+=2;
                   else if (i<=70) i+=4;
                   else i+=8;
              } while (i<150);
              try {
                   fontSize.select(2);
              } catch (IllegalArgumentException e) { }
         //{{DECLARE_CONTROLS
         //java.awt.List fontList;
    java.awt.Label label11;
         java.awt.Label label1;
         java.awt.TextField exampleText;
         java.awt.Label label2;
         java.awt.Checkbox isBold;
         java.awt.Checkbox isItalic;
         java.awt.Label showFont;
         java.awt.Choice fontSize;
    java.awt.Choice fontList;
         java.awt.Button btnSelect;
         java.awt.Button btnCancel;
         java.awt.Label label3;
         java.awt.Scrollbar rBackground;
         java.awt.Scrollbar gBackground;
         java.awt.Scrollbar bBackground;
         java.awt.Label label4;
         java.awt.Label label5;
         java.awt.Label label6;
         java.awt.Label rBackValue;
         java.awt.Label gBackValue;
         java.awt.Label bBackValue;
         java.awt.Label label7;
         java.awt.Scrollbar rForeground;
         java.awt.Scrollbar gForeground;
         java.awt.Scrollbar bForeground;
         java.awt.Label label8;
         java.awt.Label label9;
         java.awt.Label label10;
         java.awt.Label rForeValue;
         java.awt.Label gForeValue;
         java.awt.Label bForeValue;
    private Font constructFont() {
    int l;
    try {
    l = Integer.parseInt(fontSize.getSelectedItem());
    } catch (NumberFormatException e) {l = 12;}
    selectedFont = new Font(fontList.getItem(fontList.getSelectedIndex()>=0?fontList.getSelectedIndex():0 ), (isBold.getState()?Font.BOLD:0)+(isItalic.getState()?Font.ITALIC:0), l);
    selectedBackground = new Color(rBackground.getValue(), gBackground.getValue(), bBackground.getValue());
    selectedForeground = new Color(rForeground.getValue(), gForeground.getValue(), bForeground.getValue());
    return (selectedFont);
         public void textValueChanged(java.awt.event.TextEvent event) {
              Object object = event.getSource();
              if (object == exampleText) showFont.setText(exampleText.getText());
         public void actionPerformed(java.awt.event.ActionEvent event) {
              Object object = event.getSource();
              if (object == btnSelect) {
    isSelected = true;
    selectedFont = constructFont();
         dispose();
    } else if (object == btnCancel) {
         selectedFont = null;
    selectedBackground = null;
    selectedForeground = null;
    dispose();
         public void itemStateChanged(java.awt.event.ItemEvent event) {
              Object object = event.getSource();
              if (object == isBold) showFont.setFont(constructFont());
              else if (object == fontList) showFont.setFont(constructFont());
              else if (object == isItalic) showFont.setFont(constructFont());
              else if (object == fontSize) showFont.setFont(constructFont());
         public void adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
              Object object = event.getSource();
    constructFont();
    showFont.setBackground(new Color(rBackground.getValue(), gBackground.getValue(), bBackground.getValue()));
    showFont.setForeground(new Color(rForeground.getValue(), gForeground.getValue(), bForeground.getValue()));
    if (object == rBackground) rBackValue.setText(""+rBackground.getValue());
              else if (object == gBackground) gBackValue.setText(""+gBackground.getValue());
              else if (object == bBackground) bBackValue.setText(""+bBackground.getValue());
              else if (object == rForeground) rForeValue.setText(""+rForeground.getValue());
              else if (object == gForeground) gForeValue.setText(""+gForeground.getValue());
              else if (object == bForeground) bForeValue.setText(""+bForeground.getValue());

    Okay, that's better. It would have been nice if the code was formatted, and if there was about 20% of that code. (Your example could have been just one JLabel and nothing else, for example.)
    Anyway, now that you've posted that code, what is your question about it? I see you are calling a "getAvailableFontFamilyNames" method; do you have a question about that? If so, what is the question?

  • How to write code for save file directory?

    how to write code for save file directory?

    how to find usa timezone code using java swing?
    i have some code help me
    public class ItsInitializer {
    private static boolean s_initialized = false;
    private ItsInitializer() {
    public static synchronized void initialize() {
    if (!s_initialized) {
    // Modifies default time zone, disables Daylight Saving Time.
    TimeZone l_defaultTimeZone = TimeZone.getDefault();
    int l_rawOffset = l_defaultTimeZone.getRawOffset();
    String l_id = l_defaultTimeZone.getID();
    SimpleTimeZone l_simpleTimeZone = new SimpleTimeZone(l_rawOffset,
    l_id,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0);
    TimeZone.setDefault(l_simpleTimeZone);
    s_initialized = true;
    2.
    long timeMillis = ...;
    long time = timeMillis / 1000;
    String seconds = Integer.toString((int)(time % 60));
    String minutes = Integer.toString((int)((time % 3600) / 60));
    String hours = Integer.toString((int)(time / 3600));
    for (int i = 0; i < 2; i++) {
         if (seconds.length() < 2) {
              seconds = "0" + seconds;
         if (minutes.length() < 2) {
              minutes = "0" + minutes;
         if (hours.length() < 2) {
              hours = "0" + hours;
    3.
    import java.text.SimpleDateFormat;
    import java.util.Date;
    public class Convert {
    public String getDateTime(String pattern){
    SimpleDateFormat sdf = new SimpleDateFormat(pattern);
    return sdf.format(new Date());
    * @param args
    public static void main(String[] args) {
    Convert con = new Convert();
    System.out.println(con.getDateTime("hh:mm:ss"));
    5.import java.text.SimpleDateFormat;
    import java.util.Date;
    public class Convert {
    public String getDateTime(String pattern){
    SimpleDateFormat sdf = new SimpleDateFormat(pattern);
    return sdf.format(new Date());
    * @param args
    public static void main(String[] args) {
    Convert con = new Convert();
    System.out.println(con.getDateTime("hh:mm:ss"));
    [ November 23, 2005: Mess
    private Locale locale = Locale.US;
    private static final String[] tzStrings = {
    "America/New_York",
    "America/Chicago",
    "America/Denver",
    "America/Los_Angeles",
    Date now = new Date();
    for ( TimeZone z : zones) {
    DateFormat df = new SimpleDateFormat("K:mm a,z", locale);
    df.setTimeZone(z);
    String result = df.format(now);
    System.out.println(result);
    String date="05/19/2008 04:30 AM (EST)";
                   SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm aaa (z)");
                   TimeZone.setDefault(TimeZone.getTimeZone("PST"));
                   long millis = sdf.parse(date).getTime();
                   sdf.setTimeZone(TimeZone.getDefault());
                   System.out.println(sdf.format(new Date(millis)));
    [ November 23, 2005: Mes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Transcation code for error messages

    hi all,
    what is the transaction code for getting the system error messages?And how can I create my own error messages?
    for eg: in a program, i want to show an error message to the user when the data is not showing up properly.
    thnx,

    Hi Sey Ni,
    <i>what is the transaction code for getting the system error messages?</i>
    Transaction code :- St22 
    For Short dumps and system errors
    <i>And how can I create my own error messages?</i>
    Transaction code :- Se91
    To check ny Existing 1 :-
    Message class - XS 
    Message Number - 001
    To create ur Own
    Create a Message Class ex:- Zmsg , click on Message tab
    here u can give message in front of number assigned say 001.
    check the following link:-
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/801b3e454211d189710000e8322d00/frameset.htm
    U can call this message in ur ABAP program as under:-
    if sy-subrc = 0.
    MESSAGE <b>E</b>001(<b>zmsg</b>)."
    endif.
    E - Error message.  I - Information message.   S - Sucess message...
    001 - Msg. Number.
    Zmsg - Message Class.
    Press F1 for more help on message.
    Regards
    Sachin Dhingra

  • How to find code responsible  Error Message generated in MIRO transaction

    Hi Gurus,
                    I have to find the code responsible for generating ERROR message in Miro tcode through DEBUGGING. Let me tell you the case...................
    In MIRO,
    We input
    In Basic data tab,
    Invoice Date,
    Posting Date,
    Reference,
    PO no. &
    Tax code as V5 ( VAT @ 8% )  in item data  & then
    In Details tab,
    We enter Business Area    & then
    In Payment Tab
    Baseline date        & then
    In Basic data tab
    We check the check box for Calculate tax &
    entered Amount     & then click entered .
    It displays GREEN button.
    When we click Simulate button & click post then it shows 1 message that " Invoice document still contains messages .".
    And then if we click Messages Button it shows " MSG No. & text -  Enter Bussiness area ."
    So the problem is though we input Business Area , still it shows message Enter Business area.
    So plz tell me how to find that code responsible for error message.

    Ashish- It is because, the error message is called using function module / BAPI. But Ideally when a developer codes to populate the structure of type BAPIRET2, he.she should also follow the following rule, to make the message traceable:
    "Populate BAPI structure for error message
    "Following code will not get called, but is for documentation for traceability.
    if 1 = 2.
      message e004.
    endif.
    That is why i said in my comment, if it is "coded properly" then we will be able trace
    Bottom line: you will not be able to find the program line using this approach.
    But now since you now the error message and number, you can go to the underlying program of MIRO (SAPLMR1M and SAPLFDCB)..click on the find button on the application toolbar, enter the message# and find..PLEASE SELECT THE RADIO BUTTON "In the main program".
    Hope this helps.
    Sajan Joseph.

  • How to create code for an additional field in an info set

    Hello,
    I have an info set in tra SQ02 and the area is HCM with version ERP2004.
    I need to create an additional field to show "Work permit" in ad hoc queries. I know that the infotype 0016 has a standard field P0016-ARBER which contains a date if that person has a work permit. System should select the latest record or the one which is valid during reporting period.
    The requirement for this new field is that it should just has X if the field P0016-ARBER contains a date (i.e. that person has a work permit). If the field  P0016-ARBER is empty, then the new field "Work permit" is also empty. So, the date itself is not enough.
    I am not an abaper. I have tried to create a code for my field but there is always problems with the code. I have tried without the line<i>into</i> but checker says I need to. I have tried different places for statement ENDSELECT but without success. How should I do this?
    What I have so far is (TYOLUPA = Work permit) is shown below:
    select SINGLE ARBER
    into TYOLUPA
    from PA0016
    where pernr = P0016-pernr
    and ENDDA = '31129999'.
    clear TYOLUPA.
    if ARBER ne ''.
    then TYOLUPA = 'X'.
    endif.
    Thanks for your advice!
    Regards,
    Pipsa

    pia,
    In extras tab  create column "workpermit" in infoset and add that column to Field groups.
    Then under record processing event...
    DATA : TYOLUPA like PA0016-ARBER.
    Under Record processing event.
    select SINGLE ARBER
    into TYOLUPA
    from PA0016
    where pernr = P0016-pernr
    and ENDDA = '31129999'.
    if  TYOLUPA  ne ' '.
      WORKPERMIT = 'X'.
    endif.
    Don't forget to reward if useful...

  • Check disk for errors caused data lost

    in the past few weeks i was hearing some weired sounds coming from my laptop, so a friend recommended using "check disk local for errors"
    it took a few hours. but when it finished, i found out that i lost 7GB of data (movies,images,pdf.....) from my USER folder but disk c; didn't gain any free space, which means that i still have my files but they are hidden somewhere.
        -could someone please tell me how to retrieve them?¿?¿¡¡¡

    This is an indication your HDD has bad sectors.  This is the loss of the magnetic properties of the platter and cannot be fixed by Windows.  Suggest you replace you HDD As Soon As Possible (ASAP).
    You may be able to rescue the existing data by using a professional HDD data recovery utility or service but there is no guarantee your HDD data can be rescued.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

  • Checking code for SAP USER EXIT

    we have enhanced SAP given data-source 2LIS_XX_XXXXX, there are hard coded user exits for this extractor. How to debug the code for enhancements?
    I know we enhance data-source in CMOD....SAPLRSAP001 (transactional data)....SAPLRSAP002(attributes)

    Hi Monica,
    There are many ways to debug the code if you wish to enhance the DataSource. In RSA3 you can do that by clicking Debug mode option. This is already been suggested by Srini.
    I would like to give you another way to do so.
    If you want to enhance the Transcational data then you need to choose EXIT_SAPLRSAP_001 component of RSAP001 enhancement. It has 4 component for master data( Text, hierarchy...etc).
    This is a function module enhancement. If you goto the source code of the function module, you will find an include program i.e. ZXRSAU01. double click on this program which will take you to the body of the program. This is the place where you need to write code.
    here you need to write the code as follows.
    case i_datasource.
    when '2LIS_XX_XXXXX'.
    Now here you can set a break point. This can be soft or hardcoded break point if you need to debug.
    Better Hardcode it. Write
    BREAK-POINT or BREAK username.
    Now when you execute the DS through RSA3, The program will stop here. The data extracted from DS will be available in an internal table C_T_DATA. Now you can enhance this by writing code. Again you can debug by pressing F5 or F6. This is as usual the way you debug an ABAP program.
    Hope this helps. If you need any further help contact at [email protected]
    Give reward point if you're satisfied.
    Happy debugging....
    cheers,
    Message was edited by: tapan tripathy

  • Installed ram, how to check it for faults?

    I've ordered my first Mac, (27 inch iMac) and I've ordered some ram to install in the iMac when it arrives.
    I was wondering, how do I check the installed ram for faults?
    Is there a application etc with Mountain Lion that would allow me to do this?
    Thanks

    shldr2thewheel wrote:
    tal1971 wrote:
    I was wondering, how do I check the installed ram for faults?
    Is there a application etc with Mountain Lion that would allow me to do this?
    the apple hardware test (AHT)
    I've had a look at the link but couldnt see any mention if it checked ram for faults. Can you confirm that it does check ram for faults?
    Thanks for the help, appreciate it.

Maybe you are looking for

  • Pixel Bender Plug-in for Photoshop CS5 now available!

    download and more info at: http://labs.adobe.com/technologies/pixelbenderplugin/

  • Can't view movie trailers with iTunes 7.1

    I am trying to view trailers. I click the "view trailer" button, a screen appears telling me it's loading, it goes and goes for awhile. Then, it appears that the screen changes for a split second and has a preview window in it, but then instantly rev

  • Numbering Headings in the PDF output

    RoboHelp HTML 6 To create the RoboHelp project, I imported a Word document, which created a topic for each heading. Now, besides HTML help, I want to generate printed documentation in PDF. How can I create numbered headings (e.g. 1, 1.1, 1.1.4 etc) i

  • How to export the comp/interface

    Hi all, Can anyone tell me how to export the existing Component/interface to the local hard disk in Webdynpro for ABAP.. thanks, viswa

  • Album artwork & ipod

    I've downloaded the latest version of iTunes (on 28 Jan 2007) and want to programme it so that album artwork shows on my iPod. I've followed all the instructions I can find but they all tell me to check the box saying "display album artwork on iPod".