交货中的总帐科目控制

2020-09-05 13:04发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)您好, 我需要将控制置于Bp组...

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

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


您好,

我需要将控制置于Bp组允许的总帐帐户列表中。

这是我写的代码。 它有一些错误。 有人可以帮我吗

if((('A','U'))中的@object_type = '15'和@transaction_type

开始

如果存在(从t0上的odln t0内部联接dln1 t1中选择count(1).DocEntry = t1.DocEntry在t0上联接ocrd t​​2.CardCode = t2.CardCode在t3上联接ocrg t3.GroupCode = t2.Groupcode 其中t0.docentry=@list_of_cols_val_tab_del和

(((t3.Groupcode ='102'和t1.AcctCode in('40000002','40001002','40100002','40400002','45500002','46500002','49000002','50000002', '50001002','50100002','50400002','52100002'))

(t3.GroupCode ='100'和t1.AcctCode in('40000001','40100001','40400001','45500001','46500001','46500011','49000001','50000001',' 50100001','50400001','52100001','58600000'))

(t3.groupcode ='111'和t1.AcctCode in('40000006','40000007','40000008','40001006','40400005','40400006','40500007','45500006',' 46500004"," 50000006"," 50000007"," 50000008"," 50001006"," 50400005"," 50400006"," 50700000"," 50800000"," 51500000"," 52000000"," 52100007"))))

(t3.groupcode ='103'和t1.AcctCode in('40000003','40100003','40400003','45500003','46500003','49000003','50000003','50100003',' 50400003'))))

开始

设置@ error = -1

set @error_message ='不是每个BU的总帐帐户'

结束

结束

2条回答
能不能别闹
2020-09-05 13:18 .采纳回答

您好Krishnam,

您的TN代码没有错误! 您可以检查以下内容吗?

如果@object_type = '15'和@transaction_type在('A','U')中
 开始
 如果存在(
 从t0.DocEntry = t1.DocEntry的odln t0内部联接dln1 t1中选择t0.docnum
 在t0.CardCode = t2.CardCode上左移ocrd t​​2
 在t3.GroupCode = t2.Groupcode上左连接ocrg t3
 其中t0.docentry=@list_of_cols_val_tab_del
 和
 (((t3.Groupcode ='102'和t1.AcctCode in('40000002','40001002','40100002','40400002','45500002','46500002','49000002','50000002','50001002'  ,'50100002','50400002','52100002'))
 要么
 (t3.GroupCode ='100'和t1.AcctCode in('40000001','40100001','40400001','45500001','46500001','46500011','49000001','50000001','50100001',  '50400001','52100001','58600000'))
 要么
 (t3.groupcode ='111'和t1.AcctCode in('40000006','40000007','40000008','40001006','40400005','40400006','40500007','45500006','46500004',  '50000006','50000007','50000008','50001006','50400005','50400006','50700000','50800000','51500000','52000000','52100007'))
 要么
 (t3.groupcode ='103'和t1.AcctCode in('40000003','40100003','40400003','45500003','46500003','49000003','50000003','50100003','50400003')  )
 ))
 开始
 设置@ error = -1
 设置@error_message ='不是每个BU的总帐帐户'
 结束
 结束
 

谢谢,

Aziz

一周热门 更多>