SlideShare a Scribd company logo
1 of 4
method ONACTIONONUPLOAD .
*     tables : ZUPLOAD.

      DATA   lo_nd_upload TYPE REF TO if_wd_context_node.
      DATA   lo_el_upload TYPE REF TO if_wd_context_element.
      DATA   ls_upload TYPE wd_this->Element_upload.
      data   fs_url type string.
      data   event type ref to cl_wd_custom_event .
.

    DATA lo_nd_n_dowmload TYPE REF TO if_wd_context_node.
       DATA lo_el_n_dowmload TYPE REF TO if_wd_context_element.
       DATA lo_el_n_dowmload1 TYPE REF TO if_wd_context_element.
       DATA ls_n_dowmload TYPE wd_this->Element_n_dowmload.
      DATA lt_n_dowmload TYPE wd_this->Elements_n_dowmload.
       DATA lv_url TYPE wd_this->Element_n_dowmload-url.

      data ls_file_upload type ZUPLOAD.

*  navigate from <CONTEXT> to <N_DOWMLOAD> via lead selection
   lo_nd_n_dowmload = wd_context->get_child_node( name = wd_this-
>wdctx_n_dowmload ).
*   navigate from <CONTEXT> to <UPLOAD> via lead selection
lo_nd_upload = wd_context->get_child_node( name = wd_this-
>wdctx_upload ).

*   get element via lead selection
    lo_el_upload = lo_nd_upload->get_element( ).
*   @TODO handle not set lead selection
    IF lo_el_upload IS INITIAL.
    ENDIF.

*   get all declared attributes

    lo_el_upload->get_static_attributes(
      IMPORTING
        static_attributes = ls_upload ).
fs_url = 'http://in.yahoo.com/?p=us'.

ls_upload-url = fs_url.

ls_upload-file_size = xstrlen( ls_upload-file_contents ).
ls_file_upload-file_name = ls_upload-file_name .
ls_file_upload-file_type = ls_upload-file_type .
ls_file_upload-file_size = ls_upload-file_size .
ls_file_upload-file_contents = ls_upload-file_contents .
ls_file_upload-url = fs_url .

*insert   ZUPLOAD from ls_file_upload .

* if sy-subrc = 0.
  select file_name
         file_type
         file_size
         file_contents
         url
         from zupload
         into CORRESPONDING FIELDS OF     TABLE lt_n_dowmload .




CALL METHOD LO_ND_N_DOWMLOAD->BIND_TABLE
EXPORTING
        NEW_ITEMS             = lt_n_dowmload
*         SET_INITIAL_ELEMENTS = ABAP_TRUE
*         INDEX                =
        .
*   endif .
method ONACTIONON_LINK_ACTION .
       DATA lo_nd_n_dowmload TYPE REF TO if_wd_context_node.
       DATA lo_el_n_dowmload TYPE REF TO if_wd_context_element.
       DATA lo_el_n_dowmload1 TYPE REF TO if_wd_context_element.
       DATA ls_n_dowmload TYPE wd_this->Element_n_dowmload.
        data fs_url TYPE string.
*      navigate from <CONTEXT> to <N_DOWMLOAD> via lead selection
       lo_nd_n_dowmload = wd_context->get_child_node( name = wd_this-
>wdctx_n_dowmload ).

*         get element via lead selection
          lo_el_n_dowmload = lo_nd_n_dowmload->get_element( ).
          IF lo_el_n_dowmload IS INITIAL.
          ENDIF.

*         get all declared attributes
          lo_el_n_dowmload->get_static_attributes(
            IMPORTING
              static_attributes = ls_n_dowmload ).

* data lv_url type string .
* lv_url = 'http://www.google.co.in/'.


    DATA lo_api_main TYPE REF TO if_wd_view_controller.
     lo_api_main = wd_this->wd_get_api( ).


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.lo_api_component   = wd_comp_c
ontroller->wd_get_api(    ).


CALL METHOD LO_ND_N_DOWMLOAD->GET_LEAD_SELECTION
  RECEIVING
    ELEMENT = lo_el_n_dowmload1
    .

