Skip to Content
Author's profile photo Jakob Steen-Petersen

How to call a SAP GUI transaction from Webdynpro ABAP using NWBC


When using Web Dynpro for ABAP, sometimes we have the need to call other functions or transactions in the SAP system landscape. In the “old days” where everything was done in ABAP and the user was calling the SAP system by using an SAP GUI  – this was easy; just call the requried function and a new session was launched in the GUI.

This has changed – several technologies for user UI development are possible, This means that whe could have a switch between technologies inside a Business Process.

The good news is that the NWBC can act as a framwork for this. Using the NWBC we can have an central application we all our SAP functions are processes inside, without having a lot of browser windows popping up etc.

This example shows how to develop a simple Webdynpro application, where the user can enter a Sales Order number and from the Dynpro call transaction VA03 in SAP GUI.


SAP ERP System

Netweaver Business Client (setup and running)

Basic Web Dynpro Knowledge

How is it done?

The goal is reached by using Object-Based Navigation (OBN). OBN is used in Roles (PFCG) to assign an object to a function.

What basically happens is that the OBN call searches the Roles of the user calling a certain function and when found it launches the corresponding transaction (or other function). Because of that we will later se, that the OBN is very tightend to the Roles of the user (but NWBC is anyway)

Do the stuff

First of all we create the WebdynPro application. It could be a list of Sales Orders or anything, but in this example it´s just a simple screen with an input field and a button:


This is quite basic: an input field whe the user can enter a Sales Order number and a pushbutton to excute…

The interresting part is the code of the Action of the button:


The onAction event is implemented like this:


First part is done to retrieve the value of the Sales Order from the screen. Second part is the interesting one:

By using the IF_WD_PORTAL_INTEGRATION class we can exceute the call of the Business Transaction. Note! There is no SAP Portal involved here – it works without!

Four parameters are used here:

OBJECT_TYPE:                    This is the type of object called

OBJECT_VALUE_NAME        This is the name of the parameter passed to the call

OBJECT_VALUE                   This is the value passed from screen

OPERATION                         This is the operation to call

To fully understand the above coding i will goto the next step right now:

We will have to define a Role (or expand an existing one) in order to give the user the required functionality:

Call PFCG and create a role:


The role consist of a Root folder and a Subfolder (NWBC requires at least one lower level). First “pin” is the Web Dynpro Application created in step one – just basic call of a Web Dynpro application.

Second “pin” is the Sales Order display Transaction VA03. When you press the Other Node Details button you will notice the OBN part below


  This is where we apply our OBN part. Press Insert Method button


In here we can use a BOR object as the object. We choose BUS2032 (SalesOrder) and method Display


Next screen is for entering the parameters


This is where we pass the actual value from the screen to the transaction. Parameter ID (first column) is found by entering transaction and get the Scrren field name (F1->technical).

In the second column the value is intered – by using Curly bracktes we tell the system that we vil pass a variable value.

Note: the BOR object used is only for defining the naming of the Object type etc. No BOR object logic are called at runtime! In part 2 i will show how to use a none BOR value…

Now the Role are ready to use!


Save it and assign to a user.

Start NWBC


Execute the Web Dynpro App


Enter Sales Order number and press Button


So: the VA03 are called with a regular SAP GUI interface – no HTML GUI. We have done a Switch between technologies from Web Dynpro ABAP to SAP GUI.

What happened?

The system was told to call a Business Object called SalesOrder with the method Display (SalesOrder.Display). When that called was executed it searches the Roles assigned to the logged in user for an entry with the OBN assignment SalesOrder.Display.

When found in the Role, it executed the transaction assigned to that menu point and passed the value from the Screen field to the VBAL-VBELN fields in VA03.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hello Jakob,

      it is very good explained, but we have here a solution for calling SAP Standard-Transactions in NWBC. Is it also possible to call Z-Transactions or rather Z-Reports from WebDynpro ABAP using NWBC?

      I see Problem`s with BOR-Objects?
      Next question,... is it possible to create Z-BOR-Objects special for our Z-Transactions (when "yes", can you please give a help or a short description ) ?

      Thanks in forward.

      Best Regards

      Author's profile photo Jakob Steen-Petersen
      Jakob Steen-Petersen
      Blog Post Author

      Hi Erwin

      I think you can call z-transactions, but i have but i haven´t tried recently. But what i am sure of is that you can create Z-BOR objects:

      Goto transaction SWO1
      Enter name of you object
      Press Create

      The you can create methods etc. I.ex. i here create a method called FBL5 which calls transaction FBL5 (of course you can call your own z-transactions).

      Place cursor on method and then press button Program. You will now go into the code section. Here you can add a simple statement: Call Transaction ‘FBL5’.

      This is the simple example. In you case an suggestion could be to create a generic BOR object which can call any transaction with the import of a parameter….

      Note: please remember to release you object AND method via the menu