Error in Jpanel add function in a loop...^Urgent^

I have higlighted the error part as below code, i would appreciate if you can help ....thank you
Jpanel p1
p1.removeAll();
                                    p1.add(t_label);
                  p1.add(menuBar); 
                     try{
                     FileReader f= new FileReader(filename2);
                     BufferedReader b= new BufferedReader(f);
                     String s;
                     fileExtension = new JLabel("File Extension",Label.LEFT);
                     contents = new JLabel("Cotent Type",Label.LEFT);
                     fileExtension.setBounds(new Rectangle(10, 50, 100, 30));
                     contents.setBounds(new Rectangle(150, 50, 100, 30));
                     int space=50;
                     while((s=b.readLine())!=null)
                         System.out.println(s);
                         space=space+40;
                         StringTokenizer st2 = new StringTokenizer(s,";");
                         System.out.println(st2.nextToken());
                          System.out.println(st2.nextToken());
                         txtFld[n]=new JTextField();
                         txtFld[n].setText(st2.nextToken());
                         txtFld[n].setBounds(new Rectangle(10, space, 100, 30));
                         txtF[n]=new JTextField();
                         txtF[n].setText(st2.nextToken());
                         txtF[n].setBounds(new Rectangle(150, space, 100, 30));
                         p1.add(txtFld[n]);<<<<Error to add in to Jpanel
                         p1.add(txtF[n]);<<<<Error to add in to Jpanel
                         n++;
                     p1.add(fileExtension);
                     p1.add(contents);
                     p1.repaint();
                     f.close();
                     catch(Exception ef)
                         System.out.println("File read in error.");
                     }