CALL METHOD LO_EL_N_DOWMLOAD1->GET_ATTRIBUTE
  EXPORTING
    NAME    = 'URL'
  IMPORTING
    VALUE = fs_url


      .

*lo_window_manager = lo_api_component-
>get_window_manager( ).CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
* EXPORTING
*    URL            = LV_URL
*    MODAL          = ABAP_FALSE
*    HAS_MENUBAR    = ABAP_TRUE
*    IS_RESIZABLE   = ABAP_TRUE
*    HAS_SCROLLBARS = ABAP_TRUE
*    HAS_STATUSBAR = ABAP_TRUE
*    HAS_TOOLBAR    = ABAP_TRUE
*    HAS_LOCATION   = ABAP_TRUE
* RECEIVING
*    WINDOW         = lo_window.lo_window->open( ).

More Related Content

What's hot (17)

Session1+2
Session1+2Session1+2
Session1+2
 
Session6
Session6Session6
Session6
 
Seasion7
Seasion7Seasion7
Seasion7
 
Oracle: Functions
Oracle: FunctionsOracle: Functions
Oracle: Functions
 
Personalization who i can restrict subinventory locator to store one item only
Personalization who i can restrict subinventory locator to store one item onlyPersonalization who i can restrict subinventory locator to store one item only
Personalization who i can restrict subinventory locator to store one item only
 
Formal methods Project Report for the support of slides uploaded
Formal methods Project Report for the support of slides uploaded Formal methods Project Report for the support of slides uploaded
Formal methods Project Report for the support of slides uploaded
 
Introduction to JQ
Introduction to JQIntroduction to JQ
Introduction to JQ
 
jq: JSON - Like a Boss
jq: JSON - Like a Bossjq: JSON - Like a Boss
jq: JSON - Like a Boss
 
Groovy
GroovyGroovy
Groovy
 
Talk about Testing at vienna.rb meetup #2 on Apr 12th, 2013
Talk about Testing at vienna.rb meetup #2 on Apr 12th, 2013Talk about Testing at vienna.rb meetup #2 on Apr 12th, 2013
Talk about Testing at vienna.rb meetup #2 on Apr 12th, 2013
 
Class 6 2ciclo
Class 6 2cicloClass 6 2ciclo
Class 6 2ciclo
 
Catch and throw blocks
Catch and throw blocksCatch and throw blocks
Catch and throw blocks
 
Rethrowing exception- JAVA
Rethrowing exception- JAVARethrowing exception- JAVA
Rethrowing exception- JAVA
 
Examples of sql queries
Examples of sql queriesExamples of sql queries
Examples of sql queries
 
Database object, sub query, Join Commands & Lab Assignment
Database object, sub query, Join Commands & Lab AssignmentDatabase object, sub query, Join Commands & Lab Assignment
Database object, sub query, Join Commands & Lab Assignment
 
My java file
My java fileMy java file
My java file
 
Ranges calendar-novosibirsk-2015-08
Ranges calendar-novosibirsk-2015-08Ranges calendar-novosibirsk-2015-08
Ranges calendar-novosibirsk-2015-08
 

Similar to Doc1

Zend_Form to the Rescue - A Brief Introduction to Zend_Form
Zend_Form to the Rescue - A Brief Introduction to Zend_FormZend_Form to the Rescue - A Brief Introduction to Zend_Form
Zend_Form to the Rescue - A Brief Introduction to Zend_FormJeremy Kendall
 
DrupalJam 2018 - Maintaining a Drupal Module: Keep It Small and Simple
DrupalJam 2018 - Maintaining a Drupal Module: Keep It Small and SimpleDrupalJam 2018 - Maintaining a Drupal Module: Keep It Small and Simple
DrupalJam 2018 - Maintaining a Drupal Module: Keep It Small and SimpleAlexander Varwijk
 
Example syntax alv grid list
Example syntax alv grid listExample syntax alv grid list
Example syntax alv grid listNur Khoiri
 
