문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top