How to use UoM in following case...?
We have following requirements so Can you please share with me how the following requirement is supported by Standard SAP.
“Currently we are using Materials with single UOM on the Procurement side, the material is received in single UOM and the issuance is done accordingly. Where as in reality the actual receipt are in different forms.
(For Food Items ordered in KG but are received in Cases, or the UOM of the Vendor usually differs from our UOM)
Below is one example for the same.
Product: Tomato ketchup
Usage 1: 10 ltr drums/ 9.7 ltr drums/ 15 ltr drums
Used in contracts with sizeable dining facilities
Price very low
Usage 2: 12x 250 ml bottles/ 10x 320 ml bottles/ 12x 375 ml squeeze plastic bottles/ 6x 720 ml bottles
Used in contracts where we are allowed to place this sku on tables or on a separate table
Regular price (average 50% more expensive per ltr than the drums)
Usage 3: 1000 x 10 ml sachets/ 1200 x 10 ml sachets/ 2000 x 7 ml sachets
Used in contracts where the SOW specifically requests portion control and sachets to be made available
Price more than double of the drums
"(For Food Items ordered in KG but are received in Cases, or the UOM of the Vendor usually differs from our UOM)"
For handling different UoM from Vendor, you can check Batch Specific unit of measurement.
Batch-Specific Units of Measure - Batch Management (LO-BM) - SAP Library
Check this document too by Naveena Shetty. You will find a lot of discussion too.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a021e088-3428-2d10-799d-a69349248f10?quicklink=index&…
Similar Messages
-
Oracle:how to use max() function in case expression
how to use max() function in case expression, Please explain with any example
Hope this helps and should be self explanatory
with t as
(select 1 col,100 col2 from dual union
select 2 ,100 from dual union
select 2 ,200 from dual union
select 3,100 from dual union
select 3,200 from dual )
select col, case when max(col2)=100 then 'with 100 range'
when max(col2)=200 then 'with 200 range' end from t group by col -
How to use Compare and Swap (CAS) atomic function(Solaris specific) in C
Hi,
I have found cas32() atomic function in (solaris 10) </usr/include/sys/atomic.h> (and also there is another atomic.h header file in </usr/include/atomic.h> but this header file does not have any cas32() function declarations) the declaration of cas32 in <sys/atomic.h>
is as follows
extern uint32_t cas32(uint32_t *target, uint32_t cmp, uint32_t newval);
extern ulong_t caslong(ulong_t *target, ulong_t cmp, ulong_t newval);
extern uint64_t cas64(uint64_t *target, uint64_t cmp, uint64_t newval);
extern void casptr(void target, void cmp, void newval);
extern uint8_t cas8(uint8_t *target, uint8_t cmp, uint8_t newval);
But the problem is when iam using these functions in c programs and compiling
using gcc it is showing the following error.
Undefined first referenced
symbol in file
cas32 /var/tmp//ccQcsnev.o
And if i use the function other than cas32 group of instruction
such as atomic_or_uint()
whose declaration is extern void atomic_or_uint(uint_t *target, uint_t bits);
in <sys/atomic.h> it is giving no error where as for CAS32 it showing as undefined symbol.Why it is giving like that we are not able to know.Is it the case that CAS32 instruction only available in Kernel mode and not available to user mode.Please inform us if anyone knows how to use cas32() instruction in the user C programs.As this is usefull for writing Nonblocking versions of stacks and Queues.Is there any way to write
our own atomic functions?
RamaYou are trying to use the old kernel-only CAS functions, use the correct ones like:
atomic_cas_32.
DS -
How to use logon ticket in case of different user id with SAP R3
Hi.
I try to login from EP to SAP R/3 using Logon Ticket but
My problem is that EP, R/3 user id is different.
Is there any method to login SAP R/3 using Logon
Ticket in case of different user ID ?
Regards, Arnold.Hi Arnold,
SAP Logon Tickets issued by the Portal contain two user ids, basically one for Java Systems and one for ABAP systems. See also note 843061 for details.
You do not need passwords for the reference system, if the user mapping is maintained by the user administrator, and the UM property ume.usermapping
.admin.pwdprotection is set to false, see http://help.sap.com/saphelp_nw04/helpdata/en/fe/d22a41b108f523e10000000a155106/frameset.htm. If you set the mapped user id programmatically, or if you retrieve it from an LDAP server, you also do not need to verify the ABAP password of the user (see https://media.sdn.sap.com/javadocs/NW04/SP12/ume/index.html and http://help.sap.com/saphelp_nw04/helpdata/en/0b/d82c4142aef623e10000000a155106/frameset.htm).
Best regards,
Joerg -
How to use to_date for this case?
Hi,
I bind parameters in java code.
The param type in java is Timestamp and the data type in table is date.
Here is the sql section printted in log:
2004-08-01 10:00:00.0 <= table.datetime
Why there is a ".0" after second?
And how to use to_date to convert "2004-08-01 10:00:00.0"?
Thanks!Hi,
Here are a few possibilities
SQL> select cast(timestamp '2004-08-01 10:00:00.0' as date) from dual;
CAST(TIMESTAMP'2004
2004-08-01 10:00:00
SQL> select to_date('2004-08-01 10:00:00.0','YYYY-MM-DD HH24:MI:SS".0"') from dual;
TO_DATE('2004-08-01
2004-08-01 10:00:00
SQL> select to_date(substr('2004-08-01 10:00:00.0',1,19), 'YYYY-MM-DD HH24:MI:SS') from dual;
TO_DATE(SUBSTR('200
2004-08-01 10:00:00 -
if @CustNo = '0142' begin insert #custnos (CustNo, ClientNo) values ('0142', '1100') ,('0142', '1200') ,('0142', '1201') ,('0142', '1700') ,('0142', '1602') ,('0142', '1202') ,('0142', '1603') ,('0142', '2002') endstore procUSE ODSSupport
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id = object_id(N'dbo.pr_Load_PASOArgusClaims_Work') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
BEGIN
drop procedure dbo.pr_Load_PASOArgusClaims_Work
IF OBJECT_ID ('dbo.pr_Load_PASOArgusClaims_Work') IS NOT NULL
PRINT '<<< FAILED DROPPING PROCEDURE dbo.pr_Load_PASOArgusClaims_Work >>>'
ELSE
PRINT '<<< DROP PROCEDURE dbo.pr_Load_PASOArgusClaims_Work >>>'
END
GO
CREATE PROC dbo.pr_Load_PASOArgusClaims_Work
@BatchNo varchar(7) = null,
@CustNo char(4) = null,
@NewBatchNo varchar(7) = null
AS
/* Object dbo.pr_Load_PASOArgusClaims_Work 2006234 */
-- SSR# : 2242
-- Date : 12/23/2005
-- Author : Roxy Newbill
-- Description : Add new PASO BCAT 1602
-- SSR# 1932 - 2/22/2006 SEN - Add logic to include only ArgusCustNo - 0142
-- and change PharmacyClaim.ProcessDate to DateWritten
-- SSR# : 2419
-- Date : 08/22/2006
-- Author : Betty Doran
-- Description : PASO reports project
-- Correct mapping of Dispense fee amt from 'AmtProfFee' to 'DispenseFee' -
-- Mapping changed by Argus - did not inform PHP. Used in calcs for mClaimTotAmtCharge and
-- mClaimAmtAllowed fields.
-- SSR# : 2496
-- Date : 06/27/2007
-- Author : Roxy Newbil
-- Description : PASO Reporting Project
-- Add data load for new columns: Prescription No, Drug Name, NDC
-- SSR# : PEBB PROJECT
-- Date : 10/13/2009
-- Author : Tj Meyer
-- Description : Add BCAT 1201 for new PEBB business--
-- SSR# : 132707
-- Date : 12/17/2009
-- Author : Terry Phillips
-- Description : PASO Reporting Project
-- Fix data length issues for Argus_SubGroupId,Argus_PlanCode,vchParticipantId,
-- vchProviderId
-- SSR# : 3253
-- Date : 03/28/2011
-- Author : Susan Naanes
-- Description : PrescriptionNo increased in size from 7 to 12 characters
-- SSR# : SPOCK project
-- Date : 08/09/2012
-- Author : Raymond Beckett
-- Description : Modifed to bring in RxKey from PharmacyClaim instead of using identity value for iRecId
-- Also, modified to load any new batches since last batch loaded into PASOArgusClaims
-- if @BatchNo not supplied
-- Various 'fixes'
-- - removed grouping from initial query due to unique grouping caused by BatchNo, ClaimNumber, ClaimType
-- SSR# : TFS 5264 - Premera Remediation -(3997)
-- Date : 12/21/2012
-- Author : Satish Pandey
-- Description : Add BCATs 1202 and 1603 to the Where clause selecting pharmclm.ArgusClientNo as BCAT
-- SSR# : TFS 10286
-- Date : 1/15/2014
-- Author : Raymond Beckett
-- Description : Add HRI Customer Number and BCAT's. Also add Customer Number and alternate batchno to parameters
-- Only use '@NewBatchNo' if adding data from missed custno and the batchno already exists in PASOArgusClaims
-- ITSM Ticket : 1800925
-- Date : 4/15/2014
-- Author : Roxy Newbill
-- Description : Silverton Hospital had new BCAT (2002) with start of 2014 business. This was never accomodated for
-- Adding this BCAT in so that we can start capturing these claims (Note, special insert being done to capture
-- all BCAT 2002 claims prior to this fix.)
-- ITSM Ticket : TFS 14587 -Intel BCAT Remediation
-- Date : 08/14/2014
-- Author : Andrew Omofonma
-- Description : Added BCAT's (1604,& 2103) for Intel
SET NOCOUNT ON
DECLARE @iCount int
create table #tmpArgusWork (
iRecId int,
BatchNo varchar (7) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
BatchDateTime datetime NULL ,
BatchStatus varchar (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
ReadyDateTime datetime NULL ,
Argus_GroupId varchar (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
Argus_SubGroupId varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
Argus_ClassId varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
Argus_PlanCode varchar (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
Argus_BusinessCategory varchar (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
FacetsClaimSubType varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASOClaimType varchar (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
vchClaimNumber varchar (14) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
dtPaidDate datetime NULL ,
dtProcessDate datetime NULL ,
dtServiceDate datetime NULL ,
vchParticipantId varchar (14) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
vchProviderId varchar (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
vchProviderName varchar (55) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
mClaimTotAmtCharge money NULL ,
mClaimAmtDiscount money NULL ,
mClaimAmtAllowed money NULL ,
mClaimAmtDenied money NULL ,
mClaimAmtDeduct money NULL ,
mClaimAmtCoinsurance money NULL ,
mClaimAmtCopay money NULL ,
mClaimAmtPaid money NULL ,
PASO_GroupId varchar (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASO_SubGroupId varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASO_ClassID varchar (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASO_PlanCode varchar (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PASO_BusinessCategory varchar (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
RecordStatus varchar (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
ErrorDesc varchar (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
PrescriptionNo char(12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
DrugName varchar(30)COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
NDC char(11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
create table #batches (
BatchNo char(7) not null
primary key (BatchNo))
create table #custnos (
CustNo char(4),
ClientNo char(5), -- bcats associated with the customer
primary key (CustNo, ClientNo)
DECLARE
@len_Argus_SubGroupId smallint,
@len_Argus_PlanCode smallint,
@len_vchParticipantId smallint,
@len_vchProviderId smallint
--Get field lengths for the following fields
SELECT @len_Argus_SubGroupId = 4, --datalength([@tmpArgusWork].[Argus_SubGroupId]),
@len_Argus_PlanCode = 8, --datalength(@tmpArgusWork.Argus_PlanCode),
@len_vchParticipantId = 14, --datalength(@tmpArgusWork.vchParticipantId),
@len_vchProviderId = 12 --datalength(@tmpArgusWork.vchProviderId)
declare @maxbatch char(7)
IF @BatchNo IS NULL
begin
-- assume normal run. Add ClientNo's and custno's to tables
insert #custnos (CustNo, ClientNo)
values ('0142', '1100')
,('0142', '1200')
,('0142', '1201')
,('0142', '1700')
,('0142', '1602')
,('0142', '1202')
,('0142', '1603')
,('0142', '2002')
,('0142', '1604')
,('0142', '2103')
,('0669', '*')
-- get batches loaded since last batch loaded into PASOArgusClaims
SELECT @maxbatch=Max(BatchNo)
FROM ODSSupport.dbo.PASOArgusClaims
declare @dt datetime
declare @ds datetime
select @dt = MIN(DateTimeStamp)
from ODS.dbo.PharmacyClaim_Common
where BatchNo <= @maxbatch
and DateTimeStamp > DATEADD(dd,-16,getdate())
insert #batches (BatchNo)
select distinct BatchNo
from ODS.dbo.PharmacyClaim_Common pcc
inner join #custnos ct
on ct.CustNo = pcc.ArgusCustNo
and (
ct.ClientNo = '*'
or
ct.ClientNo = pcc.ArgusClientNo
where DateTimeStamp > @dt
; -- batch may have had a claim altered since last load, drop any batches already loaded into PASOArgusClaims
with pba as (
select distinct BatchNo
from ODSSupport.dbo.PASOArgusClaims
delete ba
from #batches ba
inner join pba
on pba.BatchNo = ba.BatchNo
end
else if @NewBatchNo is not null and @CustNo is not null
begin
--make sure we haven't already done this batch number/customer combination
set @maxbatch = @NewBatchNo
SELECT @iCount=count(*)
FROM PASOArgusClaims
WHERE BatchNo=@maxbatch
and Argus_BusinessCategory = @CustNo
IF @iCount > 0
begin
PRINT 'Msg: Batch ' + @maxbatch + ' already exists for CustNo ' + @CustNo + '.'
end
else
begin
if @CustNo = '0142'
begin
insert #custnos (CustNo, ClientNo)
values ('0142', '1100')
,('0142', '1200')
,('0142', '1201')
,('0142', '1700')
,('0142', '1602')
,('0142', '1202')
,('0142', '1603')
,('0142', '2002')
,('0142', '1604')
,('0142', '2103')
end
if @CustNo = '0669'
begin
insert #custnos (CustNo, ClientNo)
values ('0669', '*')
end
insert #batches (BatchNo)
values (@BatchNo)
end
end
else
begin
--make sure we haven't already done this batch number
set @maxbatch = @BatchNo
SELECT @iCount=count(*)
FROM PASOArgusClaims
WHERE BatchNo=@maxbatch
IF @iCount > 0
begin
PRINT 'Msg: Batch ' + @maxbatch + ' already loaded.'
end
else
begin
insert #batches (BatchNo)
values (@maxbatch)
end
end
** Insert Pharmacy Claims to temporary table
INSERT INTO #tmpArgusWork
SELECT
pharmClm.RxKey,
isnull(@NewBatchNo, pharmClm.BatchNo),
pharmclm.OrigDateTimeStamp as BatchDateTime,
'PENDING' as BatchStatus,
NULL as ReadyDateTime,
substring(pharmClm.GrpNumber,1,8)as Argus_GroupID,
left(pharmClm.ArgusSubgroup1,@len_Argus_SubGroupId) as Argus_SubgroupID,
substring(pharmClm.GrpNumber,9,4) as Argus_ClassId,
substring(pharmClm.GrpNumber,13,@len_Argus_PlanCode) as Argus_PlanCode,
pharmClm.ArgusClientNo as Argus_BusinessCategory,
'' as vchFacetsClaimSubtype,
PASOClaimType = CASE WHEN pharmClm.ClaimType='A'
THEN 'PHARMACY-ADJUST'
ELSE 'PHARMACY'
END,
pharmClm.ClaimNo,
pharmClm.DateCutoff as dtPaidDate,
pharmClm.DateWritten as dtProcessDate,
NULL as dtServiceDate,
left(pharmClm.MemberId,@len_vchParticipantId) as vchParticipantId,
left(pharmClm.PharmacyNo,@len_vchProviderId) as vchProviderId,
vchProviderName = CASE WHEN pharmclm.PayMemberInd = 'Y'
THEN 'Member Reimbursement'
ELSE pharm.PharmName
END,
mClaimTotAmtCharge = CASE WHEN pharmclm.PayMemberInd = 'Y' -- When this is a member reimbursement use the amt paid
THEN isnull(pharmClm.IngredientCostPaid,0) + isnull(pharmClm.DispenseFee,0) + isnull(APSFee,0) -- as amt charged.
ELSE isnull(pharmClm.AmtBilled,0)
END,
case when pharmclm.PayMemberInd = 'Y'
then isnull(pharmClm.AmtRejected,0) * -1
else isnull(pharmClm.AmtBilled,0) - isnull(pharmClm.IngredientCostPaid,0) - isnull(pharmClm.DispenseFee,0) - isnull(APSFee,0) -isnull(pharmClm.AmtRejected,0)
end as mClaimAmtDiscount,
isnull(pharmClm.IngredientCostPaid,0) + isnull(pharmClm.DispenseFee,0) + isnull(APSFee,0) as mClaimAmtAllowed,
isnull(pharmClm.AmtRejected,0) as mClaimAmtDenied,
isnull(pharmClm.MemberPaidAmt,0) - isnull(pharmClm.MemberCopayAmt,0) as mClaimAmtDeduct,
0 as mClaimAmtCoinsurance,
isnull(pharmClm.MemberCopayAmt,0) as mClaimAmtCopay,
isnull(pharmClm.AmtPaid,0) + isnull(APSFee,0) as mClaimAmtPaid,
NULL as PASO_GroupID,
NULL as PASO_SubgroupID,
NULL as PASO_ClassID,
NULL as PASO_PlanCode,
NULL as PASO_BusinessCategory,
'OK' as RecordStatus,
NULL as ErrorDesc,
PrescriptionNo = pharmClm.PrescriptionNo,
DrugName = pharmClm.DrugName,
NDC = pharmClm.NDC
FROM ODS..PharmacyClaim as pharmClm
LEFT JOIN ODS..pharmacy as pharm on
pharmClm.PharmacyNo = pharm.PharmacyNo
INNER join #batches ba
on ba.BatchNo = pharmClm.BatchNo
INNER join #custnos ct
on ct.CustNo = pharmClm.ArgusCustNo
and (
ct.ClientNo = '*'
or
ct.ClientNo = pharmClm.ArgusClientNo
WHERE pharmClm.ClaimType in ('P','A') -- Processed or Adjusted
--AND pharmClm.ProcessCode <> 'MC' --code doesn't exist
--GROUP BY
-- pharmClm.BatchNo,
-- substring(pharmClm.GrpNumber,1,8),
-- substring(pharmClm.GrpNumber,9,4) ,
-- substring(pharmClm.GrpNumber,13,@len_Argus_PlanCode),
-- pharmClm.ArgusSubgroup1,
-- pharmClm.ClaimNo,
-- pharmClm.ArgusClientNo,
-- pharmClm.DateCutoff,
-- pharmClm.DateWritten,
-- pharmClm.MemberId,
-- pharmClm.PayMemberInd,
-- pharmClm.PharmacyNo,
-- pharm.PharmName,
-- pharmClm.OrigDateTimeStamp,
-- pharmClm.ClaimType,
-- pharmClm.PrescriptionNo,
-- pharmClm.DrugName,
-- pharmClm.NDC
IF @@RowCount=0
BEGIN
PRINT 'Msg: No records found.'
RETURN
END
--Update the Discount column for these Pharmacy Claims
--UPDATE @tmpArgusWork
--SET mClaimAmtDiscount=mClaimTotAmtCharge-mClaimAmtAllowed-mClaimAmtDenied
** Get the lowest service Date for each claim and update temp table
UPDATE #tmpArgusWork
SET dtServiceDate = (SELECT min(pharmclm.DateSvc)
FROM ODS..pharmacyClaim AS pharmclm
WHERE pharmclm.ClaimNo = tcpr.vchClaimNumber
AND pharmclm.MemberID = tcpr.vchParticipantId)
FROM #tmpArgusWork as tcpr
** Copy over the eligibility fields that Argus provided
UPDATE #tmpArgusWork
SET PASO_GroupId = Argus_GroupID,
PASO_SubGroupId = Argus_SubGroupId,
PASO_ClassID=Argus_classid,
PASO_PlanCode=Argus_PlanCode,
PASO_BusinessCategory=Argus_BusinessCategory
FROM #tmpArgusWork pw
WHERE COALESCE(Argus_GroupID,'') <> ''
OR COALESCE(Argus_SubGroupId,'') <> ''
OR COALESCE(Argus_classid,'') <> ''
OR COALESCE(Argus_PlanCode,'') <> ''
OR COALESCE(Argus_BusinessCategory,'') <> ''
** If Argus did not provide all 5 eligibility fields, get them from faEnrollmentHistory
** based on the group, member, date of service
UPDATE #tmpArgusWork
SET PASO_GroupId = eh.GroupId,
PASO_SubGroupId = eh.SubGroupId,
PASO_ClassID=eh.Class,
PASO_PlanCode=eh.PlanCode,
PASO_BusinessCategory=eh.BusinessCategory
FROM #tmpArgusWork pw
INNER JOIN ODS..FAEnrollmentHistory eh
ON eh.MemberID =pw.vchParticipantID
AND eh.Groupid =pw.Argus_GroupID
AND eh.eligind='Y'
AND eh.ProcessCode<>'ID'
AND pw.dtServiceDate BETWEEN eh.EligEffDate AND eh.EligTermDate
WHERE COALESCE(Argus_GroupID,'') = ''
OR COALESCE(Argus_SubGroupId,'') = ''
OR COALESCE(Argus_classid,'') = ''
OR COALESCE(Argus_PlanCode,'') = ''
OR COALESCE(Argus_BusinessCategory,'') = ''
** If we have eligibility for all records, go ahead and set the ready date to today.
IF NOT EXISTS ( SELECT *
FROM #tmpArgusWork
WHERE COALESCE(PASO_GroupID,'') = ''
OR COALESCE(PASO_SubGroupID,'') = ''
OR COALESCE(PASO_ClassID,'') = ''
OR COALESCE(PASO_PlanCode,'') = ''
OR COALESCE(PASO_BusinessCategory,'') = '')
BEGIN
UPDATE #tmpArgusWork
SET ReadyDateTime=convert(varchar(10),GetDate(),101),
BatchStatus='READY'
END
ELSE
BEGIN
PRINT 'Msg: Exceptions found.'
UPDATE #tmpArgusWork
SET RecordStatus='ERR',
ErrorDesc='No valid Eligible span for this Member/Group/Subgroup at time of Service'
WHERE COALESCE(PASO_GroupID,'') = ''
OR COALESCE(PASO_SubGroupId,'') = ''
OR COALESCE(PASO_ClassID,'') = ''
OR COALESCE(PASO_PlanCode,'') = ''
OR COALESCE(PASO_BusinessCategory,'') = ''
END
** Insert the records into the final table.
INSERT INTO PASOArgusClaims
SELECT * FROM #tmpArgusWork
SET NOCOUNT OFF
END
GO
-- Verify that the stored procedure was created successfully.
IF OBJECT_ID ('dbo.pr_Load_PASOArgusClaims_Work') IS NOT NULL
PRINT '<<< CREATED PROCEDURE dbo.pr_Load_PASOArgusClaims_Work >>>'
ELSE
PRINT '<<< FAILED CREATING PROCEDURE dbo.pr_Load_PASOArgusClaims_Work >>>'
GO
GRANT EXECUTE ON dbo.pr_Load_PASOArgusClaims_Work to role_ODSLoad
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ONthis part of the code below
if@CustNo
= '0142'
begin
insert #custnos(CustNo,
ClientNo)
values ('0142',
'1100')
,('0142',
'1200')
,('0142',
'1201')
,('0142',
'1700')
,('0142',
'1602')
,('0142',
'1202')
,('0142',
'1603')
,('0142',
'2002')
end
store proc
How do I covert it to a common table where the values can be selected from when needed. -
Class.forName, how to use it in the case?
we have a java application:
c:\app\TestForName.class
inside the app, there is a call:
Class.forName("ClassLib");
ClassLib.class is a simplest class for testing with no package.
ClassLib.class can be in any directory except the app's directory
c:\app
because ClassLib.class stands for our library class for multiple projects and multiple uses, it is not allowed to be in a special app directory.
and, ClassLoader and URLClassLoder are not suitable in our case.
i tried following 3 ideas, none of them is OK, please help.
1. put ClassLib.class in directory
c:\lib\
(that is c:\lib\ClassLib.class)
call application with command -cp
java -cp c:\lib;....; TestForName
(method Class.forName("ClassLib") call is inside TestForName.class)
2. put ClassLib.class in
c:\jdk\bin\
(VM says it is one of "java.library.path")
java -cp ....; TestForName
3. put ClassLib.class in
c:\jdk\JAR\classes\
(VM says if is one of "sun.boot.class.path")
java -cp ....; TestForName
i really wondering how to make Class.forName() call successfuf inside application TestForName.class
1. which directory is right place for ClassLib.class
2. how to change command line or java code inside TestForName.class
thx for any help.Why don't u use a class loader. Try this code
// loader class
public class Loader extends ClassLoader {
String path;
public Loader(String path) {
this.path = path;
public Class findClass(String name) {
byte[] b = loadClassData(path+name+".class");
return defineClass(name, b, 0, b.length);
private byte[] loadClassData(String name) {
File file = new File(name);
byte[] data = null;
try {
InputStream in = new FileInputStream(file);
data = new byte[ (int) file.length()];
for (int i = 0; i < data.length; i++) {
data[i] = (byte) in.read();
catch (IOException ex) {
file = null;
return data;
// in your caller class use
Loader loader = new Loader(libPath); // lib path may be taken from a command line arg
Object main = loader.loadClass("ClassLib", true).newInstance();I think this is what u r looking for
Uditha Nagahawatta -
How to use master warranty in case of excess production
Dear Gurrus !!!
My client company is involved in Electronics products (Refrigerator, TV, Oven, AC etc) manufacturing and sale business. There are hundreds of units produced and sold on daily basis. now i have to make warranty check here in CS module. My requirement is:
When we create Service notification type S9 with IW51 we enter Serial number on create screen. Serial number is linked with equipment, batch and material master. Requirement is when we enter serial number system should tell the warranty status in pop up screen. Warranty of Refrigerator and Compressor are different. Ref 1 year Compr. 3 Years. I have done every thing in system but now im facing two problems only.
1 I used user exit BG000001 and check standard tick for pop up too. A pop up screen appears but there is no warranty
detail on that screen but when i check Additional data tab of serial number it shows compressor and ref warranty
accurately.
2 It is not possible for users to enter master warranty and warranty start date in every serial number because there is
hundreds/thousands of units produced daily.
Please give me any idea that how can i take date of sale (601 movement date) as warranty start date and how to enter master warranty in serial numbers automatically. i want to perform these activities automatically.
I am stuck here in warranty check. Please help me in this regard.
Pop up is not a big deal but my major concern is to enter automatically start date and master warranty.
Edited by: moazzamjii on May 6, 2011 2:17 PMHi,
I hope you are creating Equipment automatically while doing delivery for the Material with the combination of Material number & Serial Number.
If that is the case, have you tried with the update of equipment warranty data after creation of equipment?
Try this Function module:
'WARRANTY_ASSIGNMENT_RFC'
[Update warranty details|FM or BAPI to update Master warranty and Begin guarantee;
2nd Option:
In Serial Data view of Equipment Master, you can find the Date of Last Goods Movement, that would be the delivery date of that equipment.
Create a Ztransaction to update the warranty details of the equipment. That could be manual or automatic batch job running on daily basis.
Develop a program to call this Function module & try to update that date as Warranty start date.
Decide on Warranty end date based on your company warranty policy & incorporate the same in coding.
Even you can consider the equipments which are created on that particular day based on the field Creation Date.
So other equipments will not get affected.
Regards,
Maheswaran. -
How to use LIKE in this CASE?
There are multiple values that start with "Aerospace". All of them are going to be set to the same value. I'm trying to write a Case Statement that will replace all of them with the new value, but i can't get the LIKE to work correctly.
This can probably be done with REPLACE, but It's bugging me that I can't get the LIKE to work.
I've tried a few variations, but compiler hasn't like any of them. I'm hoping to have one line of code that will work for all of the possible choices.
What is the best way to use a LIKE or similar thing (such as CONTAINS) to set all of the fields with "Aerospace" at the beginning?
Sorry for the small font above. I didn't see how to change it.
'New Sector Focus' = CASE sectorfocus
WHEN sectorfocus LIKE 'Aerospace%' THEN '201010 - Aerospace & Defense'
ELSE sectorfocus
ENDCASE expression looks good. CASE blog:
http://www.sqlusa.com/bestpractices/training/scripts/casefunction/
>Sorry for the small font above. I didn't see how to change it.
Use the HTML icon to edit the html code.
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
How to use substitution variable in case of dim build
Hi all,
Lets say I have 3 sub vars - Prevmonth, prevmonth-1, prevmonth-2. These will change every quarter.
I want to build a cube which will have which will have only the above 3 months in the Fiscal dimension. This will be used once at the end of quarter.
How do I refer substitution variables in case of dim build rule files? I want automate the process. We have SQL dim build for other dims, only this dim can be built from flat file also.
Or is there any other way to achieve this apart from using sub vars? I can try store the 3 variables in a table and then use them to build the cube, but want to see if we can avoid creating one more interface.
Thanks.Actually using the values of subvars to build a dimension (which I believe is what you want) is a fun problem. Here's an (Oracle) example that would do that, without requiring any additional table or flat file:
SELECT 'FiscalPeriod' AS Parent,
CASE Level
WHEN 1 THEN '&CurrMonth'
WHEN 2 THEN '&PrevMonth'
WHEN 3 THEN '&PrevMonthMinusOne'
END AS Child
FROM Dual
CONNECT BY Level <= 3
Here's how it looks in the load rule SQL dialog, and the data prep editor:
It's fun because I've never thought about it before, but I don't actually recommend this - if you have other ETL going on in SQL I'd generate the values in a table / view there, and have a script that both updates the subvars and builds the dimension direct from that. -
How to use only one event case at a time??
Using LabVIEW, using the event structure is it possible to have only one event case execute at a time. For example, having event case controlled by keyboard, and the other event case controlled by mouse (clicking buttons) and only one being able to execute, not simultaneously. I was considering using a switch of some sort, but each case does not have a "stop if true/false" so I am open to a new method or work around. I attached code. I do not want output to be able to be sent from the keyboard case and mouse case at the same time.
Thanks,
Andrew
Attachments:
WiFi Motor Control & Cam Stripped.vi 29 KBAh, OK. all you need is to keep state in a shift register that ensures that all "key down/mouse down" events are discarded after each key down/mounse down event until a key up or mouse up (resp.) has occured.
Overall, you code is still way to complicated for this simple task. For example, you could eliminate all these "select" primitives and place the approriate diagram constant inside the respective case. On the other hand it is too simplistic, because you would think that certain key combinations should be allowed concurrently (e.g. up and left).
What does the receiver actually do with the codes? Do you have any documentation for this device?
LabVIEW Champion . Do more with less code and in less time . -
How to use Substring function with Case statement.
Hello Everyone,
I have one requirement where I have to use substring function on the field for report criteria.
E.G.
I have Branch Name Field where I have all branch names information, Now some of the branch names are too big with some extension after the name .
now i want to substing it but the character length varies for each branch.
so is there any way where we can use case statement where we can define that if branch name character are exceeding some value then substing it with this length.Try something like this:
CASE WHEN LENGTH(tablename.Branch_Name) > n THEN SUBSTRING(...) ELSE tablename.Branch_Name END
where n is the number of characters you want to start the break. -
How to use recursive in this case?
I have a tree showed in bweb rowser UI like this
+- node1
| |
| +- node_value1a X
| +- node_value1b
| +- node_value1c X
|
+- node2 X
| |
| +- node2a X
| | |
| | +- node_value2a1 X
| | +- node_value2a2 X
| |
| +- node_value2b X
|
+- node3
|
+- node_value3a X
+- node_value3b
At the begining I will retrieve the user permission for each node value and show them as checked "X" , Each node have a biding userObject with property key and check status and other more(we will focus on node key name and check status only). The parent node will be calculated as checked only if all its children are checked. So every time user click one node or node value(node without children). I will re-calculate the all tree nodes status based on all node_value again and update all check box in UI page. This seems need to go from bottum up since I will do:
. Upon the clicking of one node(can be any node) I will send a http request back to server with that node key name. I will then do the following:
if it is uncheck requrest -> updated all its childrens as unchecked -> recalculate all its parent to update their check status to unchecked
if it is check requrest -> updated all its children as checked -> recalculate all its parent to update their check status.(may be check or uncheck depend on other sibling node status).
The porpuse is to update that user's access right.
I get lost when I try coding this feature. Could sonebody here help me out ? ThanksSo how far have you got so far?
-
How to use counter in this case
in my selection screen i have billing doc no-vbeln.
in my ztable i have etimes a field.
when i enter a bill doc no and press f8, my etimes feild in ztable sets to 1.
my requirement is if i enter a bill doc as 97600654 for first time, etimes is 1.
for second time if i enter that same bill doc i.e 97600654 , etimes should be 2 and if third then 3 and so on.
if a new doc is entered then etimes is again 1.
how to code this..plz provide some code.Hi Rudra,
First You need to create a Ztable(say ZTT_VBELN_COUNT) with Three fields MANDT VBELN ETIMES.
Now in your program add code as below;
DATA wa_vbeln_count type line of ZTT_VBELN_COUNT.
SELECT SINGLE * FROM ZTT_VBELN_COUNT INTO CORESSPONDING FIELDS OF wa_vbeln_count where VBELN = lv_vbeln.
IF SY-SUBRC EQ 0.
wa_vbeln_count-etimes = wa_vbeln_count-etimes + 1.
ELSE
wa_vbeln_count-vbeln = lv_vbeln.
wa_vbeln_count-etimes = 1.
ENDIF.
MODIFY ZTT_VBELN_COUNT FROM wa_vbeln_count.
Regards
Karthik D -
How to use rollover function?
Hello there,
I have a big problem with rollover funcion - how to use it in
this case: When I'll roll over mouse pointer over the sprite, this
sprite shall change in another sprite AND mouse pointer shall
change in another mouse pointer. Of course when mouse pointer will
slip off from this sprite everything should be back to begining
(pointer and sprite). How the code should looks like? Or meaby
where I may find some usefull example???
Thanks...
Greetingsproperty spriteNum, pnormalMember, pOverMember
on beginSprite
sprite(spriteNum).cursor = 280
pnormalMember = sprite(spriteNum).member
pOverMember = member("someBitmapMemberName")
end
on mouseEnter
sprite(spriteNum).member = pOverMember
end
on mouseLeave
sprite(spriteNum).member = pNormalMember
end
Maybe you are looking for
-
Rainbow spinning cursor and slow internet recently
I am not very tech savvy but I will try and describe what is going on. Recently (last week or so) my computer has been extremely slow and the rainbow spinning cursor seems to appear all the time. I notice it mainly when I am using the internet, mainl
-
ITunes Won't Authorize for Automatic Downloads & Account Information Viewing
Hi, So I've been having a problem signing into iTunes for the last few days now. First off, I've isolated the problem to my MacBook Pro and verified that Mac OS X/iTunes were both up to date. I've reinstalled iTunes and restarted. I've tried re-athor
-
Using a precondition strict to a specified Class
Dear All: Now I have a class X , the class has two characteristics A and B , A has values a1 and a2 , B has values b1 and b2 . In the configration , when I choose a1 for A then b2 cannot be chosen . To fulfill that I can creat a preco
-
Migrations assistant won't transfer apps
I just finished using migration assistant to transfer everything from my old computer to my new macbook pro 15 over firewire. When it finished none of my apps had transfered. They show up in finder but when you click on the application it says "You c
-
Subcontracting same material same vendor different operations
All SAP Gurus, I'm providing components (in this case these are tools) for subcontracting. Accourding to the condition of tools, subcontractor will perform different opertions (eg. sometimes sharpening of the tools, some times chipping) over these to