Difference between abap object and function

hi all,
i read the book on abap object of the difference between abap object and classical abap.
i know that there is only 1 instance of a specific function group but somehow i still not so clear why subsequent vehicle cannot use the same function. i also can use the do and loop to call the function? if cannot then why?
hope can get the advice.
thanks
using function *********
function-pool vehicle.
data speed type i value 0.
function accelerate.
speed = speed + 1.
endfunction.
function show_speed.
write speed.
endfunction.
report xx.
start-of-selection.
*vehicle 1
call function 'accelerate'.
call function 'accelerate'.
call function 'show_speed'.
*vehicle 2
*vehicle 3
*****abap object*******
report xx.
data: ov type ref to vehicle,
         ov_tab type table of ref to vehicle.
start-of-selection.
do 5 times.
create object ov.
append ov to ov_tab.
enddo.
loop at ov_tab into ov.
do sy-tabix times.
call method ov->accelerate.
enddo.
call method ov->show_speed.
endloop.

Hi
Now try this:
REPORT ZTEST_VEHICLEOO .
PARAMETERS: P_CAR   TYPE I,
            P_READ  TYPE I.
*       CLASS vehicle DEFINITION
CLASS VEHICLE DEFINITION.
  PUBLIC SECTION.
    CLASS-DATA: MAX_SPEED   TYPE I,
                MAX_VEHICLE TYPE I,
                NR_VEHICLES TYPE I.
    CLASS-METHODS CLASS_CONSTRUCTOR.
    METHODS CONSTRUCTOR.
    METHODS ACCELERATE.
    METHODS SHOW_SPEED.
    METHODS GET_SPEED EXPORTING E_SPEED TYPE I.
  PRIVATE SECTION.
    DATA: SPEED      TYPE I,
          NR_VEHICLE TYPE I..
ENDCLASS.
*       CLASS vehicle IMPLEMENTATION
CLASS VEHICLE IMPLEMENTATION.
  METHOD CLASS_CONSTRUCTOR.
    NR_VEHICLES = 0.
  ENDMETHOD.
  METHOD CONSTRUCTOR.
    NR_VEHICLES = NR_VEHICLES + 1.
    NR_VEHICLE  = NR_VEHICLES.
  ENDMETHOD.
  METHOD ACCELERATE.
    SPEED = SPEED + 1.
    IF MAX_SPEED < SPEED.
      MAX_SPEED   = SPEED.
      MAX_VEHICLE = NR_VEHICLE.
    ENDIF.
  ENDMETHOD.
  METHOD SHOW_SPEED.
    WRITE: / 'Speed of vehicle nr.', NR_VEHICLE, ':', SPEED.
  ENDMETHOD.
  METHOD GET_SPEED.
    E_SPEED = SPEED.
  ENDMETHOD.
ENDCLASS.
DATA: OV     TYPE REF TO VEHICLE,
      OV_TAB TYPE TABLE OF REF TO VEHICLE.
DATA: V_TIMES TYPE I,
      FL_ACTION.
DATA: V_SPEED TYPE I.
START-OF-SELECTION.
  DO P_CAR TIMES.
    CREATE OBJECT OV.
    APPEND OV TO OV_TAB.
  ENDDO.
  LOOP AT OV_TAB INTO OV.
    IF FL_ACTION = SPACE.
      FL_ACTION = 'X'.
      V_TIMES = SY-TABIX * 2.
    ELSE.
      FL_ACTION = SPACE.
      V_TIMES = SY-TABIX - 2.
    ENDIF.
    DO V_TIMES TIMES.
      CALL METHOD OV->ACCELERATE.
    ENDDO.
    CALL METHOD OV->SHOW_SPEED.
  ENDLOOP.
  SKIP.
  WRITE: / 'Higher speed', VEHICLE=>MAX_SPEED, 'for vehicle nr.',
            VEHICLE=>MAX_VEHICLE.
  SKIP.
  READ TABLE OV_TAB INTO OV INDEX P_READ.
  IF SY-SUBRC <> 0.
    WRITE: 'No vehicle', P_READ.
  ELSE.
    CALL METHOD OV->GET_SPEED IMPORTING E_SPEED = V_SPEED.
    WRITE: 'Speed of vehicle', P_READ, V_SPEED.
  ENDIF.
