Cannot reference this before supertype constructor has been called

I'm confused. I would like it easier for a user to use a class where one item can be determined from another, but I'm having a problem with the constructors.
First, one constructor that works fine:
    public UndirectedGraph(List nodes, List edges) {
        this(nodes, edges, 100, 100, true, false);
    }which then calls the ultimate constructor that accepts all those other parameters.
The problem is with this one:
    public UndirectedGraph(List nodes) {
        this(nodes, collectEdges(nodes), 100, 100, true, false);
    }collectEdges returns a List of Edges, so technically all should be fine. However, this won't compile, with the message:
UndirectedGraph.java [37:1] cannot reference this before supertype constructor has been called
        this(nodes, collectEdges(nodes));
                           ^
1 error
Errors compiling UndirectedGraph.Is there a workaround for what I'm trying to do? It'd be a lot easier to have this collectEdges() method in this single place than in any class that's using this one.

You HAVE to call the super constructor before you do anything else in the constructor. You can make calls to this but the final constructor to be executed has to make the super call. I am assuming you are subclassing something here because this should not show up as an error if there is a default constuctor. The reson for this is that a subclass is built on top of its parent classes meaning it can access information in them methods in them etc. Even in the constrcutor it can do this so the super class MUST be created before the subclass.

Similar Messages

  • Cannot reference this before supertype constrcutor has been called

    I have a class in the following. When I compiled it, I had the error message: cannot reference this before supertype constrcutor has been called
    super(new Model());
    Does anyone know how to fix it?
    Thanks a lot.
    Jian
    public class TreeViewApplet extends JApplet {
    class DOMTree extends JTree
    public DOMTree() {
         this(null);
    public DOMTree(Document document) {
    super(new Model());
    }

    You are right. If I used them seperately, everything is fine. However, I need to get the slected node out of DOMTree class so that I may pass the selected node to TreeViewApplet.java class. As you know, JSObject is only allowed to use getMember() and setMember() in TreeViewApplet.java class. That's why I put two classes together.
    Do you have any solution to fix my problem?
    Thanks.
    Jian

  • I purchased a video and it keeps telling me "cannot download at this time" but it has been charged on my itunes card

         I purchased a video and it keeps telling me "cannot download at this time" but it has been charged on my itunes card

    I have the same

  • I was promised 1GB for life when I got my tablet in May of this year, BUT it has been taken away and I am told it cannot be restored since the promotion has ended.  I WANT MY 1GB FOR LIFE PUT BACK ON MY ACCOUNT!

    I was promised 1GB for life when I got my tablet in May of this year, BUT it has been taken away and I was told it cannot be restored because the promotion has ended.  I WANT MY 1GB FOR LIFE PUT BACK ON MY ACCOUNT AS PROMISED WHEN I GOT MY TABLET!

    Contact your states attorney generals office.
    If you can prove it was for life and it was taken away that would be a case for State Attorney Generals all over the USA.
    if they did it to you they must have done it to others.
    Be be careful, make sure it really was for life.
    Good Luck

  • SQLException: After clearParameters() has been called, all parameters must be reset before executing

    Hi,
    I am running: Weblogic 6.1, SP2
    Driver : weblogic.jdbc.oci.Driver
    Reason for not using the "thin" driver, which works, is limit
    on size of Clob
    Previous references to this problem in this newsgroup indicate driver problems
    with older versions of WL.. I am using the latest..
    The SQLException I get is "After clearParameters() has been called, all parameters
    must be reset before executing". This happens the second time the code below is
    excuted ( ok the first time )
    "clearParameters()" is never called explicitly in my code.
    The exception occurs on the "spFunc.execute();" statement at the very end of this
    code:
    // OBS:connection, conn_, is opened from a connection pool
    before this code is called and cloesed afterwards.
    conn_.setAutoCommit(false);
    // ============== Initializing clob ==================
    SerialStatement stmt = (SerialStatement)conn_.createStatement();
    stmt.execute("INSERT INTO lc_clob_temp VALUES (1, EMPTY_CLOB())");
    // OBS: using a prepared statement here will result in SerialClob
    // exception when using setClob in the prepared statement
    below
    // This is probably a bug ( worked in WL 5.1 ). We had this
    as a support case 270952 with WebLogic.
    stmt.execute("SELECT * FROM lc_clob_temp WHERE id = 1");
    ResultSet crs = stmt.getResultSet();
    weblogic.jdbc.rmi.SerialClob xmlClob = null;
    while ( crs.next() ) {
    xmlClob=(weblogic.jdbc.rmi.SerialClob)crs.getClob("newclob");
    // Call Oracle's stored procedure for calling Oracle XSU.
    SerialCallableStatement spFunc =
    (SerialCallableStatement)conn_.prepareCall(
    "declare " +
    "insCtx sys.DBMS_XMLSave.ctxType; " +
    "begin " +
    "insCtx := sys.DBMS_XMLSave.newContext(?); " +
         "sys.DBMS_XMLSave.setBatchSize(insCtx,0);" +      "sys.DBMS_XMLSave.setCommitBatch(insCtx,
    0);" +
    "? := sys.DBMS_XMLSave.insertXML(insCtx,?); " +
    "sys.DBMS_XMLSave.closeContext(insCtx); " +
    "end;"
    spFunc.setString(1, viewName );
    spFunc.registerOutParameter (2, Types.NUMERIC);
    Writer outstream = xmlClob.getCharacterOutputStream();
    outstream.write(xml.toString());
    outstream.flush();
    outstream.close();
    spFunc.setClob( 3, xmlClob);
    spFunc.execute();
    spFunc.close();

    Hi,
    I am running: Weblogic 6.1, SP2
    Driver : weblogic.jdbc.oci.Driver
    Reason for not using the "thin" driver, which works, is limit
    on size of Clob
    Previous references to this problem in this newsgroup indicate driver problems
    with older versions of WL.. I am using the latest..
    The SQLException I get is "After clearParameters() has been called, all parameters
    must be reset before executing". This happens the second time the code below is
    excuted ( ok the first time )
    "clearParameters()" is never called explicitly in my code.
    The exception occurs on the "spFunc.execute();" statement at the very end of this
    code:
    // OBS:connection, conn_, is opened from a connection pool
    before this code is called and cloesed afterwards.
    conn_.setAutoCommit(false);
    // ============== Initializing clob ==================
    SerialStatement stmt = (SerialStatement)conn_.createStatement();
    stmt.execute("INSERT INTO lc_clob_temp VALUES (1, EMPTY_CLOB())");
    // OBS: using a prepared statement here will result in SerialClob
    // exception when using setClob in the prepared statement
    below
    // This is probably a bug ( worked in WL 5.1 ). We had this
    as a support case 270952 with WebLogic.
    stmt.execute("SELECT * FROM lc_clob_temp WHERE id = 1");
    ResultSet crs = stmt.getResultSet();
    weblogic.jdbc.rmi.SerialClob xmlClob = null;
    while ( crs.next() ) {
    xmlClob=(weblogic.jdbc.rmi.SerialClob)crs.getClob("newclob");
    // Call Oracle's stored procedure for calling Oracle XSU.
    SerialCallableStatement spFunc =
    (SerialCallableStatement)conn_.prepareCall(
    "declare " +
    "insCtx sys.DBMS_XMLSave.ctxType; " +
    "begin " +
    "insCtx := sys.DBMS_XMLSave.newContext(?); " +
         "sys.DBMS_XMLSave.setBatchSize(insCtx,0);" +      "sys.DBMS_XMLSave.setCommitBatch(insCtx,
    0);" +
    "? := sys.DBMS_XMLSave.insertXML(insCtx,?); " +
    "sys.DBMS_XMLSave.closeContext(insCtx); " +
    "end;"
    spFunc.setString(1, viewName );
    spFunc.registerOutParameter (2, Types.NUMERIC);
    Writer outstream = xmlClob.getCharacterOutputStream();
    outstream.write(xml.toString());
    outstream.flush();
    outstream.close();
    spFunc.setClob( 3, xmlClob);
    spFunc.execute();
    spFunc.close();

  • Applicatons that are superseded with a deadline date in the future, kicks of before deadline date has been passed.

    So how to explain this as best as possible....
    First off, I have seen this "issue" since ConfigMgr 2012 RTM and I have seen it continuously through the various upgrades done on the way to ConfigMgr 2012 R2. The environment consists of a single AD domain, one ConfigMgr Primary site with 30 DP's
    and 1500 computers.
    Application B is created and it should supersede application A. The application is present on all computers throughout the environment. The application is distributed to all DP's. The deployment of application A is targeted to a collection containing all
    computers. Then the deployment of application A is deleted. Application B is then configured to supersede application A with an uninstall of application A and the deployment type is replaced with the deployment type of application B. The option that Allows
    users to see older deployment types is not selected. Now application B is deployed to the same collection as application A was. The deployment settings are configured with a deadline date in the future (to match the corporate maintenance window - not a ConfigMgr
    maintenance window), but the application should be visible for users who want to upgrade before the deadline is reached. The option of automatically upgrading any superseded versions of the application is selected. The deployment is not created as a required
    deployment, but only available.
    What happens after the above is done is a bit odd. If I compare a application deployment that is superseded, to the Software Updates that normally have the same psychological effect on users (for anyone in IT this is common knowledge to be: Postpone and
    don't bug me again until deadline has passed and then becomes a forced installation/update, for about 70% of the user mass) this is not the case. After about 24 hours about every single computer that is online has received the deployment of application B and
    has been successfully installed. I refuse to believe that close to a 100% of the users actually select the option to upgrade application B before the deadline has been passed.
    I have checked the above and it looks like it does not honor the deadline given and finds out that when it can kick of the deployment, it does.
    This also happens if I don't delete the deployment of application A and leave it deployed to the same collection as the superseding application B is deployed to.
    Any ideas on why I'm seeing this behavior would be greatly appriciated.
    /Tom Erik

    Well, it's an available deployment. The only thing that it should do is to upgrade the superseded application, if present on the computer and that is set to be performed several weeks in the future. In the particular example (log files) below, the deadline
    is set to be on 1 April 2015 (!). All deployments are set to use client local time, when deployed to a computer collection. All other user (if I remember correct) deployments are set to use UTC, as client local time is not an option.
    What I do see on a particular computer is that when no user was logged on, the deployment started the application installation. This is what I found in the AppEnforce.log (notice the time stamp around the 18th at 13:42):
    +++ Starting Uninstall enforcement for App DT "Install Microsoft Office 2010 w/SP2 - x86 - Windows Installer (*.msi file)" ApplicationDeliveryType - ScopeId_5A0DA406-A98B-4302-9061-7A14FC9FCC1E/DeploymentType_7edd6b29-eb40-4019-a0c6-04da65e3407a, Revision - 4, ContentPath - C:\WINDOWS\ccmcache\o1, Execution Context - System AppEnforce 18.02.2014 13:42:20 1164 (0x048C)
    A user is not logged on to the system. AppEnforce 18.02.2014 13:42:21 1164 (0x048C)
    Performing detection of app deployment type Install Microsoft Office 2010 w/SP2 - x86 - Windows Installer (*.msi file)(ScopeId_5A0DA406-A98B-4302-9061-7A14FC9FCC1E/DeploymentType_7edd6b29-eb40-4019-a0c6-04da65e3407a, revision 4) for system. AppEnforce 18.02.2014 13:42:21 1164 (0x048C)
    +++ Discovered application [AppDT Id: ScopeId_5A0DA406-A98B-4302-9061-7A14FC9FCC1E/DeploymentType_7edd6b29-eb40-4019-a0c6-04da65e3407a, Revision: 4] AppEnforce 18.02.2014 13:42:21 1164 (0x048C)
    App enforcement environment:
    Context: Machine
    Command line: setup.exe /uninstall ProPlus /config uninstall_config.xml
    Allow user interaction: No
    UI mode: 0
    User token: null
    Session Id: 4294967295
    Content path: C:\WINDOWS\ccmcache\o1
    Working directory: AppEnforce 18.02.2014 13:42:21 1164 (0x048C)
    Prepared working directory: C:\WINDOWS\ccmcache\o1 AppEnforce 18.02.2014 13:42:21 1164 (0x048C)
    Prepared command line: "C:\WINDOWS\ccmcache\o1\setup.exe" /uninstall ProPlus /config uninstall_config.xml AppEnforce 18.02.2014 13:42:22 1164 (0x048C)
    Executing Command line: "C:\WINDOWS\ccmcache\o1\setup.exe" /uninstall ProPlus /config uninstall_config.xml with system context AppEnforce 18.02.2014 13:42:22 1164 (0x048C)
    Working directory C:\WINDOWS\ccmcache\o1 AppEnforce 18.02.2014 13:42:22 1164 (0x048C)
    Post install behavior is BasedOnExitCode AppEnforce 18.02.2014 13:42:22 1164 (0x048C)
    Waiting for process 5108 to finish. Timeout = 120 minutes. AppEnforce 18.02.2014 13:42:22 1164 (0x048C)
    Process 5108 terminated with exitcode: 3010 AppEnforce 18.02.2014 13:51:27 1164 (0x048C)
    Looking for exit code 3010 in exit codes table... AppEnforce 18.02.2014 13:51:27 1164 (0x048C)
    Matched exit code 3010 to a PendingSoftReboot entry in exit codes table. AppEnforce 18.02.2014 13:51:27 1164 (0x048C)
    ++++++ App enforcement completed (547 seconds) for App DT "Install Microsoft Office 2010 w/SP2 - x86 - Windows Installer (*.msi file)" [ScopeId_5A0DA406-A98B-4302-9061-7A14FC9FCC1E/DeploymentType_7edd6b29-eb40-4019-a0c6-04da65e3407a], Revision: 4, User SID: ] ++++++ AppEnforce 18.02.2014 13:51:27 1164 (0x048C)
    And this kind of corresponds with what I can see in the ServiceWindowManager.log (again, notice the timestamp at 13:42):
    OnIsServiceWindowAvailable called with: Runtime:1, Type:6 ServiceWindowManager 18.02.2014 05:00:00 3924 (0x0F54)
    Biggest Active Service Window for Type=6 not found ServiceWindowManager 18.02.2014 05:00:00 3924 (0x0F54)
    Program cannot Run! Setting *canProgramRun to FALSE ServiceWindowManager 18.02.2014 05:00:00 3924 (0x0F54)
    WillProgramRun called with: Runtime:1, Type:6 ServiceWindowManager 18.02.2014 05:00:00 3924 (0x0F54)
    A Service Window of this type exists. ServiceWindowManager 18.02.2014 05:00:00 3924 (0x0F54)
    There exists a Service Window of this Type, for this duration. The Program will run eventually. ServiceWindowManager 18.02.2014 05:00:00 3924 (0x0F54)
    ServiceWindowManager 18.02.2014 05:00:00 3924 (0x0F54)
    OnIsServiceWindowAvailable called with: Runtime:7200, Type:2 ServiceWindowManager 18.02.2014 13:42:17 5504 (0x1580)
    No Restricting Service Windows exist. It can therefore run... ServiceWindowManager 18.02.2014 13:42:17 5504 (0x1580)
    OnIsServiceWindowAvailable called with: Runtime:7200, Type:2 ServiceWindowManager 18.02.2014 13:42:19 3396 (0x0D44)
    No Restricting Service Windows exist. It can therefore run... ServiceWindowManager 18.02.2014 13:42:19 3396 (0x0D44)
    OnIsServiceWindowAvailable called with: Runtime:7200, Type:2 ServiceWindowManager 18.02.2014 13:51:27 5704 (0x1648)
    No Restricting Service Windows exist. It can therefore run... ServiceWindowManager 18.02.2014 13:51:27 5704 (0x1648)
    OnIsServiceWindowAvailable called with: Runtime:7200, Type:2 ServiceWindowManager 18.02.2014 13:51:28 756 (0x02F4)
    No Restricting Service Windows exist. It can therefore run... ServiceWindowManager 18.02.2014 13:51:28 756 (0x02F4)
    OnIsServiceWindowAvailable called with: Runtime:7200, Type:2 ServiceWindowManager 18.02.2014 14:03:52 5060 (0x13C4)
    No Restricting Service Windows exist. It can therefore run... ServiceWindowManager 18.02.2014 14:03:52 5060 (0x13C4)
    OnIsServiceWindowAvailable called with: Runtime:7200, Type:2 ServiceWindowManager 18.02.2014 14:03:52 6096 (0x17D0)
    No Restricting Service Windows exist. It can therefore run... ServiceWindowManager 18.02.2014 14:03:52 6096 (0x17D0)
    OnIsServiceWindowAvailable called with: Runtime:7200, Type:2 ServiceWindowManager 18.02.2014 14:04:12 4192 (0x1060)
    No Restricting Service Windows exist. It can therefore run... ServiceWindowManager 18.02.2014 14:04:12 4192 (0x1060)
    OnIsServiceWindowAvailable called with: Runtime:7200, Type:2 ServiceWindowManager 18.02.2014 14:04:14 5828 (0x16C4)
    No Restricting Service Windows exist. It can therefore run... ServiceWindowManager 18.02.2014 14:04:14 5828 (0x16C4)
    There are no maintenance windows configured in ConfigMgr at all for any collections.
    /Tom Erik

  • Clicking on iTunes ikon and I get the message the item iTunes.exe that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly.  What can I do, I can't open Itunes.  I have over 4000 songs in iTunes that I had

    When I click on the iTunes ikon I get a box pop up which reads  Problem with shortcut.  The item iTunes.exe that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly.
    My computer which is a packard bell vista operating system, recently stopped working as the power supply overheated and blew up and it has recently been sent back to the Know How team at PC world and it seems to be since it came back I now cannot open iTunes.  I have also tried to search for iTunes in the search bar, I can see several files, but can't seem to open any of these either.  I think that quicktime isn't working, either.
    I have over 4000 songs in iTunes that I had recorded from my collectiong of CD's am  going to loose all these now?  Can anyone help, with very easy instructions as I really don't know what I am doing??
    Thanks

    I would copy over the entire thing if you have room.  With iTunes 10.4 though, you can download any previous iTunes purchases you have made in the past with your current iTunes account.  While in iTunes, look at the left hand side of your screen and select "Purchases" and look at the bottom right corner of the screen and select "Download Previous Purchases".  If you have an iPhone, iPod and/or iPad...you can do the same thing from each device.  Nice new feature...just remember that those ripped CDs need a back-up!!!  Enjoy...

  • I cannot sign into App Store. "unknown error" and then "We cannot complete your request. There has been an error in the App Store. Please try again later. (4)"

    I cannot sign in to the App Store.
    I changed countries a few months ago and updated all my account info and everything was working fine, until recently, while trying to upgrade my softwear to Mavericks, which I cannot do. My apple Username and password work fine on iTunes and on my iPhone. I can also access all my account info when I sign in through the website. It just will not work for the App Store on my Mac Pro.
    When I click "Welcome" under Quick Links it asks me to sign in. I sign in with my Apple Username and Password and then it DOES NOTHING
    When I click on "Free Upgrade" and then "Install" on the mavericks software, it asks me to sign in again. This time it says "unknown error" and then it says "We cannot complete your request. There has been an error in the App Store. Please try again later. (4)"
    I''m completely blocked. I cannot procede without being able to update my software.
    Please help me.
    Rhea

    You could try this.
    Back up all data.Triple-click anywhere in the line below on this page to select it:
    /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
    Right-click or control-click the line and select
    Services ▹ Reveal
    from the contextual menu.* A folder should open with an item selected. Move the selected item to the Trash. You may be prompted for your administrator login password. Reboot and test. If there's no change, restore the item you deleted from a backup, overwriting the one that may have been created in its place. Otherwise, you may need to recreate some of your settings in the Network preference pane.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.
    Credit for this solution to ASC member luis.pinhor.

  • Failed to start workflow. The workflow cannot access the item that it has been applied to.

    I have a quick question for you and it would be great if you can answer me on this.
    I'm working through SharePoint Workflow issue (developed using Nintex) that started recently where people are getting workflow error and I don't see issues if I submit it myself. Current error. - "Failed to start workflow. The workflow cannot access
    the item that it has been applied to."
    I haven't made any major changes to Workflow except for changing email notification content and publishing it. My question is, do I need to publish the rest of the workflows too that are associated to the list after I publish changes of one workflow? Looks
    like users have required permissions to submit the form. Please let me know how to get rid of this error.
    smith

    Hi Smithspd,
    According to your description, my understanding is that your users got a workflow error, and the workflow is created by Nintex.
    For SharePoint Designer workflow, once we do any change in a workflow, we need to re-publish the workflow.
    For your issue, I suggest you re-publish the workflow, compare the result.
    In addition, as your workflow is created by Nintex and this forum is for SharePoint Designer, I suggest you ask Nintex support or forum for better help.  Thanks for your understanding.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Please help. "You cannot sign in because your account has been locked apple"

    Hi,
    Today i've tried to login to App Store but i've got this notice message :  "You cannot sign in because your account has been locked apple".
    please help.
    thanks you

    Try contacting iTunes Support (these are user-to-user forums) and see if they can tell you why it's locked and if they can/will unlock it : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • I turned my iPhone 4s on this morning and  it has been 'searching' for network ever since. I have this problem a lot and it sometimes takes 24 hours  to get my network (O2) - anything I can do?

    I turned my iPhone 4s on this morning and  it has been 'searching' for network ever since. I have this problem a lot and it sometimes takes 24 hours  to get my network (O2) - anything I can do?

    I had this problem when I first had the phone in January which resulted in a new handset. It only seems to happen after my phone gets turned off and/or battery dies and I turn it back on......nightmare!!  O2 weren't a great deal of help last time - took nearly 3 weeks before they agreed to send a new handset.  Thanks for your advice

  • How can I turn off the "this application's signature HAS been verified do you want to run it?" message?

    I'm running Firefox 22.0 on the Mac, OS X 10.6, Java 6 SE fully updated on the Mac. I have corporate web sites I must use throughout the day that have Java applets associated with them, one of them being the Ephox web text editor. EVERY TIME I open a page that has the editor being invoked on it, I get FOUR messages that say "This application's signature has been verified. Do you want to run this application?" Two of them will have the name of the editor. Two of them will have blanks. ALL of them show "ALWAYS TRUST content from this publisher" as checked. RUN, RUN, RUN, RUN.
    Although I have a number of addins installed, I have had to disable them to get these apps to load without crashing.
    NOTE that this does not happen in Firefox 22 on Windows 7; nor did it with the same apps (no upgrades at the corp. website) on Firefox 18 or 19 on the Mac.
    Help???

    We are sorry this is more like a Java issue than a Firefox one.
    However, I found this that may be helpful to solve your problem, check it out: [http://stackoverflow.com/questions/1472494/suppressing-applications-digital-certificate-has-been-verified-do-you-want-to-ru http://stackoverflow.com/questions/1472494/suppressing-applications-digital-certificate-has-been-verified-do-you-want-to-ru]

  • Getting error while calling this BAPI:Field MATNR has been transferred inco

    Hi,
    I have a rquirement to upload material master data into sap for Plant 1251.(For plant 1251 we need to upload both Basi veiw and Extended View).
    I am getting the following error while calling this BAPI.Field MATNR has been transferred inconsistently or is blank
    the errror is :Field MATNR has been transferred inconsistently or is blank.
    I have written the below logic in the program to upload material master data into SAP.
    Please help me out to resolve this issue.
    Thanks in advance.
    Program logic which i have wriiten in the program is
    LOOP AT it_rpt.
        CLEAR lwa_return.
        v_tabix  = sy-tabix.
        IF ( it_rpt-werks EQ p_werks AND
           it_rpt-matnr IS INITIAL ).
    retrieve internal number
          PERFORM get_internal_number USING lc_mtart
                                            lc_mbrsh
                                   CHANGING it_rpt-matnr.
        ENDIF.
        IF NOT it_rpt-matnr IS INITIAL.
          PERFORM convert_field_input CHANGING it_rpt-matnr.
        ENDIF.
    Header data
        CLEAR lwa_headdata.
        lwa_headdata-material                = it_rpt-matnr.
        lwa_headdata-ind_sector              = lc_mbrsh.
        lwa_headdata-matl_type               = lc_mtart.
        lwa_headdata-basic_view              = 'X'.
        IF NOT it_rpt-vkorg IS INITIAL.
          lwa_headdata-sales_view            = 'X'.
        ENDIF.
        lwa_headdata-purchase_view           = 'X'.
        lwa_headdata-mrp_view                = 'X'.
        lwa_headdata-storage_view            = 'X'.
        lwa_headdata-forecast_view           = 'X'.
        lwa_headdata-work_sched_view         = 'X'.
        lwa_headdata-account_view            = 'X'.
        lwa_headdata-cost_view               = 'X'.
    *Client data
        CLEAR: lwa_clientdata, lwa_clientdatax.
        IF it_rpt-werks EQ c_1251.
          lwa_clientdata-matl_group          = it_rpt-matkl.
          lwa_clientdata-old_mat_no          = it_rpt-bismt.
          lwa_clientdata-base_uom            = it_rpt-meins.
          lwa_clientdata-manu_mat            = it_rpt-mfrpn.
          lwa_clientdata-mfr_no              = it_rpt-mfrnr.
        ENDIF.
        lwa_clientdata-division              = it_rpt-spart.
        lwa_clientdata-unit_of_wt            = lc_gewei.
        lwa_clientdata-trans_grp             = lc_tragr.
        IF it_rpt-werks EQ c_1251.
          lwa_clientdatax-matl_group         = 'X'.
          lwa_clientdatax-old_mat_no         = 'X'.
          lwa_clientdatax-base_uom           = 'X'.
          lwa_clientdatax-manu_mat           = 'X'.
          lwa_clientdatax-mfr_no             = 'X'.
        ENDIF.
        lwa_clientdatax-unit_of_wt           = 'X'.
        lwa_clientdatax-trans_grp            = 'X'.
        lwa_clientdatax-division             = 'X'.
    Material Description
        IF it_rpt-werks EQ c_1251.
          lt_matdesc-langu           = sy-langu.
          lt_matdesc-matl_desc       = it_rpt-maktx.
          APPEND lt_matdesc.
        ENDIF.
    *Plant data
        CLEAR lwa_plantdata.
        lwa_plantdata-plant                  = it_rpt-werks.
        lwa_plantdata-availcheck             = lc_mtvfp.
        lwa_plantdata-mrp_type               = lc_dismm.
        lwa_plantdata-mrp_group              = lc_disgr.
        lwa_plantdata-auto_p_ord             = 'X'.
        lwa_plantdata-proc_type              = 'F'.
        IF it_rpt-werks EQ c_1251.
          it_rpt-prctr  = lc_prctr.                 "1252
        ELSEIF it_rpt-werks EQ c_1261.
          it_rpt-prctr  = lc_prctr1.                "1262
        ENDIF.
        lwa_plantdata-profit_ctr             = it_rpt-prctr.
        lwa_plantdata-period_ind             = lc_perkz.
        lwa_plantdata-max_stock              = it_rpt-stawn.
        lwa_plantdata-countryori             = it_rpt-herkl.
        lwa_plantdata-sloc_exprc             = it_rpt-lgfsb.
        CLEAR lwa_plantdatax.
        lwa_plantdatax-plant                 = it_rpt-werks.
        lwa_plantdatax-availcheck            = 'X'.
        lwa_plantdatax-mrp_type              = 'X'.
        lwa_plantdatax-mrp_group             = 'X'.
        lwa_plantdatax-auto_p_ord            = 'X'.
        lwa_plantdatax-proc_type             = 'X'.
        lwa_plantdatax-profit_ctr            = 'X'.
        lwa_plantdata-period_ind             = 'X'.
        lwa_plantdatax-max_stock             = 'X'.
        lwa_plantdatax-countryori            = 'X'.
        lwa_plantdatax-sloc_exprc            = 'X'.
    *Valuation data
        CLEAR lwa_valuationdata.
        lwa_valuationdata-val_area           = it_rpt-werks.
        lwa_valuationdata-price_ctrl         = lc_vprsv.
        lwa_valuationdata-price_unit         = lc_peinh.
        lwa_valuationdata-val_class          = it_rpt-bklas.
        CLEAR lwa_valuationdatax.
        lwa_valuationdatax-val_area          = it_rpt-werks.
        lwa_valuationdatax-price_ctrl        = 'X'.
        lwa_valuationdatax-price_unit        = 'X'.
        lwa_valuationdatax-val_class         = 'X'.
    *Storage location
        CLEAR lwa_storagelocation.
        lwa_storagelocation-plant            = it_rpt-werks.
        lwa_storagelocation-stge_loc         = it_rpt-lgort.
        CLEAR lwa_storagelocationx.
        lwa_storagelocationx-plant           = it_rpt-werks.
        lwa_storagelocationx-stge_loc        = it_rpt-lgort.
    *Tax Classifications
        IF it_rpt-werks EQ c_1251.
          it_rpt-tatyp = lc_tatyp.       "u2018MWSTu2019
        ELSEIF it_rpt-werks EQ c_1261.
          it_rpt-tatyp = lc_tatyp1.      "u2018UTXJu2019
        ENDIF.
        lt_taxclass-tax_type_1              = it_rpt-tatyp.
        lt_taxclass-taxclass_1              = lc_taxkm.
        lt_taxclass-tax_ind                 = lc_taxim.
        APPEND lt_taxclass.
    *Sales data
        CLEAR: lwa_salesdata, lwa_salesdatax.
        IF it_rpt-werks EQ c_1251.
          it_rpt-vkorg = lc_vkorg.
        ELSEIF it_rpt-werks EQ c_1261.
          it_rpt-vkorg = lc_vkorg1.
        ENDIF.
        lwa_salesdata-sales_org           = it_rpt-vkorg.
        lwa_salesdata-distr_chan          = lc_vtweg.
        lwa_salesdata-cash_disc           = lc_sktof.
        lwa_salesdata-item_cat            = lc_mtpos.
        lwa_salesdatax-sales_org          = it_rpt-vkorg.
        lwa_salesdatax-distr_chan         = lc_vtweg.
        lwa_salesdatax-cash_disc          = 'X'.
        lwa_salesdatax-item_cat           = 'X'.
    *Forecast parameters
        CLEAR: lwa_forecast, lwa_forecastx.
        lwa_forecast-plant                = it_rpt-werks.
        lwa_forecast-fore_model           = lc_prmod.
        lwa_forecast-fore_pds             = lc_anzpr.
        lwa_forecast-hist_vals            = lc_peran.
        lwa_forecastx-plant               = it_rpt-werks.
        lwa_forecastx-fore_model          = 'X'.
        lwa_forecastx-fore_pds            = 'X'.
        lwa_forecastx-hist_vals           = 'X'.
    Purchasing long text
        IF it_rpt-werks EQ c_1251.
          IF it_rpt-tdline1 <> ' '.
            lv_tdobject = 'MATERIAL'.
            lv_tdid     = 'BEST'.
            lv_tdname   =  it_rpt-matnr.
            PERFORM fill_longtext TABLES lt_longtext
                                  USING  lv_tdobject
                                         lv_tdname
                                         lv_tdid
                                         sy-langu
                                         it_rpt-tdline1.
          ENDIF.
    Basic long text
          IF it_rpt-tdline2 <> ' '.
            lv_tdobject = 'MATERIAL'.
            lv_tdid     = 'GRUN'.
            lv_tdname   =  it_rpt-matnr.
            PERFORM fill_longtext TABLES lt_longtext
                                  USING  lv_tdobject
                                         lv_tdname
                                         lv_tdid
                                         sy-langu
                                         it_rpt-tdline2.
          ENDIF.
    *Units of measure
          CLEAR : lt_uom,lt_uomx.
          lt_uom-alt_unit     = it_rpt-meins.
          lt_uom-alt_unit_iso = it_rpt-meins.
          lt_uom-unit_of_wt   = it_rpt-gewei.
          APPEND lt_uom.
          lt_uomx-alt_unit      = it_rpt-meins.
          lt_uomx-alt_unit_iso  = it_rpt-meins.
          lt_uomx-unit_of_wt    = 'X'.
          APPEND lt_uomx.
        ENDIF.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
          EXPORTING
            headdata             = lwa_headdata
            clientdata           = lwa_clientdata
            clientdatax          = lwa_clientdatax
            plantdata            = lwa_plantdata
            plantdatax           = lwa_plantdatax
            forecastparameters   = lwa_forecast
            forecastparametersx  = lwa_forecastx
            storagelocationdata  = lwa_storagelocation
            storagelocationdatax = lwa_storagelocationx
            valuationdata        = lwa_valuationdata
            valuationdatax       = lwa_valuationdatax
            salesdata            = lwa_salesdata
            salesdatax           = lwa_salesdatax
          IMPORTING
            return               = lwa_return
          TABLES
            materialdescription  = lt_matdesc
            unitsofmeasure       = lt_uom
            unitsofmeasurex      = lt_uomx
            materiallongtext     = lt_longtext
            taxclassifications   = lt_taxclass
            returnmessages       = it_messages.
    Regards,
    Reddy

    Can you check with below code .
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
            EXPORTING
              INPUT        =  it_rpt-matnr       
    IMPORTING
              OUTPUT       =  it_rpt-matnr
            EXCEPTIONS
              LENGTH_ERROR = 1
              OTHERS       = 2.
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Move  it_rpt-matnr to    lwa_headdata-material  .
    Regard's
    Smruti

  • Getting error message : the item Itunes.exe that this shortcut refers to has been changed or moved so this shortcut will no longer work properly. I get this either using the start menu or the desktop shortcut. I tried going to programs /itunes and repair.

    Getting the error message:
    the item Itunes.exe that this shortcut referes to has been moved or changed so this shortcut will no longer work properly.
    I tried going into the control panel/programs /itunes and selected repair which didn't fix it. Any suggestions on restoring the broken shortcut without removing and re-installing the program?
    Running windows 7 home premium SP1
    Thank you

    I think it is some sort of permissions issue preventing the installer from updating the shortcuts. Is your account an administrator of the machine? If it is and you still have the problem then you may need to explicitly use the "Administrator" account for the install.
    tt2

  • I just downloaded the latest itunes update 11.1 and now I get an error messages saying "The item 'iTunes.exe' that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly."

    I just downloaded the latest itunes update 11.1 for windows 7 and now when I try to open itunes with the shortcut on my desktop I get this error message: "The item 'itunes.exe' that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly."  I can't open itunes at all.  Is there anything I can do or is there a problem with the new update?

    Start > Programs = Firefox
    Does that shortcut work?
    If so, delete the current shortcut that is in the Quick Start tray and drag the one that is in Start > Programs down there.

Maybe you are looking for

  • Ask for a download link for Adobe Photoshop Lightroom 5 Student and Teacher Edition.

    I bought an Adobe Photoshop Lightroom 5 Student and Teacher Edition from the campus. It only comes with the product code on the card without the installation CD. Because the software downloaded from the official website don't accept the serial number

  • Document Splitting not happening (only for one profit center  1000)

    Hi, The Bank GL account 13000010  is assigned a default Profit center 1110. After Posting an entry, ENTRY VIEW SHOWS Bank AC       CR.........                                             10000                                     (since default PC is

  • All Labels in the Smartform  should be printed under one spool request ?

    Hi All, I need to print the labels with some data .At a time I have to print 10 labels with the same Spool request. I have required data in one internal table .I am looping the internal table and printing the label.In this case every time control lea

  • XML & XPath vs databse & SQL

    Hey people. I was wondering what people think of the above. Take for example a website a bit like autotrader.co.uk... A website with a database back-end where registered users can view and modify a part of the database (some but not all tables and th

  • Attachment Download Problem

    I use FIREFOX as my default browser for years. Yahoo is my main e-Mail, yet use Hotmail too. For 2 days now, I can not download any attachments (PDF, JPG, DOC, MPEG ect.) from any of my Yahoo accounts. If I forward the same mail to my Hotmail account