1 2 3 16 Previous Next

ABAP in Eclipse

234 Posts

Welcome!

 

I am glad that you read this page, it means that you are interested in modern ABAP programming.

In my first blog "ABAP in eclipse vs SE80 comparison - why eclipse wins?" I desribed why to use eclipse. After few years I still recommend eclipse for SAP development. In this article I would like to describe in details one of benefits: tasks with context and sharing them to the team.

 

Please fasten your seatbelt and enjoy the ride.

 

 

 

1. Mylyn tasks in eclipse

 

When you install eclipse and ABAP tools you should get Mylyn tasks plugin by default. If not you can install it additionally.

What it offers is:

  • Tasks creation
    • List of items with description about what needs to be done.
    • Tasks can be used to organize your development work.
    • Some additional attributes like labels, milestone, estimation, delivery time etc.
  • Context of work
    • List of objects that you work on within a task.
    • Objects are automatically loaded to editor when you activate task, they are closed when you deactivate task.
    • You can easily switch from one task to another and load corresponding development objects.
  • Sharing tasks with other developers.
    • A good way to synchronize comments and work progress between developers.
    • List of tasks can be stored on shared repository.
    • Sharing the context is imited with ABAP in eclipse.

 

 

2. Local tasks for own development

 

2.1. Create a simple task

 

Let us try to create a simple local task.

There is a special tab called "Tasks repositories" in eclipse. You can always open it from Window -> Show View -> Task Repositories. By default there is a "Local" task repository which stores tasks on your PC.

 

Choose right click and "New Task" option:

01_AIE_Tasks_create.png

 

Then fill in some details, as in example below:

02_AIE_Tasks_Edit.PNG

Then save it.

That is the first part: we can define local tasks with description of work to be done. The magic comes with task context.

 

 

2.2. Activate task and build context

 

So far we have only task with description and some attributes. Let us try to build the context now.

  • Open any development object in your project (CTRL + SHIFT + A).
  • Object must be of type which is supported by eclipse editor (class, program, function module etc.).
  • SAP GUI objects like structure / table are not added to context (as per today).

 

I have opened 2 classes, 1 report and one table (SAP GUI), so far nothing is in the context:

03_AIE_Tasks_create_context.PNG

To bind objects to context we need to:

  • Activate the task
    • There is a small dot near the task name which you can press to activate the task.
    • You can also do it from right click menu on task.
  • After task is activated the task I click once again on all opened objects
    • This will automatically register objects to the context.
    • In general any touched / opened object will be added to the context when it is activated.
    • If you do not want to attach object to context (like you do research in other reports) just deactivate the context for a while.

 

See how it looks like now - elements are in Invisible Elements section:

  • So far I see that AiE offers only binding to Invisible section which keeps them only on local PC (context cannot be shared with others).
  • We see that RESB table opened in SAP GUI is not bound to context - only "eclipse enabled" objects can be bound:

 

03_AIE_Tasks_bind_context.PNG

 

Hints:

  • In my eclipse version (eclipse Neon, ADT 2.64.3) keeping tasks activated and opening new objects may hang the eclipse - it becomes irresponsive.
  • This is probably due to many packages which are loaded to the hierarchy tree of project.
  • As a workaround solution I deactivate "Link with Editor" and "Focus on Active Task" options in Project Explorer, see below.

 

05_AIE_Tasks_disable_sync.PNG

[Update from 16.08.2016]:

I found a solution for "suspending eclipse" problem while task activation: switch off default settings for navigator and tree synchronization. This can be easily done by deselecting first 2 options in eclipse Mylyn configuration. Having these options deselected there is no issue while switching between active tasks and it works much better. Finally it makes my life easier!

 

13_AIE_Mylyn_Disable_Navigation_Sync.PNG

 

It is also worth to mention that from context menu you can copy it easily to another task.

 

2.3. Close and restore context

 

When we have the context bound see what happens when we deactivate the task.

  • I press deactivate button and all the classes which I had opened will be closed, editor is empty.
  • Now I can select another task and activate it.
  • The task list can be found in "Task list" view (next to "Task repositories").
  • This is useful if we work on few tasks in parallel - it is so easy to switch context between them.
  • As I have created only one task for demo I am activating the same.
  • The most important thing: my 2 classes and 1 program are loaded back automatically, bingo!
  • Once again the hint: it may hang up your eclipse when you activate task, therefore switch off quickly "Focus on Active Task" option while the packages are loading. By the way I would expect this to be fixed from AiE team, it is so anoying.

 

As you see local tasks can be used to coordinate your development work in such a way that you keep list of tasks to do and keep the context to get objects automatically loaded to editor. You can get even more benefits if you decide to share tasks with your collegues.

 

3. Share the task with team

 

When we know how to create and use tasks it is time to share them with others. Why not?

  • Sharing the task through remote repository allows sending the list to others and collaborate by comments.
  • It is a great way to delegate subtasks to other person while doing own development.
  • Unfortunately ABAP objects are kept only as the Private Elements in the context which makes it not possible to share the list with others.
  • As a workaround we can write objects in comments of the task so that others can load objects locally to own context.
  • Actually this may be also a positive feature - everyone need to load own customized context. Although I would prefer to get common list of objects that we work on to solve the task.
  • You actually share the task description, comments and properties, not the task contents itself (no development objects content, no context).

 

