AQ dequeue ordering
Hi all,
I am new to AQ. I have a question regarding the dequeue ordering, hope someone can help.
Is it by default the dequeue procedure will dequeue a message from an AQ in the way of FIFO ordered by enq time?
Any other option do I have?
Thank you,
Keith
That is the default but it change be changed by at least<br>
a) setting the priority message_properties when you enqueue a message<br>
b) using a dequeue_condition when you dequeue a message<br><br>
Others may exist but these are the two that come to mind right now.
Similar Messages
-
DEQUEUING ORDER DIFFERS FROM ENQUEUING ORDER,URGENT ONE, PLS HELP
Hi ,
we are using ORACLE ADVANCED QUEUING for queue functionality.
our Oracle version is Oracle 8i release 8.1.5
Sometimes dequeuing order differs from enqueuing order. we are
enqueuing to the queue using default options only , i mean we
are not setting any prriority for messages .We are enqueuing 100
messages continuously to the queue.After completing enqueuing we
are dequeuing from the queue first in browse and then in remove
mode. We are using thin driver for database connectivity. If U
have any idea about this problem pls feel free to share with me .
Thanx in advance
Regards
Shilda Joseph
see the code snippet
enqueuing
aqMsg = qOracleQueue.createMessage();
aqRawPayload = aqMsg.getRawPayload();
byMsg = sMsgInfo.getBytes();
aqRawPayload.setStream(byMsg, byMsg.length);
AQEnqueueOption aqEnqueueOption = new AQEnqueueOption
qOracleQueue.enqueue(aqEnqueueOption, aqMsg);
dequeuing
aqDequeueOption.setWaitTime(1);
aqDequeueOption.setDequeueMode
(aqDequeueOption.DEQUEUE_BROWSE);
aqMsg = qOracleQueue.dequeue(aqDequeueOption);
//removing
AQDequeueOption aqDequeueOption1 = new AQDequeueOption
aqDequeueOption1.setDequeueMode
(aqDequeueOption.DEQUEUE_REMOVE);
AQMessage aqRemMsg = qOracleQueue.dequeue
(aqDequeueOption1);
see the enqueuing order and dequeuing order of hello 57, hello
58
2001/10/17 15:38:42:3 INFO [main] message enqueued - Helloo 1 to
HL7MESSAGEQUEUE
2001/10/17 15:38:42:124 INFO [main] message enqueued - Helloo 2
to HL7MESSAGEQUEUE
2001/10/17 15:38:42:234 INFO [main] message enqueued - Helloo 3
to HL7MESSAGEQUEUE
2001/10/17 15:38:42:334 INFO [main] message enqueued - Helloo 4
to HL7MESSAGEQUEUE
2001/10/17 15:38:42:434 INFO [main] message enqueued - Helloo 5
to HL7MESSAGEQUEUE
2001/10/17 15:38:42:544 INFO [main] message enqueued - Helloo 6
to HL7MESSAGEQUEUE
2001/10/17 15:38:42:644 INFO [main] message enqueued - Helloo 7
to HL7MESSAGEQUEUE
2001/10/17 15:38:42:755 INFO [main] message enqueued - Helloo 8
to HL7MESSAGEQUEUE
2001/10/17 15:38:42:865 INFO [main] message enqueued - Helloo 9
to HL7MESSAGEQUEUE
2001/10/17 15:38:42:965 INFO [main] message enqueued - Helloo 10
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:75 INFO [main] message enqueued - Helloo 11
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:175 INFO [main] message enqueued - Helloo 12
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:275 INFO [main] message enqueued - Helloo 13
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:375 INFO [main] message enqueued - Helloo 14
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:476 INFO [main] message enqueued - Helloo 15
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:576 INFO [main] message enqueued - Helloo 16
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:686 INFO [main] message enqueued - Helloo 17
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:786 INFO [main] message enqueued - Helloo 18
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:886 INFO [main] message enqueued - Helloo 19
to HL7MESSAGEQUEUE
2001/10/17 15:38:43:986 INFO [main] message enqueued - Helloo 20
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:86 INFO [main] message enqueued - Helloo 21
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:187 INFO [main] message enqueued - Helloo 22
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:287 INFO [main] message enqueued - Helloo 23
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:397 INFO [main] message enqueued - Helloo 24
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:497 INFO [main] message enqueued - Helloo 25
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:597 INFO [main] message enqueued - Helloo 26
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:697 INFO [main] message enqueued - Helloo 27
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:797 INFO [main] message enqueued - Helloo 28
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:898 INFO [main] message enqueued - Helloo 29
to HL7MESSAGEQUEUE
2001/10/17 15:38:44:988 INFO [main] message enqueued - Helloo 30
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:98 INFO [main] message enqueued - Helloo 31
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:188 INFO [main] message enqueued - Helloo 32
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:298 INFO [main] message enqueued - Helloo 33
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:388 INFO [main] message enqueued - Helloo 34
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:488 INFO [main] message enqueued - Helloo 35
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:598 INFO [main] message enqueued - Helloo 36
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:689 INFO [main] message enqueued - Helloo 37
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:799 INFO [main] message enqueued - Helloo 38
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:899 INFO [main] message enqueued - Helloo 39
to HL7MESSAGEQUEUE
2001/10/17 15:38:45:989 INFO [main] message enqueued - Helloo 40
to HL7MESSAGEQUEUE
2001/10/17 15:38:46:99 INFO [main] message enqueued - Helloo 41
to HL7MESSAGEQUEUE
2001/10/17 15:38:46:189 INFO [main] message enqueued - Helloo 42
to HL7MESSAGEQUEUE
2001/10/17 15:38:46:299 INFO [main] message enqueued - Helloo 43
to HL7MESSAGEQUEUE
2001/10/17 15:38:46:390 INFO [main] message enqueued - Helloo 44
to HL7MESSAGEQUEUE
2001/10/17 15:38:46:500 INFO [main] message enqueued - Helloo 45
to HL7MESSAGEQUEUE
2001/10/17 15:38:46:600 INFO [main] message enqueued - Helloo 46
to HL7MESSAGEQUEUE
2001/10/17 15:38:46:700 INFO [main] message enqueued - Helloo 47
to HL7MESSAGEQUEUE
2001/10/17 15:38:46:790 INFO [main] message enqueued - Helloo 48
to HL7MESSAGEQUEUE
2001/10/17 15:38:46:900 INFO [main] message enqueued - Helloo 49
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:0 INFO [main] message enqueued - Helloo 50
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:111 INFO [main] message enqueued - Helloo 51
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:201 INFO [main] message enqueued - Helloo 52
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:301 INFO [main] message enqueued - Helloo 53
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:411 INFO [main] message enqueued - Helloo 54
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:501 INFO [main] message enqueued - Helloo 55
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:631 INFO [main] message enqueued - Helloo 56
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:731 INFO [main] message enqueued - Helloo 57
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:822 INFO [main] message enqueued - Helloo 58
to HL7MESSAGEQUEUE
2001/10/17 15:38:47:932 INFO [main] message enqueued - Helloo 59
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:22 INFO [main] message enqueued - Helloo 60
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:132 INFO [main] message enqueued - Helloo 61
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:222 INFO [main] message enqueued - Helloo 62
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:332 INFO [main] message enqueued - Helloo 63
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:432 INFO [main] message enqueued - Helloo 64
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:533 INFO [main] message enqueued - Helloo 65
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:623 INFO [main] message enqueued - Helloo 66
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:733 INFO [main] message enqueued - Helloo 67
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:823 INFO [main] message enqueued - Helloo 68
to HL7MESSAGEQUEUE
2001/10/17 15:38:48:933 INFO [main] message enqueued - Helloo 69
to HL7MESSAGEQUEUE
2001/10/17 15:38:49:23 INFO [main] message enqueued - Helloo 70
to HL7MESSAGEQUEUE
2001/10/17 15:38:49:123 INFO [main] message enqueued - Helloo 71
to HL7MESSAGEQUEUE
2001/10/17 15:38:49:214 INFO [main] message enqueued - Helloo 72
to HL7MESSAGEQUEUE
2001/10/17 15:38:49:324 INFO [main] message enqueued - Helloo 73
to HL7MESSAGEQUEUE
2001/10/17 15:38:49:684 INFO [main] message enqueued - Helloo 74
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:5 INFO [main] message enqueued - Helloo 75
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:105 INFO [main] message enqueued - Helloo 76
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:215 INFO [main] message enqueued - Helloo 77
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:305 INFO [main] message enqueued - Helloo 78
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:405 INFO [main] message enqueued - Helloo 79
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:505 INFO [main] message enqueued - Helloo 80
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:605 INFO [main] message enqueued - Helloo 81
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:696 INFO [main] message enqueued - Helloo 82
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:796 INFO [main] message enqueued - Helloo 83
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:886 INFO [main] message enqueued - Helloo 84
to HL7MESSAGEQUEUE
2001/10/17 15:38:50:996 INFO [main] message enqueued - Helloo 85
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:96 INFO [main] message enqueued - Helloo 86
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:186 INFO [main] message enqueued - Helloo 87
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:286 INFO [main] message enqueued - Helloo 88
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:387 INFO [main] message enqueued - Helloo 89
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:487 INFO [main] message enqueued - Helloo 90
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:587 INFO [main] message enqueued - Helloo 91
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:687 INFO [main] message enqueued - Helloo 92
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:797 INFO [main] message enqueued - Helloo 93
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:887 INFO [main] message enqueued - Helloo 94
to HL7MESSAGEQUEUE
2001/10/17 15:38:51:987 INFO [main] message enqueued - Helloo 95
to HL7MESSAGEQUEUE
2001/10/17 15:38:52:88 INFO [main] message enqueued - Helloo 96
to HL7MESSAGEQUEUE
2001/10/17 15:38:52:188 INFO [main] message enqueued - Helloo 97
to HL7MESSAGEQUEUE
2001/10/17 15:38:52:278 INFO [main] message enqueued - Helloo 98
to HL7MESSAGEQUEUE
2001/10/17 15:38:52:378 INFO [main] message enqueued - Helloo 99
to HL7MESSAGEQUEUE
2001/10/17 15:38:52:478 INFO [main] message enqueued - Helloo
100 to HL7MESSAGEQUEUE
2001/10/17 15:54:51:259 INFO [main] DS::run: Dequeue BROWSE -
Helloo 1
2001/10/17 15:54:51:319 INFO [main] DS::run: Dequeue
REMOVEHelloo 1
2001/10/17 15:54:51:619 INFO [main] DS::run: Dequeue BROWSE -
Helloo 2
2001/10/17 15:54:51:649 INFO [main] DS::run: Dequeue
REMOVEHelloo 2
2001/10/17 15:54:51:929 INFO [main] DS::run: Dequeue BROWSE -
Helloo 3
2001/10/17 15:54:51:960 INFO [main] DS::run: Dequeue
REMOVEHelloo 3
2001/10/17 15:54:52:290 INFO [main] DS::run: Dequeue BROWSE -
Helloo 4
2001/10/17 15:54:52:360 INFO [main] DS::run: Dequeue
REMOVEHelloo 4
2001/10/17 15:54:52:640 INFO [main] DS::run: Dequeue BROWSE -
Helloo 5
2001/10/17 15:54:52:671 INFO [main] DS::run: Dequeue
REMOVEHelloo 5
2001/10/17 15:54:52:951 INFO [main] DS::run: Dequeue BROWSE -
Helloo 6
2001/10/17 15:54:52:971 INFO [main] DS::run: Dequeue
REMOVEHelloo 6
2001/10/17 15:54:53:301 INFO [main] DS::run: Dequeue BROWSE -
Helloo 7
2001/10/17 15:54:53:321 INFO [main] DS::run: Dequeue
REMOVEHelloo 7
2001/10/17 15:54:53:672 INFO [main] DS::run: Dequeue BROWSE -
Helloo 8
2001/10/17 15:54:53:692 INFO [main] DS::run: Dequeue
REMOVEHelloo 8
2001/10/17 15:54:56:926 INFO [main] DS::run: Dequeue BROWSE -
Helloo 9
2001/10/17 15:54:56:946 INFO [main] DS::run: Dequeue
REMOVEHelloo 9
2001/10/17 15:54:57:257 INFO [main] DS::run: Dequeue BROWSE -
Helloo 10
2001/10/17 15:54:57:277 INFO [main] DS::run: Dequeue
REMOVEHelloo 10
2001/10/17 15:54:57:557 INFO [main] DS::run: Dequeue BROWSE -
Helloo 11
2001/10/17 15:54:57:627 INFO [main] DS::run: Dequeue
REMOVEHelloo 11
2001/10/17 15:54:57:918 INFO [main] DS::run: Dequeue BROWSE -
Helloo 12
2001/10/17 15:54:57:938 INFO [main] DS::run: Dequeue
REMOVEHelloo 12
2001/10/17 15:54:58:268 INFO [main] DS::run: Dequeue BROWSE -
Helloo 13
2001/10/17 15:54:58:278 INFO [main] DS::run: Dequeue
REMOVEHelloo 13
2001/10/17 15:54:58:569 INFO [main] DS::run: Dequeue BROWSE -
Helloo 14
2001/10/17 15:54:58:589 INFO [main] DS::run: Dequeue
REMOVEHelloo 14
2001/10/17 15:54:58:869 INFO [main] DS::run: Dequeue BROWSE -
Helloo 15
2001/10/17 15:54:58:959 INFO [main] DS::run: Dequeue
REMOVEHelloo 15
2001/10/17 15:54:59:260 INFO [main] DS::run: Dequeue BROWSE -
Helloo 16
2001/10/17 15:54:59:280 INFO [main] DS::run: Dequeue
REMOVEHelloo 16
2001/10/17 15:54:59:600 INFO [main] DS::run: Dequeue BROWSE -
Helloo 17
2001/10/17 15:54:59:620 INFO [main] DS::run: Dequeue
REMOVEHelloo 17
2001/10/17 15:54:59:911 INFO [main] DS::run: Dequeue BROWSE -
Helloo 18
2001/10/17 15:54:59:931 INFO [main] DS::run: Dequeue
REMOVEHelloo 18
2001/10/17 15:55:0:251 INFO [main] DS::run: Dequeue BROWSE -
Helloo 19
2001/10/17 15:55:0:321 INFO [main] DS::run: Dequeue REMOVEHelloo
19
2001/10/17 15:55:0:602 INFO [main] DS::run: Dequeue BROWSE -
Helloo 20
2001/10/17 15:55:0:622 INFO [main] DS::run: Dequeue REMOVEHelloo
20
2001/10/17 15:55:0:922 INFO [main] DS::run: Dequeue BROWSE -
Helloo 21
2001/10/17 15:55:0:932 INFO [main] DS::run: Dequeue REMOVEHelloo
21
2001/10/17 15:55:1:263 INFO [main] DS::run: Dequeue BROWSE -
Helloo 22
2001/10/17 15:55:1:283 INFO [main] DS::run: Dequeue REMOVEHelloo
22
2001/10/17 15:55:1:623 INFO [main] DS::run: Dequeue BROWSE -
Helloo 23
2001/10/17 15:55:1:633 INFO [main] DS::run: Dequeue REMOVEHelloo
23
2001/10/17 15:55:1:933 INFO [main] DS::run: Dequeue BROWSE -
Helloo 24
2001/10/17 15:55:1:953 INFO [main] DS::run: Dequeue REMOVEHelloo
24
2001/10/17 15:55:2:484 INFO [main] DS::run: Dequeue BROWSE -
Helloo 25
2001/10/17 15:55:2:504 INFO [main] DS::run: Dequeue REMOVEHelloo
25
2001/10/17 15:55:2:775 INFO [main] DS::run: Dequeue BROWSE -
Helloo 26
2001/10/17 15:55:2:855 INFO [main] DS::run: Dequeue REMOVEHelloo
26
2001/10/17 15:55:3:135 INFO [main] DS::run: Dequeue BROWSE -
Helloo 27
2001/10/17 15:55:3:155 INFO [main] DS::run: Dequeue REMOVEHelloo
27
2001/10/17 15:55:3:436 INFO [main] DS::run: Dequeue BROWSE -
Helloo 28
2001/10/17 15:55:3:456 INFO [main] DS::run: Dequeue REMOVEHelloo
28
2001/10/17 15:55:3:736 INFO [main] DS::run: Dequeue BROWSE -
Helloo 29
2001/10/17 15:55:3:756 INFO [main] DS::run: Dequeue REMOVEHelloo
29
2001/10/17 15:55:4:86 INFO [main] DS::run: Dequeue BROWSE -
Helloo 30
2001/10/17 15:55:4:106 INFO [main] DS::run: Dequeue REMOVEHelloo
30
2001/10/17 15:55:4:407 INFO [main] DS::run: Dequeue BROWSE -
Helloo 31
2001/10/17 15:55:4:427 INFO [main] DS::run: Dequeue REMOVEHelloo
31
2001/10/17 15:55:4:707 INFO [main] DS::run: Dequeue BROWSE -
Helloo 32
2001/10/17 15:55:4:727 INFO [main] DS::run: Dequeue REMOVEHelloo
32
2001/10/17 15:55:5:68 INFO [main] DS::run: Dequeue BROWSE -
Helloo 33
2001/10/17 15:55:5:88 INFO [main] DS::run: Dequeue REMOVEHelloo
33
2001/10/17 15:55:5:468 INFO [main] DS::run: Dequeue BROWSE -
Helloo 34
2001/10/17 15:55:5:488 INFO [main] DS::run: Dequeue REMOVEHelloo
34
2001/10/17 15:55:5:769 INFO [main] DS::run: Dequeue BROWSE -
Helloo 35
2001/10/17 15:55:5:789 INFO [main] DS::run: Dequeue REMOVEHelloo
35
2001/10/17 15:55:6:69 INFO [main] DS::run: Dequeue BROWSE -
Helloo 36
2001/10/17 15:55:6:149 INFO [main] DS::run: Dequeue REMOVEHelloo
36
2001/10/17 15:55:6:430 INFO [main] DS::run: Dequeue BROWSE -
Helloo 37
2001/10/17 15:55:6:450 INFO [main] DS::run: Dequeue REMOVEHelloo
37
2001/10/17 15:55:6:730 INFO [main] DS::run: Dequeue BROWSE -
Helloo 38
2001/10/17 15:55:6:750 INFO [main] DS::run: Dequeue REMOVEHelloo
38
2001/10/17 15:55:7:31 INFO [main] DS::run: Dequeue BROWSE -
Helloo 39
2001/10/17 15:55:7:51 INFO [main] DS::run: Dequeue REMOVEHelloo
39
2001/10/17 15:55:7:381 INFO [main] DS::run: Dequeue BROWSE -
Helloo 40
2001/10/17 15:55:7:401 INFO [main] DS::run: Dequeue REMOVEHelloo
40
2001/10/17 15:55:7:692 INFO [main] DS::run: Dequeue BROWSE -
Helloo 41
2001/10/17 15:55:7:702 INFO [main] DS::run: Dequeue REMOVEHelloo
41
2001/10/17 15:55:7:992 INFO [main] DS::run: Dequeue BROWSE -
Helloo 42
2001/10/17 15:55:8:12 INFO [main] DS::run: Dequeue REMOVEHelloo
42
2001/10/17 15:55:8:372 INFO [main] DS::run: Dequeue BROWSE -
Helloo 43
2001/10/17 15:55:8:392 INFO [main] DS::run: Dequeue REMOVEHelloo
43
2001/10/17 15:55:8:683 INFO [main] DS::run: Dequeue BROWSE -
Helloo 44
2001/10/17 15:55:8:703 INFO [main] DS::run: Dequeue REMOVEHelloo
44
2001/10/17 15:55:8:983 INFO [main] DS::run: Dequeue BROWSE -
Helloo 45
2001/10/17 15:55:9:3 INFO [main] DS::run: Dequeue REMOVEHelloo
45
2001/10/17 15:55:9:314 INFO [main] DS::run: Dequeue BROWSE -
Helloo 46
2001/10/17 15:55:9:394 INFO [main] DS::run: Dequeue REMOVEHelloo
46
2001/10/17 15:55:9:704 INFO [main] DS::run: Dequeue BROWSE -
Helloo 47
2001/10/17 15:55:9:724 INFO [main] DS::run: Dequeue REMOVEHelloo
47
2001/10/17 15:55:10:15 INFO [main] DS::run: Dequeue BROWSE -
Helloo 48
2001/10/17 15:55:10:35 INFO [main] DS::run: Dequeue REMOVEHelloo
48
2001/10/17 15:55:10:335 INFO [main] DS::run: Dequeue BROWSE -
Helloo 49
2001/10/17 15:55:10:355 INFO [main] DS::run: Dequeue
REMOVEHelloo 49
2001/10/17 15:55:10:696 INFO [main] DS::run: Dequeue BROWSE -
Helloo 50
2001/10/17 15:55:10:716 INFO [main] DS::run: Dequeue
REMOVEHelloo 50
2001/10/17 15:55:10:996 INFO [main] DS::run: Dequeue BROWSE -
Helloo 51
2001/10/17 15:55:11:16 INFO [main] DS::run: Dequeue REMOVEHelloo
51
2001/10/17 15:55:11:337 INFO [main] DS::run: Dequeue BROWSE -
Helloo 52
2001/10/17 15:55:11:357 INFO [main] DS::run: Dequeue
REMOVEHelloo 52
2001/10/17 15:55:11:687 INFO [main] DS::run: Dequeue BROWSE -
Helloo 53
2001/10/17 15:55:11:707 INFO [main] DS::run: Dequeue
REMOVEHelloo 53
2001/10/17 15:55:11:998 INFO [main] DS::run: Dequeue BROWSE -
Helloo 54
2001/10/17 15:55:12:18 INFO [main] DS::run: Dequeue REMOVEHelloo
54
2001/10/17 15:55:12:338 INFO [main] DS::run: Dequeue BROWSE -
Helloo 55
2001/10/17 15:55:12:348 INFO [main] DS::run: Dequeue
REMOVEHelloo 55
2001/10/17 15:55:12:709 INFO [main] DS::run: Dequeue BROWSE -
Helloo 56
2001/10/17 15:55:12:729 INFO [main] DS::run: Dequeue
REMOVEHelloo 56
2001/10/17 15:55:12:989 INFO [main] DS::run: Dequeue BROWSE -
Helloo 58
2001/10/17 15:55:13:9 INFO [main] DS::run: Dequeue REMOVEHelloo
58
2001/10/17 15:55:13:319 INFO [main] DS::run: Dequeue BROWSE -
Helloo 57
2001/10/17 15:55:13:339 INFO [main] DS::run: Dequeue
REMOVEHelloo 57
2001/10/17 15:55:13:670 INFO [main] DS::run: Dequeue BROWSE -
Helloo 59
2001/10/17 15:55:13:690 INFO [main] DS::run: Dequeue
REMOVEHelloo 59
2001/10/17 15:55:13:970 INFO [main] DS::run: Dequeue BROWSE -
Helloo 60
2001/10/17 15:55:13:990 INFO [main] DS::run: Dequeue
REMOVEHelloo 60
2001/10/17 15:55:14:291 INFO [main] DS::run: Dequeue BROWSE -
Helloo 61
2001/10/17 15:55:14:311 INFO [main] DS::run: Dequeue
REMOVEHelloo 61
2001/10/17 15:55:14:591 INFO [main] DS::run: Dequeue BROWSE -
Helloo 62
2001/10/17 15:55:14:671 INFO [main] DS::run: Dequeue
REMOVEHelloo 62
2001/10/17 15:55:15:603 INFO [main] DS::run: Dequeue BROWSE -
Helloo 63
2001/10/17 15:55:15:623 INFO [main] DS::run: Dequeue
REMOVEHelloo 63
2001/10/17 15:55:15:933 INFO [main] DS::run: Dequeue BROWSE -
Helloo 64
2001/10/17 15:55:15:953 INFO [main] DS::run: Dequeue
REMOVEHelloo 64
2001/10/17 15:55:16:274 INFO [main] DS::run: Dequeue BROWSE -
Helloo 65
2001/10/17 15:55:16:294 INFO [main] DS::run: Dequeue
REMOVEHelloo 65
2001/10/17 15:55:16:624 INFO [main] DS::run: Dequeue BROWSE -
Helloo 66
2001/10/17 15:55:16:644 INFO [main] DS::run: Dequeue
REMOVEHelloo 66
2001/10/17 15:55:16:934 INFO [main] DS::run: Dequeue BROWSE -
Helloo 67
2001/10/17 15:55:16:944 INFO [main] DS::run: Dequeue
REMOVEHelloo 67
2001/10/17 15:55:17:325 INFO [main] DS::run: Dequeue BROWSE -
Helloo 68
2001/10/17 15:55:17:345 INFO [main] DS::run: Dequeue
REMOVEHelloo 68
2001/10/17 15:55:17:665 INFO [main] DS::run: Dequeue BROWSE -
Helloo 69
2001/10/17 15:55:17:685 INFO [main] DS::run: Dequeue
REMOVEHelloo 69
2001/10/17 15:55:17:956 INFO [main] DS::run: Dequeue BROWSE -
Helloo 70
2001/10/17 15:55:17:976 INFO [main] DS::run: Dequeue
REMOVEHelloo 70
2001/10/17 15:55:18:326 INFO [main] DS::run: Dequeue BROWSE -
Helloo 71
2001/10/17 15:55:18:346 INFO [main] DS::run: Dequeue
REMOVEHelloo 71
2001/10/17 15:55:18:617 INFO [main] DS::run: Dequeue BROWSE -
Helloo 72
2001/10/17 15:55:18:687 INFO [main] DS::run: Dequeue
REMOVEHelloo 72
2001/10/17 15:55:19:17 INFO [main] DS::run: Dequeue BROWSE -
Helloo 73
2001/10/17 15:55:19:37 INFO [main] DS::run: Dequeue REMOVEHelloo
73
2001/10/17 15:55:19:338 INFO [main] DS::run: Dequeue BROWSE -
Helloo 74
2001/10/17 15:55:19:358 INFO [main] DS::run: Dequeue
REMOVEHelloo 74
2001/10/17 15:55:19:668 INFO [main] DS::run: Dequeue BROWSE -
Helloo 75
2001/10/17 15:55:19:688 INFO [main] DS::run: Dequeue
REMOVEHelloo 75
2001/10/17 15:55:20:19 INFO [main] DS::run: Dequeue BROWSE -
Helloo 76
2001/10/17 15:55:20:39 INFO [main] DS::run: Dequeue REMOVEHelloo
76
2001/10/17 15:55:20:359 INFO [main] DS::run: Dequeue BROWSE -
Helloo 77
2001/10/17 15:55:20:379 INFO [main] DS::run: Dequeue
REMOVEHelloo 77
2001/10/17 15:55:20:660 INFO [main] DS::run: Dequeue BROWSE -
Helloo 78
2001/10/17 15:55:20:680 INFO [main] DS::run: Dequeue
REMOVEHelloo 78
2001/10/17 15:55:21:20 INFO [main] DS::run: Dequeue BROWSE -
Helloo 79
2001/10/17 15:55:21:40 INFO [main] DS::run: Dequeue REMOVEHelloo
79
2001/10/17 15:55:21:361 INFO [main] DS::run: Dequeue BROWSE -
Helloo 80
2001/10/17 15:55:21:381 INFO [main] DS::run: Dequeue
REMOVEHelloo 80
2001/10/17 15:55:21:661 INFO [main] DS::run: Dequeue BROWSE -
Helloo 81
2001/10/17 15:55:21:681 INFO [main] DS::run: Dequeue
REMOVEHelloo 81
2001/10/17 15:55:22:72 INFO [main] DS::run: Dequeue BROWSE -
Helloo 82
2001/10/17 15:55:22:82 INFO [main] DS::run: Dequeue REMOVEHelloo
82
2001/10/17 15:55:22:382 INFO [main] DS::run: Dequeue BROWSE -
Helloo 83
2001/10/17 15:55:22:402 INFO [main] DS::run: Dequeue
REMOVEHelloo 83
2001/10/17 15:55:22:692 INFO [main] DS::run: Dequeue BROWSE -
Helloo 84
2001/10/17 15:55:22:713 INFO [main] DS::run: Dequeue
REMOVEHelloo 84
2001/10/17 15:55:23:53 INFO [main] DS::run: Dequeue BROWSE -
Helloo 85
2001/10/17 15:55:23:63 INFO [main] DS::run: Dequeue REMOVEHelloo
85
2001/10/17 15:55:23:403 INFO [main] DS::run: Dequeue BROWSE -
Helloo 86
2001/10/17 15:55:23:413 INFO [main] DS::run: Dequeue
REMOVEHelloo 86
2001/10/17 15:55:23:694 INFO [main] DS::run: Dequeue BROWSE -
Helloo 87
2001/10/17 15:55:23:714 INFO [main] DS::run: Dequeue
REMOVEHelloo 87
2001/10/17 15:55:24:886 INFO [main] DS::run: Dequeue BROWSE -
Helloo 88
2001/10/17 15:55:24:966 INFO [main] DS::run: Dequeue
REMOVEHelloo 88
2001/10/17 15:55:25:286 INFO [main] DS::run: Dequeue BROWSE -
Helloo 89
2001/10/17 15:55:25:296 INFO [main] DS::run: Dequeue
REMOVEHelloo 89
2001/10/17 15:55:25:637 INFO [main] DS::run: Dequeue BROWSE -
Helloo 90
2001/10/17 15:55:25:657 INFO [main] DS::run: Dequeue
REMOVEHelloo 90
2001/10/17 15:55:25:937 INFO [main] DS::run: Dequeue BROWSE -
Helloo 91
2001/10/17 15:55:25:957 INFO [main] DS::run: Dequeue
REMOVEHelloo 91
2001/10/17 15:55:26:338 INFO [main] DS::run: Dequeue BROWSE -
Helloo 92
2001/10/17 15:55:26:358 INFO [main] DS::run: Dequeue
REMOVEHelloo 92
2001/10/17 15:55:26:628 INFO [main] DS::run: Dequeue BROWSE -
Helloo 93
2001/10/17 15:55:26:648 INFO [main] DS::run: Dequeue
REMOVEHelloo 93
2001/10/17 15:55:26:928 INFO [main] DS::run: Dequeue BROWSE -
Helloo 94
2001/10/17 15:55:26:948 INFO [main] DS::run: Dequeue
REMOVEHelloo 94
2001/10/17 15:55:27:319 INFO [main] DS::run: Dequeue BROWSE -
Helloo 95
2001/10/17 15:55:27:339 INFO [main] DS::run: Dequeue
REMOVEHelloo 95
2001/10/17 15:55:27:609 INFO [main] DS::run: Dequeue BROWSE -
Helloo 96
2001/10/17 15:55:27:629 INFO [main] DS::run: Dequeue
REMOVEHelloo 96
2001/10/17 15:55:27:910 INFO [main] DS::run: Dequeue BROWSE -
Helloo 97
2001/10/17 15:55:27:930 INFO [main] DS::run: Dequeue
REMOVEHelloo 97
2001/10/17 15:55:28:280 INFO [main] DS::run: Dequeue BROWSE -
Helloo 98
2001/10/17 15:55:28:360 INFO [main] DS::run: Dequeue
REMOVEHelloo 98
2001/10/17 15:55:28:631 INFO [main] DS::run: Dequeue BROWSE -
Helloo 99
2001/10/17 15:55:28:651 INFO [main] DS::run: Dequeue
REMOVEHelloo 99
2001/10/17 15:55:28:941 INFO [main] DS::run: Dequeue BROWSE -
Helloo 100
2001/10/17 15:55:28:951 INFO [main] DS::run: Dequeue
REMOVEHelloo 100As other members adviced
Please check the following as a list
1) Check first fi the Material is in APO relevant
2) Check if it has active integration model in cfm5 (R/3)
3) Check if the material has no blocked queues in /n/sapapo/cq (APO)
If there are any blocked queues please clear them accordingly.
4) After that perform a reconciliation of the transactional data through.
/n/sapapo/ccr(APO). perform it only for that material and on planned orders.
If there are any errors it will usggest you to follow few steps.
5) then again go back and check the /n/sapapo/cq transaction.
6) Check if the material and its location has publication Types maintained in SPRO transaction.
7) Check if the change pointers of this Planned order exists in /n/sapapo/c5
This si change pointers transaction , soemtimes you can release ti from there also.
If you still have problem, give the resutls of the following for reference.
Let us know once you perform all these.
8) Incase you need to perform the consistency checks externally. -
What is the approach to handle multi messages waiting to be dequeued?
I am testing a case where there are more than one message in the queue and how does the listener plsql works in this scenario ?
Does this process handled in a FIFO basis or any method to process multiple messages one time?
(Eg: Multiple MDB's handling n number more of queues)
Or a DBMS_JOB to monitor the queue and process all in one call.?
What is the best approach you would take?To understand better the order in which multiple messages can be dequeued, read the DEQUEUE procedure listed at http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_aq.htm#ARPLS401
in particular starting in the Usage Notes with "The dequeue order is determined by the values specified at the time the queue table is created unless overridden by the msgid and correlation ID in dequeue_options."
When you mention "how does the listener plsql work", I am assuming you mean an enqueue triggers a PL/SQL callback to a procedure you have defined. I can't find the note/article on this right now, but when the first message comes in, the PL/SQL procedure is triggered. If while it is still running, another item is queued, Oracle will see that the PL/SQL procedure is still running and not trigger the procedure again. The callback procedure will need to dequeue all messages while it is running in order to pick up any new messages that may have been enqueued after it was started by Oracle but before it ended.
DBMS_JOB does not monitor the queue. Several internal Oracle procedures do. EMON (Event Montior) and QMON (Queue Monitor) do most of the heavy work.
Hope that helps. -
Dequeueing messages in enqueue order
Is it possible to determine the order in which messages were enqueued when two or more processes are running concurrently and enqueueing messages to the same queue? In the FAQ section of the AQ documentation it states that if two or more messages are enqueued at the same time the STEP_NO column of the queue table can be used to determine the enqueue order. But apparently this only works when the messages are enqueued in the same queue session.
In my situtation I'm using Oracle8i Enterprise Edition Release 8.1.6.0.0 and I have two or more processes, each with its own queue session, enqueueing and dequeueing messages to the same queue. I have to be sure that the messages are dequeued in exactly the same order that they were enqueued. How do I determine the order that two messages with the same enqueue time were enqueued when each message was enqueued a in different queue session?
Thanks for your help.Is it possible to determine the order in which messages were enqueued when two or more processes are running concurrently and enqueueing messages to the same queue? In the FAQ section of the AQ documentation it states that if two or more messages are enqueued at the same time the STEP_NO column of the queue table can be used to determine the enqueue order. But apparently this only works when the messages are enqueued in the same queue session.
In my situtation I'm using Oracle8i Enterprise Edition Release 8.1.6.0.0 and I have two or more processes, each with its own queue session, enqueueing and dequeueing messages to the same queue. I have to be sure that the messages are dequeued in exactly the same order that they were enqueued. How do I determine the order that two messages with the same enqueue time were enqueued when each message was enqueued a in different queue session?
Thanks for your help. -
Registered callback does not dequeue messages in order
PROCEDURE notifycb(
CONTEXT IN RAW,
reginfo IN SYS.aq$_reg_info,
descr IN SYS.aq$_descriptor,
payload IN RAW,
payloadl IN NUMBER )
AS
no_messages EXCEPTION;
PRAGMA exception_init( no_messages, -25228 );
dequeue_options dbms_aq.dequeue_options_t;
message_properties dbms_aq.message_properties_t;
msgid RAW( 16 );
message XMLTYPE;
BEGIN
dequeue_options.consumer_name := descr.consumer_name;
dequeue_options.msgid := descr.msg_id;
dbms_aq.dequeue(
descr.queue_name,
dequeue_options, message_properties,
message, msgid );
INSERT INTO xmltest
( create_ts, enqueue_time, xml )
VALUES
( systimestamp, message_properties.enqueue_time, message );
EXCEPTION
WHEN no_messages
THEN NULL;
END;
BEGIN
dbms_aq.REGISTER(
SYS.aq$_reg_info_list(
SYS.aq$_reg_info(
'Q_TEST:QUEUE_SUBSCRIBER',
dbms_aq.namespace_aq,
'plsql://QUEUE_OWNER.NOTIFYCB?PR=1',
HEXTORAW( 'FF' )
, 1 );
END;
DECLARE
v_enqueue_options dbms_aq.enqueue_options_t;
v_message_properties dbms_aq.message_properties_t;
v_message_handle RAW( 16 );
xml XMLTYPE;
BEGIN
FOR x IN 1 .. 10 LOOP
SELECT XMLELEMENT( "x", x ) INTO xml FROM dual;
dbms_aq.enqueue(
queue_name => 'QUEUE_OWNER.Q_TEST',
enqueue_options => v_enqueue_options,
message_properties => v_message_properties,
payload => xml,
msgid => v_message_handle );
END LOOP;
COMMIT;
END;
select * from xmltest
order by create_ts;
16-JUN-08 04.04.27.065311000 PM 06/16/2008 08:04:20 PM <x>4</x>
16-JUN-08 04.04.27.078027000 PM 06/16/2008 08:04:20 PM <x>3</x>
16-JUN-08 04.04.27.155730000 PM 06/16/2008 08:04:20 PM <x>5</x>
16-JUN-08 04.04.27.268137000 PM 06/16/2008 08:04:20 PM <x>6</x>
16-JUN-08 04.04.27.357706000 PM 06/16/2008 08:04:20 PM <x>7</x>
16-JUN-08 04.04.27.479633000 PM 06/16/2008 08:04:20 PM <x>8</x>
16-JUN-08 04.04.27.577086000 PM 06/16/2008 08:04:20 PM <x>9</x>
16-JUN-08 04.04.27.612511000 PM 06/16/2008 08:04:20 PM <x>10</x>
16-JUN-08 04.04.27.979631000 PM 06/16/2008 08:04:20 PM <x>2</x>
16-JUN-08 04.04.28.084615000 PM 06/16/2008 08:04:20 PM <x>1</x>The solution I found is to use a loop to dequeue messages in order, rather than by the supplied msgid, and to use DBMS_LOCK to prevent the callbacks from processing messages in parallel.
create or replace PROCEDURE notifycb(
context IN RAW,
reginfo IN SYS.aq$_reg_info,
descr IN SYS.aq$_descriptor,
payload IN RAW,
payloadl IN NUMBER )
AS
no_messages EXCEPTION;
PRAGMA exception_init( no_messages, -25228 );
dequeue_options dbms_aq.dequeue_options_t;
message_properties dbms_aq.message_properties_t;
msgid RAW( 16 );
message XMLTYPE;
lockhandle VARCHAR2(128) := NULL;
lockstatus NUMBER;
BEGIN
dequeue_options.consumer_name := descr.consumer_name;
dequeue_options.wait := dbms_aq.no_wait;
dbms_lock.allocate_unique( 'NOTIFYCB_LOCK', lockhandle );
lockstatus := dbms_lock.request( lockhandle, DBMS_LOCK.X_MODE, release_on_commit => TRUE );
IF lockstatus != 0 AND lockstatus != 4
THEN
RETURN;
END IF;
BEGIN
LOOP
dbms_aq.dequeue(
descr.queue_name,
dequeue_options, message_properties,
message, msgid );
INSERT INTO xmltest
( create_ts, enqueue_time, xml )
VALUES
( systimestamp, message_properties.enqueue_time, message );
END LOOP;
EXCEPTION
WHEN no_messages
THEN NULL;
END;
COMMIT;
END; -
Hi,
i have the following problem:
Two session are saying dequeue.
I want that the next message is delivered to the session, which has issued the dequeue first....
Out of the box there is no ordering for the dequeue, e.g.
0 queue is empty, both session issue dequeue.
1 message is enqueued
2 the first session dequeues message
3 queue is empty
4 first session says dequeue again
5 next message enqueued
6 first sessions get message again...
-> second session "never" gets a message....
Thanks for any help....Hi Jaissy,
thanks for your answer, but i want to use the queue in such way:
I just put tokens in two queues. There are some workers which should dequeue the tokens.
example:
3 tokens in queue1
1 token in queue2
worker1 dequeues queue1 and queue2
worker2 dequeues queue1 and waits with dequeue for queue2
worker3 dequeues queue1 and waits with dequeue for queue2
if a token is put into queue2, i want that worker2 get this token via dequeue and not worker3 -
Need to "dequeue" a purchase order
Hi All,
I am using two BAPIs in the same transaction : "BAPI_PO_CHANGE" & "BAPI_GOODSMVT_CREATE".
The problem is that when BAPI_PO_CHANGE is done processing, it does not release the PO, so the Goods Receipt cannot be posted by the second BAPI.
Basically, I need to somehow dequeue (unlock ??) the PO so that BAPI_GOODSMVT_CREATE can finish the job.
Thanks!!
Roman D.Still, either way, you are forcing a deque before the system releases those locks, which might mean inconsistencies. You should never try to release locks, unless it is absolutely necessary. Why is the alternative of waiting until the locks are released is not a good solution for you?
Another way around this is something like this.
do.
call bapi goods movement.
if not lock error.
exit.
endif.
enddo.
This way you will issue a artificial wait, but you will wait until all the locks are released. You will be in that do loop until the bapi goods movement call returns a success or non-lock error.
Or you can find out what lock object the system uses while changing the po. You can try to obtain a lock by calling the same lock object. If it fails, it means system still has the locks, else, you will dequeue the lock and proceed with your goods movement call.
Srinivas -
Creation of Sales orders through EDI
Hello,
We have a problem when creating sales orders through EDI.
We are getting IDOCs with a delay of 1 second.Before
creating sales orders through the posting function
module IDOC_INPUT_ORDERS, we need to validate for
reference Purchase order number in the IDOC. If there is
any sales order in the database with the Purchase order
number in the current IDOC that sales order should be
blocked.
We already put a validation in the User-Exit of the
posting function module. Because of the frequency of
IDOCs we receive, this validation is getting failed.
Can anybody tell me, how to process only 1 IDOC at any
given point of time before the Posting process.
Thanks,
Madhusudan.Hi Sanjeev,
Thank you very much for helping me out in this problem.Still I haven't got the solution.
I tested the above mentioned configuration option by putting the Check Purchase Order Number field to 'A' in the transaction VOV8. But while creating sales orders, it is giving only information message. Is there any other way, to restrict the Duplicate PO value through configuration setup.
can you also explain how to use Enqueue and Dequeue FMs in the inbound posting function module.
Regards,
Madhusudan.
Message was edited by: Madhusudan Budati
Message was edited by: Madhusudan Budati -
Hi. i used Function module to change Characteristic values of a sales order
hi. i used Function module to change Characteristic values of a sales order..
but sales order's Characteristic values didn't change.
And the Function module doesn't occur any log message.
please tell me wrong code, and how to solve this problem.
if i have wrong method, what data can i pass to change the characteristic values
DATA: LT_E1CUVAL TYPE TABLE OF E1CUVAL.
DATA: WA_E1CUVAL TYPE E1CUVAL.
DATA: LS_CFG_HEAD LIKE CUXT_CUCFG_S,
LS_INSTANCES LIKE CUXT_CUINS_S,
LS_VALUES LIKE CUXT_CUVAL_S,
LS_E1CUCFG LIKE E1CUCFG,
LS_E1CUINS LIKE E1CUINS,
LS_E1CUVAL LIKE E1CUVAL,
LS_PROFILE LIKE E1CUCOM,
LS_VBAP LIKE VBAP,
L_CUOBJ LIKE INOB-CUOBJ,
L_ATINN LIKE CABN-ATINN.
DATA: LT_INSTANCES LIKE CUXT_CUINS_S OCCURS 0,
LT_PART_OF LIKE CUXT_CUPRT_S OCCURS 0,
LT_VALUES LIKE CUXT_CUVAL_S OCCURS 0,
LT_VAR_KEYS LIKE CUXT_CUVK_S OCCURS 0,
LT_KSML LIKE KSML OCCURS 0 WITH HEADER LINE,
BEGIN OF LT_CLINT OCCURS 0,
CLINT LIKE KSSK-CLINT,
END OF LT_CLINT.
DATA: LT_CUIB LIKE CUIB_CUOBJ_S OCCURS 0 WITH HEADER LINE.
DATA: E_ROOT_INSTANCE TYPE CUXT_INSTANCE_NO.
DATA: EV_ROOT_PERSIST_ID TYPE IBEXTINST_DATA-EXT_INST_ID.
DATA: EV_CFG_HAS_CHANGED TYPE XFELD.
DATA: EV_HANDLE_APPL_LOG TYPE BALLOGHNDL.
DATA: L_CUOBJ_NEW TYPE CUOBJ.
DATA: L_OWNER TYPE IBXX_BUSINESS_OBJECT.
REFRESH LT_E1CUVAL.
CLEAR LS_VBAP.
SELECT SINGLE CUOBJ INTO CORRESPONDING FIELDS OF LS_VBAP
FROM VBAP WHERE VBELN = I_VBELN
AND POSNR = I_POSNR.
IF SY-SUBRC <> 0.
RAISE INSTANCE_NOT_FOUND.
ENDIF.
REFRESH LT_CUIB. CLEAR LT_CUIB.
LT_CUIB-INSTANCE = LS_VBAP-CUOBJ.
APPEND LT_CUIB.
CALL FUNCTION 'CUCB_INITIALIZER'
EXPORTING
IT_INSTANCES = LT_CUIB[].
CALL FUNCTION 'CUXI_GET_SINGLE_CONFIGURATION'
EXPORTING
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
IMPORTING
E_CFG_HEAD = LS_CFG_HEAD
ES_PROFILE = LS_PROFILE
ET_RETURN = ET_RETURN
TABLES
E_TAB_INSTANCES = LT_INSTANCES
E_TAB_PART_OF = LT_PART_OF
E_TAB_VALUES = LT_VALUES
E_TAB_VAR_KEYS = LT_VAR_KEYS
EXCEPTIONS
INVALID_INSTANCE = 1
NO_ROOT_INSTANCE = 2
INSTANCE_IS_A_CLASSIFICATION = 3
INTERNAL_ERROR = 4
NO_PROFILE_FOUND = 5
INVALID_DATA = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE INSTANCE_NOT_FOUND.
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ELSE.
LOOP AT LT_VALUES INTO LS_VALUES.
IF LS_VALUES-CHARC = 'SAP_MILLCA_PACKAGING'
OR LS_VALUES-CHARC = 'PD_CA_PACKING_DM'.
LS_VALUES-VALUE = '7100010'. "This is test data
MODIFY LT_VALUES FROM LS_VALUES.
ELSE.
DELETE LT_VALUES WHERE CHARC = LS_VALUES-CHARC.
ENDIF.
CLEAR LS_VALUES.
ENDLOOP.
ENDIF.
영업정보 특성 변경
CALL FUNCTION 'CUXI_SET_SINGLE_CONFIGURATION'
EXPORTING
I_CFG_HEADER = LS_CFG_HEAD
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
I_PLANT =
I_STRUCTURE_EXPLOSION_DATE =
I_STRUCTURE_EXPLOSION_APPL_ID =
I_LOGSYS =
IS_PROFILE = LS_PROFILE
IV_ONLY_SINGLE_LEVEL =
IV_HANDLE_APPL_LOG =
IV_OBJECT_APPL_LOG = 'CIF'
IV_SUBOBJECT_APPL_LOG = 'T_CNFG'
IMPORTING
E_ROOT_INSTANCE = E_ROOT_INSTANCE
EV_ROOT_PERSIST_ID = EV_ROOT_PERSIST_ID
EV_CFG_HAS_CHANGED = EV_CFG_HAS_CHANGED
EV_HANDLE_APPL_LOG = EV_HANDLE_APPL_LOG
ET_RETURN = ET_RETURN
TABLES
I_TAB_INSTANCES = LT_INSTANCES
I_TAB_PART_OF = LT_PART_OF
I_TAB_VALUES = LT_VALUES
I_TAB_VAR_KEYS = LT_VAR_KEYS
I_TAB_BLOB =
EXCEPTIONS
NO_CONFIGURATION_DATA = 1
NO_ROOT_INSTANCE = 2
INVALID_INSTANCE = 3
INSTANCE_IS_A_CLASSIFICATION = 4
INTERNAL_ERROR = 5
NO_PROFILE_FOUND = 6
INVALID_DATA = 7
OTHERS = 8
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE NO_CONFIGURATION_DATA.
WHEN 3.
RAISE NO_ROOT_INSTANCE.
WHEN 3.
RAISE INVALID_INSTANCE .
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN 3.
RAISE INTERNAL_ERROR.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ENDIF.
COMMIT WORK.
save configuration with next commit
CLEAR: LS_INSTANCES.
READ TABLE LT_INSTANCES INTO LS_INSTANCES INDEX 1.
L_OWNER-OBJECT_TYPE = LS_INSTANCES-OBJ_TYPE.
L_OWNER-OBJECT_TYPE = 'PVS_POSVAR'.
L_OWNER-OBJECT_KEY = LS_INSTANCES-OBJ_KEY.
CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB'
EXPORTING
ROOT_INSTANCE = LS_VBAP-CUOBJ
ROOT_OBJECT = L_OWNER
IMPORTING
NEW_INSTANCE = L_CUOBJ_NEW
EXCEPTIONS
INVALID_INSTANCE = 1
INVALID_ROOT_INSTANCE = 2
NO_CHANGES = 3
OTHERS = 4.
IF SY-SUBRC > 1 AND SY-SUBRC <> 3.
CLEAR LS_VBAP-CUOBJ.
RAISE INTERNAL_ERROR.
ELSEIF SY-SUBRC = 1.
LS_VBAP-CUOBJ = L_CUOBJ_NEW.
ENDIF.
What's wrong?
help me to solve this problem.
Thanks a lot.<b>SD_SALES_DOCUMENT_READ</b> Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties)
<b>SD_SALES_DOCUMENT_READ_POS</b> Reads sales document header and item material: tables VBAK, VBAP-MATNR
<b>SD_DOCUMENT_PARTNER_READ</b> partner information including address. Calls SD_PARTNER_READ
<b>SD_PARTNER_READ</b> all the partners information and addresses
<b>SD_DETERMINE_CONTRACT_TYPE</b>
In: at least VBAK-VBELN
Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT
<b>SD_SALES_DOCUMENT_COPY</b>
<b>RV_ORDER_FLOW_INFORMATION</b> Reads sales document flow of sales document after delivery and billing
SD_SALES_DOCUMENT_SAVE create Sales Doc from the copied document
SD_SALES_DOCUMENT_ENQUEUE to dequeue use DEQUEUE_EVVBAKE
RV_DELIVERY_PRINT_VIEW Data provision for delivery note printing
SD_PACKING_PRINT_VIEW
SD_DELIVERY_VIEW Data collection for printing
called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW
RV_BILLING_PRINT_VIEW Data Provision for Billing Document Print
regards
vinod -
Adding item positions with reference to contract in sales order
Hi all,
I would be very grateful if some of you could help on this:
I have a requirement to add lines with reference to a contract while the user is creating or modificating it via VA01 or VA02. The logic flow will be as follows:
if the user enters a new item position with reference to a contract, and the qty entered exceeds the qty in the position selected of the contract, we have to skip the standard error message and try to spli the quantities in several positions with the same material in the contract.
As an example:
the contract 000000000001 has 5 lines:
line material qty
01 mat1 100
02 mat1 50
03 mat1 50
04 mat2 n/a
05 mat2 n/a
if the user picks up the line 02 of the contract to create a new line in the sales order, and enters 180 as qty, the sap standard will raise an error, saying the qty has exceeded the contract qty. Ok, we have to skip that error (maybe could we set it as a warning??) and 'split' the qty as follows:
in the sales orders, 3 lines will be created automatically
line material qty
mat1 100
mat1 50
mat1 30
and of course, the released quantities in the contract must be updated: i.e the contract should be as follows:
line material available qty
01 mat1 0
02 mat1 0
03 mat1 20
Any ideas? : )
What i've done by the moment is to check is that 'split' is possible, in userexit_save_document. If not (e.g. if the user enters 220 for mat1 in the previous example), a custom error will appear. If it is possible, then the sales order will be created (only with the line the uswer entered) and I will trigger somehow a FM processed in background to modify the sales order.
my question now is: how can i add lines to the created sales order, making reference to some contract lines?
I've seen BAPI BAPI_SALESORDER_CREATEFROMDAT2 is used to create a document with reference, but can i use it to MODIFY an existing sales order?
any help would be greatly appreciated.
thanks a lot for your help.
regards.Hello,
there's a function module called 'BAPI_SALESORDER_CHANGE', which could change a sales order. The problem could be,that these BAPI's enque the salesorder. So if you start them in background via an userexit, you have to be sure that the salesorder is updated and dequeued by posting.
An other way could be to use the exit 'userexit_check_vbap' in MV45AFZB. It's called after creating a new position or changing a position. All existing positions at that time in a internal table 'XVBAP', which you could change. (But be carefull, that you don't create an endless loop !).
The check about the contract quantity is in a form routine called 'vbep-wmeng_pruefen_folgebeleg(sapfv45e)'.
Have a look into the form 'vbap_pruefen_ende' in FV45PFAP_VBAP_PRUEFEN_ENDE. There's the whole thing done including the call of the userexit.
Regards Wolfgang -
Jump from Sales Order to Purchase Order and back again (all in change mode)
Hi,
Situation is this:
- Sales Order is created with 10 items. 4 items are created with connection to Purchase Order.
- User open Sales Order in change mode
- User goes to item 20 that has a related Purchase Order
- User wants to jump to related Purchase Order and make an update here
- User wants to be able to jump back to Sales Order Item 20 from Purchase Order
When user jumps to Purchase Order in change mode, then this Purchase Order will also block the same Sales Order, that was open. This can be handled with dequeue and enqueue.
Problem is that when Purchase Order is saved it will make an update to the Sales Order in the background. When user jumps back to Sales Order then this Sales Order is still open with old data and these data does not reflect data that can have been updated by the Purchase Order.
Also: When Purchase Order is making updates to the Sales Order then e.g. Message Out Table NAST is automatically updated (insert and delete records). If user then manually updates the Sales Order with old information, then System Dump appears as Sales Order tries to insert NAST records, that have already been inserted or delete NAST records that have already been deleted via the Purchase Order.
This means that when user jumps back from Purchase Order to Sales Order Item 20 then Sales Order needs to be refreshed with new data after Purchase Order has saved the Sales Order.
Are there any solution to do this in a standard way (from within SAPMV45A) ?
I prefer not to reopen Sales Order using syntax like CALL TRANSACTION.Hi,
Thanks for reply.
In third party PR gets created automatically but PO gets create manually.So changes get refelect in PR only not in PO.
Can you give me the solution for completing this task.
Thanks & Regards
Jalaj garg -
Issue in Updating Sales Order Document flow
Hi Experts,
We have developed a Z Program for posting Material document for the deliveries of Sales Order. This program runs in Batch job everyday.
Here we are getting an issue like in some of the cases it's not updating the Document flow of the Sales order though its Posting Material Document for the Delivery of Sales Order. If there will be a bulk amount of data then its creating issue in updating the Document flow ( Either the 1st set of record or last set of records).
We are using BAPI 'BAPI_GOODSMVT_CREATE' for posting Material Document for the delivery and FM 'RV_DOCUMENT_FLOW_UPDATE_U' for updating the document flow.
It seems it giving issue with bulk amount of data. Will it a time issue?
If any one have faced such issue, please throw some pointers.
Thanks in advance!
Regards,
Priyabrata.It could be a timing issue. After you create the material document, try to enque the material document and move to the next step only if the enque is successful. Keep trying to enque the material document until u are successful. But make sure you exit the loop after certain number of tries to avoid endless loops. Here is a sample code:
DO 20TIMES.
CALL FUNCTION ;'ENQUEUE_EMMKPF'
EXPORTING
MODE_MKPF = co_e
MBLNR = xxxxx
MJAHR = xxxx
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc EQ 0.
dequeue/unlock the notification again
CALL FUNCTION DEQUEUE_EMMKPF
EXPORTING
MODE_MKPF= co_e
MBLNR = xxxxx
MJAHR = xxxx
EXIT.
ELSE.
in case of no success, wait 1 seconds, before try again
CALL FUNCTION 'RZL_SLEEP'
EXPORTING
seconds = 1
EXCEPTIONS
argument_error = 1
OTHERS = 2. "#EC *
ENDIF.
ENDDO.
Regards,
Jitendar -
Hi Sanjeev : Validating PO during the creation of Sales Orders
Hi Sanjeev,
Thank you very much for helping me out in this problem.Still I haven't got the solution.
I tested the above mentioned configuration option by putting the Check Purchase Order Number field to 'A' in the transaction VOV8. But while creating sales orders, it is giving only information message. Is there any other way, to restrict the Duplicate PO value through configuration setup.
can you also explain how to use Enqueue and Dequeue FMs in the inbound posting function module.
Regards,
Madhusudan.Hi
This is in customizing transaction SPRO -> SALES & DIST -> SALES -> SALES DOCUMENTS -> DEFINE VARIABLE MESSAGES.
I am pasting the help from customizing note
Define Variable Messages
Various checks are carried out during scheduling agreement processing with releases in the component supplier industry. Depending on the result of the check, the system can issue a warning or an error message. In this menu option, you can define which system response is to be linked to a particular message text.
Depending on the component supplier, you can specify whether certain system messages are to be sent as errors, as warning messages or not at all. By specifying a version, system responses can be specified by component supplier.
Example
When a forecast delivery schedule is created, the system compares the cumulative received quantities of the customer with the cumulative received quantities in the document flow at the time at which the delivery note was created. You can configure the system to issue an error message if these do not correspond.
Standard system
Two system responses can be configured in the standard system:
The message appears as a warning.
The message appears as an error.
In the standard system the messages are configured to appear as warnings.
Actions
1. Enter a message class and the message text and specify the system response.
2. If you want to use different versions for certain component suppliers, you copy a message and enter a version number together with the required system response. -
How to set the number of elements dequeued?
Hello All,
I am relatively new to LabView. I use LabView 8.2 to detect Joystick movement using a set voltage threshold. Totally, I have 6 channels of analog input. The sampling rate is 2 Kilo Hertz with continuous sampling mode (buffer size set to 10 Kilo Samples). I show a visual stimulus on a computer monitor. Within 3 seconds from stimulus onset, the subject has to press the joystick. So I use a while loop that runs until the subject moves the joystick in any direction as detected by crossing of voltage threshold. The while loop was intended to run for a max of 3 sec if joystick was not moved. My intention while using the vi (see below) was to continuously monitor the voltage signal by means of removing voltage data points from the queue by the labview function/vi - "dequeue element". When I dequeue from inside the loop, the dequeue function removes about 100 msec worth of voltage data points ( = 198-201 points; sampling rate -2Khz) from each of the six channels. This creates problem for me because a single dequeue operation takes 40 to 85 msec during which the loop cannot be stopped. This results in miscalculation of the actual time when the joystick was moved.
Is there a way to set how many data points the dequeue function removes? My goal is to remove about 1-2 msec worth of data points so that the loop can exit within under 5msec of the joystick movement.
I have attached the screen shots of the subvi's I am using.
Acquire Response.jpg - the while loop that has the subvi: Access Analog Data Queue
Access Analog Data Queue.jpg - front panel of the subvi that has the 'dequeue element' function.
Remove Element.jpg - a case of Access Analog Data Queue.vi showing the 'dequeue element' function
Sorry for the long message. Any help would be greatly appreciated.
Thanks
Mani
Attachments:
Remove Element2.jpg 135 KB
Acquire Response1.jpg 266 KB
Remove Element1.jpg 135 KBHello Lynn and tst,
Thanks for your suggestions. I have attached a screen shot of a vi that has the enqueue function. As Lynn pointed out, it was the enqueueing size that was reflected in the size of the dequeueing. I tried various ways to control the enqueue element size in order to control the dequeue element size. Many of my tricks failed. I had set the data acquisition to be continuous at 2kHz with 10Ks buffer size. You may want to look at the attached image of the subvi "Analog Acquisition" while I explain my attempts. The first thing that I noticed was the 'dt' value in the input node of the timed loop which had been set by somebody to 100. I thought that was part of the reason why my dequeue size was always worth 100msec data points. So I changed it to 1 msec. This definitely made a difference in the chunk size of the dequeued element. Now dequeueing removes only data points worth 1 - 5msec. I also noticed that my data reading timer loop(the while loop in "Analog Acquisition" picture) takes about 20 -25 msec instead of the set 1 msec.
Why does the loop take so long? I have set the 'number of samples per channel' to -1 so that DAQmx read.vi (see it in Analog Acquisition subvi block diagram) can grab whatever data is available currently and put that into the queue. Can this be a reason why the loop takes more than 20 msec? I also tried to set the number of samples per channel to 2. I reasoned that with the sampling rate of 2KHz, 1ms loop should be able to pull 2data points and enqueue them. But it gave me the much-often-seen error code ":Error -200279 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi:1->Timed structure(s): DAQ Loop". I tried various combinations of loop time and number of samples per channel. I get Error-200279 very often. Note that I have several state transitions and only in a couple of them during every cycle of state transitions, I remove elements and flush the data queue (one place where I remove elements is shown in my original message in the picture-'Acquire Response.jpg').
How do I set the data acquisition loop to enqueue elements for exactly 1 msec or n msec so that I can control my dequeue size?
Thanks a lot, I am getting really tired of fixing this problem. Please help.
Mani
Attachments:
Analog Acquisition.jpg 363 KB -
Message not deleting from Topic after successfully dequeue
Hi All,
Help please..
I need to design a process where message have to produce into a AQ JMS topic and later i have to consume the message from the same topic and publish to a Queue.
In order to move on this i have created a sample My_Topic1 and My_Queue1 with below syntax
Topic:-
EXEC dbms_aqadm.create_queue_table (queue_table=>'MY_Topic1', queue_payload_type=>'sys.aq$_jms_text_message', multiple_consumers=>true );
EXEC dbms_aqadm.create_queue(queue_name=>'MY_Topic1', queue_table=>'MY_Topic1');
EXEC dbms_aqadm.start_queue(queue_name=>'MY_Topic1');
Queue:-
EXEC dbms_aqadm.create_queue_table (queue_table=>'My_Queue1', queue_payload_type=>'sys.aq$_jms_text_message', multiple_consumers=>false);
EXEC dbms_aqadm.create_queue(queue_name=>'My_Queue1', queue_table=>'My_Queue1');
EXEC dbms_aqadm.start_queue(queue_name=>'My_Queue1');
Now i created Foreign server and create local and destination topic of queue.topics name and also created Data source of XAType.
Now my bpel process getting a message(which as one element of sting type) from a web service and i am producing the same message to Topic. Once the message published to topic in a separate composite my JMS Adaptor dequeue/Consume the message from the topic and subscribe it to queue.
The Above scenario working as expected but here what my observation on this
1)When i dequeue message from a topic using bpel process successfully i am able to subscribe the message to queue but the message still remain in the topic i think it suppose to get of the topic once successfully dequeued.
Even i check the subscriber topic table and one subscriber is listening to the topic.
2)If in case any error generated at the time of subscribing to the queue the message should rollback( because i am using XA Transaction) but i think it is not happening as i can see in my topic view aq$my_topic1 MGS_STATE changed to PROCESSED.
Can some one please let me know where i am going wrong.
Thanks in advance.
Regards,
Tarak.
Edited by: Tarak on Sep 9, 2012 8:47 PMThe behavior should be the process consume a message from the topic and will try to do its job. If this process fail, {code]
But in this message not there in topic even it is failed in soa process.....i am very much interested how this XA is working that the reason i am trying all this.What to do with a failed/expired message is usually configurable, but doesn't make sense to place it in the same topic again... If the messages are failing too quickly better to adjust the max_retries and retry_delay...I agress in real senario we will move to error queue. But in that case also some how we need to read the message from queue and publish to the end system.
I am just trying to understand the behavior and what i came to know is after all the retire fails message not going to topictable _E. But when i pass Expire time property or time to live then it is moving to error table.What do you mean? What server was restarted, the database or the soa server? Messages that still didn't reach the max retry number will still be retried...Wheni am bouncing my managed server soa_server1 i can see the invoke activity is trying to publish the message into queue... this is happens after server restart and suppose not to happen....
But thanks alot for the inputs...
Regards,
Tarak.
Maybe you are looking for
-
Problem printing from Win 7 PC to AE Base Station connected Network Printer
Hi, i have an AE 802.11g version 5.7 software with an IP4800 canon printer attached via USB. i can print perfecrtly to it from both my macs (G5 desktop and Intel laptop) running 10.5.8. recently i connected my girl's Vaio laptop running Windows 7 and
-
BPM: Loop condition not coming outside of the loop
Hi Experts, I am working on BPM. In the loop I am giving the condition as (ForSyncResponse./p1:MT_Test_JDBC_Req_response/row_response/Row/indicator u2260 9) If indication not equal to the 9(Integer) then it should come out of the loop otherwise loop
-
G4 quicksilver and tiger video choppy
I inherited a G4 quicksilver 867 mhz. I added ram to bing it up to 512mb. Also went from OS X 10.2.8 to Tiger (10.4.10). Heres my problem. Before I upgraded it I could pull video from a dv camera and edit it with imovie. Video was very smooth. Now af
-
PDFs cause crash (Finder, Mail, Safari)
TrueType fonts (.ttf) used in InDesign documents can create PDFs that cause Mac OS X applications to crash. It seems that Finder, Mail, Safari etc. can't render inline preview images and crash Outline the fonts in your InDesign documents and that "sh
-
Instant Portal on XP OS?
I install Instant Portal on XP os. every thing works firstly, bult now I receive th message <<<The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. >>> can be Instant Porta