Friday, January 20, 2012

ABAP: How to read application server name in abap

We can see the list of all application servers via SM51 txn.

It's very easy to find the Application server host name and you can find the same using the SYST parameters( SY-HOST).

But at times, there are requirements to show/display the actual name of the application server.
Here is a simple code for the same using C Functions within ABAP.

  call 'C_SAPGPARAM' id 'NAME'  field 'rdisp/myname'
                                     id 'VALUE' field lv_current_server.

Cheers,
Sandeep 


1 comment: