毕业设计代码.docx

上传人:b****6 文档编号:6094591 上传时间:2023-01-03 格式:DOCX 页数:100 大小:63.86KB
下载 相关 举报
毕业设计代码.docx_第1页
第1页 / 共100页
毕业设计代码.docx_第2页
第2页 / 共100页
毕业设计代码.docx_第3页
第3页 / 共100页
毕业设计代码.docx_第4页
第4页 / 共100页
毕业设计代码.docx_第5页
第5页 / 共100页
点击查看更多>>
下载资源
资源描述

毕业设计代码.docx

《毕业设计代码.docx》由会员分享,可在线阅读,更多相关《毕业设计代码.docx(100页珍藏版)》请在冰豆网上搜索。

毕业设计代码.docx

毕业设计代码

*&---------------------------------------------------------------------*

*& Report  ZZPXYLBS_LOGIN

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*

report zzpxylbs_login.

data:

 ok_code type sy-ucomm,

      save_ok type sy-ucomm.

data init.

data container type ref to cl_gui_custom_container.

data picture type ref to cl_gui_picture.

data:

itab type zzyltest occurs 0 with header line .

data:

gt_qjitab type zzyltestqj occurs 0 with header line,

      gt_qjitabl type zzyltestqj.

data:

gt_ccitab type zzyltestcc occurs 0 with header line,

     gt_ccitabl type zzyltestcc .

data:

gt_pxitab type zyltrain occurs 0 with header line,

     gt_pxitabl type zyltrain .

data:

tid(20) type c,

      tpass(20) type c,

      judge type i value 1 .

data:

 mpost(10) type c ,

      mapart(10) type c ,

      nowdate type sy-datum,

      enddate type sy-datum.

data:

 gtline type zzyltestqjl occurs 0 with header line,

      gtlinecc type zzyltestccl occurs 0 with header line,

      gtlinepx type zyltrainl occurs 0 with header line.

start-of-selection.

  call screen 100.

*----------------------------------------------------------------------*

*  MODULE status_0100 OUTPUT

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

module status_0100 output.

  nowdate = sy-datum .

  select * into corresponding fields of table itab from zzyltest.

  select * from zzyltestqj into corresponding fields of table gt_qjitab .

  set pf-status 'GUI'.

  loop at itab where qjing = 'X' or pxing = 'X' or ccing = 'X'.

    if itab-qjing = 'X'.

      select * from zzyltestqj into corresponding fields of table gt_qjitab where u_id = itab-u_id .

      loop at gt_qjitab.

        enddate = gt_qjitab-bdate + gt_qjitab-dayn .

        if nowdate > enddate.

          clear:

 gtline[],gtline.

          move-corresponding gt_qjitab to gtline.

          append gtline.

          insert zzyltestqjl from table  gtline.

          update zzyltest set qjing = '' where u_id = gt_qjitab-u_id .

          delete from  zzyltestqj where u_id = gt_qjitab-u_id .

        endif.

      endloop.

    endif.

    if itab-ccing = 'X'.

      select * from zzyltestcc into corresponding fields of table gt_ccitab where u_id =  itab-u_id  .

      loop at gt_ccitab.

        enddate = gt_ccitab-edate .

        if nowdate > enddate.

          clear:

 gtlinecc[],gtlinecc.

          move-corresponding gt_ccitab to gtlinecc.

          append gtlinecc.

          insert zzyltestccl from table  gtlinecc.

          update zzyltest set ccing = '' where u_id = gt_ccitab-u_id .

          delete from  zzyltestcc where  u_id = gt_ccitab-u_id .

        endif.

      endloop.

    endif.

    if itab-pxing = 'X'.

      select * from zyltrain into corresponding fields of table gt_pxitab where u_id = itab-u_id .

      loop at gt_pxitab.

        enddate = gt_pxitab-bdate.

        if nowdate > enddate.

          clear:

 gtlinepx[],gtlinepx.

          move-corresponding gt_pxitab to gtlinepx.

          append gtlinepx.

          insert zyltrainl from table  gtlinepx.

          update zzyltest set pxing = '' where u_id = gt_pxitab-u_id .

          delete from  zyltrain where u_id = gt_pxitab-u_id .

        endif.

      endloop.

    endif.

  endloop.

  if init is initial.

*图片地址字段定义

    data url(255).

    clear url.

*创建对象

    create object container

      exporting

        container_name = 'CC'.

    create object picture

      exporting

        parent = container

      exceptions

        error  = 1.

    if sy-subrc ne 0.

    endif.

*定义通用函数取得图片地址

    perform load_pic_from_db changing url.

*显示图片

    call method picture->load_picture_from_url

      exporting

        url = url.

    clear url.

    if sy-subrc ne 0.

    endif.

*置标志位已初始

    init = 'X'.

  endif.

endmodule.                    "status_0100 OUTPUT

