Smartform中的長文處理方法
[@more@]1、先建立一個內文欄位2、系統默認新建立的內文欄位的內文類型爲:E 文字元素,需要將牠改變爲:I Include 內文。3、將內文物件、內文 ID、語言等爲要設置的內文固定資料,內文名稱則需輸入由表單界面輸入的變量,並需要在變量前後加入&符號,如&P_NO&。4、要把如果沒有內文則沒有錯誤打上勾,這樣如果沒有內文時系統不會出錯,否則會有出錯提示。5、段落格式可以設置相應的字體等格式。
與採購資訊記錄有關的TABLE
eina, "採購資訊記錄:一般資料eine, "採購資訊記錄:採購組織資料a018, "物料資訊記錄(有工廠:a017)konp. "條件(項目)[@more@]
每日一函數(2008/03/14)
函數:DAY_IN_WEEK說明:根據輸入的日期取得星期[@more@]例子:data: week_nr type p.call function 'DAY_IN_WEEK' exporting datum = sy-datum importing wotnr = week_nr.當week_nr=1時,是星期一......,等7是星期天
每日一函數(2008/03/01)
CONVERT_DATE_TO_EXTERNAL[@more@]函數:CONVERT_DATE_TO_EXTERNAL說明:由內部日期格式轉換爲系統指定顯示的日期格式例子: call function 'CONVERT_DATE_TO_EXTERNAL' exporting date_internal = internal_formal_date importing date_external = erternal_format_date.如果internal_formal_date = 20080302,系統設定日期顯示的格式爲MM.DD.YYYY,則erternal_format_date返回的值爲03.02.2008。一般用於BDC中的日期欄位輸入時要用到。
SAP查询的建立与应用(一)
我觉得SAP中的QuickViewer和查询都非常好用,QuickViewe非常简得,这里就不作详细解说了,下面只要讲解查询的制作及应用,现在先讲如何建立查询。希望对大家有帮忙,如果有不对的地方还请高手们指点指点。[@more@]1、首先使用TCODE: SQ03 建立一个使用者群组,如下图所示输入群组名称ZDEMO后按下建立。在上图中输入群组名称:演示练习。按储存,并按下图保存到本端物料。保存后,建立群组的步骤就已完成。2、建立群组后,进入第二步建立InfoSet,交易代码为:SQ02,如下图所示:在上图输入InfoSet名称ZDEMO_01后,按建立,出现如下图输入
single 與 up to 1 rows的區別
[@more@]选择一条记录:single 、 up to 1 rows 使用single : 在where语句中如果使用了全部的key字段可以使用single 格式: SELECT single Field_Name_List FROM Table_Name WHERE Condition_List 使用up to 1 rows : 在where语句中如果使用了部分或没有使用key字段,则只能使用up to 1 rows 格式 : SELECT Field_Name_List FROM Table_Name up to 1 rows WHERE Condition_List ENDSELECT 例题 : 表kssk,其中MANDT、OBJEK、MAFID、KLART
ABAP/4的优化
[@more@]1.首先是找出有问题的程序:一般查询程序执行时间只要超过100秒(这是观察SAP标准程序的效率值)以上这些程序就是要Tune的可以透过T-CODE:SM50 或 T-CODE:SM37 去找资料,分析在线或是背景执行有哪些ABAP 很慢2.程序效能分析T-CODE:SE30 程序执行时间分析,找出程序慢的部份,执行完程序可以区分三个阶段的执行时间:ABAP、Database、System,这三个部份对效能的优先级为Database -> System -> ABAP要依序排除程序这些部份的问题。一般建议上线前Basis 一定要先审核这个数据是OK才让该ABAP上线,否则一上线会拖垮整个主机效能反
每日一函數(2007/12/12)
函數:TH_USER_LIST說明:取當前系統所有用戶的信息資料[@more@]例子:call function 'TH_USER_LIST' tables list = "Interne Tabelle zur Ablage der Liste* USRLIST = "Interne Tabelle zur Ablage der neuen User Liste .
每日一函數(2007/12/11)
函數:TH_USER_INFO說明:取當前用戶的信息資料[@more@]例子:call function 'TH_USER_INFO'* EXPORTING* CLIENT =* USER =* CHECK_GUI = 0IMPORTING* HOSTADDR = "IP address of the frontend computer* TERMINAL = "Terminal of the user* ACT_SESSIONS = "Momentane Anzahl externer Modi* MAX_SESSIONS = "Max. Anzahl externer Modi* MY_SESSION = "Externer Modus, in dem ich mich befinde* MY_INTERNAL_SESSION =
每日一函數(2007/12/10)
函數: FUNCTION_EXISTS 說明:檢查函數是否存在[@more@]例如: call function 'FUNCTION_EXISTS' exporting funcname = 'CONVERSION_EXIT_MATN2_INPUT' exceptions function_not_exist = 1.
每日一函數(2007/12/09)
函數:MD_STOCK_REQUIREMENTS_LIST_API說明:MRP庫存需求清單函數[@more@]例子:call function 'MD_STOCK_REQUIREMENTS_LIST_API' exporting* plscn = matnr = it_marc-matnr werks = p_werks* berid =* ergbz =* afibz =* inper =* display_list_mdpsx = 'x'* display_list_mdezx = 'x'*
每日一函數(2007/12/08)
函數:CLAF_CLASSIFICATION_OF_OBJECTS說明:根據物料碼查找分類特性值[@more@]例子:call function 'CLAF_CLASSIFICATION_OF_OBJECTS' exporting* CLASS = ' '* CLASSTEXT = 'X' classtype = '001'* CLINT = 0* FEATURES = 'X'* LANGUAGE = SY-LANGU object = objek_matnr "物料碼* OBJECTTABLE = ' '
Basis常用事務代碼
僅供參考:[@more@]1.SM50 Work Process Overview Tools-Administration-Monitoring-System monitoring-Process overview2.SM04 User List Tools-Administration-Monitoring-System monitoring-User overview3.AL08 Users Logged On Tools-Administration-Monitor-Performance-Exceptions/Users-Active users-Users, global3.SM02 System Messages Tools-Administration-Administration-System Messages4.AL11 Display SAP Directories Tools-CCMS-Control Monitoring-Performance Menu-Exceptions/Users-Exceptions-SAP directories5.
根據選擇的物料顯示其特性值
程式代碼:[@more@] report zrp_show_material_chara.include <list>.tables: mara, makt, marc, ausp, kssk, klah, ksml, cabn, cabnt.data: gt_fieldcat type lvc_t_fcat.data: gp_table type ref to data.field-symbols: <gt_table> type table.data: g_title type string.data: begin of wa_fieldlist, atinn like ausp-atinn, "特性碼 atbez like cabnt-atbez, "特性名稱 atfor like cabn-atfor, "資料類型 anzst like cabn-anzst, "字元數 anzdz like cabn-anzdz, "小數位數e
SAP物料主檔新舊物料碼對照
程式代碼:[@more@] report ZRP_NEW_OLD_MATNR. tables: mara, makt, marc.type-pools: slis.data: fieldcat type slis_t_fieldcat_alv, fieldcat_ln like line of fieldcat, event_exit type slis_t_event_exit, event_exit_ln like line of event_exit, sortcat type slis_t_sortinfo_alv, sortcat_ln like line of sortcat, eventcat type slis_t_event, eventcat_ln like line of eventcat.data: gt_list_top_of_page type slis_t_listheader.data: gc_formname_t
在屏幕上多項選擇示例(More on selection screens)
程序代碼:[@more@]*&---------------------------------------------------------------------**& Report ZPROG02*&*&---------------------------------------------------------------------**& Demo 2 - More on selection screens*&*&---------------------------------------------------------------------*REPORT ZPROG02.***********************************Define Tables**********************************TABlES: MARA.***********************************Input Screen***********************
使用concatenate連接時,字串類型(String)要比字符類型(C)快
Character and String Manipulation:Depending on the length of the character field, string operation may be faster. The concatenate algorithm has to compute the length of the fixed character fields by scanning the first non-blank character from the end. [@more@]data string1 type string.data string2 type string.data string3 type string.string1 = 'mysap'.string2 = '.com'.concatenate string1 string2 into string3.以上代碼的速度要比下面的代碼快:data c1(200) type c.data c2(200) type c.data c3(400) typ
C與I類型的比較
Comparing C with C ist faster as comparing C with a great number .[@more@] DATA C(8) TYPE C. IF '12345678' = C. ENDIF.上述代碼比以下代碼速度要快。 DATA C(8) TYPE C. IF 12345678 = C. ENDIF.
STATICS 语句
如果要在过程的运行时间之外仍保留某变量的数值,可以在该过程中利用STATICS语句定义该变量。STATICS语句是DATA语句的变异。语法如下: STATICS <s>[<length>] <type> [<value>] [<decimals>].要在过程中将字段串定义为静态有效,如:[@more@]The subroutine add_1 gets the same result for the variable local for each call as this is instanced again each time. The static variable static is already available and its value increased by 1 during each call. DO 10 TIMES. PERFORM add_one. END
SAP数据库的划分
SAP的数据库分为两部份,即Cross-Client和Client-Specific。Cross-Client包括Repository和其他一些东西,其中,Repository这部分组成数据字典;在Client-specific部分,包括应用程序和客户化的表。由于有了Client-specific部分,才使得各个用户的数据得以区分。[@more@]