二楼提了一下,SAP提供了所谓Screen Sequence Control的框架,可以用来自定义屏幕Tab元素。销售订单录入VA01,02,03支持这个框架。框架的使用方法有点复杂,只能简单介绍几句。

1. 表:T180
定义.T-code: 相关的信息(如Screen group)
一般无须自定义。
2.T-code: VOV8
定义销售订单类型定义中的,
screen sequence group
Default function code for overview screen
这两个值是后面决定tab视图内容的入口键值。
3. 程序SAPMV45A
添加一个subscreen(如9001),用作加载到自定义tab中
3. .T-code: VFBS

1) 定义Function codes:
PROGRAM = SAPMV45B
一般应定义两个Function code,一个用于选择Tab,一个用于加载Tab内的Screen。注意:要选中Screen Group。
2)定义Paths between process locations
PROGRAM = SAPMV45B
此处定义screen sequence group( 定义销售订单类型定义中使用的)所使用的screen group和Tab function code,以及加载Tab相关的信息。
3) 定义Processing locations
PROGRAM = SAPMV45B
此处定义点击该tab时,加载的内容,如overview screen, tab subscreen等等
4)定义Tab Control
PROGRAM = SAPMV45A
定义tab的描述

CONVERSION_EXIT_ALPHA_OUTPUT
功能:
删除输入的数字编号中的前置 0。这个基本上不太用得到。

输入参数:
INPUT:不限制类型,必须输入。原始编号。
输出参数:
OUTPUT:不限制类型。计算出的结果。

测试结果:
如果 INPUT 输入为纯数字(就是只有 0~9 之间的字符),结果删除该数字的前置 0。
如果 INPUT 输入不为纯数字(就是包含 0~9 之外的字符),结果就跟输入值一样。

代码说明:
调用了一个系统函数 CONVERSION_EXIT_ALPHA_OUTPUT,这个函数是 SAP 用 C 语言写的,仅供 SAP 公司内部使用,我们的开发时无法使用。

Try these function module for leading zero.
1. CONVERSION_EXIT_ALPHA_OUTPUT (removing zeros)
2. CONVERSION_EXIT_ALPHA_INPUT (adding zeros)

Recently,because of the need from work,I made some reading on the SAP SYSTEM PROGRAM SAPMV45A and SAP MV50,focusing on the tab page.How to add a tab in the head screen.As what I thinked at first,when the customer click a tab button,the system read some table in the database and then turn to the page.There is no direct reliationship between button and tab in the screen program.Anyway,the some table is T185V.

Wait for countining,keep updateing…

Problem

search…for… ,search the . and , in the word in abap.

Process

In the abap,we often encounter the problem need dealing with text.search…for..only search the word until . or ,, it takes . , as an end of the word.Because of this,sometimes it’s hard for us to search . , in one word.

Solutions

Translate the ., using a very special word and then search it.We can get the result we want.

Problem:
Decimal point format is different denpends on different countrys in the form.

Process.

Recently,I’m dealing with the form and encountered a big problem-the format of the decimal point.In sap,there are two kinds of decmail point format.Ex
1)1,222.53
2)1.222,53
This is depends on the country.When I program on the form of sd module.There are some clients abord.The difference of their country arise the different decimal point format.At first,I try to change the format using abap program.But facts prove it’s not a good solution.It cost a lot of resource and makes the program look more complacted.
The way of the coutry show decimal point is recorded in the table
T005X.We can check it throught se16n.

Solutions:
There is two solutions to this problem.

  1. transfer the data to abap in sap script,check the table T005X,and make some adjusts,but when I try to take this solutions,I encounter mx problem(mx-it’s a country code).In the table T005x ,its decmial fomat is not like the format it passed to the program.
  2. use the scentence,set country ‘xxx’,this will give a lot of help in this problem.It will unify the decimal format in sap script,so the abap can get only on format.Every thing becomes easy.

spring IOC 2

昨天稍微看了下api,今天开始看官方文档spring IOC官方文档
1beanfactory接口和applicationcontext接口有什么不同
答:beanfactory是spring IOC的基础,applicationcontext是beanfactory的子接口,他提供了beanfactory所表现的,而且额外的,更好的与spring aop集成,消息资源处理等一些企业级的功能。
2bean的范围
singleton,prototype,request,session,global session,具体参考文档了。
其中个人认为prototype,刚看第一遍的时候有点难以理解,总和设计模式的那个联系起来。其实就是每次请求都返回不同的实例。
3bean中name和ID属性有什么不一样么?
参考资料
4bean的autowire是指什么?
autowire自动装配的含义,就是指让容器来为声明

