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

2020-09-14 00:12发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)声明@fdate datetim...

         点击此处--->   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条回答
bbpeas
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

一周热门 更多>