Close Sidebar close
Sapignite
  • SAP
  • Coding Challenges
  • Download
  • SAP Ignite Products

Subscribe & Follow

All product names on this web site are trademarks of the companies that own them. Sapignite.com is not affiliated with SAP AG in any way. SAP AG is the registered trademark holder of SAP, SAP R/3, mySAP, ABAP, xApps, NetWeaver, and other proprietary terms. The technical information on this site is verified to the greatest extent possible, however, any information found on this site is used at the site visitor's own risk. Sapignite.com reserves the right to correct any errors or omissions in any portion of this site at any time without obligation.

  • SAP
  • Coding Challenges
  • Download
  • SAP Ignite Products
Sapignite
Sapignite
    SAP Uncategorized Webdynpro for ABAP

    Webdynpro for ABAP integration with google maps !

    August 18, 2017

    Webdynpro ABAP application to locate Employee’s location into google map.Follow the below 10 easy steps to create this application.

    in last you can able to locate your employee on google map.

    Step 1:

    Go to Se80 create a Webdynpro comp name ZTEST_LOCATE_EMP.


    Step 2:

    Create a node into your main windo with name EMP. Dictionary strcuture as PA0006.Click on the button “ADD attriubute from structure” and select the perner from it.


    Step 3:

    Go to layout tab into MAIN view and create an input field with name EMP_ID.


    Step 4:

    Double click on the EMP_ID.

    You can see the value property for it.Bind this to the context attribute you have created.


    Step 5:

    Create a Button with name LOCATE.


    Step 6:

    Double click on it, you can see On action propery. Just click on the create button right side of it.

    Create a ACTION name LOCATE .no need to give any outbound plug name.


    Step 7 :

    When you create an action it automatically a Method name ONACTION<your acion name>.

    Here it is ONACTIONLOCATE


    Step 8.

    Put the below code inside your method :

    data : v_pernr type pa0006-pernr.
    data : v_street type pa0006-STRAS.
    data : v_city type pa0006-ORT01.
    data : lr_node type ref to if_wd_context_node.
    data: lo_window_manager type ref to if_wd_window_manager.
    data: lo_api_component type ref to if_wd_component.
    data: lo_window type ref to if_wd_window.
    data: ld_url type string.

    DATA : FINAL_URL TYPE STRING.

    lr_node = wd_context->get_child_node( ‘EMP’ ).

    lr_node->GET_ATTRIBUTE( exporting NAME = ‘PERNR’
    IMPORTING VALUE = V_PERNR ).

    select SINGLE STRAS ORT01 from pa0006 into (v_street,v_city) where
    PERNR eq v_pernr.

    IF SY-SUBRC EQ 0.

    CONDENSE V_CITY.
    CONDENSE V_STREET.
    CONCATENATE
    ‘http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=’
    V_CITY V_STREET INTO FINAL_URL SEPARATED BY SPACE.

    ENDIF.

    lo_api_component = wd_comp_controller->wd_get_api( ).

    lo_window_manager = lo_api_component->get_window_manager( ).

    *FINAL_URL = ‘www.google.com’.
    ld_url = FINAL_URL.

    CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
    EXPORTING URL = ld_url
    RECEIVING WINDOW = lo_window.

    lo_window->open( ).

    Step 9:

    Create a Webdynpro application


    Step 10:

    Execute the application and give the perner which have the address data updated in PA0006. Take pernr 00000003 if you dont get any.



    create_external_windowgoogle maps integration with sapintegration sap with google mapsopen URL webdynpro for abapsap abap webdynpro tutorialsap google integrationsap wd_context google maps
    raju borda
    Raju is working with Technical areas like SAP ABAP, PI , Web design, JAVA , PBT, robotics as architect also functional areas like SCM , QM, MM , insurance . When he is not Doing above geeky things you might find him travelling , Cooking , dancing or drinking with friends :-) .
    • Tutorial on Implicit Enhancement in SAP ABAP

    • MVC Architecture for Webdynpro for ABAP

    You Might Also Like

    SAP ABAP interview questions and answers

    August 14, 2017

    How to find BADI, Kernel BADIs or USER-EXIT for a particular Transaction code or Program

    August 14, 2017

    Tutorial on interactive adobeforms by webdynpro for ABAP

    August 15, 2017

    No Comments

    Leave a Reply Cancel Reply

Sign up for some exciting content

Recent Posts

  • How to prepare for SAP IBP Certification
  • What is SAP Leonardo ?
  • RoadMap UI Tutorial webdynpro for ABAP
  • Offline Adobe forms in WebDynPro for ABAP
  • MVC Architecture for Webdynpro for ABAP

Categories

  • ABAP
  • Android
  • Coding Challenges
  • Enhancement
  • featured
  • Interviews
  • Learning Hub
  • PI ( Process integration )
  • SAP
  • SAP HANA
  • Uncategorized
  • Webdynpro for ABAP
  • Webdynpro For ABAP