Difference in provide statment

Hi Gurus,
Plz let me know difference in following statement
rp_provide_from_last p2010 space pn-begda  pn-endda.
AND
PROVIDE pernr subty anzhl betrg FROM p2010
BETWEEN pn-begda AND pn-endda.
ENDPROVIDE.
Regards
Rajesh

Hi,
PROVIDE pernr subty anzhl betrg FROM p2010
BETWEEN pn-begda AND pn-endda.
ENDPROVIDE.
Retrieves the contents of the specified fields from the internal tables (P2010) and places them in the table header lines within the required range. Also executes the processing block enclosed by the PROVIDE and ENDPROVIDE statements for each range.
For P2010 only tables with header lines are allowed.
But
rp_provide_from_last p2010 space pn-begda pn-endda.
It is a macro.
You use macro RP_PROVIDE_FROM_LAST in programs for the logical databases PNP and PAP where the last data record for a period (can be a subtype) is read from an infotype table. The infotype table has been filled earlier (for example, with GET PERNR or RP_READ_INFOTYPE). This macro is only helpful if the infotype (or subtype) has time constraint 1 or
2.
Prerequisites:
1) The validity begin date of the time period must be before or the same as the validity end date.
2) Validity start and end dates are correct (preferably of the type DATE).
3) The infotype table is sorted in ascending order. Otherwise, you would receive the last fitting table entry that might not necessarily correspond to the last time entry.
Hope it will help you.
Regards,
Sujit

