REGARDING hod id in hr-abap

hi experts,
with the help of logic applied on table hrp1001 and hrp1000 i got the hod id of a particular organizational unit ,what i want the what logic or function module will i use to get the list of employees working under that particular hod and organizational unit..plz help me regarding this ....
if possible send me the logic or FM.....

Hi this will help u.
try to make use of FM
'HR_INFOTYPE_OPERATION'
and see the sample code:-
https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=13160
REPORT YBDC_NEW_586
no standard page heading line-size 255.
data: begin of i_upload occurs 0,
pernr like pa0586-pernr,
bedda(10) type c,
ebdda(10) type c,
pin01 like pa0586-pin01,
pin02 like pa0586-pin01,
pin03 like pa0586-pin01,
pin04 like pa0586-pin01,
pin05 like pa0586-pin01,
pin06 like pa0586-pin01,
pin07 like pa0586-pin01,
pin08 like pa0586-pin01,
pin09 like pa0586-pin01,
pin11 like pa0586-pin01,
pin12 like pa0586-pin01,
pin13 like pa0586-pin01,
pin14 like pa0586-pin01,
pin16 like pa0586-pin01,
pin17 like pa0586-pin01,
pin18 like pa0586-pin01,
pin19 like pa0586-pin01,
pin20 like pa0586-pin01,
pin21 like pa0586-pin01,
pin22 like pa0586-pin01,
pin23 like pa0586-pin01,
pin24 like pa0586-pin01,
pin25 like pa0586-pin01,
ain01 like pa0586-ain01,
ain02 like pa0586-ain01,
ain03 like pa0586-ain01,
ain04 like pa0586-ain01,
ain05 like pa0586-ain01,
ain06 like pa0586-ain01,
ain07 like pa0586-ain01,
ain08 like pa0586-ain01,
ain09 like pa0586-ain01,
ain11 like pa0586-ain01,
ain12 like pa0586-ain01,
ain13 like pa0586-ain01,
ain14 like pa0586-ain01,
ain16 like pa0586-ain01,
ain17 like pa0586-ain01,
ain18 like pa0586-ain01,
ain19 like pa0586-ain01,
ain20 like pa0586-ain01,
ain21 like pa0586-ain01,
ain22 like pa0586-ain01,
ain23 like pa0586-ain01,
ain24 like pa0586-ain01,
ain25 like pa0586-ain01,
end of i_upload.
data: begin of p586 occurs 0,
icode like pa0586-itc01,
pinvt like pa0586-pin01,
ainvt like pa0586-ain01,
end of p586.
data: p0586 like p0586 ,
ia586 like pa0586 occurs 0 with header line,
return like bapireturn1,
pin_ainvt type pin_ainvt.
S E L E C T I O N - S C R E E N D E F I N I T I O N *
selection-screen begin of block b1 with frame title text-001.
parameters: p_file like rlgrap-filename obligatory,
p_begda like pa0586-begda obligatory,
p_endda like pa0586-endda obligatory.
selection-screen end of block b1.
E V E N T H A N D L I N G - B E G I N *
at selection-screen on value-request for p_file.
perform get_file using p_file.
START OF SELECTION - B E G I N *
start-of-selection.
data: lines like sy-index.
*Getting the file data.
perform upload using p_file.
loop at i_upload.
ia586-pernr = i_upload-pernr.
ia586-endda = p_endda.
ia586-begda = p_begda.
perform col_row.
perform do.
append ia586.
clear : ia586,p586.
refresh : p586.
endloop.
loop at ia586.
move-corresponding ia586 to p0586.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = p0586-pernr.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0586'
NUMBER = p0586-pernr
LOCKINDICATOR = ''
VALIDITYEND = p0586-endda
VALIDITYBEGIN = p0586-begda
RECORD = p0586
OPERATION = 'INS' or MOD or DEL
NOCOMMIT = ''
tclas = 'A'
IMPORTING
RETURN = RETURN
EXCEPTIONS
OTHERS = 0.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = p0586-pernr.
clear : p0586.
endloop.
*& Form GET_FILE
Show "Open File" dialog box on F4
-->P_W_FILE Name of the file selected by the user
form get_file using p_w_file.
call function 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = p_w_file
EXCEPTIONS
mask_too_long = 1
others = 2.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. "GET_FILE
*& Form UPLOAD
Upload the file into the internal table for processing
-->P_LOADFILE Name of file to upload
form upload using p_loadfile.
Read the file into the Internal Table
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_loadfile
filetype = 'DAT'
TABLES
data_tab = i_upload.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. "UPLOAD
FORM col_row .
if i_upload-ain01 is not initial or i_upload-pin01 is not initial.
p586-icode = '01'.
p586-pinvt = i_upload-pin01.
p586-ainvt = i_upload-ain01.
append p586.
clear p586.
endif.
if i_upload-ain02 is not initial or i_upload-pin02 is not initial.
p586-icode = '02'.
p586-pinvt = i_upload-pin02.
p586-ainvt = i_upload-ain02.
append p586.
clear p586.
endif.
if i_upload-ain03 is not initial or i_upload-pin03 is not initial.
p586-icode = '03'.
p586-pinvt = i_upload-pin03.
with regards,
Hema Sundara,
pls give points if found helpful.

Similar Messages

  • Regarding the operators used in abap oo

    hi,
    can any one send me the link or else please give in writing the operators used in oo abap. like ->, =>, ?= etc etc. please send me them i didnot find them in many sites that i am going through .
    thanks and regards
    ibrahim.md

    These operators are described in the standard SAP help under ABAP Objects Overview but in particular:
    -> is an instance component selector
    => is a static component selector
    ?= is used for widening casts (casting one object to another)
    Thanks,
    Pete

  • Regarding Enhancements/User-Exits in ABAP

    Hi,
    Can anybody tell me What is meant BY Enhancements & User-Exits.
    Also what are diffrent types of Enhancements/User-Exits avialable.
    Can anybody explain me about diffrent types of Enhancements/User-Exits.
    Can anybody provide me documentation with the examples
    for diffrent types of Enhancements/User-Exits.
    If anybody is having good material on the same please post it.
    Thanks in advanace.
    Thanks & Regards,
    Rayeez.

    Customizing exits allow you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
    If you want to enhance the functionality of your R/3 System, you should take advantage of the exits available in standard R/3 applications. There are two main reasons why you should use exits rather than modifying SAP software yourself. Add-ons attached to exits have the advantage that:
    •     They do not affect standard SAP source code
    When you add new functionality to your SAP System using SAP’s exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAP’s standard software package.
    •     They do not affect software updates
    When you add new functionality to your R/3 System using SAP’s exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects’ names ensure that they will not be affected by any changes or new additions to the standard software package.
    Customer exits are not available for all programs and screens found in R/3 standard applications. You can only use customer exits if they already exist in the R/3 System. You find find more information about locating applications with pre-defined exits in Locating Applications that have Exits.
         As part of the enhancement concept, it is possible for the customer to 
         add his own elements to application logic, screens and menus.                                                                               
    The current possibilities for enhancement are:                                                                               
    Text enhancements:                                                     
         Allow the customer to add supplementary documentation for data fields  
         non-specific to a transaction, and to change key word texts.                                                                               
    Field exits:                                                           
         Every screen element with data element reference can branch to PBO or  
         prior to PAI to a function module if desired. The field contents are   
         available here for doing special checks and making changes (e.g. user- 
         specific checks, authority checks, writing entered data and producing  
         statistics...).                                                                               
    Function exits:                                                        
         From the main program you branch into a software level, in which you you
         can store ABAP/4 coding. The applications programmer at SAP determines 
         where in the main program the function exit is placed, and which data is
         imported/exported via the interface. The accompanying documentation    
         describes the functionality of the function exit.      
         Menu enhancements:                                                       
         Pre-conceived menu items can be activated and named. On the function code
         set at menu item selection, there can be a reaction in a relevant        
         function exit.                                                                               
    Screen enhancements:                                                     
         The customer can determine the layout of areas in screens provided by the
         applications developer. Here, additional information can be displayed or 
         data entered.

  • Regarding SET TITLEBAR in normal ABAP report

    Hi All,
        I  wnat to know the  use of SET TITLEBAR command in ABAP report . i have searched the forum but i am not find any sutable answers.
    for what purpose we  use the SET TITLEBAR in normal ABAP report.
    Regards
    CB

    SET TITLEBAR - Liste
    Syntax
    SET TITLEBAR title [OF PROGRAM prog]
                       [WITH text1 ... text9].
    Extras:
    1. ... OF PROGRAM prog
    2. ... WITH text1 ... text9
    Effect
    During list processing, this statement sets the GUI title, specified in title, for the display window of the current list level and all following list levels up to the next statement SET TITLEBAR. The statement has - for the most part - the same syntax and semantics as for screens.
    In contrast to the screens of dynpros, each list level automatically remains linked to the title set for it. When you return from the display of a higher list level to the display of a lower list level, the latter is displayed with the title that was set for it.
    Check the HELP file of SAP before posting your queries.

  • Help regarding calling BRFPLUS function through ABAP code

    Hi,
          I have  a situation where I have to input  data into a BRFPLUS function  as a table (i.e the data is input as select options where list or range of data can be provided).The corresponding output is also in the form a table .I've created this function in BRFPLUS and is working fine .Now I have to call it through ABAP code.Can someone kindly  provide me with the probable code for this scenario.
    E.g:
            ZT_MATNR  is the table in brfplus representing the list of MATNR values input along with other such inputs to function module Z_FM
            ZT_ATM   is the  resultant output table  of the function  which contains several fields.
    Now I have to call this BRFPLUS function with help of ABAP code.Could someone kindly help.

    Hello ,
    There should be a number of BRF+ tutorials available in SCN which discuss the FDT APIs. You can have a look at them to get an idea of the various APIs available and their uses.
    For your usecase, you should do the following.
            lo_fdt_function         TYPE REF TO if_fdt_function,
            lo_fdt_result           TYPE REF TO if_fdt_result,
    * Get function handle
          CALL METHOD lo_fdt_factory->get_function
            EXPORTING
              iv_id       = lv_function_id
            RECEIVING
              ro_function = lo_fdt_function.
    where lv_function_id is the GUID of the BRF+ function . You can either make it a constant , or you can use a FDT API to get the function GUID from the BRF+ application name and function name.
    *   Set function context
        TRY.
            CALL METHOD lo_fdt_context->set_value
              EXPORTING
                iv_id    =
                ia_value =
    This is one way to set the input context ( pass the input to the BRF+ function to process ). There are other ways to do this as well. Which one you use would depend on the kind of input you want to pass.
    * Execute BRFPLUS function
      TRY.
          CALL METHOD lo_fdt_function->process
            EXPORTING
              io_context = lo_fdt_context
            IMPORTING
              eo_result  = lo_fdt_result.
    * Get result output
      TRY.
          CALL METHOD lo_fdt_result->get_value
            IMPORTING
              ea_value =
    Another direct way of doing it would be to use the method PROCESS of the class CL_FDT_FUNCTION_PROCESS.
    I have not gone into much explaination here , but it should provide you an idea of how you can go about it.Read the SCN docs on the APIs to get a better idea , or better still if you can get hold of a copy of the BRF+ book by Carsten Ziegler , you will get an end to end explaination of all BRF+ APIs in it.
    Regards,
    Indranil.

  • Regarding adobe form using Webdynpro ABAP

    Hi,
    I am new to webdynpro abap.
    Currently I am working on a scenario where..
    I have a function module which generates the pdf for me based on the vbeln i provide in the first view. The only thing I have to do is  to display the generated pdf on explorer.
    As for as the examples i gone through.....I should provide the existing form name or the interface name. I don't have either of them as the function module is generating the pdf for me.
    Could any one help me on this please....
    Thanks,
    Vijaya.

    Hello Vijaya,
    Please check out the following
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785
    This is what will work for you with some modifications. Since in your case you are already receiving the PDF from the FM, just set the pdfSource to this value and you should be done.
    Regards,
    Shubham

  • Regarding alv creation in wd abap

    Hi All,
    I am a beginner in wd abap and i have to create an ALV application.If any one knows about it then please describe it in detail i.e. step by step by the help of any alv application.
    Thanking you all in advance.

    check this link
    [Creating a WebDynpro ALV Application in 30 easy steps|http://****************/Tutorials/WebDynproABAP/ALV/page1.htm]
    also check the blogs in below link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/60ea94e5-0901-0010-c3bb-aad5ea9620d8
    Thanks
    Suman
    Edited by: suman kumar chinnam on Sep 12, 2008 9:07 AM
    Edited by: suman kumar chinnam on Sep 12, 2008 9:09 AM

  • Error With regard to occurred in the ABAP program "J_1IRUTZ" - J2iu

    Dear All,
    This is with regard to ECC 6.0, when running this transcation J2IU , i am getting this following Error.
    "J_1IRUTZ" - in "FILL_PAYABLE_AMOUNT"
      The main program was "J_1IRUTZ ".
    If any one has come across this Issue please do let me know.
    regards,
    sgs.

    HI
    I am also facing the same issue with J2iu tcode. Can you please suggest if we need to use monthly utilization code - J2IUN and also please elaborate your answer regarding code change for rem balance.
    It will be really appreciable if you can explain how it got resolved.
    Regards
    Mukta

  • Regarding ALV Using container OO ABAP

    HI ALL,
    I have created an editable alv report using docking conatainer.
    i am facing list of problem while need to maintain these activities.
    1. I need to save the changes which are made change in the grid layout.
    2. As the alv itself gives a option adding a new row and deleting a new row, while doing that i need to capture the previous record value. And assign these values to the first 2 field in the added row.
    In order to do how can we deffer the original functionality.
    Can any one give some suggestions in order to work.
    Thanks and regards,
    Naresh

    hi,
    First you have to take your data into another internal table and then send data for display of ALV.At the time of save you can compare the old internal table with new edited data and based on which you can save the data for it.
      SAP will give provision for triggering of our own subroutine before/after the user command method is called. You can call those subroutines for those adding/deleting lines.
    Regards,
    Veeresh

  • Regarding BOR's in HR ABAP

    Hi Friends,
    I am new to work flow , I need to understand the BOR in HR ABAP. Can any one please help in understnad the BOR in HR ABAP and How to identify the HR related BOR.
    It will be helpfull if you have explain with an Business scenaraio (For Example Hiring or Sepration -- > what are the BOR are related to this scenario)
    Thanks!

    Hi Dilek,
    Thanks for your reply!
    I understand how to identify the BOR using HR Package name. I need to understand more abt business secnario and Paritcally how to handled the Business secnario through workflow.
    Let say example : when I am hiring  Employee through PA40 email has to trigger to respective deprtments. Could u pls help in understnad the Business secnarios sepcial for HR Workflow.
    I have some basic understanding of how to use work flow.. to explore more i need to pratice the busniess scenarios. If you ahve any examples which will help me in understnad one or two business scenarios that will great help.
    You can send documents to my personal email id.
    Thanks for your help!

  • Regarding Time Management in SAP ABAP-HR

    Hi,
          Can anybody provide the link for Time Management . I want to learn Time Management in SAP ABAP-HR. Please do the needful.
    Thanks in advance.
    Pavan.

    Hi
    http://help.sap.com/saphelp_47x200/helpdata/en/8a/9868bc46c411d189470000e829fbbd/frameset.htm
    Regards

  • Regarding Dynamic Programming in HR-ABAP

    Hi,
         I have problem on the dynamic programming. The Reqirement is like, Infotype
    0008 if shows one Initial screen , into that infotype we have to add five fields this is
    an Enhancement and after we adding that fields into that infotype we should do some logics based on the wagetype , and once we enter an input to that IT 0008
    we get that five field values l. How can i solve this problem please help me.
    Regards,
    Sadanandam

    Please this is and Urgent Requirement

  • Regarding the clusters  in HR - ABAP

    Hi All,
                  Anybody is having the documents regarding the clusters. If so can u please share with me…?
    Thanks & Regards,
      Suresh

    Hi Suresh,
    Go through  the following link.You will get a brief knowledge about clusters in HR
    www.hrexpertonline.com/downloads/12-04.doc .
    Regards,
    Deepthi Reddy

  • Regarding get_parameter_field method in webdynpro abap

    Hello Gurus,
    We have a requirement in to prepare selection screen.we are implimenting selection screen with two select options and one parameter using add_selection_field and add_parameter_field methods respectively.now i need these values at runtime.so,ihave used two methods for this are get_range_table_of_sel_field and get_parameter_field .but the method get_parameter_field is not working properly.how can i get parameter value at runtime.this is the correct metod or not to get the parameter value at runtime.
    Could anyone  suggest me solutions?
    could anyone  send me sample code or reference links if possible.
    Thanks in Advance for your replies.
    Regards,
    babu

    Hi Rajasekhar,
    Please go through below wiki. It uses another way to get data from all selection-screen items.
    [Complex Select Option USage|http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages]
    I hope it helps.
    Regards,
    Sumit

  • Regarding using 'Enhancement' keyword in ABAP

    Hi All,
                How to use ENHANCEMENT keyword in abap.
    Thks
    Shailesh

    Hi,
    Check out this
    http://help.sap.com/abapdocu/en/ABAPENHANCEMENT.htm
    Thanks,
    Krishna..

Maybe you are looking for