• webdynpro 调用应用程序做跳转


    1、是调用指的是调用生成应用程序,非webdynpro组件程序,

    如下:

    1)调用页面,并传值

    METHOD get_zgmtpage .
      DATA:lw_application_name   TYPE string,
            lw_url                TYPE string,
            lw_pernr_e            TYPE string,
            lw_zkhlx              TYPE string,
            lw_zkhnd              TYPE string,
            lw_zkhyf              TYPE string,
            lw_zbndlx             TYPE string,
            lw_zjdlx              TYPE string,
            lw_zkhzt              TYPE string,
            lo_api_cont           TYPE REF TO if_wd_controller,
            lo_api_com            TYPE REF TO if_wd_component,
            lo_window_mg          TYPE REF TO if_wd_window_manager,
            lo_window             TYPE REF TO if_wd_window.
      DATA lo_nd_node_list TYPE REF TO if_wd_context_node.
      DATA lo_el_node_list TYPE REF TO if_wd_context_element.
      DATA ls_node_list TYPE wd_this->element_node_list.
      lo_nd_node_list = wd_context->get_child_node( name = wd_this->wdctx_node_list ).
      lo_el_node_list = lo_nd_node_list->get_element( ).
      lo_el_node_list->get_static_attributes(
        IMPORTING
          static_attributes = ls_node_list ).
    
    
    *传输数据,跳转页面
      lw_application_name = 'ZPMWD006_E'.
      CALL METHOD cl_wd_utilities=>construct_wd_url
        EXPORTING
          application_name = lw_application_name
        IMPORTING
          out_absolute_url = lw_url.
    
      IF sy-subrc = 0.
    * add para
        lw_pernr_e  = ls_node_list-pernr.
        lw_zkhlx    = ls_node_list-zkhlx.
        lw_zkhnd    = ls_node_list-zkhnd.
        lw_zkhyf    = ls_node_list-zkhyf.
        lw_zbndlx   = ls_node_list-zbndlx.
        lw_zjdlx    = ls_node_list-zjdlx.
        lw_zkhzt    = ls_node_list-zkhzt.
    *被考核员工号
        wd_this->sent_vlaue(
          EXPORTING
            name_str =   'RFX_PERNR_E'                     " string
            l_value =    lw_pernr_e                     " string
          IMPORTING
            l_url =      lw_url                     " string
        ).
    *考核年度
        wd_this->sent_vlaue(
    EXPORTING
      name_str =   'RFX_ZKHND'                     " string
      l_value =    lw_zkhnd                        " string
    IMPORTING
      l_url =      lw_url                          " string
    ).
    *考核类型
        wd_this->sent_vlaue(
    EXPORTING
    name_str =   'RFX_ZKHLX'                     " string
    l_value =    lw_zkhlx                        " string
    IMPORTING
    l_url =      lw_url                          " string
    ).
    
    *考核月份
        wd_this->sent_vlaue(
    EXPORTING
    name_str =   'RFX_ZKHYF'                     " string
    l_value =    lw_zkhyf                        " string
    IMPORTING
    l_url =      lw_url                          " string
    ).
    * 半年度类型
        wd_this->sent_vlaue(
    EXPORTING
    name_str =   'RFX_ZBNDLX'                     " string
    l_value =    lw_zbndlx                        " string
    IMPORTING
    l_url =      lw_url                          " string
    ).
    
    * 季度类型
        wd_this->sent_vlaue(
    EXPORTING
    name_str =   'RFX_ZJDLX'                     " string  lw_ZKHZT
    l_value =    lw_zjdlx                        " string
    IMPORTING
    l_url =      lw_url                          " string
    ).
    
    * 考核状态
        wd_this->sent_vlaue(
    EXPORTING
    name_str =   'RFX_ZKHZT'                     " string
    l_value =    lw_zkhzt                        " string
    IMPORTING
    l_url =      lw_url                          " string
    ).
      ENDIF.
    
      lo_api_cont = wd_this->wd_get_api( ).
      lo_api_com  = lo_api_cont->get_component( ).
      lo_window_mg = lo_api_com->get_window_manager( ).
      lo_window = lo_window_mg->create_external_window( url = lw_url ).
      lo_window->open( ).
    
    
    ENDMETHOD.
    View Code

    2)传值方法:

    method SENT_VLAUE .
        CALL METHOD cl_http_server=>if_http_server~append_field_url
        EXPORTING
          name  = name_str
          value = l_value
        CHANGING
          url   = l_url.
    endmethod.
    *注意:这边的参数都是string类型
    View Code

    3,被调用的页面接受传过来的值如:

      lw_string = wdr_task=>client_window->if_wdr_client_info_object~get_parameter( 'RFX_PERNR_M' ).
      e_pernr = lw_string.
    
    这里的参数'RFX_PERNR_M'要和传送方一直
    View Code
  • 相关阅读:
    python 模拟浏览器
    转:如何评价架构的优劣
    转:DotNET企业架构应用实践架构师成长之路如何成为优秀架构师
    转:大规模网站架构实战之体系结构(一)
    转:Twitter的设计原则
    转:关于大型asp.net应用系统的架构—如何做到高性能高可伸缩性
    转:我眼中的Visual Studio 2010架构工具
    转:解剖Twitter
    转:Discuz!NT前台模型架构(MVC)
    转: "HTTP 错误 401.1 未经授权:访问由于凭据无效被拒绝"的另类解决方案
  • 原文地址:https://www.cnblogs.com/caizjian/p/4489923.html
Copyright © 2020-2023  润新知