Plz  explain why concatenate statement is used in BDC

Please do not post subject or content as ALL CAPITALS
hi friends,
                for the first time i am doing bdc table control.  i just cant make out the use of concatenate statement in that code.  i have gone thru some bdc table control codes in the forum but almost everywhere the concatenate statement has been used.  can u plz explain the use of that statement . THANKS IN ADVANCE.   
eg:  THIS IS A CODE FROM ONE OF THE FORUM POSTS, SO I AM NOT COPYING IT FULLY.
     I HAVE HIGHLIGHTED THE  CONCATENATE PART.
DATA : M(2) TYPE C,
N(2) TYPE C,
TEMP(50) TYPE C,
WA_KUNNR LIKE KNA1-KUNNR.
****POPULATING HEADER DATA *******
LOOP AT IT_HEADER INTO WA_HEADER.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_HEADER-KUNNR
IMPORTING
OUTPUT = WA_HEADER-KUNNR
SELECT SINGLE KUNNR FROM KNA1 INTO WA_KUNNR WHERE KUNNR = WA_HEADER-KUNNR.
IF SY-SUBRC 0.
MESSAGE I004(ZZS_MSG).
ENDIF.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '0101'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'VBAK-SPART'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'VBAK-AUART' WA_HEADER-AUART.
PERFORM BDC_FIELD USING 'VBAK-VKORG' WA_HEADER-VKORG.
PERFORM BDC_FIELD USING 'VBAK-VTWEG' WA_HEADER-VTWEG.
PERFORM BDC_FIELD USING 'VBAK-SPART' WA_HEADER-SPART.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'VBKD-BSTKD' WA_HEADER-BSTKD.
PERFORM BDC_FIELD USING 'KUAGV-KUNNR' WA_HEADER-KUNNR.
PERFORM BDC_FIELD USING 'KUWEV-KUNNR' WA_HEADER-KUNNR1.
PERFORM BDC_FIELD USING 'RV45A-KETDAT'
'21.10.2008'.
PERFORM BDC_FIELD USING 'RV45A-KPRGBZ'
'D'.
PERFORM BDC_FIELD USING 'VBKD-PRSDT'
'21.10.2008'.
**********ITEM LOOP TO FIND NO.OF ITEMS ************
M = 0.
LOOP AT IT_ITEMS INTO WA_ITEMS WHERE BSTKD = WA_HEADER-BSTKD.
M = M + 1
ENDLOOP.
CONCATENATE 'VBAP-PS_PSP_PNR(' M ')' INTO TEMP.
PERFORM BDC_FIELD USING 'BDC_CURSOR' TEMP.
CLEAR TEMP.
******POPULATING ITEMS DATA ********
N = 1.
LOOP AT IT_ITEMS INTO WA_ITEMS WHERE BSTKD = WA_HEADER-BSTKD.
CONCATENATE 'RV45A-MABNR(' N ')' INTO TEMP.
PERFORM BDC_FIELD USING TEMP WA_ITEMS-MABNR.
CLEAR TEMP.
CONCATENATE 'RV45A-KWMENG(' N ')' INTO TEMP.PERFORM BDC_FIELD USING TEMP WA_ITEMS-KWMENG.
CLEAR TEMP.
CONCATENATE 'VBAP-PS_PSP_PNR(' N ')' INTO TEMP.
PERFORM BDC_FIELD USING TEMP WA_ITEMS-WBS.
CLEAR TEMP.
N = N + 1.
ENDLOOP.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'VBKD-BSTKD' WA_HEADER-BSTKD.
PERFORM BDC_FIELD USING 'KUAGV-KUNNR' WA_HEADER-KUNNR.
PERFORM BDC_FIELD USING 'KUWEV-KUNNR' WA_HEADER-KUNNR1.
PERFORM BDC_FIELD USING 'RV45A-KETDAT'
'21.10.2008'.
PERFORM BDC_FIELD USING 'RV45A-KPRGBZ'
'D'.
PERFORM BDC_FIELD USING 'VBKD-PRSDT'
'21.10.2008'.
PERFORM BDC_FIELD USING 'VBKD-ZTERM'
'N30'.
PERFORM BDC_FIELD USING 'VBKD-INCO1'
'FOB'.
PERFORM BDC_FIELD USING 'VBKD-INCO2'
'NEW YORK'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RV45A-MABNR(02)'.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=PKO1'.
PERFORM BDC_FIELD USING 'VBKD-BSTKD' WA_HEADER-BSTKD.
PERFORM BDC_FIELD USING 'KUAGV-KUNNR' WA_HEADER-KUNNR.
PERFORM BDC_FIELD USING 'KUWEV-KUNNR' WA_HEADER-KUNNR1.
PERFORM BDC_FIELD USING 'RV45A-KETDAT'
'21.10.2008'.
PERFORM BDC_FIELD USING 'RV45A-KPRGBZ'
'D'.
PERFORM BDC_FIELD USING 'VBKD-PRSDT'
'21.10.2008'.
PERFORM BDC_FIELD USING 'VBKD-ZTERM'
'N30'.
PERFORM BDC_FIELD USING 'VBKD-INCO1'
'FOB'.
PERFORM BDC_FIELD USING 'VBKD-INCO2'
'NEW YORK'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'VBAP-POSNR(01)'.
PERFORM BDC_FIELD USING 'RV45A-VBAP_SELKZ(01)'
'X'.
LOOP AT IT_ITEMS INTO WA_ITEMS WHERE BSTKD = WA_HEADER-BSTKD.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '5003'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KOMV-KBETR(07)'.
PERFORM BDC_FIELD USING 'KOMV-KSCHL(07)' WA_ITEMS-KSCHL.
PERFORM BDC_FIELD USING 'KOMV-KBETR(07)' WA_ITEMS-KBETR.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '5003'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=POS+'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KOMV-KSCHL(08)'.
ENDLOOP.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '5003'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/EBACK'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KOMV-KSCHL(08)'.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=SICH'.
CALL TRANSACTION 'VA01' USING IT_BDCDATA MODE 'A'.
REFRESH IT_BDCDATA.
ENDLOOP.
u2022     Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR WA_BDCDATA.
WA_BDCDATA-PROGRAM = PROGRAM.
WA_BDCDATA-DYNPRO = DYNPRO.
WA_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_BDCDATA TO IT_BDCDATA.
ENDFORM. "BDC_DYNPRO
u2022     Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL SPACE.
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = FNAM.
WA_BDCDATA-FVAL = FVAL.
APPEND WA_BDCDATA TO IT_BDCDATA.
ENDIF.
ENDFORM. "BDC_FIELD
Edited by: Matt on Mar 9, 2009 4:38 PM