The error message as below:
java.lang.NullPointerException
at mypkg.gui.actionPerformed(gui.java:227)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Similar Messages

  • Error on calling JavaScript function... Urgent--Plzz Help...

    i want the pass the value that is input in the text box to the JSP function.
    But it gives the JavaScript error on Clicking of 'Go'.
    The error is
    "Object doesnt support this property or method" for the second line i have shown here (the line with onclick method)
    <td class="headingOne"> <input type="text" Name="AccountID" value=""/></td>
    <td class="headingOne"> <input type="button" value="Go" onclick="Account_Filter(document.Form1.AccountID.Value())"></td>
    Can anybody plz help me out?... Is there any syntax error in the line??

    try it with out the parens:
    <td class="headingOne"> <input type="button" value="Go" onclick="Account_Filter(document.Form1.AccountID.Value)"></td>

  • ORA-00902: invalid datatype comile error while using CAST function

    Hi everyone,
    I'm getting ORA-00902: invalid datatype compilation error while using CAST function.
    open ref_cursor_list for select empName from TABLE(CAST(part_t AS partnumberlist));
    The partnumberlist and ref_cursor_list is declared in the Package spec as given below.
    TYPE ref_cursor_list IS REF CURSOR;
    TYPE partnumberlist IS TABLE OF emp.empName%TYPE;
    The error points the partnumberlist as invalid datatype in TOAD because of this i'm unable to compile the package.
    Any suggestion
    Thanks and regards
    Sathish Gopal

    Here is my code for
    package Spec
    CREATE OR REPLACE PACKAGE "HISTORICAL_COMMENTZ" AS
    TYPE prior_part_data_record IS RECORD (
    prior_part_row_id PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE,
    prior_pgm_chng_s_id PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE
    TYPE parts_list IS TABLE OF prior_part_data_record;
    --TYPE parts_list IS TABLE OF NUMBER;
    TYPE partnumberlist IS TABLE OF PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE;
    TYPE partnumber_cursor IS REF CURSOR;
    TYPE comment_record IS RECORD (
    pgm_s_id                     PGM_PART_CMNT.PGM_S_ID%TYPE,
    part_row_s_id                PGM_PART_CMNT.PART_ROW_S_ID%TYPE,
    pgm_chng_s_id                PGM_PART_CMNT.PGM_CHNG_S_ID%TYPE,
    cmnt_txt                     PGM_PART_CMNT.CMNT_TXT%TYPE,
    cmnt_dt                     PGM_PART_CMNT.CMNT_DT%TYPE,
    updt_rsrc_id                PGM_PART_CMNT.UPDT_RSRC_ID%TYPE
    TYPE comment_list IS TABLE OF comment_record;
    global_pgm_s_id INTEGER := 0;
    global_part_row_s_id INTEGER := 0;
    err_num NUMBER := 999999;
    err_msg VARCHAR2 (250);
    PROCEDURE getComments (
    pgm_s_id IN NUMBER,
    part_row_s_id IN NUMBER,
    partnumber_cursorlist out partnumber_cursor);
    END;
    Package Body
    CREATE OR REPLACE PACKAGE BODY HISTORICAL_COMMENTZ
    AS
    FUNCTION getPriorPart
    (param_prior_pgm_chng_s_id IN PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE,
    return_prior_part_data_record IN OUT prior_part_data_record
    RETURN INTEGER
    IS
    retVal INTEGER;
    prior_part_row_id INTEGER;
    prior_pgm_chng_s_id INTEGER;
    local_prior_part_data_record prior_part_data_record;
    BEGIN
    SELECT PR_PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
    INTO local_prior_part_data_record
    --SELECT PR_PART_ROW_S_ID INTO retVal
    FROM PGM_RPLCMNT_PART
    WHERE PGM_S_ID = global_pgm_s_id AND CUR_PGM_CHNG_S_ID = param_prior_pgm_chng_s_id;
    return_prior_part_data_record := local_prior_part_data_record;
    retVal := 0;
    RETURN retVal;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    retVal := -1;
    RETURN retVal;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    retVal := -1;
    RETURN retVal;
    END getPriorPart;
    FUNCTION getComment (found_parts_list IN parts_list, comments OUT comment_list)
    RETURN INTEGER
    IS
    CURSOR init_cursor
    IS
    SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
    FROM PGM_PART_CMNT WHERE 1 = 2;
    retVal INTEGER;
    indexNum PLS_INTEGER;
    local_part_record prior_part_data_record;
    local_comment_record comment_record;
    local_part_row_s_id NUMBER;
    i PLS_INTEGER;
    BEGIN
    OPEN init_cursor;
    FETCH init_cursor
    BULK COLLECT INTO comments;
    i := 0;
    indexNum := found_parts_list.FIRST;
    WHILE indexNum IS NOT NULL
    LOOP
    local_part_record := found_parts_list(indexnum);
    local_part_row_s_id := local_part_record.prior_part_row_id;
    SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
    INTO local_comment_record FROM PGM_PART_CMNT
    WHERE PGM_S_ID = global_pgm_s_id
    AND PART_ROW_S_ID = local_part_row_s_id;
    comments(i) := local_comment_record;
    i := i + 1;
    END LOOP;
    RETURN retval;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    RETURN retval;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    RETURN retval;
    END getComment;
    PROCEDURE getComments
    pgm_s_id IN NUMBER,
    part_row_s_id IN NUMBER,
    partnumber_cursorlist OUT partnumber_cursor)
    IS
    comment_recordlist comment_record;
    retPartnumberlist partnumberlist;
    found_parts_list parts_list;
    local_part_record prior_part_data_record;
    is_more_parts BOOLEAN;
    driver_chng_s_id NUMBER;
    num_parts NUMBER;
    retVal NUMBER;
    comments comment_list;
    returnPartnumberlist partnumberlist;
    iloopCounter PLS_INTEGER;
    inx1 PLS_INTEGER;
    part_t partnumberlist :=partnumberlist(100,200,300);
    CURSOR part_list_init_cursor
    IS
    SELECT PR_PART_ROW_S_ID,PR_PGM_CHNG_S_ID FROM PGM_RPLCMNT_PART WHERE 1 = 2;
    CURSOR inIt_cursor
    IS
    SELECT 0 FROM DUAL WHERE 1 = 2;
    BEGIN
    DBMS_OUTPUT.ENABLE (5000000);
    global_pgm_s_id := pgm_s_id;
    global_part_row_s_id := part_row_s_id;
    SELECT PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
    INTO local_part_record
    FROM PGM_RPLCMNT_PART
    WHERE PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id AND
    CUR_PGM_CHNG_S_ID IN (SELECT MAX(CUR_PGM_CHNG_S_ID) FROM PGM_RPLCMNT_PART WHERE
    PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id
    GROUP BY PART_ROW_S_ID);
    OPEN part_list_init_cursor;
    FETCH part_list_init_cursor
    BULK COLLECT INTO found_parts_list;
    -- Add the existing part to the found list
    found_parts_list.EXTEND;
    found_parts_list(1) := local_part_record;
    driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
    num_parts := 1;
    is_more_parts := TRUE;
    WHILE (is_more_parts) LOOP
    retVal := getPriorPart(driver_chng_s_id,local_part_record);
    IF (retVal != -1) THEN
    found_parts_list.EXTEND;
    num_parts := num_parts + 1;
    found_parts_list(num_parts) := local_part_record;
    driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
    ELSE
    is_more_parts := FALSE;
    END IF;
    END LOOP;
    --num_parts := getComment(found_parts_list,comments);
    OPEN init_cursor;
    FETCH init_cursor
    BULK COLLECT INTO returnPartnumberlist;
    num_parts := found_parts_list.COUNT;
    FOR iloopCounter IN 1 .. num_parts
    LOOP
    returnPartnumberlist.EXTEND;
    returnPartnumberlist(iloopCounter) := found_parts_list(iloopCounter).prior_part_row_id;
    END LOOP;
    retPartnumberlist := returnPartnumberlist;
    open
    *          partnumber_cursorlist for select PR_PART_ROW_S_ID from TABLE(CAST(retPartnumberlist AS historical_commentz.partnumberlist));*                              
    DBMS_OUTPUT.put_line('Done....!');
    EXCEPTION
    some code..............................
    END getComments;
    END HISTORICAL_COMMENTZ;
    /

  • Works with normal = declaration but not with .add() function call? Why?

    I still have some problems in relation to my earlier post:
    http://forum.java.sun.com/thread.jspa?threadID=5164571&tstart=0
    Help is still warmely appreciated! Thanks already to you Franzis.
    So I try to add several JScrollPanes into on Container variable allComponents.
    I don't understand why in my program
    allComponents = jspane;works but
    allComponents.add(jspane);does not.
    Same is true for Jpanel objects. In my program
    allComponents = panel;works but
    allComponents.add(panel);does not. Why is this?
    Still I necessarily need to work with a add() function.
    So where is the problem?
    The whole source code is at:
    http://forum.java.sun.com/thread.jspa?threadID=5164571&tstart=0
    Message was edited by:
    wonderful123
    null

    I added a response in your original message:
    http://forum.java.sun.com/thread.jspa?messageID=9629812
    Let's keep to it since splitting things across two posts might be confusing.

  • Functions in a Loop

    I'm trying to create multiple Functions inside a Loop. Can I not do this?
    for (var i:Number = 1; i<5; i++)
      function this["closeButOut"+i](event:MouseEvent)
                                  closeBar["but0" + i].gotoAndStop(1);
    I essentially want to make 4 Functions called closeButOut1, closeButOut2, closeButOut3 and closeButOut4.
    This is the error message I get:
    1084: Synax error: expecting identifier before this.
    1084: Syntax error: expecting leftparen before rightbracket.

    Sorry, it should look like this:
    for (var i:Number = 1; i<5; i++)
    closeBar["but0" + i].addEventListener(MouseEvent.ROLL_OUT, this["closeButOut"+i])
      function this["closeButOut"+i](event:MouseEvent)
                                  closeBar["but0" + i].gotoAndStop(1);
    When I tried your change, it seemed to accept it, but the listener doesn't recognize it as the same function it's looking for.

  • Error message: 1021: Duplicate function definition.

    Hi All,
    First let me start by saying that I know next to nothing about Flash.  I have inherited a website maintenance project that has a Flash rotating image banner.  I have managed to get the images to fade-in and fade-out correctly, but now I need to make these images clickable - linking images to pages in the website.  I have read many posts here and have reviewed the video tutorials.  I have been able to get the first image clickable using this AS3 action:
    mars_btn.addEventListener(MouseEvent.CLICK, buttonClickHandler);
    function buttonClickHandler(event:MouseEvent) :void {
            navigateToURL(new URLRequest("http://somewebsite/mars.php"));
            trace("I'm clicked");
    However, when I attempt to make another image clickable by using a different instance of a button I get the error message:
    1021: Duplicate function definition.
    I have a separate instance of a button with this AS3 action:
    jupiter_btn.addEventListener(MouseEvent.CLICK, buttonClickHandler);
    function buttonClickHandler(event:MouseEvent) :void {
            navigateToURL(new URLRequest("http://somewebsite/jupiter.php"));
            trace("I'm clicked");
    Obviously I'm not understanding how I'm supposed to do this so that I don't create a duplicate function definition.  Any help would be most appreciated.

    excuse me , I have a question i hope that you help .. ( im new in here )
    we were asked to create an interactive application on flash in two languages..
    so i created two different fla files same exact codings ... i was wondering how can i combine them so the viewer can be able to choose the language from a button ?
    when i try to combine them i get lots of errors of duplications in the actionscript
    PS : MY MAIN PAGE INCLUDES A CAROUSEL with images ..
    I was thinking of saving one of the fla  as a movie and then add it some how to the second fla and combine it with a button but i can't figure it how..
    i hope i was clear enough.. but is there any possibility to help me please ?!
    when i tend to change names or something it creates error.. ( IM NOT A PRO IN AS3 ) and when i dublicate the scenes it give duplication errors.. WHAT IS THE SOLUTION ??
    this is the code of the actionscript in the main page.. ( the carousel's code i took from someone ) and i used it on my project
    import com.ccanvas.carousel.*;
    var centerX:Number = stage.stageWidth/4;
    var centerY:Number = stage.stageHeight/4;
    var carc:Carousel = new Carousel(centerX, centerY, 256, 75, "icons.xml");
    carc.addTooltip(new tooltip); // use 'tooltip' movieclip for item tooltip
    addChild(carc); // add carousel to stage
    function down(event:MouseEvent):void {
    trace(event.currentTarget.toolText); // simple click interaction
    function destroyCarousel(event:MouseEvent):void {
    carc.destroy(); // remove all item in carousel as well as tooltip
    function removeNextItem(event:MouseEvent):void {
    if(carc.numOfItems > 2) {
      carc.removeItem(2); // remove the item next to the remove item icon
    create.addEventListener("mouseDown", createCarousel);
    function createCarousel(event:MouseEvent):void {
    if(carc.CREATED == false) {
      // recreate the carousel
      carc = new Carousel(centerX, centerY, 256, 75, "icons.xml");
      carc.addTooltip(new tooltip);
      addChild(carc);
    }/* Click to Go to Scene and Play
    Clicking on the specified symbol instance plays the movie from the specified scene and frame.
    Instructions:
    1. Replace "Scene 3" with the name of the scene you would like play.
    2. Replace 1 with the frame number you would like the movie to play from in the specified scene.
    Tools_button.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene);
    function fl_ClickToGoToScene(event:MouseEvent):void
    MovieClip(this.root).gotoAndPlay(1, "Toolse");
    }/* Click to Go to Scene and Play
    Clicking on the specified symbol instance plays the movie from the specified scene and frame.
    Instructions:
    1. Replace "Scene 3" with the name of the scene you would like play.
    2. Replace 1 with the frame number you would like the movie to play from in the specified scene.
    games_button.addEventListener(MouseEvent.CLICK, fl_ClickToGoToGames);
    function fl_ClickToGoToGames(event:MouseEvent):void
    MovieClip(this.root).gotoAndPlay(1, "Gamese");
    }/* Click to Go to Scene and Play
    Clicking on the specified symbol instance plays the movie from the specified scene and frame.
    Instructions:
    1. Replace "Scene 3" with the name of the scene you would like play.
    2. Replace 1 with the frame number you would like the movie to play from in the specified scene.
    Identity_button.addEventListener(MouseEvent.CLICK, fl_ClickToGoToIdentity);
    function fl_ClickToGoToIdentity(event:MouseEvent):void
    MovieClip(this.root).gotoAndPlay(1, "Identitye");
    }/* Click to Go to Scene and Play
    Clicking on the specified symbol instance plays the movie from the specified scene and frame.
    Instructions:
    1. Replace "Scene 3" with the name of the scene you would like play.
    2. Replace 1 with the frame number you would like the movie to play from in the specified scene.
    Reviews_button.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_13);
    function fl_ClickToGoToScene_13(event:MouseEvent):void
    MovieClip(this.root).gotoAndPlay(1, "Reviewse");
    }/* Click to Go to Scene and Play
    Clicking on the specified symbol instance plays the movie from the specified scene and frame.
    Instructions:
    1. Replace "Scene 3" with the name of the scene you would like play.
    2. Replace 1 with the frame number you would like the movie to play from in the specified scene.
    Facts_button.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_20);
    function fl_ClickToGoToScene_20(event:MouseEvent):void
    MovieClip(this.root).gotoAndPlay(1, "Factse");

  • Communication error with the LOCAL_EXEC Function BAPI_PTMGREXTATTABS_CHECK

    Hello,
    We use timesheet (CATS) in a separate SAP system from the SAP system in which HR resides.
    I found out how the loosely coupled scenario with CATS works with a SAP HR system. We transfer the workschedule and absence data with report RPTIMEOVERVIEW_REPLICATE to the SAP system in which CATS is used. This data is then available in the PTIMEOV1 table to perform time checks in CATS. The distribution model for ALE takes care of the fact that the data is posted into table PTIMEOV1. With BD97 I set up that the BAPI: PTMGREXTATTABS.CHECK has RFCdestination for synchronous calls  = LOCAL_EXEC.
    When I want to record on an attendance code without clock times then the above works fine. The SAP system in which CATS resides looks into table PTIMEOV1. So far so good.
    However, when I want to record hours WITH clock times then I cannot save the data. The error message HRTIM00CATS667 shows up:
    "Communication error with the LOCAL_EXEC Function BAPI_PTMGREXTATTABS_CHECK is no t available  system"
    Diagnosis
    An error has occured during communication with the HR System. The HR data in the time sheet cannot be validated.
    From the error message description it seems that it wants to check the SAP HR system instead of looking for the check in the SAP system in which CATS resides.....
    When I change the value from LOCAL_EXEC to the system in which HR resides then the error disappears, but then it really checks into the SAP HR system (synchronous check with that SAP HR system) and that is not what the customer wants. The check should be local on the PTIMEOV1 table (in case the SAP HR system is down).
    I did not find any OSS notes on the topic....or other info on SDN.
    Can anyone help me out concerning this starnge error message, at least for me?
    Thanks very much in advance,
    Kind regards,
    Mirko

    "A point to add"
    I just noticed that following message is being continously receiving in the database alert_log:
    Sat Oct 9 16:04:52 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:05:32 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:06:30 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:07:10 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:09:35 2010
    Incremental checkpoint up to RBA [0x1d.1f9928.0], current log tail at RBA [0x1d.1f9a79.0]
    Sat Oct 9 16:11:52 2010
    WARNING: inbound connection timed out (ORA-3136)
    Sat Oct 9 16:29:40 2010
    Incremental checkpoint up to RBA [0x1d.1f9b87.0], current log tail at RBA [0x1d.1f9bf4.0]
    ~
    Please help.

  • Error in Vendor Partner Function

    Hello,
    I am getting an  error while maintainin Partner Function DP -Delivery Plant for vendor MAster data,
    Actually when I am maintaing the Partner function DP in EN logon langauge it is allowing to maintain while when maintain the same Partner function DP in Italian Langauge it is giving error message
    The following error message is translated to english
    Enter a valid role of partners
    N.messaggio ME351
    diagnosis
    The partner functions contained in the scheme entered is not L1, which is attributed to the type of document purchases.
    procedure
    Insert a partner functions defined in the schema partners (you can view via the help function allowed values​​), or add the schema L1 partner functions in the customizing Purchase.
    Please help me to resolve this issue.
    SAGAR

    Hi,
    Error show no valid role of partner role in vendor account group.
    Why you are using partner schema L1
    1st assign Partner Function DP -Delivery Plant (partner role) to vendor  account group(ZV01) in following path:
    SPRO->MM->Purchasing->Partner Determination-> partner roles->Permissible partner roles per account group
    Now define partner schemas (Z111) & keep partner function u201CDPu201D under partner schemas Z111 in following path:
    SPRO->MM->Purchasing->Partner Determination->Partner setting in Vendor master record-> Define partner Schema
    Then, assign partner schemas Z111 to vendor  account group(ZV01) in following path:
    SPRO->MM->Purchasing->Partner Determination->Partner setting in Vendor master record-> Assign partner schema to account Group
    Regards,
    Biju K

  • Add functionality for enter and close in a dialogue window

    Hi
    I have a dialogue screen.
    On pressing enter or the enter icon I need some functionality.
    And on clicking the close icon or close(on the dialogue window) i need to exit.
    How to add functionality to close and enter?
    (The icons are functioning properly but Enter and close are not functioning)
    Here is the code i have used
    gv_save = gv_code.
    CLEAR gv_code.
    CASE gv_save.
    WHEN 'OK' OR 'ENTER'.
    PERFORM char_convert.
    LOOP AT object_tab WHERE selected = 'X'.
    UPDATE imptt SET pyear = gv_exponent
    WHERE point = object_tab-point.
    ENDLOOP.
    LEAVE TO SCREEN 0.
    CLEAR gv_annual.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_1001 INPUT
    MODULE cancel INPUT.
    gv_save = gv_code.
    CLEAR gv_code.
    CASE gv_save.
    WHEN 'CANCEL'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    Please help me .
    Best regards,
    Kranthi

    You need to take ABAP help and build logic, so that If so & so condition pick LOGO1
    and for so & so Condition LOGO2 & for rest LOGO3.
    You need to incoroporate the Logic in your program for Script / Smartform.

  • Error in pipe row function.

    Hi,
    I wrote the below function,if i select the functions,it returns below error
    create or replace
    FUNCTION FUN_CHR_SEP(P_FLAG IN VARCHAR2)
    RETURN COLS_VAL PIPELINED
    AS
    cursor C_CHR_SEP is
    select text from
    (SELECT SUBSTR(
    txt,
    INSTR(',' || txt,',',1,LEVEL),
    INSTR(txt || ',',',',1,LEVEL) - INSTR(',' || txt,',',1,LEVEL)
    ) TEXT
    from (select P_FLAG TXT from DUAL) T
    connect by level <= length(TXT)-length(replace(TXT,',')) + 1);
    BEGIN
    for REC in C_CHR_SEP LOOP
    PIPE ROW (CHR_COLS_VAL(REC.text));
    END LOOP;
    END;
    select * from table(cast(FUN_CHR_SEP('A,C,V,B') as COLS_VAL));
    Error:
    ORA-06503: PL/SQL: Function returned without value
    ORA-06512: at "SHIPLUS.FUN_CHR_SEP", line 18
    Note : CHR_COLS_VAL and COLS_VAL are Type.
    Regards,
    Fame

    This is the forum for SQL Developer (Not for general SQL/PLSQL questions), you should ask your question in the SQL and PL/SQL forum.
    Having said that, your function has no return statement.

  • Pass TestStand error type directly into function parameter

    Hi,
    I am using TestStand 4 and Labwindows CVI 8.5.
    I wonder if it is possible to pass Standard Step error type into CVI function parameters.
    I think it would be more simple to pass one parameter instead of passing Error code, Error occurred state and Error message into function prototype.
    I tried to use tsErrorDataType struct defined into tsutil.h into my function prototype.
    In TestStand, I pass Step error type into function parameter but it does not work.
    TestStand displays an error meaning parameters does not match function prototype.
    Thank you for your help.

    Hi Tartempion,
    In order to pass the TestStand Error Container as one parameter to a function in a CVI DLL, you must use a struct that is typedef'ed and create an .fp file that is included as a type library for the DLL. When you create a .fp file to add to a DLL, the DLL will not build unless all structs/enums are typedef'ed. Thus, I wouldn't advise using the tsutil.h because you would have to go through and typedef every single struct and enum in the header file.
    Instead, you can simply create a typedef'ed struct in your projects header file and create an .fp file with the struct specified as a data type. Then in TestStand, when you call the function you would need to ensure that the parameter is of Category "C Struct", and type "Error". The attached zip file contains a CVI 8.5 project that demonstrates this along with a TestStand 4.0 sequence file that demonstrates how to pass the parameter to the function by reference. In case you run into trouble creating the .fp file please refer to the following KnowledgeBase. The instructions are for enums but easily correspond to structs as well:
    TestStand and LabWindows/CVI Enumeration Data Types
    Hope this helps!
    Manooch H.
    National Instruments
    Attachments:
    PassTSError.zip ‏19 KB

  • Error 2147500037 returned by function MAPIResolveName

    I am getting this error when i am sending  a mail
    MAPI Destination
    Error 2147500037 returned by function <MAPIResolveName>
    its Crystal Report 8.5 with SP3
    Windows Server 2008 R2 Standard
    Windows LIve Mail
    Please suggest

    Upgrade to Crystal Reports 2008 SP 3 and install [Fix Pack 3.5|https://smpdl.sap-ag.de/~sapidp/012002523100006341722011E/cr2008fp35.exe] and then it supports Windows Office 2007 Extended MAPI API's. Microsoft deprecated the Simple MAPI API's in in Office 2007 and above.
    Not supported in CR 8.5, it is 10 years old. Only other option is to ask Microsoft to add the simple MAPI API's back into their new Office Products that use MAPI.
    Thank you
    Don

  • Error in running a function to convert coordinates in degrees to decimal for EXCEL VBA

    For your information, I have 3 cross-posts regarding this question - and all I can said there is still no firm solution regarding this error.
    1) http://stackoverflow.com/questions/27634586/error-in-running-a-function-to-convert-coordinates-in-degrees-to-decimal-for-exc/27637367#27637367
    2) http://www.mrexcel.com/forum/excel-questions/826099-error-running-function-convert-coordinates-degrees-decimal-excel-visual-basic-applications.html#post4030377 
    3) http://www.excelguru.ca/forums/showthread.php?3909-Error-in-running-a-function-to-convert-coordinates-in-degrees-to-decimal-for-EXCEL-VB&p=16507#post16507
    and the story of the error is as below:
    Currently I am working on VBA excel to create a widget to verify coordinates whether it lies under the radius of ANOTHER predefined and pre-specified sets of coordinates.
    In the module, I want to convert the coordinates from degrees to decimal before doing the calculation - as the formula of the calculation only allow the decimal form of coordinates.
    However, each and every time I want to run the macros this error (Run-time error '5', invalid procedure call or argument) will appear. Then, the debug button will bring me to below line of coding:
    degrees = Val(Left(Degree_Deg, InStr(1, Degree_Deg, "°") - 1))
    For your information, the full function is as below:
    Function Convert_Decimal(Degree_Deg As String) As Double
    'source: http://support.microsoft.com/kb/213449
    Dim degrees As Double
    Dim minutes As Double
    Dim seconds As Double
    Degree_Deg = Replace(Degree_Deg, "~", "°")
    degrees = Val(Left(Degree_Deg, InStr(1, Degree_Deg, "°") - 1))
    minutes = Val(Mid(Degree_Deg, InStr(1, Degree_Deg, "°") + 2, _
    InStr(1, Degree_Deg, "'") - InStr(1, Degree_Deg, "°") - 2)) / 60
    seconds = Val(Mid(Degree_Deg, InStr(1, Degree_Deg, "'") + _
    2, Len(Degree_Deg) - InStr(1, Degree_Deg, "'") - 2)) / 3600
    Convert_Decimal = degrees + minutes + seconds
    End Function
    Thank you.
    Your kind assistance and attention in this matter are highly appreciated.
    Regards,
    Nina.

    You didn't give an example of your input string but try the following
    Sub test()
    Dim s As String
    s = "180° 30' 30.5""""" ' double quote for seconds
    Debug.Print Deg2Dec(s) ' 180.508472222222
    End Sub
    Function Deg2Dec(sAngle As String) As Double
    Dim mid1 As Long
    Dim mid2 As Long
    Dim degrees As Long
    Dim minutes As Long
    Dim seconds As Double ' or Long if only integer seconds
    sAngle = Replace(sAngle, " ", "")
    mid1 = InStr(sAngle, "°")
    mid2 = InStr(sAngle, "'")
    degrees = CLng(Left$(sAngle, mid1 - 1))
    minutes = CLng(Mid$(sAngle, mid1 + 1, mid2 - mid1 - 1))
    seconds = Val(Mid$(sAngle, mid2 + 1, 10)) ' change 10 to 2 if only integer seconds
    Deg2Dec = degrees + minutes / 60 + seconds / 3600
    End Function
    As written the function assumes values for each of deg/min/sec are included with unit indicators as given. Adapt for your needs.
    In passing, for any work with trig functions you will probably need to convert the degrees to radians.

  • Error in Calendar.add (almost) evey last Monday of March

    Is the following a known bug? I am running under Windows 2000 and using
    C:\jdk1.4>java -version
    java version "1.4.1"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
    Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
    * Filename: CalendarBug.java
    * Every last Monday of March (except those with a whole week after it),
    * gives a wrong result when subtracting 24 hours with the Calendar.add function.
    * These specific dates give -25 hours...
    * Selected output:
    * Set date: Mon Mar 26 00:00:00 CEST 2001
    * -->Adjusted 24 hours: Sat Mar 24 23:00:00 CET 2001
    * Set date: Mon Mar 25 00:00:00 CET 2002
    * Adjusted 24 hours: Sun Mar 24 00:00:00 CET 2002
    * Set date: Mon Mar 31 00:00:00 CEST 2003
    * -->Adjusted 24 hours: Sat Mar 29 23:00:00 CET 2003
    * Set date: Mon Mar 29 00:00:00 CEST 2004
    * -->Adjusted 24 hours: Sat Mar 27 23:00:00 CET 2004
    * Does anyone care to explain?
    * The result is the same when substituting seedDate.add(Calendar.HOUR,-24) with
    * - seedDate.add(Calendar.HOUR_OF_DAY,-24)
    * - seedDate.add(Calendar.MINUTE, -24*60)
    * Date Created: 25. september 2003 09:53:20
    * Written by: Skjalg Bjorndal
    import java.util.Calendar;
    import java.util.Date;
    import java.util.GregorianCalendar;
    public class CalendarBug {
        GregorianCalendar seedDate = new GregorianCalendar();
        public void lastMondayInMarch(int year, int month, int date) {
            System.out.println("   ------- Year: " + year + " ----------");
            for (int i = 0; i < 10; i++) {
                System.out.println("   ---------- " + i + " ----------");
                seedDate.set(year, month, date + i);
                seedDate.setTime(zeroTime(seedDate.getTime()));
                System.out.println("   Set date:          " + seedDate.getTime().toString());
                seedDate.add(Calendar.HOUR, -24);
                if (seedDate.get(Calendar.HOUR_OF_DAY) != 0) {
                    System.out.print("-->");
                } else {
                    System.out.print("   ");
                System.out.println("Adjusted 24 hours: " + seedDate.getTime().toString());
            System.out.println("");
        private Date zeroTime(Date date) {
            Calendar cal = Calendar.getInstance();
            cal.setTime(date);
            // Zero out time:
            cal.set(Calendar.HOUR_OF_DAY, 0);
            cal.set(Calendar.MINUTE, 0);
            cal.set(Calendar.SECOND, 0);
            cal.set(Calendar.MILLISECOND, 0);
            return cal.getTime();
        public static void main(String args[]) {
            CalendarBug aBug = new CalendarBug();
            aBug.lastMondayInMarch(2001, 2, 19);
            aBug.lastMondayInMarch(2002, 2, 18);     // OK - hole week after last Monday of month
            aBug.lastMondayInMarch(2003, 2, 24);
            aBug.lastMondayInMarch(2004, 2, 22);

    Thanks for both of your prompt replies!
    The number of hours to be subtracted is configurable in a property file in the program in which the problem arose. I.e. it could be 1, 23, 24, 120 or whatever...
    My solution will be to download 1.4.2, as kurisu1 pointed out would solve the problem.
    Until we tested the rest of the code with 1.4.2, I will reprogram and use the seedDate.add(Calendar.DATE, -1); as a temporary work around.
    Best regards
    __Skjalg

  • Oracle Proc in edmx via add function import is not working

    I have a mandate to call a external oracle package from my local oracle db proc using Entity Framework. I have created a synonym for that. When I am trying to polpulate the oracle procedure data in my mvc screen using odp.net. The screen is closing automatically when I am trying to retive the column info by clicking "get column information" under "Add Function Import" in model browser.
    Following is my code snipet
    1. created a oracle stored proc to call the external proc
    CREATE OR REPLACE PROCEDURE USP_GET_DETAILS
    IN_ID IN NUMBER,
    OUT_RESULT OUT SYS_REFCURSOR
    IS
    OUT_FED_TAX_ID_NO VARCHAR2(50);
    OUT_PARTY_ID_NO NUMBER;
    OUT_PARTY_TYP_CD NUMBER;
    BEGIN
    PKG_GET_DETAILS.USP_GET_DETAILS_INFO (IN_ID, OUT_FED_TAX_ID_NO, OUT_PARTY_ID_NO);
    OPEN OUT_RESULT FOR
         SELECT OUT_FED_TAX_ID_NO, OUT_PARTY_ID_NO FROM DUAL;
    END USP_GET_DETAILS;
    2. added the proc "USP_GET_DETAILS" using "Update model using database" in my edmx file
    3. Now proc has been added to my edmx file under SSDL
    <Function Name="USP_GET_DETAILS" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="BCS_OWNER">
    <Parameter Name="IN_ID" Type="number" Mode="In" />
    </Function>
    4. added following code to my web.config file
    <oracle.dataaccess.client>
    <settings>
    <add name="BCS_OWNER.USP_GET_DETAILS.RefCursor.OUT_RESULT" value="implicitRefCursor bindinfo='mode=Output'" />
    <add name="BCS_OWNER.USP_GET_DETAILS.RefCursorMetaData.OUT_RESULT.Column.0" value="implicitRefCursor metadata='ColumnName=OUT_FED_TAX_ID_NO;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    <add name="BCS_OWNER.USP_GET_DETAILS.RefCursorMetaData.OUT_RESULT.Column.1" value="implicitRefCursor metadata='ColumnName=OUT_PARTY_ID_NO;NATIVEDATATYPE=Number;ProviderType=Decimal'" />
    </settings>
    </oracle.dataaccess.client>
    5. underModel Browser try to add the procedure under "Add Import Function", select "Complex Type". when i am clicking on "Get column information" button, the screen blank for some time and then auto closing the screen without displaying any column info. I would like to know if any thing wrong i am doing on my steps? please help?

    I managed to workaround this problem.
    I add the function with no return value. Then in the Model Explorer you go to the properties of the imported function and edit the return type property, the same dialog appears, but this time it works as expected(considering you have set all the values correctly on your config file).

Maybe you are looking for