cancel
Showing results for 
Search instead for 
Did you mean: 

How to get WD component name or application name

0 Kudos

Hi ,

Is there any sap standard variable where webdynpro component name or application name get store like SY-CPORG.

Thanks And Regards,

Rohit

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi All,

Use below code to get component name in run time.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Rohit.

Refer table WDY_COMPONENT for list of webdynpro components and for WDP application you can refer WDY_APPLICATION table.

Thanks

KH

former_member184578
Active Contributor
0 Kudos

Hi,

You can get the application name using below code:


DATA : lr_api      TYPE REF TO if_wd_component,

          lr_app      TYPE REF TO if_wd_application,

          lr_app_info TYPE REF TO if_wd_rr_application,

          lv_app_name TYPE string.

   lr_api = wd_comp_controller->wd_get_api( ).

   CALL METHOD lr_api->get_application

     RECEIVING

       result = lr_app.

   CALL METHOD lr_app->get_application_info

     RECEIVING

       result = lr_app_info.

   CALL METHOD lr_app_info->get_name

     RECEIVING

       result = lv_app_name.

Now pass the lv_app_name to the FM.

hope this helps u,

Regards,

Kiran

Former Member
0 Kudos

Hi Rohit,

There are SAP standard tables for applications and components:

WDY_APPLICATION for applications

WDY_COMPONENT for components

Regards,

Ashvin

harsha_jalakam
Active Contributor
0 Kudos

Hi ,

If you want to know Component name, you can right click on a particular UI element and click on -> More Field Help -> Technical Help. This gives you  the component and View information.

And while debugging also you can find the same information at  the debugging console at the top , which gives the component name , method name currently executing.

Regards,

Harsha

0 Kudos

Hi Harsal,

I want to store this component name but from one function module which is calling from WD.
how I can get this WD name using any SAP standard variable.

harsha_jalakam
Active Contributor
0 Kudos

Hi ,

I am not about the particular standard variable,please check the following link which might assist you.

http://www.saptechnical.com/Tutorials/WebDynproABAP/Search/Index.htm

Regards,

Harsha

ramakrishnappa
Active Contributor
0 Kudos

Hi Rohit,

When you call a function module from WD and inside FM  you cannot get the wd application name unless it is passed as parameter.

To get application name inside WD,

data lv_app_name type string.

lv_app_name = CL_WDR_TASK=>application_name.

Now, you can pass this to FM if you require.

Regards,

Rama

0 Kudos

Hi Rama,

This FM is getting call from my all WD component so I am thinking if I get application or component name in this FM then no need to do any change in WD.

Thanks

Rohit