Search For Standard or Customise Smartform

简介:
*&---------------------------------------------------------------------*
*&  Report       : ZTEST_SEARCH_FORMNAME
*
*&  Created by   : SHYAM BABU SAH.
*&  date         : 17.01 2007.
*
*&---------------------------------------------------------------------*
*&  This program will help you to search the SMARTFORM either Standard
*   Or Customer created in your compatiable language.
*                                                                      *
*&---------------------------------------------------------------------*
REPORT  ZTEST_SEARCH_FORMNAME  .
TYPE-POOLS: SLIS.
  TABLES: STXFADM, STXFADMT.
  DATA:  BEGIN OF ITAB OCCURS 0,
       FORMNAME     LIKE STXFADM-FORMNAME,
       MASTERLANG   LIKE STXFADM-MASTERLANG,
       DEVCLASS     LIKE STXFADM-DEVCLASS,
       VERSION      LIKE STXFADM-VERSION,
       FIRSTUSER    LIKE STXFADM-FIRSTUSER,
       FIRSTDATE    LIKE STXFADM-FIRSTDATE,
       FIRSTTIME    LIKE STXFADM-FIRSTTIME,
       LASTUSER     LIKE STXFADM-LASTUSER,
       LASTDATE     LIKE STXFADM-LASTDATE,
       FORMTYPE     LIKE STXFADM-FORMTYPE,
       CAPTION      LIKE STXFADMT-CAPTION,
       END OF ITAB.
  DATA: IT_FIELDCAT TYPE  SLIS_T_FIELDCAT_ALV,
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
          WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_DEV  FOR STXFADM-DEVCLASS NO INTERVALS.
SELECT-OPTIONS: S_FORM FOR STXFADM-FORMNAME NO INTERVALS.
SELECTION-SCREEN SKIP 1.
PARAMETERS: P_LANG LIKE T002-SPRAS DEFAULT 'EN'.
SELECTION-SCREEN END OF BLOCK B1.
PERFORM F_SELECT_DATA.
PERFORM F_LAYOUT.
PERFORM F_FIELDCAT.
PERFORM DISPLAY.
*&---------------------------------------------------------------------*
*&      Form  f_select_data
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM F_SELECT_DATA .
  SELECT
         A~FORMNAME
         A~MASTERLANG
         A~DEVCLASS
         A~VERSION
         A~FIRSTUSER
         A~FIRSTDATE
         A~FIRSTTIME
         A~LASTUSER
         A~LASTDATE
         A~FORMTYPE
         B~CAPTION
         FROM STXFADM AS A INNER JOIN  STXFADMT AS B ON
         A~FORMNAME = B~FORMNAME INTO  TABLE ITAB  WHERE
         A~DEVCLASS IN S_DEV AND
         A~FORMNAME IN S_FORM AND
         B~LANGU = P_LANG.
    IF SY-SUBRC  = 0.
    SORT ITAB BY FORMNAME.
  ELSE.
    MESSAGE I398(00) WITH 'No Form Exits for this selection criteria'.
    LEAVE LIST-PROCESSING.
  ENDIF.
ENDFORM.                    " f_select_data
*&---------------------------------------------------------------------*
*&      Form  display
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM DISPLAY .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM = SYST-CPROG
      IS_LAYOUT          = WA_LAYOUT
      IT_FIELDCAT        = IT_FIELDCAT
    TABLES
      T_OUTTAB           = ITAB.
  IF SY-SUBRC <> 0.
  ENDIF.
