Generating complaint number automatically
Hi,
What i need to do is:If a customer want to make a complaint registration to a bank through phone,a complaint number should be generated automatically for that particular customer in the database. please assist me to do this
Thanks
A database sequence can be useful for this (depending on the species of database you're using). That ensures uniqueness accross clusters of web servers.
Similar Messages
-
Dear All,
I want to auto generate inovice number. I did not want to handle this from sequences because I still did not understand/handle this, so kindly suggest an other best way to generate invoce number automatically through programitcally. I have three tables, one master table and two detail tables.
Thanks and regards,
Hassanchristian erlinger wrote:
what's the trouble with using sequences?!?
http://docs.oracle.com/cd/B28359_01/server.111/b28318/schema.htm#CNCPT611
http://docs.oracle.com/cd/B28359_01/server.111/b28310/views002.htm#ADMIN11796
the max+1 approach is a dangerous one, and will lead to unexplainable random occuring ora-0001...
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:3379873654938
cheersOf course nothing is wront with sequences, but he/she is generating invoice-numbers, means there should be no gaps between the numbers -> sequences not usable for this problem
you definetely need a different approach, but have to take care! what happens if two people at the same time press commit in forms? both select e.g. 42 for the invoice-number, it will (hopefully you made unique contraints) crash with a UK-violation, so just put a select max+1 in pre-commit is not good enough.
I think best way to realize it is to make a table with one record that contains the last invoice-number, before every commit you select the record for update, if its already locked, wait or retry later the commit and increment in the invoice-number table is done when commiting the invoice itself.
Any flaws in this thought? Other suggestions? -
How to populate sequence number automatically in fusion web application
Hi all,
I created simple fusion web application.
I created a form which has programid and remaining fields are there.
If i press save button program details will save in database.
here i am giving programid manually. but i need to generate a sequence number to programid automatically.
If i give program details and save for this program details one sequence number should be generate and save in databasePlease help me
Thanks,
rajHere there are two methods given
1. Generating sequence number from the trigger
2. another one is from java class.
I tried two but i am not getting the sequence number.
In my application under model project i have programview.
i created CustomEntityEmpl java class.
I double clicked on programid in attributes window, given some sequence name in name field,given db sequence name as as value.
i mentioned name of sequence in Java class. but still it is asking a value when submiting the program details with out program id.
please help ASAP
Thanks
Nag -
Generate AWR Report automatically every day
Hi Friends,
I would like to generate AWR Report automatically every day. How do i do it.
The Start Time will be 00:00 of Previous day and the end Time will be : 00:00 of current day. The File format is html.
Currently i am using awrrpt.sql to generate report manually and i would like to achieve it automatically,I am not sure how to pass the values of start and end time (From which table i can get the values)?
Regards,
DBHi, DB.
You may use the below sql script , the sql script generates the AWR report for the duration of 2 days in HTML.
So you change
1) the where condition as per your requirement,
2) report name in sql script,
3) and convert it as shell or bat script based on your environment, and schedule it in your OS job scheduler / crontab.
=-=-=-=-
connect / as sysdba
REM set termout off
variable snap1 number
variable snap2 number
COLUMN starthr new_value bhr
COLUMN endhr new_value ehr
COLUMN crdate new_value cdt
begin
select
distinct min(s.snap_id)
into :snap1
from dba_hist_snapshot s
where to_char(trunc(end_interval_time,'HH24'),'HH24') = to_char(trunc(sysdate,'HH24'),'HH24')-2 and trunc(end_interval_time)=trunc(sysdate);
select
distinct max(s.snap_id)
into :snap2
from dba_hist_snapshot s
where to_char(trunc(end_interval_time,'HH24'),'HH24') =to_char(trunc(sysdate,'HH24'),'HH24') and trunc(end_interval_time)=trunc(sysdate);
end;
COLUMN starthr new_value bhr
COLUMN endhr new_value ehr
COLUMN crdate new_value cdt
select to_char(trunc(sysdate, 'HH24'),'HH24')-2 starthr,
to_char(trunc(sysdate, 'HH24'),'HH24') endhr,
to_char(trunc(sysdate),'DD-MON-YYYY') crdate
from dual;
define begin_snap=:snap1
define end_snap=:snap2
define report_name=/orashare1/reports/awrreport/AWRRPT_PROD_1_${1^^}_${EXDATE}_mor.html
define report_type = 'html';
@@?/rdbms/admin/awrrpt.sql
exit -
Generate primary key automatically
Hi, I'd like to know how to generate primary keys automatically with JHeadStart because when I try to make an insert into a table, the page gives me the option of insert the primary key of the register.
Thanks a lotI have a table which have 2 fields, one of those is the primary key, the other is the description.
I have established the primary key as a DBSequence, but when I try to insert a new record testing the service, appears a negative number in the primary key and instead of that I want to appear the correspondent key, or if doesn't appear the correct value, the insert be done correctly.
At least I change manually the value if this key, the insert can't be done. -
How to generat code numbers automatically?
Dear members,
i have 3 tables with code no which are primary key and char datatype.
the first code number is 2 characters,
then the 2nd code number is 5 characters
then 3rd code number is 9 characters.
the first table's code numbers are manually defined. 10, 20, 30 and so on.
but the requirement is to generate the 2nd table's code number automatically by fixing the 1st tables 2 characters on the left and then 10001, 10002, 10003, 10004 and so on.
and like this the 3rd table's code number to be generated by fixing the first 5 characters on the left from the 2nd table and the 4 characters on the right 100010001, 100010002, 100010003, 100010004 and so on.
for example:
FIRST TABLE 2ND TABLE 3RD TABLE
10 10001 100010001
10002 100020001
20 20001 200010001
20002 200020001
30 30001 300010001
30002 300020001
How can do this job?
i issue the following query.
declare
v_2nd_code_no char(5);
begin
select max(2nd_code)+1 into v_2nd_code_no from 2nd_table;
select first_code_no||v_2nd_code_no into :blk.item from dual;
end;
it give the following error.
ORA-06502: PL/SQL: numeric or value error string
now how can i do this job.
thanks in advance.
Muhammad Nadeem
[email protected]Muhammed,
I think you should reconsider your design. Duplicating data into other columns will give you update headaches, uses extra storage, and fool the optimizer, and maybe others will point out more disadvantages.
In my opinion your table should look like this:
code1 number(2,0)
code2 number(3,0)
code3 number(4,0)
Please note that they are numbers! Using numbers for numbers is the right way for not fooling the optimizer. Before executing a query, Oracle determines the access path to retrieve all information, based on statistical information on all the tables,columns and indexes involved. If you issue a query with a predicate like:
code3 between '100019999' and '100020000'the optimizer will think there are numerous strings between the two "numbers" and will maybe head towards a full table scan, or at least think there are thousands of values between the two.
Now, if in your application you want to get a nicely displayed number with leading zeros and all, you just use:
rpad(to_char(code1),2,'0') || rpad(to_char(code2),3,'0') || rpad(to_char(code3),4,'0')Regards,
Rob. -
Generating Computer Name automatically without "-"
Hi,
I am generating PC name with Sysprep unattend and setup generates PC name automatically based on Organization /Owner information .... but it adds a hyphen "-" after organization /user and then appends a random number , all I need to know if its
possible to omit "-" in PC name.?
Example 1234567-xyzxyz
Here 8th character is "-" which I don't want to have but appended automatically.
N.A.MalikHi,
I am afraid this is not possible to omit "-" in computer name.
Here is the Help file articles:
Computer Name:
Specifies the computer name used to access the computer from the network. If
ComputerName is empty or missing, the user must enter a computer name in Windows Welcome.
If you set this value to an asterisk (*), a random computer name is generated. This random name has at most 8 characters from the
RegisteredOwner and/or
RegisteredOrganization strings plus random characters.
Computer_name is a string with a maximum length of 15 characters.
I think the "-" here is generated automatically to distinguish the two different parts in the computer name.
Best regards
Michael Shao
TechNet Community Support -
Error in generating reference number of process
Hi All Masters,
I'm new in HCM P&F.
Currently I have a problem. I was running a sample process or copied process from the sample. Clicking 'check and send'. Still OK.
But when I clicked 'Send' button, I got an error message displayed 'Error in generating reference number of process'
Would you please help me what's wrong with that? FYI, I've tried to activate Case Management, but maybe, there is still any loss in that area?
Thank you for your help
Regards,
Pradita HerdiansyahHi Otto,
Neither did I. I don't have any complete resources. Maybe actually there are exists somewhere, but just I don't find it yet.
I try to learn and doing that by watching this forum and sap help/doc, just maybe there are other people who have same obstacles with me in developing this and then I will get solutions for it.
Have a nice day...
Regards,
Pradita Herdiansyah -
Sorting rule for generating voucher number ina payment batch.
Hi All,
How does system generate the voucher number in a payment batch?
In my system, some voucher number in a payment batch seem sorted by supplier name, some are not.
I want to know is there any sorting rule for generating voucher number in a payment batch?
Thanks in advance,
Best Regards.
Edited by: user631092 on Jul 16, 2009 3:07 PMHi John,
Thanks for your information. Maybe I did not explain clearly.My problem is...
If my setup for payment doucument sequence is starting with 200900000001.
The user create a payment batch for 10 payments, 200900000001~200900000010.
I am wondering how does the system decide which payment is 200900000001, which one is 200900000002?
My users used to file the physical document sorting by supplier name for one batch.
Most of time, the payment document numbers are also sorted.For expamples,
200900000001 Supplier A
200900000002 Supplier B
200900000003 Supplier C
Sometimes the sequence become like this,
200900000001 Supplier B
200900000002 Supplier A
200900000003 Supplier C
Thank you.
Best Regards,
Edited by: user631092 on Jul 16, 2009 3:23 PM -
Assign production order number to batch number automatically
Hi All,
I have been trying to assign production order number to batch number when clicked on create icon in t-code CO02, and successfully assigned Production order number to batch number through EXIT_SAPLV01Z_001
Question:
Now i want to assign same production order number to batch number automatically... is it possible"
If yes, provide me the exit or badi.
Best Regards,
Krishna KHi,
Try to use any enhancement point in below mentioned FORM.
In Program : SAPLCOKO1
Include : LCOKO1F3J
Inside below FORM.
FORM header_update.
DATA: flg_q_upd.
DATA: quan_old LIKE caufvd-gamng.
ENHANCEMENT-POINT header_update_01 SPOTS es_saplcoko1 STATIC.
ENHANCEMENT-POINT HEADER_UPDATE_05 SPOTS ES_SAPLCOKO1 .
BR,
Vijay -
BAPI_ACC_DOCUMENT_POST & generated document number
Hi,
I am using BAPI function BAPI_ACC_DOCUMENT_POST to post financial documents in the system. My question is, how properly retrieve generated document number (BKPF-BELNR). We are using internal document number generation so the function generates document number. But, function itself, does not return generated document number. Currently, after commit I try to locate a record of generated document using reference key ... Isn't there any better way how to get generated document number?
Tkank you.Yes, I found this code ... as I wrote, there is not problem if I set curtp = '10'. BUT, there is another problem, with different currencies. Then, when I try to post document in different currency that the currency of company code is, function raises error "Inconsistent currency information" ...
here is an example, how I fill tax information, as requested:
DATA: docHeader TYPE BAPIACHE09,
accGL LIKE BAPIACGL09 OCCURS 0 WITH HEADER LINE,
accReceivable LIKE BAPIACAR09 OCCURS 0 WITH HEADER LINE,
accAmnt LIKE BAPIACCR09 OCCURS 0 WITH HEADER LINE,
accTax LIKE BAPIACTX09 OCCURS 0 WITH HEADER LINE,
extension LIKE BAPIACEXTC OCCURS 0 WITH HEADER LINE,
tax_account TYPE STRING,
tax_code TYPE STRING,
tax_trans TYPE STRING,
tax_spec LIKE ZIFPRMS-VALUE,
itemno TYPE N LENGTH 10.
* initialize document header
docHeader-bus_act = 'RFBU'.
docHeader-username = sy-uname.
docHeader-header_txt = fin_data-text.
docHeader-comp_code = header-company_code.
docHeader-doc_date = header-document_date.
docHeader-pstng_date = fin_data-posting_date.
docHeader-ref_doc_no = header-id_sale.
docHeader-doc_type = params-doc_type.
* process document items, in loop
LOOP AT fin_items INTO fin_item.
* initialize AR (line 1)
accReceivable-itemno_acc = itemno.
accReceivable-customer = cus_data-id_contact.
accReceivable-comp_code = header-company_code.
CONCATENATE fin_item-text ' (receivable)' INTO accReceivable-item_text.
accReceivable-pmnttrms = params-payment_term.
accReceivable-pmnt_block = params-payment_block.
IF doc_type = 'APR'.
accReceivable-sp_gl_ind = 'F'.
ENDIF.
APPEND accReceivable.
* initialize receivable amount
accAmnt-itemno_acc = itemno.
accAmnt-currency = fin_data-currency.
accAmnt-curr_type = '10'.
accAmnt-amt_doccur = fin_item-vat_base + fin_item-vat.
IF doc_type(2) = 'CR'.
accAmnt-amt_doccur = accAmnt-amt_doccur * ( -1 ).
ENDIF.
APPEND accAmnt.
itemno = itemno + 1.
* do not continue when posting a down payment request
CHECK doc_type < > 'APR'.
* initialize GL account line item
accGL-itemno_acc = itemno.
accGL-gl_account = params-doc_gl_account.
CONCATENATE fin_item-text ' (revenue)' INTO accGL-item_text.
accGL-pstng_date = fin_data-posting_date.
accGL-tax_code = tax_code.
accGL-doc_type = params-doc_type.
accGL-costcenter = fin_item-cost_centre.
APPEND accGL.
* initialize GL amount
accAmnt-itemno_acc = itemno.
accAmnt-currency = fin_data-currency.
accAmnt-curr_type = '10'.
accAmnt-amt_doccur = - ( fin_item-vat_base ).
IF doc_type(2) = 'CR'.
accAmnt-amt_doccur = accAmnt-amt_doccur * ( -1 ).
ENDIF.
APPEND accAmnt.
itemno = itemno + 1.
* initialize TAX account line item
IF STRLEN( tax_code ) > 0.
accTax-itemno_acc = itemno.
accTax-gl_account = tax_account.
accTax-tax_code = tax_code.
accTax-cond_key = 'MWAS'.
APPEND accTax.
* initialize tax amount
accAmnt-itemno_acc = itemno.
accAmnt-currency = fin_data-currency.
accAmnt-curr_type = '10'.
accAmnt-amt_doccur = - ( fin_item-vat ).
accAmnt-amt_base = - ( fin_item-vat_base ).
IF doc_type(2) = 'CR'.
accAmnt-amt_doccur = accAmnt-amt_doccur * ( -1 ).
accAmnt-amt_base = accAmnt-amt_base * ( -1 ).
ENDIF.
APPEND accAmnt.
itemno = itemno + 1.
ENDIF.
ENDLOOP.
* translate customer field to BAPI format
CALL FUNCTION 'MAP2E_BAPICOBL_CI_TO_BAPIEXTC'
TABLES INTERNAL_CI_COBL = cust_ext
EXTENSION_CODINGBLOCK = extension.
* call BAPI function to create customer invoice
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING DOCUMENTHEADER = docHeader
IMPORTING OBJ_TYPE = obj_type
OBJ_KEY = obj_key
OBJ_SYS = obj_sys
TABLES ACCOUNTGL = accGL
ACCOUNTRECEIVABLE = accReceivable
ACCOUNTTAX = accTax
CURRENCYAMOUNT = accAmnt
EXTENSION1 = extension
RETURN = returnTab.
Edited by: Rastislav Mojzis on Jul 9, 2008 7:18 AM -
GG Extract generates enormous number of trail files when transfers large blob
Hello experts
In working GG environment we tried to transfer large blob about 400MB - extract began to generate enormous number of trail files(thousands files) with no error messages.
We played with trail file size - increased up to 1GB but result was same.
Can you help with that issue?
Hope it is known issue
thanks in advance
VladimirVeera
Classic mode.
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
OGG 12.1.2.0.0
Linux, x64
Raj,
We have the application that put data into DB and I suspect it can send data in smaller chunks.
Can we check in DB how it uses dbms_lob.write?
regards
Vladimir -
Generating Symbolic Number at the time of Syndication
Hi! All
I have the following user requirement:
The Material number in one of the client system is in the following format-
70000-00001, which is a symbolic number. There are already 54000 records in that particular system. These records needs to be cleaned by MDM and then syndicated back to the respective system with the number being generated in the same format ie. symbolic number and also if any record is added further, it should generate the number in the ascending order. For Eg. 70000-00001, 70000-00002, 70000-003, etc.
Please suggest me the best possible solution. Thanks in advance for the same.
With Best Regards,
Devendra Pandeyhi,
if you have AUTO ID field in the main table. It will generate number for each record in the ascending order only.
for example:
700000-00001 for this record the auto id is 001 .
when ever you are syndicating, you can use Cust Items property in the syndicator ( concatenation of two fields).
you can set custom delimiter for custom items.
EX:
1.create a custom item( ex: custom number ), in that custom tab, you can create the formula, click on that formula,
2.select the fields, you want to concatinate, ( in our example: material number and auto ID,), this custom filed you find in the source items.
3.map this Concatinated field to Destination item.
4.and you can synicate
hope this may help you,
Regards,
Srinivas -
Reg: Generating custom number instead of system generated no in ME21n
Hi Experts,
I need to know user exits or Badi to generate custom number instead of system generated number while saving p.o ME21n transaction.
Regards,
Vikram.SVikram,
Instead of doing it programatically , ypu can satisfy your requirement in configuration settings.
check SPRO with the help of functional consultant. -
SLA Report generate and download automatically
Hi,
I u2018m looking for a way to generate SLA report automatically (in batch) and also download it to a file system or move it to a SAP Portal KM environment.
Has anybody an idea how I can doit ?
Regrads
RobertHi Carsten,
thank you for your answers.
you have to configure your button to submit the request "download". so give your
button the name "download" - you can set the display name like you want - but the >>"internal" name must be "download". Then you can use your condition as described.
... and .. the button must not have a target ...Sorry I think I was not clear enough on this. I allready did what you described without success. I thought there was some typo but I could not find one.
The button name is set to download and the condition is 'Request = Expression 1' in the select list and download in the textarea.
Unfortunately the process does not execute with this condition whereas it is executed when there is no condition. So I think there has to be some typo I did not recognized so I have to search again.
just make sure in your link that the :REQUEST is download
f?p=&APP:ID.:&APP_PAGE_ID.:&SESSION.:download:...
("download" is the request parameter)Thank you, that's what I searched.
Regards
Markus
Maybe you are looking for
-
When I click on "iTunes store" I get the error code 0x80090318. Also when I click on home sharing I get the error code -2146893032. This is the second time I have installed this and won't work. Please help. I have Alienware / Windows 7 home ed. 64
-
Sound no longer working in 10.5.2
I've installed 10.5.2 on my PowerBook G4 15" 1.67GHz, and now, sound output no longer works. The "clicks" of the volume change don't work and neither does music playing in iTunes. Any ideas?
-
How to cancel Forecast in Production Planning
Dear Sappers, I've a forecast for 100 quantities which is available in MD04. If I receive delivery order for 80 quantities, in MD04 I get the requirement as 80 against delivery order and 20 against forecast. My requirement is to cancel forecast quant
-
How to create entity object (Business Component) using service interface
Hi, I have tried to create one entity object (ADF Business Component) in JDeveloper 11g using service interface option instead of database schema but getting Failed to read service WSDL URL: http://....?wsdl message. I have tried with axis default se
-
I am in the middle of a project, I adjusted a Photoshop image and saved the file. When I went back to the PPro timeline all of the graphics that I was just using are now offline. When I tried to relink them I got and Error Message, The importer repor