Skip to Content

1.    Create a Web Dynpro project

      • Create a web dynpro project and then create a new application.

                                 /wp-content/uploads/2014/09/image1_541053.png

             

      • Open view and add an element ‘link to action’.

                                    /wp-content/uploads/2014/09/image2_541054.png

          /wp-content/uploads/2014/09/image3_541061.png

      • Click on link to action element. In properties -> go to general tab and in text field write the name you want to display (eg. Form 1)

                                    image 4.png

                                      

      • Then go to events tab. Click on create button to create an event handler.

                                   image 5.png                                    image 6.png

      • Give the name of your event handler (eg. Openboform). Click Finish.
      • Event Handler (eg. onActionOpenboform) will be created. Rebuild the project.
      • Double click on link to action element to go to the Event Handler code (eg. onActionOpenboform).

                                   

                                   image 7.png

      • To get PCD path for the BO form iView.

                               Navigate to the BO form iview whose pcd path you need. Right click on it. And click on copy Id.

                                      image 8.png
                               The pcd path will be copied now paste it to your code. For example

                             “pcd:portal_content/com.test.fld_TEST/com.test.fld_FORM/com.test.fld_form_iviews/com.test.ivu_bo_form_1”

      • Write the below code
        inside the method (eg. onActionOpenboform).

                     public void onActionOpenboform(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

                           {

                                      String l_str_iViewPath = null;

                                    String l_str_dbParamters = null;

                    //pcd path of the form to open

                                    l_str_iViewPath=“pcd:portal_content/com.test.fld_TEST/com.test.fld_FORM/com.test.fld_form_iviews/com.test.ivu_bo_form_1”;

                   // open document PARAMETER

                                    l_str_dbParamters= “&sRefresh=Y&NAII=Y&sOutputFormat=H”;

                  // setting the parameter for the filters of BO form

                                    String l_str_businessParam = “&lsSEnter+Year:=” + 2013 + “&lsSEnter+Name:=” + “ABCDE”

                                    String l_parameters = l_str_businessParam + l_str_dbParamters;

               //Navigate to page

                                    WDPortalNavigation.navigateAbsolute(l_str_iViewPath,WDPortalNavigationMode.SHOW_EXTERNAL,                                    “toolbar=no,resizable=yes”, “MyWindowName”,WDPortalNavigationHistoryMode.NO_HISTORY, “MyTargetTitle”,null,l_str_dbParamters);

                            

                         }

      • Save, Build and deploy the project

 

2.    Create a role on portal and add the Wed Dynpro application created.

      • Create a role .
      • Add your Web Dynpro application to that role.
      • Assign that role to the user who wants to access the BO form.

      3.    Execute the application

      • Login with the user id.
      • You will see tab of your application which was added to the role. For example BOintegrationApp.

                              image 9.png

      • On click of link (here, Form 1) the BO form will open with filters value, which we have passed from Web Dynpro application.

                        (here, We have passed Year =2013 and Name =ABCDE)

      • Data will be fetched according to the filters.

                               /wp-content/uploads/2014/09/image10_541075.png

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply