HR ABAP for employee groups with possible custom table...

Hi Members
I have a internal table where employee name and employee group are maintained.
Next, i have other tables where employee name is there and his salary. now I want to add all the salaries of the employees with same groups, how can I do this.
for Example, I have employee group as ENG, DOC, NUR Etc. (Also I wanted to use some kind of dynamic conditions as emplyee groups might added latter in custom table.
Thank you.
Edited by: Julius Bussche on Sep 23, 2008 10:18 PM

Check out this code:
*& Report  ZTEST3
REPORT  ztest3.
TYPES:
BEGIN OF x_employee,
  id TYPE n LENGTH 10,
  name TYPE c LENGTH 20,
  group TYPE c LENGTH 4,
END OF x_employee,
BEGIN OF x_emp_sal,
  id TYPE n LENGTH 10,
  salary TYPE p LENGTH 16 DECIMALS 2,
END OF x_emp_sal,
BEGIN OF x_final,
  group TYPE c LENGTH 4,
  id TYPE n LENGTH 10,
  name TYPE c LENGTH 20,
  salary TYPE p LENGTH 16 DECIMALS 2,
END OF x_final.
DATA:
i_employee TYPE STANDARD TABLE OF x_employee INITIAL SIZE 0,
i_final TYPE STANDARD TABLE OF x_final INITIAL SIZE 0,
i_salary TYPE STANDARD TABLE OF x_emp_sal INITIAL SIZE 0,
wa_employee TYPE x_employee,
wa_salary TYPE x_emp_sal,
wa_final TYPE x_final,
wa_final_temp TYPE x_final.
DEFINE append_employee.
  wa_employee-id = &1.
  wa_employee-name = &2.
  wa_employee-group = &3.
  append wa_employee to i_employee.
END-OF-DEFINITION.
DEFINE append_salary.
  wa_salary-id = &1.
  wa_salary-salary = &2.
  append wa_salary to i_salary.
END-OF-DEFINITION.
append_employee:
1 'John' 'ENG',
2 'Mary' 'ENG',
3 'Pooja' 'IT',
4 'Payal' 'IT',
5 'Sourav' 'IT'.
append_salary:
1 '111.00',
2 '1111.00',
3 '11111.00',
4 '111111.00',
5 '1111111.00'.
LOOP AT i_employee INTO wa_employee.
  READ TABLE i_salary INTO wa_salary
   WITH KEY id = wa_employee-id.
  IF sy-subrc = 0.
    wa_final-id = wa_employee-id.
    wa_final-name = wa_employee-name.
    wa_final-group = wa_employee-group.
    wa_final-salary = wa_salary-salary.
    APPEND wa_final TO i_final.
  ENDIF.
ENDLOOP.
SORT i_final BY group.
LOOP AT i_final INTO wa_final_temp.
  wa_final = wa_final_temp.
  AT END OF group.
    SUM.
    WRITE: /1 wa_final_temp-group, 5 wa_final_temp-salary.
  ENDAT.
ENDLOOP.
output will be:
ENG                         1.222,00  
IT                      1.233.333,00  
Edited by: Sourav Bhaduri on Sep 24, 2008 1:44 AM

Similar Messages

  • Transaction code for creation of a specific customizing table ?

    Hi,
    What's the transaction code for creation of a specific customizing table ?
    Thanks in advance.

    Carl,
    if you can share with us from which t-code you achieve this , than it would be better for we guys.
    Amit.

  • Posix perf pack: Got Exception for fd: 'nn' with no corr. table entry

              My log file is filling up with the following error on an HP9000 with HPUX 11.0
              running WL 5.1 SP9 and JRE 1.2.2-06
              <W> <Posix Performance Pack> Got exception for fd: '59' with no corresponding
              table entry
              Any help appreciated
              Please cc my email if possible
              Thanks
              Ricky
              

    In most cases, these errors can be ignored. Please open a support case with BEA and
    report this problem along with a description of any observed side effects (if any).
    -Charlie
    Krish wrote:
    I got an error thrown in the weblogic log shown below
    <Posix Performance Pack> Got exception for fd: '126' with no corresponding table
    entry
    I guess it has something to do with the File Descriptor.I ahve the file descriptor
    count set to Max(8096).
    Does any one know what this means.
    Krish.

  • Enhance MDG BP UI with an custom table

    Hi All,
    I am enhancing MDG Supplier Governance UI Purchase Organisation with an custom table.
    I have created data model also Dependent Object has been created but my issue is in UI where m using List UIBB and want this List UI to be instantiated with customizing table data  ( means 0 to multiple line in list ui). as this entity object is created at BOL layer so how to create multiple object of entity in list UI with predefined data in feeder class.    .
    Please if anyone don't understand my points ask me.
    if there is any doc. please refer.
    thanks in advance.

    I'm still not sure of the problem. I suggest you review these two documents as they detail in a step-by-step manner how you can extend the BP and Supplier data model and UI. Reuse option means a Z table:
    SAP How-To Guide: Extend MDG-S Data Model by a New Field (Reuse Option)
    SAP How-To Guide: Extend the MDG Business Partner - Node Extension (Reuse Option)
    For any extension of MDG, you should always consult this SCN document: Configuration and Enhancement of SAP Master Data Governance

  • Extractor for Product Group/Member Allocation- hierarchy (table u2013 PGMI ).

    Hello experts
    I am looking for standard extractor for Product Group/Member
    Allocation- hierarchy (table u2013 PGMI on the ECC).
    Is there a standard extractor for product group-hierarchy?
    Best Regards,
    Tal Shalom.

    Hi Lory,
    I thought the document contained an explanation of remote key mapping. Obviously it doesn't, sorry.
    Setting up remote key mapping is a bit complicated.
    First of all go to the MDM console and check your product category field in the main table (catalog items). Is key mapping set to "yes"?
    then go to the data manager and switch to the table containing the product categories in record mode. Right click on any entry and check the remote key data. Are remote keys available for your product categories. I assume that there are no remote keys available - this is the reason the system behaves as you describe it.
    Setting up remote keys for existing product categories AFAIK can only be done manually in Data Manager. Alternatively you can delete your hierarchy and create it once more, creating remote keys for every entry in the table. You can chose any remote system, it just has to be the same all the time.
    In import manager you have to clode the code field of your product category (basically the material group number) and assign it once to the product category in MDM and once to the remote key.
    Be sure to check your configuration in MDM Import Manager, the entry "Do not update record matching field value" needs to be set to no. Otherwise no remote keys are created.
    Now you can import your categories creating your hierarchy, as usual. The remote keys are created automatically.
    You should assign remote keys to all fields that should be matched in a similar way, UOM, currency etc.
    Hope you could follow this brief version.
    Best regards,
    Marcus

  • Got exception for fd: '126' with no corresponding table entry

    I got an error thrown in the weblogic log shown below
    <Posix Performance Pack> Got exception for fd: '126' with no corresponding table
    entry
    I guess it has something to do with the File Descriptor.I ahve the file descriptor
    count set to Max(8096).
    Does any one know what this means.
    Krish.

    In most cases, these errors can be ignored. Please open a support case with BEA and
    report this problem along with a description of any observed side effects (if any).
    -Charlie
    Krish wrote:
    I got an error thrown in the weblogic log shown below
    <Posix Performance Pack> Got exception for fd: '126' with no corresponding table
    entry
    I guess it has something to do with the File Descriptor.I ahve the file descriptor
    count set to Max(8096).
    Does any one know what this means.
    Krish.

  • What is the basis for Employee Group & Employee Sub Group?

    Dear Consultants,
    1) How to finalize the Employee Group and Employee Sub Group?
    2) What points should be taken into consideration before finalizing Employee Group and Employee Sub Group?
    3) In which places we can use Employee Group?
    4) In which place we can use Employee Sub Group?
    5) What items/sub-modules in SAP-HR largely depends on Employee Group and Employee Sub Group?
    6) What kind of problem could arise with wrong Employee Group and Employee Sub Group?
    Let's have the answer for this question, which could help all the members.

    An organizational unit for which personnel provisions can be specified.
    Example
    Employee groups:
    Active employees
    Employees who have left the company
    Company pensioners
    Employee subgroups within the "active employee" group:
    Industrial workers
    Commercial employees
    Technical employees
    Employee subgroup
    An organizational unit within an employee group for which personnel provisions have been defined.
    ESG groupings
    Grouping of employee subroups in Payroll for the following purposes:
    Work schedule
    Personnel calculation rules
    Primary wage types
    Collective agreement rules
    Time quota types
    Account determination

  • How to compare the value node of a for-each-group with other for-each-group

    Hello!
    I have a report in Oracle BI Publisher (10.1.3.2) with several data set. My XML schema is something like
    <DATA>
    <PARAMETERS>
    <MY_PARAMETERS>
    <A_ID>12345</A_ID>
    <DESCRIPTION>ABC</DESCRIPTION>
    <VALUE>111111</VALUE>
    </MY_PARAMETERS>
    <MY_PARAMETERS>
    <A_ID>12345</A_ID>
    <DESCRIPTION>DEF</DESCRIPTION>
    <VALUE>222222</VALUE>
    </MY_PARAMETERS>
    <MY_PARAMETERS>
    <A_ID>67890</A_ID>
    <DESCRIPTION>ABC</DESCRIPTION>
    <VALUE>333333</VALUE>
    </MY_PARAMETERS>
    </PARAMETERS>
    <NAMES>
    <MY_NAMES>
    <A_ID>12345</A_ID>
    <NAME>ASDF</NAME>
    </MY_NAMES>
    <MY_NAMES>
    <A_ID>67890</A_ID>
    <NAME>EFGH</NAME>
    </MY_NAMES>
    </NAMES>
    <VALUES>
    <MY_VALUES>
    <A_ID>12345<A_ID>
    <VALUE>10987</VALUE>
    <DESCRIPTION>ASDFG</DESCRIPTION>
    </MY_VALUES>
    <MY_VALUES>
    <A_ID>12345<A_ID>
    <VALUE>26385</VALUE>
    <DESCRIPTION>EFGHI</DESCRIPTION>
    </MY_VALUES>
    <MY_VALUES>
    <A_ID>67890<A_ID>
    <VALUE>24355</VALUE>
    <DESCRIPTION>ASDFG</DESCRIPTION>
    </MY_VALUES>
    </VALUES>
    </DATA>
    I'm trying to build a rtf template in Word using this XML schema. The "A_ID" nodes in each group in my data have the same value. I want for each "A_ID" take the respective values in /DATA/VALUES/MY_VALUES.
    <?for-each-group:MY_PARAMETERS;./A_ID?>
    <?for-each:current-group()?>
    <?choose:?><?when: DESCRIPTION='ABC'?>
    <?VALUE?>
    <?end when?><?end choose?>
    <?end for-each?>
    <?for-each:current-group()?>
    <?choose:?><?when: DESCRIPTION='DEF'?>
    <?VALUE?>
    <?end when?><?end choose?>
    <?end for-each?>
    <?/DATA/NAMES/MY_NAMES/VALUE?>
    <?for-each-group:/DATA/VALUES/MY_VALUES;./A_ID?>
    <?for-each:current-group()?>
    <?choose:?><?when: DESCRIPTION='ASDFG'?>
    <?VALUE?> <---------------- I obtain for this node the '24355' and '10987' values
    <?end when?><?end choose?>
    I want to know how to obtain only '24355' value, this is, the value for A_ID (/DATA/VALUES/MY_VALUES) = A_ID (/DATA/PARAMETERS/MY_PARAMETERS).
    Can someone help me?

    CREATE OR REPLACE TRIGGER "TEST_TRG"
       BEFORE UPDATE OF "STATUS"
       ON "TABLE1"
       FOR EACH ROW
    BEGIN
       IF (:NEW.status = 'HOLD')
       THEN
          INSERT INTO table2
                      (status
               VALUES (:NEW.status
       END IF;
    END;You should learn how to write PL/SQL code.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Overall profit center group in CO curr for pc groups with diff currencies

    Hello
    I would like to create a profit center group with profit centers from different companies in whcih the currencies differs. My idea was to show the report in Controlling Area currency, which is setup in RPC0.
    Unfortunately the total for the overall group doesn't summarize from the groups below, but when I drill down to the single sub-groups the figures are ok.
    Problem: I need a summarization for the overall profit center group.
    Best regards
    Søren Kirch

    No replies

  • Currency change for Employee group level

    Hi Guru's,
    I am configuring Currency for all the Employee groups 1,2,3,4,etc.i am trying it in V_T510F_B,Can any one confirm if this is right or is there any way to configure the currency for all the employee group in one table ..
    Regards,
    Reddy

    Hi,
    Their is a currency change going on so now we are changeing the existing currency to EUR,so our requirment is that all the EG & ESG should get the currency EUR instead of the earlier one "JOD",
    All the EG & ESG will have same currency EUR.
    But after our finance team has changed the currency in Company code level still i can see the old currency .
    Regards,
    Reddy

  • Employee Grouping with ESS

    Hi
    Manager is configured as external employee, when the manager tried to approve leave request over the ESS, a system error popped up. Where is configuration in ESS that is associated employee group ? I suspect it might be some configuration in ESS that blocks External employee group to approve level request.
    Regards,
    Jim

    Hi
    The problem is still there. The error message is
    500   Internal Server Error 
    Failed to process request. Please contact your system administrator
    How do I do?  If I change employee to normal employee group. Then the issue is gone.
    Jim

  • Possible design patterns for base function with possible additions

    I have various interfaces i have to implement. Let's assume ITypeA, ITypeB. They have following methods:
    ITypeA
    Connect
    Disconnect
    GetData
    SetData
    ClearData
    ITypeB
    Connect
    Disconnect
    GetData
    SetData
    Start
    Pause
    Stop
    They have some base functionality: Connect, Disconnect, GetData and SetData.
    If I want to add ITypeC in the future, it will have these base functionality too.
    I want to access to the base functionality and if there is additional functionality, I want to get this too. What design patterns are available that are capable of this situations?
    I found one here: Extension Interface. In this, you create a base
    interface and multiple extension interfaces that are implementing the additional functions. In the base interface you can ask for the available extension interfaces of the component. But this approach seems complicated: I have to create interfaces for each
    type, factories for the interfaces, I need some tables to save what Interface belongs to what Factory...
    What is the basic solution for this problem? Extension Interfaces? Are there any other possible alternatives for my problem?

    You may have more joy dividing your interfaces by behaviour and deciding on the types later.
    interface IConnectable
    Connect
    Disconnect
    interface IDataTransferrable
    GetData
    SetData
    interface IPlayable
    Start
    Pause
    Stop
    class TypeA : IConnectable, IDataTransferrable
    class TypeB : IConnectable, IDataTransferrable, IPlayable
    And then how can discover if your object supports these interfaces?
    here's one way:
    if (ob is IPlayable)
    Playback(ob);
    where you have a function:
    void Playback(IPlayable ob)

  • WAD: Design request for web template with re-occuring table object

    Hi all,
    I'm trying to create a web template design in WAD (WAS 6.20) using javascript that would loop and re-use the same table web item object displaying different sales employee data. The challenges I'm facing is that the number of employees to report on might be different for the reporting period and the report should have a sales employee specific header preceeding each table. And also the customer is looking at receiving a canned (precalculated) report generated weekly.
    I'm thinking that I could try looping through the 0salesemply characteristic values as displayed from a dropdown box object and pass the individual value as the table object's filter value and hopefully re-generate and render the same table with different filter values until the end of sales employee list of names is reached. Within that same loop, a second table pointing to a different data provider can also display selective data specific to that sales employee.
    My question is would such a design render the same table item multiple times based on the number of 0salesemply values and on a single web page. Would such a design work or would I need to look at designing a BSP application querying the ODS table directly.
    If anyone has any comments on how else I can achieve this or can provide examples of similar design it would be very much appreciated.
    Thank you all.
    Frank
    Message was edited by:
            Frank Goneau
    Message was edited by:
            Frank Goneau

    Hi all,
    I'm trying to create a web template design in WAD (WAS 6.20) using javascript that would loop and re-use the same table web item object displaying different sales employee data. The challenges I'm facing is that the number of employees to report on might be different for the reporting period and the report should have a sales employee specific header preceeding each table. And also the customer is looking at receiving a canned (precalculated) report generated weekly.
    I'm thinking that I could try looping through the 0salesemply characteristic values as displayed from a dropdown box object and pass the individual value as the table object's filter value and hopefully re-generate and render the same table with different filter values until the end of sales employee list of names is reached. Within that same loop, a second table pointing to a different data provider can also display selective data specific to that sales employee.
    My question is would such a design render the same table item multiple times based on the number of 0salesemply values and on a single web page. Would such a design work or would I need to look at designing a BSP application querying the ODS table directly.
    If anyone has any comments on how else I can achieve this or can provide examples of similar design it would be very much appreciated.
    Thank you all.
    Frank
    Message was edited by:
            Frank Goneau
    Message was edited by:
            Frank Goneau

  • Converting garbled characters for JAPANESE characters in a custom table

    Hi all,
    I have a custom table that store Japanese characters.
    After my company has upgraded to ECC6.0, this data in the custom table has become garbled and its alot of it garbled.
    Is there any SAP tool that can I use to make the correction on those garbled Japanese characters?
    Thanks,
    William Wilstroth

    Hi Nils,
    I really really really had a field day reading and testing around UC... To my dissappointment, I do not have the authorization to use SUMG and SCP too as well as a few of the TCODES...
    I finally told my higher level technical mgnt. that this table might need some changes...
    Has this problem of mine got anything to do with MDMP since its no longer supported in ECC6 and I found one coding that search for MDMP in RSVTPROT...
    My colleagues suggest that the data be corrected from table DBTABLOG... which i find, in my opinion, is not the right way...
    Thanks,
    William

  • FM for F4 help on a custom table

    Hi ,
    Is there any FM which can show the values of a particular field of a custom table.
    e.g. I have a custom table in which one of the fields in user id.
    Now I wanna show it as a pop up in which the field would be user id. Now if the user clicks on f4 help of this field , I wanna show him all the values of this field from the custom table.
    Please suggest how this can be done.
    Regards,
    Divyanshu

    There are a number of ways to do this.  Here is one.  This example program gets values from T001 for F4 help.  You can use your custom table instead.
    report zrich_0001 .
    tables: t001.
    data: begin of it001 occurs 0,
          bukrs type t001-bukrs,
          butxt type t001-butxt,
          ort01 type t001-ort01,
          land1 type t001-land1,
          end of it001.
    select-options s_bukrs for t001-bukrs.
    initialization.
      select bukrs butxt ort01 land1 into table it001 from t001.
      sort it001 ascending by bukrs.
      delete adjacent duplicates from it001 comparing bukrs.
    at selection-screen on value-request for s_bukrs-low.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'BUKRS'
                dynprofield = 'S_BUKRS'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = it001.
    start-of-selection.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Print to pdf

    I am sorta new to Mac.  On my old Windows PC I could Print to a PDF in addition to a normal printer.  How do I set it up to do the same thing on a Mac?  It only allows me to save as instead of printing to. Thanks in advance.

  • Issue in loading master data in BI 7.0

    Hi, I fail to understand how to load master data in BI 7.0. Can you please fill in the steps. 1. Created an Infoarea. 2. Created 2 infoobject catalogs ( for char and kf) 3. Created characteristics like empname and month and salary as KF. 4. For empna

  • USE of Tcode SHD0

    Hi expert . i am working on Tcode  SHD0 . i m stuking on screen varient . and transaction varient . so let me know how could i use this  tcode in a proper way . Thanks chandra shekhar singh

  • Itunes 11.0.3.42 fails to add music folder to library?

         I recently upgraded from itunes 10.x to 11.0.3.42.      With the old version, I could select from the menu to add a music folder with wav files to my library and it would do it perfectly fine, converting the files as it went (so far as I know wa

  • HT1941 trying to connect time  apsule to macbook air with the ethernet cable in the WAN port the airport utility doesn't detect it

    trying to connect time  capsule to macbook air with the ethernet cable in the WAN port but the airport utility doesn't detect it but when i put it in the LAN one it does but it doesn't let me configure any ideas?