To share the task with others we need to configure remote repository which is available somewhere in the internet. There are different servers supported, for simpification I give only one example: GitHub.

 

 

3.1. GitHub repository configuration

 

In the "Task Repostiory view" right click allows you to create a new repository: Add task Repository option:

 

06_AIE_Tasks_Add_Repository.PNG

 

Select GitHub Issues type:

 

06B_AIE_Tasks_Github.PNG

 

Then configure it with your GitHub account:

07_AIE_Tasks_Edit_Repository.PNG

 

About the settings:

  • URL for the server you get from your private GitHubaccount which you must create first: creating github repository.
    • GitHub is not related to SAP in general, it is open source and allows you to keep version history and track issue list.
    • By default GitHub offers public repositories for free. If your tasks with description and comments contain internal only information consider creating a private repository which is paid option.
    • Please note that we are not using GitHub to share code from SAP (this is done internally in SAP environment) but we will use it to enable Issues sharing as tasks in eclipse. Therefore only tasks description and comments will be available in repository, not the code itself.
  • Label is your local name of repository in eclipse.
  • User ID and password is from your GitHub repository.
    • I tried to use 2 factor authenticaion in GitHub account, but unfortunatelly GitHub Mylyn plugin does not support it in eclipse yet.
    • Therefore normal user and password authentication is required.

 

Then you press "Validate Settings" and if everything is fine (user and password matches) then you press Finish. Your remote tasks repository is now configured.

 

 

3.2. Sharing tasks with others

 

Now it is time to create the task and share it with others. We begin in the same way as before but we run "New task" from our repository menu:

 

08_AIE_Tasks_Repository_Task_Create.PNG

 

The task editor is simmilar but in addition we get editable sections:

  • Actions with category for grouping (you can define own categories and group tasks related to same development together).
  • People with assignee (myself or other GitHub user).
  • When task is subbmited to the server also Comments section will be shown.


When task is saved it will land in category "Unsubmitted".

 

09_AIE_Tasks_Repository_Task_Edit.PNG

 

When I am ready I will press Submit to transfer task to GitHub account.

This remote task has context as well. You can use it for local objects binding. As already mentioned ABAP objects are kept as Private Elements therefore code will not go to GitHub repository, only the issue with description and attributes.

 

 

3.3. Getting list of tasks from repository

 

Ok we managed to create and send new task to GitHub account. We can see it directly on our GitHub account:

 

09B_AIE_Tasks_Task_in_GitHub.PNG

 

But how to see the task in the eclipse task list? Last step is needed: Query.

  • Query is the view that filters tasks you want to see locally.
  • From default settings we can see all tasks but if you want you can filter by category or other properties (Active / Closed).
  • To create a query go to repository menu and select New Query.

 

10_AIE_Tasks_New_Query.PNG

 

Fill in details of query:

  • Select repository name once again,
  • Enter title
  • Select which status you want to see (Open, Closed)
  • Select other attributes optionally.
  • Adding just title and leaving other fields as default will result in all tasks shown through query.
  • When ready press Finish.

 

11_AIE_Tasks_Edit_Query.PNG

 

There you go!

In the "Task List" you can see all shared tasks from that repository:

 

12_AIE_Tasks_List_From_Repository.PNG

When you open task again you see that new section "Comments" is added which allows you sharing comments with others.

 

You can play with more advanced settings like applying different categories to tasks and then filter them through different queries. This will allow you to group features tasks in one development project and tasks per feature will be categorized in different queries.

 

 

4. Summary

 

What:

  • Abap in eclipse offers tasks through Mylyn plugin.
  • You can use tasks locally to organize your work and benefit from automatically loaded classes needed for task development.
  • You can use tasks with repository to share the work description with others, update comments and still keep context of your work locally.

 

Why:

  • List of developer's tasks integrated into development environment.
  • Quick access to objects that you work with to complete the task.
  • Team work and collaboration in development environment, close to the code.

 

Issues:

  • Eclipse is suspending when binding class to the left site of Project Explorer (too many packages?). @SAP: Any plans to fix this?
  • The list of objects from context cannot be sent to repository so everyone must build own private context for shared tasks. @SAP: Any plans here?
  • No 2 factor authentication support with GitHub Mylyn plugin.

 

 

Thank you for watching this, please share your comments. Anyone is using tasks already or will start soon?

 

Cheers!

Adam

Hi ADT community,

I have good news for you. Since today the new ADT client 2.64 is available on our eclipse updatesite SAP Development Tools


So just install the basic eclipse IDE via: http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/neonr

and include the ABAP tools via the updatesite: https://tools.hana.ondemand.com/neon 


You may ask yourself what is new in Eclipse Neon?


Thanks to Matthias Becker who wrote a nice little blog about the new features:  ABAP in Eclipse benefits from new platform features in Eclipse Neon


In addition we have some nice new additional features in the ABAP development tool for you.







 

Navigation within Elementinfo

   

The ABAP Elementinfo (shortcut F2 in the editor) is one of the most useful features of the ABAP eclipse editor. You can get very quickly structural information about tables, structures, classes or methods that you are using in your code.


