Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

How to use navigation profiles with classes

$
0
0

There are some enhances available with navigation profiles.

 

From Sap Help:

  • You can use the "general" navigation profile to insert additional functions or transactions into the application toolbar or context menu of an ALV grid control or ALV tree control.
  • You can create, change, save, and manage user-specific and non user-specific navigation profiles.
    In navigation profiles, you can define which functions, transactions, class calls, or menus are displayed in the application toolbar or context menu.
  • You can also transport or import navigation profiles.

 

You can use the navigation profile in the following transactions, for example:

Shop Floor Control (PP - SFC)

- COOIS - Order Information System

- COHV - Mass Processing

- CO01, CO02, CO03 - Production Order (in the Order Network Overview)

- CO24 - Missing Parts Information System

- CO27 - Picking List

 

Production Planning Process Industries (PP-PI-POR)

- COOISPI - Order Information System PI

- COHVPI - Mass Processing PI

 

Material Requirements Planning (PP-MRP)

- MDVP - Collective Availability Check for Planned Orders

- MD09 - Determine Pegged Requirements

 

KANBAN (PP-KAB)

- PKMC - Display Control Cycle Maintenance

 

Other

- PDS_MAINT - Change Production Data Structure (Plug-In)

 

 

In this example, we wil enhance CO27 transaction to include a menu button and use ALV data to call a smartform print.

 

 

In CO27 transaction, click in Navigation Profile button and select "Change Navigation Profile".

1.jpg

To insert a new menu button, select "Application Toolbar" row and click in add button. We will use a "Class Call".

2.jpg

We need to fill button information as Text, Icon and Quick Info.

The implementing Class is what we need to create to manipulate ALV data.

This popup already show what interface we should use: IF_NAVIGATION_PROFILE.

So, we need to create a Custom Class first.

3.jpg

In SE24 transaction, we need to create a normal class. Here we created ZCL_CO27 class.

4.jpg

In ZCL_CO27 class, insert IF_NAVIGATION_PROFILE in interface tab.

5.jpg

This interface will make USER_COMMAND method available to code.

6.jpg

Inside IF_NAVIGATION_PROFILE~USER_COMMAND method, you can have your code to handle ALV Data from CO27, as the following example.

7.jpg

Now, that we have ZCL_CO27 class created and activated, let's link it as Implementing Class in our navigation profile as follow.

8.jpg

Navigation Profile now display Print Button. We can save this profile as default, user-specific, etc.

9.jpg

As we run CO27 and load our recently created navigation profile, print button will be available and will handle ALV table from CO27 result with selection screen options.

10.jpg

 

That's it.


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>