*----------------------------------------------------------------------*

*  MODULE user_command_0100 INPUT

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

module user_command_0100 input.

  save_ok = ok_code.

  clear ok_code.

  case save_ok.

    when 'M01'.

      call screen 100.

    when 'M02'.

      call screen 101.

    when 'M03'.

      leave program.

    when '&BACK'.

      leave program.

    when '&EXIT'.

      leave program.

    when 'BTSURE'.

      loop at itab.

        if  itab-u_id = tid and itab-passw = tpass.

          judge = 3.

          mpost = itab-post.

          mapart = itab-apart.

          exit.

        endif.

      endloop.

      if judge = 3.

        judge = 1.

        if mapart = 'I'.

          message '登陆成功 !

' type 'S'.

          tpass = '' .

          set parameter id 'apart' field mapart.

          set parameter id 'id' field tid.

          call transaction 'ZYL_MANAGER'.

        elseif 'H' co mpost.

          set parameter id 'apart' field mapart.

          set parameter id 'id' field tid.

          call transaction 'ZZPXYLBS_BOSS'.

          tpass = '' .

          message '登陆成功 !

' type 'S'.

        elseif 'MAX' eq tid.

          call transaction 'ZYL_ZJL'.

          tpass = '' .

          message '登陆成功 !

' type 'S'.

        else.

          set parameter id 'apart' field mapart.

          set parameter id 'id' field tid.

          call transaction 'ZYL_USER'.

          tpass = '' .

          message '登陆成功 !

' type 'S'.

        endif.

      else.

        tpass = '' .

        message '用户名或密码错误!

' type 'E'.

      endif.

    when 'BTCANCEL'.

      leave program.

    when others.

  endcase.

endmodule.                    "user_command_0100 INPUT

*&---------------------------------------------------------------------*

*&      Form  load_pic_from_db

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*      -->P_URL      text

*----------------------------------------------------------------------*

form load_pic_from_db changing p_url.

  data query_table like w3query occurs 1 with header line.

  data html_table like w3html occurs 1.

  data return_code like w3param-ret_code.

  data content_type like w3param-cont_type.

  data content_length like w3param-cont_len.

  data pic_data like w3mime occurs 0.

  data pic_size type i.

  refresh query_table.

*查询对象数据

  query_table-name = '_OBJECT_ID'.

*图片对象名称

  query_table-value = 'YL'.

  "   QUERY_TABLE-VALUE = 'C:

\Users\test.gif'.

  append query_table.

*读取WWWDATA表,取得图片对象信息

  call function 'WWW_GET_MIME_OBJECT'

    tables

      query_string        = query_table

      html                = html_table

      mime                = pic_data

    changing

      return_code         = return_code

      content_type        = content_type

      content_length      = content_length

    exceptions

      object_not_found    = 1

      parameter_not_found = 2

      others              = 3.

  if sy-subrc = 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    pic_size = content_length.

  endif.

*创建图片URL地址

  call function 'DP_CREATE_URL'

    exporting

      type                 = 'IMAGE'

      subtype              = cndp_sap_tab_unknown

      size                 = pic_size

*     DATE                 =

*     TIME                 =

*     DESCRIPTION          =

      lifetime             = cndp_lifetime_transaction

*     CACHEABLE            =

    tables

      data                 = pic_data

*     FIELDS               =

*     PROPERTIES           =

    changing

      url                  = url

    exceptions

      dp_invalid_parameter = 1

      dp_error_put_table   = 2

      dp_error_general     = 3

      others               = 4.

  if sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

  endif.

endform.                    "load_pic_from_db

*----------------------------------------------------------------------*

*  MODULE status_0101 OUTPUT

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

module status_0101 output.

  set pf-status 'GUI'.

endmodule.                    "status_0101 OUTPUT

*----------------------------------------------------------------------*

*  MODULE user_command_0101 INPUT

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

module user_command_0101 input.

  save_ok = ok_code.

  clear ok_code.

  case save_ok.

    when 'M01'.

      call screen 100.

    when 'M02'.

      call screen 101.

    when 'M03'.

      leave program.

    when '&BACK'.

      leave program.

    when '&EXIT'.

      leave program.

  endcase.

endmodule.                    "user_command_0101 INPUT

*&---------------------------------------------------------------------*

*& Report  ZZPXYLBS_LOGIN

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*

report zzpxylbs_login.

data:

 ok_code type sy-ucomm,

      save_ok type sy-ucomm.

data init.

data container type ref to cl_gui_custom_container.

data picture type ref to cl_gui_picture.

data:

itab type zzyltest occurs 0 with header line .

data:

gt_qjitab type zzyltestqj occurs 0 with header line,

      gt_qjitabl type zzyltestqj.

data:

gt_ccitab type zzyltestcc occurs 0 with header line,

     gt_ccitabl type zzyltestcc .

data:

g

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1