spfli.jpg

 


With the new ADT client 2.64 we provide a new very cool feature. You already see the hand icon on the screenshot above? Yes, you can navigate now to other elements that are displayed on the popup. Very often you need structural information of nested elements. And this is possible now just by clicking on the element like the data element in the example above. The popup now displays the structure information of the data element.

 

s_period.jpg

 


Via the toolbar buttons on the bottom of the popup you can navigate back and forth within the element info. And you can even open the corresponding editor in eclipse in case you want to change an element. Therefore you can use the button on the right side of the toolbar.   


spfli.jpg


Have fun with this really cool nice feature.



Redefine Methods via Code Completion ( CTRL + SPACE )

 

Redefinition of methods in the class editor is now very easy in eclipse. You can just use the code completion in the editor to figure out which methods are inherited from the superclass:


codecompletion.jpg



After picking one of the methods just by clicking on the name the code is automatically added to the editor:



28-07-2016 17-20-39.jpg


I think it is much more easier now to redefine methods.


 


Add ABAP Doc comment via Quick Assist ( CTRL + 1 )

Last but not least we offer a new Quickassist in the editor to insert ABAP Doc comments to your code. Just press CTRL+1 in the editor on an element where you want to define an ABAP Doc comment and you are done:


abapdoc1.jpg


 

In case you already have short descriptions defined in the class builder the texts are automatically taken over to the ABAP Doc comment. More details about that you can find in the blog  New ABAP Doc Features with NetWeaver 7.5 by Michael Schneider


 

Hope you like the new stuff and Eclipse Neon.


Warm Regards,

Thomas.






On June 22nd the Eclipse Foundation released the Neon release which is the newest version of the Eclipse platform. This release brings some nice new features that can directly be used in the ABAP Development Tools:

 

  • Word Wrap in Editors
    A long awaited feature finally made it into the platform: Lines in the text editor now can be wrapped to fit into the width of the editor. This is only done during display of the source code in the editor - the persistent formatting of the source code is not changed. This is turned off by default and can be toggled via a toolbar button or via the shortcut Alt+Shift+Y (Alt+Cmd+Y)word_wrap.png
  • Zoom Text Font
    In text editors, you can now increase and decrease the font size using Ctrl++ (Cmd++) and Ctrl+- (Cmd+-). This is a shortcut for changes in the General > Appearance > Colors and Fonts preference page - so these commands persistently change the font size.
    If you want to temporarily zoom into the text editor you can use a pinch gesture on your touchpad.
  • Automatic Save
    The content of unsaved editors can now automatically be saved after a given interval. This is turned off by default and can be enabled in the new autosave preference page (Preferences > General > Editors > Autosave)

 

More details about these features and also other new features can be found on Eclipse's "New and Noteworthy" page.

 

These features are generically provided by the platform and all editors based on the platform (also the ADT editors) benefit from it. This demonstrates how the ABAP Development Tools benefit form the platform it is based on.

Joachim Rees

How to learn to love AdT

Posted by Joachim Rees Jun 14, 2016

[I started to write this as a comment on How to get your colleagues into ABAP in Eclipse but the figured it's probably better to start a blog post on my own]

OK, I know this is a old blog, but I just now stumbled across it (via Abap in Eclipse | AIE - Code Gallery - SCN Wiki , which is a very good resource, as well).

 

 

I'm in the process of learning to love Eclipse right now, so anything pointing out some cool features helps:

 

1. read about the features

2. try them out in a test-report

3. next time you get in a situation, where it is useful, use it in your real programming

--> the more often you make this experience ("wow, that's cool!") them more you will like the new tool. (And, as you pointed out Florian Henninger, if you colleagues see how easy you do $task, they might get eager to be able to use it, too).

 

The problem I sometimes have is, that I'd need to have it the other way round:

 

1. I do some real programming

2. I'd need a feature (I know how it would be done in SE80/SE24, it's really easy there!)

3. But I just don't know how to easily do it in Eclipse.

-> that's a little frustrating!

 

I give you an example I had yesterday: redefining a method:

In SE24:

1. click on redefine

2. code away