ENDFORM.                    " display
*&---------------------------------------------------------------------*
*&      Form  f_fieldcat
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM F_FIELDCAT .
  DATA: WA_COL TYPE I VALUE 1.
  WA_FIELDCAT-COL_POS   =  WA_COL + 1.
  WA_FIELDCAT-SELTEXT_L =  TEXT-003.  " Form Name
  WA_FIELDCAT-FIELDNAME =  'FORMNAME'.
  WA_FIELDCAT-TABNAME   =  'ITAB'.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-COL_POS   =  WA_COL + 1.
  WA_FIELDCAT-SELTEXT_L =  TEXT-004.  " Smart form Text
  WA_FIELDCAT-FIELDNAME =  'CAPTION'.
  WA_FIELDCAT-TABNAME   =  'ITAB'.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-COL_POS   =  WA_COL + 1.
  WA_FIELDCAT-SELTEXT_L =  TEXT-005.  "Package
  WA_FIELDCAT-FIELDNAME =  'DEVCLASS'.
  WA_FIELDCAT-TABNAME   =  'ITAB'.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-COL_POS   =  WA_COL + 1.
  WA_FIELDCAT-SELTEXT_L =  TEXT-006.  "First User
  WA_FIELDCAT-FIELDNAME =  'FIRSTUSER'.
  WA_FIELDCAT-TABNAME   =  'ITAB'.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-COL_POS   =  WA_COL + 1.
  WA_FIELDCAT-SELTEXT_L =  TEXT-007.  "First Date
  WA_FIELDCAT-FIELDNAME =  'FIRSTDATE'.
  WA_FIELDCAT-TABNAME   =  'ITAB'.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-COL_POS   =  WA_COL + 1.
  WA_FIELDCAT-SELTEXT_L =  TEXT-008.  "Version
  WA_FIELDCAT-FIELDNAME =  'VERSION'.
  WA_FIELDCAT-TABNAME   =  'ITAB'.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-COL_POS   =  WA_COL + 1.
  WA_FIELDCAT-SELTEXT_L =  TEXT-009.  "Master Language
  WA_FIELDCAT-FIELDNAME =  'MASTERLANG'.
  WA_FIELDCAT-TABNAME   =  'ITAB'.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  WA_FIELDCAT-COL_POS   =  WA_COL + 1.
  WA_FIELDCAT-SELTEXT_L =  TEXT-010.  "Last User
  WA_FIELDCAT-FIELDNAME =  'LASTUSER'.
  WA_FIELDCAT-TABNAME   =  'ITAB'.
  APPEND WA_FIELDCAT TO IT_FIELDCAT.
  CLEAR WA_FIELDCAT.
  ENDFORM.                    " f_fieldcat
*&---------------------------------------------------------------------*
*&      Form  f_layout
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM F_LAYOUT .
    WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
ENDFORM.                    " f_layout
专注于企业信息化,最近对股票数据分析较为感兴趣,可免费分享股票个股主力资金实时变化趋势分析工具,股票交流QQ群:457394862

本文转自沧海-重庆博客园博客,原文链接:http://www.cnblogs.com/omygod/archive/2008/01/27/1055284.html,如需转载请自行联系原作者
目录
相关文章
“Could not find suitable distribution for Requirement.parse(‘XXXX‘)”的问题
“Could not find suitable distribution for Requirement.parse(‘XXXX‘)”的问题
363 0
|
7月前
|
算法 索引
Binary Search
Binary Search “【5月更文挑战第21天】”
50 5
|
7月前
Google Earth Engine(GEE)——ImageCollection.fromImages, argument ‘images‘: Invalid type. Expected type
Google Earth Engine(GEE)——ImageCollection.fromImages, argument ‘images‘: Invalid type. Expected type
54 0
|
7月前
C. Binary Search
C. Binary Search
In Search of an Easy Problem
In Search of an Easy Problem
91 0
In Search of an Easy Problem
|
前端开发
Google Earth Engine——Layer error: Description length exceeds maximum.解决办法
Google Earth Engine——Layer error: Description length exceeds maximum.解决办法
664 0
Google Earth Engine——Layer error: Description length exceeds maximum.解决办法
|
机器学习/深度学习 测试技术 Python
PAT (Basic Level) Practice (中文)第1002题
PAT (Basic Level) Practice (中文)第1002题
117 0
|
算法
On the Correct and Complete Enumeration of the Core Search Space
在之前的文章中我们讨论了基于graph的DP-based算法,来解决join ordering的枚举问题。 这些DP算法通过join predicate描述的连通性,解决了枚举可能的表组合问题,但join graph本身(即使hypergraph)是无法完整的描述join语义的,因为连通边本身无法描述不同类型的join语义,例如left outer join/semi join/anti join...,因此即使找到了所谓的csg-cmp-pair,也不一定是有效的plan。 这篇paper讨论的就是这个问题,当枚举出一个csg-cmp-pair (S1 o S2),如何判断这是有效的join
448 0
On the Correct and Complete Enumeration of the Core Search Space
PAT (Advanced Level) Practice - 1043 Is It a Binary Search Tree(25 分)
PAT (Advanced Level) Practice - 1043 Is It a Binary Search Tree(25 分)
125 0
Cannot find source code based button in SE24
When you are logging on to customer system for incident handling, you want to switch to source code to perform some keyword search. However, you could not find button “Source code based builder” in toolbar, with following warning message: ———————————————— 版权声明:本文为CSDN博主「汪子熙」的原创文章,遵循CC 4.0 BY-SA版权协
Cannot find source code based button in SE24