cancel
Showing results for 
Search instead for 
Did you mean: 

How to call Launchpad from SAP ABAP Enhacement

0 Kudos

Hi

Is it possible to call FPM Lauchpad from SAP ABAP Enhancement action automatically...!

I found some of the links related to the FPM Lauchpad Calling

But I need to call a FPM Lauchpad Transaction from ABAP Enhancement..Is it feasible...!

Thanks,

Amarnadha Reddy K.

Accepted Solutions (0)

Answers (1)

Answers (1)

TudorRiscutia
Active Participant
0 Kudos

Hello Amarnadh,

     What exactly do you mean by ABAP Enhancement?

     With FPM Launchpads, you can pretty much launch them from anywhere. You just need to get an instance of the FPM via CL_FPM_FACTORY=>GET_INSTANCE( ). Afterwards you need to get an instance of the navigation:

DATA:

lr_navigation     TYPE REF TO IF_FPM_NAVIGATION,

ls_navigation_key TYPE fpm_s_navigation_key,

ls_app_param      TYPE apb_lpd_s_params,

lv_target         LIKE LINE OF mr_navigation->mt_targets.

ls_navigation_key-key1 = "ROLE" (from Tcode lpd_cust)

ls_navigation_key-key2 = "INSTANCE" (from Tcode lpd_cust)

lr_navigation = mr_fpm->get_navigation( ls_navigation_key ).

You can also configure URL parameters (like the WD Application Configuration):

ls_app_param-key   = (Application Parameter Key).

ls_app_param-value = (Application Parameter value).

APPEND ls_app_param to lt_app_param[].

READ TABLE lr_navigation->mt_targets  INTO lv_target WITH KEY alias = (Alias name from lpd_cust, careful, this is not the system alias)

and then simply call the navigation:

lr_navigation->navigate(  EXPORTING iv_target_key = lv_target-key

                                    it_application_parameters = lt_app_param ).

I think you can pretty much do this in an ABAP class as well, not necessary in a WD component.

Tudor

0 Kudos

Hi Tudor,

I already create the class for Lauchpad and created application alias for the standard transaction. This I am calling from the webdynpro component initial method( component is created for calling this lauchpad only )..and I am calling this webdynpro component configured application ( FPM OVP Application ) from the enhancement using CALL BROWSER method which is getting dump..So is it possible that we can call a lauchpad application from ABAP Enhancment section. I tested webdynpro application and it is also giving dump saying " SAP_ECC_Manufacturing...etc"..

Is it possible to call launcpad calling webdynpro application url using FM CALL_BROWSER ( As I know it is calling as ITS Transaction )

Regards,

Amar

TudorRiscutia
Active Participant
0 Kudos

Hello Amarnadh,

     Just to make it clear: You want to open an FPM application from an enhancement.

     1. Is the enhancement made to a Web Dynpro component or to an sapgui report/program?

     2. Do you want to navigate to this application in the same window, or to open a new one?

     Function modules like "CALL_BROWSER" are quite old, they are to be used in sapgui transactions. For Web Dynpro there is a totally different mechanism. The first problem is, you can open a browser from a gui program, but it will be opened in a new window, so you cannot really navigate between these two. Also, launchpads will open a new window as well.

     The second problem is, FPM framework is intend to be contained and what I mean by that, most of the functionality was designed to work only inside an FPM instance. So it's not that easy to navigate from a standard WD application to a FPM app.

     Maybe you can be more specific...

Tudor

0 Kudos

Yes Tudor..This webdynpro application which contains FPM Lauchpad call needs to called from sap GUI enhancement not from Webdynpro...I know that within FPM instance only it needs to called..So I need to call this webdynpro application URL from using CALL_BROSER from SAP GUI Standard Report Enhancement..Will it be possible.

TudorRiscutia
Active Participant
0 Kudos

Alright,

Then the first thing you should know, if you use NWBC, you won't be able to open it in the same window, but in a new one. If you use SAPGUI, then it will automatically open a new browser window (depending on what you're using, maybe Internet Explorer).

In this case, you don't really need launchpads. Because they only work inside FPM applications. What you need, is to simply create the FPM OVP app's URL dyamically at runtime. It will look something like this:

     http://<FQDN>:<port>/sap/bc/nwbc/...

You can try the following code:

CONSTANTS:

  lc_appl_name TYPE string VALUE '<application name>'.

DATA:

  lt_parameters TYPE tihttpnvp,

  ls_parameter  TYPE ihttpnvp,

  lv_abs_url      TYPE string,

  lv_url_conv(500).

 

ls_parameter-name  = 'sap-wd-configId'.

ls_parameter-value = '<application configuration name>'.

APPEND ls_parameter TO lt_parameters[].

...

you can also use some other parameters here, WD standard or application specific

cl_wd_utilities=>construct_wd_url(

  EXPORTING application_name = lc_appl_name

                     in_parameters      = lt_parameters[]

  IMPORTING out_absolute_url   = lv_abs_url ).

lv_url_conv = lv_abs_url. "convert format

CALL FUNCTION 'CALL_BROWSER'

  EXPORTING

    url = lv_url_conv. 

Try this, I haven't tested it.. so you might have to do some corrections. Hope it helps!

Tudor

Former Member
0 Kudos

Hi Tudor,

Can you please tell me how to close the previous FPM application on navigating to next FPM application?

I am navigating to my next FPM application using CL_FPM_HR_NAVIGATION~NAVIGATE but it navigates to next FPM in new window and old one remains open.

Is there any way I can close the previous window and then navigate or vice versa?

I tried firing firing FPM_CLOSE event using if_fpm~event_by_event_id but it after calling navigate method but it doesnt work. This doesnt open the new application instead tries to close the previous application with message "Application has closed and you can close the browser now"

Please help.

Thanks in advance.

Regards,

Ibrahim

TudorRiscutia
Active Participant
0 Kudos

Hello Ibrahim,

     The FPM framework doesn't permit navigation between FPM applications in the same window. Basically, when you call the CLOSE event, you will destroy all the FPM instances in the current work process, and as the second application was launched from the other one, it is basically in the same FPM instance.

     I'm not sure if it works, but the GET_NAVIGATION method from IF_FPM_NAVIGATION also has an IV_INSTANCE_SHARING parameter, which by default is TRUE. Try setting it to false, maybe it will create a new FPM instance and you can afterwards close the previous one.

Tudor

Former Member
0 Kudos

Hi Tudor,

Thanks for the response.

The method  CL_HR_NAVIGATION_SERVICES=>navigate already sets IV_INSTANCE_SHARING to ABAP_FALSE internally while calling  get_navigation.


Regards,

Ibrahim

Former Member
0 Kudos

Hi

I am using the above Method to call a FPM Application from GUI.I need to Pass internal table to the

FPM application .please help me to resolve the issue.