Magento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request FlowMagento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request FlowVrann Tulika
 
Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)Fabien Potencier
 
Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and BeyondJochen Rau
 
Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014Eric Hogue
 
How I started to love design patterns
How I started to love design patternsHow I started to love design patterns
How I started to love design patternsSamuel ROZE
 
Download information
Download informationDownload information
Download informationOgendra
 
4SCQ7M1 Last session
4SCQ7M1 Last session4SCQ7M1 Last session
4SCQ7M1 Last sessionRiza Nurman
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf Conference
 
Converting Db Schema Into Uml Classes
Converting Db Schema Into Uml ClassesConverting Db Schema Into Uml Classes
Converting Db Schema Into Uml ClassesKaniska Mandal
 
Salesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command lineSalesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command lineCyrille Coeurjoly
 
Getting to The Loop - London Wordpress Meetup July 28th
Getting to The Loop - London Wordpress Meetup  July 28thGetting to The Loop - London Wordpress Meetup  July 28th
Getting to The Loop - London Wordpress Meetup July 28thChris Adams
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony AppsKris Wallsmith
 
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery WidgetsGetting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgetsvelveeta_512
 
Android ListView and Custom ListView
Android ListView and Custom ListView Android ListView and Custom ListView
Android ListView and Custom ListView Sourabh Sahu
 

Similar to Doc1 (20)

Migrare da symfony 1 a Symfony2
 Migrare da symfony 1 a Symfony2  Migrare da symfony 1 a Symfony2
Migrare da symfony 1 a Symfony2
 
Zend_Form to the Rescue - A Brief Introduction to Zend_Form
Zend_Form to the Rescue - A Brief Introduction to Zend_FormZend_Form to the Rescue - A Brief Introduction to Zend_Form
Zend_Form to the Rescue - A Brief Introduction to Zend_Form
 
DrupalJam 2018 - Maintaining a Drupal Module: Keep It Small and Simple
DrupalJam 2018 - Maintaining a Drupal Module: Keep It Small and SimpleDrupalJam 2018 - Maintaining a Drupal Module: Keep It Small and Simple
DrupalJam 2018 - Maintaining a Drupal Module: Keep It Small and Simple
 
Example syntax alv grid list
Example syntax alv grid listExample syntax alv grid list
Example syntax alv grid list
 
Magento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request FlowMagento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request Flow
 
Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)
 
Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and Beyond
 
Apps1
Apps1Apps1
Apps1
 
Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014Getting started with TDD - Confoo 2014
Getting started with TDD - Confoo 2014
 
How I started to love design patterns
How I started to love design patternsHow I started to love design patterns
How I started to love design patterns
 
Download information
Download informationDownload information
Download information
 
4SCQ7M1 Last session
4SCQ7M1 Last session4SCQ7M1 Last session
4SCQ7M1 Last session
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
 
Converting Db Schema Into Uml Classes
Converting Db Schema Into Uml ClassesConverting Db Schema Into Uml Classes
Converting Db Schema Into Uml Classes
 
Salesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command lineSalesforce Admin's guide : the data loader from the command line
Salesforce Admin's guide : the data loader from the command line
 
Getting to The Loop - London Wordpress Meetup July 28th
Getting to The Loop - London Wordpress Meetup  July 28thGetting to The Loop - London Wordpress Meetup  July 28th
Getting to The Loop - London Wordpress Meetup July 28th
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
 
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery WidgetsGetting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgets
 
Android ListView and Custom ListView
Android ListView and Custom ListView Android ListView and Custom ListView
Android ListView and Custom ListView
 
Symfony2 your way
Symfony2   your waySymfony2   your way
Symfony2 your way
 

