Sent: Wednesday, May 08, 2013 11:47 AM

Question:

lv_children = iv_account->get_children( iv_as_copy       = abap_true ). 的参数啥意思
lo_children = iv_account->get_relation( iv_relation_name = <rel>
iv_as_copy = abap_false ).

解释没太看懂
There is one special thing you need to know on the parameter IV_AS_COPY of GET_CHILDREN. It has
only effect on the iterator GET_FIRST etc. of the container list you will receive back. If set to true the
iterator will iterate only on the children inside the container list when it was created. If the parameter is
set to false the iterator will take into account children that are added to the container (or which are deleted
from it) after the container list was get. It is a misunderstanding that you get a copy of the content of the
container if you use this parameter. Knowing this you now have the knowledge going through the
relations of your model getting a separate nested container for every 1:n relation.
?
Rule of thumb:

  1. iv_as_copy = true => you get a snapshot (preffered)
  2. iv_as_copy = false => list gets updated; use only if you want to keep the list; has negative impact on
    performance/memory consumption

Sent: Thursday, May 09, 2013 5:21 PM

其实对于做过debug的developer,看了文档里对这个参数的解释后理解就会更加深刻。但是的确刚刚接触的developer看了解释可能仍然似懂非懂。

这个参数关键起作用的地方就在container object list的构造函数里:

如果你使用iv_as_copy = true得到一个container object list,那么这个container object list A 只是当前parent container object的children的一个snapshot,今后parent container object 如果有新的children加进来之后,新的child不会反映到你得到的snapshot A去,因为technical上讲,你的snapshot并没有注册 parent container object的CHILD_ADDED event,因为不会被通知到。

举一个例子:

我在从Account navigate 到AccountAddress的地方加一段代码,分别存储两种方式得到的account address container object list,这个时候还没有真正取Account address,所以两个container object list里面都只有一个dummy的entry,is_handle = X

我新建一个Address,然后save

因为当前的Account DB里面有50个address,我又在当前session里面添加了1个,所以iv_as_copy = false的有51个item,而snapshot仍然只有1个dummy的。

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

get_children 方法里面参数 iv_as_copy 有什么用?相关推荐

  1. java getIV_Java SAP CRM get_children 方法里面参数 iv_as_copy 有什么用? _好机友

    lv_children = iv_account->get_children( iv_as_copy = abap_true ). 的参数啥意思 lo_children = iv_account ...

  2. SAP CRM get_children 方法里面参数 iv_as_copy 有什么用?

    lv_children = iv_account->get_children( iv_as_copy = abap_true ). 的参数啥意思 lo_children = iv_account ...

  3. python get方法请求参数_python中requests库get方法带参数请求

    起因是想爬五等分的花嫁的漫画.这是其中的一个坑 先上代码 data={'cid':567464,'page':1,'key':'','language':1,'gtk':6,'_cid':567464 ...

  4. C#中方法的参数的四种类型(转)

    转自:http://www.cnblogs.com/netlyf/p/3822956.html C#中方法的参数有四种类型: 1. 值参数类型  (不加任何修饰符,是默认的类型) 2. 引用型参数   ...

  5. C#方法中参数ref和out的解析

    一.C#方法中参数类型 有4种参数类型,有时候很难记住它们的不同特征,下图对它们做一个总结,使之更容易比较和对照. 二.C#方法中的参数 1.值参数 使用值参数,通过复制实参的值到形参的方式把数据传递 ...

  6. C#开发Unity游戏教程之Unity中方法的参数

    C#开发Unity游戏教程之Unity中方法的参数 Unity的方法的参数 出现在脚本中的方法,无论是在定义的时候,还是使用的时候,后面都跟着一对括号"( )",有意义吗?看起来最 ...

  7. Loader的load方法和loadBytes方法LoaderContext参数

    (1)在看代码的时候还发现一个以前没有这么注意的问题,也mark一下. 关于Loader的load方法和loadBytes方法LoaderContext参数的问题.. 要加载某个SWF到自己的安全域内 ...

  8. 传值类型_what?你竟然不知道C#中的方法及参数的类型解析!那还不快来瞅瞅

    前言 哈哈,今天来给大家讲解一下关于C#中方法及参数的几种类型解析,没有看过的朋友,可以仔细的来瞧瞧了! 那么,还是话不多说,直接给大家献上今天的干货. 一.方法中参数的类型 1.in型参数 int ...

  9. AOP开发——在不修改源代码的前提下,对类里面的方法进行增强 : 前置 后置 环绕 异常||如何得到目标方法的参数和返回值

    AOP开发 @Transactionl 在不修改源代码的前提下,对类里面的方法进行增强 前置 后置 环绕 异常 创建项目前引入aop的包 <dependency>     <grou ...

最新文章

  1. 【C语言】一文搞定 “文件操作”
  2. java break在switch_java中switch case语句需要加入break的原因解析
  3. VS.NET2005中的WEBPART初步(一)
  4. javascript解析json格式的字符串,拼接后显示到表格中
  5. Android ViewPager指示器
  6. Python--进程、线程、协程对比
  7. 导航无限级菜单 java,Element NavMenu 无限级菜单
  8. SQLServer Profiler 跟踪器
  9. Golang defer 快速上手
  10. readhat7mysql_Redhat7.3安装MySQL8.0.22的详细教程(二进制安装)
  11. 概率图模型(PGM)学习笔记(一)动机与概述
  12. 《Inside C#》笔记(一) .NET平台
  13. 整数变百分数C语言,整数百分比
  14. 操作STM32单片机蜂鸣器模块演奏歌曲《北京欢迎你》
  15. 关于浏览器显示出现中文乱码问题(已解决)
  16. 高德地图 poi 搜索
  17. 多个containers 共用一个pvc_长兴PVC废料回收一斤多少钱,ps废料回收
  18. 嵌入式操作系统判断题
  19. 电工转电气自动化工程师-后续
  20. 【笔记】软件测试03——Python基础

热门文章

  1. [转]tomcat部署与Context
  2. F#基础教程 列表
  3. 用汇编的眼光看C++(之判断流程)
  4. [导入]基类的复制控制函数
  5. jenkins sonar-scanner 安装测试
  6. 20应用统计考研复试要点(part26)--简答题
  7. latex multicolumn_LaTeX入门(3)
  8. Express app.get 进行路由 Route 设置
  9. jMeter 用户自定义变量的存储方式
  10. 如何获取 SAP Commerce Cloud Spartacus UI 购物车 Cart 的加载状态