Hi


Still steps are waiting to follow and find the final output comes. We have to write code which contains google map environment to display Google Map. Now i continue with pending steps…


4. Created a Customized Service to Call the Google Map


     To display Google MAP, I have created a customized service in SICF T-Code to execute an URL from SAP ends. Below is screen, where ZGOOGLE_MAP is the service name.

    

     


     The customized service should be in


          SICF–>DEFAULT_HOST–>SAP–>BC–>


     It’s HTTP based service, find the more information below.

    

    


     Create a customized class and pass in Handler List Tab, here I have created ZCL_GOOGLE_MAP class.

    

    


     Inside the class, I have used IF_HTTP_EXTENSION interface and write the code inside the      IF_HTTP_EXTENSION~HANDLE_REQUEST Method.

    

    

    

    


     Find the Method in attachment; inside the method I have call below methods.

    

     a.GET_LOCATION

               IF_HTTP_EXTENSION~HANDLE_REQUEST called, when I pass the link in URL. I have maintained                one ID URL,

         

          http://iprv.com:8000/sap/bc/zgoogle_map?sap-client=000$$000216


          By the server->request->get_header_field( name = ‘~QUERY_STRING’ ). system will return the                     “sap-client=000$$000216 information”

         

          where 000 is the client and 000216 is URL ID.

         

          Read the URL information, and Passing the into the GET_LOCATION method to get the all Information in           IT_LAT_LONG internal table.

         


     b. GET_GEO_KEY

This method I already explained under point 3, to get the GEO Key information based on the User ID.


    

     c. CREATE_JS_LOCATION_FOR_MAKER

               Aah now it’s came, this is the Final Part of the All Process, through this method; I am creating a HTML                page which contains the Java Script and Google map coding to Display the Google Map and Location                Information.


        


          Inside this method I have written the code to display the location and while clicking any of the Marker, a           small pop-up (info Window) will open, which will display the User ID and Location Name.

          And the all Information will return in E_JSCRPT parameter.

     

     d. CREATE_FINAL_HTML

          And this is the Final Method, through this I am creating a HTML page and passing the java script           information in-between.

         

         


         

          And final, passing html information in below code.

     

     server->response->set_cdata( data = lv_html ).


SAP User Tracking System – Part 3


Happy Learning.. 🙂

Praveer.

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