简体   繁体   中英

Openbravo servlet session

I have a servlet that creates a header with a particular documentno and later creates a line with the same documentno in another file. The problem arises when two people access the same module at the same time. The documentno gets overridden in the lines with the new incremented documentno. How do i tackle this? The doPost method calls another methods to create header and lines. Any help at the earliest would be appriciated.

To Over come this problem we have an openbravo function to generate the unique document number based on the request that has been processed , And you can able to decide whether you need to create a new document no or you need to use the existing document no based on the business process you need to perform.

Openbravo function is :

ad_sequence_doc("Sequence Name","client Id","Update next sequence or not") .

For Example :

select ad_sequence_doc("Document_for_Order","ad_client_id","Y") 

Y for generating the new Sequence Number , N for retain the previous sequence number.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM