Losing unprocessed records when blocking queue entries are serialized
Hi,
I am developing a batch framework using the Java 1.5 thread APIs. We have a requirement to save the state of the batch processes when it terminates abnormally or when it is killed for any reason. I have implemented this functionality using shutdown hooks.
I have initialized the thread pool with two thread instances. Now, while things are behaving as expected, I am losing upto 2 records when I kill the batch process. These are those 2 records which were being processed by the threadpool threads when the kill signal was sent.
Is there a mechanism to prevent the batch job from exiting before these two threads have processed finishing or maybe keep these 2 threadpool tasks in the pool till they have completed gracefully. I.e. remove these tasks from the threadpool task queue when have they have finished execution
Regards,
Hitesh
ExecutorService.shutdown()
ExecutorService.awaitTermination()
One would expect the jobs that are currently executing to have been already removed from the queue.
Similar Messages
-
Hi Experts,
Is it standard behavior for VL10A to show two records when a Sales Document has been blocked? Their only difference is the field Delivery Block. In VL10A, the first record has a delivery block of BLANK, the second has 99.
Here's how to replicate the issue.
Create sales order.
When you check VL10A, the Sales document is there.
Change sales order field (RSD) in VA02, Save.
When you check VL10A, there are now two records, one has a blank delivery block, the other has 99.
The expected result here is that after changing in VA02, there will be only 1 record in VL10A and it should have delivery block of 99.
Assumptions:
1. We know that VL10A retrieves its records from VEPVG. The problem is, in VEPVG, delivery block is a key field. So I think that during VA02, when the delivery block of 99 is assigned, this creates a record in VEPVG instead of updating the existing one. Is this standard behavior, and are my assumptions correct?
Thanks in advanced experts. Appreciate your prompt response,
JackHello Jack,
This is the standard behavior. When I check in our system, I too can see two entries but with different good issue date and delivery date and the block is specific to good issue date, delivery date.
So there is no problem in it. try to give the delivery date which includes two table entries delivery date and execute the transaction VL10A.
Regards,
TP -
BPC 10.0 NW: JOURNAL ENTRIES ARE REVERSED WHEN RUNNING CONSOLIDATION
Hi Expert,
After running consolidation, I made various journal entries. After posting the journal entries, status of consolidation and currency translation in consolidation model was changed from "done" to "to be executed". When I re-run the consolidation, the journal entries were reversed.
Please help.
Thanks,
AHi A
The fundamental principles of Consolidation Journal entries are when posted, Please keep in mind following rules for any Consolidation system.
Journal Entry Type Local Currency Group Currency ScopeTranslation Consolidation
Reporting or
Local Currency LC NONE NOSCOPE YES YES
Group
Currency - USD NOSCOPE NO YES
Scope Level
Adjustments - USD SCOPE1 NO NO
(Top side Adjustments)
==============
I believe that you have had posted Journal entries in Local Currency(LC) and Group Currency with NOSCOPE level. Based on your entry System would perform from above rules.
Hope this will clarify your questions on journal entries why the Monitor has to re-run CT and Consolidation Process.
Thanks
Venkat
*** You Can not Post " LC with SCOPE1(actual ownership scopes)**** -
Creation of HR master record For a user when a time entry role is added
Hi,
Description summary:Automating creation of HR master record For a user when a time entry role is added to a user account
Description detail:When time entry role is provisioned to a user account,the HR master record is linked,It is compleated after a user is created because a user id must exist .
It is part of the record.In addition the user must be hired into SAP in order for the HR Master Record to Appear in SAP.
What we need to do is when a 'Time and Personal Data Maintainer Role "is Added by the VIRSA_ADMIN user,automate the creation of the HR Master Record.
Transaction code :SU01 to add the role to the Account.
How to Create the User Exists For this Request Its very urgent pls help me on this.
Thanks.
VipinWhy do you need a User Exit? You can create a BDC on PA40 & kick it off upon adding the role..
~Suresh -
Out of order when put /take packages in/from a blocking queue
Hello all:
I put multiple packages in a blocking queue in one thread, and take them out from another thread. The in sequence is 1-2-3, the out sequence becomes 3-2-1. This is NOT a FILO pattern, there is no pattern: it could be 3-1-2, etc.
The question is: can out-of-order issue even take place when put()/take() operations impose on a blocking queue? If it's not possible, which I believe, I'll look elsewhere for the cause. Otherwise, why and how to fix it.
Thanks,
JohnPlease provide an [url http://sscce.org]SSCCE that demonstrates this.
Unless you're using a PriorityQueue or some other specialized implementation, it should be a FIFO order. Check the docs for the implementation you're using.
Edited by: jverd on Nov 22, 2011 4:41 PM -
When I try to buy music, I get message saying that my credit card information does not match the bank records. My information, formatting are exactly the same as the bank. Help!
Look on one of your bank statements and be sure to enter the billing address exactly as it shows on the statement. Some folks forget where they actually get the statement. They put their home address in iTunes/Mac App Store and they actually get the statement at their place of employment or vice versa.
-
Why can I hear sound on the track coming through but when I hit record it turns red but doesn't record any sound?
How are you monitoring the sound coming from Logic?
Did you set up the audio preferences for input and output in Logic.. to reflect your setup? -
when i queue a file for export the encoder is changing my settings to ACC Audio & my settings are not in the drop down. Help
There's something else going on. When you search, the search box searches the Spotlight database that it created when indexing. It doesn't search the computer again. I suspect a hosed index. System Preferences->Spotlight->Privacy->delete all volumes and readd them back in. That should reindex the computer and all attached HDs. BTW, by default there are many places Spotlight doesn't return information from, mainly the various Library folders and the System folder. If you want to find everything, do this:
Click on the Desktop, CMD+F, click on Kind button, select Other, drill down to File invisible, check it, continue down to System files, check it, and click OK. Now, click on + button, click on the left-hand item and select System files and select are included, click on the plus button, click on the left-hand item and select File visibility and select visible or invisible, select File Name, save the search, drag its icon to the Dock, and use to search your entire Mac—currently starts with By Name, but Contents is available. I use this instead of CMD+F or CMD+spacebar for all searches. -
How to block the 'save' function when the required fields are not filled?
Hello, Everyone
I am new for this scripting. My question is:
How to block the 'save' function when the required fields are not filled?
I designed a PDF file with some required fields and I do not want the user to save the document until all required fields are filled. My idea is to write some scripts in Willsave method like:
if (this.getField("Family Name").value == ""){
app.alert('You should fill the Family Name field firstly!');
But I do not think it works as finally the document is saved after all.
Please help me on that!
So much thanks.Dear Randybearwang,
I am a Rocky myself and I know how though it is to establish some good codes. Since I created some forms with validation options myself I might have a code for you. The code also creates an alert box (Yes/no option) if the user chooses yes the form will be validatet, if he chooses "no" the alert window will be closed.If everything is filled out correctly the form will be saved otherwise the textbox will be higlighted and gets focus.
If you need further assistance , please let me know
Have fun with the code.
P.s I don´t know how to upload the "PDF" document. I wrote you an email, please get back to me if you still need the file. -
Delta package not fetching all records from Delta queue in r/3
Hello,
I have loaded Goods Movement Data using 2LIS_03_BF datasource into my BI system.
The Delta has been initialized and everyday the delta is being moved from r/3.
I observed that when I execute my delta package not all delta records are fetched into PSA from r/3.
For Ex: Before starting my delta package I checked in SMQ1 of my R/3 system and see that there are around 1000 records.On executing the delta package I see that the record count is reduced from 1000 to 400 in SMQ1.On executing the delta package again I get the remaining 400 records into my PSA.
Shouldn't the delta package get all records from the queue on single execution??
Is there some setting to define the nr of records to be loaded?
I'm confused with this behaviour.Please help me understand this behaviour.
Thank You.Hello,
First thing: the data is not transferred from the SMQ1 queue, rather the data is transfered to BW from the RSA7 Delta queue. You need to check the number of records present in the RSA7 queue.
Since SMQ1 is involved, i think you are using the unserialized V3 update method. In this method, when data is first written to the application tables, it is first transferred to the SMQ1 update queue,then via a job to the LBWQ extractor queue and then to the RSA7 delta queue. So the number of entries that you see in the SMQ1 queue are not the number of entries that have to be transferred to BW but rather the records that are waiting to be transferred to the extractor queue in LBWQ. Similarly, in LBWQ, the number of entries displayed here are not the no of entries that are going to be transferred to BW, they are the no of entries that will be transferred to the delta queue RSA7 when the next v3 update job runs.
If you want to check the number of records that will be transferred to BW, select the datasource in rsa7 and then click on the display data entries button.
Hope this helps.
Regards. -
How to deactivate/ignore R/3 info records when creating Shopping Cart?
Hi all and thanks for reading...
We have the requirement of ignoring/deactivating R/3 info records when creating Shopping Carts SRM , so that no Vendor is proposed in transactions BBPSC01/BBPSC02.
At the moment, when info records exist in backed, system is proposing vendor and other data and we want them to be completely ignored, both in classic and extended classic scenarios.
How can we accomplish that? Is it possible to use BBP_SOS_BADI or is this BADI only valid for SRM local sources of supply?
Has anybody had the same problem and solved it before?
Thanks in advance for your help, regards
DavidHi David
Inforecord is only source of supply for classic scenario only.
Find and Check Sources of Supply
Use
With the Business Add-In BBP_SOS_BADI, you can search for and check sources of supply according to your own rules. These sources of supply include contracts, vendor list entries and product linkages. For this, the customer fields of the shopping cart or purchase order are transferred to the BAdI.
Standard settings
The BAdI provides the following methods:
1. BBP_SOS_INDEX_UPDATE_CHECK
Use: Check and update contract items in the source of supply table.
2. BBP_SOS_SEARCH
Use: Search for sources of supply according to your own rules.
3. BBP_SOS_CHECK
Use: Check and filter the sources of supply found by the standard search according to your own rules.
4. BBP_SOS_PD_CHECK
Use: Carrying out your own additional checks when creating a shopping cart document item with an assigned contract.
Activities
Implement the BAdI if you wish to determine or check sources of supply according to your own rules.
See also
Implementation
As prasanna mentioned - do you want disable both sides or only one side .
Muthu -
SM58 - IDoc adapter inbound: IDoc data record table contains no entries
Trying to send Idocs from SAP ECC6.0 via PI 7.0 up until 2 days ago there was no problem.
Since yesterday, only one specific type of Idoc does not make it into XI (PI). In the Idoc monitor (WE02) the idocs that were created gives status 3 which is good. But all Idocs of that specific type (ZRESCR01) does not go to XI. I can only find them bakc in SM58 where it gives the following message:
IDoc adapter inbound: IDoc data record table contains no entries
I have checked SAP notes 1157385 and also 940313, none of them gives me any more insight into this error. I have also checked all the configuration in WE20, SM59, and in XI (repository and directory) and in XI IDX1, IDX2 but could not find anything that would cause this. I can also not think of anything that changed since 2 days ago.
Please point me in the right direction.hi,
i think in sm 58 u can find entries only when there is some failure in login credential .
if there is change in IDoc structure than you have to reimport the idoc metadata defination at IDX2.otherwise not requird.
please check the logical system name pointing to the your requird target system....
please also verify thet your port should not be blocked.
pls find the link it may help
Monitoring the IDOC Adapter in XI/PI using IDX5
regards,
navneet -
Performance issue fetching huge number of record with "FOR ALL ENTRIES"
Hello,
We need to extract an huge amount of data (about 1.000.000 records) from VBEP table, which overall dimension is about 120 milions records.
We actually use this statements:
CHECK NOT ( it_massive_vbep[] IS INITIAL ) .
SELECT (list of fields) FROM vbep JOIN vbap
ON vbepvbeln = vbapvbeln AND
vbepposnr = vbapposnr
INTO CORRESPONDING FIELDS OF w_sched
FOR ALL ENTRIES IN it_massive_vbep
WHERE vbep~vbeln = it_massive_vbep-tabkey-vbeln
AND vbep~posnr = it_massive_vbep-tabkey-posnr
AND vbep~etenr = it_massive_vbep-tabkey-etenr.
notice that internal table it_massive_vbep contains always records with fully specified key.
Do you think this query could be further optimized?
many thanks,
-Enricothe are 2 option to improve performance:
+ you should work in blocks of 10.000 to 50.000
+ you should check archiving options, does this really make sense
> VBEP table, which overall dimension is about 120 milions records.
it_massive_vbep into it_vbep_notsomassive (it_vbep_2)
CHECK NOT ( it_vbep_2[] IS INITIAL ) .
get runtime field start.
SELECT (+list of fields+)
INTO CORRESPONDING FIELDS OF TABLE w_sched
FROM vbep JOIN vbap
ON vbep~vbeln = vbap~vbeln AND
vbep~posnr = vbap~posnr
FOR ALL ENTRIES IN it_vbep_2
WHERE vbep~vbeln = it_vbep_2-vbeln
AND vbep~posnr = it_vbep_2-posnr
AND vbep~etenr = it_vbep_2-etenr.
get runtime field stop.
t = stop - start.
write: / t.
Be aware that even 10.000 will take some time.
Other question, how did you get the 1.000.000 records in it_massive_vbep. They are not typed in, but somehow select.
Change the FAE into a JOIN and it will be much faster.
Siegfried -
How to sort the new records when you input them in a Forms bloc?
Hi,
I have a multi-record data block, how can I do to sort the records in this block when you enter some new records? for instance, you have a table(emp), 3 coloumns(empid, empname, deptno). when you enter new records, how can you do to make records order by deptno? not in quiry status.
Thanks. Please help me!I think Steve has answered your question and I doubt that what Frank is suggesting is what you are actually trying to do.
However,
from the top of my head I don't know if you can set the order by clause on a datablock dynamically <<-Yes you can set it with set_block_property. You don't really want to put it in the where clause because if the user enters query criteria in database fields, they will get appended after the order by and the query will fail. -
Work Flow EVENT - SM58 Entries are not executing automatically
Hi Experts,
I have used the standard BOR2034 for creating PO after saving the contract.
I have developed an RFC enabled FM refering to the Standard FM SWW_WI_CREATE_VIA_EVENT.
Inside the custom FM I am calling the BAPI_PO_CREATE1 for creating PO.
After creating a contract using VA41 I am able to see in Event trace that my Event with corresponding custom FM is triggering.
and the two entries are created in SM58 - Transactional RFC one is my Custom FM name and another is SWF_EVT_HANDLER_START_INTERNAL.
When I execute the LUW by selecting execution, PO is getting created. Where as this entries are not picking automatically.
I want to know, whether I have missed any step in process or do we need to schedule any job for automatically clearing the SM58 queue entries.
Please help me in resolving the issue.
Responses are highly appreciated..
Warm Regards...Hi Natasha,
As you say that you see the below entries in TRFC monitor, you need have a commit work after the below FMs are called(just one will do),
the two entries are created in SM58 - Transactional RFC one is my Custom FM name and another is SWF_EVT_HANDLER_START_INTERNAL.
How and from where are the above FMs called?
Regards,
Chen
Maybe you are looking for
-
Hard drive not recognized AFTER installing leopard
So I installed Leopard on my 12in Powerbook G4, having the usual problem of non-recognition of my hard drive (from a third party) but was able to install Leopard after fiddling with disk utility. Now the computer will not recognize the hard drive aft
-
Getting error while updating property of image through weblogic CMS
Hii I want to add alt text and alt title to an existing image through Weblogic Content Management System_ . For that I have used adAltText property of ad content type. For that I have refer the following link [ http://docs.oracle.com/cd/E13155_01/wlp
-
hi sap gurus, my issues is we are received free goods from the vendor, but this is the import material. we need to pay the customs duty for these free goods. pls explain the process for this regrads sap mm
-
The iTunes Library file cannot be saved error message
Most of the time, whenever I open iTunes I get this error message: "The iTunes Library file cannot be saved. An unknown error occured (-48)." However, nothing is ever missing from my library despite this message. Can someone tell me why this message
-
Hi All, I've tried everything I can think of... all I want is the section of my page that is below the navigation bar fragment to be split into two main columns, where the right column is 256px wide and the left column spans the remaining width of th