Application Log - TCODE & ABAP Code
2013-11-11 09:29
148 查看
Definition: SLG0
Display: SLG1
FM for Creating Application Log:
BAL_LOG_CREATE
BAL_LOG_MSG_ADD
BAL_DB_SAVE
Example Code:
Display: SLG1
FM for Creating Application Log:
BAL_LOG_CREATE
BAL_LOG_MSG_ADD
BAL_DB_SAVE
Example Code:
DATA: ls_bal_msg TYPE bal_s_msg, it_msg TYPE bal_t_msg, lv_log_handle TYPE balloghndl, ls_bap_log TYPE bal_s_log. * Fill message to it_msg *................... " Fill message to ls_bal_log * ls_bal_log-object = lv_obj_id. * ls_bal_log-subobject = lv_sub_obj_id. CHECK it_msg IS NOT INITIAL. * Create the BAL Log CALL FUNCTION 'BAL_LOG_CREATE' EXPORTING i_s_log = ls_bap_log IMPORTING e_log_handle = lv_log_handle EXCEPTIONS log_header_inconsistent = 1 OTHERS = 2. * Add the log to the list LOOP AT it_msg INTO ls_bal_msg. CALL FUNCTION 'BAL_LOG_MSG_ADD' EXPORTING i_log_handle = lv_log_handle i_s_msg = ls_bal_msg EXCEPTIONS log_not_found = 1 msg_inconsistent = 2 log_is_full = 3 OTHERS = 4. IF sy-subrc <> 0. RAISE log_error. ENDIF. ENDLOOP. " Commit CALL FUNCTION 'BAL_DB_SAVE' EXPORTING i_save_all = 'X' EXCEPTIONS log_not_found = 1 save_not_allowed = 2 numbering_error = 3 OTHERS = 4.
相关文章推荐
- Prevent ABAP Code from 'Display' or 'Change'
- Prevent ABAP Code from 'Display' or 'Change'
- 关于Code Sign error:The identity 'iPhone distribution' doesn't match any valid certificate private ..
- Code片段 : .properties属性文件操作工具类 & JSON工具类
- lintcode&九章算法——Google 面试题 | 数组的度数 ? 待解决
- lintcode&九章算法——Lintcode No.96. 链表划分 ? 待解决
- 10 Code Coverage Tools for C & C++
- KVC/KVO and Bindings "MVC with less code"
- iOS 8 & X-Code 6更改项目名称 图文教程
- 【POI1999&&codevs3634】积水,关于sunshine爷的NOIP(suan)水(ge)题(pi)赛
- Codeforces Round #383 (Div. 2)C. Arpa's loud Owf and Mehrdad's evil plan(dfs&lcm)
- 用XenoCode 2006 加密dll (.NET混淆 )http://www.chenjiliang.com/Article/View.aspx?ArticleID=237&TypeID=5
- ABAP Code for Adobe Form Preview
- lintcode&九章算法——Lintcode No.31 划分数组 ? 待解决
- "Thinking in Code" Audio Interviews now Available铪
- Codeforces Round #185 (Div. 1) && (Div. 2)
- Web App第三方组件PK--Dashcode&Sencha
- Xcode code sense and cmd+click to symbol doesn't work for 1 of my projects
- SA Concurrent -schedule details & <STATUS_CODE & PHASE_CODE >Columns
- C++ primer(第五版) 练习 7.4 & 7.5 个人 code