Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
adam_krawczyk1
Contributor

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:

Then fill in some details, as in example below:

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:

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:

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.

[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!

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:

Select GitHub Issues type:

Then configure it with your GitHub account:

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:

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".

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:

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.

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.

There you go!

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

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

30 Comments