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 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
QucHHunhnh
 

Recently uploaded (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.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.
 
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
 
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...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
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
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
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
 
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
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

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