--> really, really, easy! (but only because I know what button to click, I'm aware of that!).

 

In Eclipse:

??? I don't know   ???

-> I'm sure it's just as easy, you just need to know the right way.

 

In situations like that, it would be good to have an AiE-Expert (well, just someone using it in her/his daily work) sitting next to you -> you could just ask.

 

Also, events like CodeJam on AdT are great -> remember the features you didn't find and let the experts and peers help you.

 

[Edit 2016-06-16: Of course: Use SCN! There are lot's of resorces here. E.g. I just had that question:  How can I trigger Code Inspector checks with ADT in Eclipse -  and as you see I found the answer easily (using the Content-Tab and the Text-Filter)!

]

 

I'd also suggest NOT to revert to the old way on the first obstacle - as with everything new you try to learn, there is a learning curve -> it usually pays out to go through it!

 

I guess mostly everyone reading this is already an AdT expert, but do you remember you first attempts and frustrating "I don't know how to do it "-experiences? Share them in the comments, if you like!

 

 

best

Joachim

 

PS: Having a total of 3 sad smileys in this blog, I think a should compensate, as in general I do like AiE and lerning new things, so here we go:

Disclaimer: This is a proposal of an SCN Member and not an authorized solution by SAP. Pls. be aware what you do!


Motivation

CSOL Error.png

In my Post I pointed out the Issue that #adt can not handle #csol warnings as #SE80 can. I described a workaround using #SE80 and another using a dirty technique in solutionamanger.

For us in the project this was not sufficient.

The goal is to "auto confirm" the CSOL warnings as we can do in #SE80. Due to project requirements this would be the only way in any case at the moment.

 

---- EDIT  04.07.2016 -----

This Note : 1591120 will also help you. You can change the priority of the CSOL Messages.


This helped us in same issues with SPROXY and in CRM Tools.



Durch diese Customizing-Option wird festgelegt, wie das System nach einer Sperrkonfliktwarnung reagierensoll.

Wenn Sie z.B. Änderungen an einem Transportauftrag sichern, liefert die Sperrkonfliktberechnung durch

die CSOL drei Ergebnisse:

Wenn keine Konflikte vorliegen, sichert das System die Änderungen.

Wenn Konflikte der Konfliktart "Fehler" vorliegen, meldet die Anwendung einen Fehler.

Wenn ein Konflikt der allgemeinen Konfliktart "Warnung" vorliegt, hängt der weitere Prozess vom Wert

im Feld CSOL_WAR_DIA_FREE_STRATEGY ab:

Beim Wert CANCEL_WARNING wird das Sichern abgebrochen und gemeldet.

Beim Wert IGNORE_WARNING wird das Sichern fortgesetzt und kein Fehler gemeldet. Außerdem werden

Sperreinträge vorgenommen.

Wenn der Customizing-Eintrag CSOL_WAR_DIA_FREE_STRATEGY nicht hinzugefügt wird, entspricht das

Standardverhalten der Einstellung CANCEL_WARNING.


We removed the enhancement listed here again.
---- END EDIT ----

 

 

You can solve this using two Enhancements and a helper class:

 

Create helper-class:

CLASS zcl_000_adt_service DEFINITION

  PUBLIC

  CREATE PUBLIC.

 

  PUBLIC SECTION.

    CLASS-DATA:

      sv_adt_call          TYPE abap_bool VALUE abap_false,

      sv_csol_check_called TYPE abap_bool VALUE abap_false.

 

  PROTECTED SECTION.

  PRIVATE SECTION.

ENDCLASS.

 

CLASS ZCL_000_ADT_SERVICE IMPLEMENTATION.

ENDCLASS.

 

 

 

Detect if called via ATD in SADT_REST_RFC_ENDPOINT

Create an enhancement at the top of SADT_REST_RFC_ENDPOINT:

 

ENHANCEMENT Z_SADT_REST_RFC_ENDPOINT.    "active version

  **********************************************************************

* Enhancement to register an ADT call.

**********************************************************************

     LOG-POINT ID z000_sap_code_enhancement SUBKEY sy-cprog FIELDS 'Z_SADT_REST_RFC_ENDPOINT'. "Optional

     zcl_000_adt_service=>sv_adt_call = abap_true.

ENDENHANCEMENT.

 

Catch the CSOL message in function module TMW_PRJL_CSOL_CHECK when called from #adt

 

We did not want to do real modification, such that we used a recursive call within the enhancement of TMW_PRJL_CSOL_CHECK. After the recursion we can catch the message if we are called via #adt an ignore it. Create an enhancement at the top:

 

ENHANCEMENT Z_TMW_PRJL_CSOL_CHECK.    "active version

 

**********************************************************************

* Because the confirmation of CSOLocks is still not possible via ADT/Eclipse

* this enhancement helps on an interim basis.

*

* IF a CSOL conflict occurs the Solution Manager (second call of function

* module /TMWFLOW/CHECK_OBJECT_LOCK_CSL) returns a specific message. This

* message will be raised as LOCKING_NOT_ALLOWED.

*

* The conflict will be confirmed with including the object to a transport

* request which is known by the Solution Manager. So catching the specific

* message by a recursive call (depth 2) and ignoring it will cause an

* automatic CSOL conflict confirmation.

*

* To differ a call of function module TMW_PRJL_CSOL_CHECK by Eclipse/ADT and

* by an se80 session there is a flag, which is set by an enhancement of

* function module SADT_REST_RFC_ENDPOINT.

**********************************************************************

 

"   LOG-POINT ID z000_sap_code_enhancement SUBKEY sy-cprog FIELDS 'Z_TMW_PRJL_CSOL_CHECK'.   Optional

 

   IF zcl_000_adt_service=>sv_adt_call = abap_true AND

      zcl_000_adt_service=>sv_csol_check_called = abap_false.

    "AND

    "  new zcl_001_user_service( )->is_user_parameter_set( 'Z_AUTO_CSOL_CONFIRM' ) = abap_true.  "Nice to have

 

     zcl_000_adt_service=>sv_csol_check_called = abap_true. "stop recursion

 

     CALL FUNCTION 'TMW_PRJL_CSOL_CHECK'

       EXPORTING

         iv_request         = iv_request

         iv_suppress_dialog = iv_suppress_dialog

         it_objects         = it_objects

         it_keys            = it_keys

         iv_trfunction      = iv_trfunction

       IMPORTING

         ev_no_check_performed = ev_no_check_performed

       EXCEPTIONS

         locking_not_allowed     = 1

         warning_conflicts_exist = 2

         OTHERS                  = 1.

 

     zcl_000_adt_service=>sv_csol_check_called = abap_false.

 

      CASE sy-subrc.

 

        WHEN 0.

          RETURN.

 

        WHEN 1.

          IF sy-msgid = '00' AND sy-msgty = 'E' AND sy-msgno = '001' AND

             ( sy-langu = 'E' AND sy-msgv1 = 'Customizable CSOL conflict for objects changed in'  AND sy-msgv2 = ' other TR (Note 1591120)' ) OR

             ( sy-langu = 'D' AND sy-msgv1 = 'Anpassbarer CSOL-Konflikt für in and. TA geänderte' AND sy-msgv2 = ' Objekte (Hinw. 1591120'  ).

            "ignore/accept CSOL conflict => confirm CSOL conflict

            RETURN.

          ENDIF.

 

          "re-raise

          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 RAISING locking_not_allowed.

 

        WHEN 2.

 

          "re-raise

          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 RAISING warning_conflicts_exist.

 

      ENDCASE.

   ENDIF.

ENDENHANCEMENT.

 

 

Additional

 

in the line:

 

  "  new zcl_001_user_service( )->is_user_parameter_set( 'Z_AUTO_CSOL_CONFIRM' ) = abap_true. 

 

we placed some code to ensure that the auto confirm of #csol is only done for user who have set the set/get parameter accordingly.

This is what the coding does.

 

Conclusion

 

Now we have a #adt that "confirms" CSOL warnings immediately such that we can continue to work as normal in #adt.

Thomas Fiedler  and the ATD Team are aware of this issue and are working on a standard solution.

Be aware of the disclaimer at the top.

 

Kind Regards

Timo

 


Hello

we are working in a multi system setup:

 

MaintDEV -> MainTST -> PRD

ProjDEV  -> ProjTST -> prePRD

 

To handle changes in the two dev Systems we have we use Solution Manager Retrofit and CSOL etc.

Now me an my colleges are in the situation that we have transports arrived on project test system where tests are ongoing. Fine.

 

For new features we need to enhance development objects that are still under test.

In ADT we end up with the Error message:

CSOL Error.png

So no possibility to change the source in Eclipse right away.  (The mentioned SAP note does not help, it is responsible for the Error)

 

Workaround:

 

Go to good old SE80, edit every method in form based view:

Csol_se80.png

confirm the Messages, if you know what you are doing

 

csol_info.png

 

unfortunately, this seems not to be possible in adt, what makes it a big hazzle for us to use it with objects that are under test.

 

I hopeThomas Fiedler  & Team will have a solution soon.

Any feedback is welcome on this topic.

 

<<< EDIT >>>>>

See Solution using Enhancements here

<<< END EDIT >>>

 

Second Work around:

use TA: /n/tmwflow/lockmon in Solman to delete the locks.

- be sure, you know what you do -

 

Best

Timo

Last week I've been at the DSAG ABAP Developments Days in Walldorf. At the usual visit of the tapas bar in the evening we had a discussion about the translation of development objects in ABAP in Eclipse (ABAP Development Tools ADT). SAP currently suggests, that we use the SE63 to translate the objects after we finished our developments.

At least my "development workflow" looks a bit different: every time I've created a translation relevant object, for example a new message or text element, I immediately translate this object (let it be from German to English or vice versa, depends on my current project).

 

Let’s play Design Thinking and give the Persona a name:

Hello, my name is Uwe and I’m an ABAP developer. On a daily basis I’m working with translation relevant objects. This is how I’m currently working

 

1. Text elements

I’m using the following format, because no comment for text-xxx is needed

WRITE:/ 'This is just a test'(001).

With <f2> on the text I’m creating the element.

Image2.png

Marking the element and going to the translation are just two clicks away

Image3.png

After entering the text, save and exit I’m finished.

Image4.png

2. Messages

MESSAGE i002(ytestmsg) WITH 'Another test'(002).

<F2> on “i002” and the message will be created.

Again: after entering the text I’m going directly to the translation

Image5.png

Translate the text save and exit. Finished

Image6.png

 

3. Data element labels

After entering the last Field label I’m going immediately to the translation

Image7.png

Translate all text save and exit. Finished

Image8.png

 

Or do you have another translation procedure? Do you have in-house rules?

 

In Eclipse we currently have this situation: after <f3> on a non-existing text element or message we get

Image9.png

(Object not found. Creation via navigation not supported)

 

To be honest: I had to google where to find the text elements. Here you are:

Image10.png

The result is, that we end in the SAP GUI. Would be nice if we’ll get an Eclipse tool for text element, but that’s not part of this blog post.

 

Now my dear developer college it’s up to us to help SAP to “translate” this workflow to the Eclipse world.

 

Suggestion 1

a new Eclipse view which is active for every translation relevant object

 

Suggestion 2

a new tab in the properties view

 

 

Image11.png

 

Looking forward to your opinion. (and I promise you: SAP is listening )

 

You can find me on Twitter and G+

Recently I have developed some CDS views in Eclipse and I would like to share the source codes in github. I am relunctant to manually copy the source code of each view one by one, as a result I am checking whether there are some folders in my local laptops where the source code are cached.

 

I spent some time to research and here is the result.

 

I have created three ABAP projects in Eclipse:

clipboard1.png

And in this location C:\Users\i042416\workspace_adt\.metadata\.plugins\org.eclipse.core.resources.semantic\.cache


How do I find the path "C:\Users\i042416\workspace_adt"? Just right click ABAP project and choose Properties from context menu, and choose Resource->Linked Resources:


clipboard2.png

I could see three folders correspondingly:

clipboard3.png

Enter the first folder and then there are four sub folders. The folder ddic just stores the source code of CDS views which I am looking for.


clipboard4.png

Every CDS view in Eclipse has a corresponding folder in local file system:

clipboard5.png

The asddls file within that folder just contains exactly the source code of CDS view, which could be opened via any text editor.

clipboard6.png

Then I could just upload those folders to github very conveniently to avoid the manual ctrl + c and ctrl + v

Hello,

 

In this post I would like to demonstrate one tool in eclicpse IDE that in my opinion is very usefully, the Local Version History.

 

Through this tool, we can control the changes in source code, before task or request is released. Eclipse record all modifications in source code automatically always we save our code, keeping this changes in a local history.

 

To use the local history is very simply, we only need do a right click in a our source code and in the context menu choose, team -> show local history

 

There you will can see all the modifications made in your code. Of course, this a local history, but can help in many situations.

 

You also can compare the versions, apply the changes etc.

 

 

Imagem_post4.jpg

Imagem_post5.jpg

Imagem_post6.jpg

Syntax coloring is a nice feature every ABAP developer loves since the new ABAP editor was provided a couple of years ago.

But you can only use it to distinguish between keywords, non-keywords, literals and comments. But keywords are all colored the same way in the ABAP editor. 


In Eclipse you have much more possibilities to customize the color settings of the keywords in the editor. With the new ADT version 2.58 it is possible to specify the keyword colors via the eclipse preferences page:


01-04-2016 15-12-14.png



In the example above I specify that "Method" and "Endmethod" statements are colored differently in the editor than the other keywords. I can even specify different font settings for these keywords, e.g. I could strikethrough FORM statements. The code then looks like this:



01-04-2016 15-16-32.png


Have fun with your colored code.


Regards,

Thomas.




Dear ABAP community,

 

I'd like to give you a short summary of the reworked ABAP project wizard of the latest ADT version 2.58 that is now available.

 

Creating or Defining the System Connection as ABAP Projects


Since you work with ADT, you know ABAP projects that represent the connection to your backend system.

 

Now, usability and functionality of the ABAP project creation wizard have been significantly improved as follows:

 

  1. The first creation wizard page displays a table that lists all system connections from the SAP Logon. So, you can skim through the table to find your candidate. In addition a search field is added above the table. From here you start typing the name of the relevant system. Then, only the relevant connections are displayed in the table. Both improvements make it easier for you to find the relevant system connection. Because, now you don't need to know its concrete name anymore. As long as you have found your system, just double-click it, to open the next page.

    bbb.png

  2. On the second page, you will find the "Connection Parameters" and the "Secure Network Settings" in a well structured way. To create a new ABAP project on base of an existing connection, you can modify the displayed data manually or just taking over all settings. In contrast to the previous ADT version, you can now define here more specific settings, for example, SNC, and so on.

Have fun with creating ABAP projects.

Do you know this situation: You are working on a development object in your eclipse IDE and you want to know in which transport request this object is locked. For sure the AIE transport viewer is the tool of choice in that case:



28-01-2016 12-52-26.png

 

In the transport viewer you see all your transport requests and all the objects that are locked within these request.


BUT: In case you have a lot of requests in that list you have an issue. Because you have to open all folders in order to manually do the lookup for the object you are interested in. This takes you a while and you are frustrated about the tool. 


STOP: Why not use the Filter line on top of the view? Just enter the name of the object (or parts of it) and the tree automatically opens the correct folder and you immediately see the request where the object is locked. This makes you happy again.


2.png



I think this is a very helpful feature !


Have Fun.

Thomas.





 


This article could be helpful for you if you are an ABAP developer using ABAP Development Tools (ADT) and you experience one of the following scenarios:

  • Your ADT breakpoints are decorated with small red crosses and you get messages telling you that there is a breakpoint activation conflict
  • You want to debug for a group user (means multiple persons using the same username and password in parallel, e.g. support user or technical group user).
  • You switch between ADT and SAPGUI Debugger (with external breakpoints) for the same system, client and username
  • You use multiple ADT projects for the same system, client and username in parallel

 

The intention of this article is to provide a basic understanding about the specialty of these situations and to show what possibilities ADT offers to deal with them. If you have issues with mass requests and you get too many debug sessions in a short time you can directly go to the section "Mass Requests".

 

ADT Breakpoints and External Requests

 

When using SAPGUI you have to deal with three different kinds of breakpoints (debugger breakpoints, session breakpoints and external breakpoints). Now with using ADT things become much easier as there is only one kind of breakpoint for all purposes. In ADT you just create a breakpoint and by default it can be used to catch any request for the current user, including external requests like RFC or HTTP.

 

Requests.jpg

Once a request hits a breakpoint a new debug session will be started and the project that was used to create the breakpoint will be the owner of this session, regardless where the request was started from.

 

Activation Conflicts

 

ADT breakpoints are easy to handle and work well for 95% of all debugging scenarios. But in some cases like the ones mentioned (group user, multiple IDE case, etc.) things are a bit more complicated. In these cases there are multiple ADT projects / IDEs / persons claiming to debug the same requests (identical system, client and user). The question is now which ADT projects becomes the owner of upcoming debug sessions? This is what we call activation conflict.

 

Requests2.jpg

Remark: Above is mentioned that projects claim their "right to debug" by creating breakpoints. But the debugger should also work in some other situations, e.g. at the statement "break-point". Therefore an ADT Project claims debugging rights already during system logon and conflicts can also occur if no breakpoints are present.

 

So what's the solution? Who will be the owner of the debug session?

 

Before NetWeaver 7.50 it is the project that was most recently used to create a breakpoint (or most recently used to execute the menu action "Refresh Breakpoint" / "Refresh Breakpoint Activation").

 

Starting with NetWeaver 7.50 there is an integrated conflict handling available for these situations that makes conflicts obvious and offers options to deal with it. Additionally there is a new debugger setting that can be used to avoid conflicts completely at the price of a reduced breakpoint validity scope.

 

Conflict Management

 

As long as only one ADT project claims debugging rights for a certain set of requests everything is ok. Once a second project also claims debugging rights for the same requests this is recognized and the second project will change its debugging status to "suspended" while the first project stays unaffected. Within suspended projects all breakpoints are immediately decorated with small red crosses and corresponding texts:

 

RedBreakpoints.jpg

Projects in suspended state cannot be used for debugging at all. But it's easy to reactivate debugging within a suspended project, although this will suspend the currently active project in return.

 

To reactivate a suspended project and suspend the currently active one you can perform one of the following actions:

  • Open the context menu on any breakpoint or the vertical bar where you usually place breakpoints and choose "Refresh Breakpoint Activation"

     BreakpointRefresh.jpg

        To reactivate debugging for yourself (including suspension of someone else) you have to choose "Continue" on the confirmation popup

     CreateBreakpoint.jpg

  • Alternatively create a new breakpoint and choose "Continue" on the confirmation popup

 

The debugger suspension will cause an information popup in the first project:

 

SuspendedInfoPopup.jpg

 

Now the first project is suspended and therefore offers the chance to reactivate debugging including the suspension of the currently active project (= now the second project).

 

Currently running debug sessions are not affected. Even if someone else suspends you while you are debugging you can go on as usual. To remember: The above conflicts are regarding the question who will be the owner of newly upcoming debug sessions.

 

Additionally you will be warned when you are about to change your debug settings in a way that would cause a conflict. For example if you try to debug the requests of one of your colleagues while he is currently working with his user on his own PC / IDE.

        

SettingsConflict.jpg

 

Project Debugging Scope

 

In case you are not interested in external HTTP and RFC requests but only in the requests that are triggered from your own eclipse project (embedded SAP GUI, ABAP Unit) you can also reduce the validity scope of your breakpoints. There will be no more conflicts at all, but you won't be able to debug external HTTP or RFC requests anymore. Additionally nobody else will be able to catch the requests that are fired from your project.

 

Requests4.jpg

To reduce the breakpoint validity scope you can enter your project properties, navigate to ABAP Development -> Debug and choose "This project only".

 

SettingsProjectDebugging.jpg

 

Conflicts between ADT and SAPGUI external breakpoints

 

The conflicts that can occur between SAPGUI and an ADT project are conceptual similar to the conflicts between multiple ADT projects:

 

Requests5.jpg

But there are also some differences. Once an external breakpoint is created in SAP GUI all active ADT projects that are aiming for the same requests will be suspended. There is no further confirmation popup within SAP GUI. Also vice versa ADT projects do not take SAP GUI external breakpoints into account and suspend them without any further confirmation during the creation of an ADT breakpoint or a similar action (breakpoint refresh, system logon).

 

The improvement of NW 7.50 compared to lower releases in this case is that you can easily see within ADT that your project has been suspended.

 

Mass Requests

 

If you have to debug a code position that is executed very often, like one time per second or even more often, then you probably have the problem of too many debug sessions. This is independent from the above explained conflicts but can also be caused by the work with group users, e.g. if you have a web application that uses a shared technical group user:

 

Requests3.jpg

 

In some situations debugging with terminal ID can be useful for this problem. But for tagging HTTP requests with the terminal ID you need to start your browser via the SAP HTTP Plugin for IE (refer to SAP note 1041556), which is also not suitable for some situations.

 

What you can do instead:

  • Use a conditional breakpoint to specify the wanted request(s) more precisely
  • Try to create the breakpoint at a code position that will be reached by the wanted request but not by each and every request
  • Activate your breakpoint only for the short time when you expect the wanted request and deactivate or delete it when the debug session has been started

 

Once you have a running debug session for your wanted request it's easy to go on by using soft breakpoints. These can be used like normal breakpoints in running debug sessions but will not start new debug sessions.

Introduction

 

Many of us have improved development speed by using several custom code templates in SAPGUI Editor. And me too, of course.

img01.png

 

So, when I started working in Eclipse, I was strongly missing my usual templates.

Of course, I could copy all the templates from SAPGUI to Eclipse manually, one by one. But manual uniform repeating action offends real programers

So I have created ABAP program, which display a list of all custom SAPGUI templates, and allows you to copy selected (or all of it) to Eclipse.

 

 

Installation

 

To install program you need to import SAPLink nugget in attachment (you should change extention from .xml to .nugg).

(The program have been created in system with SAP_BASIS 702 SP11)


User’s manual

 

1) Run program ZUTIL_TEMPLATE_SAPGUI_2_ADT.

 