Recently uploaded

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Recently uploaded (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Doc1

  • 1. method ONACTIONONUPLOAD . * tables : ZUPLOAD. DATA lo_nd_upload TYPE REF TO if_wd_context_node. DATA lo_el_upload TYPE REF TO if_wd_context_element. DATA ls_upload TYPE wd_this->Element_upload. data fs_url type string. data event type ref to cl_wd_custom_event . . DATA lo_nd_n_dowmload TYPE REF TO if_wd_context_node. DATA lo_el_n_dowmload TYPE REF TO if_wd_context_element. DATA lo_el_n_dowmload1 TYPE REF TO if_wd_context_element. DATA ls_n_dowmload TYPE wd_this->Element_n_dowmload. DATA lt_n_dowmload TYPE wd_this->Elements_n_dowmload. DATA lv_url TYPE wd_this->Element_n_dowmload-url. data ls_file_upload type ZUPLOAD. * navigate from <CONTEXT> to <N_DOWMLOAD> via lead selection lo_nd_n_dowmload = wd_context->get_child_node( name = wd_this- >wdctx_n_dowmload ). * navigate from <CONTEXT> to <UPLOAD> via lead selection
  • 2. lo_nd_upload = wd_context->get_child_node( name = wd_this- >wdctx_upload ). * get element via lead selection lo_el_upload = lo_nd_upload->get_element( ). * @TODO handle not set lead selection IF lo_el_upload IS INITIAL. ENDIF. * get all declared attributes lo_el_upload->get_static_attributes( IMPORTING static_attributes = ls_upload ). fs_url = 'http://in.yahoo.com/?p=us'. ls_upload-url = fs_url. ls_upload-file_size = xstrlen( ls_upload-file_contents ). ls_file_upload-file_name = ls_upload-file_name . ls_file_upload-file_type = ls_upload-file_type . ls_file_upload-file_size = ls_upload-file_size . ls_file_upload-file_contents = ls_upload-file_contents . ls_file_upload-url = fs_url . *insert ZUPLOAD from ls_file_upload . * if sy-subrc = 0. select file_name file_type file_size file_contents url from zupload into CORRESPONDING FIELDS OF TABLE lt_n_dowmload . CALL METHOD LO_ND_N_DOWMLOAD->BIND_TABLE EXPORTING NEW_ITEMS = lt_n_dowmload * SET_INITIAL_ELEMENTS = ABAP_TRUE * INDEX = . * endif .
  • 3. method ONACTIONON_LINK_ACTION . DATA lo_nd_n_dowmload TYPE REF TO if_wd_context_node. DATA lo_el_n_dowmload TYPE REF TO if_wd_context_element. DATA lo_el_n_dowmload1 TYPE REF TO if_wd_context_element. DATA ls_n_dowmload TYPE wd_this->Element_n_dowmload. data fs_url TYPE string. * navigate from <CONTEXT> to <N_DOWMLOAD> via lead selection lo_nd_n_dowmload = wd_context->get_child_node( name = wd_this- >wdctx_n_dowmload ). * get element via lead selection lo_el_n_dowmload = lo_nd_n_dowmload->get_element( ). IF lo_el_n_dowmload IS INITIAL. ENDIF. * get all declared attributes lo_el_n_dowmload->get_static_attributes( IMPORTING static_attributes = ls_n_dowmload ). * data lv_url type string . * lv_url = 'http://www.google.co.in/'. DATA lo_api_main TYPE REF TO if_wd_view_controller. lo_api_main = wd_this->wd_get_api( ). 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.lo_api_component = wd_comp_c ontroller->wd_get_api( ). CALL METHOD LO_ND_N_DOWMLOAD->GET_LEAD_SELECTION RECEIVING ELEMENT = lo_el_n_dowmload1 . CALL METHOD LO_EL_N_DOWMLOAD1->GET_ATTRIBUTE EXPORTING NAME = 'URL' IMPORTING VALUE = fs_url . *lo_window_manager = lo_api_component-
  • 4. >get_window_manager( ).CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW * EXPORTING * URL = LV_URL * MODAL = ABAP_FALSE * HAS_MENUBAR = ABAP_TRUE * IS_RESIZABLE = ABAP_TRUE * HAS_SCROLLBARS = ABAP_TRUE * HAS_STATUSBAR = ABAP_TRUE * HAS_TOOLBAR = ABAP_TRUE * HAS_LOCATION = ABAP_TRUE * RECEIVING * WINDOW = lo_window.lo_window->open( ).