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

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
 
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
SoniaTolstoy
 
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
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Recently uploaded (20)

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
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
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
 
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
 
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
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).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
 
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
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
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
 

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