点击此处---> 群内免费提供SAP练习系统(在群公告中)
加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)
Buenas amigos
在意向书中的意向书,
从个人到个人的瓜达拉乌干达人的独奏,cuadran algunos vendedores的独奏,他致力于不同的管理,estuve mirando algo sobre el过程 asíno lo logro。
Alguno de ustedes ha logrado cuadrar unsénéecon elanálisisde ventas de sap? 我是puede dar algunas pistas吗?
Estaréeternamente agradecido。
Saludos
SELECT
选择要比拟的功能,必须以适当的方式处理,否则将无法正常使用。
Saludos
SELECT
T1.SlpName AS'Personal de ventas',
-T0.SlpCode AS'SP Code',
COUNT(T0.DocNum)AS' Numero de documentos',
'Nota deCrédito'AS'Tipo documento',
SUM((T0.DocTotal)* -1)AS'Total de los documentos',
SUM((((T0.DocTotal-T0.VatSum)-T0.TotalExpns)* -1)AS'总产品产量,
SUM((T0.GrosProfit)*- 1)AS'Ganancia bruta',
Case
当(SUM((((T0.DocTotal-T0.VatSum)-T0.TotalExpns)* -1))= 0.00 THEN 0.00
ELSE(总和((T0.GrosProfit)* -1)/总和(((T0.DocTotal-T0.VatSum)-T0.TotalExpns)* -1))* 100
END为'Ganancia bruta%',
总和((T0.PaidToDate)* -1)为'Pagado a la fecha',
总和((T0.DocTotal -T0.PaidToDate)* -1)AS'Documentos abiertos'
FROM ORIN T0
INNER JOIN OSLP T1
ON T0.SlpCode = T1.SlpCode
位置
(T1.SlpName喜欢'%%%%'或'%'='')
AND T0.TaxDate> = [%0]
AND T0。 TaxDate <= [%1]
按T0.SlpCode,T1.SlpName
UNION
SELECT
T1.SlpName AS 'Personal de ventas',
--T0.SlpCode AS'SP Code',
COUNT(T0.DocNum)AS'Numero de documentos',
'Factura'AS'Tipo documento',
SUM(T0.DocTotal)AS'Total de los documentos',
SUM((T0.DocTotal-T0.VatSum)- T0.TotalExpns)AS'总产品产量,
总和(T0.GrosProfit)AS'Ganancia bruta',
案例
何时(SUM(( T0.DocTotal-T0.VatSum)-T0.TotalExpns))= 0.00然后0.00
ELSE(总和(T0.GrosProfit)/总和((T0.DocTotal-T0.VatSum)-T0.TotalExpns) )* 100
END AS'Ganancia bruta%',
SUM(T0.PaidToDate)AS'Pagado a la fecha',
SUM(T0。 DocTotal-T0.PaidToDate)AS'Documentos abiertos'
FROM OINV T0
内部联接OSLP T1
ON T0.SlpCode = T1.SlpCode
位置
(T1.SlpName喜欢'%%%%'或'%'='')
AND T0.TaxDate> = [%0] p>
AND T0.TaxDate <= [%1]
通过T0.SlpCode,T1.SlpName
使用[MYBD]
GO
将ANSI_NULLS设置为开
GO
将QUOTED_IDENTIFIER设置为开
GO
创建过程[dbo]。[VENTAS_POR_VENDEDOR]
@VENDEDOR AS NVARCHAR(20),
@FECHAINI日期,
@FECHAFIN日期
AS
设置为NOCOUNT;
SELECT DISTINCT
T1.SlpCode Cod_Empleado,
T1.SlpName Empleado_Ventas,
T0.CardCode Cod_Cliente,
T0.CardName客户端,
(从OINV T2中选择ISNULL(SUM(T2.doctotal-T2.VatSum),0)THERHER T2.CardCode = T0.CardCode AND T2.SlpCode = T0.SlpCode AND T2.DocDate @FECHAINI和@FECHAFIN之间) AS TOTAL_FACTURAS,
(从ORIN T3中选择ISNULL(SUM(TUM.doctotal-T3.VatSum),0),其中T3.CardCode = T0.CardCode AND T3.SlpCode = T0.SlpCode和T3.DocDate在@FECHAINI和@FECHAFIN之间) AS TOTAL_NC
从OINV T0内部联接OSLP T1到T0.SlpCode = T1.SlpCode
(T1.Memo = @VENDEDOR或T1.SlpName = @VENDEDOR)和T0.DocDate在@FECHAINI和@FECHAFIN之间的位置
联盟
SELECT DISTINCT
T1.SlpCode Cod_Empleado,
T1.SlpName Empleado_Ventas,
T0.CardCode Cod_Cliente,
T0.CardName客户端,
(从OINV T2中选择ISNULL(SUM(T2.doctotal-t2.VatSum),0)WHERE T2.CardCode = T0.CardCode AND T2.SlpCode = T0.SlpCode AND T2.DocDate @FECHAINI和@FECHAFIN之间) AS TOTAL_FACTURAS,
(从ORIN T3中选择ISNULL(SUM(TUM.doctotal-t3.VatSum),0),其中T3.CardCode = T0.CardCode AND T3.SlpCode = T0.SlpCode AND T3.DocDate @FECHAINI和@FECHAFIN之间) AS TOTAL_NC
从ORIN T0内连接OSLP T1到T0.SlpCode = T1.SlpCode
(T1.Memo = @VENDEDOR或T1.SlpName = @VENDEDOR)和T0.DocDate在@FECHAINI和@FECHAFIN之间的位置
ORDER BY T1.SlpName
Espero te Sirva Saludos ...
Hola Juan,
SAP洛杉矶信息服务公司因犯罪而被视为破产罪,法院判决书不存在 我们提供了一份关于实物报酬的详细信息,可以帮助您了解更多关于萨普多斯的信息。
Saludos,
WV
gracias wilmer pero con el mismo procedimiento almacenado lo puse en mi miyéyy to do bien pero ahora quisiera saber si hay forma de formireseparámetroen fecha?
声明@FECHAINI varchar(15)
声明@FECHAFIN varchar(15)
SET @FECHAINI = CAST(" 2014/01/01"作为日期时间)
SET @FECHAFIN = CAST(" 2014/01/31"作为日期时间)
执行TmSp_Sales_An_Itm_Sng_M N'INV',N'SNG',N'@ FECHAINI',N'@ FECHAFIN',N'',N'',N'',N'',N'',N'',N'' ,N'',N'',N'',N'',N'001-Proceso Juridico Pereira客户,N'T303-Serviteca',N'',N'',N'0',N' ',0,N'SLP',N'Y',N'Y',N'',N'N'
有意参与的人不愿意,我们不愿意发表意见
一周热门 更多>