Skip to Content
Author's profile photo Thomas Fiedler

Remote Syntax-Check for ABAP developers

Hi community,

do you know this situation? You just saw a presentation about the really cool new ABAP language features and can’t wait until you can use them. Fortunately you have a brand new 7.40 system in your landscape and you write you first modern ABAP report. For sure you are using ABAP in Eclipse and you look very proud on your new piece of code like in this example with a bunch of inline declarations:



/wp-content/uploads/2014/11/ci4_596539.png


Woh, that’s really nice. But ………DAMN.  😡

You forgot that your product owner told you that you have to deliver your code also for older releases.

[Remark: All the developers in the ABAP in Eclipse team know this situation 😉 ]

So you can’t use the new feature because in older releases the code will not run. But how can you do that?

The syntax check does not tell when you are using statements that are not available in older releases.

You first have to downport your code and do the syntax check there. This is horrible !

How cool would be the world if your IDE is doing the following: 



/wp-content/uploads/2014/11/ci5_596538.png      



You can do a remote syntax check in your system by using the code inspector and I will tell you now what you have to do:

First you have to define a code inspector variant (or you add the remote check in your existing variant) by using transaction SCI:


/wp-content/uploads/2014/11/ci1_596591.png

In the tree of available checks you find under ‘Syntax Check/Generation’ an item called ‘Syntax Check in Remote System’.


/wp-content/uploads/2014/11/ci3_596592.png


Select this check and press the green/yellow icon because you have to enter additional attributes:


/wp-content/uploads/2014/11/ci7_596596.png


On the popup you have to enter the name of the RFC connection that you want to use for the remote check. Additionally you can enter the name of a transport object set. These are the objects that are transported virtually in the remote system before the check is triggered. Via this object set the dependent objects that you need for the check are defined. The object set is defined via an code inspector object set. In my example I just picked the ABAP package of my report:


/wp-content/uploads/2014/11/ci2_596606.png    



That is more or less what you have to. The code inspector variant is ready to go.

Very nice is the integration of this feature with ABAP in Eclipse via the ABAP test cockpit. You can use the variant in your eclipse project to do the remote syntax-check directly from your IDE. Just specify in your project properties the name of the code inspector variant under the ATC settings:


/wp-content/uploads/2014/11/ci6_596608.png  


Now you can trigger the check via the eclipse project explorer just by choosing the context menu item RunAs…ABAP Test Cockpit on the object that you want to check.The result will look like the picture above. 


Find more information about the ABAP test cockpit in general in this nice blog from Olga DolinskajaABAP Test Cockpit (ATC) for Developers in Eclipse or watch the video that is linked within that blog.

Have fun with the ABAP test cockpit and the remote syntax-check.

This feature is available on following releases:

7.02 SP14  

7.31 SP09

7.40 SP03


Kind Regards,

Thomas.