Try to repeat this using a function group and I think you'll undestand because it'll be very hard to do it.
By only one function group how can u read the data of a certain vehicle?
Yes you can create in the function group an internal table where u store the data of every car: in this way u use the internal table like it was an instance, but you should consider here the example is very simple. Here we have only the speed as characteristic, but really we can have many complex characteristics.
Max

Similar Messages

  • Difference between business blueprint and functional spec

    hello
    can somebody please tell me the difference between business blueprint and functional spec and how they are interrelated
    Thanks

    Hi Comandante,
    Business Blue print is a detailed documentation of the requirements gathered from client (The objects we need to develop are modified depending upon clients requirements).It represents the business process requirements of the company.  It is an agreed statement of how the company intends to run its business within SAP system.
    Functional specifications (functional specs), in the end, are the blueprint for how you want a particular report and transaction to look and work. It details what the report will do, how a user will interact with it, and what it will look like. By creating a blueprint of the report or transaction first, time and productivity are saved during the development stage because the programmers can program instead of also working out the logic of the user-experience. It will also enable you to manage the expectations of your clients or management, as they will know exactly what to expect. Functional Spec streamlines the development process.
    A functional specification  is a formal document used to describe in detail for software developers a product's intended capabilities, appearance, and interactions with users. It guidelines and continuing reference point as the developers write the programming code.
    Other processes include Requirements, Objectives,Logic Specification,User documentation,The Final Product.
    Hope this Helps, Revert for any further info.
    Cheers,
    Tanish

  • Difference Between Business Object And Class Object

    Hi all,
    Can any one tel me the difference between business object and class Object....
    Thanks...
    ..Ashish

    Hello Ashish
    A business object is a sematic term whereas a class (object) is a technical term.
    Business objects are all important objects within R/3 e.g. sales order, customer, invoice, etc.
    The business objects are defined in the BOR (transaction SWO1). The have so-called "methods" like
    BusinessObject.Create
    BusinessObject.GetDetail
    BusinessObject.Change
    which are implemented (usually) by BAPIs, e.g.:
    Business Object = User
    User.Create => BAPI_USER_CREATE1
    User.GetDetail => BAPI_USER_GET_DETAIL
    CONCLUSION: Business Object >< Class (Object)
    Regards
      Uwe

  • What are the differences between PD objects and PA objects?

    can any one tell me What are the differences between PD objects and PA objects?

    PA is based on Infotypes 0000-0999. PD is based on Infotypes 1000-1999, chief being Objects Infotype 1000. Objects Infotype is the source of different Object Types such as Person, Position, Org Unit etc. You can check that through transaction OOOT.
    Regards
    Lincoln

  • Differences between ABAP lists and ALV lists

    what is the differences between ABAP lists and ALV lists?
    Edited by: pong pong on Apr 9, 2008 5:08 AM

    Hello Pong Pong,
    Please go thru help topics:
    ALV Grid
    http://help.sap.com/saphelp_47x200/helpdata/en/bf/3bd1369f2d280ee10000009b38f889/frameset.htm
    ABAP Lists
    http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb408a455611d189710000e8322d00/frameset.htm
    Regards,
    Siddhesh

  • Differences between ABAP Programming and Dialog Programming

    Can any one explain me the Differences between ABAP Programming and Dialog Programming

    Hi,
    ABAP PROGRAMING:
    An ABAP program consists of individual ABAP statements. Each statement begins with a keyword and ends with a period.
    PROGRAM FIRST_PROGRAM.
    WRITE 'My First Program'.
    This example contains two statements, one on each line. The keywords are PROGRAM and WRITE. The program displays a list on the screen. In this case, the list consists of the line "My First Program".
    The keyword determines the category of the statement. For an overview of the different categories, refer to ABAP Statements.
    You can execute different parts of programs conditionally or in loops using the standard keywords IF, CASE, DO, and WHILE.
    When controlling the flow of an ABAP program, remember that the structure of the program is made up of processing blocks that cannot be nested. This section describes how to control the flow of a program within a processing block. The keywords covered here do not allow you to branch outside the processing block in which you use them. You can regard this as internal control of an ABAP program, as opposed to the external control provided by events in the ABAP runtime environment.
    To control the internal flow of a processing block, you can use control structures to divide it up into smaller statement blocks according to the principles of structured programming.
    DIALOG PROGRAMING:
    This is a classical programming method that is based on dynpros and dialog transactions.
    Classic Application Programming
    Separating the application layer from the presentation layer means that when you run an ABAP application program requiring user interaction, control of the program is continually passed backwards and forwards between these layers. While a screen is ready for input, the corresponding SAP GUI of the presentation layer is active. During this time, the application layer is not active for the application program. Therefore, the ABAP application servers are free for other tasks. Once the user has entered data on the screen, program control passes back to the application layer. Now, the presentation layer is inactive. The SAP GUI is still visible to the user during this time, and it is still displaying the screen, but it cannot accept user input. The SAP GUI does not become active again until the application program has called a new screen and sent it to the presentation server.
    Consequently, if you use this method, you need to divide dialog programs into single dialog steps, with each of these steps comprising the programming logic between two successive screens.
    REGARDS,
    VASAVI.
    KINDLY REWARD IF HELPFUL.

  • Difference between essbase technical and functional consultant

    Hi Essbase/Planning gurus, i am new to hyperion essbase/planning, please help me on below questions.
    1) Difference between essbase technical consultant and functional consultant (Roles)
    2) Difference between Hyperion planning technical consultant and functional consultant (Roles)
    Thanks in advance,
    Raraju.

    Hello Raraju,
    I will give it a try.
    Essbase and Planning have technically a different concept of roles. I think, this was not your question about.
    When looking at the job responsibilities of a technical consultant in Essbase then he/she will be responsible for the server. Take care that it is running performant, has sufficient resources etc.. The person will monitor log files for possible or upcoming problems. Further, the person will set-up connections to other data sources if needed. The person will know about the OS, Networks, Webservers and the technical side of Essbase/Planning.
    The functional consultant will know the details of the application(s) and will maintain them for the users. He/she will create changes to the application and helps the users to use the product. The person will know about finance/controlling and the application side of Essbase/Planning.
    Regards,
    Philip Hulsebosch

  • What's the difference between Action Objects and ActionListeners

    Hello,
    in the Introduction to JSF two ways handling action are demonstrated. One way is "Combining Component Data and Action Object" the other way is "Handling Events."
    What's the difference? When do I use this or that way?
    The one thing I understand is when using "Combining Component Data and Action Objects" I use the default ActionListener and I may directly access the input values.
    TIA,
    Juergen

    Hi Juergen,
    The bottomline is 'not much', only in the details to these two approaches differ.
    The ActionListener object will have events broadcast to it for a particular object by the event mechanism in JSF. You can add one to a specific component via the f:action_listener tag. This will have your listener getting events during specific points in the request processing lifecycle (you specify via your return value for getPhaseId).
    The Action class that an actionRef reference refers to an Action that will be invoked during the invoke application phase. (see pg 71).
    I would recommend using actionRefs and Action objects wherever possible and going to ActionListeners only when you need notifications during a specific phase of the request/response cycle.
    Hope this helps,
    -bd-
    http://bill.dudney.net

  • HT5467 iPhone iOS 6. What is the difference between, respective purposes, and functions of having both location services for photos vs camera

    What is the difference and respective functions of turning on or off location services for "photos" and "camera" ?  I guess I don't see what purpose of having the option for photos location services in addition to the camera option?

    Thanks,
    one hypo:
    If I always had location services off for the camera, while taking all my photos, then there should be no metadata embedded at all in the first place, so then the photos selection becomes redundant?

  • Is there any Difference between Business Objects and SAP Business Objects

    Hi Folks,
    I am planning to learn BO, i need clarification is both normal BO and SAP BO are same or SAP's BO is different from what we have old BO
    Please any one suggest me on this.
    Thanks & Regards
    Ramakrishna Kamurthy

    hi,
    BO and SAP BO are both the same....recently the SAP took the BO and it is now the property of SAP....also in the future the BO is used in SAP BI for reporting purposes. But you need licensing for SAP BO.
    hope it helps.
    raghu.

  • Diif between Stored procedure and function

    HI
    I want all the differences between Stored procedure and function.
    Even the basic diff is Procedure does not return any value and Function must be...
    Thansk In advance...

    1) Functions are used for computations where as procedures can be used for performing business logic That's an opinion on usage not an actual difference.
    3) You can have DML(insert,update, delete) statements in a function. But, you can not call such a function in a SQL query.Not true. As User defind functons limitations we can use a function that issues DML in a SELECT statement, if it uses the PRAGMA AUTONOMOUS_TRANSACTION.
    4) Function parameters are always IN, no OUT is possibleEasily refutable...
    SQL> CREATE OR REPLACE FUNCTION my_f (p OUT NUMBER) RETURN DATE
      2  AS
      3  BEGIN
      4     p := to_number(to_char(sysdate, 'DD'));
      5     RETURN sysdate;
      6  END;
      7  /
    Function created.
    SQL> var x number
    SQL> var d varchar2(18)
    SQL> exec :d := my_f(:x)
    PL/SQL procedure successfully completed.
    SQL> print d
    D
    18-NOV-05
    SQL> print x
             X
            18
    SQL>
    Stored Procedure :supports deffered name resoultion Example while writing a stored procedure that uses table named tabl1 and tabl2
    etc..but actually not exists in database is allowed only in during creationNot sure what this one is about...
    SQL> CREATE PROCEDURE my_p AS
      2      n NUMBER;
      3  BEGIN
      4     SELECT count(*) INTO n
      5     FROM tab1;
      6  END;
      7  /
    Warning: Procedure created with compilation errors.
    SQL> sho err
    Errors for PROCEDURE MY_P:
    LINE/COL ERROR
    4/4      PL/SQL: SQL Statement ignored
    5/9      PL/SQL: ORA-00942: table or view does not exist
    SQL>
    7) A procedure may modifiy an object where a function can only return a value.An ounce of test is worth sixteen tons of assertion...
    SQL> CREATE OR REPLACE FUNCTION my_f2 RETURN VARCHAR2
      2  AS
      3  BEGIN
      4       EXECUTE IMMEDIATE 'CREATE TABLE what_ever (col1 number)';
      5      RETURN 'OK!';
      6  END;
      7  /
    Function created.
    SQL> exec :d :=  my_f2
    PL/SQL procedure successfully completed.
    SQL> desc what_ever
    Name                                      Null?    Type
    COL1                                               NUMBER
    SQL> I think there are only two differences between a procedure and a function.
    (1) A function must return a value
    (2) because of (1) we can use functions in SQL statements.
    There are some minor difference in allowable syntax but they are to do withj RETURN values.
    Cheers, APC

  • What is the difference between the object&realationship.

    1.what is the difference between the object&realationship.

    What is the difference between "cost object" and
    "cost center"? Please see the context below. It says
    that cost object and cost center are not the same.
    Cost objects :
    The units of output resulting from the value-added process with which costs are identified according to how they are incurred.
    Cost objects can be independent entities (called cost object IDs), or they can represent other entities (such as orders or projects).
    The functions of preliminary costing, simultaneous costing, and final costing can be performed on cost objects.
    The following cost objects can be used in the SAP System:
    Product cost collectors
    Production orders
    Process orders
    Cost object IDs
    Sales order items
    Cost center is an controlling object and Cost object is also one of the controlling objects. Other controlling objects are
    Cost centers (for account assignment of costs)
    · Orders
    · Projects
    · Networks
    · Make-to-order sales orders
    · Cost objects
    · Profitability segments
    · Real Estate Objects
    · Business Processes
    Primary costs are transferred from external
    accounting and classified according to managerial
    accounting perspectives. If the primary costs are
    direct costs, then they are assigned to cost objects.
    Need not be. They can be assigned to any of the controlling obejcts. Generally for primay costs we use Cost center as the controlling object. we can also use IO in which case u have to resort to peridic or full settlement. Apart from Cost center other objects require either periodic or full settlement of the cost collected.> If they are overhead costs, then they are assigned to
    cost centers or overhead cost orders. The system then
    allocates them using internal allocation techniques,
    according to their source
    Cost centers or other objects collects theprimary costs and then can be allocated to other objects based on the sender receiver relationship u define.

  • Diff between context object and x path

    hi gurus,
      what is difference between context object and x path?

    Hi rohit,
    If u have multiple receiver system then to determine the reciever u can use context object.....
    Context objects are alternative to XPATH expressions. It is like macros in other programming langugage. If you define this , you can use this object in the receiver determination while doing conditional receiver determination
    To better idea see the blog...
    /people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object
    Check out these also...
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/content.htm
    /people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object
    Here is a scenario where context objects were used for BPM
    Technical Context Object in ccBPM
    Get the details here:
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/frameset.htm
    Technical Context Objects :
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/frameset.htm
    A list of the Technical Context Objects names can be found here:
    http://help.sap.com/saphelp_nw04/helpdata/en/6e/ff0bf75772457b863ef5d99bc92404/content.htm
    XPath to show the path (Multiple Receivers)
    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
    Customize your 'XPATH' Expressions in Receiver Determination
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    regards
    biplab
    Use a Good Subject Line, One Question Per Posting - Award Points

  • What is the difference between  ABAP and HR-ABAP?

    Hi people,
    Could u just tel me abt what is the difference between ABAP and HR-ABAP?
    Thanks in advance,
    Sanjeev K.V

    Hi Sir ,
    Please have a look below .Hope it is suitable and simpler solution for your question.
    Please do reward if useful.
    Thankx.
    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    Also,
    HR:
    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    sites regarding hr-abap:
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    You can see some Standard Program examples in this one ...
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
    http://www.erpgenie.com/faq/hr.htm.
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
    These are the FAQ's that might helps you as well.
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.atomhr.com/library_full.htm
    HR Long texts Upload
    Look at the below link
    And finally,
    Few notes are below:
    InfoSets in the HR Application
    You can use SAP Query in HR to report on HR data. Queries are maintained as described in Creating Queries. The special features of queries created for HR are described in Maintaining Queries in the Human Resources Application. The maintenance procedure for HR InfoSets differs from the described procedure inasmuch as HR data fields are grouped together in infotypes.
    InfoSet management in SAP Query is also used for InfoSet Query. For further information, see Functions for Managing InfoSets.
    If you want to create InfoSets for HR, you can use logical databases PNP, PNPCE, PAP, and PCH (see HR Logical Databases). The database you must use to create your InfoSet depends on the component in which the data you want to report on is stored.
    The reports you can execute using InfoSets based on logical databases PNP (or PNPCE) or PCH are similar, but differ in that they can select different objects. The following table describes the connection between the logical database, and the infotypes you can include in an InfoSet. It also provides you with one or two examples of reports that you can execute using the appropriate InfoSets.
    Logical database PNP/PNPCE* PCH PAP
    Selection of Persons Objects from Personnel Planning Applicants
    Infotypes that can be included in the InfoSet Infotypes for· Personnel Administration (0000-0999) · Time Management (2000-2999) · Payroll infotypes · Infotypes for Personnel Planning objects that can be related to persons If the object type is specified:· Infotypes for the object type · Infotypes for objects that can be related to the specified object typeIf the object type is not specified:· All infotypes · Infotypes for Recruitment (4000-4999)· Some infotypes for Personnel Administration (such as 0001 and 0002)
    · Customer infotypes
    Reporting examples · Selection of all persons who participated in a specific business event, output of prices for reserved business events · Selection of all persons assigned to a specific personnel area, output of qualifications held by these persons · Selection of all business events held in London in March, output of all persons who participated in these business events · Selection of all positions assigned to a specific organizational unit, output of all persons assigned to the positions · Selection of all applicants hired last year to work on special projects, output of addresses for the applicants selected
    Logical database PNPCE (PNP Concurrent Employment) functions just like logical database PNP. The procedure for creating InfoSets is also the same. It only becomes significant if you work with Concurrent Employment.
    Creating InfoSets
    The maintenance procedure for HR InfoSets differs from the procedure described so far in this section inasmuch as HR data fields are grouped together in infotypes. To set up an InfoSet for the HR application, proceed as follows:
    1. On the initial screen for maintaining InfoSets, enter a name for the InfoSet and choose Create.
    2. On the next screen, enter a name for the InfoSet and select one of the HR logical databases in accordance with your reporting requirements.
    Customer infotypes can be created on all HR logical databases. In each individual case, therefore, you must decide which database to select so that you can report on customer infotypes.
    This screen enables you to enter an authorization group. All of the queries that are subsequently created using this InfoSet can only be executed by persons who have this authorization group.
    3. Choose .
    This takes you to the Infotype Selection for InfoSet  screen. You now have the option of creating field groups and assigning fields as required for non-HR InfoSets. Field groups that correspond to infotypes and already contain fields, however, are always created for HR InfoSets. The field groups are displayed in an overview tree in the top right section of the screen.
    The infotypes that you included in the InfoSet are displayed in an overview tree on the left of the screen. The infotype fields that are already included in field groups are displayed in a different color, and the corresponding field group ID is displayed.
    In the standard system, a field group is created automatically for each infotype that you included in the InfoSet (a field group corresponds to an infotype).
    In the standard system, each field group contains the infotype-specific fields. To ensure that working with the InfoSet is as easy as possible, you are advised to restrict your use of fields in each field group to those you really require. This means you should remove fields that are not required.
    An infotype's fields must only be assigned to the pertinent field group. Make sure this assignment is correct. If the assignment is incorrect, the InfoSet could be rendered unusable.
    When an InfoSet is created, the following fields are transferred automatically to the first field group:
    § Logical database PNPCE or PNP Personnel number
    § Logical database PAP Applicant number
    § Logical database PCH Object ID, plan version, and object type
    6. Determine the fields that must be included in the field groups of your InfoSet. If you require further information, see Assigning Fields to a Field Group.
    If you want, you can change the default sequence of field groups and fields as required using Drag&Drop.
    7. To save the InfoSet, choose .
    8. To generate the InfoSet, choose .
    On the Change InfoSet (InfoSet name) screen, you can choose Edit ® Change infotype selection to add more infotypes to the InfoSet, or to remove infotypes from the InfoSet. Remember to regenerate the InfoSet afterwards.
    This screen also enables you to update InfoSets if, for example, the system contains new additional fields for specific key values. To do so, choose InfoSet ® Additional functions ® Update additional HR fields.
    9. Go back to the initial screen for InfoSet maintenance.
    10. Choose User group assignment.
    11. Select a user group, and save your entry.
    sample code
    START-OF-SELECTION.
    GET pernr.
    rp_provide_from_frst p0000 space pn-begda pn-endda.
    if pnp-sw-found EQ '1'.
    READ TABLE p0001 WITH KEY pernr = p0000-pernr.
    if sy-subrc = 0.
    write : p0001-plans. " earliest.
    endif.
    endif.
    rp_provide_from_last p0014 space pn-begda pn-endda.
    if pnp-sw-found EQ '1'.
    READ TABLE p0014 WITH KEY pernr = p0000-pernr.
    if sy-subrc = 0.
    write : p0014-LGART. .
    endif.
    endif.

  • Hi All difference between abap and hr-abap urgent pls

    Hi All difference between abap and hr-abap urgent pls

    Hello,
    To add to the above points regarding infotypes
    Infotypes stand apart in  HR and manage a volume of data in HR domain..they are unique to HR module ranging from basic employee information to time management and finally the custom infotypes.....
    Payroll and other monetory activities related to an employee also form a vital part of the HR module....
    while considering Reports..in HR data is mainly with respect to infotypes and the concept of PAKEY...7 key fields which uniquely defines any record in an infotype is used..with Pernr(employee number),Begda(begindate) and Endda(enddate) form an integral part of the key..Based on the time constraints(1,2,3) of an infotype the keys are judged (to retrieve data from an infotype)
    In ABAP HR we also have lots of predefined function modules that can be used..eg:go to se37..put 'HR*' and press F4...
    finally to update an HR infotype record we use the function module hr operation rather than direct updates...also there are standard audit trail reports that monitors various activities such as insert/modify/delete operations on an hr infotype record...
    Pls revert back for clarity and reward if helpful
    Regards
    Byju

Maybe you are looking for

  • "Disk Too Slow..." problem solved...for me

    Lately my Macbook and Logic have been driving me nuts with the "Disk Too Slow" error message. But I notice it was happening on one particular song. I'll cut right to the chase....delete unused tracks. After doing this the song played thru without a p

  • PL/SQL function/Expression in a default value

    Hi, I want to generate a sequence number using oracle sequence and populate a field when user hits create button. I tried using PL/SQL expression in the default value of a field. What is the exact syntax for this. I tried this :P18_PROJECT_NUMBER :=

  • I cannot set up my iCloud account.

    When trying to set up my iCloud account, I am prompted to enter my apple id/password. After doing so it tells me my info is incorrect. Shouldn't this be the same ID/PW as my Apple account? Or do I need to create a new one?

  • How to erase all my data before selling my macbook 10.5.8 but no the applications

    I'm passing my mac to a friend and I would like to delete all my persoal data but NO the applications. What is the best  and most secure way to do this. Thanxs

  • Organization versus iphoto

    I'm told that when I make a change to a  picture in Iphoto, then that is the view I have. The master, I guess, is stuck back somewhere. All I see is the current 1 picture when I make changes or multiple changes.  Then when I read about Aperture, I se