HR ABAP- concurrent employment  ( LDB :PNPCE)

Hi
     I am working on concurrent employment in HR. I have to write ABAP report I don’t know where to start. Do you guys give me some idea? How I’ll start. I know that we use LDB PNPCE for concurrent employment. Do you guys know any standard reports for concurrent employment?
Waiting

In the program attributes declare the LDB as PNPCE and look at the sample code.
REPORT  z_pnpce MESSAGE-ID pn LINE-SIZE 130.
tables: pernr.
Nodes : Person, peras.
INFOTYPES: 0006.
DATA: BEGIN OF gt_0006 OCCURS 0,
       pernr LIKE pernr-pernr,
       stras LIKE p0006-stras,
       ort01 LIKE p0006-ort01,
       ort02 LIKE p0006-ort02,
       pstlz LIKE p0006-pstlz,
      END OF gt_0006.
START-OF-SELECTION.
GET person.
GET peras.
  rp_provide_from_last p0006 '1' pn-begda pn-endda.
  gt_0006-pernr = p0006-pernr.
  gt_0006-stras = p0006-stras.
  gt_0006-ort01 = p0006-ort01.
  gt_0006-ort02 = p0006-ort02.
  gt_0006-pstlz = p0006-pstlz.
  APPEND gt_0006.
  CLEAR  gt_0006.
END-OF-SELECTION.
  LOOP AT gt_0006.
    WRITE:/ gt_0006-pernr,
            gt_0006-stras,
            gt_0006-ort01,
            gt_0006-ort02,
            gt_0006-pstlz.
  ENDLOOP.
Good luck.
Venu