Assigned Tags

      15 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Florian Henninger
      Florian Henninger

      Hi Thomas,

      this is a cool feature right now and hey, now just a quick fix is missing 😉

      For me it is a very helpful feature, so I can develop things on my playground and move it to the system without a need to recheck it in the workbench again... oh life can be so easy 😎

      ~Florian

      Author's profile photo Thomas Fiedler
      Thomas Fiedler
      Blog Post Author

      Hi Florian,

      the Quick Fix to migrate inline declaration into standard type declarations is already in place. Others will follow. This week I tested another hot feature. Comparing source code between systems with editing in both systems. Can't wait to ship that awesome stuff.

      Regards,

      Thomas.

      Author's profile photo B. Meijs
      B. Meijs

      Thomas,

      I can't wait to test this on our system landscape. Just the solution to the problem I described in a blog in august 2013. Dealing with downward and cross-system compatibility

      Thanks to Gregor Wolf for pointing me in the right direction.

      Regards,

      Ben Meijs

      Author's profile photo Peter Inotai
      Peter Inotai

      Hi Thomas,

      It's a very cool feature, which makes life easier.

      Cheers,

      Peter

      Author's profile photo Matthias Bucher
      Matthias Bucher

      Thanks for this useful information.

      Does the virtual transport also handle DDIC objects like data element & structure definitions ?

      Without valid DDIC, nearly every line of code in destination system might be syntactically wrong ...

      Best regards,

      Matthias

      Author's profile photo Thomas Fiedler
      Thomas Fiedler
      Blog Post Author

      Hi Matthias,

      no, the DDIC objects are not transported to the remote system. It is technical not possible.

      So you will get syntax errors for the usage of DDIC objects that does not exists in the remote system.

      Regards,

      Thomas.

      Author's profile photo Dominik Pürner
      Dominik Pürner

      Hi Matthias,

      the topic is already a long time ago but is that restriction solved in the meanwhile or is there an alternative way to also simulate the remote syntax check for new / changed DDIC objects? #

      Because in general the remote check (e.g. checking code against an old system) is more or less useless if you have no possibility to check against DDIC changes as well. E.g. new DDIC objects are created and used within the syntax and every time you will get a syntax error and you have to filter manually which syntax errors are really errors and which of them are errors based on the DDIC problem. On the other hand it's also not possible to check structures / tables if there is may datalement / domain used, which is not existing in the remote system. This kind of check is important and also not possible at the moment.

      Based on that it's currently not possible as well to execute the check while releasing a transport and block transport in case of syntax issues. That will always be the case when DDIC objects changed or have been created new.

      Thank you.

      Best regards,

      Dominik

      Author's profile photo Peter Inotai
      Peter Inotai

      Hi Thomas,

      Do you know if what could be the reason that in the "Check message" column there are some truncated technical messages, instead of "real" messages?

      For local checks it works fine.

      ATC system: SAP_BASIS 702 0015, remote system SAP_BASIS 740 0004.

      OSS note 2040982 is implemented in the 7.02 system, but couldn't be implemented in 740 system, because SP8 is the min requirement. Not sure if this causing the problem, but could be.

      Any info/hint is welcome.

      Thanks,

      Peter

      Author's profile photo Adriano S. Campanhola
      Adriano S. Campanhola

      Man, this would be awesome if it wasn't restricted to some releases... We develop products and we try to keep our codes compatible to the lowest we can go in ecc 5.0...

      Author's profile photo Peter Inotai
      Peter Inotai

      Hi,

      It seems currently only one system can be entered. 🙁

      Or is there any trick to enter more than one system? (without creating several variables)

      Thanks,

      Peter

      Author's profile photo Peter Inotai
      Peter Inotai

      Cloning/enhancing CL_CI_TEST_REMOTE_SYNTAX_CHECK seems to be a good option 🙂

      Peter

      Author's profile photo Joachim Rees
      Joachim Rees

      Hi Thomas,

      I don't really get the part with the "transport object set". 🙁
      You say it's a "code inspector object set" (I know I can create those in TC: SCI), and for your example TF_REMOTE_CHECK you just used your ABAP Package ("SE21") TEST_REMOTE_CHECK.

      But: Surely the remot check then always (only) checks that packages content, right?
      In your example/use case, woldn't you want it to check whatever object you edit in Eclipse. (How) ist that possible?

      Another thing that's not clear to me:
      Is this am eclipse-only feature? Or should I be able to use it with an SCI-inspection as well?
      When I tried, it didn't work: I got a message saying the object doesn't exist - which is true for the target system, but I thought this was the whole point?!

      best
      Joachim

      Author's profile photo Joachim Rees
      Joachim Rees

      I can answer the 2nd part, as I got it working now: It does work in SCI as well!

      (However - and I think someone metioned that already: only sources are virtually transported to the target system, not DDIC-Objects...)

      Best
      Joachim

      Author's profile photo Joachim Rees
      Joachim Rees

      Hi Thomas,

      I got the remote syntax check working fine in SCI and think it can be quite useful.
      Thanks for pointing that option out to us!

      However, it doesn't work in Eclipse, at least not with the RFC-Configuration I have (I guess in your example, you have a trusted system relationship or something between the systems?!).

      - In SCI when I run the inspection, it will ask me for credentials (User, PW) for the remote system.
      After I provide those, the check is done -> fine.
      - In Eclipse / AdT, I’m not asked for credentials - the checks just fail, saying "username or password is wrong"

      ...thought I let you know about that...

      best
      Joachim

      Author's profile photo Joachim Rees
      Joachim Rees

      As far as I can tell, this ~4Year old blog is still the only one available on this topic (found out via searching for "remote syntax check" ).

       

      In addition to the very specific use case described here (being on a modern system, checking ABAP-syntax against an old system), there are probably more use cases to it.

       

      On https://answers.sap.com/answers/12648144/view.html it was suggested to use this feature to check from a legacy (maybe ECC?) System against a modern (S4HANA) target system, where some DDIC is no longer available.

      I haven’t tried it but this should work, right?