2) The list of all custom templates from file abap_user.xml will be displayed.

img02.png

 

3) You can select individual lines to copy only selected templates or copy all templates. To copy all templates you don’t need to make any selection. (The program will ask you to confirm)

 

4) Press “Copy to Eclipse”.

If you haven’t selected any line, you’ll see the confirmation

img03.png

 

5) Next, the dialog for choosing Eclipse workspace folder will appear.

Choose workspace folder of required Eclipse installation.

(It can’t be defined programmatically because you can have several Eclipse installations)

img04.png

 

6) That’s all

img05.png

 

7) Now let’s check the results.

Start Eclipse (or restart, if it is already running) and check Templates

img06.png

 

Exactly what we need!

 

That’s all.

I hope this small tool will be helpful

 

Best regards,

Vitaliy

Introduction

The immense potential of the Core Data Services (CDS) semantic data layer is aware to all of us. The CDS graphical editor complements this potential by representing CDS entities and their relationships in a graphical form.

 

As an architect or an application developer, you know the difficulty in comprehending complex source codes either developed by you or your colleagues. Every time before you engage in a technical discussion you need to have a relook at the implementation for an effective engagement.

 

The CDS graphical editor takes care of this gap and brings you up to the speed in a shorter span. The graphical view enables you to have implementation discussions between project stakeholders without detailed explanation of concepts and relationships as they are self-explanatory.

 

