Obsolete ABAP Statements from 2004s - what about your existing code-base?

Hi
Note:  This is a question for someone that has a very deep understanding of the SAP compiler either through research or through actually working on the Netweaver Code stack
Since upgrading from 4.7 to ECC6 the ABAP compiler has become a lot stricter on the use of certain statements in the OO context.
For instance you're not allowed to use the statement LIKE, but in stead have to use TYPE and internal tables does not have an implicit header line, etc.
These restrictions are explained in greater detail [here:|http://help.sap.com/abapdocu/en/ABENABAP_OBJECTS_DIFF_TYPES_DATA.htm]
MY QUESTION:  To what extent does this restriction affect your existing code-base?. 
We have over a thousand "Classes" written since 1998 in OO as far as it was available at the time.  For the most part each class is its own include in SE38, with the class definition and implementation together in this include.
Up to now, we could successfully change and activate these classes as long as the main program was pre-existing in 4.7.  Now we are trying to use one of these older classes in a new main program for regression test purposes, and we are getting the following error: 
"Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary types (not "LIKE" or "STRUCTURE")."
This error is valid as per the current definition of the SAP language.
BUT I'm concerned about the confidence we can have that SAP will continue to interpret and execute existing code correctly.  So far it has, but I would like to know wheter that is by chance, or by design.

Hello Esti
Thank you for your explanation which shows that I misunderstood your question.
I would have expected that all of your syntactically incorrect coding would not be executed, irrespective of whether it is an old or a new program. My interpretation of this system behaviour is that the syntax check appears to be release-dependent.
A possible way to check this would be to manipulate the TRDIR entry for one of your old programs. You will find a field LEVL with the following meaning:
DE RDIR_LEVL
Short Text
     Level
Definition
     System release under which the ABAP/4 program was created or last
     changed.
Another way would be to copy an old program to a new Z-program which should fail in the syntax check. Check again if you find any significant difference in their TRDIR entries.
Coming back to you question and the remark by Dion I am convinced that one of the biggest threats for each and every SAP customer is custom coding of poor quality, i.e.
"spaghetti" coding instead of structured programming
incomprehensible coding (at least for the developers who did NOT create the program)
low transparency resulting in high efforts to enhance or improve the coding
In your case: the possible breakdown of your coding depending on unknown external factors
Given the huge amount of coding that is affected from these unknown external factors I would classify your situation as "high risk" which demands rather quick actions. How could you communicate this to your management team?
Here are two possible suggestions:
(1) It is possible that your entire custom coding may be no longer executable after a SAP release upgrade. Thus, the currenct coding base may prevent one of the next upgrades.
I guess this is not yet impressive enough for a manager because usually a SAP customer is not forced to upgrade its SAP system in order to get new functionalities which are required for legal reasons.
(1.a) It is possible that your entire custom coding may no longer be executable after importing ABA and/or BASIS hot packages.
Given the fact that we need to import such packages quite frequently and sometimes they are mandatory (I think especially of SAP-HR systems) then I would be scared as a manager.
(2) Assuming that most of your Z-reports are started via Z-transactions and perhaps you are lucky and you have specific roles containing these Z-transactions then you may ask your management team to do a simulation of coding breakdown: remove the role assignments for a couple of users and see what happens.
(2.a) As an alternative you may try to lock Z-transactions via SM01 and again check for the user reactions.
If your managment team is still not impressed then I would set up a document with the following contents:
Explain the problems of the old coding base and why you could not anticipate future changes of the ABAP syntax check
Describe the possible scenario if the custom coding no longer works after an upgrade or hot package import
Describe the required actions to make your custom coding compatible to the latest ABAP release
Most important: urge your management team to sign this document. If one day your custom coding breaks and they are looking for somebody to blame you just take this document out from the bottom of the deck
Regards
  Uwe

Similar Messages

  • Urgent: About Obsolete ABAP statements in Netweaver 4.0?

    Can any body please help us about the obsolete ABAP statements in Netweaver 4.0 corresponding to SAP 4.6?

    Hi,
    Pls read first the rules of engagement.
    Anyway, open an editor and choose Utilities->Help on->New features in ABAP.
    Or check notes like
    367676 and 689951
    Eddy

  • Obsolete ABAP statements/FM/BAPI in sap 4.7

    dear experts
    pls gv me the details of obsolete ABAP statements/FM/BAPI in sap 4.7 and their replacement in ECC 6.0,the statements should be related to MODULE POOL ,reports

    Hello
    ERP 6.0 implies Unicode as well. Therefore have a look at [ABAP and Unicode|http://help.sap.com/saphelp_nw04/helpdata/en/62/3f2cadb35311d5993800508b6b8b11/content.htm]
    You will find useful documentation in the ABAP keyword documenation (ERP 6.0) as well:
    Obsolete Statements
    The statements described in this subnode are obsolete and are only still available for reasons of compatibility with releases prior to 4.6 or 6.10. You may still come across these statements in old programs but you should not use them in new programs.
    Most of the obsolete statements listed here are syntactically forbidden in ABAP Objects or in Unicode programs. As a result, they can now only be used outside of classes or non-Unicode programs. There are replacement constructions for all obsolete statements which improve the efficiency and readability of programs.
    Apart from the obsolete statements listed in this node, there are also obsolete variants and additions for non-obsolete statements. These cannot be used in ABAP Objects and Unicode programs either. They are detailed in the description of the corresponding statements.
    Regards
      Uwe

  • Obsolete ABAP statements in OOPs context

    Obsolete ABAP statements in OOPs context

    hi,
    Check t-code UCCheck.
    Put the program name in the t-code and you will get the obsolete statements.
    Also check table radir.
    <b>Reward points if useful.</b>

  • Erase mba ssd from Gparted, what about EFI?

    Hello everybody and excuse my mistakes in english (not my native language). My macbook air (a1304, late 2008) became completely corrupted. Apple reseller told me about a problem on the drive. That´s an ssd (samsung 128 gb original) and DiskWarrior and disk utikity couldn´t do anything about it. So I googled bout it and understood erasing from Gparted (linux) would be a possible way. But, it has to be done plugging the drive hot; bootin from live cd with it unplugged and pluggin it before erasing. That´s risky, I know, but my first question is what to do with the 200mb efi partition. I cannot clone it with carbon copy, superduper, or time machine. So my question is; is it necesseary to clone it or would it be after generated in a common OSX installation? thanks a lot

    JackSeoul wrote:
    sabatica wrote:
    This is a known issue that seemed to randomly affect a small number of the 2011 models.
    Its your Cable going to your internal HD that needs to be replaced in MOST instances in the 2011 model. Funnily I have just had to replace a number of cables suffering from this very same issue recently. The last one repaired was 2 hours ago.
    Hope this helps. Enjoy. 2011 wasn't a good year.(
    Hi, I'm seeing intermittent failure of the Samsung SSD in my 11" 2011 Macbook air. The logic board was replaced under warranty (2 years) but not the SSD (1 year, expired) and the problem persists.
    I'm considering replacing the SSD with an OWC drive but I don't want to do that if the problem is with some cabling somewhere. However your description of the problem doesn't really match the 2011 MBA teardown photos on the internet - there's no cabling related to the SSD, which slots directly into the logic board.
    Is the common problem you're talking about applicable to the macbook air?
    Thanks
    Not sure if cabling is the issue, hope its not.  After my suspected SSD failure (which I don't think it was) my graphics failed (the graphics is integrated into the logic board and required its replacement - thank goodness for AppleCare).  So I'm not sure if what I was experiencing was the pre-failure of the graphics.  I'm back up and running, have reinstalled the SSD and we'll see if there's some connection to it and the graphics failure (doubtful).  There so much of a performance increase from the SSD it's hard not to keep it in the computer; even a hybrid SSD was noticibly slower. 
    Figures I'd get a 2011 with a cable issue... 
    Tom

  • HT201364 what about: Your Mac also needs: 8 GB Space! - is it meant to have that space beside on Volume Mavericks itselft running on? So if there isnt that space while Mavericks running: it crashes! Be aware it´s to security Back-Up Needs – but not have i

    if some experienced try this
    #6
    Registriert seit:
    Beiträge:
    08.2009
    1.192
    spaceman88
    MU Mitglied
    01.04.2013, 22:10
    Ja habe ich auf 0
    Mit folgerndem Befehl kann Festgestellt werden welcher hibernate Modus aktiviert ist:
    pmset -g | grep hibernatemode
    Bei neuen Geräten ergibt die Anfrage 3, wobei es folgende Modi gibt:
    0 – Die alte Sleep-Variante, in der das RAM über Akku oder Netzadapter mit Strom versorgt wird.
    1 – Hier wird das RAM auf die Festplatte gesichert und der Laptop heruntergefahren.
    3 – Der Standard-Modus neuerer Laptops vereint Modus 0 und zur Sicherheit Modus 1.
    5 – Dieser funktioniert wie Modus 1, aber ist für sicheres virtuelles RAM gedacht, welches in den
    Sicherheitseinstellungen aktiviert werden kann.
    7 – Dieser funktioniert wie Modus 3, ist aber ebenfalls für sicheres virtuelles RAM gedacht.
    Mit folgerndem Befehl,
    sudo pmset -a hibernatemode x
    ändert man den Modus. (x steht hierbei für eine obigen Zahlen.)
    Falls mit Deep Sleep Probleme mit dem normalen Hibernate (Standby) auftreten kann dies durch
    sudo pmset -a hibernatemode 3
    wiederhergestellt werden.
    i found on
    MacUser.de
    now go i go on trying first at system Security preferences as stated out to 5 –.

    Thank you!
    Kappy     Nov 24, 2014 3:01 PM 
      Re: Mac Pro's (early 2008) Back up plan towards a possible OS upgrade to Yosemite  in response to Juan Huerta      
    All new drives need to be partitioned GUID and formatted Mac OS Extended, Journaled before they can be used.
    OK, is that an option I'll be prompted to by the OS or do I have to "tell" that to...Disk Utilities (?)
    If cloning is your purpose then use Disk Utility's Restore option. It will clone the drives and their Recovery HD partitions automatically.
    I didn't know that Disk Utility had an option for cloning a bootable drive...is it better than CCC? (I have used neither one) I really would like to save $40 and avoid downloading additional software/applications...please if you don't mind...what option would that be once I click on "Disk Utility"? If you know of a good link or reliable article on the topic that will work for me too.
    Test a clone be trying to boot the computer from it.
    Any bootable drive in any bay can be used to boot the computer. Use Startup Drive preferences to set the desired boot volume.
    Erase the target and try again.
    But if the computer fails to start because I didn't create a good copy, how do I go back? Keyboard shortcuts? I keep reading that a wired keyboard must be used...and that's scary. If that's true, could I hook up any of my Windows based keyboards via USB?
    Erase the drive and install OS X. You cannot use any software installed by the prior owner that was purchased via the App Store including OS X. You must start from scratch. (this actually is 5B rather than item 6.)
    Well, he created an Admin account for me and I have been handling updates and everything with the new password he created for me. I wonder if I could access the Apple Store with my ID though...it's all under my name in that computer though, so I figure that at the Apple Store I'd just enter my ID...I guess, I have not tried that yet
    Yes.

  • Okay so it looks like I need to start my iPhone from new - What about my phonebook?

    Hey there, my phone keeps on turning itself off (the screen flickers quickly then turns off) and reboots every 5 minutes and it is a real pain.
    I have tried a normal restore via iTunes and also a DFU restore, and neither have made a difference.
    Each time though, I have restored my latest backup - I have been informed that its likely to be this backup that is causing me the issue and to start fresh would solve it. Is this true?
    I have over 400 contacts in my phone at present, what is the best way of getting them onto my newly installed fresh one?
    If it helps, I do have a spare 3GS thats functional (except the speaker) so aid me in this process? What would happen if I plugged in the older 3GS, restored that as a carbon copy of my current phone, then restored my current one as a fresh one, then copy them over somehow?
    Any help would be greatfully received, thanks
    James

    Aren't you syncing your contacts to a contact app on your computer? You should be. If you are, you can just sync them back.
    If not, you need to get them there. Make sure you have at least one entry in the address book on your computer, then go into the info settings for the phone in iTunes and set up the address book sync.

  • I see a lot of threads of people saying their App Store isn't working on their iPad, but what about your iTunes Store?

    My App Store is working fine on my iPhone 4S and my iPad 3rd generation.  The iTunes Store doesn't work on my iPad though.  All I can see is my "Purchased" tab and my "Charts" tab.
    I read in some other threads that it's an Apple server issue and they are working on it, but can anyone confirm that their iTunes Store is not working correctly, to browse Music, Movies, TV Shows, and Audiobooks?
    Thanks.

    Andre-
    One way around the Flash problem is to download the music videos to your computer and convert them to a format the iPad can play.  One program that can do the conversion is HandBrake, available at <HandBrake>.  Versions are available for both Mac and PC.
    Fred

  • How can I test the log in state from in side the Operator Interface code.

    From inside LabVIEW Full OI, I want to test if the operator logged in after the IApplicationMgr Start.
    Right after the IApplicationMgr ‘Start’ I have a loop that tests the IApplicationMgr ‘LoginLogoutRunning’ state and waits until the LoginLogout call back is done.
    I want to exit if the program if operator canceled the login and did not log in.
    I have tried “GetEngine” ref. From there get the “CurrentUser” ref but seems not to contain any information about the Current User.
    How can I test from my Operator Interface code logged in state of the application?
    Thanks
    Jim D.

    Try Engine.CurrentUserHasPrivilege
    For the string parameter 'privilegeName' enter Priv_UserLoggedIn or the string value "*".
    "Priv_UserLoggedIn–(Value: "*") Use this value with the Engine.CurrentUserHasPrivilege method to determine whether a user is logged in."
    Option 2: You could also setup a callback on application manager for UserChanged Event.  If the User is null then the login was canceled.  (see a copy of the help further down)
    From the teststand help for Engine.CurrentUserHasPrivilege method below...
    CurrentUserHasPrivilege Method
    Syntax
    Engine.CurrentUserHasPrivilege ( privilegeName)
    Return Value
    Boolean
    True if the current user has the privilege.
    Purpose
    Confirms whether the current user or any user group that the user is a member of has a specific privilege.
    Remarks
    Returns True when the privilege property is True, when the privilege property of any group that contains the privilege is True, or when privilege checking is disabled, StationOptions.EnableUserPrivilegeChecking is False. If privilege checking is disabled but StationOptions.RequireUserLogin is True, this function returns True only if there is a user currently logged on.
    Parameters
    privilegeName As String
    [In] Specifies the name of the privilege to check. You can specify the name of any privilege property. You can specify the full privilege path in the user privileges property tree, for example, Debug.RunSelectedSteps, or you can specify the base privilege name, RunSelectedSteps. If you specify only the base privilege name and more than one instance of the base privilege name exists, then the method returns the value of the first base privilege it finds with that name. Refer to UserPrivileges for more information.
    Teststand callback for UserChanged Event...
    UserChanged Event
    Syntax
    ControlName_UserChanged ( user)
    Applies To
    ApplicationMgr
    Purpose
    Occurs when the current user logged in changes.
    Remarks
    Use this event to update the parts of your user interface that depend on user permissions when the current user logged in changes.
    Parameters
    user As User
    [In] Current user. If this parameter is NULL, there is no user logged in.

  • HT1918 What if your security code isn't accepted

    I was trying to update my account and when I put in my security code and it keeps telling me the code is invalid
    What do I do?

    Hi..
    Might not be just the security code > iTunes Store: My credit card's security code or zip code does not match my bank's records

  • Getting SQL statement from OCIStmt

    Is there a way to retrieve the SQL statement from OCIStmt structure? That is, does anyone know what this structure is? For example, if used OCIPrepareStmt, then bound all the variables to OCIStmt, can I tell from OCIStmt what the final SQL statement is? What about the statement string that was originally passed to OCIPrepareStmt()?
    Thanks!
    Igor

    Hey! Thanks for your time!
    use preparedStatements.I'm trying that
    Then use a wrapper class called
    [url=http://www.javaworld.com/javaworld/jw-01-2002/jw-0
    25-overpower.html]debuggableStatement. You willget the SQL that the driver is using.
    Is that only for Debugging or can i use that in live code?
    Thanks again,
    Ryan

  • What about my software which is in my old mac book pro like for instance parallels can I transfer this software to a new mak book pro that I want to buy ??

    What about my existing software like parallels on my old mac book pro when I want to use that software on a new mac book pro I am ready to buy ???

    Your new MacBook Pro won't run PPC programs. For Parallels you need to update to the latest version 7.

  • What about facetime on macbook pro in UAE?

    I know that Facetime doesn't wor on IPhones from UAE/
    What about facetime on MacBook Pro from UAE?

    You won't be able to select the UAE when setting FaceTime up(its not a choice), but if you select another country, it should work just fine.

  • How Can I Retrieve SQL Statement From The User ?

    Hi
    I want to know, how can I make the user can enter the SQL statement from himself ?? in this code he can't enter it. Only he can display the SQL that i wrote it...
    this is my Code:
    import java.sql.*;
    public class db_testing {
         static final String DRIVER = "com.mysql.jdbc.Driver";            
         static final String DATABASE_URL = "jdbc:mysql://localhost/S204111933";
         public static void main(String[] args) {
              Connection cn=null;
              Statement st= null;
              ResultSet rset=null;
              try{
                   Class.forName(DRIVER);
                   cn=DriverManager.getConnection(DATABASE_URL, "root", "admin");
                   st=cn.createStatement();
                   rset=st.executeQuery("select * from employee");
                   ResultSetMetaData metadata=rset.getMetaData();
                   System.out.println("The begining: ");
                   for(int i=1;i<=metadata.getColumnCount();i++)
                   System.out.print(metadata.getColumnName(i)+"\t");
                   System.out.println();
                   System.out.println();
                   while(rset.next()){
                   for(int i=1;i<=metadata.getColumnCount();i++)
                   System.out.print(rset.getObject(i)+"\t\t");
                   System.out.println();}
              catch(Exception e){
                   e.printStackTrace();
              finally{
                   try{
                   cn.close();
                   st.close();
                   rset.close();
                   catch(Exception e1){
                        e1.printStackTrace();
    }

    The following changes in the code will make the user to give the input
    import java.sql.*;
    public class db_testing {
    static final String DRIVER = "com.mysql.jdbc.Driver";
    static final String DATABASE_URL = "jdbc:mysql://localhost/S204111933";
    public static void main(String[] args) {
    Connection cn=null;
    Statement st= null;
    ResultSet rset=null;
    try{
    Class.forName(DRIVER);
    cn=DriverManager.getConnection(DATABASE_URL, "root", "admin");
    // st=cn.createStatement();
    // rset=st.executeQuery("select * from employee");
    PreparedStatement pstmt=null;
    pstmt=cn.prepareStatement("select * from employee where id=?");
    pstmt.setInt(1,Integer.parseInt(args[0]));
    rset=pstmt.executeQuery();
    ResultSetMetaData metadata=rset.getMetaData();
    System.out.println("The begining: ");
    for(int i=1;i<=metadata.getColumnCount();i++)
    System.out.print(metadata.getColumnName(i)+"\t");
    System.out.println();
    System.out.println();
    while(rset.next()){
    for(int i=1;i<=metadata.getColumnCount();i++)
    System.out.print(rset.getObject(i)+"\t\t");
    System.out.println();}
    catch(Exception e){
    e.printStackTrace();
    finally{
    try{
    cn.close();
    st.close();
    rset.close();
    catch(Exception e1){
    e1.printStackTrace();
    }

  • WHAT ABOUT FACE TIME?  I'D LIKE TO KNOW IF YOU NEED A PHONE NUMBER FOR YOURSELF TO USE IT TO CALL FROM YOUR COMPUTER

    WHAT ABOUT FACE TIME?  I'D LIKE TO KNOW IF YOU NEED A PHONE NUMBER FOR YOURSELF TO USE IT TO CALL FROM YOUR COMPUTER

    Do you have iMessage? I think as long as that person has iMessage you can use Face Time to call each other.

Maybe you are looking for