Wait Event to be triggered with configurable no. of days

Hello,
I have a requirement in which a workflow gets triggered. After that it waits for an event to get triggered which it listens to.
Also there is certain no. of days which is configurable.
I want that when the event is received with the configurable no. of days then it should processing 1. If the event is not received with configurable no. of days then processing 2 should be done.
Could you let me know how do we achieve this functionality.
Thanks,
Imran

There are at least two ways.
1) Set a latest end deadline in process 1 and make the work item obsolete - use a container element to store information about whether the event appeared or not.
2) Set a requested start deadline in process 2 and process the two in a 1-out-of-2 parallel branch.
I would recommend option 2.

Similar Messages

  • Problems with a wait event

    Hello everyone,
    Thanks in advance for any help given, i am new to workflows.
    I modified a workflow and at some point i copied some of the logic that another workflow has, when it comes to the wait event i copied it exactly the same.
    When i trigger the event that should make the evet continue it is not working. Is there anything I should do for my wait event in the workflow to work? I copied it exactly as the other workflow ahs it, even the parameters are called the same in the workflow.
    Is there anytrhing that needs to be done for the wait events that i should know about?
    Thanks for the help

    Hello,
    I did use SWU_OBUF, thanks :).
    When an order is accepted or rejected the event should be triggered, as it happens with the other workflow (the one i copied the logic from for that part). It works like this: the workflow creates an order that is in sent status, i can go and change it to activated or to rejected, when this happens the event should listen to the save and should trigger the rest of the workflow.
    I have no idea why it is not working, as the flow is the same that is being used in another workflow, that also creates and order that goes into sent status.
    Thanks for all help,

  • Lot of sessions with wait event - jobq slave wait

    Hi All,
    My db version is 10.2.0.4.0
    I have scheduled jobs through dbms_scheduler with repeat_interval of 20 mins(this for refresh of mviews).
    Now the job is in running state for a long time. then i checked the sessions..
    I have five session with wait event - "jobq slave wait"
    I check job_queue_parameter - 10
    select count(1) from dba_jobs;
    COUNT(1)
    8
    Now the job is in running state for a long time...
    Can someone help me how to proceed...
    Thanks,
    Suresh S.

    Post Operating System (OS) name & version for DB server system.
    Post results of
    SELECT * from v$version
    does following SQL return any rows? If so, they point to problem area.
    SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess,
    id1, id2, lmode, request, type
    FROM V$LOCK
    WHERE (id1, id2, type) IN
    (SELECT id1, id2, type FROM V$LOCK WHERE request>0)
    ORDER BY id1, request
    /

  • Wait Event Step

    Greetings Friends...
    Im having this little trouble with this Step at my Workflow (WS9000000004).
    In my Workflow Template I got step "Wait Event" for BUS2105 (ZBUS2105) to Event "ZPROCESSED".
    At some BADI for ME41, I'm using FM SWE_CREATE_EVENT for BUS2105, Event "ZPROCESSED".
    (Using "BUS2105" as object, "ZPROCESSED" as Event and "EBELN" (quotation nº) as Object-Key)
    At Swel, when someone creates (saves) a new Quotation, it shows that this Event is triggered properly.
    (But doesnt have any receiver, but I think this is correct, as I'm not using this event to Start a Workflow)
    But all my flows from WS90000000004, (that is still processing) are stuck waiting, for event ZPROCESSED.
    Am I missing something?
    Att,
    José Junior
    PS: "ZPROCESSED" isnt the starting event from WS900000004. It is just a Step Event. The Starting event is "ZCREATE' who is working properly when a new Purchase Requisition is created. (Again, using SWE_CREATE_EVENT at some Exit in ME51N).

    What is the option that you have used to wait I mean
    Wait for event
    Wait for Local Event
    Wait for Condition etc.
    Wait for Event
    can you please let us know.
    If you have used wait for condition check whether the conditon is satisfied or not
    Yes... I mean. I am waiting the event to get the new Quotation Number Created.
    So I can check if the Quotation have itens of the particular Purchase Requisition.
    If yes, check the PR status, if all itens were "quotated", Status receives S. Then exits Loop.
    Or by "Condition Check" you mean another thing, like somekind of the Step configuration itself?
    If you are using wait for event trigger the event by using EVENT CREATOR step
    Nope.... This Event is getting (actually should have been) triggered by SWE_EVENT_CREATOR at
    BADI in ME41. This FM is working properly, as I can see him at SWEL. (ZPROCESSED for BUS2105
    after Request for Quotation is created.)

  • Need help to analysis "foreground and background wait events" on statspack report for oracle database 11.2.0.4 on AIX

    Hi: I'm analyzing this STATSPACK report: it is "volume test" on our UAT server, so most input is from 'bind variables'.  Our shared pool is well utilized in oracle.  Oracle redo logs is not appropriately configured on this server, as in 'Top 5 wait events' there are 2 for redos.
    I need to know what else information can be dig-out from 'foreground wait events' & 'background wait events', and what can assist us to better understanding, in combination of 'Top 5 wait event's, that how the server/test went?  it could be overwelming No. of wait events, so appreciate any helpful diagnostic or analysis.  Database is oracle 11.2.0.4 upgraded from 11.2.0.3, on IBM AIX power system 64bit, level 6.x
    STATSPACK report for
    Database    DB Id    Instance     Inst Num  Startup Time   Release     RAC
    ~~~~~~~~ ----------- ------------ -------- --------------- ----------- ---
    700000XXX   XXX              1 22-Apr-15 12:12 11.2.0.4.0  NO
    Host Name             Platform                CPUs Cores Sockets   Memory (G)
    ~~~~ ---------------- ---------------------- ----- ----- ------- ------------
         dXXXX_XXX    AIX-Based Systems (64-     2     1       0         16.0
    Snapshot       Snap Id     Snap Time      Sessions Curs/Sess Comment
    ~~~~~~~~    ---------- ------------------ -------- --------- ------------------
    Begin Snap:       5635 22-Apr-15 13:00:02      114       4.6
      End Snap:       5636 22-Apr-15 14:00:01      128       8.8
       Elapsed:      59.98 (mins) Av Act Sess:       0.6
       DB time:      35.98 (mins)      DB CPU:      19.43 (mins)
    Cache Sizes            Begin        End
    ~~~~~~~~~~~       ---------- ----------
        Buffer Cache:     2,064M              Std Block Size:         8K
         Shared Pool:     3,072M                  Log Buffer:    13,632K
    Load Profile              Per Second    Per Transaction    Per Exec    Per Call
    ~~~~~~~~~~~~      ------------------  ----------------- ----------- -----------
          DB time(s):                0.6                0.0        0.00        0.00
           DB CPU(s):                0.3                0.0        0.00        0.00
           Redo size:          458,720.6            8,755.7
       Logical reads:           12,874.2              245.7
       Block changes:            1,356.4               25.9
      Physical reads:                6.6                0.1
    Physical writes:               61.8                1.2
          User calls:            2,033.7               38.8
              Parses:              286.5                5.5
         Hard parses:                0.5                0.0
    W/A MB processed:                1.7                0.0
              Logons:                1.2                0.0
            Executes:              801.1               15.3
           Rollbacks:                6.1                0.1
        Transactions:               52.4
    Instance Efficiency Indicators
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Buffer Nowait %:  100.00       Redo NoWait %:  100.00
                Buffer  Hit   %:   99.98  Optimal W/A Exec %:  100.00
                Library Hit   %:   99.77        Soft Parse %:   99.82
             Execute to Parse %:   64.24         Latch Hit %:   99.98
    Parse CPU to Parse Elapsd %:   53.15     % Non-Parse CPU:   98.03
    Shared Pool Statistics        Begin   End
                 Memory Usage %:   10.50   12.79
        % SQL with executions>1:   69.98   78.37
      % Memory for SQL w/exec>1:   70.22   81.96
    Top 5 Timed Events                                                    Avg %Total
    ~~~~~~~~~~~~~~~~~~                                                   wait   Call
    Event                                            Waits    Time (s)   (ms)   Time
    CPU time                                                       847          50.2
    enq: TX - row lock contention                    4,480         434     97   25.8
    log file sync                                  284,169         185      1   11.0
    log file parallel write                        299,537         164      1    9.7
    log file sequential read                           698          16     24    1.0
    Host CPU  (CPUs: 2  Cores: 1  Sockets: 0)
    ~~~~~~~~              Load Average
                          Begin     End      User  System    Idle     WIO     WCPU
                           1.16    1.84     19.28   14.51   66.21    1.20   82.01
    Instance CPU
    ~~~~~~~~~~~~                                       % Time (seconds)
                         Host: Total time (s):                  7,193.8
                      Host: Busy CPU time (s):                  2,430.7
                       % of time Host is Busy:      33.8
                 Instance: Total CPU time (s):                  1,203.1
              % of Busy CPU used for Instance:      49.5
            Instance: Total Database time (s):                  2,426.4
      %DB time waiting for CPU (Resource Mgr):       0.0
    Memory Statistics                       Begin          End
    ~~~~~~~~~~~~~~~~~                ------------ ------------
                      Host Mem (MB):     16,384.0     16,384.0
                       SGA use (MB):      7,136.0      7,136.0
                       PGA use (MB):        282.5        361.4
        % Host Mem used for SGA+PGA:         45.3         45.8
    Foreground Wait Events  DB/Inst: XXXXXs  Snaps: 5635-5636
    -> Only events with Total Wait Time (s) >= .001 are shown
    -> ordered by Total Wait Time desc, Waits desc (idle events last)
                                                                 Avg          %Total
                                              %Tim Total Wait   wait    Waits   Call
    Event                               Waits  out   Time (s)   (ms)     /txn   Time
    enq: TX - row lock contentio        4,480    0        434     97      0.0   25.8
    log file sync                     284,167    0        185      1      1.5   11.0
    Disk file operations I/O            8,741    0          4      0      0.0     .2
    direct path write                  13,247    0          3      0      0.1     .2
    db file sequential read             6,058    0          1      0      0.0     .1
    buffer busy waits                   1,800    0          1      1      0.0     .1
    SQL*Net more data to client        29,161    0          1      0      0.2     .1
    direct path read                    7,696    0          1      0      0.0     .0
    db file scattered read                316    0          1      2      0.0     .0
    latch: shared pool                    144    0          0      2      0.0     .0
    CSS initialization                     30    0          0      3      0.0     .0
    cursor: pin S                          10    0          0      9      0.0     .0
    row cache lock                         41    0          0      2      0.0     .0
    latch: row cache objects               19    0          0      3      0.0     .0
    log file switch (private str            8    0          0      7      0.0     .0
    library cache: mutex X                 28    0          0      2      0.0     .0
    latch: cache buffers chains            54    0          0      1      0.0     .0
    latch free                            290    0          0      0      0.0     .0
    control file sequential read        1,568    0          0      0      0.0     .0
    log file switch (checkpoint             4    0          0      6      0.0     .0
    direct path sync                        8    0          0      3      0.0     .0
    latch: redo allocation                 60    0          0      0      0.0     .0
    SQL*Net break/reset to clien           34    0          0      1      0.0     .0
    latch: enqueue hash chains             45    0          0      0      0.0     .0
    latch: cache buffers lru cha            7    0          0      2      0.0     .0
    latch: session allocation               5    0          0      1      0.0     .0
    latch: object queue header o            6    0          0      1      0.0     .0
    ASM file metadata operation            30    0          0      0      0.0     .0
    latch: In memory undo latch            15    0          0      0      0.0     .0
    latch: undo global data                 8    0          0      0      0.0     .0
    SQL*Net message from client     6,362,536    0    278,225     44     33.7
    jobq slave wait                     7,270  100      3,635    500      0.0
    SQL*Net more data from clien        7,976    0         15      2      0.0
    SQL*Net message to client       6,362,544    0          8      0     33.7
    Background Wait Events  DB/Inst: XXXXXs  Snaps: 5635-5636
    -> Only events with Total Wait Time (s) >= .001 are shown
    -> ordered by Total Wait Time desc, Waits desc (idle events last)
                                                                 Avg          %Total
                                              %Tim Total Wait   wait    Waits   Call
    Event                               Waits  out   Time (s)   (ms)     /txn   Time
    log file parallel write           299,537    0        164      1      1.6    9.7
    log file sequential read              698    0         16     24      0.0    1.0
    db file parallel write              9,556    0         13      1      0.1     .8
    os thread startup                     146    0         10     70      0.0     .6
    control file parallel write         2,037    0          2      1      0.0     .1
    Log archive I/O                        35    0          1     30      0.0     .1
    LGWR wait for redo copy             2,447    0          0      0      0.0     .0
    db file async I/O submit            9,556    0          0      0      0.1     .0
    db file sequential read               145    0          0      2      0.0     .0
    Disk file operations I/O              349    0          0      0      0.0     .0
    db file scattered read                 30    0          0      4      0.0     .0
    control file sequential read        5,837    0          0      0      0.0     .0
    ADR block file read                    19    0          0      4      0.0     .0
    ADR block file write                    5    0          0     15      0.0     .0
    direct path write                      14    0          0      2      0.0     .0
    direct path read                        3    0          0      7      0.0     .0
    latch: shared pool                      3    0          0      6      0.0     .0
    log file single write                  56    0          0      0      0.0     .0
    latch: redo allocation                 53    0          0      0      0.0     .0
    latch: active service list              1    0          0      3      0.0     .0
    latch free                             11    0          0      0      0.0     .0
    rdbms ipc message                 314,523    5     57,189    182      1.7
    Space Manager: slave idle wa        4,086   88     18,996   4649      0.0
    DIAG idle wait                      7,185  100      7,186   1000      0.0
    Streams AQ: waiting for time            2   50      4,909 ######      0.0
    Streams AQ: qmn slave idle w          129    0      3,612  28002      0.0
    Streams AQ: qmn coordinator           258   50      3,612  14001      0.0
    smon timer                             43    2      3,605  83839      0.0
    pmon timer                          1,199   99      3,596   2999      0.0
    SQL*Net message from client        17,019    0         31      2      0.1
    SQL*Net message to client          12,762    0          0      0      0.1
    class slave wait                       28    0          0      0      0.0
    thank you very much!

    Hi: just know it now: it is a large amount of 'concurrent transaction' designed in this "Volume Test" - to simulate large incoming transaction volme, so I guess wait in eq:TX - row is expected.
    The fact: (1) redo logs at uat server is known to not well-tune for configurations (2) volume test slow 5%, however data amount in its test is kept the same by each time import  production data, by the team. So why it slowed 5% this year?
    The wait histogram is pasted below, any one interest to take a look?  any ideas?
    Wait Event Histogram  DB/Inst: XXXX/XXXX  Snaps: 5635-5636
    -> Total Waits - units: K is 1000, M is 1000000, G is 1000000000
    -> % of Waits - column heading: <=1s is truly <1024ms, >1s is truly >=1024ms
    -> % of Waits - value: .0 indicates value was <.05%, null is truly 0
    -> Ordered by Event (idle events last)
                               Total ----------------- % of Waits ------------------
    Event                      Waits  <1ms  <2ms  <4ms  <8ms <16ms <32ms  <=1s   >1s
    ADR block file read          19   26.3   5.3  10.5  57.9
    ADR block file write          5                     40.0        60.0
    ADR file lock                 6  100.0
    ARCH wait for archivelog l   14  100.0
    ASM file metadata operatio   30  100.0
    CSS initialization           30              100.0
    Disk file operations I/O   9090   97.2   1.4    .6    .4    .2    .1    .1
    LGWR wait for redo copy    2447   98.5    .5    .4    .2    .2    .2    .1
    Log archive I/O              35   40.0         8.6  25.7   2.9        22.9
    SQL*Net break/reset to cli   34   85.3   8.8         5.9
    SQL*Net more data to clien   29K  99.9    .0    .0    .0          .0    .0
    buffer busy waits          1800   96.8    .7    .7    .6    .3    .4    .5
    control file parallel writ 2037   90.7   5.0   2.1    .8   1.0    .3    .1
    control file sequential re 7405  100.0                      .0
    cursor: pin S                10   10.0                    90.0
    db file async I/O submit   9556   99.9    .0                .0          .0
    db file parallel read         1  100.0
    db file parallel write     9556   62.0  32.4   1.7    .8   1.5   1.3    .1
    db file scattered read      345   72.8   3.8   2.3  11.6   9.0    .6
    db file sequential read    6199   97.2    .2    .3   1.6    .7    .0    .0
    direct path read           7699   99.1    .4    .2    .1    .1    .0
    direct path sync              8   25.0  37.5  12.5  25.0
    direct path write            13K  97.8    .9    .5    .4    .3    .1    .0
    enq: TX - row lock content 4480     .4    .7   1.3   3.0   6.8  12.3  75.4    .1
    latch free                  301   98.3    .3    .7    .7
    latch: In memory undo latc   15   93.3   6.7
    latch: active service list    1              100.0
    latch: cache buffers chain   55   94.5                     3.6   1.8
    latch: cache buffers lru c    9   88.9                    11.1
    latch: call allocation        6  100.0
    latch: checkpoint queue la    3  100.0
    latch: enqueue hash chains   45   97.8                     2.2
    latch: messages               4  100.0
    latch: object queue header    7   85.7        14.3
    latch: redo allocation      113   97.3               1.8    .9
    latch: row cache objects     19   89.5                           5.3   5.3
    latch: session allocation     5   80.0              20.0
    latch: shared pool          147   90.5   1.4   2.7   1.4    .7   1.4   2.0
    latch: undo global data       8  100.0
    library cache: mutex X       28   89.3         3.6         3.6         3.6
    log file parallel write     299K  95.6   2.6   1.0    .4    .3    .2    .0
    log file sequential read    698   29.5    .1               4.6  46.8  18.9
    log file single write        56  100.0
    log file switch (checkpoin    4               25.0  50.0  25.0
    log file switch (private s    8         12.5        37.5  50.0
    log file sync               284K  93.3   3.7   1.4    .7    .5    .3    .1
    os thread startup           146                                      100.0
    row cache lock               41   85.4   9.8               2.4         2.4
    DIAG idle wait             7184                                      100.0
    SQL*Net message from clien 6379K  86.6   5.1   2.9   1.3    .7    .3   2.8    .3
    SQL*Net message to client  6375K 100.0    .0    .0    .0    .0    .0    .0
    Wait Event Histogram  DB/Inst: XXXX/xxxx  Snaps: 5635-5636
    -> Total Waits - units: K is 1000, M is 1000000, G is 1000000000
    -> % of Waits - column heading: <=1s is truly <1024ms, >1s is truly >=1024ms
    -> % of Waits - value: .0 indicates value was <.05%, null is truly 0
    -> Ordered by Event (idle events last)
                               Total ----------------- % of Waits ------------------
    Event                      Waits  <1ms  <2ms  <4ms  <8ms <16ms <32ms  <=1s   >1s
    SQL*Net more data from cli 7976   99.7    .1    .1    .0                      .1
    Space Manager: slave idle  4086     .1    .2    .0    .0    .3         3.2  96.1
    Streams AQ: qmn coordinato  258   49.2                .8                    50.0
    Streams AQ: qmn slave idle  129                                            100.0
    Streams AQ: waiting for ti    2   50.0                                      50.0
    class slave wait             28   92.9   3.6   3.6
    jobq slave wait            7270     .0                               100.0
    pmon timer                 1199                                            100.0
    rdbms ipc message           314K  10.3   7.3  39.7  15.4  10.6   5.3   8.2   3.3
    smon timer                   43                                            100.0

  • Workflow error in fork step, process control, wait event

    I am using fork step in workflow which has 2 parallel branches. In 1st branch i have a user decision step followed by a task for posting PO document in case of approval. In the 2nd branch of fork step I have a wait step to wait for an event followed by the same task for posting document with a process control step after that in the end to cancel the workitem(workitem generated by user decision step in the 1st branch of fork). I created the event by using a custom BOR object.
    After the fork step is triggered, i have both a wait event running and workitem generated. When i raise the wait event from SWUE by entering the event, object key etc it works fine i.e., the workitem in the other branch is set of logically deleted and workflow ends.
    But if the wait event is triggered from the program i.e., using FM SWW_WI_CREATE_VIA_EVENT, both get an error message in workflow log(SWIA). The message is: Error when executing the binding between work item 000000XXXXXX and flow item 000000XXXXXX where workitem number is the workitem id of the posting document task and flow item id is the workflow parent id

    hi,
    message is self explanatory.
    Activate the event trace SWELS, then do the event with SWUE and within your program (als please use SAP_WAPI function modules).
    Now compare the 2 events in SWEL to see what the differences are .
    Kind regards, Rob Dielemans

  • Wait Events "log file parallel write" / "log file sync" during CREATE INDEX

    Hello guys,
    at my current project i am performing some performance tests for oracle data guard. The question is "How does a LGWR SYNC transfer influences the system performance?"
    To get some performance values, that i can compare i just built up a normal oracle database in the first step.
    Now i am performing different tests like creating "large" indexes, massive parallel inserts/commits, etc. to get the bench mark.
    My database is an oracle 10.2.0.4 with multiplexed redo log files on AIX.
    I am creating an index on a "normal" table .. i execute "dbms_workload_repository.create_snapshot()" before and after the CREATE INDEX to get an equivalent timeframe for the AWR report.
    After the index is built up (round about 9 GB) i perform an awrrpt.sql to get the AWR report.
    And now take a look at these values from the AWR
                                                                       Avg
                                                 %Time  Total Wait    wait     Waits
    Event                                 Waits  -outs    Time (s)    (ms)      /txn
    log file parallel write              10,019     .0         132      13      33.5
    log file sync                           293     .7           4      15       1.0
    ......How can this be possible?
    Regarding to the documentation
    -> log file sync: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents003.htm#sthref3120
    Wait Time: The wait time includes the writing of the log buffer and the post.-> log file parallel write: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents003.htm#sthref3104
    Wait Time: Time it takes for the I/Os to complete. Even though redo records are written in parallel, the parallel write is not complete until the last I/O is on disk.This was also my understanding .. the "log file sync" wait time should be higher than the "log file parallel write" wait time, because of it includes the I/O and the response time to the user session.
    I could accept it, if the values are close to each other (maybe round about 1 second in total) .. but the different between 132 seconds and 4 seconds is too noticeable.
    Is the behavior of the log file sync/write different when performing a DDL like CREATE INDEX (maybe async .. like you can influence it with the initialization parameter COMMIT_WRITE??)?
    Do you have any idea how these values come about?
    Any thoughts/ideas are welcome.
    Thanks and Regards

    Surachart Opun (HunterX) wrote:
    Thank you for Nice Idea.
    In this case, How can we reduce "log file parallel write" and "log file sync" waited time?
    CREATE INDEX with NOLOGGINGA NOLOGGING can help, can't it?Yes - if you create index nologging then you wouldn't be generating that 10GB of redo log, so the waits would disappear.
    Two points on nologging, though:
    <ul>
    it's "only" an index, so you could always rebuild it in the event of media corruption, but if you had lots of indexes created nologging this might cause an unreasonable delay before the system was usable again - so you should decide on a fallback option, such as taking a new backup of the tablespace as soon as all the nologging operatons had completed.
    If the database, or that tablespace, is in +"force logging"+ mode, the nologging will not work.
    </ul>
    Don't get too alarmed by the waits, though. My guess is that the +"log file sync"+ waits are mostly from other sessions, and since there aren't many of them the other sessions are probably not seeing a performance issue. The +"log file parallel write"+ waits are caused by your create index, but they are happeninng to lgwr in the background which is running concurrently with your session - so your session is not (directly) affected by them, so may not be seeing a performance issue.
    The other sessions are seeing relatively high sync times because their log file syncs have to wait for one of the large writes that you have triggered to complete, and then the logwriter includes their (little) writes with your next (large) write.
    There may be a performance impact, though, from the pure volume of I/O. Apart from the I/O to write the index you have LGWR writting (N copies) of the redo for the index and ARCH is reading and writing the completed log files caused by the index build. So the 9GB of index could easily be responsible for vastly more I/O than the initial 9GB.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Redo log wait event

    Hi,
    in my top evens i've:
    Top 5 Timed Events Avg %Total
    ~~~~~~~~~~~~~~~~~~ wait Call
    Event Waits Time (s) (ms) Time Wait Class
    CPU time 1,894 36.1
    log file sync 36,862 1,008 27 19.2 Commit
    db file scattered read 165,508 970 6 18.5 User I/O
    db file sequential read 196,596 857 4 16.3 User I/O
    log file parallel write 35,847 565 16 10.8 System I/O
    Log file are on a separate disks, with no activity, only 1 redo per group, and 4 groups.
    I think that 27ms for log file synch is high.
    I raised commits in sqlloader putting rows=100000 instead 30000 but it's always high.
    Which check i can perform?
    I'm on AIX 5.3 and database in 10.2.0.4.4

    Log File Sync
    The “log file sync” wait event is triggered when a user session issues a commit (or a rollback). The user session will signal or post the LGWR to write the log buffer to the redo log file. When the LGWR has finished writing, it will post the user session. The wait is entirely dependent on LGWR to write out the necessary redo blocks and send confirmation of its completion back to the user session. The wait time includes the writing of the log buffer and the post, and is sometimes called “commit latency”.
    The P1 parameter in <View:V$SESSION_WAIT> is defined as follows for this wait event:
    P1 = buffer#
    All changes up to this buffer number (in the log buffer) must be flushed to disk and the writes confirmed to ensure that the transaction is committed and will be kept on an instance crash. The wait is for LGWR to flush up to this buffer#.
    Reducing Waits / Wait times:
    If a SQL statement is encountering a significant amount of total time for this event, the average wait time should be examined. If the average wait time is low, but the number of waits is high, then the application might be committing after every row, rather than batching COMMITs. Applications can reduce this wait by committing after “n” rows so there are fewer distinct COMMIT operations. Each commit has to be confirmed to make sure the relevant REDO is on disk. Although commits can be "piggybacked" by Oracle, reducing the overall number of commits by batching transactions can be very beneficial.
    If the SQL statement is a SELECT statement, review the Oracle Auditing settings. If Auditing is enabled for SELECT statements, Oracle could be spending time writing and commit data to the AUDIT$ table.
    If the average time waited is high, then examine the other log related waits for the session, to see where the session is spending most of its time. If a session continues to wait on the same
    If the average time waited is high, then examine the other log related waits for the session, to see where the session is spending most of its time. If a session continues to wait on the same buffer# then the SEQ# column of V$SESSION_WAIT should increment every second. If not then the local session has a problem with wait event timeouts. If the SEQ# column is incrementing then the blocking process is the LGWR process. Check to see what LGWR is waiting on as it may be stuck. If the waits are because of slow I/O, then try the following:
    Reduce other I/O activity on the disks containing the redo logs, or use dedicated disks.
    Try to reduce resource contention. Check the number of transactions (commits + rollbacks) each second, from V$SYSSTAT.
    Alternate redo logs on different disks to minimize the effect of the archiver on the log writer.
    Move the redo logs to faster disks or a faster I/O subsystem (for example, switch from RAID 5 to RAID 1).
    Consider using raw devices (or simulated raw devices provided by disk vendors) to speed up the writes.
    See if any activity can safely be done with NOLOGGING / UNRECOVERABLE options in order to reduce the amount of redo being written.
    See if any of the processing can use the COMMIT NOWAIT option (be sure to understand the semantics of this before using it).
    Check the size of the log buffer as it may be so large that LGWR is writing too many blocks at one time. 

  • RMAN wait event

    11.2.0.2.0, ASM, 2 node RAC, non-Exadata (youll see why I mention this)
    getting really poor performance with RMAN backing up the FRA on ASM to an external NFS mount, 10gb fibre channels to the NFS. About 600gb in about 11 hours.
    Checking the performance of the job while its running I see all 4 configured channels are experiencing really long waits on an event "ksv master wait", and as you go off to google and support that youll find this event is linked to a bug on 11.2.0.2.0 accessing ASM. Theres a note on it
    High 'ksv master wait' And 'ASM File Metadata Operation' Waits In Non-Exadata 11g [ID 1308282.1]
    But the patch mentioned in that note is applied to my grid and rdbms homes and cell_offload_processing access is set to false.
    Its possible that the length of time is just how long it takes, but if it was IO causing it I would expect to see an RMAN IO wait event. Has anyone seen that ksv wait event before and can say its ok?

    While Im getting the wait event during the RMAN backup Im more inclined to think after reading up on it that its only incidental that it did come up during RMAN and its a larger issue. I'll close the thread here shortly and open the call in there if nothing comes from here.
    oops, already done! :)
    Edited by: 961469 on Feb 28, 2013 6:54 AM

  • Trouble configurin​g triggers with synchroniz​ed AWG and Digitizer

    Hi,
    I have been working for a few weeks in my project now, and I have a problem concerning the use of triggering options :
    I am using a 5412 AWG and a 5142 Digitizer, in a PXI chassis. I have synchronized them using the Ni-TClk blocks provided in Labview. Now, let me explain what I am trying to do.
    I need to make sure that the data I will record with the digitizer will be exactly aligned with the start of the sequence I am generating with the AWG. This acquisition is triggered either by the user (let's say a clic on a button) or by an external analog trigger.
    I am trying to do that using 2 different kind of triggers : Arm reference trigger and reference trigger.
    I am exporting a signal (Marker Event) from the 5412, on the RTSI0 line. This event happens each time the AWG starts to generate a sequence I have defined. I would like the digitizer to trigger off of this event, but only when a event occured first (the user trigger or the external analog trigger). My idea was to generate an Arm Reference Trigger with the "niScope send software trigger Edge", and to "plug" the reference (stop) Trigger on the RTSI0 line.
    According to the SMC based digitizers acquisition engine state diagram, the digitizer should start in the idle mode when I initiate the acquisition (with Ni-TCLK Initiate), then it should wait for a start trigger (defined as IMMEDIATE) then it should wait for an ARM reference trigger (the one I want to send by software, or later by an external source). Finally it waits for the reference (stop) trigger which would be the marker event on the RTSI0 line.
    According to what I see in my VI, the digitizer seems not to wait for the ARM reference trigger, I guess it directly sees the reference trigger on the RTSI0 line (which happens quite often) without waiting for me to allow it to look for it.
    Do you see a mistake in my thinking here? Is it possible to do what I propose? I was thinking that the fact that I use the TClk synchronization might be a source of my problem with the triggers...
    If it is not possible to do what I propose, I was also thinking to do what I need another way : Is it possible to somehow combine the 2 events I want to trigger off of? I mean, is it possible to create my own signal which would be high when the external trigger and the marker event are both High, and Low otherwise? And then, route this signal in one of the RTSI lines, which would be the source of a digital triggering...
    I hope you will understand what I'm trying to do, and that you will be able to help me.
    Thank you very much in advance,
    Best regards
    Antoine Benard

    Hi Antoine,
    I have been reading you post for a while and I have concluded
    that it will help me a lot if I can have the code; if you were so kind to attach
    it to the discussion forum, I will be more than glad to try on my test machine.
    “I
    need to make sure that the data I will record with the digitizer will be
    exactly aligned with the start of the sequence I am generating with the AWG.”  In this case, and I will
    like to make sure I’m getting this correctly the 5412 is going to trigger the
    5142 and either a user control or an external trigger is going to trigger the
    5412. In this case the user control or the external trigger is going to start
    or stop de generation on the fgen and the fgen will control the scope.  So what we really need to do is figure a way of  using multiple triggers  with the  5412.
    I
    was also thinking to do what I need another way: Is it possible to somehow
    combine the 2 events I want to trigger off of? You can handle this with
    another card. Using card with change detection, you can the FGEN trigger from
    multiple sources.
    I will wait for you answer to make sure I got everything correctly
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters

  • Top-of-page event is not triggered

    Hi,
    I have a problem with top-of-page event. I have a report that shows the results in ALV grid display. But I use "REUSE_ALV_GRID_DISPLAY" not OO alv and there is only one screen with number 1000. On the menu toolbar there is a button that prints the data of ALV in a list using "write" statement. While writing , "top of page" event is not triggered. I expect that it is triggered at the first "write" statement but isn't. Is there anyone who knows the cause of this problem?
    The code is below.
    Thanks.
    Tables ...
    TABLES : mara , makt , ekko , ekpo , zzith_yukh , lfa1 , t001w  , lips ,
             eket .
    global variables
    DATA : BEGIN OF list OCCURS 1,
           zztahsk LIKE ekko-zztahsk ,
           zterm LIKE ekko-zterm ,
           txz01 LIKE ekpo-txz01 ,
           name1 LIKE lfa1-name1 ,
           menge LIKE ekpo-menge ,
           meins LIKE ekpo-meins ,
           fyukl LIKE zzith_yukh-zzdel_flag ,
                             " Yüklenmi&#351; miktar var göstergesi ...
           inco1 LIKE ekko-inco1 ,
           netwr LIKE ekpo-netwr ,
           waers LIKE ekko-waers ,
           bedat LIKE ekko-bedat ,
           zzontar LIKE ekko-zzontar ,
           slfdt LIKE eket-slfdt ,
           tname1 LIKE t001w-name1 ,
           banfn LIKE ekpo-banfn ,
           ebeln LIKE ekko-ebeln ,
           ebelp LIKE ekpo-ebelp ,
           lifnr LIKE ekko-lifnr ,
           mtart LIKE mara-mtart ,
           matkl LIKE mara-matkl ,
           ekgrp LIKE ekko-ekgrp ,
           matnr LIKE mara-matnr ,
           eknam  LIKE t024-eknam,
           bukrs  LIKE ekko-bukrs,
           zzbltur LIKE ekko-zzbltur,
           END   OF list         .
    DATA temp  LIKE list OCCURS 1 WITH HEADER LINE .
    DATA total LIKE list OCCURS 1 WITH HEADER LINE .
    ALV fields
    TYPE-POOLS : slis.
    DATA : gt_fields TYPE  slis_fieldcat_alv OCCURS 1 WITH HEADER LINE .
    DATA : gt_events TYPE  slis_t_event.
    DATA : gs_layout TYPE  slis_layout_alv.
    DATA : gv_title  TYPE lvc_title VALUE 'Günlük Depo Say&#305;m Miktarlar&#305;'.
    DATA : gt_top_of_page TYPE slis_t_listheader.
    selection screen
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001 .
    *Sat&#305;nalma organizasyonu
    *Sat&#305;nalma grubu
    *Sat&#305;c&#305;
    *Tarih
    *SAS no
    *Dosya no
    SELECT-OPTIONS:
    s_bukrs FOR ekko-bukrs .
    SELECTION-SCREEN SKIP .
    SELECT-OPTIONS:
    s_ekorg FOR  ekko-ekorg OBLIGATORY MEMORY ID eko ,
    s_ekgrp FOR  ekko-ekgrp ,
    s_lifnr FOR  ekko-lifnr ,
    s_ebeln FOR  ekko-ebeln .
    SELECTION-SCREEN END  OF BLOCK a        .
    Define Katalog
    DEFINE fill_catalog .
      gt_fields-fieldname  = &1.
      gt_fields-tabname    = &2.
      gt_fields-seltext_l  = &3.
      gt_fields-seltext_m  = &3.
      gt_fields-seltext_s  = &3.
      gt_fields-checkbox   = &4.
      gt_fields-cfieldname = &5.
      gt_fields-ref_tabname  = &6.
      gt_fields-ref_fieldname  = &7.
      gt_fields-edit       = &8.
      append gt_fields .
      clear gt_fields .
    END-OF-DEFINITION.
    Modify Catalog
    DEFINE modify_catalog .
      gt_fields-seltext_m = &1 .
      modify gt_fields  transporting seltext_m where fieldname = &2 .
    END-OF-DEFINITION     .
    TOP-OF-PAGE.
      write 'top of page'.
      PERFORM top-of-page.
    start-of-selection
    START-OF-SELECTION .
      PERFORM get_data.
      PERFORM listele .
    *&      Form  listele .
    FORM listele .
      PERFORM get_events .
      PERFORM alv_list_header.
      PERFORM get_field_catalog USING 'LIST' .
      PERFORM display_alv    .
    ENDFORM.                    " listele.
    *&      Form  getfield_Catalog
    FORM get_field_catalog  USING p_tabname .
      fill_catalog :
    'EBELN'   'LIST' '' '' '' 'EKPO' 'EBELN'   '' ,
    'ZZTAHSK' 'LIST' '' '' '' 'EKKO' 'ZZTAHSK' '' ,
    'ZZBLTUR' 'LIST' '' '' '' 'EKKO' 'ZZBLTUR' '' ,
    'MATNR'   'LIST' '' '' '' 'MARA' 'MATNR'   '' ,
    'MATKL'   'LIST' '' '' '' 'MARA' 'MATKL'   '' ,
    'TXZ01'   'LIST' '' '' '' 'EKPO' 'TXZ01'   '' ,
    'NAME1'   'LIST' '' '' '' 'LFA1' 'NAME1'   '' ,
    'MENGE'   'LIST' '' '' '' 'EKPO' 'MENGE'   '' ,
    'MEINS'   'LIST' '' '' '' 'EKPO' 'MENGE'   '' ,
    'FYUKL'   'LIST' '' '' '' 'ZZITH_YUKH' 'ZZDEL_FLAG'   '' ,
    'INCO1'   'LIST' '' '' '' 'EKKO' 'INCO1'   '' ,
    'NETWR'   'LIST' '' '' '' 'EKPO' 'NETWR'   '' ,
    'WAERS'   'LIST' '' '' '' 'EKKO' 'WAERS'   '' ,
    'BEDAT'   'LIST' '' '' '' 'EKKO' 'BEDAT'   '' ,
    'ZZONTAR' 'LIST' '' '' '' 'EKKO' 'ZZONTAR' '' ,
    'SLFDT'   'LIST' '' '' '' 'EKET' 'SLFDT'   '' ,
    'TNAME1'  'LIST' '' '' '' 'T001W' 'NAME1'  '' ,
    'BANFN'   'LIST' '' '' '' 'EKPO' 'BANFN'   '' ,
    'EKNAM'   'LIST' '' '' '' 'T024' 'EKNAM'   '' .
      gt_fields-ddictxt = 'M' .
      MODIFY gt_fields  TRANSPORTING ddictxt WHERE fieldname NE space.
      modify_catalog 'Yükleme No'            'VBELN'   .
      modify_catalog 'Malzeme Türü'          'ZZBLTUR' .
      modify_catalog 'Malzeme Tan&#305;m&#305;'        'TXZ01'   .
      modify_catalog 'Sat&#305;c&#305;'                'NAME1'   .
      modify_catalog 'Teslim &#350;ekli'          'INCO1'   .
      modify_catalog 'Döviz Tutar&#305;'          'ZZTOPLAM'.
      modify_catalog 'Döviz Kodu'            'WAERS'   .
      modify_catalog 'Sipari&#351;i Veren'        'TNAME1'  .
      modify_catalog 'Tahmini &#304;thalat Trh.'  'SLFDT'   .
      modify_catalog '&#304;thalata &#304;ntikal Trh.' 'BEDAT'   .
      modify_catalog 'Dosya Onay Tarihi'     'ZZONTAR' .
      modify_catalog 'Talep No'              'BANFN'   .
      modify_catalog 'Dosya Sorumlusu'       'EKNAM'   .
      modify_catalog 'Yük.Göstergesi'        'FYUKL'   .
    ENDFORM.                    " getfield_Catalog
    *&      Form  display_alv
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv .
      DATA lv_repid LIKE sy-repid .
      lv_repid = sy-repid .
      CLEAR gs_layout.
      gs_layout-zebra                 = 'X'.
      gs_layout-colwidth_optimize     = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = lv_repid
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          is_layout                = gs_layout
          it_fieldcat              = gt_fields[]
          it_events                = gt_events[]
        TABLES
          t_outtab                 = list[].
    ENDFORM.                    " display_alv
    FORM set_pf_status USING  iv_nodisplay TYPE slis_t_extab.
      SET PF-STATUS 'STANDARD' ."excluding iv_nodisplay.
    ENDFORM.                    " SET_PF_STATUS
    FORM user_command  USING iv_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
      CASE iv_ucomm .
        WHEN 'PRINT'  . PERFORM print_data .
      ENDCASE       .
    ENDFORM.                    "USER_COMMAND
    FORM get_events .
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = gt_events.
      READ TABLE gt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE 'ALV_TOP_OF_PAGE' TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
    ENDFORM.                    " getevents
    FORM alv_list_header .
      DATA: ls_line TYPE slis_listheader.
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'Sat&#305;nalma Org.:'.
      CONCATENATE s_ekorg-low s_ekorg-high
      INTO ls_line-info SEPARATED BY '/'.
      APPEND ls_line TO gt_top_of_page.
      ls_line-key  = 'Sat&#305;nalma Grubu.:'.
      CONCATENATE s_ekgrp-low s_ekgrp-high
      INTO ls_line-info SEPARATED BY '/'.
      APPEND ls_line TO gt_top_of_page.
      ls_line-key  = 'Sat&#305;c&#305;.:'.
      CONCATENATE s_lifnr-low s_lifnr-high
      INTO ls_line-info SEPARATED BY '/'.
      APPEND ls_line TO gt_top_of_page.
      ls_line-key  = 'SAS No.:'.
      CONCATENATE s_ebeln-low s_ebeln-high
      INTO ls_line-info SEPARATED BY '/'.
      APPEND ls_line TO gt_top_of_page.
    ENDFORM.                    " alv_list_header
    FORM alv_top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_top_of_page.
    ENDFORM.                    "TOP_OF_PAGE
    FORM get_data .
      DATA : BEGIN OF tr ,
              menge LIKE eket-menge ,
              dabmg LIKE eket-dabmg ,
             END OF tr ,
             zzfiilytar LIKE zzith_yukh-zzfiilytar  .
    *- Get data ...
      SELECT *
        INTO CORRESPONDING FIELDS OF TABLE list
        FROM ekpo AS a
       INNER JOIN ekko AS b ON bebeln = aebeln
      WHERE b~ebeln IN s_ebeln AND
            b~bukrs IN s_bukrs AND
            b~loekz EQ space   AND
            b~lifnr IN s_lifnr AND
            b~ekorg IN s_ekorg AND
            b~ekgrp IN s_ekgrp AND
            a~loekz EQ space   AND
            a~elikz EQ space .
      LOOP AT list .
        CLEAR tr .
        SELECT menge dabmg
          INTO tr
          FROM eket
         WHERE ebeln = list-ebeln AND
               ebelp = list-ebelp.
          tr-menge = tr-menge - tr-dabmg .
        ENDSELECT.
        IF tr-menge LE 0 .
          DELETE list .
        ELSE .
          list-menge = tr-menge .
          IF tr-dabmg GT 0 .
            list-fyukl = '*' .
          ENDIF .
          SELECT SINGLE butxt INTO list-tname1 FROM t001
            WHERE bukrs = list-bukrs .
          SELECT SINGLE slfdt INTO list-slfdt FROM eket
          WHERE ebeln = list-ebeln AND
                ebelp = list-ebelp .
          SELECT SINGLE name1 INTO list-name1 FROM lfa1 WHERE lifnr = list-lifnr.
          SELECT SINGLE mtart matkl INTO (list-mtart,list-matkl)
          FROM mara WHERE matnr = list-matnr .
          SELECT SINGLE eknam INTO list-eknam FROM t024 WHERE ekgrp = list-ekgrp .
          MODIFY list .
        ENDIF .
      ENDLOOP      .
    ENDFORM.                    " get_data
    FORM print_data .
      LEAVE TO LIST-PROCESSING .
      NEW-PAGE NO-HEADING NO-TITLE LINE-SIZE 229 .
      SET PF-STATUS SPACE .
    PERFORM top-of-page .
    malzeme türü 1005 ler yazd&#305;r&#305;l&#305;r
      PERFORM yazdir_1005 .
    malzeme türü 1005 olmayanlar yazd&#305;r&#305;l&#305;r
      PERFORM yazdir_ne_1005 .
    Sat&#305;nalama gruplar&#305; bilgisi yazd&#305;r&#305;l&#305;r
      PERFORM yazdir_ekgrp .
    ENDFORM.                    " print_data
    FORM top-of-page .
      WRITE : 'ÜLKER GRUBU KONSOL&#304;DE' .
      WRITE AT 40 'Sevkiyat Bekleyen Malzemeler' COLOR COL_HEADING .
      WRITE :  180 sy-uname , sy-datum , sy-uzeit.
      NEW-LINE .
      ULINE 0(229) .
      WRITE :/2 'Rapor Kodu..............:' , (10) sy-tcode .
      WRITE :/2 'Sat&#305;nalma Organizasyonu.:' , (10) s_ekorg-low, '/', (10) s_ekorg-high .
      WRITE :/2 'Sat&#305;nalma Grubu.........:' , (10) s_ekgrp-low, '/', (10) s_ekgrp-high .
      WRITE :/2 'Sat&#305;c&#305;..................:' , (10) s_lifnr-low, '/', (10) s_lifnr-high .
      WRITE :/2 'Sat&#305;nalma Sipari&#351; No....:' , (10) s_ebeln-low, '/', (10) s_ebeln-high .
      NEW-LINE .
      ULINE 0(229) .
    Ba&#351;l&#305;klar yaz&#305;l&#305;r
      FORMAT COLOR COL_HEADING .
      WRITE :
      /(10) 'SAS NO.' CENTERED,
      (6)  'TAHS&#304;S'  CENTERED,
      (5)  'ÖDEME'   CENTERED,
      (5)  'Bel.T'   CENTERED,
      (25) 'MALZEME' CENTERED,
      (25) 'SATICI' CENTERED,
      (12) 'M&#304;KTAR' CENTERED,
      (3)  'BRM' CENTERED,
      (3)  'G' ,
      (7) 'TES.&#350;K.' CENTERED,
      (16) 'DÖV&#304;Z TUTARI' CENTERED,
      (3)  'DB.' CENTERED,
      (13) '&#304;TH.&#304;NTK.TRH.' CENTERED,
      (13) 'DOSYA ON.TRH.' CENTERED,
      (10) 'TAHM&#304;N.&#304;TH.TRH.' CENTERED,
      (20) 'S&#304;PAR&#304;&#350; VEREN' CENTERED,
      (10) 'TALEP NO.' CENTERED,
      (18) 'DOSYA SORUMLUSU' CENTERED.
      ULINE 0(229) .
      FORMAT RESET .
    ENDFORM.                    " top-of-page
    FORM yazdir_1005 .
      DATA ebeln LIKE list-ebeln  .
      SORT list BY zzbltur matnr .
      temp[] = list[] .
      DELETE temp WHERE mtart <> '1005' .
      LOOP AT list WHERE mtart = '1005' .
        CLEAR list-netwr .
        IF ebeln NE list-ebeln OR ebeln EQ space .
          REFRESH total . CLEAR total .
          ebeln = list-ebeln .
          LOOP AT temp WHERE ebeln = list-ebeln .
            list-netwr = list-netwr + temp-netwr  .
            CLEAR total .
            total-txz01 = '*** TKNK.MLZ. TOPLAMI ****' .
            total-meins = temp-meins .
            total-menge = temp-menge .
            COLLECT total .
          ENDLOOP                               .
          PERFORM write_list USING '1'  .
          LOOP AT total .
            PERFORM write_list USING '2'  .
          ENDLOOP .
          AT END OF zzbltur .
            ULINE 0(229) .
          ENDAT .
        ENDIF .
      ENDLOOP .
    ENDFORM.                    " yazdir_1005
    FORM write_list  USING    flag .
    flag 1 1005 için yazd&#305;rma
    flag 2 ise ara toplam
      IF flag = '1' .
       FORMAT COLOR COL_NORMAL .
        WRITE :
        /(10) list-ebeln ,
         (6)  list-zztahsk,
         (5)  list-zterm,
         (5)  list-zzbltur ,
         (25) list-txz01,
         (25) list-name1,
         (12) list-menge,
         (3)  list-meins,
         (3)  list-fyukl,
         (7)  list-inco1,
         (16) list-netwr,
         (3)  list-waers,
         (13) list-bedat,
         (13) list-zzontar,
         (10) list-slfdt ,
         (20) list-tname1,
         (10) list-banfn ,
         (18) list-eknam .
        FORMAT RESET .
      ELSEIF flag = '2'  .
       FORMAT COLOR COL_TOTAL .
        WRITE :
        /(10) '' ,
         (6)  '' ,
         (5)  '' ,
         (5)  '' ,
         (25) total-txz01,
         (25) '' ,
         (12) total-menge,
         (3)  total-meins,
         (3)  '' ,
         (7)  '' ,
         (16) '' ,
         (3)  '' ,
         (13) '' ,
         (13) '' ,
         (10) '' ,
         (20) '' ,
         (10) '' ,
         (18) '' .
        FORMAT RESET .
      ELSEIF flag = '3'  .
       FORMAT COLOR COL_TOTAL .
        WRITE :
       /(10) '' ,
        (6)  '' ,
        (5)  '' ,
        (5)  '' ,
        (25) total-txz01,
        (25) '' ,
        (12) total-menge,
        (3)  '' ,
        (3)  '' ,
        (7)  '' ,
        (16) total-netwr ,
        (3)  '' ,
        (13) '' ,
        (13) '' ,
        (10) '' ,
        (20) '' ,
        (10) '' ,
        (18) '' .
        FORMAT RESET .
      ENDIF .
    ENDFORM.                    " write_list
    FORM yazdir_ne_1005 .
      DATA matnr LIKE list-matnr .
      SORT list BY zzbltur matkl matnr .
      temp[] = list[] .
      DELETE temp WHERE mtart = '1005' .
      LOOP AT list WHERE mtart <> '1005' .
    Her yeni Malzeme için ara toplam yaz&#305;l&#305;r
        IF matnr NE list-matnr AND matnr NE space .
           REFRESH total . CLEAR total .
    Toplamlar al&#305;n&#305;r
          LOOP AT temp WHERE matnr = matnr .
            CLEAR total .
            total-netwr = temp-netwr  .
            total-menge = temp-menge  .
            total-txz01 =  '***     TOPLAM        ****' .
            COLLECT total .
          ENDLOOP                          .
          LOOP AT total .               .
            PERFORM write_list USING '3'  .
          ENDLOOP                       .
          ULINE 0(229) .
        ENDIF                      .
        PERFORM write_list USING '1'  .
        matnr = list-matnr            .
      ENDLOOP                           .
    Toplamlar al&#305;n&#305;r
      LOOP AT temp WHERE matnr = matnr .
        REFRESH total . CLEAR total .
        total-netwr = temp-netwr  .
        total-menge = temp-menge  .
        total-txz01 =  '***     TOPLAM        ****' .
        COLLECT total .
      ENDLOOP .
      LOOP AT total .
        PERFORM write_list USING '3'  .
      ENDLOOP       .
      ULINE 0(229)  .
    ENDFORM.                    " yazdir_ne_1005
    FORM yazdir_ekgrp .
      DATA: BEGIN OF total OCCURS 1 ,
            eknam LIKE list-eknam   ,
            zzbltur LIKE list-zzbltur ,
            sayi TYPE i ,
            END  OF  total          .
      DATA: BEGIN OF gtotal OCCURS 1 ,
            eknam LIKE list-eknam   ,
            zzbltur LIKE list-zzbltur ,
            sayi TYPE i ,
            END  OF  gtotal          .
      DATA: bltur LIKE zzith_bltur OCCURS 1 WITH HEADER LINE .
      DATA: len TYPE i  .
      DATA: wa LIKE total.
      REFRESH temp .
      SELECT * INTO TABLE bltur FROM zzith_bltur .
      CLEAR bltur .
      MOVE : 'ZZZZ'   TO bltur-zzbltur ,  " Sat&#305;r toplam&#305; için ...
             text-002 TO bltur-zztanim .
      APPEND bltur .
      CLEAR list   .
      SORT list BY eknam ebeln .
      DELETE ADJACENT DUPLICATES FROM list COMPARING eknam ebeln .
      LOOP AT list .
        CLEAR : total, gtotal .
        total-eknam = list-eknam .
        total-zzbltur = list-zzbltur .
        total-sayi  = 1 .
        COLLECT total   .
        total-eknam   = list-eknam .
        total-zzbltur = 'ZZZZ' .
        total-sayi  = 1 .
        COLLECT total   .
        gtotal-eknam = text-001 .
        gtotal-zzbltur = list-zzbltur .
        gtotal-sayi  = 1 .
        COLLECT gtotal   .
        gtotal-eknam = text-001 .
        gtotal-zzbltur = 'ZZZZ' .
        gtotal-sayi  = 1 .
        COLLECT gtotal   .
      ENDLOOP      .
      FORMAT COLOR COL_HEADING.
      ULINE AT /1(145).
      WRITE :/
      sy-vline , (15) 'Dosya Sorumlusu' , sy-vline .
      LOOP AT bltur .
        WRITE :(15) bltur-zztanim  , sy-vline .
      ENDLOOP  .
      ULINE AT /1(145).
      FORMAT RESET   .
      total-zzbltur = '0001' .
      MODIFY total TRANSPORTING zzbltur WHERE zzbltur = space .
      gtotal-zzbltur = '0001' .
      MODIFY gtotal TRANSPORTING zzbltur WHERE zzbltur = space .
      SORT total BY eknam .
      LOOP AT total  .
        AT NEW eknam .
          WRITE :/
          sy-vline , (15) total-eknam COLOR COL_HEADING ,
          sy-vline .
          LOOP AT bltur   .
            len = sy-tabix * 18 .
            len = len + 3 .
            CLEAR wa .
            READ TABLE total INTO wa WITH KEY zzbltur = bltur-zzbltur
                                              eknam   = total-eknam .
            WRITE AT len(15) wa-sayi NO-ZERO.
            WRITE sy-vline .
          ENDLOOP    .
        ENDAT      .
      ENDLOOP .
      LOOP AT gtotal  .
        AT NEW eknam .
          FORMAT COLOR COL_TOTAL .
          WRITE :/
          sy-vline , (15) gtotal-eknam ,
          sy-vline .
          LOOP AT bltur   .
            len = sy-tabix * 18 .
            len = len + 3 .
            CLEAR wa .
            READ TABLE gtotal INTO wa WITH KEY zzbltur = bltur-zzbltur
                                               eknam   = text-001    .
            WRITE AT len(15) wa-sayi NO-ZERO.
            WRITE sy-vline .
          ENDLOOP    .
        ENDAT      .
      ENDLOOP .
      ULINE AT /1(145).
      FORMAT RESET .
    ENDFORM.                    " yazdir_ekgrp

    Hi,
    In the function  use the top-of-page event as follows:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
            EXPORTING
                    I_BYPASSING_BUFFER          =
                    I_BUFFER_ACTIVE             =
                    I_INTERFACE_CHECK           = ' '
                 I_CALLBACK_PROGRAM          = 'ZRPMSLM'
                    I_CALLBACK_PF_STATUS_SET    = ' '
                    I_CALLBACK_USER_COMMAND     = ' '
               <b>  I_CALLBACK_TOP_OF_PAGE      = 'TOP'</b>
    Define whatever to appear in top-of page in a subroutine named TOP.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • BAPI_SALESORDER_CREATEFROMDAT2 for creating sales orders with configurable

    Hi All,
    I want to create sales order with a material which in turn triggers a configurable network order.
    I am using the following BAPI : BAPI_SALESORDER_CREATEFROMDAT2.
    After reading the "[Variant Configuration (LO-VC)|http://help.sap.com/printdocu/core/print46c/en/data/pdf/lovc/lovc.pdf]" documentation, I thought I had to populate the
    following tables ORDER_CFGS_REF, ORDER_CFGS_INST and ORDER_CFGS_VALUE.
    The call function return no errors and the sale order is well created. However, I have no values in the network.
    If I created a sale order in VA01, a network is created with value. So the customizing is good.
    Do you have any idea how to populate this tables ? Sample code will be very helpful.
    We found in this forum a lot of sample code about configurable material, with obj_type populate with MARAu2019. But no example with configurable network.
    Actually I complete these tables like this :
    " E1CUCFG
      ls_order_cfgs_ref-posex = '000010'.
    *  ls_order_cfgs_ref-config_id = '000010'.
      ls_order_cfgs_ref-config_id = '000001'.
      ls_order_cfgs_ref-root_id = '00000001'.
      ls_order_cfgs_ref-complete = 'T'.
      ls_order_cfgs_ref-consistent = 'T'.
    *  ls_order_cfgs_ref-cbase_id = '4ECADFC4BE9F03A6E10080000AC4AB76'.
    *  ls_order_cfgs_ref-cbase_id_type = 'G'.
      APPEND ls_order_cfgs_ref TO lt_order_cfgs_ref.
    " E1CUINS
      ls_order_cfgs_inst-config_id = '000001'.
      ls_order_cfgs_inst-inst_id = '00000001'.
      ls_order_cfgs_inst-obj_type = 'PLKONET'. u201C(in replacement of MARA)
      ls_order_cfgs_inst-class_type = '300'. u201C(or 020).
      ls_order_cfgs_inst-obj_key = '01000000801'.
      APPEND ls_order_cfgs_inst TO lt_order_cfgs_inst.
    " E1CUVAL
      ls_order_cfgs_value-config_id = '000001'.
      ls_order_cfgs_value-inst_id = '00000001'.
      ls_order_cfgs_value-charc = 'XXXX'. u201C(corresponding to Flag DTA)
      ls_order_cfgs_value-charc_txt = 'Flag DTA'.
      ls_order_cfgs_value-value = '0'.
      APPEND ls_order_cfgs_value TO lt_order_cfgs_value.
    Thanks,

    Have a look to OSS-Message 567348. There is sample coding for using BAPI_SALESORDER_CHANGE, but the parameters should be the same to yout BAPI
    Best regards
    Torsten Manhardt

  • Library Cache Pin Wait Event (within the context of APEX)

    Hello,
    Firstly -
    Oracle Version: 10.2.0.4.0
    Apex Version: 3.0.1.00.08
    Okay, my colleague (no really! This isn't one of those "Ahem ... A friend of mine has contracted something nasty +downstairs+..."-type questions) is having problems compiling a package (using TOAD incidentally, but it's the same in SQL Developer).
    I've searched the forum and the web for a bit of help on what's maybe happening here and it appears to be related to a concurrency conflict with the package definition - from what I can understand it's a case of the package is in use by another session, therefore another session cannot alter it at the same time (which makes sense)
    "What does this have to do with APEX?"... well, he is working on this package using the following methodology:
    1. Compile the package body/spec (as necessary - body more often obviously)
    2. run an apex page which uses the code in a process, which may or may not result in the error page being displayed
    3. Making changes to the package body/spec
    repeat steps 1-3 ad nauseum...
    He is the only user directly accessing the schema (and the only user accessing the page via APEX too, although I appreciate this isn't quite the same thing).
    I was wondering if, due to the architecture of APEX (the use of session pools etc), the state of a package might be being retained in some manner, thus resulting in this library cache pin wait event? If so, is there anything I can do to mitigate against this occurring?
    p.s. the only difference I can see between this particular package and any other package in the schema is that this one interacts with blobs (including making references to the wwv_flow_files view) - with blobs being passed as parameters between procedures (thus potentially creating temporary blobs which may or may not being closed).
    Any ideas?
    p.p.s. there are also no DBMS_SCHEDULER jobs or anything that might potentially be running the code incidentally...
    Edited by: Joel_C on 11-Nov-2011 11:58
    We got our DBAs to run a bit of code to identify the blocking session:
    select
             decode(lob.kglobtyp, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3, 'CLUSTER',
                          4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE',
                          7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE',
                          11, 'PACKAGE BODY', 12, 'TRIGGER',
                          13, 'TYPE', 14, 'TYPE BODY',
                          19, 'TABLE PARTITION', 20, 'INDEX PARTITION', 21, 'LOB',
                          22, 'LIBRARY', 23, 'DIRECTORY', 24, 'QUEUE',
                          28, 'JAVA SOURCE', 29, 'JAVA CLASS', 30, 'JAVA RESOURCE',
                          32, 'INDEXTYPE', 33, 'OPERATOR',
                          34, 'TABLE SUBPARTITION', 35, 'INDEX SUBPARTITION',
                          40, 'LOB PARTITION', 41, 'LOB SUBPARTITION',
                          42, 'MATERIALIZED VIEW',
                          43, 'DIMENSION',
                          44, 'CONTEXT', 46, 'RULE SET', 47, 'RESOURCE PLAN',
                          48, 'CONSUMER GROUP',
                          51, 'SUBSCRIPTION', 52, 'LOCATION',
                          55, 'XML SCHEMA', 56, 'JAVA DATA',
                          57, 'SECURITY PROFILE', 59, 'RULE',
                          62, 'EVALUATION CONTEXT',
                         'UNDEFINED') object_type,
             lob.KGLNAOBJ object_name,
             pn.KGLPNMOD lock_mode_held,
             pn.KGLPNREQ lock_mode_requested,
             ses.sid,
             ses.serial#,
             ses.username
        FROM
           x$kglpn pn,
           v$session ses,
           x$kglob lob,
           v$session_wait vsw
      WHERE
       pn.KGLPNUSE = ses.saddr and
       pn.KGLPNHDL = lob.KGLHDADR
       and lob.kglhdadr = vsw.p1raw
       and vsw.event = 'library cache pin'
    order by lock_mode_held descresults as follows (I've changed some object names to protect the ignorant):
    OBJECT_TYP OBJECT_NAME                   LOCK_MODE_HELD LOCK_MODE_REQUESTED        SID    SERIAL# USERNAME
    PACKAGE    PKG_FOOBAR                             2                   0        356      21694 HTMLDB_PUBLIC_U
                                                                                                      SER
    PACKAGE    PKG_FOOBAR                             0                   3        463      22309 FOOHTMLDB_PUBLIC_USER is the apex user incidentally. The session is marked in the v$session table as "inactive", the last statement being
    Begin
       Dbms_session.reset_package;
    End;Edited by: Joel_C on 11-Nov-2011 14:39

    bump
    No-one?
    The problem seems to have 'resolved itself' over the weekend incidentally (although I don't believe anything truly resolves itself in this manner - something must have changed).

  • Problem identifying db object for "buffer busy waits" event.

    10.2.0.3
    AIX 64
    SELECT username, a.p1text, a.p1, a.p2text, a.p2, a.p3text, a.p3, event FROM v$session a WHERE
    a.status='ACTIVE'
    AND a.event = 'buffer busy waits'
    Query reports about 40 active sessions with this information:
    file# 3746
    block# 2
    class# 13
    select
    owner,
    segment_name,
    segment_type
    from
    dba_extents
    where
    file_id = 3746
    and
    2 between block_id and block_id + blocks -1;
    no rows returned
    SELECT MAX(a.file#) FROM sys.file$ a
    3535
    This was only a temporary situation when after couple of minutes(7) wait event "buffer busy waits" dissapeared completely.
    Any ideas?
    Thank you,
    Daniel.

    http://perfvision.com/papers/06_buffer_cache.ppt
    Slide 80-81 points at increasing the size of the initial and next extent for File Header Block buffer busy waits
    Side 85 points at high extent allocation for File Header Block buffer busy waits
    http://perfvision.com/ftp/hotsos/aas.ppt
    Side 55 points at extent allocation too small/too many extents being allocated for File Header Block buffer busy waits
    A couple hints from the documentation:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/instance_tune.htm
    "To determine the possible causes [of buffer busy waits], first query V$SESSION to identify the value of ROW_WAIT_OBJ# when the session waits for buffer busy waits."
    "To identify the object and object type contended for, query DBA_OBJECTS using the value for ROW_WAIT_OBJ# that is returned from V$SESSION."
    "V$SEGMENT_STATISTICS - This is a user-friendly view of statistic values. In addition to all the columns of V$SEGSTAT, it has information about such things as the segment owner and table space name. It makes the statistics easy to understand, but it is more costly."
    You may want to query DBA_TEMP_FILES for the specific FILE_ID identified by the V$SESSION. Taking a look at V$SEGMENT_STATISTICS might also be helpful.
    Are you using dictionary managed tablespaces, locally managed tablespaces with manual extent size management, ASSM with manual extent size management, or ASSM with automatic extent size management?
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Wait events - how to read it

    Hi frnds,
    As, I'm beginner to performance tuning I dont know
    What action do i need to take?
    I mean how to read the output which I given below.
    this is the output suffering buffer busy waits.
    Could anyone please tell me
    CLASS TOTAL_WAITS TOTAL_TIME
    data block 93303 58711
    unused 0 0
    system undo header 12 232
    undo header 7847 6636
    3rd level bmb 0 0
    save undo header 0 0
    bitmap index block 0 0
    file header block 0 0
    free list 0 0
    undo block 68 207
    segment header 422 399
    extent map 0 0
    2nd level bmb 0 0
    system undo block 0 0
    sort block 0 0
    save undo block 0 0
    1st level bmb 1 17
    bitmap block 0 0
    Thanks, Muhammed Thameem. S

    Hello,
    "Buffer busy waits" is contention for a buffer (representing a specific
    version of a database block) within the Buffer Cache. So, in essence
    it is block contention and thus it is most likely something to do with
    the design of the tables and indexes supporting the application. A
    built-in bottleneck. On indexes, it could be the age-old problem of
    insertions into an index on a column with a monotonically-ascending
    data value (i.e. timestamps or sequence numbers) which tends to cause
    contention on the highest leaf node of the index. On tables, it might
    have to do with many concurrent insertions into a table in a
    freelist-managed tablespace where the table has only one freelist. It
    could also be due to a home-grown implementation of sequence-number
    generators (i.e. small table with one row, one column in which contains
    the "last value" of a sequence, etc) which lots of people use to avoid
    not being "portable across databases" which they think means not using
    Oracle sequences (yadda yadda yadda).
    I'd look for any SQL statement in the "SQL sorted by Elapsed Time"
    section of the AWR report which exhibits high elapsed time but
    relatively low CPU time, indicating a lot of wait time. Of course,
    there are something like 800 possible wait events in current releases
    of Oracle, of which "buffer busy waits" is only one, so this is just
    inference and not a direct causal connection to your problem. But,
    once I find such statements I'd check to see if they are
    accessing/manipulating tables within the CUBS_DATA tablespace, and then
    use "select * from table(dbms_xplan.display_awr('sql-id'))" to
    get the execution plan(s), and then look for something ineffective
    within the execution plan. You might find the script "sqlhistory.sql" helpful
    here as well, to get a "historical perspective" on the execution of the
    SQL statements over time, in case the buffer busy waits peaked at some
    point in the past
    Please refer to:
    http://www.pubbs.net/201003/oracle/51925-understanding-awr-buffer-waits.html
    Also
    http://www.remote-dba.net/oracle_10g_tuning/t_buffer_busy_waits.htm
    kind regards
    Mohamed

Maybe you are looking for

  • Kernel panic

    a kernel panic happened when i tried to shut down. I had been online, nothing unusual. yesterday i installed some software; maybe that's the problem--reinstalled real player, installed adobe reader, shockwave (with browser in rosetta mode), flashplay

  • I HATE iTunes to my guts!!!!!!!!!!!!! :[

    For a company that advertise ease of use, acompany that trumpet user friendliness, , the iTunes is a biggest piece of junk! Worse than any Windows apps I had used!  The UI is confusing which leads to a very, very bad UX. Among many bugs, my imported

  • Transforming a video on Final Cut Pro X

    I have been shooting short videos on my Iphone 5 and trying to make a short movie on Final Cut Pro X but have come across a roadblock and need help. I have been shooting the videos vertically rather than horizontally thus my picture is narrow and doe

  • How to password protect a PDF to not allow more than 3 attempts

    I am looking for a way to password prtotect a PDF document which will alllow the user only 3 attempts. If the user does not enter the password correctly, the document must be locked out and should expire. So basically, the user should not be allowed

  • Optional Editable Regions

    In a  two column fixed, left sidebar, header and  footer layout I've designated the sidebar as an "optional editable region." My intent is for the sidebar to have no content on some pages, and on those pages to have the main content region fill the e