Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

1.    Create a Web Dynpro project

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

                                

             

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

                                   

         

      • 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)

                                   

                                      

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

                                                                      

      • 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).

                                   

                                  

      • 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.

                                     
                               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.

                             

      • 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.

                              

4 Comments
Labels in this area