首页 > 代码库 > PS 项目创建
PS 项目创建
*----------------------------------------------------------------------*
* 程序名称: ZJISCOPS_REXEC_001
* 程序标题: 自定义创建项目
* 项目名称: 西部重工项目
* 程序类型: Report
* 创建人 : 苏井祥
* 创建日期: 2014/6/2
* 模块 : PS
* 事务码 : ZPSR001
* 请求号 :
* 功能描述: 利用BDC自定义或使用模板创建项目
* 相关文档:
*----------------------------------------------------------------------*
* 修改记录:
* 作者 日期 请求号 修改原因描述
*----------- -------- -----------------------------------------------*
*
*----------------------------------------------------------------------*
REPORT zjiscops_rexec_001.
*----------------------------------------------------------------------*
* INCLUDE *
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
* tables;
*----------------------------------------------------------------------*
TYPE-POOLS vrm.
*&------------------------------------------------------------
*& Global data declarations.
*&------------------------------------------------------------
TYPES: BEGIN OF ty_sdata,
pspid TYPE proj-pspid,"项目编码
profl TYPE proj-profl,"项目参数文件
END OF ty_sdata.
*&------------------------------------------------------------
*& Globlal work area and internal table declarations.
*&------------------------------------------------------------
DATA: gs_sdata TYPE ty_sdata,
gt_sdata TYPE TABLE OF ty_sdata.
DATA: gwa_bdcdata TYPE bdcdata,
gt_bdcdata TYPE TABLE OF bdcdata.
DATA: gwa_messtab TYPE bdcmsgcoll,
gt_messtab TYPE TABLE OF bdcmsgcoll.
DATA: g_message TYPE balmsgtxtp.
DATA: gwa_return TYPE bapiret2,
gt_return TYPE TABLE OF bapiret2.
DATA: g_flag_fdyj TYPE c," FD YJ 项目类型选择标记
g_flag_yf TYPE c." YF
DATA: g_obj TYPE char30. "转换的对象
DATA: g_obj_out TYPE proj-pspid. "外部的项目ID
DATA: g_profidproj TYPE tcj41-profidproj."项目参数文件
*&------------------------------------------------------------
*& ALV data declarations.
*&------------------------------------------------------------
*&------------------------------------------------------------
*& Constant.
*&------------------------------------------------------------
*&------------------------------------------------------------
*& Selection-screen.
*&------------------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-004."年度
PARAMETERS p_year TYPE mkpf-mjahr DEFAULT sy-datum+0(4) OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-002."公司代码
PARAMETERS p_bukrs TYPE ekko-bukrs OBLIGATORY DEFAULT ‘7340‘.
SELECTION-SCREEN COMMENT 30(10) text-003."工厂
PARAMETERS p_werks TYPE marc-werks OBLIGATORY DEFAULT ‘7340‘.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-014."项目描述
PARAMETERS p_post1 TYPE proj-post1 OBLIGATORY .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-008."项目负责人
PARAMETERS p_vernr TYPE proj-vernr OBLIGATORY .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-012. "开始日期
PARAMETERS: p_plfaz TYPE proj-plfaz .
SELECTION-SCREEN COMMENT 30(10) text-013."完成日期
PARAMETERS: p_plsez TYPE proj-plsez .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-005. "项目类
PARAMETERS: zlist TYPE spfli-connid AS LISTBOX VISIBLE LENGTH 10
USER-COMMAND zfl OBLIGATORY.
SELECTION-SCREEN COMMENT 30(10) text-006."项目类明细
PARAMETERS: zlist2 TYPE spfli-connid AS LISTBOX VISIBLE LENGTH 10
OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-007."标准项目定义
PARAMETERS p_pspnr TYPE proj-pspid MATCHCODE OBJECT prss.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-009 ."销售组织
PARAMETERS p_vkorg TYPE proj-vkorg .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-010."分销渠道
PARAMETERS p_vtweg TYPE proj-vtweg .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(10) text-011."产品组
PARAMETERS p_spart TYPE proj-spart .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
*&------------------------------------------------------------
*& Initialization.
*&------------------------------------------------------------
INITIALIZATION.
CLEAR: gt_return,gt_messtab,gt_bdcdata,
gwa_return,gwa_messtab,gwa_bdcdata.
*&------------------------------------------------------------
*& At selection-screen.
*&------------------------------------------------------------
AT SELECTION-SCREEN OUTPUT.
PERFORM frm_selectlist_pbo CHANGING zlist."二级下拉菜单关联
PERFORM frm_modify_screen."研发类型不显示销售区域
*&------------------------------------------------------------
*& Start-of-selection.
*&------------------------------------------------------------
START-OF-SELECTION.
PERFORM frm_check_data."检查销售区域数据
PERFORM frm_process_data.