The graphical view is a read-only view. To make changes to the CDS entity, you need to access the source code editor. Graphical editor enables you to directly navigate to the source code editor and make the required changes.

 

The CDS graphical editor is available in ABAP-in-Eclipse development environment with ABAP Development Tools version 2.51 in SAP NW 7.5 SP00.

 

Access Graphical Editor

 

  1. In Project Explorer, navigate to the required ABAP package.
  2. Navigate to the DDL text editor.
  3. Choose a DDL text editor.
  4. In the context menu, choose Open with Graphical Editor.

       The graphical editor appears on the right and provides a graphical display of the entity as described in the DDL text editor.

 

CDS Graphical Editor Features

In the graphical editor, you can use any of the following options to see the source code of an entity:

  • Double-click the object
  • Use context menu of the object

 

text_editor.png

 

 

Updating the Entity in the Graphical Editor

You can edit the source code in the text editor. Changes made in the text editor appear immediately in the graphical editor. Syntax errors appear as parse error in the object where the error occurred.

 

 

parse_error.png

 

 

 

Opening text editor

Choose the object and from the context menu, choose Open DDL Source Editor to view the text editor.

 

 

open_ddl_source_editor.png

 

 

Where-Used feature

This feature enables you to view the usage of a user-defined type within the DDL source. Choose a user-defined type and from the context menu choose the option "Highlight Used Column". The user-defined type appears highlighted.

 

 