Every input/output field on the screen has its own name.(for example: RV45A-KETDAT)
PERFORM BDC_FIELD USING 'RV45A-KETDAT' '21.10.2008'.
means fill the date '21.10.2008' into the screen field 'RV45A-KETDAT'.
CONCATENATE 'RV45A-MABNR(' N ')' INTO TEMP.
PERFORM BDC_FIELD USING TEMP WA_ITEMS-MABNR.
There are some special input fields on the screen (table control). In fact, it's a table.
RV45A-MABNR
RV45A-KWMENG
other fields...
RV45A-MABNR(01)
RV45A-KWMENG(01)
RV45A-MABNR(02)
RV45A-KWMENG(02)
RV45A-MABNR(..)
RV45A-KWMENG(..)
RV45A-MABNR(N)
RV45A-KWMENG(N)
so, the code means fill the values line by line.
and, I recommend you to learn more basic knowledge of dynpro.

Similar Messages

  • Why concatenate statement suppressing spaces !!

    <i>Hello Friends,
                  I like give some spaces in a concatenate statement, but it is suppresing the spaces.
    for ex: <b>concatenate 'sundar' '      ' 'g' into name</b>.
    but the name contains <b>'sundarg'</b> only.
    Thank you for your valuable time.
    Senthil</i>

    hi senthil
    <b>
    Syntax:</b>
    CONCATENATE dobj1 dobj2 ...  INTO result 
    <b>                   [SEPARATED BY sep].
    Example:</b>
    DATA: t1(10) TYPE c VALUE 'We',
          t2(10) TYPE c VALUE 'have',
          t3(10) TYPE c VALUE 'all',
          t4(10) TYPE c VALUE 'the',
          t5(10) TYPE c VALUE 'time',
          t6(10) TYPE c VALUE 'in',
          t7(10) TYPE c VALUE 'the',
          t8(10) TYPE c VALUE 'world',
          result TYPE string.
    CONCATENATE t1 t2 t3 t4 t5 t6 t7 t8
                INTO result.
    CONCATENATE t1 t2 t3 t4 t5 t6 t7 t8
                INTO result SEPARATED BY space.
    <b>output:</b>
    We have all the time in the world

  • Why we need to use weblogic...??

    I am new to weblogic.....
    can any one please explain why we need to use weblogic ..???

    Do you mean why would you use any application server in general, or specifically weblogic?

  • Why can I not use commas in the Author part? They change into semicolons!

    I'm just a simple user, not a technician, but you probably are!
    Why is it that in CS2 XMP sees the usage of a comma, in the File Info Author field, as a fieldseparator and changes it into a semicolon?
    Whilst it does not change the comma in the Author Title!
    Since the early versions of Photoshop we fill the Author field (iptc 80) with the name of the photographer like Name, Surname.
    Our photomanagement system uses iptc 80 (byline) as photographer field but only shows Name now, instead of Name, Surname.
    Anyone of you can explain why we can't use a comma anymore? and when we use a comma it changes into a semicolon.
    I should expect that using a semicolon would act as field separator....
    Thanks in advance,
    [email protected]

    Are any of you going to the Adobe Developer Conference scheduled to be held for plugin providers at San Jose on Nov 7/8?

  • What is commitment item in sap ps, why do we use it , plz explain...thankx in advance

    what is commitment item in sap ps, why do we use it , plz explain...thankx in advance

    Hi
    Commitment item is a term used in FM module.
    It is by the way of Commitment item cost is posted and budget check is occurred in FM (Fund centers)
    Google it to understand it in detail.
    Regards
    Saurabh

  • Why I Can't use procedure in select statement

    Why I Can't use procedure in select statement

    We can use function in select statement but we couldn't use procedure with one out parameters in select statement... You can use Function because they are designed for this but procedure are not. Functions can return value (without OUT parameter) which can be used in SELECT whereas procedures do not have such concept. As you can see in the above post you can not call even functions also if it has any out parameter.
    I have just trying to use procedure in select statement ..for this I require technical answer..The technical answer is because conceptually procedure is for doing set of operation, performning DMLs on the tables , whereas functions are for processing and producing a single result. Functions are basically for not using INSERT/UPDATE/DELETE in it. That is the reason they are allowed to be used in SELECT because conceptually they are not supposed to do any data changes.
    Regards,
    Avinash

  • I am using elements 10 and only getting audio not video.  Can anyone please explain why? I am a total newbie to video.

    I am using elements 10 and only getting audio not video.  Can anyone please explain why? I am a total newbie to video.

    greenfrogstone
    Just saw your thread, and it looked like a candidate for the Premiere Elements 10 NVIDIA GeForce Roll Back the Driver issue. If your computer uses a NVIDIA GeForce video card/graphics card, then the following applies to you. You do not want to update the driver. Rather you want to roll back the driver version, probably to about May 2013. For your convenience I have done a copy/paste of the forum announcement which gives all the details and fix of the matter.
    Premiere Elements 10 NVIDIA Video Card Driver Roll Back
    If you are a Premiere Elements 10 user whose Windows computer uses a NVIDIA GeForce video card and you are experiencing Premiere Elements 10 display and/or unexplained program behavior, then your first line of troubleshooting needs to be rolling back the video card driver version instead of assuring that it is up to date.
    Since October 2013 to the present, there have been a growing number of reports about display and unexplained workflow glitches specific to the Premiere Elements 10 user whose Windows computer has a NVIDIA GeForce video card. If this applies to you, then the “user to user” remedy is to roll back the NVIDIA GeForce video card driver as far as is necessary to get rid of the problems. The typical driver roll back has gone back as far as March – July 2013 in order to get a working Premiere Elements 10. Neither NVIDIA nor Adobe has taken any corrective action in this regard to date, and none is expected moving forward.
    Since October 2013, the following thread has tried to keep up with the Premiere Elements 10 NVIDIA reports
    http://forums.adobe.com/thread/1317675
    Older NVIDIA GeForce drivers can be found
    http://www.nvidia.com/Download/Find.aspx?lang=en-us
    A February 2014 overview of the situation as well as how to use the older NVIDIA GeForce drivers for the driver roll back can be found
    http://atr935.blogspot.com/2014/02/pe10-nvidia-video-card-roll-back.html
    This matter has been very specific to the Premiere Elements 10 NVIDIA GeForce card user. So, if your computer is using other than a NVIDIA GeForce card, it is likely that the message does not apply to you, and we can then explore other troubleshooting possibities.
    Looking forward to your follow up. Do not hesitate to ask for clarification on anything written here.
    Thanks.
    ATR

  • Can anyone explain why my Dell laptop and my iphone can "see" a server in Luton when using a wireless broadband (I get 20 Mbps download speed) but my ipad can not see this server and finds one in Milton Keynes which gives me 0.37 download speed.

    Can anyone explain why my Dell laptop and my iphone can "see" a server in Luton when using a wireless broadband (I get 20 Mbps download speed) but my ipad can not see this server and finds one in Milton Keynes which gives me 0.37 download speed.

    Can anyone explain why my Dell laptop and my iphone can "see" a server in Luton when using a wireless broadband (I get 20 Mbps download speed) but my ipad can not see this server and finds one in Milton Keynes which gives me 0.37 download speed.

  • Can Anyone help to explain why character \ is used in Route pattern.

    Can Anyone help to explain why character \ is used in Route pattern. also if you could explain *11\+1.289201XXXX ?

    Well, I think the proper characterization would be that the design is based on a loose interpretation of RegEx. For instance, the asterisk "*" is typically used as the directive for zero or more occurrences of the preceding character. In the UCM dial plan, the * is a valid digit and someone decided to avoid the nastiness of escaping asterisk every time it is needed. On a related point, in standard regex build the "?" is used for a 0 or 1 match. In UCM, the "?" is 0 or more (so, it is like the asterisk in that way).
    That said, I get your point. Someone says "hey, we need wild cards" and the likely place to start pulling examples is RegEx.
    HTH
    -Bill
    (b) http://ucguerrilla.com
    (t) @ucguerrilla
    Please remember to rate helpful responses and identify helpful or correct answers.

  • HT204032 Why can you not use powernap with a custom order iMac with solid state?

    Why can you not use powernap with a custom order iMac with solid state?
    Find it quite ridiculous that a 3 year old mba supports it and not a new iMac

    Agreed.  Why wouldn't you want your Photostream updated while your iMac is sleeping?  I am bummed about this.

  • Since downloaded ios7 on ipad 3G , I can only use it in the state of GOA, INDIA, where I live. Why can't I use it outside GOA ?

    Why can't I use my ipad 3G outside my living area since I've downloaded IOS 7 ? It's frustrating

    Check with your service provider and see if it affected something in their profile.

  • Problems with explain plan and statement

    Hi community,
    I have migrated a j2ee application from DB2 to Oracle.
    First some facts of our application and database instance:
    We are using oracle version 10.2.0.3 and driver version 10.2.0.3. It runs with charset Unicode 3.0 UTF-8.
    Our application is using Tomcat as web container and jboss as application server. We are only using prepared statements. So if I talk about statements I always mean prepared statements. Also our application is setting the defaultNChar property to true because every char and varchar field has been created as an nchar and nvarchar.
    We have some jsp sites that contains lists with search forms. Everytime I enter a value to the form that returns a filled resultset, the lists are performing great. But everytime I enter a value that returns an empty resultset, the lists are 100 times slower. The jsp sites are running in the tomcat environment and submitting their statements directly to the database. The connections are pooled by dbcp. So what can cause this behaviour??
    To anaylze this problem I started logging all statements and filled-in search field values and combinations that are executed by the lists described above. I also developed a standalone helper tool that reads the logged statements, executes them to the database and generates an explain plan for every statement. But now there appears a strange situation. Every statement, that performs really fast within our application, is now executed by the helper tool extremely slow. So I edited some jsp pages within our application to force an explain plan from there (tomcat env). So when I'm executing the same statement I'm getting with the exactly same code two completely different explain plans.
    First the statement itself:
    select LINVIN.BBASE , INVINNUM , INVINNUMALT , LINVIN.LSUPPLIERNUM , LSUPPLIERNUMEXT , LINVIN.COMPANYCODE , ACCOUNT , INVINTXT , INVINSTS , INVINTYP , INVINDAT , RECEIPTDAT , POSTED , POSTINGDATE , CHECKCOSTCENTER , WORKFLOWIDEXT , INVINREFERENCE , RESPONSIBLEPERS , INVINSUM_V , INVINSUMGROSS_V , VOUCHERNUM , HASPOSITIONS , PROCESSINSTANCEID , FCURISO_V , LSUPPLIER.AADDRLINE1 from LINVIN, LSUPPLIER where LINVIN.BBASE = LSUPPLIER.BBASE and LINVIN.LSUPPLIERNUM = LSUPPLIER.LSUPPLIERNUM and LINVIN.BBASE = ? order by LINVIN.BBASE, INVINDAT DESC
    Now the explain plan from our application:
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 101 | 28583 | 55 (0)| 00:00:01 |
    | 1 | NESTED LOOPS | | 101 | 28583 | 55 (0)| 00:00:01 |
    | 2 | TABLE ACCESS BY INDEX ROWID| LINVIN | 93709 | 12M| 25 (0)| 00:00:01 |
    |* 3 | INDEX RANGE SCAN | LINV_INVDAT | 101 | | 1 (0)| 00:00:01 |
    | 4 | TABLE ACCESS BY INDEX ROWID| LSUPPLIER | 1 | 148 | 1 (0)| 00:00:01 |
    |* 5 | INDEX UNIQUE SCAN | PK_177597 | 1 | | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    3 - access("LINVIN"."BBASE"=:1)
    filter("LINVIN"."BBASE"=:1)
    5 - access("LSUPPLIER"."BBASE"=:1 AND "LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    Now the one from the standalone tool:
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 93773 | 25M| | 12898 (1)| 00:02:35 |
    | 1 | SORT ORDER BY | | 93773 | 25M| 61M| 12898 (1)| 00:02:35 |
    |* 2 | HASH JOIN | | 93773 | 25M| 2592K| 7185 (1)| 00:01:27 |
    | 3 | TABLE ACCESS BY INDEX ROWID| LSUPPLIER | 16540 | 2390K| | 332 (0)| 00:00:04 |
    |* 4 | INDEX RANGE SCAN | LSUPPLIER_HAS_BASE_FK | 16540 | | | 11 (0)| 00:00:01 |
    | 5 | TABLE ACCESS BY INDEX ROWID| LINVIN | 93709 | 12M| | 6073 (1)| 00:01:13 |
    |* 6 | INDEX RANGE SCAN | LINVOICE_BMDT_FK | 93709 | | | 84 (2)| 00:00:02 |
    Predicate Information (identified by operation id):
    2 - access("LINVIN"."BBASE"="LSUPPLIER"."BBASE" AND "LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    4 - access("LSUPPLIER"."BBASE"=:1)
    6 - access("LINVIN"."BBASE"=:1)
    The size of the tables are: LINVIN - 383.692 Rows, LSUPPLIER - 115.782 Rows
    As you can see the one executed from our application is much faster than the one from the helper tool. So why picks oracle a completely different explain plan for the same statement? An why is a hash join much slower than a nested loop? Because If I'm right a nested loop should only be used when the tables are pretty small..
    I also tried to play with some parameters:
    I set optimizer_index_caching to 100 and optimizer_index_cost_adj to 30. I also changed optimizer_mode to FIRST_ROWS_100.
    I would really appreciated, if somebody can help me with this issue, because I'm really getting more and more distressed...
    Thanks in advance,
    Tobias
    Edited by: tobiwan on Sep 3, 2008 11:49 PM
    Edited by: tobiwan on Sep 3, 2008 11:50 PM
    Edited by: tobiwan on Sep 4, 2008 12:01 AM
    Edited by: tobiwan on Sep 4, 2008 12:02 AM
    Edited by: tobiwan on Sep 4, 2008 12:04 AM
    Edited by: tobiwan on Sep 4, 2008 12:06 AM
    Edited by: tobiwan on Sep 4, 2008 12:06 AM
    Edited by: tobiwan on Sep 4, 2008 12:07 AM

    tobiwan wrote:
    Hi again,
    Here ist the answer:
    The problem, because I got two different explain plans, was that the external tool uses the NLS sesssion parameters coming from the OS which are in my case "de/DE".
    Within our application these parameters are changed to "en/US"!! So if I'm calling in my external tool the java function Locale.setDefault(new Locale("en","US")) before connecting to the database the explain plans are finally equal.That might explain why you got two different execution plan, because one plan was obviously able to avoid a SORT ORDER BY operation, whereas the second plan required to run SORT ORDER BY operation, obviously because of the different NLS_SORT settings. An index by default uses the NLS_SORT = 'binary' order whereas ORDER BY obeys the NLS_SORT setting, which probably was set to 'GERMAN' in your "external tool" case. You can check the "NLS_SESSION_PARAMETERS" view to check your current NLS_SORT setting.
    For more information regarding this issue, see my blog note I've written about this some time ago:
    http://oracle-randolf.blogspot.com/2008/09/getting-first-rows-of-large-sorted.html
    Now let me make a guess why you observe the behaviour that it takes so long if your result set is empty:
    The plan avoiding the SORT ORDER BY is able to return the first rows of the result set very quickly, but could take quite a while until all rows are processed, since it requires potentially a lot of iterations of the loop until everything has been processed. Your front end probably by default only display the first n rows of the result set and therefore works fine with this execution plan.
    Now if the result set is empty, depending on your data, indexes and search criteria, Oracle has to work through all the data using the inefficient NESTED LOOP approach only to find out that no data has been found, and since your application attempts to fetch the first n records, but no records will be found, it has to wait until all data has been processed.
    You can try to reproduce this by deliberately fetching all records of a query that returns data and that uses the NESTED LOOP approach... It probably takes as long as in the case when no records are found.
    Note that you seem to use bind variables and 10g, therefore you might be interested that due to the "bind variable peeking" functionality you might potentially end up with "unstable" plans depending on the values "peeked" when the statement is parsed.
    For more information, see this comprehensive description of the issue:
    http://www.pythian.com/blogs/867/stabilize-oracle-10gs-bind-peeking-behaviour-by-cutting-histograms
    Note that this changes in 11g with the introduction of the "Adaptive Cursor Sharing".
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Why don't be used composite index in partition table.

    A table has done range list partition.
    Then, I create a composite index named INDEX_N2(COLUMN_005, COLUMN_002). --COLUMN_005 AND COLUMN_002 ARE VARCHAR2
    When I run the SQL
    select 1
    from table1 T1
    where T1.COLUMN_005 = 'x'
    and T1.COLUMN_002 = 'y'
    And view the explain plan, INDEX_N2 has been used.
    But when I join the COLUMN_005 to other column, the index will not be used.
    The SQL is like below.
    select 1
    from table1 T1, table T2
    where T1.COLUMN_005 = T2.COLUMN_002 --T2.COLUMN_002 IS VARCHAR2
    and T1.COLUMN_002 = 'y'
    The explain plan is like below
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 426 | 44730 | 65367 (1)| 00:13:05 | | |
    |* 1 | HASH JOIN | | 426 | 44730 | 65367 (1)| 00:13:05 | | |
    | 2 | PARTITION RANGE ALL| | 8 | 792 | 5 (0)| 00:00:01 | 1 | 32 |
    | 3 | PARTITION LIST ALL| | 8 | 792 | 5 (0)| 00:00:01 | 1 | 8 |
    |* 4 | TABLE ACCESS FULL| TABLE1 | 8 | 792 | 5 (0)| 00:00:01 | 1 | 256 |
    | 5 | PARTITION RANGE ALL| | 1112K| 6519K| 65355 (1)| 00:13:05 | 1 | 34 |
    | 6 | PARTITION LIST ALL| | 1112K| 6519K| 65355 (1)| 00:13:05 | 1 | LAST |
    | 7 | TABLE ACCESS FULL| TABLE2 | 1112K| 6519K| 65355 (1)| 00:13:05 | 1 | 442 |
    Query Block Name / Object Alias (identified by operation id):
    1 - SEL$1
    4 - SEL$1 / T1@SEL$1
    7 - SEL$1 / T2@SEL$1
    Predicate Information (identified by operation id):
    1 - access("T1"."COLUMN_005"="T2"."COLUMN_002")
    4 - filter("T1"."COLUMN_002"='y')
    Column Projection Information (identified by operation id):
    1 - (#keys=1)
    2 - "T1"."COLUMN_005"[VARCHAR2,150]
    3 - "T1"."COLUMN_005"[VARCHAR2,150]
    4 - "T1"."COLUMN_005"[VARCHAR2,150]
    5 - "T2"."COLUMN_002"[VARCHAR2,20]
    6 - "T2"."COLUMN_002"[VARCHAR2,20]
    7 - "T2"."COLUMN_002"[VARCHAR2,20]
    Note
    - dynamic sampling used for this statement
    My Questin is:
    Two columns are include the columns of index.
    Why it can't be used?
    Thanks

    I create a new index on column2, (INDEX_N3)
    and change SQL to
    select 1 from table T1 where
    T1.COLUMN_002 = '848K 36892'
    This time INDEX_N3 will be used.
    but change SQL to
    select 1 from table T1 where
    T1.COLUMN_002 = '848K 36892'
    and T1.COLUMN_004 = '1000'
    The explain plan will show full scan.
    Why?
    Thanks.

  • Why we can't use provide to retrieve Time Infotypes records?

    Hi experts,
    I read some meterials that in HR report we can not use provide statement in LDB to fetch time infotypes records,
    use Loop instead,can anybody explain why and give a example.
    Thanks.

    Hi
    For time infotype records use RP_READ_ALL_TIME_ITY
    (RP_READ_ALL_TIME_ITY beg end)
       DATA: BEGDA LIKE P2001-BEGDA, ENDDA LIKE P2001-ENDDA.
       INFOTYPES:  0000, 0001, 0002, ...
                         2001 MODE N, 2002 MODE N, ...
         GET PERNR.
       BEGDA = '19900101'. ENDDA = '19900131'.
       RP_READ_ALL_TIME_ITY BEGDA ENDDA.
       IF PNP-SW-AUTH-SKIPPED-RECORD NE '0'.
          WRITE: / 'Authorization for time data missing'.
          WRITE: / 'for personnel number', PERNR-PERNR. REJECT.
       ENDIF.

  • Can you explain why there is an error at the line   *pStart = *pEnd;

    //program should reverse a given string.
    //Original string is "SAW", and the same string reversed should be "WAS"
    #include <stdio.h>
    #import <string.h>
    int main (int argc, const char * argv[]) {
    // insert code here...
    printf("This program reverses a string without blank spaces.\n");
    char *sentenceArray = "SAW";
    char temp;
    char * pStart, *pEnd;
    pStart = sentenceArray;
    int stringLength = strlen(pStart);
    pEnd = (pStart + stringLength -1);
    printf("\nOriginal sentenceString is: %s", pStart);
    printf("\naddress of pStart:%lu, value: %c", pStart, *pStart);//make sure pointer is at the start
    printf("\naddress of pEnd:%lu, value: %c", pEnd, *pEnd);//ensures pointer is at the end
    while (pStart < pEnd)
    temp = *pStart;
    *pStart = *pEnd;//can somebody explain why this is an error? Thank you.
    *pEnd = temp;
    ++pStart;
    --pEnd;
    printf("\nReversed sentenceString is: %s", sentenceArray);
    return 0;
    //Thank you for your assistance!

    To expand on Keith's answer a bit:
    The problem, as you know, is with this line:
    *pStart = *pEnd;
    So, let's break this down a bit. This statement uses the dereference operator (the asterisk before each pointer) twice, and, as you probably know, the dereference operator allows you to access the value that a pointer points to, instead of accessing the value of the pointer itself (a memory address), which is what you would be accessing if you didn't use the dereference operator.
    So, on the right side of the assignment you have *pEnd, which is basically saying to take the value pointed to by the pointer pEnd and assign in to whatever is on the left side of the assignment, and that's where your problem is -- the left side of the assignment. The *pEnd part is fine, but the +*pStart =+ part is not fine. What you are saying here is to take whatever is on the right side of the assignment (*pEnd) and assign it to the value that is pointed to by the pointer pStart. And, as Keith mentioned, that's your problem. The value that is pointed to by pStart is a string literal ("SAW" here), and a string literal (like any literal) can not have anything assigned to it -- it can not be written to -- it is read-only, as Keith said. And like anything else read-only, this means that it can not be on the left side of an assignment statement, and that's where you have it, so, we get an error.
    The solution, as Keith gave, is to change pStart from a character pointer (which is what you have declared it as) to a character array, like so:
    char sentenceArray[32] = "SAW";
    This will fix your problem.
    Hope this helped some. Pointers are rough business, especially when it comes to character pointers and character arrays and whatnot, and I still don't understand them well by any means, so keep at it. Best of luck!

Maybe you are looking for

  • WiFi Sync Broken or Erratic

    Up until the beginning of 2014, my iPhone 4S always synced perfectly over WiFi with my PC. But then... I upgraded. You know what they say about fixing what ain't broke... Now running the latest iTunes and IOS versions, I've been battling for a few mo

  • Display PDF and get possibly modified data back

    Hello we want to display a PDF in the SAP-GUI, either inline or external via the registered application (Adobe Reader, Adobe Acrobat or whatever). If the user has an application that is capable of editing a PDF-Document, we need to get the document's

  • Install failing

    hi, i'm trying to install itunes again because it was deleted. After i download it i start the installation and when it starts configuring the files i get a message saying " The older version of quicktime cannot be removed. " and then the installatio

  • Copy of Volume Discount

    There is a feature that allows the copy of Volume discounts to all other Items displayed in the Volume Discount window. I make the required change to the DIscount Percent or Dicount Price, and the Click the Update button.  I select the radial button

  • Software keeps becoming unresponsive

    My machine has recently had software, the most used being mail, safari and APerture, become unresponsive according to the activity montor and hang up for minutes at a time. What are teh possible problems and solutions?