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

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_Form
Jeremy Kendall
 
Example syntax alv grid list
Example syntax alv grid listExample syntax alv grid list
Example syntax alv grid list
Nur Khoiri
 
Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)Be RESTful (Symfony Camp 2008)
Be RESTful (Symfony Camp 2008)
Fabien Potencier
 
Download information
Download informationDownload information
Download information
Ogendra
 
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 Classes
Kaniska Mandal
 

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

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
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
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
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 

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