<<精通spring>>这本书来了个囫囵吞枣,看了个大概。今天定下心来重新看看IOC部分
首先理清楚该部分的整体结构
package digram

上图直接从eclipse中截屏出来的,spring IOC的包大概就这么多,每个包的详细作用,参见spring overview
根据 精通spring这本书首先从beanfactory这个接口下手,本打算想把实现了beanfactory的接口的类图搞出来,但是查阅了下官方文档,发现内容相当多,关于beanfactory这个接口,api中有如此信息
beanfactory
上图展示了spring IOC的主要接口。
beanfacotry有两个主要的子接口ListableBeanFactory和ConfigurableBeanFactory,阅读spring api明显ListableBeanFactory下的实现多,ConfigurableBeanFactory貌似不是很常用。
ListableBeanFactory接口主要是为有以下需要的类设计的
1 需要枚举其类实例的beanfactory
2 需要提前载入其类实例定义的beanfactory
ConfigurableBeanFactory是为了对类定义进行配置而提供的接口,大部分的beanfactory都需要实现。
其他还有诸如HierarchicalBeanFactory等,需要关注的
ApplicationContext也是需要关注的,在精通spring这本书中ApplicationContext是单独拿出来讲的,貌似比较常用。其有一个与beanfactory的区别就是beanfactory用的是lazyload,就是需要用的时候才进行实例化,而applicationcontext不是如此的。
IOC的话主要有三种方式,spring实现了两种,一种是构造函数参数注入,还有一种是set方法注入.
XmlBeanFactory应该是比较常用的beanfactory的实现。需要关注的。
对于applicationcontext,spring主要提供了三种实现ClassPathXmlApplicationContext,FileSystemXmlApplicationContext,XmlWebApplicationContext,从名字上已经看出这三种有什么不一样的地方咯。精通spring有很多方面讲的不是很详细。详细的内容可以阅读api获得

最近看spring 看hibernate,了解这些框架的特性,hibernate感觉没有学到什么成果,这种框架要真正实际应用了才会感觉到其强大所在,而且hibernate本身的自带的文档相当的全面,不适合学习,应该还是找一本教材效果更好。所以看spring的时候找了一本精通spring看了下,感觉还可以,此书比较多的介绍了spring的部分代码结构,所以为了配合学习,下了spring的代码,用工具把类图导出来,结合着看,感觉还是有所得的,尤其是spring的ioc容器与aop容器,都是很实用的东西,学习这种开源的东西,会用是关键,能够理解设计是最好的。有这个想法把spring每个包的类图都导出来,然后做成一个文档,便于学习源代码。学习spring,hibernate,mysql,这些应该算是应用型的知识,最关键的是要有合理的知识结构去存储这个知识然后加以利用。现在接触的知识面相当 

学习数据库的话,一般会学习到锁这个概念。锁一般分为乐观锁和悲观锁两种。后者比较严厉。
悲观锁是指应用数据库本身的锁来解决数据操作过程中可能出现的不一致性,保证即使是不同的应用也无法在没有获得锁的情况下对数据进行访问或者修改。乐观锁是采用数据版本控制,通过对当前的数据记录版本来探测是否需要对数据进行更新操作或者读取操作。但是乐观锁只局限于本系统,对于其他系统的访问是没有控制权限的,相对于悲观锁,乐观锁开销的资源相对要小,因为它不是从数据库的级别进行锁的控制,只是基础与数据的逻辑控制。关于mysql和hibernate在 

开始看很重要的存储过程,所谓存储过程说白了就是sql函数,给与sql一些简单的逻辑支持。命令行敲太麻烦,于是我把程序写在了txt文件,用批处理的方法运行命令。关于存储过程,无非是对语法和函数熟悉,有几点需要注意的就是
delimiter //->在写存储过程的时候要用这个命令把当前session的命令行结束符号由;改为//这样,因为存储过程当中需要;来区分多个语句。
@x->用户自定义变量,目前做到的只是在session范围内有用的,用户自定义变量相当有用处。
BEGIN…END BEGIN->必须的,包含整个的逻辑控制的标记。
CALL->调用过程
存储过程可以将数据库中的纪录取到用户自定义变量当中。
用create procedure定义存储过程的话,需要先use database,就是说存储过程是属于数据库的,不是属于session的,是否可以指定其生命周期,目前还不知道,需要继续看文档。其他诸如IF ELSE这些语法也可以参考文档。

Next Page »



Follow

Get every new post delivered to your Inbox.