Deleting Rows in ExcelToCI

本文介绍了一种通过修改Excel TOCI宏来实现从PeopleSoft应用程序中删除特定角色的方法。这种方法涉及修改VB宏以发送带有DELETE操作的SOAP消息到Web服务接口,从而触发数据库中的删除操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I recently had a situation where I needed to remove a security role from a large amount of users. While I could have done this with SQL doing a delete something like this.

DELETE FROM PSROLEUSER WHERE ROLENAME = ‘ROLE TO REMOVEAND ROLEUSER = ‘THE_USER’;

This would not trigger the integration broker messages that publish out to all the subscribing databases. So I was going to use the ExcelTOCI to remove the role. I had actually never done a delete before with ExcelToCI and I realized that the delivered ExceltoCI macros are not coded for a row delete. However, the excelTOCI just submits SOAP messages that end up getting parsed by the SOAPtoCI application package which looks for a “CiNodeAction” attribute and it will process a row delete. You can see the code in the SOAPTOCI: SOAPTOCI application class.

You just have to modify the VBA Macros that actually create the SOAP XML that get submitted to the Weblib.

  1. While you are in your ExceltoCI template go to Tools | Macros | Visual Basic Editor
  2. Open the StagingAndSubmission Module
  3. In the WriteCollectionHeader function do the following

You will see a case statement “Select Case lScrollLevel”

Change the “Case 1” statement

 sXmlLine = sIndent & "<" & sXmlTag & ">" 

To

 sXmlLine = sIndent & “<” & sXmlTag & " CINodeAction=""DELETE"">" 

This worked for the USER_PROFILE component interface because the ROLEUSER table shows up at level1. If you need to delete a level 2 or 3 row then you need to basically make the same change on those Case statements.

This was a quick and dirty solution and you would probably want to make sure you did not give this modified macro to anyone because you could do some damage in the database.



http://www.cedarhillsgroup.com/knowledge-base/kbarticles/deleting-rows-in-exceltoci

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值