highlight_where_used.png

 

 

Browsing Data Model

If the data model is large such that not all the objects are visible in the drawing pane at once, you can use the Miniature View to browse the data model. Press CTRL + 3 on the keyboard and enter Miniature View in the field.

 

miniature_view.png

 

 

Auto Layout

The graphical editor positions the objects in the editor automatically. You can manually change the position of the objects but these positions are not persisted. The next time you open the DDL source the graphical editor lays out the position of the objects automatically. In the context menu of the graphical editor, choose Auto Layout.

 

 

auto_layout.png

 

 

Printing and Exporting

You can print or export object diagrams using the Print or Export Diagram options available in the context menu of the editor.

 

 

The table below displays the graphical representations of entities with its description:

 

 

Graphical RepresentationDescription
entity_icon.pngThis symbol represents an entity.
key_element_icon.pngThis symbol represents a key element in an entity.
element_icon.pngThis symbol represents elements in an entity.
association_icon.pngThis symbol represents an association in an entity
user_defined_type_icon.pngThis symbol represents a user-defined type.
association_line.pngThis symbol also defines an association. The directed line indicates the relationship between entities.The association name appears on the line. The line also displays cardinality if you have defined a cardinality for the association.
inner_join.pngThis symbol represents an inner join.
left_outer_join.pngThis symbol represents an outer join.
union_icon.pngThis symbol represents a union.

Actions

Filter Blog

By author:
By date:
By tag: