cancel
Showing results for 
Search instead for 
Did you mean: 

Set and get own application parameters for WebDynpro ABAP

Former Member
0 Kudos

Hi,

it is possible to define your own application parameters in web dynpro ABAP.

If you do so, you will recieve a warning.

The question now is how to get this parameter using any method.

(This parameter isn't an URL-Parameter.)

The second possibility would be to define these parameters at SICF (GUI-Configuration). Same question here how to get these parameters!?

Thanks a lot for your help.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can define your own application parameters. The warning means that they can't be set via URL. This means that you can't set them from SICF either. They must be set inside the WD Applciation in SE80 itself. This is most useful when you create multiple applications for the same component. These values can be read with the GET_APPLICATION_PARAMETERS method of the Appplication Info object:

lt_app_params = wd_this->wd_get_api( )->get_application( )->get_application_info( )->get_application_parameters( ).

Former Member
0 Kudos

Thomas,

thanks for your feedback. I think you are using statement chaining in your answer which is not available in our system (7.00 without any EHPs). I also didn't find the method you named ->get_application_parameters and no interface where this method is available. Would you be so kind and give me a more detailed information / example how to get the application parameter?

You are right, I maintain the application parameters using SE80 inside my web dynpro application. Let's assume I will maintain a parameter like plant (WRK as PID comparable to ABAP Dynpro) and get this parameter e.g. at the WDDOINIT method at the component controller. Therefor I need this solution.

Thanks in advance,

Juergen

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I did cut and paste from a 7.02 system so there was statement chaining, but the same sample can be broken out for older releases.

DATA lo_api_componentcontroller TYPE REF TO if_wd_component.
  lo_api_componentcontroller = wd_this->wd_get_api( ).
  data lo_application type ref to if_wd_application.
  lo_application = lo_api_componentcontroller->get_application( ).
  data lo_appl_info type ref to if_wd_rr_application.
  lo_appl_info = lo_application->get_application_info( ).
  data lt_appl_params type wdrr_application_parameters.
  lt_appl_params = lo_appl_info->get_application_parameters( ).

The application info object (type IF_WD_RR_APPLICATION) has the method GET_APPLICATION_PARAMETERS.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/036b1fdc7e22f2e10000000a1553f7/frameset.htm

What release level/SP level is your system? Depending upon the level, it is possible that this API method might not exist.

Former Member
0 Kudos

Thomas,

thanks for your answer.

It seems the method is not available. Our system is based on SAP_BASIS 700 Level 0021 If I check the IF_WD_RR_APPLICATION it contains only four methods: GET_NAME, GET_STARTUP_WINDOW, GET_HELP_LINK, SET_HELP_LINK. Also the type wdrr_application_parameters isn't available in our system. I think I have to do it the old way...?

Regards

Juergen

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I'm not sure there is a public API before this one existed. This is somewhat complicated because default application parameter values can also come from the central repository (WD_GLOBAL_SETTINGS) and are cached in shared memory.

However for your purpose, you just want a custom parameter maintained in the WD Application. For that you could probably read table WDY_APP_PROPERTY and get the information you want.

Former Member
0 Kudos

Thomas,

that's what I mean with "old way". Who cares about methods - read the table by yourself and you will get the data you need, that's exactly what I did.

Thanks for your help.

Juergen

Answers (4)

Answers (4)

harald_schmitz2
Discoverer
0 Kudos

Hi Jürgen,

I'am using the following method call to get application parameter values

DATA lt_appl_params TYPE wdrr_application_parameters.

lt_appl_params = wdr_task=>application->application_info->get_properties( ).

This method is working since 7.00 and delivers also sap-parameter-values (WD*) and consider global values out of the shared memory and also values out of application configuration.

Best regards

Harald

Former Member
0 Kudos

Hi Jürgen,

I usually use my own URL parameters like that:

I define variables as importing parameters in the inbound plug of my window which is directed to via the application.

example:

url_param1 importing type string

url_param2 importing type string.

Now they can be added to the URL in standard:

http://server/sap/bc/webdynpro/sap/myapp?url_param1=test&url_param2=test

Then I save them as public attributes at the component controller.

Best regards

Sebastian

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can define your own application parameters. The warning means that they can't be set via URL. This means that you can't set them from SICF either. They must be set inside the WD Applciation in SE80 itself. This is most useful when you create multiple applications for the same component. These values can be read with the GET_APPLICATION_PARAMETERS method of the Appplication Info object:

lt_app_params = wd_this->wd_get_api( )->get_application( )->get_application_info( )->get_application_parameters( ).

frank_stdle
Participant
0 Kudos

WDA applications only support GET parameteres (parameters in the URL). POST parameteres are not supported. I dont't think you would be able to get hold of POST parameters in the ICF not of the WDA either, and if you did, you would not really be able to communicate those to your application.