Skip to Content
Introduction:- Navigation between BSP Applications-Part II.

If you’ve not read the Part I, I would suggest you to go thro the below link.


BSP/How-To: Navigation between BSP Applications: Part-I

This chain of blog is described into two parts for better understanding.

  • BSP Application using MVC Architecture
    1. From MVC-BSP Application to MVC-BSP Application
    2. From MVC-BSP Application to Flow Logic BSP Application
  • BSP Application using Flow Logic Methodology
    1. From Flow Logic-BSP Application to MVC-BSP Application
    2. From Flow Logic-BSP Application to Flow Logic BSP Application


Part I – explained in my previous blog.


Let’s look at Part-II…


Let’s go into the example, scenario & method of data transfer between BSP Applications in Part I explained in Part I.SERVER_EVENT.


    WHEN ‘navigate’.
     

  1. Construct the Target URL

      CALL METHOD RUNTIME->CONSTRUCT_BSP_URL
        EXPORTING
          IN_PROTOCOL       = ‘http’
          IN_APPLICATION_NS = RUNTIME->APPLICATION_NAMESPACE
          IN_APPLICATION    = RUNTIME->APPLICATION_NAME
          IN_PAGE           = ‘**/YMVC_TARGET/main.do’
        IMPORTING
          OUT_ABS_URL       = V_TARGET_URL.


      CONCATENATE RUNTIME->APPLICATION_NAME ‘/**/’ INTO W_APP_NAME.


      REPLACE W_APP_NAME IN V_TARGET_URL WITH SPACE.


  1. Set Server side cookie to store the source BSP appl detail


      V_COOKIE = ‘YFL_SOURCE/main.htm’.


      CALL METHOD CL_BSP_SERVER_SIDE_COOKIE=>SET_SERVER_COOKIE
        EXPORTING
          NAME                  = ‘source_bsp’
          APPLICATION_NAME      = ‘NONE’
          APPLICATION_NAMESPACE = ‘NONE’
          USERNAME              = SY-UNAME
          SESSION_ID            = ‘NONE’
          DATA_VALUE            = V_COOKIE
          DATA_NAME             = ‘sbsp’
          EXPIRY_TIME_REL       = 3600.


  1. Get the Employee No.

      CALL METHOD REQUEST->GET_FORM_FIELD
        EXPORTING
          NAME               = ‘pernr’
        RECEIVING
          VALUE              = PERNR .


      NAVIGATION->SET_PARAMETER( NAME = ‘pernr’ VALUE = PERNR ).
      NAVIGATION->GOTO_PAGE( V_TARGET_URL ).
  ENDCASE.
ENDIF.

    1. There is no change required at MVC Target Application side. You can reuse the BSP Application YMVC_TARGET, which we created in Part-I.
    2. You can run BSP Application YFL_SOURCE to test this scenario.

2. Let’s start how to navigate from Flog Logic-BSP Application to Flow Logic-BSP Application…

Highlights: – We’re going to create the following objects:

  1. Modify Flow logic BSP Application (Source)-YFL_SOURCE.
  2. Target Flow Logic BSP Application – YFL_TARGET – Re-use from Part I

Let’s walk through in detail…Modification involved in Source BSP Application:-YFL_SOURCE.

    1. Just modify OnInputProcessing of BSP Applicatio YFL_SOURCE as follows:

SERVER_EVENT.


    WHEN ‘navigate’.
     

  1. Construct the Target URL

      CALL METHOD RUNTIME->CONSTRUCT_BSP_URL
        EXPORTING
          IN_PROTOCOL       = ‘http’
          IN_APPLICATION_NS = RUNTIME->APPLICATION_NAMESPACE
          IN_APPLICATION    = RUNTIME->APPLICATION_NAME
          IN_PAGE           = ‘**/YFL_TARGET/target_Page.htm’
        IMPORTING
          OUT_ABS_URL       = V_TARGET_URL.


      CONCATENATE RUNTIME->APPLICATION_NAME ‘/**/’ INTO W_APP_NAME.


      REPLACE W_APP_NAME IN V_TARGET_URL WITH SPACE.


  1. Set Server side cookie to store the source BSP appl detail


      V_COOKIE = ‘YFL_SOURCE/main.htm’.


      CALL METHOD CL_BSP_SERVER_SIDE_COOKIE=>SET_SERVER_COOKIE
        EXPORTING
          NAME                  = ‘source_bsp’
          APPLICATION_NAME      = ‘NONE’
          APPLICATION_NAMESPACE = ‘NONE’
          USERNAME              = SY-UNAME
          SESSION_ID            = ‘NONE’
          DATA_VALUE            = V_COOKIE
          DATA_NAME             = ‘sbsp’
          EXPIRY_TIME_REL       = 3600.


  1. Get the Employee No.

      CALL METHOD REQUEST->GET_FORM_FIELD
        EXPORTING
          NAME               = ‘pernr’
        RECEIVING
          VALUE              = PERNR .


      NAVIGATION->SET_PARAMETER( NAME = ‘pernr’ VALUE = PERNR ).
      NAVIGATION->GOTO_PAGE( V_TARGET_URL ).
  ENDCASE.
ENDIF.

Now we’re ready to test the Flow Logic-to-Flow Logic approach.

Output 2.

  1. Run the Source BSP Application i.e. YFL_SOURCE & Populate the Employee Number as follows:


image


To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply