'BAPI_GOODSMVT_CREATE' takes more time for creating material document

Hi Experts,
I m using 'BAPI_GOODSMVT_CREATE' in my custom report, it takes more time for creating Material documents.
Please let me know if there is any option to overcome this issue.
Thanks in advance
Regards,
Leo

Hi,
please check if some of following OSS notes are not valid for your problem:
[Note 838036 - AFS: Performance issues during GR with ref. to PO|https://service.sap.com/sap/support/notes/838036]
[Note 391142 - Performance: Goods receipt for inbound delivery|https://service.sap.com/sap/support/notes/391142]
[Note 1414418 - Goods receipt for customer returns: Various corrections|https://service.sap.com/sap/support/notes/1414418]
The other idea is not to commit each call, but executing commit of packages e.g. after 1000 BAPI calls.
But otherwise, I am afraid you can not do a lot about performance of standard BAPI. Maybe there is some customer enhancement which is taking too long inside the BAPI, but this has to be analysed by you. To analyse performance, just execute your program via tr. SE30.
Regards
Adrian

Similar Messages

  • 'BAPI_GOODSMVT_CREATE' takes more time for creating material document for the 1st time

    Hi Experts,
    I am doing goods movement using BAPI_GOODSMVT_CREATE in my custom code.
    Then there is some functional configuration such that, material documents and TR and TO are getting created.
    Now I need to get TO and TR numbers from LTAK table passing material documnt number and year, which I got from above used BAPI.
    The problem I am facing is very strange.
    Only for the 1st time, I am not finding TR and TO values in LTAK table. And subsequent runs I get entries in LTAK in there is a wait time of 5 seconds after bapi call.
    I have found 'BAPI_GOODSMVT_CREATE' takes more time for creating material document with similar issue, but no solution or explanation.
    Note 838036 says something similar, but it seems obsolete.
    Kindly share your expertise and opinions.
    Thanks,
    Anil

    Hi,
    please check if some of following OSS notes are not valid for your problem:
    [Note 838036 - AFS: Performance issues during GR with ref. to PO|https://service.sap.com/sap/support/notes/838036]
    [Note 391142 - Performance: Goods receipt for inbound delivery|https://service.sap.com/sap/support/notes/391142]
    [Note 1414418 - Goods receipt for customer returns: Various corrections|https://service.sap.com/sap/support/notes/1414418]
    The other idea is not to commit each call, but executing commit of packages e.g. after 1000 BAPI calls.
    But otherwise, I am afraid you can not do a lot about performance of standard BAPI. Maybe there is some customer enhancement which is taking too long inside the BAPI, but this has to be analysed by you. To analyse performance, just execute your program via tr. SE30.
    Regards
    Adrian

  • Thread behaves wierdly.. takes more time for less code...

    Hi everyone,
    I am stuck into this probel very badly..i have never seen such a problem before..Thread bottleneck somewhere is the issue i guess,,, plz have a look at the code patiently.. and do reply.. u guys are my last hope on this thing..Thank YOU...
    The Bank method is called by another method which runs 50 threads , so at a time 50 threads could enter this method to record Debit...
    class BankHelper {
    // Some code of bank.. not relevant to my problem public Bank() {
    long time = System.nanoTime();
    abc.recordDebit(); // want to measure how much time this method takes
    abc.recordTimeForDebit(System.nanoTime() - time); // accumulating the total time the above method takes to calculate
    class abc {
    // Some code of bank.. not relevant to my problem
    public synchronized void recordDebit(){
    debit++;
    } // I had put timers aound the ++ and it took not more than 700 to 900 nanoseconds
    public synchronized void recordTimeForDebit(long time){
    record += time;
    Log.debug("Time taken to record drop for DEBIT " + record + " Millis " + time);
    }Answer:
    Record time is 9014 millis for 5000 increments or 5000 calls to recordDebit()
    One can see in the answer that its a huge number when one is expecting it to be somewhere around:
    EXPECTED ANSWER:
    5000 * 800 nanos( it takes 800 nanos for very increment) = 4000000 = 4 millis and its like 9014 millis
    How is there such a huge difference ????????? I have bruised thorugh it for like 3 days... i have lost all my hope.. Plz help..Also look at the next code..
    When i go to see in the log .. it shows me that every record took like from 2000 nanos to 6 to 7 millis i.e.7000000...
    HOw is this even possibly possible ??? where did it get all this extra time from...it should not be more than some 700 to 900 nanos ..
    Is there a bottleneck somewhere ????
    Now part 2:
    This thing has fazzed, dazzled , destroyed me.. I could not understand this and it has tossed all my concepts into the cupboard..
    Same stuff: JUST HAVE A LOOK AND ENJOY AND TELL ME WHATS GOING ON...Same code.. different way of incrementing data i.e synchronization is at a different place..but results are very highly improved...
    class BankHelper {
    // Some code of bank.. not relevant to my problem
    public Bank() {
    long time = System.nanoTime();
    abc.recordDebit(); // want to measure how much time this method takes
    abc.recordTimeForDebit(System.nanoTime() - time); // accumulating the total time the above method takes to calculate
    }The Bank method is called by another method which runs 50 threads , so at a time 50 threads could enter this method to record Debit...
    class abc {
    // Some code of bank.. not relevant to my problem
    public void recordDebit(){
    someotherclass.increment();
    } // this is not synchronized nowwwwwwww
    // I have put timers here too and it took like 1500 to 2500 nanos
    public synchronized void recordTimeForDebit(long time){
    record += time;
    Log.debug("Time taken to record drop for DEBIT " + record + " Millis " + time);
    class someotherclass{
    // Not relevant code
    public void increment(){
    someotherclass1.increment1();
    class someotherclass1{
    // Not relevant code
    public void increment1(){
    someotherclass2.increment2();
    class someotherclass2{
    // Not relevant code
    public synchronized void increment2(){
    someotherclass3.increment3();
    } //now its synchronized
    class someotherclass3{
    // Not relevat code
    public synchronized void increment3(){
    debit++;
    } //now its synchronized
    }ANSWER: Record is 135 millis for 5000 increments or 5000 calls to recordDebit()
    Expected time was : 5000 * 2500 = 125000000 = 125 millis (WOW .. AS EXPECTED)
    Please don't ask me why this code has been written this way..i know it goes and increment and does the same thing...but somehow when i measured it..
    overall time or the accumulated time for both codes varied like in huge numbers...even though latter code is actually a superset of previous code..
    HOW IS THERE SUCH A HUGE DIFFERENCE BETWEEN THE NUMBERS ???
    COULD BE BECAUSE OF THE POINT OF SYNCHRONIZATION ???
    Thank you..for going through all this..

    Triple post - http://forums.sun.com/thread.jspa?threadID=5334258&messageID=10438241#10438241

  • Query using progressive relaxation take more time for execution

    HI Gurus,
    I am creating a query using context index and progressive relaxation
    I had started using progressive relaxation after getting inputs from forum {thread:id=2333942} . Using progressive relaxation takes more than 7 seconds for every query. Is there any way we can improve the performance of the query?
    create table test_sh4 (text1 clob,text2 clob,text3 clob);
    begin
       ctx_ddl.create_preference ('nd_mcd', 'multi_column_datastore');
       ctx_ddl.set_attribute
          ('nd_mcd',
           'columns',
           'replace (text1, '' '', '''') nd1,
            text1 text1,
            replace (text2, '' '', '''') nd2,
            text2 text2');
       ctx_ddl.create_preference ('test_lex1', 'basic_lexer');
       ctx_ddl.set_attribute ('test_lex1', 'whitespace', '/\|-_+');
       ctx_ddl.create_section_group ('test_sg', 'basic_section_group');
       ctx_ddl.add_field_section ('test_sg', 'text1', 'text1', true);
       ctx_ddl.add_field_section ('test_sg', 'nd1', 'nd1', true);
       ctx_ddl.add_field_section ('test_sg', 'text2', 'text2', true);
       ctx_ddl.add_field_section ('test_sg', 'nd2', 'nd2', true);
    end;
    create index IX_test_sh4 on test_sh4 (text3)   indextype is ctxsys.context   parameters    ('datastore     nd_mcd   lexer test_lex1 section group     test_sg') ;
    alter index IX_test_sh4 REBUILD PARAMETERS ('REPLACE SYNC (ON COMMIT)') ;-- sync index on every commit.
    SELECT SCORE(1) score,t.* FROM test_sh4 t WHERE CONTAINS (text3,  '
    <query>
    <textquery>
    <progression>
    <seq>{GIFT GRILL STAPLES CARD} within text1</seq>
    <seq>{GIFTGRILLSTAPLESCARD} within nd1</seq>
    <seq>{GIFT GRILL STAPLES CARD} within text2</seq>
    <seq>{GIFTGRILLSTAPLESCARD} within nd2</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text1</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text2</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES%) or (%GRILL% and %STAPLES% and %CARD%) or (%GIFT% and %STAPLES% and %CARD%) or (%GIFT% and %GRILL% and %CARD%)) within text1</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES%) or (%GRILL% and %STAPLES% and %CARD%) or (%GIFT% and %STAPLES% and %CARD%) or (%GIFT% and %GRILL% and %CARD%)) within text2</seq>
    <seq>((%STAPLES% and %CARD%) or (%GIFT% and %GRILL%) or (%GRILL% and %CARD%) or (%GIFT% and %CARD%) or (%GIFT% and %STAPLES%) or (%GRILL% and %STAPLES%)) within text1</seq>
    <seq>((%STAPLES% and %CARD%) or (%GIFT% and %GRILL%) or (%GRILL% and %CARD%) or (%GIFT% and %CARD%) or (%GIFT% and %STAPLES%) or (%GRILL% and %STAPLES%)) within text2</seq>
    <seq>((%GIFT% , %GRILL% , %STAPLES% , %CARD%)) within text1</seq>
    <seq>((%GIFT% , %GRILL% , %STAPLES% , %CARD%)) within text2</seq>
    <seq>((!GIFT and !GRILL and !STAPLES and !CARD)) within text1</seq>
    <seq>((!GIFT and !GRILL and !STAPLES and !CARD)) within text2</seq>
    <seq>((!GIFT and !GRILL and !STAPLES) or (!GRILL and !STAPLES and !CARD) or (!GIFT and !STAPLES and !CARD) or (!GIFT and !GRILL and !CARD)) within text1</seq>
    <seq>((!GIFT and !GRILL and !STAPLES) or (!GRILL and !STAPLES and !CARD) or (!GIFT and !STAPLES and !CARD) or (!GIFT and !GRILL and !CARD)) within text2</seq>
    <seq>((!STAPLES and !CARD) or (!GIFT and !GRILL) or (!GRILL and !CARD) or (!GIFT and !CARD) or (!GIFT and !STAPLES) or (!GRILL and !STAPLES)) within text1</seq>
    <seq>((!STAPLES and !CARD) or (!GIFT and !GRILL) or (!GRILL and !CARD) or (!GIFT and !CARD) or (!GIFT and !STAPLES) or (!GRILL and !STAPLES)) within text2</seq>
    <seq>((!GIFT , !GRILL , !STAPLES , !CARD)) within text1</seq>
    <seq>((!GIFT , !GRILL , !STAPLES , !CARD)) within text2</seq>
    <seq>((?GIFT and ?GRILL and ?STAPLES and ?CARD)) within text1</seq>
    <seq>((?GIFT and ?GRILL and ?STAPLES and ?CARD)) within text2</seq>
    <seq>((?GIFT and ?GRILL and ?STAPLES) or (?GRILL and ?STAPLES and ?CARD) or (?GIFT and ?STAPLES and ?CARD) or (?GIFT and ?GRILL and ?CARD)) within text1</seq>
    <seq>((?GIFT and ?GRILL and ?STAPLES) or (?GRILL and ?STAPLES and ?CARD) or (?GIFT and ?STAPLES and ?CARD) or (?GIFT and ?GRILL and ?CARD)) within text2</seq>
    <seq>((?STAPLES and ?CARD) or (?GIFT and ?GRILL) or (?GRILL and ?CARD) or (?GIFT and ?CARD) or (?GIFT and ?STAPLES) or (?GRILL and ?STAPLES)) within text1</seq>
    <seq>((?STAPLES and ?CARD) or (?GIFT and ?GRILL) or (?GRILL and ?CARD) or (?GIFT and ?CARD) or (?GIFT and ?STAPLES) or (?GRILL and ?STAPLES)) within text2</seq>
    <seq>((?GIFT , ?GRILL , ?STAPLES , ?CARD)) within text1</seq>
    <seq>((?GIFT , ?GRILL , ?STAPLES , ?CARD)) within text2</seq>
    </progression>
    </textquery>
    <score datatype="FLOAT" algorithm="default"/>
    </query>',1) >0 ORDER BY score(1) DESC

    Progressive relaxation works best when you're only selecting a limited number of rows. If you fetch ALL the rows which satisfy the query, then all the steps in the relaxation will have to run regardless.
    If you fetch - say - the first 10 results, then if the first step of the relaxation provides 10 results then there is no need to execute the next step (in fact, due to internal buffering, that won't be exactly true but it's conceptually correct).
    The simplest way to do this is reword the query as
    SELECT * FROM (
    ( SELECT SCORE(1) score,t.* FROM test_sh4 t WHERE CONTAINS (text3, '
    <query>
    <textquery>
    </textquery>
    <score datatype="FLOAT" algorithm="default"/>
    </query>',1) >0 ORDER BY score(1) DESC
    WHERE ROWNUM <= 10
    You've discovered that leading wild cards don't work too well unless you use SUBSTRING_INDEX. I would encourage you to avoid them altogether if possible, or push them down much lower in the progressive relaxation. Usually, GIFT% is a useful expression (matches GIFTS, GIFTED, etc), %GIFT% is generally no more effective.
    There are a lot of steps in your progressive relaxation. It you wanted to reduce the number of steps, you could change:
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text1</seq>
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text2</seq>
    to
    <seq>((%GIFT% and %GRILL% and %STAPLES% and %CARD%)*2) within text1 ACCUM ((%GIFT% and %GRILL% and %STAPLES% and %CARD%)) within text2</seq>
    I don't know if this would have any performance benefits - but it's worth trying it to see.

  • How do we tune a query that takes more time for the first time?

    Hi,
    First time it takes 20 secs and subsequent times 2 secs.
    Let me know if you need more info
    Thanks

    Following are the parameters set at the DB level.
    .__db_cache_size=2214592512
    .__java_pool_size=16777216
    .__large_pool_size=16777216
    .__shared_pool_size=1543503872
    .__streams_pool_size=33554432
    *._optimizer_cost_based_transformation='off'
    *._smu_debug_mode=4
    *.compatible='10.2.0.1.0'
    *.cursor_sharing='SIMILAR'
    *.db_block_size=8192
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.job_queue_processes=10
    *.open_cursors=5000
    *.optimizer_mode='ALL_ROWS'
    *.pga_aggregate_target=1277165568
    *.processes=250
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sessions=1000
    *.sga_target=3833593856
    *.undo_management='AUTO'
    *.undo_tablespace='UBPTAB_UNDO'
    Execution Plan
    Plan hash value: 2107556093
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 45157 | 29M| | 9094 (1)| 00:01
    :50 |
    | 1 | SORT ORDER BY | | 45157 | 29M| 78M| 9094 (1)| 00:01
    :50 |
    |* 2 | TABLE ACCESS FULL| <tname>| 45157 | 29M| | 2564 (2)| 00:00
    :31 |
    Following are result from dba_tab_statistics.
    NUM_ROWS BLOCKS EMPTY_BLOCKS AVG_CACHE_HIT_RATIO AVG_ROW_LEN
    112704 11520 768 685
    AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS
    0 0
    Follwing was the time it has taken to generate the explain plan report after issuing the below command.
    set autotrace traceonly
    Elapsed: 00:00:15.49
    Following is the statistics
    Statistics
    0 recursive calls
    0 db block gets
    11380 consistent gets
    0 physical reads
    0 redo size
    8823636 bytes sent via SQL*Net to client
    37731 bytes received via SQL*Net from client
    3019 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    45267 rows processed
    Pl let us know how to tune the same.
    Thank you all for the help

  • How the implementation differs between BW and BI , Is BI takes more time fo

    Hi All,
    I would like to know difference between implemenation and time lines for MM as mentioned below.
    How the implementation differs between BW and BI , Is BI takes more time for implementing MM module  than on BW?
    Thanks in advanced. (Full points will be awarded)
    With Regards,
    PCR

    Hi Timo,
    Thanks for response!
    But as i read from the following url: http://docs.oracle.com/cd/E15051_01/apirefs.1111/e10653/oracle/jbo/ViewObject.html, the setQueryTimeOut(int timeOutMills), the timeOut is mentioned in milliseconds. Please correct me if I am wrong.
    and i have overriden the executeQuery() method in the View Object Impl class as shown below:
    public void executeQuery() {
    Map sessionScope = ADFContext.getCurrent().getSessionScope();
    sessionScope.put("MyQuery", this);
    try {
    super.executeQuery();
    } finally {
    sessionScope.remove("MyQuery");
    throw new JboException("Query Taking too long to respond");
    and in the JAVA class i am calling the above method like this:
    monitor.setQueryTimeOut(6);
    monitor.executeQuery();
    But the issue is:
    1. The above exception message is getting carried forward to other pages as well. I mean somewhere in the session/ADFContext this message is being saved and error comes up/pops up when i click on other tabs of the page. How do i clear this?
    2. The above exception message is coming for the first time but when i click the 'Submit' button second time, i am getting the results and also the message that 'Query is taking too long to respond'. This should not be the case, everytime it should show the same message as the timeout limit is less and the query should end without fetching the results.
    Kindly let me know how to resolve the above issues, any pointers will be helpful.
    Thanks in advance.
    Edited by: user9223904 on Nov 3, 2012 4:42 AM

  • Publishing EJBs takes more time in Oracle Weblogic 10.3 workshop

    Hi,
    We recently migrated from Weblogic 9.2 to Oracle Weblogic 10.3 workshop.
    I have a ejb project which has more than 30 ejb's(both entity and session ejbs).
    The problem is: whenever I modify the code inside a method and save, it builds the project automatically. After that when I try to publish the module, it takes around 5 - 10 minutes for publishing.
    Points to note are : The ejb I am modifying has reference to other (10 - 20) ejbs. Hence it takes more time for even for single ejb change.
    however, when i modify an ejb which has no reference to ejb, takes less time to publish.
    My question is : is there a way to reduce the publishing time in this scenario.
    Thanks in advance!

    There is a special forum for Workshop issues:
    Workshop
    Try there.

  • Multiple Posting change notice created for one material document

    Hi All,
    The scenario is that the user needs to transfer material from unrestricted to quality stock type. while doing so the storage type is different than the actual storage type for the material. Meaning if the material is normally stored in high rack storage type, when it is found that the material is damaged or expired it need to be moved to the quality storage type. For this the user will first create  material document in IM with movement type 322 transferring material from unrestricted stock to qualtiy stock. A PCN will be created in back ground which will in turn be converted manually by the user to a TO. while doing so the user will pick the quant manually from the required storage type and select the destination storage type as the quality or quanranntine area.
    The issue here is that system creates one PCN for each material document line item. The requirement is that the system should create only one PCN with multiple lines for one Material document.
    The setting in the movememnt type clearly says that it will behave as it is behaving.
    Is there any other way or setting by which we can create one PCN with multiple line items for a material document.
    Would look forward to your replies.
    Regards,
    Jeetendra

    Thanks and Sorry for the delayed reply. We have now convinced the users that the system behaviour is standard and we cannot change the same.
    To your question about the need to have one PCN with multiple lines please note that the setup is such that when material document is created for transferring material from unrestricted to quality and vice versa this document is created with multiple materials in one go. Now when the PCN is to be converted to TO then the user ends up in creating number of TO's equal to the number of lines in the Material Document. We wanted to avoid this and hence this was posted in SDN.

  • Count (*)  for select stmt take more time than  execute a that sql stmt

    HI
    count (*) for select stmt take more time than execute a that sql stmt
    executing particular select stmt take 2.47 mins but select stmt is using the /*+parallel*/ (sql optimer) in that sql  command for faster execute .
    but if i tried to find out total number of rows in that query it takes more time ..
    almost 2.30 hrs still running to find count(col)
    please help me to get count of row faster.
    thanks in advance...

    797525 wrote:
    HI
    count (*) for select stmt take more time than execute a that sql stmt
    executing particular select stmt take 2.47 mins but select stmt is using the /*+parallel*/ (sql optimer) in that sql  command for faster execute .
    but if i tried to find out total number of rows in that query it takes more time ..
    almost 2.30 hrs still running to find count(col)
    please help me to get count of row faster.
    thanks in advance...That may be because your client is displaying only the first few records when you are running the "SELECT *". But when you run "COUNT(*)", the whole records has to be counted.
    As already mentined please read teh FAQ to post tuning questions.

  • MacBook Pro takes much time for Shutdown (More than 1 min.)

    I have a MacBook Pro, and some weeks ago, it takes much time for shutdown.
    I've tried to install the 10.5.2 update, but nothing solves.
    My mac takes for shutdown 1 min & 30 seconds every time. I don't understand. Why?
    What can I do? I tried to repair permissions and reset the PMU, but the problem still there.
    Help me! Please!
    Thanks
    Sorry, but I'm spanish and it's possible that I've made more mistakes writing in English.

    Thanks. I tried to dissable an EyeTv option, then EyeConnect don't appears in the Activity Monitor. This is the result:
    Now, my MacBook Pro takes only 35 seconds for shutdown. I think is better than yesterdey, but is more than the 5 seconds that you described in the last post. Is 35 seconds a good time? In this 35 seconds, I only can see the background image, without icons and without the finder menu bar. After 35 seconds, Mac is off.
    How can I disable iDisk sync? I have a free mac Account, but is expired and then I can't use iDisk, only the name in iChat. But, is iDisk enabled?

  • When i put my Mac for sleep it takes more time than normal ( 20 secs). Sometimes, coming back from sleep the system is not responding (freeze).

    When i put my Mac for sleep it takes more time than normal (>20 secs). Sometimes, coming back from sleep the system is not responding (freeze).

    Perform SMC and NVRAM resets:
    http://support.apple.com/en-us/HT201295
    http://support.apple.com/en-us/HT204063
    The try a safe boot:
    http://support.apple.com/en-us/HT201262
    Any change?
    Ciao.

  • Save for web - system take more time

    Hi, We used adobe photo shop cloud one of our blog for optimized images. We use "save for web" option in photoshop. But its will take more time. What is the reason. How to solve this issue.

    A lot more information about your hardware and software is needed.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CC", but something like CC2014.v.2.2) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    a screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • What is the reason for query take more time to execute

    Hi,
    What is the reason for the query take more time inside procedure.
    but if i execute that query alone then it excute within a minutes.
    query includes update and insert.

    I have a insert and update query when I execute
    without Procedure then that query execute faster but
    If I execute inside procedure then It takes 2 hours
    to execute.Put you watch 2 hours back and the problem will disappear.
    do you understand what I want to say?I understood what you wanted to say and I understood you didn't understood what I said.
    What does the procedure, what does the query, how can you say the query does the same as the procedure that takes longer. You didn't say anything useful to have an idea of what you're talking about.
    Everyone knows what means that something is slower than something else, but it means nothing if you don't say what you're talking about.
    To begin with something take a look at this
    When your query takes too long ...
    especially the part regarding the trace.
    Bye Alessandro

  • MRP job takes more time (Duration / Sec)

    Hello PP Guru’s,
    I have below situation in production environment,
    MRP job for plant – A (Takes more time – 14.650)
    MRP job for plant – B (Takes less time – 4.512)
    When I compare the variant / attributes with plant A and B, I observe only difference in attribute is scheduling (2 - Lead Time Scheduling and Capacity Planning) for plant A.
    For plant B scheduling (1- Determination of Basic Dates for Planned) it was updated.
    So in my observation this scheduling is playing a major role for MRB job which takes more time in plant – A.
    I am in process of changing the variant attribute for plant – A from scheduling 2 to scheduling 1.
    I wanted to know from experts whether if I change any impact / problem will happen in future for plant A or not.
    Please let me know what all the hidden impacts are there if I change the scheduling in variant attribute.
    I look forward to your valuable input to reduce time for my MRP related job.
    Regards,
    Kumar S

    Hi Kumar,
    You have no need to change the inhouse production time you just need to update the Lot size dependent  inhouse production time in work scheduling view of material master. That you can do by scheduling the routing/recipe.
    Transactions CA97 or CA97N can be used to update the in-house production time with the information from the routing.
    If business don't want to have the capacity planning for planned orders then you change the scheduling from 2 to 1 basic date scheduling.
    Expert Caetano already answer you query
    The reports listed below can be used to compare the MRP past executions regarding the runtime:
    RMMDMONI: This report compares the runtime of the MRP execution and also provides the total of planning elements (planned orders, purchase requisitions, etc) changed, created or deleted. It also shows which planning parameters where used and how much time MRP spent on each step (database read, BOM explosion, MRP calculation, scheduling, BAdIs, etc). With this information is possible to observe the relation of runtime and number of elements changed/created/deleted and also to see on which step MRP is taking more time.
    RMMDPERF: This report shows the "material hit list", that means, which materials had the highest runtime during the MRP execution and also on which step MRP is taking more time. Knowing which materials have the highest runtime, allow you to isolate the problem and reproduce it on MD03, where it is possible to run an ABAP or SQL trace for a more detailed analysis.
    Regards,
    R.Brahmankar

  • Select Query Takes more time

    Hi All,
    I have cloned KSB1 tcode to custom one as required by business.
    Below query takes more time than excepted.
    Here V_DB_TABLE = COVP.
    Values in Where clause are as follows
    OBNJR in ( KSBB010000001224  BT  KSBB012157221571)
    GJAHR in blank
    VERSN in '000'
    WRTTP in '04' and '11'
    all others are blank
    VT_VAR_COND = ( CPUDT BETWEEN '20091201' and '20091208' )
    SELECT (VT_FIELDS) INTO CORRESPONDING FIELDS OF GS_COVP_EXT      
                        FROM (V_DB_TABLE)                             
                        WHERE LEDNR = '00'                            
                        AND   OBJNR IN LR_OBJNR                       
                        AND   GJAHR IN GR_GJAHR                       
                        AND   VERSN IN GR_VERSN                       
                        AND   WRTTP IN GR_WRTTP                       
                        AND   KSTAR IN LR_KSTAR                       
                        AND   PERIO IN GR_PERIO                       
                        AND   BUDAT IN GR_BUDAT                       
                        AND   PAROB IN GR_PAROB                       
                        AND   (VT_VAR_COND).    
    Checked in table for this condition it has only 92 entries.
    But when i execute program takes long time as 3 Hrs.
    Could any one help me on this

    >1.Dont use SELECT/ENDSELECT instead use INTO TABLE addition .
    > 2.Avoid using corresponding addition.create a type and reference it.
    > If the select is going for dump beacause of storage limitations ,then use Cursors.
    you got three large NOs .... all three recommendations are wrong!
    The SE16 test is going in the right direction ... but what was filled. Nobody knows!!!!
    Select options:
    Did you ever try to trace the SE16?  The generic statement has for every field an in-condition!
    Without the information what was actually filled, nobody can say something there
    are at least 2**n  combinations possible!
    Use ST05 for SE16 and check actual statement plus explain!

Maybe you are looking for