1. sy-repid is the name of the current program.
sy-cprog is the name of the calling program.
sy-cprog is the name of the calling program.
比如在一个Function里面设置断点,sy-repid的这个FM所在FunctionPool的名字,sy-cprog是调用这个FM的Report的程序名。
2. sy-repid 不可以人为更改,sy-cprog可以
本文介绍了ABAP环境中两个重要的系统变量:sy-repid 和 sy-cprog。sy-repid 用于标识当前执行的程序名称,通常对应于Function Module所在的Function Pool名称;而sy-cprog 则记录了调用该Function Module的报告程序名。需要注意的是,sy-repid 不可被人为修改,而 sy-cprog 则可以进行修改。
2067

被折叠的 条评论
为什么被折叠?



