‎2007 Mar 09 5:27 AM
The Scenario is as follows.
Serial No. -
>Invoice--
Z646476E51--
Z646476E50
Z646476E50
Z646476E53
Z646476E53
Z646476E53
The arrow marks seperate the columns.
The relationship between the data elements is as follows
Invoice No : Material :: 1: N
Material : Serial Number :: 1 : N
The Serial Number is the Unique random Number.
The user enters the serial Number in a report the system needs to find out the Invoice date to determine warranty.The total No of unique serial Numbers is 2500000. The serial Numbers from, say 2003 till date are as follows
100000000
.
.
200000000
.
A00000000
.
.
.
Z00000000
The response time of the report should be less than 2 seconds.
Could somebody propose a solution for this problem.
‎2007 Mar 09 8:01 AM
Hi!
Serial No. is stored (if your process is set up corect) in VBRP-SERNR. Just create an index with fields MANDT SERNR and your access for this table will be fast - reading the header table VBRK with key VBELN for the invoice date is no problem afterwards.
But it's possible to have more than one invoice in case of returns, be careful.
Regards,
Christian
‎2007 Mar 09 9:44 AM
Hi,
Thanks for the reply. But in our project the requirement is different. The serial Numbers are stored in the header text of the Billing document. One text item can contain upto 50 serial Numbers. We do have a report which generates the serial Numbers for all the invoices in a particuar sales org. The above table example is an extract of the report output. Now our whole CRM ICSS application is centred around the serial Number.
Step 1.User enters the serial Number
Step 2.The systems finds the invoice based on the serial no and the date and check for warranty
Step 3. The next process is triggered
For the first 2 steps we need to search through 2500000 serial Numbers and then determine the invoice and subsequently the date.
Thanks,
Nithin
‎2007 Mar 09 11:08 AM
Hi Nithin!
Sounds like a completely wrong business design (but you are not the only one).
I can't re-design the whole process in some lines... but maybe this is necessary to get a reasonable business running in SAP.
Just a technical remark: if you have one (billing header text) field with multiple serial numbers, then there is absolutely no fast way to find a specific number in a large dataset. It has to be split in separate fields, otherwise SQL is quite useless (like with %xxx% can filter the results, but will never be a specific access to the required entry).
So if there will be explicit fields for SERNR, the it's not a header level -> has to be line level (no combining of lines). And then the standard SERNR field is as good as any other (own) field to store a serial number.
To make this really clear: MULTIPLE SERIAL NUMBERS IN HEADER TEXT CAN NOT WORK.
Regards,
Christian
‎2007 Mar 09 11:26 AM
Hi,
The change is being done but this scenario is for the Serial NUmbers for the past 3 years.
I am a CRM Consultant designing the Internet customer self service portal. In this portal the user will enter the serial Number and get the warranty.
So i need to give the functional spec for a program which will do this task.
From an ABAP point of view advise me on the technical design.
I appreciate your help very much.
Thanks & Regards,
Nithin
‎2007 Mar 09 12:16 PM
Nithin,
I agree with Christian (who should have five times the points he actually has) that the way you are storing your serial numbers makes it impossible to find an invoice based on serial number in a reasonable amount of time.
It sounds like you would need to read all the invoice header texts either one by one (slow) or by large blocks (difficult) and then parse the text lines for the desired number.
And how is the connection to the material number on item level achieved?
So I cannot give you advise for the technical design because I can see no good one.
Cheers
Thomas
‎2007 Mar 09 12:30 PM
Hi,
so some coding (not tested, only as concept):
parameter: p_myser like vbrp-sernr.
data: l_seltext like vbrk-BSTNK_VF,
l_datum type vbrk-fkdat.
concatenate '%' p_myser '%' into l_seltext.
condense l_seltext. "delete space
select max( fkdat ) into l_datum
from vbrk
where BSTNK_VF like l_seltext.But don't wonder, if this select is not finished in 2 minutes. Here you don't have any check for valid numbers - if I enter '2', I would just get any invoice.
I would at least give an option for other selection criteria, like invoice number or date range - might get much faster for customers with original invoice.
Regards,
Christian