Similar Messages

  • Difference  Between Provide and RP-PROVIDE-FROM-LAST  in ABAP-HR

    what is the Difference Between Provide and RP-PROVIDE-FROM-LAST  IN hR. IF I want to retrieve data in BETTWEEN BEGDA AND ENDDA. what these 2 ill return.
       Both ill return the LAtest record. plz  let me know what ill happen.
      With Regards,
       Venkata Suresh K

    PROVIDE is like a loop statement and it reads records between BEGDA and ENDDA. There is a lot to it, you can read doc...
    RP-PROVIDE-.. _> This is like read table.
    It is similar to : Sort itab descending. read itab index 1.
    If you want data between BEGDA and ENDDA and you have 2 internal tables, you can use PROVIDE. Otherwise, you can use a normal LOOP statement. Provide is helpful if you want to get data from more than 1 table.
    For eg: Infotype 0000 has 2 records from 1.1.2000 to 1.1.2006, and 2.1.2006 to 31.12.9999, and Infotype 0185 has 1 record from 1.1.2005 to 31.12.9999.
    If you use a provide BETWEEN BEGDA and endda in this case, it will run through the loop 3 times with these dates :
    1.1.2000 to 31.12.2004.
    1.1.2005 to 1.1.2006
    2.1.2006 to 31.12.9999
    If a record is not there in one of the internal tables during the date, there is a PNNNN_VALID flag which is filled up (4.6c) and in mySAP onwards, you have explicit valid flags.
    Hope it helps. Please reward points if helpful.
    Regards.
    Samant

  • Difference between Provide - Endprovide.

    Hi experts can any one spot light on the significance of PROVIDE - ENDPROVIDE in LDB?  and what is the difference between LOOP - ENDLOOP and
    PROVIDE - ENDPROVIDE.
    Thanks in advance.
    vamsi.

    Hi
    You can go through help doc .
    PROVIDE - ENDPROVIDE is similar like Loop
    LOOP - ENDLOOP
    [<b>b]Reminder : Points should be given on answers.</b></b>

  • Will an iPad mini retina with LTE bought from Apple website in USA work in UK? If so does it make a difference which provider is selected intially?

    Looking to buy Ipad with retina screen in US, it gives four options of providers initially, I am moving to UK soon, will LTE work there (with a UK sim) if I buy from apple website and choose Tmobile as a provider?

    Yes it will work. iPads work world wide. LTE works in only some countries including Saudi Arabia. http://www.apple.com/ipad/LTE/
    If you can't get an LTE connection it will fall back to 3G.

  • New Provide statement in ECC 6.0

    Hi All,
    I am getting infotype 0001 information by using function module HR_READ_INFOTYPE.Now i need to check the Employee subgroup (PERSK) change from 11 to 12 .For this i need to use PROVIDE statment and if change happens i need to make a returning parameter false.
    How can i use the new provide statement
    l_sub is a flag.
    *provide fields * from p0001 into l_temp VALID l_sub*
    BOUNDS persk AND persk  BETWEEN l_begda AND l_endda.
    i am not getting any records while running this query.Can you please help me out.What l_temp returns if the loop pass success.In bound what  i need to give here i need to check the persk value.
    Thanks
    Chandu

    Hi Chandu,
    When you are using the bounds statement in a provide field statement,
    the two fields on which the bound condition is being applied have to be
    different columns of same type of the table from which you are selecting the values..
    For eg
    PROVIDE fields * from p0001 into itab valid flag1  BOUNDS begda AND endda
            BETWEEN pnpbegda AND pnpendda.
    What you are using is not giving any values is because it is referring to only
    one column of the table p0001.
    Get Back if u still have Doubts
    Ira !!

  • Provide, endprovide and protect

    what is the difference between provide..endprovide and  protect...endprotect statements
    Title edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:51 AM

    Hi Sudheer,
    Processing All Infotype Records (PA-PAD)
    After the GET PERNR event, the internal tables of the infotypes contain records and are ready for processing.
    Internal tables are generally processed line-by-line using the LOOP statement.
    The internal tables of infotypes have features which allow special processing.
    These tables are defined for specific intervals. In HR, these are time intervals or validity periods.
    Processing of infotype records is time-dependent; by this we mean dependent on the data selection period entered on the selection screen. The data of several infotypes can be processed
    at the same time and made available for a specific partial period.
    Internal infotype tables are processed with the PROVIDE statement.
    The syntax is as follows:
    PROVIDE * FROM Pnnnn BETWEEN PN-BEGDA AND PN-ENDDA.
    WRITE: / Pnnnn-<field>.
    ENDPROVIDE.
    nnnn stands for the four-digit infotype number. The relationship between the infotype and the data selection period of the selection screen is established using the PN/BEGDA and PN/ENDDA variables.
    In the PROVIDE loop, the data of an infotype record is available for processing in the Pnnnn
    structure.
    Preventing Page Breaks: PROTECT
    You can specify, either in the style or in the form, that a particular paragraph should not be split in two by a page break. If this page protect attribute is set, then the complete paragraph is always printed on one page. This property applies only to that particular paragraph.
    This attribute is not intended to be used to protect all paragraphs against a page break. The point is that a page break is by its very nature a dynamic event and the exact point at which it occurs depends on the current state (length and contents) of the preceding text. It is also possible that you may want to protect only certain parts of a paragraph against a page break. One way to achieve this is to use the NEW-PAGE command immediately before the text concerned starts. Explicitly beginning a new page at this point should ensure that a further page break does not occur within the text. However, this technique is not change-friendly. For example, you format your text with the help of the NEW-PAGE command so that no page breaks occur where they should not. At a later time, you insert or delete some lines. These changes cause all the subsequent text to be moved relative to the printed page, and you must check each NEW-PAGE command you previously inserted to see if it is still in the correct place.
    To allow you to define the areas to be protected against a page break on an individual basis, SAPscript provides the PROTECT.. ENDPROTECT command pair. If you enclose the text to be protected in these commands, then SAPscript will ensure that each line of this text is printed together on the same page. If the complete text fits in the space remaining on the current page, then it is printed on this page just as it would be if no PROTECT command had been used. If, however, the remaining space is not sufficient for the text, then the PROTECT command has the same effect as a NEW-PAGE command and text is printed on a new page.
    Thus the PROTECT/ENDPROTECT commands may be regarded as a kind of conditional NEW-PAGE command, the condition being whether or not the lines enclosed between the two commands fit in the space remaining in the current main window.
    Syntax:
    /: PROTECT
    /: ENDPROTECT
    The text lines to be protected are enclosed between the two commands.
    o     An ENDPROTECT command without a preceding PROTECT command has no effect.
    o     If the terminating ENDPROTECT is missing, SAPscript assumes it at the end of the text.
    o     PROTECT.. ENDPROTECT command pairs cannot be nested. If a second PROTECT command occurs before the first one has been terminated by an ENDPROTECT, it is ignored.
    o     If the text enclosed by a PROTECT.. ENDPROTECT pair is itself too long for a single page, then a page break is generated immediately before the text and the text is printed in the normal way. It is then unavoidable that a page break will occur at some point within the text.
    <REMOVED BY MODERATOR>
    Regards,
    Nitin.
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:51 AM

  • Time Difference in received email.

    My Java application is using Oracle API to send email using the company SMPT server.
    When the email is sent to employees of a particular company (they are using company email server) , email is delivered instantly but the received time is showing 4 hours difference that is minus 4 hours.
    If anyone have faced this similar issue or any information on what is causing the time difference can provide me some information will be appreciated.
    Please let me know if you need more information.
    System Time          Actual Time Sent                      From                                    To                                                                      Received Time in the email
    when application
    * is accessed.*
    1:00:00 PM EST      1:00:00 PM EST Application      User ,to his company mail      9:00 AM
    1:00:00 PM EST      1:00:00 PM EST      Application      Myself ,same as the application mail server      1:00 PM
    1:00:00 PM EST      1:00:00 PM EST      Application      my personal Gmail account     1:00 PM
    1:00:00 PM EST      1:00:00 PM EST      Gmail     User ,Different than the application mail server      1:00 PM

    user10982140 wrote:
    My Java application is using Oracle API to send email using the company SMPT server.
    When the email is sent to employees of a particular company (they are using company email server) ,So you send email to one (or more) group of people with no problem but with one single different group of people they have a different experience?
    If anyone have faced this similar issueMy experience would be that given that the answer to the above is yes then the question has nothing to do with java - nor your code.
    It has something to do with their server/environment.
    You could get a SMTP email client and use it to send an email to them. You should strive to do the following
    1. Make sure the client is not written in java.
    2. Test it from your company using the same SMTP server you use above.
    3. Test it from somewhere else using a different SMTP server.

  • Prepared Statment or Hibernate

    I will query One Column in a Table..
    Is there any difference between Prepared Statment and Hibernate when it comes to performance?

    923269 wrote:
    Can I use H-SQL of Hibernate?HSQL is the query language that Hibernate defines to allow you to ask questions about your model (entity classes) in stead of having to write SQL which is oriented towards databases. Hibernate is responsible for translating the HSQL query to an actual SQL query and translate the results back to an object model structure.
    So yes you can use HSQL, IF you use Hibernate.

  • Diffrence in two statment with statement contains only

    hi
    i need to know the difference between two statment as below in ecc
    1) for eg var1 CO '  345678910'
    2) and var1 CO '345678910'
    note the space in first statement as
    regards
    Arora

    the prolem is that in earler system the condition n is true as space is there
    for eg var1 = '109323223' and its working
    but in new system the space is not there hence the sy-subrc = 4 and the check is failed
    pls suggest the implication of removing space in new system
    regards
    Arora

  • A/R and A/P invoices and credit memo realized currency gain/loss report

    Hi,
    We need some help in getting a report from SBO.
    We would like to analyze their realized currency gain and loss account. We are lookiing into a report that shows the individual invoice/ credit memo foreign and local currency amount against the incoming / outgoing payment foreign and local currency amount.
    Sometimes we  would do direct offset invoices in the incoming / outgoing payment, and sometimes it would be thru internal reconciliation. We have look thru the tables for the past 2 days but could not find any link between the invoices and payments especially so when reconciliation is performed.
    Can this report be done either in XL Reporter or in SQL? If yes, which tables are these information store?
    Thanks.
    Regards,
    Whay Peng

    Hi Jimmy,
    There is no need to run the exchange rate differences, when invoices that was offset during the incoming and outgoing payment. The realized currency gain/ loss account will be generated when the incoming and outgoing payment is made.
    During reconcilation, yes we did run the exhange rate differences to get the realized currency gain / loss.
    Could it be the two tables that you mentioned are storing information on the unrealised currency rate differences? We did not run exchange rates differences to provide for any unrealized gain/loss for the period, therefore the tables on our end is empty.
    Regards,
    Whay Peng

  • Randomdata in javacard

    hi all,
    Does anybody know how to use the javacard.security .Randomdata class ?
    and can you tell me how to implement the generateData and setseed methods of the abstract RandomData class or give me sample program....
    thanks.

    hi,
    if you read the documentation provided by sun, it tell that the random is a abstract class, but this documentation explained what it needed to implement a JCVM into javacard.
    And all card provider implemented this norm into card and some difference between provider can be discover.
    It's my analysis and i'm not really sure that it's all right.
    For exemple Gemplus implemented a Random class that is not abstract and you can used it.
    you must simply import the javacard.security.randomData;
    created object and get the instance of it.
    RandomData rnd = RandomData.getInstance(rnd."Algo");
    And after used it ...

  • Doubt about Select statement.

    Hi folks!!
                 I have a few doubts about the select statements, it may be a silly things but its useful for me.
    what is   difference between below statment.
    1)SELECT * FROM TABLE.
    2)SELECT SINGLE * FROM TABLE
    3)SELECT SINGLE FROM TABLE.
    Hope i will get answer,thanks in advance.
    Regards
    Richie..

    Hi,
    try this and if possible use sap help.i mean place the cursor on select and press F1.
                 Types of select statements:
    1.     select * from ztxlfa1 into table it.
                 This is simple select statement to fetch all the data of db table into internal table it.
       2.   select * from ztxlfa1 into table it where lifnr between 'V2' and 'V5'.
            Thisis using where condition between v2 and v5.
      4. select * from ztxlfa1 where land1 = 'DE'. "row goes into default table work Area
      5. select lifnr land1 from ztxlfa1
            into corresponding fields of it   "notice 'table' is omitted
             where land1 = 'DE'.
              append it.
               endselect.
         Now data will go into work area. and then u will add it to internal table by     
            append statement.
      6.   Table 13.2 contains a list of the various forms of select as it is used with internal tables and their relative efficiency. They are in descending order of most-to-least efficient.
    Table 13.2  Various Forms of SELECT when Filling an Internal Table
    Statement(s)                                   Writes To
    select into table it                                    Body
    select into corresponding fields of table it   Body
    select into it                                    Header line
    select into corresponding fields of it           Header line
    7. SELECT VBRK~VBELN
           VBRK~VKORG
           VBRK~FKDAT
           VBRK~NETWR
           VBRK~WAERK
           TVKOT~VTEXT
           T001~BUKRS
           T001~BUTXT
        INTO CORRESPONDING FIELDS OF TABLE IT_FINAL
        FROM VBRK
        INNER JOIN TVKOT ON VBRKVKORG = TVKOTVKORG
        INNER JOIN T001 ON VBRKBUKRS = T001BUKRS
        WHERE VBELN IN DOCNUM AND VBRK~FKSTO = ''
       AND VBRK~FKDAT in date.
    Select statement using inner joins for vbrk and t001 and tvkot table for this case based on the conditions
    8. SELECT T001W~NAME1 INTO  TABLE IT1_T001W
    FROM T001W INNER JOIN EKPO ON T001WWERKS = EKPOWERKS
    WHERE EKPO~EBELN = PURORD.
    here selecting a single field into table it1_t001winner join on ekpo.
    9. SELECT BUKRS LIFNR EBELN FROM EKKO INTO CORRESPONDING FIELDS OF IT_EKKO WHERE     EBELN IN P_O_NO.
    ENDSELECT.
    SELECT BUTXT   FROM T001 INTO  IT_T001 FOR ALL ENTRIES IN IT_EKKO WHERE BUKRS = IT_EKKO-BUKRS.
    ENDSELECT.
    APPEND IT_T001.
    here I am using for all entries statement with select statement. Both joins and for all entries used to fetch the data on condition but for all entries is the best one.
    10. SELECT AVBELN BVTEXT AFKDAT CBUTXT ANETWR AWAERK INTO TABLE ITAB
                 FROM  VBRK AS A
                 INNER JOIN TVKOT AS B ON
                 AVKORG EQ BVKORG
                 INNER JOIN T001 AS C ON
                 ABUKRS EQ CBUKRS
                 WHERE  AVBELN IN BDOCU AND AFKSTO EQ ' ' AND B~SPRAS EQ
                 SY-LANGU
                 AND AFKDAT IN BDATE AND AVBELN EQ ANY ( SELECT VBELN FROM
                VBRP WHERE VBRP~MATNR EQ ITEMS ).
        Here we are using sub query in inner join specified in brackets.
    Thanks,
    chandu.

  • Oracle Personal Edition 10G

    Hi,
    I need to download Oracle Personal Edition 10g (for Windows 20030). Where can I find it? I've searched OTN and Edelivery but couldn't find it.
    regards,
    Ivan

    user2522172 wrote:
    Hi,
    I need to download Oracle Personal Edition 10g (for Windows 20030). Where can I find it? I've searched OTN and Edelivery but couldn't find it.PE, SE and EE are all on the same download. The difference is provided when you install. This is discussed in the Datrabase Install manual for WIndows in chapter 1
    at http://download.oracle.com/docs/cd/B19306_01/install.102/b14316/intro.htm#sthref51

  • Core dump using iostream with Sun Studio 8

    I'm running on Solaris 9 using C++ compiler Sun Studio 8, and encoutered a very strange problem.
    My application failed with a core and here is the stack.
    [1] t_splay(0x3774b470, 0x387a0ec0, 0x389aec60, 0x39e5ef1f, 0x3774b470, 0x1), at 0xfc347930
    [2] t_delete(0x387a0ec0, 0x80, 0x39be9748, 0x20, 0x383ccd20, 0x0), at 0xfc347698
    [3] mallocunlocked(0x80, 0x0, 0x21b08, 0xfc3bc000, 0x10, 0x20), at 0xfc346d40
    [4] malloc(0x80, 0xfbaa7400, 0x1, 0x759c40, 0x0, 0x0), at 0xfc346b74
    [5] operator new(0x80, 0x0, 0xd3a18, 0x759c74, 0x0, 0x8345fc), at 0x760c10
    [6] strstreambuf::overflow(0xf41f6e28, 0x29, 0xf41f6e28, 0x39fe0e88, 0x39fe0e88, 0x8345fc), at 0x75bb1c
    [7] streambuf::xsputn(0xf41f6e28, 0xfee00bc0, 0x1, 0x0, 0x81010100, 0x1), at 0x75ab94
    [8] unsafe_ostream::outstr(0xf41f6e78, 0xfee00bbf, 0x0, 0x0, 0xf41f6e7c, 0xfffffffe), at 0x757bac
    =>[9] unsafe_ostream::operator<<(this = 0xf41f6e78, _s = 0xfee00bbf ")"), line 1211 in "iostream.h"
    [10] ostream::operator<<(this = 0xf41f6e74, _s = 0xfee00bbf ")"), line 1350 in "iostream.h"
    [11] CorInterfaceEntity::ifState(this = 0x1bc3de78, newState = MISMATCH_OF_INSTALLED_AND_EXPECTED, needToSendEvent = false
    Can somebody help me giving a direction of investigation ?
    Is there perhaps known problem with iostream on Sun Studio 8 running on Solaris 9 ?
    Thanks for any tips.
    Yaakov Berkovitch
    [email protected]

    But sorry for my insistence, but do you think that
    purify or/and runtime are not able to detect any
    corruption of the heap ?They can detect some kinds of corruption, such as some uses of an invalid pointer.
    But a wild pointer that changes the value of data that is part of your program cannot be detected by RTC or Purify. Those programs can't know whether that change is intentional.
    >
    BTW, we are not using any volatile declaration, and weIf non-local data is shared among threads, it should be declared volatile. For example, suppose you have
    x = foo;
    ... // code not changing foo
    y = foo;
    If foo is not marked volatile, the compiler is allowed to assume its value hasn't changed, and assign to y the same value assigned to x. If foo was changed by another thread, y will not have the current value of foo. The "volatile" declaration says that the variable's value might change without any obvious reason, and the compiler should generate code to load a fresh value each time it is referenced.
    are using the rwtools library packaged with the
    compiler, and are not using the STD library.OK, you are not running into a std::string synchronization bug.
    >
    Also about the compiler option -xarch=v8, is probably
    not relevant for us because we are running Solaris 9.
    So the relevant compiler is probably -xarch=v9. Do you
    advise us using this option ?I think you misunderstand. The -xarch values refer to the kind of processor your program will run on.
    The -xarch=v8 option generates 32-bit code that will run on all SPARC chips, including the chips found in very old SPARCstations. This option is the default for compilers prior to Sun Studio 9 (which ships this week).
    The -xarch=v8plus option generates 32-bit code that runs only on UltraSPARC chips, found in Ultra workstations. These are the only kinds of workstations shipped by Sun since about 1996. Unless you need to support the ancient SPARCstations, we recommend compiling with -xarch=v8plus, to get smaller and faster code.
    The -xarch=v9 option generates 64-bit code that runs only on UltraSPARC chips, an only on Solaris 7 or later. Unless your program requires a very large address space, you generally don't want to generate 64-bit code. On SPARC, 64-bit code is larger and slower than 32-bit code. (Type "long" and all pointers are 64 bits instead of 32 bits.)
    >
    Also I want to return you two new questions:
    1) I read in another discussion,
    http://forum.sun.com/thread.jsp?forum=5&thread=18124&me
    sage=47854#47854
    that another memory manager can be more efficient in
    multi-threaded environment (libmtmalloc.so), and also
    an alternate threads library (/usr/lib/lwp) that
    reduced CPU usage. Do you advice us using this
    alternate library ?The libmtmalloc library usually has better performance in MT programs than the default version of malloc. It also can result in more memory fragmentation. In that case, the larger working set can sometimes have a large negative effect, more than offsetting the MT efficiency. You have to experiment to see whether it is appropriate for your particlular program. If you are running into heap corruption, the pattern of corruption will probably be different with libmtmalloc than with the default malloc. The differences might provide a clue to what is wrong.
    The alternative "T2" threads library was introduced in Solaris 8 as an option.
    In Solaris 9 it is the default, so you are already using it.
    >
    2) We are using the Rogue Wave library shiped with the
    compiler. Is it an up-to-date version ? Can we assume
    that is a good choice or it will be preferable to move
    to the STD library ?I assume you mean Rogue Wave Tools.h++. As explained in the compiler docs, this version of Tools is obsolete, and has not been supported for many years. We continue to provide it for customers who used it before the introduction of the C++ Standard Library in 1998, and who don't want to change their code. We do not recommend it for use in new code.

  • Debit & Credit.( Basic Doubt)

    Hi All......
    Please can anyone explain the sequence of steps how the Accounts are credited and debited when the GR & the IR is Posted.
    Can anyone also say me in what way the Debit and Credit Concepts has be looked on( When Inventory its different from the Invoice ) ....Please any one calrify the entire debit/Credit Concept. Ex wud be really helpful.
    Regards
    Balaji

    Hi
    When you do a GR for a stock material then the acconting movements will be
    Debit : Stock account
    Credit: GR/IR account
    During invoice recipet the accounting movements are
    Credit: Vendor account
    Debit: GR/IR account
    Here if any price difference is there then the difference will be posted to price difference account provided that the material is maintained at standard price.
    IF the material is maintained at moving average price then the price difference will be posted to Stock account provided stock exists,otherwise the difference will be posted to price difference account
    If you are receivinbg a material for consumption the accounting movements will be
    Debit: Consumption account
    Credit:GR/IR account
    During invoice reciept of the same accounting documents will be
    Credit:Vendor account
    Debit:GR/IR account

Maybe you are looking for