HCI Groovy XmlSlurper在同一日期未找到job_information记录

2020-09-13 17:08发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


我需要在job_information中找到具有事件Hire的记录。

 def消息processData(消息){

//从消息中获取正文
 def主体= message.getBody(java.lang.String)
//解析正文
 def queryCompoundEmployeeResponse = new XmlSlurper()。parseText(body)

 queryCompoundEmployeeResponse.CompoundEmployee.each {
   it.person.employment_information.each {
     def startDate = it.job_information.find {
       j->(j.event.text()=='H')
     } .start_date.text()
   }
 }
 

但是,对于该员工,同一日期有2条记录。 并且find函数什么也不返回。

有人知道如何解决此问题吗?

(90.2 kB)

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


我需要在job_information中找到具有事件Hire的记录。

 def消息processData(消息){

//从消息中获取正文
 def主体= message.getBody(java.lang.String)
//解析正文
 def queryCompoundEmployeeResponse = new XmlSlurper()。parseText(body)

 queryCompoundEmployeeResponse.CompoundEmployee.each {
   it.person.employment_information.each {
     def startDate = it.job_information.find {
       j->(j.event.text()=='H')
     } .start_date.text()
   }
 }
 

但是,对于该员工,同一日期有2条记录。 并且find函数什么也不返回。

有人知道如何解决此问题吗?

(90.2 kB)
付费偷看设置
发送
1条回答
吹牛啤
1楼-- · 2020-09-13 18:08

尝试对此模型进行建模,看看您将获得什么输出-

capture23.jpg

一周热门 更多>

点击此处---> EasySAP.com 一起学习S4 HANA ...

相关问答