需要状态明智查询的试用余额

2020-09-14 00:12发布

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

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


声明@fdate datetime

声明@tdate datetime
-声明@projectcode varchar(150)

设置@ fdate ='20170401'


>设置@ tdate ='20180331'

----- TB帐户

选择T0。[AcctCode] [CODE],T0。[AcctName] [NAME],T0。[级别 ] [GROUP],T0。[FatherNum] [TYPE],T0。[SysTotal] BAL,

(从JDT1的TSELECT中选择ISNULL(SUM(DEBIT-CREDIT),0)。AcctCode= Account和t0 .REFDATE <@fdate and T0。[Project] in(SELECT A. [PrjCode] from OPRJ A,其中A.U_StateCode = [%0]))Ob,

(SELECT ISNULL(SUM(DEBIT-CREDIT ),0)来自JDT1,其中T0.AcctCode = Account和REFDATE> = @ tdate和T0。[Project] in(SELECT A. [PrjCode] from OPRJ A,其中A.U_StateCode = [%0]))Cb,

(SELECT ISNULL(SUM(DEBIT),0)来自JDT1,其中T0.AcctCode =帐户AND REFDATE> = @ fdate AND REFDATE> = @ tdate和T0。[SELECT A. [PrjCode] FROM中的[项目] OPRJ A,其中A.U_StateCode = [%0]))借方,
(从JDT1位置T0.SELECT ISNULL(SUM(CREDIT),0).AcctCode = Account和REFDATE> = @ fdate和REFDATE> = @tdate和T0。[项目] 在(SELECT A. [PrjCode] from OPRJ A,其中A.U_StateCode = [%0])中)CREDIT

FROM OACT T0

大家好

我在上面写了Query,但是没有给出正确的输出,请尝试提供帮助

否则,如果有人患有结核病且报告了Wise报告,请分享..

谢谢

-拉穆杜

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

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


声明@fdate datetime

声明@tdate datetime
-声明@projectcode varchar(150)

设置@ fdate ='20170401'


>设置@ tdate ='20180331'

----- TB帐户

选择T0。[AcctCode] [CODE],T0。[AcctName] [NAME],T0。[级别 ] [GROUP],T0。[FatherNum] [TYPE],T0。[SysTotal] BAL,

(从JDT1的TSELECT中选择ISNULL(SUM(DEBIT-CREDIT),0)。AcctCode= Account和t0 .REFDATE <@fdate and T0。[Project] in(SELECT A. [PrjCode] from OPRJ A,其中A.U_StateCode = [%0]))Ob,

(SELECT ISNULL(SUM(DEBIT-CREDIT ),0)来自JDT1,其中T0.AcctCode = Account和REFDATE> = @ tdate和T0。[Project] in(SELECT A. [PrjCode] from OPRJ A,其中A.U_StateCode = [%0]))Cb,

(SELECT ISNULL(SUM(DEBIT),0)来自JDT1,其中T0.AcctCode =帐户AND REFDATE> = @ fdate AND REFDATE> = @ tdate和T0。[SELECT A. [PrjCode] FROM中的[项目] OPRJ A,其中A.U_StateCode = [%0]))借方,
(从JDT1位置T0.SELECT ISNULL(SUM(CREDIT),0).AcctCode = Account和REFDATE> = @ fdate和REFDATE> = @tdate和T0。[项目] 在(SELECT A. [PrjCode] from OPRJ A,其中A.U_StateCode = [%0])中)CREDIT

FROM OACT T0

大家好

我在上面写了Query,但是没有给出正确的输出,请尝试提供帮助

否则,如果有人患有结核病且报告了Wise报告,请分享..

谢谢

-拉穆杜

付费偷看设置
发送
10条回答
三十六小时_GS
1楼 · 2020-09-14 01:19.采纳回答

你好,

这行吗?

/* ===================参数====================== */
/**从[OPRJ] PR中选择**/
 声明@State为NVARCHAR(50)
/*在哪里*/
 设置@State =/* PR.U_StateCode */'[%0]'


/* =======================查询=======================  ======= */
 ----- TB帐户
 选择T0。[AcctCode] [CODE],T0。[AcctName] [NAME],T0。[Levels] [GROUP],T0。[FatherNum] [TYPE],T0。[SysTotal] BAL,


 (SELECT ISNULL(SUM(DEBIT-CREDIT),0)from JDT1 WHERE T0.AcctCode = Account AND REFDATE <'20170401'and T0。[Project] in(SELECT A. [PrjCode] from OPRJ A,其中A.U_StateCode = @ 州))Ob,


 (SELECT ISNULL(SUM(DEBIT-CREDIT),0)from JDT1 WHERE T0.AcctCode = Account and REFDATE> ='20180331'and T0。[Project] in(SELECT A. [PrjCode] from OPRJ A,其中A.U_StateCode =  @State))Cb,


 (SELECT ISNULL(SUM(DEBIT),0)from JDT1 WHERE T0.AcctCode = Account and REFDATE> ='20170401'and REFDATE> ='20180331'and T0。[Project] in(SELECT A. [PrjCode]中来自OPRJ A 其中A.U_StateCode=@State))DEBIT,


 (SELECT ISNULL(SUM(CREDIT),0)从JDT1的T0.AcctCode = Account和REFDATE> ='20170401'并且REFDATE> ='20180331'和T0。(项目A)(来自OPRJ A的(SELECT A. [PrjCode]) 其中A.U_StateCode=@State))信用


 从OACT T0
 

否则,我假设您没有U_StateCode字段。

小c菟菟
2楼-- · 2020-09-14 01:15

你好专家

请回答以上查询。 它有点高优先级要求...

预先感谢

Umamahesh。

吹牛啤
3楼-- · 2020-09-14 01:04

Uma Maheshwar Pamidi 先生检查一次

# p#

谢尔盖·特拉夫金,请看一下

bbpeas
4楼-- · 2020-09-14 01:07

嗨,

我很好。 你好吗?

尝试一下,

声明@fdate DATETIME声明@tdate DATETIME-声明@projectcode varchar(150)SET @ fdate ='20170401'SET @ tdate ='20180331'/* ============== =====参数===================== *//**从[OPRJ] PR中选择**/声明@State AS NVARCHAR(50)/* WHERE */SET @State =/* PR.U_StateCode */'[%0]'----- TB帐户选择T0。[acctcode] [CODE],T0。[acctname] [NAME],T0。 [级别] [组],T0。[父亲] [类型],T0。[系统总计] BAL,(从Isdull(Sum(debit-credit),0)FROM jdt1到T0.acctcode = account AND refdate <@fdate AND T0。[项目] IN(从oprj一个WHERE A.u_statecode = @State中选择A. [prjcode])Ob,(从jdt1 WHERE T0.acctcode =帐户和引用日期中选择SELECT Isnull(Sum(debit-credit),0) > = @tdate AND T0。[项目] IN(从oprj A中选择A. [prjcode],在A.u_statecode = @State中))Cb,(从jdt1中选择Isnull(Sum(debit),0)T0.acctcode = 帐户AND refdate> = @fdate AND refdate> = @tdate AND T0。[项目]输入(从oprj中选择A. [prjcode],其中A.u_statecode = @State)) 借方,(SELECT Isnull(Sum(credit),0)来自jdt1,其中T0.acctcode =帐户AND refdate> = @fdate AND refdate> = @tdate AND T0。[项目]输入(SELECT A. [prjcode]来自oprj A W. A.u_statecode = @State))来自Oact T0的信用

此致

Nagarajan

一周热门 更多>