Ap发票保留AP dpt金额和GSt计算缺少GST查询逻辑

2020-09-14 17:44发布

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

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


选择不同的T3。[DocNum] [INV NO],T3。[DocDate],T3。[NumAtCard],T3。[U_VD_TIN] AS'GST NO',

(选择总和(b。 来自OPCH的内线总和PCH1 b在a。[DocEntry] = b。[DocEntry]上,其中a。[DocDate]> ='20170701'和a。[DocDate] <= [%1]和a。[DocNum] = T3。[DocNum])作为'AP INV TOTAL',
T0。[DocNum] AS'DT NO',T0。[DocDate] AS'DT DATE',T2。[DrawnSum] AS'DT Recov in Bill",T3。[Project],T1。[TaxCode] as'DT TAX CODE',


--T1。[VatSum] AS'DT TAX AMOUNT'

>(在T1时为案​​例。[TaxCode] IN('GST 18','RCGST 18','IGST 18','RCIGST18')THEN(((((select sum(a。[DrawnSum])FROM PCH9 a a。[DocEntry] = b。[DocEntry]上的内部联接选项b.docentry = c.docentry上的内部联接pch1 c其中b。[DocDate]> ='20170701'和b。[DocDate] <='[% 1]'和a.BaseAbs = T0.Docentry和c。[TargetType]!='19'和c。[VisOrder] = 0)))*。18)

当T1。[TaxCode] IN ('(GST 28','RCGST 28','IGST 28','RCIGST28')THEN((((((从PCH9 a选择内部连接OPCH的a。[DocEntry] = b。 [DocEntry]旅馆 er在b.docentry = c.docentry上加入pch1 c,其中b。[DocDate]> ='20170701'和b。[DocDate] <='[%1]'和a.BaseAbs = T0.Docentry和c。[TargetType ]!='19'并且c。[VisOrder] = 0)))*。28)

当T1。[TaxCode] IN('GST 12','RCGST 12','IGST 12', 'RCIGST12')THEN(((((从PCH9 a选择内部联接OPCH从a。[DocEntry] = b。[DocEntry]内部联接pch1在b.docentry = c.docentry上选择select((a。[DrawnSum])) b。[DocDate]> ='20170701'和b。[DocDate] <='[%1]'和a.BaseAbs = T0.Docentry和c。[TargetType]!='19'和c。[VisOrder] = 0)))*。12)

当T1。[TaxCode] IN('GST 5','RCGST 5','IGST 5','RCIGST 5')THEN((((select sum( a。[DrawnSum])来自PCH9 a内部联接选项b on a。[DocEntry] = b。[DocEntry]内部联接pch1 c on b.docentry = c.docentry其中b。[DocDate]> ='20170701'和b 。[DocDate] <='[%1]'和a.BaseAbs = T0.Docentry和c。[TargetType]!='19'和c。[VisOrder] = 0)))*。05)
< br>何时T1。[税码] IN('GST 0','RCGST 0','IGST 0','RCIGST 0','零0','NONGST 0')然后((((选择sum(a。 [DrawnSum])F ROM PCH9 a a。[DocEntry] = b。[DocEntry]上的内部联接选项b.docentry = c.docentry上的内部联接pch1 c其中b。[DocDate]> ='20170701'和b。[DocDate] <= '[%1]'和a.BaseAbs = T0.Docentry和c。[TargetType]!='19'和c。[VisOrder] = 0)))*。00))


< br> END)" DT Recov。 TAX AMT"免费试用-从ODPO T0内连接DPO1 T1到T0。[DocEntry] = T1。[DocEntry]左外连接PCH9 T2 ON T0。[DocEntry] = T2 。[BaseAbs]左外部JOIN OPCH T3在T2上。[DocEntry] = T3。[DocEntry]左外部JOIN PCH1 T4在T3上。[DocEntry] = T4。[DocEntry]在T3。[DocDate]> ='20170701'和 T3。[DocDate] <='[%1]'和T1。[VisOrder] = 0且T1。[TargetType]!='19'

大家好

请告诉我我错过逻辑的地方..

注意:一些细节是正确的,很少有文件给出这样的错误信息

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

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


选择不同的T3。[DocNum] [INV NO],T3。[DocDate],T3。[NumAtCard],T3。[U_VD_TIN] AS'GST NO',

(选择总和(b。 来自OPCH的内线总和PCH1 b在a。[DocEntry] = b。[DocEntry]上,其中a。[DocDate]> ='20170701'和a。[DocDate] <= [%1]和a。[DocNum] = T3。[DocNum])作为'AP INV TOTAL',
T0。[DocNum] AS'DT NO',T0。[DocDate] AS'DT DATE',T2。[DrawnSum] AS'DT Recov in Bill",T3。[Project],T1。[TaxCode] as'DT TAX CODE',


--T1。[VatSum] AS'DT TAX AMOUNT'

>(在T1时为案​​例。[TaxCode] IN('GST 18','RCGST 18','IGST 18','RCIGST18')THEN(((((select sum(a。[DrawnSum])FROM PCH9 a a。[DocEntry] = b。[DocEntry]上的内部联接选项b.docentry = c.docentry上的内部联接pch1 c其中b。[DocDate]> ='20170701'和b。[DocDate] <='[% 1]'和a.BaseAbs = T0.Docentry和c。[TargetType]!='19'和c。[VisOrder] = 0)))*。18)

当T1。[TaxCode] IN ('(GST 28','RCGST 28','IGST 28','RCIGST28')THEN((((((从PCH9 a选择内部连接OPCH的a。[DocEntry] = b。 [DocEntry]旅馆 er在b.docentry = c.docentry上加入pch1 c,其中b。[DocDate]> ='20170701'和b。[DocDate] <='[%1]'和a.BaseAbs = T0.Docentry和c。[TargetType ]!='19'并且c。[VisOrder] = 0)))*。28)

当T1。[TaxCode] IN('GST 12','RCGST 12','IGST 12', 'RCIGST12')THEN(((((从PCH9 a选择内部联接OPCH从a。[DocEntry] = b。[DocEntry]内部联接pch1在b.docentry = c.docentry上选择select((a。[DrawnSum])) b。[DocDate]> ='20170701'和b。[DocDate] <='[%1]'和a.BaseAbs = T0.Docentry和c。[TargetType]!='19'和c。[VisOrder] = 0)))*。12)

当T1。[TaxCode] IN('GST 5','RCGST 5','IGST 5','RCIGST 5')THEN((((select sum( a。[DrawnSum])来自PCH9 a内部联接选项b on a。[DocEntry] = b。[DocEntry]内部联接pch1 c on b.docentry = c.docentry其中b。[DocDate]> ='20170701'和b 。[DocDate] <='[%1]'和a.BaseAbs = T0.Docentry和c。[TargetType]!='19'和c。[VisOrder] = 0)))*。05)
< br>何时T1。[税码] IN('GST 0','RCGST 0','IGST 0','RCIGST 0','零0','NONGST 0')然后((((选择sum(a。 [DrawnSum])F ROM PCH9 a a。[DocEntry] = b。[DocEntry]上的内部联接选项b.docentry = c.docentry上的内部联接pch1 c其中b。[DocDate]> ='20170701'和b。[DocDate] <= '[%1]'和a.BaseAbs = T0.Docentry和c。[TargetType]!='19'和c。[VisOrder] = 0)))*。00))


< br> END)" DT Recov。 TAX AMT"免费试用-从ODPO T0内连接DPO1 T1到T0。[DocEntry] = T1。[DocEntry]左外连接PCH9 T2 ON T0。[DocEntry] = T2 。[BaseAbs]左外部JOIN OPCH T3在T2上。[DocEntry] = T3。[DocEntry]左外部JOIN PCH1 T4在T3上。[DocEntry] = T4。[DocEntry]在T3。[DocDate]> ='20170701'和 T3。[DocDate] <='[%1]'和T1。[VisOrder] = 0且T1。[TargetType]!='19'

大家好

请告诉我我错过逻辑的地方..

注意:一些细节是正确的,很少有文件给出这样的错误信息

付费偷看设置
发送
3条回答
Nan4612
1楼-- · 2020-09-14 18:17

步骤2)参考(2)

梦想连接
2楼-- · 2020-09-14 18:13

步骤3)参考( 3)

昵称总是被占用
3楼-- · 2020-09-14 18:09

Step4)

下面的图片也显示了另外一个条件失败

一周热门 更多>