Archive for 2010.05

Add Icon to Selection-Screen

This is a very simple case, and no much words on this, just to say that in SAP, a lot of function could be finished in a simple and dramatical way. 1. Create a simple report like below: 2. Goto selection-text 2.1 Open ICON table with ALV grid display 2.2 Copy the ID volumn with Ctrl+C 2.3 Open selection-text window, paste 3. Run the report the say result: ...

查找类和方法的简单方法

image_thumb.png
一般我们去找一个类或者方法都是直接进入SE24, 然后通过模糊查询找到类,然后查看类中的各种方法, 这样的做法要求你要非常明确你要找的目标. 下面我列出一个小方法, 能够加快搜索类和方法的小的tips: 首先打开view: VSEOMETHOD 输入相应的选择条件,比如我们要查询CL_GUI_ALV_GRID的方法描述: 查看结果: 怎么样,是不是看起来更方便一些…. ...

SAP ABAP MP3 Player with ActiveX control–顺便解密老白

image_thumb.png
本文根据Thomas Jung的一篇文章加以修改, 最终实现, 并且添加了一些中文的注释, 使这种技术更加容易被大家理解和使用. 效果如图: 程序实现: 1. 创建一个proxy class, 继承自CL_GUI_CONTROL 2. 在constructor方法中初始化调用WMP 的activeX控件 3. 调用该控件的open以及play方法播放文件 4. 在alv中显示播放清单 5. 在播放结束后自动切换到下一首需要实现事件endofstream 具体实现, 恩….等评论留言过5条放出. ————————————–华丽的分割线—&#...

Set selection-screen text when the program first run

Sometime we create a new program with selection-screen, and all the selection fields texted with text-element. And after we download the program and then upload to another place with Copy/Paste, the selection fields’ text lost, and in this article will tell you how to init you selection fields’ text in a normal report. Code as below: *&---------------------------------------------------------------------* *& Report ZBOB_INIT_SL_TXT *& *&--------------...

生成SAP Demo用到的数据

在SAP中有很多已经做好的demo程序教我们怎么样去使用某种程序设计方法,或者业务对象,但是这些demo往往都是基于FLIGHT数据表,其中包括SPFLI,SBOOK等等表,如果系统不是IDES系统,你会发现这些demo的数据都是不存在的, 那么如何手动生成这些表的内容呢? 在查了sap online help之后, 有一个程序可以自动生成这些表数据. SAPBC_DATA_GENERATOR: 生成主要测试数据 SAPBC_DATA_GENERATOR_ALE: ALE相关测试数据 SFLIGHT_DATA_GEN: STICKET以及SNVOICE等表数...

TimeStamp 对对碰

关于Timestamp, 在SAP系统中有很多的可以使用的转换函数, 但是并不是每种的timestamp格式都相同, 今天有空就玩一个timestamp对对碰的游戏. 在自建的程序中把这些对对转换的函数一一比较. 程序代码如下: *&---------------------------------------------------------------------* *& Report ZBOBO_TIMESTAMP_TESTING *& *&---------------------------------------------------------------------* *& Desc: Timestamp 对对碰 *& *&----------------------...

ALV Report with CL_SALV_TABLE Utilities

How to make ALV report much more easily? As we know there are about 3 ways to implement ALV report, that is REUSE_ALV, ALV_GRID classs, and SALV, in this section, I will show you on how to use SALV with a common include that makes ALV Report as simple as possible. First, I list some classes that combine with SALV_TABLE to fit most of your requirements. 1.1   CL_SALV_DISPLAY_SETTINGS  — Setting display options 1.2   CL_SALV...

XI事务代码一览

在网上闲逛, 突然看到了这个列表, 于是记录下来,以备以后使用. 说起XI, 在一年前的项目上曾经研究过, 大概的架构还算是清楚, 只是一直也没有自己的环境可以使用, 所有研究仅限于理论. 看来要加强实践. Sr.No Transaction Code Meaning 1. SXMB_IFR Start Integration Builder 2. SPPROXY ABAP Proxy Generation MONITORING 3. SXMB_MONI Integration Engine Monitoring 4. SXI_MONITOR Monitor for Processed XML Message 5. SXMB_MONI_BPE BPE/B...

MM01-Create Material Master with BAPI call

This is a demo program part, that make you simply create material master data in SAP system. This is just contain the BAPI call part and value assign to the parameters used by this BAPI. BAPI:BAPI_MATERIAL_SAVEDATA Code part: BAPIMATHEAD-material = itab-MATERIAL. "物料号码 bapimathead-IND_SECTOR = itab-IND_SECTOR. "Industry Sector BAPIMATHEAD-MATL_TYPE = itab-MATL_TYPE. "物料类型 BA...

IQ01/IQ02 Create/Change Material Serial Number BAPI

In recent days in the project, there’re some requirement on creating&changing Material Serial number, and I’ve got the BAPI in BAPI explorer, now share some useful code in my blog so that someone who need to do such programming could easily handle. For IQ01 the corresponding BAPI is: BAPI_EQUI_CREATE lwa_equi-material = lwa_serialnumber-materialnumber. lwa_equi-serialno = lwa_serialnumber-childsernr. lwa_equi-equicatgry = 'S'. &nb...

DESADV outbound增强

在项目中有一个CR要求对DESADV进行扩展, 增强, 于是详细记录了真个过程. 先说一下技术需求. 首先, 对Idoc 基本类型ORDERS05进行extension, 然后根据业务需要,添加两个segment, 一个header, 一个detail, detail挂在header下面. 具体取数据逻辑我并没有写出, 只是从技术层面详细的写出了整个extension实施的过程,包括segment建立, idoc type扩展, user-exit使用等. 具体请查看下面的文档:   对DESADV进行扩展 (176.6 KiB, 626 hits) ...

User-exit 查询清单

前几天在Wiki看到了这篇SAP user-exit, 觉得是个比较完备的清单, 当然在系统中查询有很多中方法, 也有程序去查询. 不过我个人喜欢有文档的清单, 看起来方便. 好了,废话不多说, 直接把附件给出,方便各位朋友下载.   SAP 增强列表 (106.4 KiB, 2,421 hits) ...