Sequence Number Generation in XML Form Buider??????
Hi All,
I want to generate some Sequence Number for each XML Form Generated by the XML Form Builder Application?
Ex: my XML Form Builder Application is "MYAPP". Using this I filled data and Save, then an XML will be created, then it should have some unique Number(say 1234), then if I fill the differennt Data and Save, then another XML will be created. For this the Number should be 1235, next 1236, ........
I can use the XML Form ID, but that is not User friendly format. Becaz I need to display this Number to the End User.
(Example: 10b2ae7b-e269-2b10-d88e-ddade2e62015.xml)
If anybody have idea on this, Please guide me...
Thanks&Regards||
Ashok M.
Edited by: Ashok Kumar Munugoti on Oct 16, 2008 8:04 AM
closing this Thread.
Similar Messages
-
Enq: TX - row lock contention in forms 10g sequency number generation
Iam Getting the Deadlock issue in oracle formdeveloper 10g database is 11g Acutually in our small Hospital organization using different forms generating entrying labrequest form finally save time
one sequency number will generated i have give procedure below every save criteria form using below procedure some time iam getting lock iam using blocksession query i have find out some
OSUSER
MACHINE
TERMINAL
PROGRAM
SQL_ID
LOGON_TIME
BLOCKING_SESSION_STATUS
BLOCKING_SESSION
EVENT
user423
UMCCDOM\LEVEL4-MICU
LEVEL4-MICU
PrjMcr.EXE
0ccngw7dfkmgb
23/09/2013 11:34:41 AM
VALID
277
enq: TX - row lock contention
SYSTEM
WORKGROUP\PRIAPPSVR
PRIAPPSVR
frmweb.exe
0ccngw7dfkmgb
23/09/2013 11:32:50 AM
VALID
186
enq: TX - row lock contention
SYSTEM
WORKGROUP\PRIAPPSVR
PRIAPPSVR
frmweb.exe
0ccngw7dfkmgb
22/09/2013 2:49:47 PM
VALID
277
enq: TX - row lock contention
SYSTEM
WORKGROUP\PRIAPPSVR
PRIAPPSVR
frmweb.exe
0ccngw7dfkmgb
23/09/2013 7:00:22 AM
VALID
186
enq: TX - row lock contention
user290
UMCCDOM\LEVEL2-N
LEVEL2-N
PrjMcr.EXE
0ccngw7dfkmgb
23/09/2013 10:28:06 AM
VALID
277
enq: TX - row lock contention
lock are happen after open the code i have find out used FOR UPDATE in procedure please tell me any alternative for this every labrequest form saving time using this procedure for generating prefix sequence number multiple user using with different systems
PROCEDURE Gsp_GenSeqNum (I_SvPrefixCd IN VARCHAR2,I_SvUserName IN VARCHAR2,
O_SvSeqNum OUT VARCHAR2) IS
--This Procedure generates the sequence number
--by retrieving the prefix based on the code
--supllied to the procedure.
CURSOR crSeqGenerator IS
SELECT Gsn_prefix_last_num, Gsn_prefix_year
FROM G_SEQUENCE_NUMBER
WHERE Gsn_prefix_Cd = I_SvPrefixCd
AND Gsn_prefix_year = TO_CHAR(SYSDATE,'YYYY')
FOR UPDATE OF Gsn_prefix_last_num;
udSeqNum G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
udNextSeqNum G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
udYear G_SEQUENCE_NUMBER.Gsn_Prefix_year%TYPE;
udPrefix G_SEQUENCE_PREFIX.Gsp_Prefix_Value%TYPE;
BEGIN
SELECT Gsp_Prefix_Value
INTO udPrefix
FROM G_SEQUENCE_PREFIX
WHERE Gsp_Prefix_Cd = I_SvPrefixCd;
OPEN crSeqGenerator;
FETCH crSeqGenerator
INTO udSeqNum,
udYear;
IF crSeqGenerator%FOUND THEN
udNextSeqNum :=udSeqNum + 1;
O_SvSeqNum := udPrefix||'/'||TO_CHAR(SYSDATE,'YY')
||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
ELSE
INSERT INTO G_SEQUENCE_NUMBER VALUES(I_SvPrefixCd,TO_CHAR(SYSDATE,'YYYY'),0,I_SvUserName,SYSDATE);
udSeqNum :=0;
udNextSeqNum :=udSeqNum + 1;
O_SvSeqNum:=UdPrefix||'/'||TO_CHAR(SYSDATE,'YY')
||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
END IF;
UPDATE G_SEQUENCE_NUMBER
SET Gsn_Prefix_last_num=udNextSeqNum
WHERE Gsn_Prefix_Cd = I_SvPrefixCd
AND Gsn_Prefix_year=TO_CHAR(SYSDATE,'YYYY');
CLOSE crSeqGenerator;
END Gsp_GenSeqNum;
Thanks
subbuThis application is inbuit with some modules VB (cath ,cardio)and oracle forms for required sequence number generation different time used this procedure whereever required the sequence Prefix generation.If i replace the procedure sequene to oracle standard sequency if the user cannot save the form unnessary sequency generated order is missing from sequence.
-
A sequence number error in a form
I am currently creating a form with a sequence number in forms 10g
<pre>
table name: emp
table desc: emp_id number,emp_name varchar2(20),emp_no number
</pre>
i have to generate the emp_id automatically.
<pre>
create sequence emp_seq
minvalue 1
start with 1
increment by 1
cache 20
</pre>
I use pre_insert trigger in block
<pre>
begin
select emp_seq.nextval into :emp.emp_id from dual
end
</pre>
problem;
I can not insert a record because of sequence number in :emp.emp_id
no compilation error but there is no automatic sequence number appeared in :emp.emp_id after run a form.
It used to work before(fine with automatic sequence number in :emp.emp_id).
it happens after I changed layout format and someone add more columns in emp table.
eventhough i did not use sequence number in emp.emp_id
in pre-insert-trigger
<pre>
begin
select nvl(max(emp_id),0)+1
into :emp.emp_id
from emp;
</pre>
still can not show up any number in :emp.emp_id
please help me outThank you . It works now.
would you mind explain to me; what I can not use automatic sequence number in emp.empid text field in pre-insert-trigger in my case
is it trigger confliction in my forms? -
Sequence number in pre-insert form trigger
i have two tables invoice (master) inv_detail(detail) and assign the invoice number using a sequence number,
by writing the folowing code in the pre-insert trigger
select a.nextval into :inv_no from dual;
( i make the trigger at the form level becuause i have a master (invoice) and detail (inv_detail) relation at the same screen,so i must fetch the value of the
sequence into the :invo_no in the screen,to let the 'copy value from' property at the detail block works so the value of the foreign key will be copied from
the sequence number at the screen.
will this method be a good one for multi user envirment(to select the a.nextval in the pre-insert trigger at the from level?)Kevin, thank you for the correct explanation. I was making an assumption and of course it was wrong.
Mohannad, please do not try to link the invoice count with the sequence number. Any time you need a count, just do a select count(*). The sequence number is ONLY a unique key, and should represent nothing else.
People have discussed this situation heavily. If you insist on trying to ensure there are no gaps, you will:
1. Fail -- there are many scenarios where gaps will occur.
2. Waste your time.
3. Whatever process you build to try to prevent gaps will cause unnecessary overhead and work for the server, and in a multi-user environment, cause processing bottlenecks due to table locks. -
Sequence number over multiple adobe form calls
Dear all
I posted this question in another subforum - http://forums.sdn.sap.com/thread.jspa?threadID=1997461 - three days ago,
but nobody could answer, so I try to post it here.
We would like to have a sequence number for each page.
The Adobe Form gets called more than once, so the second call doesn't know, how many pages were printed already, thus it cannot continue the sequence number.
Do you have any ideas?
Of course, I would prefer not to publish an SAP-service only for this purpose...
(The transaction is HRFORMS, we would like to print a sequence number bar code, so that the packing machine to the envelope senses, if two pages are stuck together.)Hi,
I have a problem in printing current page number of an adobe form.
My requirement is that , my form got 2 pages. On first page i am not printing page numbers and excluded from numbering.
Numbering starts from second page. The second page needs to be repeated twice.
In this case my page printing should look like :
First page - no page number
second page - 1 of 1
Third page - 1of 1 (as it is a copy)
IF second page extends to multiple pages (eg.. 2)
First page - No Page no
First instance of second page - 1of 2 , 2 of 2
Second instance of second page - 1 of 2 , 2 of 2 . Presently it is printing like : 3 of 2 , 4 of 2. I need to initialize current page count. I could able to set the total page count 2 via variable from print program. But while printing the second instance, I am not able to initialize the current page count.
I have seen the following thread which exactly talks about my problem but with out any solution.
http://forums.sdn.sap.com/thread.jspa?messageID=10601698�
I have tried initializing the current page count in the initializing event and tried assigning the initial value when the second copy starts but for entire no of pages the same initialized value is coming.
Can anyone help me in this regard.
Thank You,
Regards,
Naresh. -
Hi,
I want to generate sequence number to Particular Column whenever a new record is created .i.e when i create SR the column value should be 1,2, 3....
how to achieve autogeneration of number while creating recordsThe reason why you can't do this is because, system referes the Row id while creating the SR number. which comes from the database table. you can not control that. As venky suggested, you can achieve this by using webservices to call the external system which will generate the SR number in series and assign it to your CRM SR.
All the best.
Nisman -
Help me in sequence number generation
hi
i had written a JSP which reads and displays the all the directories in that pertucular folder
when i click on a perticular folder it should read each and every file in that folder and it should rename it with a sequence number
i.e file0001,file0002,file0003 etc....
the sequence should be reset for each folder and if i add some new files in to diretory it should remember last sequence number and it should assign next number onwards to those files.
at any point of time i may move or deete any file
but each and every foler i should keep track of last sequence number assigned so that next onwards i can reame new files from that number
another constraint is i may delete the files in that directory
i am new to java
so PLZ help me how effeciantly i can write a program
if so PLZ provide me an example
thanks in advancewhen i click on a perticular folder it should read
each and every file in that folder and it should
rename it with a sequence numberShould the files in the underlying file system be renamed or is this "renaming" just an abstraction layer you maintain yourself? In that case you can use JTree of Swing to maintain an own file structure on top of the OS. You just map "your" filenames to the real file names underneath. -
Sequence Number Generation with Global Container
Hi ALL,
Can any plz send me the steps of using global container for generation seqence number's
And also if possible send me the code.
Thanks & Regards
RupashHi Rupesh,
chack this code:
public String seqNumber(Container container)
int i;
GlobalContainer global=container.getGlobalContainer();
String getnum=(String)global.getParameter("a");
if(getnum==null){
global.setParameter("a","1"); i=1;
else{
i=Integer.parseInt(getnum); i++;
global.setParameter("a",String.valueOf(i));
return String.valueOf(i);
**Reward points if helpful
--Sankar Choudhury -
Help on counter (Sequence number generation)
Hi all,
Need to ask smething about the counter to generate the sequence numbers and pass it to the target field.
If we use the Global containers, then say if the app server goes down, the current count will also vanish. Am I correct?
So thats the case, then we should use the DB lookup for the same?
Also, the INDEX function in the Statistics part in the GUI of Message Mapping, how much that is helpful?
Respond back at the earliest possible.
Thanks in advance.
NeeteshHi,
just one point about your sentence: <i>If we use the Global containers, then say if the app server goes down, the current count will also vanish. Am I correct?</i>
For me you are wrong, if your application server shut down during your mapping execution, then you will <b>NOT</b> have an inbound message for your target system, because your system is stopped. And you will have a red flag inside SXI_MONITOR.
Mickael
one question: what is the direction/sense of your flow? "XI -> ZZ" or "ZZ -> XI" ?
Message was edited by: Mickael Huchet -
XML form field should be read only.
Hi All,
Can we have a field in a XML form which is read only and the number in field should be incremented every time a new form is created.
Is this possible.If yes can someone please guide me how.
Thanks,
Nikhil PaiHi Nikhil,
Do u want this property to come in the Edit form also, or only on the show form?
If its only on show form,
1. Keep a text file in KM with a starting number say 1000.
2. While creating the XML form, a KM Service listening to resource creation only in the folders,
will update a property and also edit the text file and replace the number by 1001.
So in the show form u will have a unique number for each XML form.
Regards
BP -
Sequnce Number generation in Message Mapping..
Hello All,
I am using this thread as a reference for declaring a Counter for unique sequence number generation...
Sequence Number in XI Mapping
-> define a global variable by clicking the JAVA_SECTION_TOOLTIP icon on the design tab of source message type of ur message mapping.
enter the following in the GlobalVariables Section
Integer counter =0;
-> define a user defined function (SeqGen let's say)
write the following code in it.
Integer seq = 0;
GlobalContainer globalContainer = container.getGlobalContainer();
a = globalContainer.getParameter("counter");
seq = globalContainer.getParameter("counter");
seq = seq + 1;
globalContainer.setParameter("counter",seq);
return a;
now use this user defined function (SeqGen)in all ur mappings to the sequence no of ur line items.
If u could just elaborate on creation of UDF.. on what are we goin to pass in the variable 'a'... while creating the UDF. ??
Harpreet..!!Hi harpeet,
A UDF can be of two types a Simple UDF and Adavnced UDF.
This is a case of a simple UDF,
A simple UDF returns only 1 element as an output.
here 'a' is such an generated output. you can assign this to any numeric filed of ur target stucture
This UDf does not require any input Field from the message.
These functions are known as generating functions.
Hope this explains.
Reward points if useful.
Regards,
Abhishek -
Portal Master-detail form how to auto assign detail record sequence number
Portal Master-detail form how to auto assign detail record sequence number.Please help me?
You can just read the following section
Can I specify a sequence number generator as the default value for a form column?
Yes. Enter the following in the "default value" field for the column:
#<schema name>.<sequence name>.nextval
where <schema name> is the name of the schema containing the sequence, and <sequence name> is the name of the sequence. The entry is preceded by a "#".
For example, if the schema name is "SCOTT", and the sequence name is "CUSTOMER_SEQ", the default value entry is:
#SCOTT.CUSTOMER_SEQ.NEXTVAL
same way you can do for master - detail form.
for more information on forms please refer the following URL.
http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
hope it helps. -
Sequence number in ADF FORM.
hi All,
I have a table with ID as primary key and have a sequence created for this primary key and have a trigger for generating sequence number while inserting the record in table.
How can i map this Sequence in ADF so while inserting record from Form i can skip the ID column.
Regards,
Suresh kumarI am using MySQL and primary key is auto incremented in my table. Therefore I have selected
SQL Plateform : SQL92
Data Type Map : Java
When I am trying to create entiry object, I do not get option of selecting DBSequence. I did some documents reading, I found out that DBSequence is part of "*Java Extended for Oracle*" Data type Map.
While creating the EO , in the Attribute Settings, I click the Browse and search for DBSequence. I found out oracle.jbo.domain.DBSeqence.
Can someone please let me know that I am going to face any problem in future by using DBSequence in his manner?
Thanks in Advance. -
File name generation with sequence number
Hi All,
My scenario is, File to File. I need to generate the filenames at the target side like File1.xml, File2.xml..File9999.xml for each file triggered from source system. The interface tiggesrs multiple times in a day.
For example, for the first time, 5 files triggered, need to generate File1.xml,File2.xml..File5.xml. After some time the interface might trigger with 10 files, then need to generate files as File6.xml,File7.xml....File15.xml . Once the file count reaches 9999 then need to generate the files from 1 (File1.xml)again.
Could you please suggest me the possible solutions. For this any Lookups required?
Regards,
Praveen KumarHi Praveen,
Case 1: If a field in source data carries the information regarding the sequence.
You can map this value ( Directly .. or using some transformation ) in some temporary field in the target and then use a Variable substitution at the receiver communication channel.
Case 2. If the source file name carries the sequence information. then you can enable the Adapter specific settings in the Sender communication channel , and then get the information of the source file name using the Container object in the mapping. Then assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
Case 3 : If Case 1 and Case 2 are not applicable ... then you have to use a Ztable to store the sequence number , a function module to fetch the number , and then use a UDF in which you will implement the RFC call logic.Then the same process .... assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
BR,
Sushil. -
XML insertion/updation using merge and generate sequence number
Hi,
I am working on Oracle 11g.
I have a doubt with XML load.
I get an xml and I have to insert or update data into a table A. This I can achieve using MERGE statement.
But there is one column in Table A, that I need to populate with a sequence number, based on the data sent in the xml.
The xml does not send this column data.
And I have to make sure the sequence is created based on the order in which records are present in xml.
For example the MERGE is inserting five rows and then updating next two rows and again inserting 3 rows from xml into table A. The sequence number should be created in the same order for the column in table A.
Also for each new xml, the sequence starts with 1 and ends with the number of records in the xml. So I cannot create a sequence and use seq.nextval.
Please let me know, there is a way of achieveing this.
Thank you!
Edited by: 934451 on Aug 8, 2012 6:33 AM
Edited by: 934451 on Aug 8, 2012 6:50 AMHi,
Following up on your previous thread : {thread:id=2403469}
You can use the FOR ORDINALITY clause in XMLTable to generate the required sequence :
MERGE INTO target_table t
USING (
SELECT x.seq_num, x.pk_id, x.col1, x.col2, ...
FROM XMLTable(
'/root/record'
passing my_xml_doc
columns seq_num FOR ORDINALITY
, pk_id number path 'ID'
, col1 varchar2(30) path 'COL1'
, col2 varchar2(30) path 'COL2'
) x
) src
ON ( t.pk_id = src.pk_id )
WHEN MATCHED THEN UPDATE
SET t.seq_num = src.seq_num
, t.col1 = src.col1
, t.col2 = src.col2
WHEN NOT MATCHED THEN INSERT
(seq_num, pk_id, col1, col2, ...)
VALUES (src.seq_num, src.pk_id, src.col1, src.col2, ...)
;
Maybe you are looking for
-
Anyone know about installing a deck for 2004 Monte Carlo SS?
Like i said i have a 2004 Monte SS with the OnStar bullshyt. I dont really think thats the problem. The problem is that a lot of the "chimes" like when the door is open or key in the ignition, those are all tied to the audio speakers. This is all jus
-
How do you change text bubble color on iPhone4?
I do not want to Jailbreak my iphone4 but I want to change the bubble color on my texts. I see on the iOS 4 preview that the text bubble color is light blue. How do I change mine?
-
Cannot connect to the internet via wifi and mobile data
im having hard time connecting to the internet even if wifi has a very strong signal as indicated on the phone..i tried every solution that i found in the internet but to no avail..i tried restarting my phone..i tried turning the airplane mode on the
-
Opening Excel files in Numbers
I am a rookie Apple user. When I purchased my MacBook Pro I was assured I could open my Excel files in Numbers. Well, I have tried to email the files and have burned them to a disc and either way they will not open in Numbers. I get an error message
-
What class called my method?
I have tried using the StringWriter and the printStackTrace() methodology for finding out the name of the method that actually called my class and it works fine. But the problem is that the execution time is too high (abt 70msec). I need a better and