Similar Messages

  • Concurrent Employment & BW HR/Payroll Reporting (PNP vs PNPCE)

    Has anyone implemented BW HR/Payroll reporting with concurrent employment?  What (if anything) needs to be done to the BW HR/Payroll extractors? How is the "central persons" concept portrayed in BW?  Is there any documentation on BW & concurrent employment?

    There were no responses to this query the last time. I would like to ask this question again. Has anyone implemented BI HR reporting with concurrent employment turned on the ECC side? I'd really appreciate if you could share any documentation on this subject.

  • Want to have own selection screen  in HR-ABAP report using LDB

    Hi experts,
            I am working on HR-ABAP report using LDB pnp and infotypes..But, here we get the built in selection criterion..but I want my own selection screen to be displayed..whats the solution for this??? Is it possible to create my own selection screen instead of default one..and how???
    Please help me..its very urgent..

    Hi,
    chk this out:
    Create Report Categories                                                                               
    In this step, you define the report categories and determine the layout
       of the standard selection screen for these report categories. You can 
       create report categories for programs or queries that are based on the
       PNP or PNPCE logical databases.                                                                               
    The definition of report categories is divided into two sections:                                                                               
    o   In the Change Report Category view, you define general attributes 
           such as sort order, input fields for date, and so on.                                                                               
    o   In the Change Selection Criteria view, you define which selection 
           fields of the logical database should be avaliable on the selection
           screen.                                                                               
    Example                                                                               
    You want to set up your system so that your employees can only start  
       evaluation reports for Payroll if they use a payroll area. Within a   
       payroll area, you should be able to select according to personnel     
       number. Additional selection criteria should not be possible and you  
       should not be allowed to enter a sort sequence.                       
    Standard settings                                                                               
    The standard system already contains report categories. You can find the 
    attributes of the report categories in the table.                                                                               
    Note the following five report categories in particular:                                                                               
    o   Report category ' ' is the SAP default report category for     
        programs that are based on the PNP logical database.                                                                               
    o   Report category PNPCE is the SAP default category for programs that  
        are based on the PNPCE logical database.                                                                               
    o   Report category '00000000' is the customer-specific default category 
        for programs that are based on the PNP logical database.                                                                               
    o   Report category '0PNPCE' is the customer-specific default category   
        for programs that are based on the PNPCE logical database.                                                                               
    o   Report category __X2001 is the default category for Queries  that    
        are based on an InfoSet of the PNP LDB.                                                                               
    o   Report category QUEPNPCE is the default category for queries that    
        are based on an InfoSet of the PNPCE LDB.                                                                               
    The default report categories are used when a report is called if    
        the report has not been assigned a report category.                  
    Parameters and Options for Report Categories of the LDB PNP and PNPCE  
    Parameters and Options in Screen Area General Data                     
       If you activate this parameter, you can only enter data on the data
       selection period if you use reports that have been assigned. The   
       same date entries are then used for the person selection as for the
       date selection.                                                                               
    o   Matchcode allowed                                                  
       If you activate this parameter, you have use of a Matchcode        
       pushbutton (search help) if you use reports that have been assigned.
       This pushbutton enables you to perform the person selection.                                                                               
    o   Sort allowed                                                       
       If you activate this parameter, you have use of a Sort pushbutton if
       you use report that have been assigned. This pushbutton enables you
       to define a sort order before you execute the report.                                                                               
    o   Organizational structure allowed                                   
       If you activate this parameter, you have use of an Org.Structure   
       pushbutton if you use reports that have been assigned. This        
       pushbutton enables you to perform the person selection.            
       Note:                                                              
       For more information about these options, see the online           
       documentation under this path:                                     
       SAP Library -> Human Resources -> Reporting in Human Resources     
       Management -> Standard HR Reports -> Report Selection Screen in    
       Human Resources Management.                                                                               
    Parameters and Options in Screen Areas Data Selection Period/Person    
    Selection Period/Payroll Area/Period/Year                                                                               
    o   Options for data selection period and person selection period (key 
        date and so on)                                                    
        Here you define which options for date and person selection are    
        available for reports that have been assigned.                                                                               
    o   Options for payroll area/period/year                               
        Here you define which options for selection using payroll          
        area/period/year are available for reports that have been assigned.                                                                               
    Parameters and Options in Screen Area Selection View                                                                               
    o   Type/Name                                                          
        This parameter enables you to use selection views to define report 
        categories. You use the selection view selected here to determine  
        which fields are available in the Dynamic Selectionsy.                                                                               
    Note:                                                              
        You create selection views for the PNP and PNPCE logical databases 
        in the Object Navigator (SE80):                                    
        1. Start the Object Navigator (SE80)                               
        2. Choose Workbench -> Edit Object.                                
        3. Choose the More... tab page and the Selection view on this tab  
        page.                                                              
        4. Choose Create.                                                  
        5. In the Create Selection View dialog box, choose the For any     
        tables option.                                                     
        6. In the Name of view field, enter a name for your selection view.
        7. In the Tables dialog box, enter the name of the table from which
        you want to use fields.                                            
        Note:                                                              
        When you enter the table name, observe the naming convention in    
        Personnel Administration:                                          
        Infotype number: nnnn -> table name: PAnnnn                        
        8. Choose Continue.                                                
        9. In the Functional groups area, define functional groups by      
        assigning a name and a number.                                     
        10. Assign fields from the selected tables to the functional groups
        by entering the number of the desired functional group in front of 
        each field.                                                        
        11. Save your entries.                                                                               
    For more information about adjusting the dynamic selections using 
    your own selection views, see the online documentation under the  
    following menu path:                                              
    SAP Library -> Human Resources -> Reporting in Human Resources    
    Management -> HR Standard Reports -> Report Selection Screen in   
    Human Resources Management -> Enhancing the Selection Screen -    
    Dynamic Selections.                                                                               
    If you do not want to offer dynamic selections, make the following
    settings:                                                                               
    -   LDB PNP: In the Selection view field, enter PNP_NO_FREE_SEL.  
    -   LDB PNPCE: Leave the Selection view field empty.                                                                               
    Parameters and Options in Screen Area Data Selection Period/Person   
    Selection Period/Payroll Area/Period/Year                                                                               
    o   Available input parameters, date or period entry (today, key date,
       all, and so on), and standard value.                             
       Using the Standard value option, you define which of the selected
       options is shown.                                                                               
    Parameters and Options in Screen Area CE Selection Fields                                                                               
    o   CE selection fields (external person ID, grouping reason, grouping
       value)                                                           
       Using the options in this area, you define whether the external  
       person Id, grouping reason, or grouping value are available on the
       selection screen.                                                
       Note:                                                            
       These parameters are only relevant for you if you implement      
       Concurrent Employment (see also note 517071).                                                                               
    Parameters and Options in Screen Area Selection view                                                                               
    o   Dynamic selections as dialog box                                  
        If this switch is set, you can call the dynamic selections as a   
        dialog box.                                                                               
    o   Dynamic selections active                                         
        If this switch is set, the dynamic selections of the logical      
        database are active at the start of the report.                                                                               
    Note that the following combinations are possible for the last two
        options mentioned:                                                                               
    Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/inactive         
        Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/active           
        Dyn.Sel. as dialog box/Dyn.Sel. active: active/inactive                                                                               
    Activities                                                                               
    1.  Choose Edit -> New entries.                                                                               
    2.  Enter an abbreviation and a long text for the report category.         
        The customer name range for report categories is 0-9.                                                                               
    3.  Select the For the PNPCE logical database checkbox, if you want to     
        create a report category for a program or for queries of the PNPCE     
        logical database.                                                                               
    4.  In the General Data screen area, choose the desired options.           
        If you want to use selection IDs, you must have first created and      
        grouped selection Ids. The IMG path to do this is given in the         
        parameter description section.                                                                               
    5.  In the Data selection period/person selection period or Selection      
        period screen area, choose the desired options.                                                                               
    6.  In the Selection view screen area, choose the desired options.                                                                               
    7.  In the CE selection fields screen area, choose the desired (only       
        possible for report categories of the LDB PNPCE).                                                                               
    8.  Save your entries.                                                                               
    9.  Choose the subactivity Permitted selection criteria.                                                                               
    10. Choose Edit -> New entries.                                                                               
    11. In the Select option field, use the input help to select each field    
        that should be available on the selection screen.                                                                               
    12. Select the checkbox in the 1.page column, if you want this selection   
        field to be available directly when you call the selection screen.                                                                               
    Further notes                                                                               
    13. If you want to copy entries, you still have to enter the selection     
        parameters again in the subsequent screen.                                                                               
    o   If you create the report category '000000000', a selection screen is   
        generated according to report category '00000000'for all reports for   
        which a report category has not explicitly been assigned.                                                                               
    Assign Report Categories                                                                               
    In this step, you assign a report category to your reports.                                                                               
    Example                                                                               
    You have created your own report, for example ZPCTEST1, and would like
        it to have the selection screen that corresponds to that of the       
        evaluation report for Payroll, which is assigned to report category   
        '__M00001'.                                                           
        Assign report category '__M00001' to the report.                                                                               
    Requirements                                                                               
    You must have defined the Report Categories.                                                                               
    Standard settings                                                                               
    SAP Standard Reports:                                                                               
    In the standard system, reports are assigned a report category. If you
        want to override these assignments, perform the activities described  
        here. If you want to assign report categories to standard reports using
        SE38, this represents a modification.                                                                               
    Customer-Specific Reports:                                                                               
    For reports you have developed yourself, you can either assign report 
        categories by performing the activities described here or directly in SE38.
    Recommendation                                                                               
    Only assign a report category if you have created your own reports or if  
    the selection screens in the standard system do not meet your             
    requirements.                                                                               
    Activities                                                                               
    1.  Choose Edit -> New entries.                                                                               
    2.  Perform the required assignment using the Program name and Report     
       category fields.                                                                               
    3.  Save your entries.                   
    reward if helpful
    regards,
    madhumitha

  • Management Global Employee Vs Concurrent Employment

    All,
         We are moving towards implementing u201CManagement Global Employeeu201D. I am new to u201CManagement Global Employeeu201D   and I found some good documentation at www.saphelpbykevin.com  . Kevin you did great job there like you did with us in Boise, Idaho.  Any way first I wanted to understand the key differences between C.E and MGE?
    After that what effort we need to do in order to change our ABAP program. Can we use PNP with MGE ?
    Iu2019ve worked on  Concurrent Employment in 2006 and I remember we had a hard time changing all our HR ABAP program and LDB to PNPCE . Are we talking about the same effort here? If any body of you has any suggestion , key point please share with me .
    Thanks,
    Saquib Khan

    Hi Khan,
    Person who has more than one personnel assignment with one enterprise or several affiliated enterprises. A concurrently employed person is represented in the system by assigning several personnel assignments to a central person (object CP).
    If concurrent Employment is active, reports are executed by the PNPCE logical database. The general logic of the PNPCE logical database corresponds to the PNP logical database. The PNPCE logical database can also process the concept of Concurrent Employment.
    We need to activate certail switches in T77S0 table to activate concurrent employment.
    CCURE     ADDCO     X     Further Pers.Assignmnt or Processing of Info Group
    CCURE     GLEMP     X     Management of Global Employees
    CCURE     MAINS     X     Concurrent Employment Main Switch
    CCURE     PAUIX     X     CE Master Data User Interface Enhancements
    CCURE     PIDGN     1     Generation Rule PERSONID
    CCURE     PIDSL     X     Selection with PERSONID
    Technically- Go to Tcode > SE24 > CL_HRCE_MASTERSWITCHES > double click on CHECK RELEASED then activate ceis_released =True by deleting *.
    Regards,
    Purnima

  • Concurrent Employment

    We have concurrent employment maintained in our project. I need to develop reports based on PNPCE LDB. I wanted to know major differences between PNP and PNPCE and various pitfalls while using PNPCE LDB.

    hi,
    check the differences between pnp and pnpce in se36 transaction.
    RE SAPDBPNPCE
    Text
    HR Master Data (Incl. Concurrent Employment)
    Purpose
    The PNPCE logical database supports the evaluation of HR master data. It includes the functions of the PNP logical database and offers additional evaluation options. Therefore, you should use the PNPCE logical database instead of the PNP logical database for all new developments.
    The enhanced functionality of PNPCE in comparison to PNP essentially concerns the evaluation of Concurrent Employment, that is the possibility to group evaluate several assignments/personnel numbers of a person. The new events 'GET PERSON' and 'GET GROUP' as well as an enhanced syntax for the INFOTYPES statement (addition AS PERSON TABLE) for the procurement of infotype data enable you to use the new functionality. The use of these new functions is optional. You can run a PNPCE report that does not use the new events and the addition for the INFOTYPES statement in a PNP-compatible session. Since the PNPCE also has an improved selection screen, each report benefits from this even if the report does not use the functions for evaluating Concurrent Employment.
    Prerequisites
    A report that wants to use the PNPCE must enter this in its report attributes under Logical database.
    In addition, the PERNR structure must be declared in the report using the 'TABLES PERNR' statement. You can only use the PERNR structure again in certain circumstances. The use of the 'GET PERNR' event is therefore forbidden. Instead, use the 'GET PERAS' event. Except for the PERNR-PERNR component, all other components of the PERNR structure are no longer filled and have initial values. This kind of programming (with the exception of PERNR-PERNR) therefore not permitted.
    In addition to the 'GET PERAS' event, you can also use the GET PERSON' and 'GET GROUP' events. To be able to use these events, you must declare them using the NODES statement (NODES PERSON', 'NODES GROUP', or. NODES PERAS').
    Explanation of Terms
    If the 'GET PERSON' and 'GET GROUP events and the 'AS PERSON TABLE' addition for the INFOTYPES statement are not used, the report indicates that it does not require the functionality for evaluating Concurrent Employment. In this case, the report runs in a PNP-compatible session. This is referred to as PNP mode in the following documentation. On the other hand, if the report uses the functionality for evaluating Concurrent Employment we refer to CE mode.
    Features
    Process of an Evaluation
    The PNPCE selection screen offers you as standard a range of functions that you can use to restrict the personnel number and person selection. These are discussed in more detail in the following sections. The process is initially as follows regardless of whether the report runs in CE or PNP mode. All available functions and selection conditions leads to the selection of personnel numbers. If you use the sorting function, this set of personnel numbers is then sorted according to the sort criteria you selected. In PNP mode, the GET PERAS event is triggered as a result for each personnel number.
    In CE mode, the persons belonging to the personnel numbers are determined first for all personnel numbers selected. The GET PERSON event is then triggered for each person. The person ID is specified in the OBJID component of the PERSON structure. PERNR_NUM contains the total number of personnel assignments (= personnel numbers) that this person has and the ALL_PERNRS table, which contains a list of these personnel numbers regardless of whether they were actually selected or not. The SELECTED flag is set to X for the personnel numbers selected. The flag is initial for all personnel numbers that are not selected. The PROCESS flag specifies whether the personnel number should be processed in the rest of the process. This flag is set to X by default for the personnel numbers selected. However, the report can set or delete this flag at the GET PERSON event for all personnel numbers. In this way, report and logical database communicate with each other which enables the report to control the rest of the process.
    In the next step, the logical database groups all personnel numbers of a person that are to be processed (that is, all personnel numbers that have the PROCESS flag set). The report can control the type of grouping using the PNPCE_GROUPING_FROM_PAYROLL flag (normal or payroll grouping) and using the PNPGPRSN (grouping reason) and PNPGPVAL (grouping value) parameters of the selection screen. The GET GROUP event is triggered for each group of personnel numbers determined. The GROUPING_REASON and GROUPING_VALUE components contain the grouping reason and grouping value of this group. The number of personnel numbers that belong to this group and that are processed subsequently is in PERNR_NUM. The included ALL_PERNR table contains a list of these personnel numbers with additional information. The SELECTED flag specifies whether the current personnel number was originally selected (flag is set) or was marked by the report as to be processed. GROUPING_BEGDA and GROUPING_ENDDA contain the validity period that the personnel number has for this grouping. The NO_AUTHORITY flag is set if there is insufficient authorization for a personnel number. This personnel number is not processed further. The SORT component defines a standard sort order for the personnel numbers of a group. The report can change this by overwriting the values. In this way, report and logical database communicate with each other, which controls the further processing sequence of the personnel numbers.
    The GET PERAS event is then triggered for all personnel numbers of the group (with the exception of the personnel numbers for which no authorization exists) in the sequence defined by the SORT component (see above). The SELECTED, GROUPING_BEGDA, and GROUPING_ENDDA components have the same meaning here as with the GET GROUP event. The PROCESSED_BEFORE flag specifies whether the personnel number has already been processed once before (it is possible that the personnel number belongs to several groupings and has been therefore been processed several times).
    Sort Order
    You can sort the list of selected personnel numbers using the Sort function in the application toolbar. You can choose to include up to seven fields from infotype 0001 for the sort. Since several data records can exist for infotype 0001 for a personnel number, you also need to specify for period evaluations (not the case for key date evaluations) whether the sort should take place according to the values of the last or of the first data record in the person selection period.
    In PNP mode, the sorted sequence determines exactly the sequence in which the GET PERAS event is called. In CE mode, the sort determines the sequence in which the GET PERSON event is called. The list of persons is created based on the (sorted) sequence of personnel numbers. If only one person exist for each selected personnel number, the sequence of persons corresponds exactly to the sequence of personnel numbers. However, if several selected personnel numbers lead to the same person, only the first personnel number determines the sort sequence of persons. All other personnel numbers only determine the sequence in which the GET PERAS event is subsequently called. Provided that the report does not require the personnel numbers to be resorted by manipulating the SORT component at the GET GROUP event (see above), the GET PERAS event is called for the personnel numbers of a person in the sequence in which the personnel numbers were (originally) sorted.
    Retrieving Infotype Data Records
    As well as triggering the GET PERSON, GET GROUP, and GET PERAS events, the logical database also provides the data records of the infotypes that are requested using the INFOTYPES statement. In the report, you must specify the INFOTYPES statements where the variable declarations are made. You should do this in any case before the first code is entered.
    In principle, there are three types of INFOTYPES statements:
    INFOTYPES nnnn
    The nnnn infotype is provided with the data records of the current personnel number at the GET PERAS event. Only the data records that are in the evaluation period specified in the selection screen are provided ( this is different to PNP, which provides all data records by default). Alternatively, the report can specify which data records are to be provided using the RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_ALL macros.
    INFOTYPES nnnn AS PERSON TABLE
    The nnnn infotype is provided at the GET GROUP event with the data records of all personnel numbers that are in the included ALL_PERNRS table (of the GROUP structure) and for which authorization exists (NO_AUTHORITY flag is not set). Only the data records that are in the evaluation period specified in the selection screen are provided. Alternatively, the report can specify which data records are to be provided using the RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_ALL macros.
    INFOTYPES nnnn AS PERSON TABLE MODE P
    The nnnn infotype is provided at the GET PERSON event with the data records of all personnel numbers that are in the included ALL_PERNRS table (of the PERSON structure). No authorization check is performed and all existing data records are provided independent of how the evaluation period is defined in the selection screen. The use of the RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_AL macros also has no influence here.
    Selection Options
    You can use all the functions and selection options in the selection screen (initially) to select personnel numbers regardless of whether the report is running in PNP or CE mode. Only in CE mode, the persons belonging to these personnel numbers are then determined. The functions that PNPCE provides to restrict the selection are described in the following. The environment in which these functions are actually used depends on the report and its report category. You can assign a report category to a report in maintenance of report attributes (SE38, Attributes, Change button -> HR report category button). The customer can override this assignment. To do so, perform the  Customizing activity under 'Personnel Management' -> 'Human Resources Information System' -> 'Reporting' -> 'Adjusting the Standard Selection Screen'. Follow the same path to define and change report categories in the Customizing activity. Since the PNP logical database also uses the concept of report categories, ensure that you assign only one report category that is created specially for the PNPCE database to a PNPCE report.
    Selection Fields of the 0000 and 0001 Infotypes
    You can use all the standard fields of the 0000 and 0001 infotypes for selection. You can also use additional selection fields that are the concatenation of two or more of these infotype fields. If possible, do not use these concatenated fields because they do not play a significant role in the selection and can lead to long runtimes in certain circumstances. You can show and hide the required selection fields using the Selection Fields function in the application toolbar. The report category defines a preselection of fields that should be available.
    Dynamic Selections
    The dynamic selections enable you to select according to any infotype fields and, in particular, according to customer-specific infotype fields. You can show and hide the dynamic selections using the Dynamic Selections function in the application toolbar. The report category controls whether this appears as a dialog box or inplace, that is whether the dynamic selections are supported at all. The basis for the dynamic selections is a selection view that defines which infotypes and which fields can be used for selection. You can define the selection view in the ABAP Workbench. You must choose For any table as the type of selection view (the For logical database type is not permitted although you may have presumed differently at first). The report category is used to control which selection view is used for the dynamic selections. If you use the dynamic selections, the Restrict by OrgStructure, Search Help, and Selection ID functions are not available.
    Restrict by OrgStructure
    You can also select personnel numbers by their position in the organizational structure. To do so, you use the OrgStructure function in the application toolbar. This button displays the organizational structure. Here you can select the organizational units to which the personnel numbers to be selected should belong. It is insignificant if the personnel numbers are assigned to the selected organizational unit directly or to one of its subordinate organizational units. If you restrict the selection by organizational structure, the Dynamic Selections, Search Help, and Selection ID functions are not available.
    Search Help
    You can use the included search helps of the PREM collective search help by clicking Search Help function in the application toolbar. You can also add customer-specific search helps here. For a description of how to do this, see the Customizing for Personnel Management -> Personnel Administration -> Basic Settings -> . Ensure that you also generate the selection program using the DBPNPGMC report so that the search help actually exists in the PNPCE logical database. If you use a search help, the Dynamic Selections, Restrict by OrgStructure, and Selection ID functions are not available.
    Selection ID
    You can also restrict the number of personnel numbers to be selected using a predefined selection method called a Selection ID. For information on how to use and create selection IDs, see the Customizing activity under 'Personnel Management' -> 'Human Resources Information System' -> . How you  selection IDs is also described here. The selection IDs whose grouping is stored in the report category are available to you for selection on the PNPCE selection screen. When you select a selection ID, it is always performed. This happens either explicitly when you press the button (behind the selected selection ID), or implicitly when output starts (F8). If you use a selection ID, the Dynamic Selections, Restrict by OrgStructure, and Search Help functions are not available.
    Evaluation Period
    The PNPCE (and the PNP) differentiates between the data selection period and the person selection period. Both these periods are summarized in the term evaluation period. Whereas the person selection period affects the selection of personnel numbers, the data selection period controls the retrieval of data requested by the INFOTYPES statement. You can configure both separately on the selection screen by selecting an appropriate entry in each list box. Alternatively, you can set up both selection periods at the same time using a common list box. You can control which entries are in the list boxes (that is which evaluation intervals are supported) using the report category. The person selection period you have set up is taken into consideration when the personnel numbers are selected. Only the personnel numbers are selected that fulfill the selection conditions on at least one (key) date in the specified person selection period. All data records of the requested infotypes that are valid on at least one (key) date in the specified data selection period are retrieved by default for these personnel numbers. You can set up a different procedure using the RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_ALL macros. Retrieving data records for infotypes that were defined by the AS PERSON TABLE MODE P addition is an exception. In this case, all data records are retrieved independent of the data selection period.
    The payroll period should be considered as a special feature for the evaluation period. You can select either the current payroll period or another payroll period. You must enter the payroll area in both cases. The evaluation period is calculated from these specifications. This interval is used as evaluation period (as person selection period and as data selection period) for the further (internal) processing.
    The report can query the evaluation period used via the PN structure. The BEGDA and ENDDA contain the data selection period whereas BEGPS and ENDPS contain the person selection period. Inversely, the report can also set the data and person selection period explicitly. The report must also fill the relevant components of the PN structure at the START-OF-SELECTION event. This is only meaningful if the manual maintenance of the evaluation period was hidden using the report category.
    Communication Between Report and PNPCE
    The DBPNPCECOM include is an element of the PNPCE logical database. This is automatically included in each report that is based on PNPCE. The common part defined in this include means that the report and PNPCE have a common data area. This data area enables the data exchange for communication between the report and PNPCE. All switches that can be used by the report to control the process of PNPCE are defined here. The DBPNPCECOM include also contains a number of macros that PNPCE uses to make additional functions available to the report. Most of these macros were adopted by PNP and defined there in the DBPNPMAC include. Additional macros still exist in the TRMAC table, which has in the meanwhile become obsolete. Do not use these macros for any purpose. You can find all the macros defined in PNP that affect the functionality of the logical database in the DBPNPCECOM include. They have a slightly different spelling; underscore_ instead of hyphen-, for example RP_PROVIDE_FROM_LAST  instead of PROVIDE-FROM-LAST. Some of the TRMAC macros in the DBPNPCECOM include were redefined with the same spelling but without the functionality so that any incorrect use (of the TRMAC macros) leads to a syntax error and is therefore excluded.
    The following describes the functions made available by the switches and macros defined in the DBPNPCECOM include. For information about the exact syntax for calling a macro in view of its parameters and type specifications, see the definition of the macro in the DBPNPCECOM include.
    Evaluation Period in the PN Structure
    The PN structure contains information about the evaluation period for which the evaluation is started regardless of how this is specified on the selection screen. A report should access the fields of the PN structure only if it requires this information and should not access the PNPBEGDA, PNPENDDA, and other selection fields of the selection screen.
    The PN-BEGPS and PN-ENDPS fields contain the person selection period for which the personnel number selection was performed. The PN-BEGDA and PN-ENDDA fields contain the data selection period. If you have specified the evaluation period using a payroll period, PN-PABRP contains the payroll period, PN-PABRJ the payroll year, and PN-PERMO the period parameters. The payroll period and payroll year are also in PN-PAPER.
    The report can also fill the PN-BEGDA, PN-ENDDA, PN-BEGPS, and PN-ENDPS fields with values at the START-OF-SELECTION event and in doing so, specifies the evaluation period. In cases like this, it is not meaningful to have this setting option on the selection screen and it should therefore be hidden using the report category. In addition, the report must ensure that the values specified are valid since there is no longer a validation of these values.
    Setting the Data Selection Period: RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, RP_SET_DATA_INTERVAL_ALL
    The report uses the INFOTYPES statement to request infotype data records that are read and made available by PNPCE. The report can specify that it only requires data records that are valid in the specified period using the 'VALID FROM .. TO ..' addition. Unfortunately, you cannot use the 'VALID FROM .. TO ..' addition in most cases because it does not accept dynamic date specification. It only accepts constants. If you do not use the 'VALID FROM .. TO ..' addition, PNPCE returns all data records that are in the specified data selection period on the selection screen by default. If this is not required, the report can call the RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_ALL macros to restrict the infotype data records to a different validity period. The RP_SET_DATA_INTERVAL macro sets the validity period for an individual infotype whose name you specify in the first parameter. Do not confuse the name of the infotype, P0001 or PP0001 for example, with the number of the infotype 0001. You specify the validity period in the second and third parameters. You should use the RP_SET_DATA_INTERVAL_INFTY macro in the same way but instead of entering the name in the first parameter, enter the number of the infotype. Since the same infotype can be used several times (under different names) when you use the INFOTYPES additions 'AS PERSON TABLE' or 'NAME ...', this macro sets the validity period for all infotypes of the same number. In contrast, the RP_SET_DATA_INTERVAL_ALL macro only has the validity period as a parameter and sets this for all infotypes used.
    Setting the Mode of an Infotype: PNP_SET_INFTY_MODE_BY_NAME, PNP_SET_INFTY_MODE_BY_NUMBER
    The INFOTYPES statement can use the MODE addition to control whether the infotype should be processed and how this should proceed. If the addition is not used, this corresponds to a MODE Y and the PNPCE logical database reads the infotype and places it in the internal infotype table. MODE N enables the internal infotype table to be declared but no infotype data records are read by the PNPCE logical database. MODE P can only be used together with the 'AS PERSON TABLE' addition and causes all infotype data records of all personnel numbers of a person to be read at the GET PERSON event without authorization check or period restriction. The report can use the PNP_SET_INFTY_MODE_BY_NAME and PNP_SET_INFTY_MODE_BY_NUMBER macros to change the MODE specified by the INFOTYPES statement (dynamically) at runtime. The macros must be called at the INITIALIZATION or START-OF-SELECTION events. The PNP_SET_INFTY_MODE_BY_NAME macro sets the MODE for an individual infotype whose name you specify in the first parameter. Do not confuse the name of the infotype, P0001 or PP0001 for example, with the number of the infotype 0001 You should use the RP_SET_INFTY_MODE_BY_NUMBER macro in the same way but instead of entering the name in the first parameter, enter the number of the infotype. Since the same infotype can be used several times (under different names) when you use the INFOTYPES additions 'AS PERSON TABLE' or 'NAME ...', this macro sets the MODE for all infotypes of the same number.
    Reading Time Management Infotypes: RP_READ_ALL_TIME_ITY, RP_READ_ALL_PERSON_TIME_ITY
    Time management infotypes (2000-2999) often contain a large number of data records, particularly if positive recording is implemented. If a dataset that is too large is requested using the INFOTYPES statements, this can lead to performance problems or in an extreme case, to memory overflow. For this reason, there are the RP_READ_ALL_TIME_ITY and RP_READ_ALL_PERSON_TIME_ITY macros, which can be used to read time management data in a targeted manner. The time management infotypes are defined by the INFOTYPES statement with the MODE N addition. This enables the internal infotype table to be declared but no data is read (at the moment) by the PNPCE logical database. The report can then decide at the GET GROUP and GET PERAS events whether it wants to read the time management data and for which period. At the GET GROUP event, the report can call the RP_READ_ALL_PERSON_TIME_ITY macro to read all time management data on the personnel numbers of a person that should be processed. In other words, the time management data that is in the included ALL_PERNRS table of the GROUP structure. The data is then written to the infotypes that were declared by the INFOTYPES statement with the AS PERSON TABLE addition.
    However, at the GET PERAS event, the report can call the RP_READ_ALL_TIME_ITY macro to read the time management data on the current personnel number. In both cases, you must specify the period in which the data records should be valid when the macro is called. The PNP-SW-IGNORELOCKEDRECORDS switch is also taken account of in both cases and controls whether locked data records are read or not. In addition, an authorization check is performed for all data records. If no authorization exists for a data record, this data record is rejected (that is, it is not placed in the infotype table). If data records are rejected because of missing authorization, the PNP-SW-AUTH-SKIPPED-RECORD global switch is set to 1. This switch is otherwise set to 0.
    Locked Data Records: PNP-SW-IGNORELOCKEDRECORDS
    In HR master data maintenance, you can lock individual infotype data records. These data records are normally ignored during evaluations using PNPCE. If you set the PNP-SW-IGNORELOCKEDRECORDS switch to N (at the INITIALIZATION or START-OF-SELECTION events), the report can however instruct PNPCE to read locked data records too.
    Authorization Check: PNP_SW_SKIP_PERNR, PNP_GET_AUTH_SKIPPED_PERNRS
    The PNPCE logical database performs an authorization check for all infotype data records that are requested by the report using the INFOTYPES statement. If no authorization exists for even one individual data record of one of the infotypes used, processing of the personnel numbers is terminated by default. In PNP mode, this means that the GET PERAS event (for the personnel number) is skipped. The report is only aware of this if it then (if possible at the END-OF-SELECTION event) calls the PNP_GET_AUTH_SKIPPED_PERNRS macro, which returns a list of the skipped personnel numbers.
    In CE mode, the NO_AUTHORITY flag is set in the included ALL_PERNRS table at the GET GROUP event, which indicates to the report that no authorization exists. The following event, GET PERAS, is also not executed for this personnel number. As in PNP mode, the report can get a list of the personnel numbers for which no authorization exists using the PNP_GET_AUTH_SKIPPED_PERNRS macro.
    You can enter different settings using the PNP_SW_SKIP_PERNR switch. If you set this switch (at the INITIALIZATION or START-OF-SELECTION events) to N, no more personnel numbers (without authorization) are skipped. Only the data records for which no authorization exists are rejected (that is, not made available). The report has no way of knowing that data records are being withheld from it.
    Mass Access By Array-Fetch: PNPCE_ARRAY_FETCH_SIZE
    The infotype data records are not read for each personnel number individually but in a mass access for several personnel numbers simultaneously. This reduces the number of database accesses and performance can be considerably improved. You cannot read the infotype data records of all personnel numbers at once since this can lead to problems with memory space depending on the number of selected personnel numbers and existing data records. For this reason, the personnel numbers are segmented into blocks of a fixed size and the personnel numbers of a block are always read together. The size of the block is set to 100 by default (this means that the personnel numbers from 100 persons are processed at the same time). The report can change this setting using the PNPCE_ARRAY_FETCH_SIZE switch at the INITIALIZATION or START-OF-SELECTION event. Be very careful if you change this value. If the value is set too high, it can lead to a memory overflow. If the value is too low, performance is affected. You must choose a suitable value based on the number of requested infotypes and their expected datasets.
    Locking Persons/Personnel Numbers
    By default, the logical database does not lock any personnel numbers or persons. However, the report can request this. In CE mode, the report must set the PNPCE_ENQUEUE_PERSONS switch to X. This enables the LDB to set locks for all personnel numbers of a person. The person is regarded as locked and is processed further only if all personnel numbers have been successfully locked. Otherwise, they are skipped. It is the reports task to remove this lock. To do so, the report calls the PNPCE_DEQUEUE_PERSON macro by specifying the person ID. Persons that could not be locked and were skipped are logged by the logical database. After processing has finished, the report can query this list using the PNPCE_GET_ENQ_FAILED_PERSONS macro. However, not all persons are logged, only the first N persons. The report can find out how many this is exactly using the PNPCE_LOG_ENQ_FAILED_PERSONS switch. 1 means that all persons should be logged. If the report calls the PNPCE_GET_ENQ_FAILED_PERSONS macro, the total number of skipped persons is returned with the first N logged persons.
    In PNP mode, individual personnel numbers can be locked. The report (and PNP) must set the PNP-SW-ENQUEUPERNR switch to Y to enable this.  The report is here also responsible for unlocking the personnel numbers and can call the PNP_DEQUEUE_PERNR macro for this by specifying the personnel number. The report can get a list of the personnel numbers that could not be locked by calling the PNP_GET_ENQ_FAILED_PERNRS macro. Only the first N personnel numbers and the total number of skipped personnel numbers are returned. The number of personnel numbers that should be logged can be specified using the PNP_LOG_ENQ_FAILED_PERNRS switch. 1 means that all personnel numbers should be logged.
    Determining the First Data Record in the Period: RP_PROVIDE_FROM_FRST
    The RP_PROVIDE_FROM_FRST macro analyzes the infotype data records that were transferred in an internal table to the macro with regard to the specified period. It places the first data record that is valid in the specified period (the data record with the lowest ENDDA) in the header of the internal table. If no data record exists in the specified period, the PNP-SW-FOUND global switch is set to 0. Otherwise it has the value 1. If the infotype contains subtypes, you also need to specify the subtype for which the last valid data record should be determined. If you do not specify the subtype, the result is undefined. In addition, the data records of the internal table must be sorted according to primary key. The data records are sorted if the data records were determined by PNPCE logical database using the INFOTYPES statement. Analyze the implementation of the macro if the exact functions of the macro are unclear. If in doubt, do not use the macro. Instead implement a suitable solution for the report in question.
    Determining the Last Data Record in the Period: RP_PROVIDE_FROM_LAST
    The RP_PROVIDE_FROM_LAST macro analyzes the infotype data records that were transferred in an internal table to the macro with regard to the specified period. It places the last data record that is valid in the specified period (the data record with the highest ENDDA) in the header of the internal table. If no data record exists in the specified period, the PNP-SW-FOUND global switch is set to 0. Otherwise it has the value 1. If the infotype contains subtypes, you also need to specify the subtype for which the last valid data record should be determined. If you do not specify the subtype, the result is undefined. In addition, the data records of the internal table must be sorted according to primary key. The data records are sorted if the data records were determined by PNPCE logical database using the INFOTYPES statement. A special feature of infotypes with time constraint 3 in this case is that the data record with the highest ENDDA is not necessarily returned, but the first data record (if it exists) that is valid on the end date of the specified period. Analyze the implementation of the macro if the exact functions of the macro are unclear. If in doubt, do not use the macro. Instead implement a suitable solution for the report in question.
    Reading Infotypes: RP_READ_INFOTYPE
    The RP_READ_INFOTYPE macro reads the data records of an infotype for the specified personnel numbers that are valid in the specified period, and writes these to the internal table specified. This table must be completed correctly. If no data records exist in the specified period, the PNP-SW-FOUND global switch is set to 0. Otherwise it has the value 1. In addition, an authorization check is performed for all data records. If no authorization exists for a data record, this data record is rejected (that is, it is not placed in the internal table). If data records are rejected because of missing authorization, the PNP-SW-AUTH-SKIPPED-RECORD global switch is set to 1. This switch is otherwise set to 0. The PNP-SW-IGNORELOCKEDRECORDS switch is also taken account of when the data records are read and controls whether locked data records are read or not.
    Normally, infotypes are read using the HR_READ_INFOTYPE function module. The RP_READ_INFOTYPE macro can improve performance when the data records have already been read by PNPCE and are in the internal buffer. PNPCE only read the data records that were requested by the report using the INFOTYPES statement. In addition, the buffer is deleted again at the latest after 100 processed personnel numbers. If however the report requests the data records using an INFOTYPES statement, it is not particularly meaningful to request the data records again for the same personnel number using the RP_READ_INFOTYPE macro. The buffer is only useful when the data records are called for a different personnel number if these personnel numbers belong to the block of the 100 current buffered personnel numbers. Always weigh up the advantages of this macro against the consequences of its use for performance.
    Excluding Withdrawn Employees: RP_SEL_EIN_AUS_INIT
    If this macro is called at the INITIALIZATION event, only personnel numbers are selected that do not have the status withdrawn in the specified person selection period. From a technical point of view, the select option PNPSTAT2 (STAT2 from infotype 0000) is filled with '   0' for this. This is a default value for the selection condition displayed on the selection screen that the user can change or delete at a later date.
    Progress Indicator: PNPCE_NO_PROGRESS_INDICATOR, PNPCE_PROGRESS_BLOCK_SIZE
    The PNPCE logical database uses the standard technique of displaying processing progress (process indicator). If the report wants to set up its own progress indicator or does not want to have a progress indicator displayed, it can switch this indicator off by setting the PNPCE_NO_PROGRESS_INDICATOR switch to X. The PNPCE_PROGRESS_BLOCK_SIZE switch enables the report to control how often (that is, after how many processed persons) the progress indicator should be updated. If the progress indicator is updated too often, performance suffers.
    Payroll Grouping: PNPCE_GROUPING_FROM_PAYROLL
    If you set the switch to X, the grouping of personnel numbers (as returned at the GET GROUP event) should be performed on the basis of payroll data.
    Personnel Numbers Skipped Due to Error: PNP_GET_ERR_SKIPPED_PERNRS
    A special logic for determining data records is implemented in PNPCE for certain infotypes. This is performed using a function module (HR_COST_DISTRIBUTION_GET) for infotypes 0027 and 0266. In the case of an error, the function module can trigger an exception. PNPCE reacts to an exception by terminating processing of the personnel numbers for which the error occurred (that is, the PUT PERAS event is not triggered). If the report wants to know which personnel numbers were skipped due to this error, it can call the PNP_GET_ERR_SKIPPED_PERNRS macro.
    Comments
    Headers of Infotype Tables
    PNPCE fills the table body with infotypes defined by INFOTYPES. It does not fill headers. These are initialized. Therefore, it is not permitted to program headers. This is in part different in the PNP logical database. In certain cases, the header is also filled but in many cases it is not filled. Since this depends on various factors, which, in particular, cannot be traced or controlled by the report, you are also not permitted to program headers.
    Infotype Administration Table $RINFO$
    In the $RINFO$ table, infotypes are managed that the report defines using the INFOTYPES statement. It is defined in the DBPNPCECOM include so that the report also has access to this table. You are forbidden to manually modify this table for the purpose of changing infotype characteristics by the report. Instead, use the macros that enable you to set the infotype characteristics (set the MODE by PNP_SET_INFTY_MODE_BY_NAME and PNP_SET_INFTY_MODE_BY_NUMBER; set the validity period by RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_ALL).
    Starting a PNPCE Report Using Preselected Personnel Number Set/Person Set
    You can also start a PNPCE report using an externally predefined personnel number set. You must provide the PNPINDEX parameter with the relevant personnel number when you call the report using SUBMIT. Since, technically speaking, the select option for PNPINDEX is hidden, you must specify the personnel numbers in a RANGE structure that consists of SIGN, OPTION, and LOW. For each personnel number, SIGN must contain the value I, OPTION the value EQ, and LOW the personnel number. For SUBMIT, the range table should be transferred to PNPINDEX by the IN operator.
    Example:
    RANGES: pernr_index FOR pernr-pernr.
    CLEAR pernr_index.
    pernr_index-sign = 'I'.
    pernr_index-option = 'EQ'.
    pernr_index-low = '00000815'.
    APPEND pernr_index.
    SUBMIT pnpce_report WITH pnpindex IN pernr_index.
    If a set of personnel numbers is defined in this way, you cannot use the Dynamic Selections, Restrict by OrgStructure, Search Help, and Selection ID functions to (further) restrict the set of personnel numbers. However, the conditions entered for the selection fields of infotypes 0000 and 0001 are taken into account.
    Similarly, you can start a PNPCE report with a specified set of persons. You must provide the PNPPERID parameter with the relevant person IDs when you call the report using SUBMIT. Unlike PNPINDEX, PNPPERID is not a range but is an internal table whose row type is the PERSONID data element.
    Example:
    DATA: personid_index TYPE STANDARD TABLE OF personid.
    APPEND '00000815' TO personid_index.
    SUBMIT pnpce_rerpot WITH pnpperid = personid_index.
    If a set of persons is defined in this way, you cannot define a set of personnel numbers (using PNPINDEX) at the same time. Also in this case, you cannot use the Dynamic Selections, Restrict by OrgStructure, Search Help, and Selection ID functions to (further) restrict the set of personnel numbers.
    Using Several Selection Options Simultaneously
    In addition to selecting fields of infotypes 0000 and 0001 as described above, PNPCE offers six other options for selecting personnel numbers. They are selection using dynamic selections, using organizational structure, using search help, using selection ID, and by explicitly specifying a personnel number set in PNPINDEX or a person set in PNPPERID when you call the report. These six options exclude each other, that is you can only use one of these options at a time. Appropriate queries on the selection screen attempt to ensure this. It can happen in certain cases, however, that more than one of these functions is used (for example, when you call the PNPCE report by explicitly specifying a personnel number set in PNPINDEX as well as one of the variants to be used in which dynamic selections were also stored). In this case, only one function, which is the first function used, is taken into account with regard to the following sequence:
    1.     Dynamic Selections
    2.     Restrict by OrgStructure
    3.     Search Help
    4.     Selection ID
    5.     Explicit Specification or Personnel Numbers in PNPINDEX
    6.     Explicit Specification or Persons in PNPPERID
    The personnel number set found this way is always restricted further by the selection conditions specified in the 0000 and 0001 infotypes.
    Example
    PNP Mode (without functions for evaluating concurrent employment)
    TABLES: PERNR.
    NODES: PERAS.
    INFOTYPES: 0006 NAME P0006.
    GET PERAS.
    table P0006 is filled with infotype 0006 data of PERNR
    stored in PERAS-PERNR
      WRITE :/ PERAS-PERNR.
    CE Mode (with function for evaluating concurrent employment)
    TABLES: PERNR.
    NODES: PERSON, GROUP, PERAS.
    INFOTYPES: 0001 NAME ALL_0001 AS PERSON TABLE MODE P.
    INFOTYPES: 0001 NAME PP0001 AS PERSON TABLE.
    INFOTYPES: 0006 NAME P0006.
    GET PERSON.
    table ALL_0001 is filled with infotype 0001 data of all PERNRs
    stored in PERSON-ALL_PERNRS without authority check !!!
      WRITE :/ PERSON-OBJID.
    GET GROUP.
    table P0001 is filled with infotype 0001 data of all PERNRs
    stored in GROUP-ALL_PERNRS
      WRITE :/ GROUP-GROUPING_REASON, GROUP-GROUPING_VALUE.
    GET PERAS.
    table P0006 is filled with infotype 0006 data of PERNR
    stored in PERAS-PERNR
      WRITE :/ PERAS-PERNR.

  • ABAP Query Using LDB

    Hello Frn's
    I need to develop a abap Query using LDB , for this a Infoset is allready created , which uses PNPCE LDB .
    Below i am Descrbing the scenerio , for which we need to develop the query ....
    Dept/Div Transfer
    Employees who transferred dept or division within specified date range:
    EmpID
    Last Name, First Name
    Date of transfer
    New department
    New division
    Current supervisor
    Old department
    Old division
    How can i fitler out the data of our requirment ... because i want to use same infoset in diffrent query .
    Please provide some solution
    Thanks and Regards..
    Priyank Dixit

    Hi Priyank,
    First you need to check whether all the required fields are available there in the LDB PNPCE(I guess you are using the same).
    I think old department, old division must not be available there. Then you need to add it in your Infoset and write custom code for these fields. Once you are done with custom coding, you can use this infoset for creating queries.
    Use trnx SQ02 to create queries, either SAP or Infoset.
    Hope it helps. Let me know if you need some more help.
    Raveesh

  • Concurrent employment authorization question

    Hi people,
    did anyone have experience with concurrent employment and structural authorization.
    We have Holding company with 5 company codes and personal administrators can only see employees in their company.
    But when employee is changing the company administrator from company B where employee is hiring cannot write the employees personnel number in IT 0000 field RFPNR (reference personnel number) from the company A where he worked before because structural authorization don't allow that.
    All companies are in the same client.
    Thank you for answers. Best regards.
    Romano

    Hi ,
    If you are using structural authorisations, then check the profile which is assigned to the role of the administrator in compnay B.
    The structural  profile assigned to the role should ideally call the functional module where the authorisations have been coded.
    Tweaking this function module will help you to resolve the issue if you are using FM.
    check with security team and ABAP guys to debug whiich profile its calling and inturn which FM its calling when user of company B is trying to do that.
    Hope this helps.
    Regards
    Joe

  • Concurrent Employment (CE)

    Hi Experts,
    Can anyone could explain what is "Concurrent Employment (CE), " I have never come across, so i request you give me brief idea on this.
    Thanks in Advance,
    Hasini

    The Concurrent Employment is basically an employment scenario based on several personnel assignments between the employee and the employer. The personnel assignments can run simultaneously.
    Concurrent employment allows an employee to hold multiple positions at the same time and these positions are then linked together for the purposes of payroll, time and benefits processing.
    Employees with concurrent employments usually have as many personnel numbers as the personnel assignment. However, they are further assigned one PERSON ID, to enable proper tracking throughout the employment of that employee in the company. The different personnel assignments are linked by the Person ID. While the personnel assignment identifies the characteristics of the assignments such as work schedule and  remuneration, the Person ID describes the functions to be performed by the employee during the assignments. The infotype for maintaining Person ID is 0709.
    The concurrent employment model in SAP with regards to CE is for reporting purposes. It is the logical database framework (PNPCE) for reporting on Concurrent Employment.
    You can maintain infotype on concurrent assignment via PA30, PA40 and PA61.
    Need more specific information?
    Evita

  • Error in SM35 for RP50G-CCNTR in concurrent employment payroll (infotype 0, 1)

    Hi Experts,
    I need to perform mass update through BDC session. But employee has multiple assignments (more pernr numbers). From PA40 selection, only Person ID is input field, the assignment field is only selectable. In BDC, I add one item that moving pernr into assignment field (RP50G-CCNTR)
    when I run session in background get into the error that “RP50G-CCNTR” is not the input field..
    But when I try for foreground or display with error it is working fine without any problem.
    Please advise how do I do the mass update for concurrent employment case in background.
    Any help would be much appreciated.
    Thanks
    Balram Adep

    Hi Amit,
               Thaks for reply. Amit, I am new to ABAP-HR so i dont know how to use FM "HR_MAINTAIN_MASTERDATA".
    Can u please explain in detail.
    Thanks
    Ziad

  • MGE and Concurrent Employment

    Hello Experts,
    Can anybody suggest me what's the basic configuration needed to implement to Concurrent Emp? Actually we don't like to use the Actions, but our only req. is to have the list box functionality in PA30. We dont want the Employee Recognition screen also. We are having a very stable system from years and would like to use the same expat actions we have been using. Basically, we don't have the lavishness to train the end-users again. But still can do some compromising if its worth it. Hope you understand.
    Sankhadip.

    Lol!
    I didn't see post until now...Not sure if you received the response yet...
    MGE is a subset or submodule of CE.
    CE concept is more align with and more import if you use SAP Payroll and Time. CE is concurrent employment where a person holds more than one position at a time in the same country.
    MGE is management global employee. Where a person move from one position to another during a duration to do an assignment. Upon completing the assignment, the person could localize there or return home.
    PNP and PNPCE. PNP is being discontinued and is replaced by PNPCE. The main difference between the two is PNPCE support the PERSON ID concept. Which is the unique identifier for an employee. It would be best to use PNPCE with MGE as you need that PERSON ID in the HR Report Category.
    Kevin T. Nguyen-Tu
    www.saphelpbykevin.com

  • How to use "the concurrent employment" in HR_SAP.

    Dear Experts,
    I'm having the problem that: in our customer's company,  their employee can be assigned to more than one positions in the different companies.
    It means the EE just has one Personnel number, but they have personnel assignments.
    And I found the solution for this case is using "The concurrent employment" of SAP_HR. But I still have some questions about this function:
    1. Is it possible to use it in the other country (not in US or CAN)?
    2. Could you provide me some guide about how to configure it? There is not too much guide material about it in the internet. I already active the CE by IMG, but don't know what to do next.
    Any suggestion or advice will be appreciated,
    Thanks and best regards!
    Khiem.

    Hi Khiem,
    Please check note 662136, it provided some information to activate CE (specially if it's for a different country than US).
    Hope this help
    Best regards
    Sarah

  • How to use ldb PNPCE with FM u0091HR_INFOTYPE_OPERATIONu0092

    Hi all,
    I’m creating a report with LDB PNPCE, this report has to create/modify infotypes of an ID person. I’m trying to use de FM ‘HR_INFOTYPE_OPERATION’, but it’s not working… A DUMP is generated, with this description:
    An exception that could not be caught occurred.CX_HRPA_VIOLATED_PRECONDITION
    I think that the problem is due to logical database PNPCE, because if I use PNP, it’s working… Does anybody know anything about using the FM ‘HR_INFOTYPE_OPERATION’ with the LDB PNPCE?
    Thanks!!

    This piece of code it's working with ldb PNP 
    CALL FUNCTION 'ENQUEUE_EPPRELE'
       EXPORTING
      MODE_PREL            = 'E'
      MANDT                = SY-MANDT
         pernr                = wa_p9961-pernr
         infty                = '9961'
      SUBTY                =
      OBJPS                =
      SPRPS                =
    endda                =  wa_p9961-endda                      "'99991231'
    begda                =  wa_p9961-begda                      "'20071201'
      SEQNR                =
      X_PERNR              = ' '
      X_INFTY              = ' '
      X_SUBTY              = ' '
      X_OBJPS              = ' '
      X_SPRPS              = ' '
      X_ENDDA              = ' '
      X_BEGDA              = ' '
      X_SEQNR              = ' '
      _SCOPE               = '2'
      _WAIT                = ' '
      _COLLECT             = ' '
       EXCEPTIONS
         foreign_lock         = 1
         system_failure       = 2
         OTHERS               = 3
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty                   = '9961'
          number                  = wa_p9961-pernr
           subtype                = wa_p9961-subty
            OBJECTID               =
            lockindicator          = 'X'
           validityend            = wa_p9961-endda
           validitybegin          = wa_p9961-begda
            recordnumber           = lwa_pa9961-seqnr
          record                  = wa_p9961
          operation               = 'INS'
          tclas                   = 'A'
          dialog_mode             = '0'
            nocommit               = ' '
            VIEW_IDENTIFIER        =
            SECONDARY_RECORD       =
       IMPORTING
         return                 = l_return
            KEY                    =
      CALL FUNCTION 'DEQUEUE_EPPRELE'
       EXPORTING
      MODE_PREL       = 'E'
      MANDT           = SY-MANDT
         pernr           = wa_p9961-pernr
         infty           = '9961'
      SUBTY           =
      OBJPS           =
      SPRPS           =
    endda                = wa_p9961-endda                       "'99991231'
    begda                = wa_p9961-begda                       "'20071201'
      SEQNR           =
      X_PERNR         = ' '
      X_INFTY         = ' '
      X_SUBTY         = ' '
      X_OBJPS         = ' '
      X_SPRPS         = ' '
      X_ENDDA         = ' '
      X_BEGDA         = ' '
      X_SEQNR         = ' '
      _SCOPE          = '3'
      _SYNCHRON       = ' '
      _COLLECT        = ' '
    But if I use ldb PNPCE instead PNP, with the events:
    GET person.
    GET group.
    GET peras.
    ths dump is generated...
    Thank u!!

  • Selection screen stmt for LDB PNPCE

    hi
    Like we have GET PERNR. for the Logical databse PNP wat is the statement GET ? for LDB PNPCE.

    Hi,
    Try this -
    nodes person.
    get person.
    Regards,
    Anand Mandalika.

  • FM's used in report program using ldb pnpce

    hii all,
      will anybody provide me function modules that are used to populate data in report program using ldb pnpce.
    <REMOVED BY MODERATOR>
    thanks in advance
    regards
    Ashweeni.
    Edited by: Alvaro Tejada Galindo on Mar 18, 2008 6:01 PM

    U can use all the FM's which were used for LDB PNP ..
    For ex : Use the below to get the payroll results ..
    To get the results directory
      call function 'CU_READ_RGDIR'
        exporting
          persnr          = peras-pernr
        tables
          in_rgdir        = pc261_tab
        exceptions
          no_record_found = 1
          others          = 2.
    to get evaluation periods ...
    call function 'CD_EVALUATION_PERIODS'
    There are no particular FM's that will populate data in report
    program .. please let me know what is the requirement ...

  • Regarding using of LDB PNPCE  in sap hr

    Can some one please tell me how to disable some of the selection screen fields and blocks of LDB PNPCE selection-screen which are not used in my report selection-screen?
    Thanks,
    Phanisreedhar.L

    *: Report:  ZP_POSTCODE                                                :
    *: Author:  www.SAPDev.co.uk                                           :
    *: Date  :  2004                                                       :
    *: Description: Displays report of employees by postcode area,         :
    *:              includes current travelling allowances (i.e. parking   :
    *:              permit or transport card etc..)                        :
    *: Use:         Help encourage the use of car sharing and public       :
    *:              transport where appropriate.                           :
    REPORT  zp_postcode.
    type-pools: slis.                                      "ALV Declarations
    NODES: pernr.
    INFOTYPES: 0000, 0001, 0002, 0006, 0008, 0014, 0105, 0121.
    SELECTION-SCREEN BEGIN OF BLOCK pcode WITH FRAME TITLE text-s01.
    SELECT-OPTIONS: so_pcode FOR p0006-pstlz.
    SELECTION-SCREEN END OF BLOCK pcode.
    TYPES: BEGIN OF t_output,
      pernr       TYPE p0001-pernr,   "personnel name
      anredtxt    TYPE t522t-atext,   "title (based on p0002-anred)
      fname       TYPE p0002-vorna,   "first name
      lname       TYPE p0002-nachn,   "last name
      orgtx       TYPE t527x-orgtx,   "dept
      fte         TYPE p0008-bsgrd,   "fte
      parking(20) TYPE c,
      payslip     TYPE t526-sachn,        "payslip address
      telno       TYPE p0105-usrid_long,  "tel number(p0105-usrty = 0020)
      email       TYPE p0105-usrid_long,  "email (p0105-usrty = MAIL)
      postcode    type p0006-pstlz,
    END OF t_output.
    DATA: it_output TYPE STANDARD TABLE OF t_output INITIAL SIZE 0,
          wa_output TYPE t_output.
    *ALV data declarations
    data: fieldcatalog   type slis_t_fieldcat_alv with header line,
          gd_tab_group   type slis_t_sp_group_alv,
          gd_layout      type slis_layout_alv,
          gd_repid       like sy-repid,
          gt_events      type slis_t_event,
          gd_prntparams  type slis_print_alv,
          gd_count(6)    type n,
          gd_outtext(70) type c,
          gd_lines       type i.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    clear: gd_count.
    GET pernr.
    Infotype 0121 is used to store multiple contracts for personnel.
    Field p0121-hpern contains the personnel number for the main contract.
      PROVIDE * from p0121 between pn-begda and pn-endda.
      Check if main contract
        if p0121-pernr ne p0121-hpern.
          reject.
        endif.
      ENDPROVIDE.
      add 1 to gd_count.
      concatenate 'Processing personnel data'(m10) gd_count into gd_outtext
                separated by ' '.
    Display indicator for employee count
      perform progress_indicator using gd_outtext.
    Retrieve datd from infotypes
      rp_provide_from_last p0000 space pn-begda pn-endda.
      rp_provide_from_last p0001 space pn-begda pn-endda.
      rp_provide_from_last p0002 space pn-begda pn-endda.
      rp_provide_from_last p0006 space pn-begda pn-endda.
      rp_provide_from_last p0008 space pn-begda pn-endda.
      rp_provide_from_last p0014 space pn-begda pn-endda.
    Check post code
      CHECK p0006-pstlz IN so_pcode.  "cp
    Post code
      wa_output-postcode = p0006-pstlz.
    Personnel number
      wa_output-pernr = pernr-pernr.
    Personnel title
      SELECT SINGLE atext
        FROM t522t
        INTO wa_output-anredtxt
       WHERE sprsl EQ sy-langu AND
             anred EQ p0002-anred.
    First name
      wa_output-fname = p0002-vorna.
    Last name
      wa_output-lname = p0002-nachn.
    Organizational Unit text (dept)
      SELECT SINGLE orgtx
        FROM t527x
        INTO wa_output-orgtx
       WHERE sprsl EQ sy-langu AND
             orgeh EQ p0001-orgeh AND
             endda GE sy-datum.
    FTE
      wa_output-fte = p0008-bsgrd.
    Parking / travel deducted?
      CASE p0014-lgart.
        WHEN '7180' OR '7181' OR '7182'.
          wa_output-parking = text-002.
        WHEN '7183'.
          wa_output-parking = text-001.
        WHEN '7171' OR '7172' or '7173' or '7174' or
             '7175' or '7176' or '7177' or '7178'.
          wa_output-parking = text-003.
      ENDCASE.
    Payslip Address
      SELECT SINGLE sachn
        FROM t526
        INTO wa_output-payslip
       WHERE werks EQ p0001-werks AND
             sachx EQ p0001-sacha.
      PROVIDE * from p0105 between pn-begda and pn-endda.
      Telephone numbers
        if p0105-usrty = '0020'.
           wa_output-telno = p0105-usrid_long.
        endif.
      Email address
        if p0105-usrty = 'MAIL'.
           wa_output-email = p0105-usrid_long.
        endif.
      ENDPROVIDE.
      append wa_output to it_output.
      clear: wa_output.
    *END-OF-SELECTION.
    END-OF-SELECTION.
    describe table it_output lines gd_lines.
    if gd_lines gt 0.
      perform build_fieldcatalog.
      perform build_layout.
      perform display_alv_report.
    else.
      message i003(zp) with 'No records found'.
    endif.
    *&      Form  PROGRESS_INDICATOR
          Displays progress indicator on SAP screen
    form progress_indicator using p_text.
      call function 'SAPGUI_PROGRESS_INDICATOR'
          exporting
            PERCENTAGE = 0
               text       = p_text.
    endform.                    " PROGRESS_INDICATOR
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'PERNR'.
      fieldcatalog-seltext_m   = 'Personnel No.'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
    fieldcatalog-emphasize   = 'X'.
    fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'ANREDTXT'.
      fieldcatalog-seltext_m   = 'Title'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'FNAME'.
      fieldcatalog-seltext_m   = 'First Name'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'LNAME'.
      fieldcatalog-seltext_m   = 'Last Name'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'ORGTX'.
      fieldcatalog-seltext_m   = 'Department'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'FTE'.
      fieldcatalog-seltext_m   = 'FTE'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PARKING'.
      fieldcatalog-seltext_m   = 'Parking/Metrocard'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PAYSLIP'.
      fieldcatalog-seltext_m   = 'Payslip Add.'.
      fieldcatalog-col_pos     = 7.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'TELNO'.
      fieldcatalog-seltext_m   = 'Telephone'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EMAIL'.
      fieldcatalog-seltext_m   = 'E-mail'.
      fieldcatalog-col_pos     = 9.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'POSTCODE'.
      fieldcatalog-seltext_m   = 'Post code'.
      fieldcatalog-col_pos     = 10.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
      gd_layout-zebra             = 'X'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_output
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    The following program allows you to retrieve all the individuall sickpay values for a given period and person.This data is then exported to memory using the memory id entered on the selection screen. This thereforeallows you to submit this program from another program and then process the data within the calling programby importing the data from memory.  Click here for example .
    Report:  ZSXP_ABSENCE_DATA                                           **                                                                      ** Author:  www.SAPdev.co.uk                                            **                                                                      ** Date  :  12.02.2003                                                  **                                                                      ** Description: Retrieve maternaty/Sickness Absence data*                                                                      ************************************************************************REPORT ZSXP_ABSENCE_DATA      LINE-SIZE 100 NO STANDARD PAGE HEADING                MESSAGE-ID 5g.TABLES: t554s, pernr, pcl1, pcl2.INCLUDE rpclst00.INCLUDE rpc2rx09.                      "Payroll results datadefns-Intl.INCLUDE rpc2rxx0.                      "Payroll results datadefns-Intl.INCLUDE rpc2rgg0.                      "Payroll results datadefns-GBINCLUDE rpcfdcg0.                      "Payroll results datadefns-GBINCLUDE rpcdatg0.INCLUDE rpc2cd00.                      "Cluster Directory defns.INCLUDE rpc2ps00.                      "Cluster: Generierte SchematasINCLUDE rpc2pt00.INCLUDE rpcfdc10.INCLUDE rpcfdc00.INCLUDE rpppxd00.INCLUDE rpppxd10.INCLUDE rpcfvp09.INCLUDE rpcfvpg0.INCLUDE rpppxm00.INFOTYPES: 0001,                       "Organisational assignment           0002,                       "Personal Data           0003,                       "Payroll Status           0088,                                            "SMP           2001,                       "Absences           0086.                       "SSP/SMP ExlclusionsDATA:   ssp_weeks TYPE p DECIMALS 2 VALUE 0.DATA:   ssp_total TYPE p DECIMALS 2 VALUE 0,        total_val TYPE p DECIMALS 2 VALUE 0,        smp_weeks TYPE p DECIMALS 2 VALUE 0,        smp_value TYPE p DECIMALS 2 VALUE 0,        gross     LIKE pc207-betrg,        dis_gross TYPE p DECIMALS 2 VALUE 0.DATA: gd_begda(10) TYPE c,      gd_endda(10) TYPE c.DATA: ld_orgtxt LIKE t527x-orgtx.DATA: name(30).DATA: BEGIN OF itab OCCURS 0,      pernr LIKE p0002-pernr,      perid LIKE p0002-perid,      name  LIKE name,      END OF itab.TYPES: BEGIN OF t_report,   pernr   TYPE pernr-pernr,   "8   name    TYPE name,          "30   awart   TYPE p2001-awart,   "4   begda   TYPE p2001-begda,   "10   endda   TYPE p2001-endda,   "10   wkspaid TYPE p DECIMALS 2,  "10   amtpaid TYPE p DECIMALS 2,  "10  END OF t_report.DATA: it_report TYPE STANDARD TABLE OF t_report INITIAL SIZE 0,      wa_report TYPE t_report.DATA: moabw LIKE t001p-moabw.DATA: printheader TYPE i VALUE 1,      gd_success  TYPE i. NCALE declarationsTYPES : BEGIN OF pfra0_pcale,           annee(4) TYPE c.        INCLUDE STRUCTURE pcint.TYPES : END OF pfra0_pcale.TYPES : pfra0_tab_pcale  TYPE  pfra0_pcale  OCCURS 0.DATA:  it_ncale TYPE STANDARD TABLE OF pcnat INITIAL SIZE 0,       wa_ncale TYPE pcnat,       it_pcale TYPE  pfra0_tab_pcale,       pcale  TYPE  pfra0_tab_pcale.* SMP/SSP absence datadata begin of it_msa occurs 0.        include structure pc27j.data end of it_msa.parameters: p_memid type char30.************************************************************************STAR-OF-SELECTIONSTART-OF-SELECTION.gd_begda = pn-begda.gd_endda = pn-endda.gd_begda6(2) = '01'.gd_endda6(2) = '01'.refresh: it_msa.clear:   it_msa.GET pernr.*    PERFORM IMPORT_PC USING GD_SUCCESs.  PERFORM get_rgdir.  while gd_begda le gd_endda.    PERFORM get_new_rg USING gd_begda.    CALL FUNCTION 'CALCULATE_DATE'        EXPORTING*             DAYS        = '0'             MONTHS      = '1'             START_DATE  = gd_begda        IMPORTING             RESULT_DATE = gd_begda.  endwhile.  msa[] = it_msa[].  EXPORT msa TO MEMORY ID p_memid.&---------------------------------------------------------------------&      Form  GET_RGDIR&-------------------------------------------------------------------FORM get_rgdir.  rp-init-buffer.  CLEAR rgdir.  REFRESH rgdir.  MOVE pernr-pernr(8) TO cd-key-pernr.  rp-imp-c2-cd.  IF rp-imp-cd-subrc = 0.                                "rgdir success    SORT rgdir BY seqnr ASCENDING.    CLEAR rgdir.  ENDIF.ENDFORM.-----------------------------------------------------------------**       FORM get_new_rg                                               **-----------------------------------------------------------------**       ........                                                      **-------------------------------------------------------------------**  >  search_date                                                   **-----------------------------------------------------------------FORM get_new_rg USING search_date.  DATA: rg_day TYPE d,        rgbeg  TYPE d,        rgend  TYPE d.  MOVE: search_date TO rg_day.  CLEAR: msa.  LOOP AT rgdir WHERE void NE 'V'.    MOVE: rgdir-fpbeg TO rgbeg,          rgdir-fpend TO rgend.    IF ( rgbeg <= rg_day ) AND       ( rgend >= rg_day ) AND       rgdir-srtza = 'A'.        "Must be periods actual set of results      EXIT.    ENDIF.  ENDLOOP.  UNPACK rgdir-seqnr TO rx-key-seqno.  MOVE pernr-pernr(8) TO rx-key-pernr(8).  rp-imp-c2-rg.  append lines of msa to it_msa.  IF rp-imp-rg-subrc <> 0.   rg fail  ELSE.*   rg success  ENDIF.ENDFORM.Text elements------------------------------------------------------*  001     Sickness History for SSP 1*  002     Employee Name.*  003     National Insurance Number.*  004     Payroll Number.*  005     Sickness Start Date*  006     Sickness End Date*  007     Number of weeks paid*  008     system-error:*  009     No SSP / SMP record found*  010     Absence type*  011     No. weeks paid*  012     Amount*  013     Organisation Unit.*  T01     Sickness Absence typesSelection texts--------------------------------------------------------* SO_SAP          SAP Att./absence types* SO_SMP          SMP Att./absence types* SO_SPP          SPP Att./absence types* SO_SSP          SSP Att./absence types
    Uses Logical database 'PNP'(entered in program attributes) to retrieve various personnel data and downloadit to an excel / tab delimited file.
    .......................................................................: Report:  ZDOWNEMPDATA                                               ::                                                                     :: Author:  www.SAPDev.co.uk                                           ::                                                                     :: Date  :  2004                                                       ::                                                                     :: Description: Downloads employee data to TAB delimited flat files    ::                                                                     ::.....................................................................:.......................................................................: Report:  ZDOWNEMPDATA                                               ::                                                                     :: Author:  www.SAPDev.co.uk                                           ::                                                                     :: Date  :  2004                                                       ::                                                                     :: Description: Downloads employee data to TAB delimited flat files    ::                                                                     ::.....................................................................:REPORT  zdownempdata                                         .INFOTYPES: 0000, 0001, 0007, 0008, 0121, 0615.NODES: pernr.TABLES: t001p.TYPES: BEGIN OF t_employee,*        INCLUDE STRUCTURE hrms_biw_io_occupancy.  begda     TYPE begda,  endda     TYPE endda,  pernr     TYPE pernr_d,  rfpnr     TYPE rfpnr,  bukrs     TYPE bukrs,  werks     TYPE persa,  btrtl     TYPE btrtl,  persg     TYPE persg,  persk     TYPE persk,  orgeh     TYPE orgeh,  stell     TYPE stell,  plans     TYPE plans,  kokrs     TYPE mast_coar,  kostl     TYPE mast_cctr,  abkrs     TYPE abkrs,  molga     TYPE molga,  trfar     TYPE trfar,  trfgb     TYPE trfgb,  trfkz     TYPE trfkz,  trfgr     TYPE trfgr,  trfst     TYPE trfst,  bsgrd     TYPE bsgrd,  ansal     TYPE ansal_15,  ancur     TYPE ancur,  empct     TYPE empct,  stat2     TYPE stat2,  ncsdate     TYPE hiredate,  sltyp     TYPE p_sltyp,  slreg     TYPE p_slreg,  slgrp     TYPE p_slgrp,  sllev     TYPE p_sllvl,  ansvh     TYPE ansvh,  vdsk1     TYPE vdsk1,  sname     TYPE smnam, END OF t_employee.DATA: it_employee TYPE STANDARD TABLE OF t_employee INITIAL SIZE 0,      wa_employee TYPE t_employee.TYPES: BEGIN OF t_emptexts,*        INCLUDE STRUCTURE hrms_bw_txt_employee.  DATEFROM     TYPE RSDATEFROM,  DATETO     TYPE RSDATETO,  PERNR     TYPE PERSNO,  TXTMD     TYPE EMNAM, END OF t_emptexts.DATA: it_emptexts TYPE STANDARD TABLE OF t_emptexts INITIAL SIZE 0,      wa_emptexts TYPE t_emptexts.TYPES: BEGIN OF t_contract,*        INCLUDE STRUCTURE pa0615.  pernr TYPE p0615-pernr,  begda TYPE p0615-begda,  endda TYPE p0615-endda,  aedtm TYPE p0615-aedtm,  ctype TYPE p0615-ctype,  cbeg  TYPE p0615-cbeg,  cend  TYPE p0615-cend, END OF t_contract.DATA: it_contract TYPE STANDARD TABLE OF t_contract INITIAL SIZE 0,      wa_contract TYPE t_contract.DATA: it_tabemp TYPE filetable,      gd_subrcemp TYPE i,      it_tabempt TYPE filetable,      gd_subrcempt TYPE i,      it_tabcont TYPE filetable,      gd_subrccont TYPE i.DATA: gd_downfile TYPE string.SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.PARAMETERS: p_emp   LIKE rlgrap-filename,            p_empt  LIKE rlgrap-filename,            p_cont LIKE rlgrap-filename.SELECTION-SCREEN END OF BLOCK block1.***********************************************************************at selection-screenAT SELECTION-SCREEN ON VALUE-REQUEST FOR p_emp.  REFRESH: it_tabemp.  CALL METHOD cl_gui_frontend_services=>file_open_dialog    EXPORTING      window_title      = 'Select File'      default_filename  = '.xls'      initial_directory = 'C:\'      multiselection    = ' '  "No multiple selection    CHANGING      file_table        = it_tabemp      rc                = gd_subrcemp.  LOOP AT it_tabemp INTO p_emp.  ENDLOOP.***********************************************************************at selection-screenAT SELECTION-SCREEN ON VALUE-REQUEST FOR p_empt.  REFRESH: it_tabemp.  CALL METHOD cl_gui_frontend_services=>file_open_dialog    EXPORTING      window_title      = 'Select File'      default_filename  = '.xls'      initial_directory = 'C:\'      multiselection    = ' '  "No multiple selection    CHANGING      file_table        = it_tabempt      rc                = gd_subrcempt.  LOOP AT it_tabempt INTO p_empt.  ENDLOOP.***********************************************************************at selection-screenAT SELECTION-SCREEN ON VALUE-REQUEST FOR p_cont.  REFRESH: it_tabcont.  CALL METHOD cl_gui_frontend_services=>file_open_dialog    EXPORTING      window_title      = 'Select File'      default_filename  = '.xls'      initial_directory = 'C:\'      multiselection    = ' '  "No multiple selection    CHANGING      file_table        = it_tabcont      rc                = gd_subrccont.  LOOP AT it_tabcont INTO p_cont.  ENDLOOP.************************************************************************START-OF-SELECTION.START-OF-SELECTION.GET pernr. Selecting the latest infotype record  rp_provide_from_last p0000 space pn-begda pn-endda.  rp_provide_from_last p0001 space pn-begda pn-endda.  rp_provide_from_last p0007 space pn-begda pn-endda.  rp_provide_from_last p0008 space pn-begda pn-endda.  rp_provide_from_last p0121 space pn-begda pn-endda.  rp_provide_from_last p0615 space pn-begda pn-endda.  MOVE-CORRESPONDING p0001 TO wa_employee.  wa_employee-rfpnr = p0121-rfp01. "?????  MOVE-CORRESPONDING p0007 TO wa_employee.  MOVE-CORRESPONDING p0008 TO wa_employee.  MOVE-CORRESPONDING p0000 TO wa_employee.  SELECT SINGLE molga    FROM t001p    INTO wa_employee-molga   WHERE werks EQ p0001-werks AND         btrtl EQ p0001-btrtl.  SELECT SINGLE trfkz    FROM t503    INTO wa_employee-trfkz   WHERE persg EQ p0001-persg AND         persk EQ p0001-persk.  CALL FUNCTION 'HR_ENTRY_DATE'    EXPORTING      persnr                     = pernr-pernr*   RCLAS                      =*   BEGDA                      = '18000101'*   ENDDA                      = '99991231'*   VARKY                      =   IMPORTING      entrydate                  = wa_employee-ncsdate* TABLES*   ENTRY_DATES                = EXCEPTIONS   ENTRY_DATE_NOT_FOUND       = 1   PERNR_NOT_ASSIGNED         = 2   OTHERS                     = 3            .  IF sy-subrc <> 0.* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.  ENDIF.* append employee data  APPEND wa_employee TO it_employee.  CLEAR: wa_employee.  wa_emptexts-datefrom = p0001-begda.  wa_emptexts-dateto   = p0001-endda.  wa_emptexts-pernr    = p0001-pernr.  wa_emptexts-txtmd    = p0001-ename.* append employee texts data  APPEND wa_emptexts TO it_emptexts.  CLEAR: wa_emptexts.  MOVE-CORRESPONDING p0615 TO wa_contract.* append employee contract data  APPEND wa_contract TO it_contract.  CLEAR: wa_contract.************************************************************************END-OF-SELECTION.END-OF-SELECTION. download employee data  IF NOT p_emp IS INITIAL.    gd_downfile = p_emp.    CALL FUNCTION 'GUI_DOWNLOAD'      EXPORTING        filename              = gd_downfile        filetype              = 'ASC'        write_field_separator = 'X'      TABLES        data_tab              = it_employee.    IF sy-subrc EQ 0.      WRITE:/ 'Employee file downloaded to',              gd_downfile.    ELSE.      WRITE:/ 'There was an error downloading Employee file to',              gd_downfile.    ENDIF.  ENDIF.* download employee texts data  IF NOT p_empt IS INITIAL.    gd_downfile = p_empt.    CALL FUNCTION 'GUI_DOWNLOAD'      EXPORTING        filename              = gd_downfile        filetype              = 'ASC'        write_field_separator = 'X'      TABLES        data_tab              = it_emptexts.    IF sy-subrc EQ 0.      WRITE:/ 'Employee text file downloaded to',              gd_downfile.    ELSE.      WRITE:/ 'There was an error downloading Employee text file to',              gd_downfile.    ENDIF.  ENDIF.* download contract data  IF NOT p_cont IS INITIAL.    gd_downfile = p_cont.    CALL FUNCTION 'GUI_DOWNLOAD'      EXPORTING        filename              = gd_downfile        filetype              = 'ASC'        write_field_separator = 'X'      TABLES        data_tab              = it_contract.    IF sy-subrc EQ 0.      WRITE:/ 'Employee contract file downloaded to',              gd_downfile.    ELSE.      WRITE:/ 'There was an error downloading Employee contract file to',              gd_downfile.    ENDIF.  ENDIF.

Maybe you are looking for

  • Report in VIM Analytics for multiple PO Invoices

    Good afternoon I would like to share with you a concern that I have Im triying (unsuccesfully) to extract a report from VIM Analytics for those documents that were posted with more than one Purchase Order Does anyone experienced a similar case ? Seba

  • Transport import quue

    Hi everybody, I'm experiencing a problem with transport import queue. So I hope somebody have an idée what’s wrong. When I make a transport on DEV, it appears in de import queue (I can see it in SAP and on OS level). After I refresh the import queue

  • IfThen() function issue

    Hi, I am trying to perform looping of IfThen() function to calculate variance percentage for different conditions and whenever I am trying to validate it, it's giving me an error "At position 123 : Unrecognized character(s):')'" I am not sure what th

  • OIM 11g - DBUM Connector Reconciliation Time Stamp

    Hi, We're using OIM 11.1.1.5.2 with the 9.1.0.4 Database User Management Connector. We're trying to use incremental reconciliation but it doesn't seem to work right. As per the connector's guide: "The Last Execution Time attribute holds the time stam

  • Item Event - BeforeAction - true or false?

    Hi, Is there a basic rule for BeforeAction? I know you can play with BeforeAction for personal use; but it is there a basic rule like: et_CLICK: then it is BeforeAction == false I like to know for following event: et_CLICK et_COMBO_SELECT et_MATRIX_L