New Hire in ABAP code

Hi,
I'm getting the error 'No authorisation to maintain Action exists' when running HR_MAINTAIN_MASTERDATA with no_existence_check set to 'X'. this is for infotype 0000 and 0001, I'm not sure which is throwing the error.
This is happening at the begining of the process and is not getting to the later infotypes in the code.
Also is there a setting on HR_INFOTYPE_OPERATION i can set to stop auth checks?
Any help appreciated. I've read through a lot of SDN threads reagrding this and none have posted a solution.
Regards,
Rob

usually the order is: 0000, 0002, 0001 because there are some name fields in infotype 0001 (ENAME, SNAME).
Infotype 0003 is created in the background automatically. In infotype 1001 an object CP (central person) is created even if you don't use org.management.
check table T77S0 for switches GRPID = AUTSW or PLOGI. may be you can find something unusual there ...

Similar Messages

  • GL Migration from Classic GL to New GL using ABAP code

    Dear Experts,
                        In this scenario, I am trying to develop ABAP Program which will Transfer Documents from GLT0 to FAGL* Table, i want to take opinion about
    Is it feasible to update Database Table using ABAP Query(Using INSERT, UPDATE or MODIFY)?
    What are possibilities of Database get into inconsistent state?
    Any other factors I must consider during this task?
    Regard,
    Pritesh Raut

    Why do you want to reinvent the wheel?
    Look at some documentation like
    Migration to New General Ledger Accounting (General)Quick Migration for Basic Scenario
    1070629 - FAQs: Migration to General Ledger Accounting (new)
    Mastering the Implementation of General Ledger Functionality in SAP ERP Financials
    Regards,
    Raymond

  • How to insert a new line item in VA01/VA02 by using ABAP code?

    Hi Gurus
    i have a very tough requirement. the customer wants to insert a free goods after an item has been populated in VA01/VA02 automatically according to some certain rules. the input material may be a main material of a sales BOM.
    for example. let's suppose there is a material A who has two sub-material B and C which is maintained in a sales BOM via CS01/CS02. when the material A has been input in the line item in VA01/VA02, its quantity input and after the ENTER key has been clicked, another material D may be displayed in a new line as a gift if the condition met.  the condition relates to customer/material/quanity and these information are stored in a Z-table.
    on the other hand, if the material A is only a single material(not a BOM), the gift(material D) will also be filled automatically if the condition met.
    i have already enhance the FM cs_bom_explosion to filfill the requirment for BOM materials. whereas it is very hard to find the enhanment point for the single material.
    so my question is where is the correct place for me to insert the ABAP code, which decides whether the gift should be given or not and furthermore inserts the new line item into XVBAP. i tried to use MV45AFZZ, whereas the data is always inconsistant if a new line has been inserted. it is very strange that there is no temperary internal table storing line item data input in the table controal of VA01/VA02. system reads the line item data , line by line, via a system kernal function call.
    any hints are welcome. thanks

    HI Stephen,
    I have the same prolem. I modified the 5 global tables, but I don't see the new line in the screen.
    Can you help me with some details?
    Thx!
    Mihaela

  • How to generate new perner number using Abap Code in pa0002. what is the fu

    how to generate new perner number using Abap Code in pa0002. what is the function Module used.

    hi
    define internal number ranges for ur implementation then when u run PA 40  do not input any employee number , system will generate the employee number automatically.
    Regards
    sameer

  • Create new survey data for opportunity using abap code

    Hello to all,
    I have one requirement.
    create survey data for given opportunity ID using abap code. or copy survey data from one opportunity to another opportunity using abap.
    any ideas..
    many thanks
    Babu

    Hello Babu,
    You can do this through the CRM_ORDER_MAINTAIN FM, this is the generic FM to edit any transaction in CRM.
    The FM contains an internal table IT_SURVEY that must be filled. Actually, this table will only contain a reference to the (completed) survey, it doesn't store the data of the survey itself.
    For some example coding, take a look at the SrvTSurvey.do controller. If you want to see what data is stored in the IT_SURVEY table, create a transaction and attach a completed survey to it (you can easily do it in the standard views of the webclient) and take a look at the survey structure in the CRM_ORDER_READ FM/Report.
    Let me know if you need more guidance,
    Reward points if useful,
    Regards,
    Joost

  • Short Dump while executing New Hire (action type) in PA40

    Hi All,
    i am getting short dump while executing PA40 for new hire action type can anyone look into this and guide as i am new to HCM.
    Category               ABAP Programming Error                                                      
    Runtime Errors         SYNTAX_ERROR                                                                
    ABAP Program           /1PAPAXX/HDR_21000A                                                         
    Application Component  Not Assigned                                                                
    Date and Time          21.08.2014 14:07:03                                                         
    Short text                                                                                       
        Syntax error in program "/1PAPAXX/HDR_21000A ".                                              
    What happened?                                                                                   
        Error in the ABAP Application Program                                                        
        The current ABAP program "SAPFP50M" had to be terminated because it has                      
        come across a statement that unfortunately cannot be executed.                               
        The following syntax error occurred in program "/1PAPAXX/HDR_21000A " in                     
        include "/1PAPAXX/HDR_21000AO01 " in                                                        
        line 52:                                                                                     
        ""LV_LENGTH" has already been declared"                                                      
        The include has been created and last changed by:                                            
        Created by: "HCM04 "                                                                         
        Last changed by: "HCM03 "                                                                    
        Error in the ABAP Application Program                                                        
        The current ABAP program "SAPFP50M" had to be terminated because it has                      
        come across a statement that unfortunately cannot be executed.                               
    What can you do?                                                                                 
        Please eliminate the error by performing a syntax check                                      
        (or an extended program check) on the program "/1PAPAXX/HDR_21000A ".                        
        You can also perform the syntax check from the ABAP Editor.                                  
        If the problem persists, proceed as follows:                                                 
        Note down which actions and inputs caused the error.                                         
        To process the problem further, contact you SAP system                                       
        administrator.                                                                               
        Using Transaction ST22 for ABAP Dump Analysis, you can look                                  
        at and manage termination messages, and you can also                                         
        keep them for a long time.                                                                   
    Error analysis                                                                                   
        The following syntax error was found in the program /1PAPAXX/HDR_21000A :                    
        ""LV_LENGTH" has already been declared"                                                      
    How to correct the error                                                                         
        Probably the only way to eliminate the error is to correct the program.                      
        If you cannot solve the problem yourself and want to send an error                           
        notification to SAP, include the following information:                                      
        1. The description of the current problem (short dump)                                       
           To save the description, choose "System->List->Save->Local File                           
        (Unconverted)".                                                                              
        2. Corresponding system log                                                                  
           Display the system log by calling transaction SM21.                                       
           Restrict the time interval to 10 minutes before and five minutes                          
        after the short dump. Then choose "System->List->Save->Local File                            
        (Unconverted)".                                                                              
        3. If the problem occurs in a problem of your own or a modified SAP                          
        program: The source code of the program                                                      
           In the editor, choose "Utilities->More                                                    
        Utilities->Upload/Download->Download".                                                       
        4. Details about the conditions under which the error occurred or which                      
        actions and input led to the error.                                                          
    System environment                                                                               
        SAP Release..... 731                                                                         
        SAP Basis Level. 0007                                                                        
        Application server... "dc-ds-erp"                                                            
        Network address...... "172.16.23.111"                                                        
        Operating system..... "Linux"                                                                
        Release.............. "3.0.13-0.27-default"                                                  
        Hardware type........ "x86_64"                                                               
        Character length.... 16 Bits                                                                 
        Pointer length....... 64 Bits                                                                
        Work process number.. 1                                                                      
        Shortdump setting.... "full"                                                                 
        Database server... "dc-ds-erp"                                                               
        Database type..... "ORACLE"                                                                  
        Database name..... "ECD"                                                                     
        Database user ID.. "SAPSR3"                                                                  
        Terminal.......... "NLC-HP"                                                                  
        Char.set.... "C"                                                                             
        SAP kernel....... 720                                                                        
        created (date)... "Sep 14 2013 06:16:24"                                                     
        create on........ "Linux GNU SLES-11 x86_64 cc4.3.4 use-pr130820"                            
        Database version. "OCI_112, 11.2.0.3.0, V1, default"                                         
        Patch level. 500                                                                             
        Patch text.. " "                                                                             
        Database............. "ORACLE 10.1.0.*.*, ORACLE 10.2.0.*.*, ORACLE 11.2.*.*.*"              
        SAP database version. 720                                                                    
        Operating system..... "Linux 2.6, Linux 3"                                                   
        Memory consumption                                                                           
        Roll.... 0                                                                                   
        EM...... 37708200                                                                            
        Heap.... 0                                                                                   
        Page.... 106496                                                                              
        MM Used. 4666776                                                                             
        MM Free. 3709976                                                                             
    User and Transaction                                                                             
        Client.............. 210                                                                     
        User................ "HCM03"                                                                 
        Language key........ "E"                                                                     
        Transaction......... "PA40 "                                                                 
        Transaction ID...... "53EF470299AB5D67E1000000AC10176F"                                      
        EPP Whole Context ID.... "005056A301D11EE48A9D08B337F884E3"                                  
        EPP Connection ID....... 00000000000000000000000000000000                                    
        EPP Caller Counter...... 0                                                                   
        Program............. "SAPFP50M"                                                              
        Screen.............. "MP000000 1000"                                                         
        Screen Line......... 3                                                                       
        Debugger Active..... "none"                                                                  
    Information on where terminated                                                                  
        Termination occurred in the ABAP program "SAPFP50M" - in                                     
        "GET_HEADER_WITH_TCLAS".                                                                    
        The main program was "MP000000 ".                                                            
        In the source code you have the termination point in line 146                                
        of the (Include) program "FP50MDHD".                                                         
    Source Code Extract                                                                              
    Line
    SourceCde                                                                                  
      116
      CALL FUNCTION 'HR_HEADER_GET'                                                            
      117
          EXPORTING                                                                            
      118
               DHDID                    = FHD_HID                                              
      119
               BEGDA                    = BEGDA                                                
      120
               TCLAS                    = TCLAS                                                
      121
    * Es wird nur einer der folgenden 3 Parameter benutzt.                                     
      122
    * Ausgewertet wird zunaechst MOLGA, dann P0001 dann PERNR.                                 
      123
    * Der erste der nicht initial ist wird ausgewertet.                                        
      124
    *           MOLGA                   =                                                      
      125
               P0001                    = P0001                                                
      126
               PERNR                    = PSPAR-PERNR                                          
      127
          IMPORTING                                                                            
      128
               PROG                     = HEADER_PROG                                          
      129
               DNUM                     = HEADER_DYNNR                                         
      130
           EXCEPTIONS                                                                          
      131
                HEADER_DEACTIVATED          = 1                                                
      132
                HEADER_UNKNOWN              = 2                                                
      133
                HEADER_GENERATE_DEACTIVATED = 3                                                
      134
                HEADER_GENERATE_FAILED      = 4                                                
      135
                INTERNAL_ERROR              = 5                                                
      136
                OTHERS                      = 6.                                               
      137
      138
      IF NOT SY-SUBRC IS INITIAL.                                                              
      139
    * Bei Problemen gibt's eben ein leeres Dynpro.                                             
      140
        HEADER_PROG = 'SAPMP50A'.                                                              
      141
        HEADER_DYNNR = '0090'.                                                                 
      142
      ELSE.  " NOT sy-subrc IS INITIAL.                                   "                    
      143
    * Dann setzen wir jetzt auch noch das Datum fest.                                          
      144
        PERFORM HEADER_BEGDA_SET IN PROGRAM (HEADER_PROG) USING BEGDA.                         
      145
    * Und schalten auf Uebergabe der PERNR mit globalen Variablen.                             
    >>>>>
        PERFORM HEADER_LAZY_ON IN PROGRAM (HEADER_PROG).                                       
      147
      ENDIF.  " (ELSE) NOT sy-subrc IS INITIAL.                           "                    
      148
    * Merken wie der Header heisst. Damit MPPERS00 sich erinnern kann.                         

    Hi,
    Error Log: Syntax error
    ""LV_LENGTH" has already been declared"
    please check LV_LENGTH variable declaration.
    It may be declared more once!

  • Runtime error while executing New Hire action in PA40

    Hi All,i am getting short dump while executing PA40 for new hire action typecan anyone look into this and guide as i am new to HCMNote: getting dump only for one user id for rest all other user id i am not getting dump.
    Category               ABAP Programming Error                                                      
    Runtime Errors         SYNTAX_ERROR                                                                
    ABAP Program           /1PAPAXX/HDR_21000A                                                         
    Application Component  Not Assigned                                                                
    Date and Time          21.08.2014 14:07:03                                                         
    Short text                                                                                       
        Syntax error in program "/1PAPAXX/HDR_21000A ".                                              
    What happened?                                                                                   
        Error in the ABAP Application Program                                                        
        The current ABAP program "SAPFP50M" had to be terminated because it has                      
        come across a statement that unfortunately cannot be executed.                               
        The following syntax error occurred in program "/1PAPAXX/HDR_21000A " in                     
        include "/1PAPAXX/HDR_21000AO01 " in                                                        
        line 52:                                                                                     
        ""LV_LENGTH" has already been declared"                                                      
        The include has been created and last changed by:                                            
        Created by: "HCM04 "                                                                         
        Last changed by: "HCM03 "                                                                    
        Error in the ABAP Application Program                                                        
        The current ABAP program "SAPFP50M" had to be terminated because it has                      
        come across a statement that unfortunately cannot be executed.                               
    What can you do?                                                                                 
        Please eliminate the error by performing a syntax check                                      
        (or an extended program check) on the program "/1PAPAXX/HDR_21000A ".                        
        You can also perform the syntax check from the ABAP Editor.                                  
        If the problem persists, proceed as follows:                                                 
        Note down which actions and inputs caused the error.                                         
        To process the problem further, contact you SAP system                                       
        administrator.                                                                               
        Using Transaction ST22 for ABAP Dump Analysis, you can look                                  
        at and manage termination messages, and you can also                                         
        keep them for a long time.                                                                   
    Error analysis                                                                                   
        The following syntax error was found in the program /1PAPAXX/HDR_21000A :                    
        ""LV_LENGTH" has already been declared"                                                      
    How to correct the error                                                                         
        Probably the only way to eliminate the error is to correct the program.                      
        If you cannot solve the problem yourself and want to send an error                           
        notification to SAP, include the following information:                                      
        1. The description of the current problem (short dump)                                       
           To save the description, choose "System->List->Save->Local File                           
        (Unconverted)".                                                                              
        2. Corresponding system log                                                                  
           Display the system log by calling transaction SM21.                                       
           Restrict the time interval to 10 minutes before and five minutes                          
        after the short dump. Then choose "System->List->Save->Local File                            
        (Unconverted)".                                                                              
        3. If the problem occurs in a problem of your own or a modified SAP                          
        program: The source code of the program                                                      
           In the editor, choose "Utilities->More                                                    
        Utilities->Upload/Download->Download".                                                       
        4. Details about the conditions under which the error occurred or which                      
        actions and input led to the error.                                                          
    System environment                                                                               
        SAP Release..... 731                                                                         
        SAP Basis Level. 0007                                                                        
        Application server... "dc-ds-erp"                                                            
        Network address...... "172.16.23.111"                                                        
        Operating system..... "Linux"                                                                
        Release.............. "3.0.13-0.27-default"                                                  
        Hardware type........ "x86_64"                                                               
        Character length.... 16 Bits                                                                 
        Pointer length....... 64 Bits                                                                
        Work process number.. 1                                                                      
        Shortdump setting.... "full"                                                                 
        Database server... "dc-ds-erp"                                                               
        Database type..... "ORACLE"                                                                  
        Database name..... "ECD"                                                                     
        Database user ID.. "SAPSR3"                                                                  
        Terminal.......... "NLC-HP"                                                                  
        Char.set.... "C"                                                                             
        SAP kernel....... 720                                                                        
        created (date)... "Sep 14 2013 06:16:24"                                                     
        create on........ "Linux GNU SLES-11 x86_64 cc4.3.4 use-pr130820"                            
        Database version. "OCI_112, 11.2.0.3.0, V1, default"                                         
        Patch level. 500                                                                             
        Patch text.. " "                                                                             
        Database............. "ORACLE 10.1.0.*.*, ORACLE 10.2.0.*.*, ORACLE 11.2.*.*.*"              
        SAP database version. 720                                                                    
        Operating system..... "Linux 2.6, Linux 3"                                                   
        Memory consumption                                                                           
        Roll.... 0                                                                                   
        EM...... 37708200                                                                            
        Heap.... 0                                                                                   
        Page.... 106496                                                                              
        MM Used. 4666776                                                                             
        MM Free. 3709976                                                                             
    User and Transaction                                                                             
        Client.............. 210                                                                     
        User................ "HCM03"                                                                 
        Language key........ "E"                                                                     
        Transaction......... "PA40 "                                                                 
        Transaction ID...... "53EF470299AB5D67E1000000AC10176F"                                      
        EPP Whole Context ID.... "005056A301D11EE48A9D08B337F884E3"                                  
        EPP Connection ID....... 00000000000000000000000000000000                                    
        EPP Caller Counter...... 0                                                                   
        Program............. "SAPFP50M"                                                              
        Screen.............. "MP000000 1000"                                                         
        Screen Line......... 3                                                                       
        Debugger Active..... "none"                                                                  
    Information on where terminated                                                                  
        Termination occurred in the ABAP program "SAPFP50M" - in                                     
        "GET_HEADER_WITH_TCLAS".                                                                    
        The main program was "MP000000 ".                                                            
        In the source code you have the termination point in line 146                                
        of the (Include) program "FP50MDHD".                                                         
    Source Code Extract                                                                              
    Line
    SourceCde                                                                                  
      116
      CALL FUNCTION 'HR_HEADER_GET'                                                            
      117
          EXPORTING                                                                            
      118
               DHDID                    = FHD_HID                                              
      119
               BEGDA                    = BEGDA                                                
      120
               TCLAS                    = TCLAS                                                
      121
    * Es wird nur einer der folgenden 3 Parameter benutzt.                                     
      122
    * Ausgewertet wird zunaechst MOLGA, dann P0001 dann PERNR.                                 
      123
    * Der erste der nicht initial ist wird ausgewertet.                                        
      124
    *           MOLGA                   =                                                      
      125
               P0001                    = P0001                                                
      126
               PERNR                    = PSPAR-PERNR                                          
      127
          IMPORTING                                                                            
      128
               PROG                     = HEADER_PROG                                          
      129
               DNUM                     = HEADER_DYNNR                                         
      130
           EXCEPTIONS                                                                          
      131
                HEADER_DEACTIVATED          = 1                                                
      132
                HEADER_UNKNOWN              = 2                                                
      133
                HEADER_GENERATE_DEACTIVATED = 3                                                
      134
                HEADER_GENERATE_FAILED      = 4                                                
      135
                INTERNAL_ERROR              = 5                                                
      136
                OTHERS                      = 6.                                               
      137
      138
      IF NOT SY-SUBRC IS INITIAL.                                                              
      139
    * Bei Problemen gibt's eben ein leeres Dynpro.                                             
      140
        HEADER_PROG = 'SAPMP50A'.                                                              
      141
        HEADER_DYNNR = '0090'.                                                                 
      142
      ELSE.  " NOT sy-subrc IS INITIAL.                                   "                    
      143
    * Dann setzen wir jetzt auch noch das Datum fest.                                          
      144
        PERFORM HEADER_BEGDA_SET IN PROGRAM (HEADER_PROG) USING BEGDA.                         
      145
    * Und schalten auf Uebergabe der PERNR mit globalen Variablen.                             
    >>>>>
        PERFORM HEADER_LAZY_ON IN PROGRAM (HEADER_PROG).                                       
      147
      ENDIF.  " (ELSE) NOT sy-subrc IS INITIAL.                           "                    
      148
    * Merken wie der Header heisst. Damit MPPERS00 sich erinnern kann.                         
      149
    * Wird mit Einfuehrung des Headerobjekts obsolet.                                          
      150
      PERFORM REMEMBER_HEADER  "                             "XYVPH4K015649                    
      151
        USING HEADER_PROG HEADER_DYNNR 'S'.  "               "XYVPH4K015649                    
      152
    ENDFORM.                                                                                   
      153
      154
    *       FORM RE588I                                                   *                    
      155
      156
      157
      158
    *  -->  T588I_DHDID                                                   *                    
      159
    *  -->  T588I_MOLGA                                                   *                    
      160
    *  -->  T588I_TCLAS                         

    Implement SAP Note 1004280.. your issue if fixed
    If your issue is resolved request you to close the thread or else free feel to touch base
    BR
    Anil

  • Adding Fields to New Hire SAP Script, Text ID PAMA

    Hi there,
    I have successfully created a sapscript email to be sent via Dynamic Actions for the notification of New Hires and Terminations.  This has been accomplished via feature M0001 (we have created two new features u2013 M00NH & M00TM), dynamic action (T588z), Business Workplace, distribution lists, etc.  All are working correctly, and an email is being generated and forwarded to appropriate parties.
    Now we have been asked to add extra fields to the SAP Script text for New Hire and Termination.  These are text fields for Employee Group, Employee Subgroup, among others.
    Our syntax has been set up as follows:
    &'Employee Group:             'P0001-PERSG(02)&
    &'Employee Group Text:        'T501T-PTEXT(20)&
    &'Employee Subgroup:          'P0001-PERSG(02)&
    &'Employee Subgroup Text:     'T503T-PTEXT(20)&
    For the New Hire action, we are getting the Employee group and Employee subgroup codes to display but we are NOT getting the Employee Group or Employee Subgroup texts to display.  To confuse the issue, we ARE getting these text fields to display for the Termination script.  Our ABAP'er is also having difficulty determining how to bring in these fields to the New Hire script.
    We have researched this website have tried the instructions given by one user..... which states that we needed to go to our SAPscript text and make the following changes:
    " To get other HR data into your standard text (from SO10):
    Insert > Symbols > Program symbols (now you'll see a list of print programs, and i guess this is where the ABAP grabs the data).
    Highlight the one for HR Master data, and click the DDIC button.
    Double click the table you need data from (e.g P0000, P0001 or P0002).
    Finally select the field you want."
    I have done this, but when I get to the Program symbols, I do not see a print program for HR Master Data.  I only see RPUCOB02 - Processing of Qualifying COBRA Events and Letters & SAPMSSCE - SAPscript Standard Text Maintenance. 
    I tried to use the RPUCOB02 and inserted the text for Employee Subgroup as a test.  But it did not work as the text still did not display.
    The other oddity is that for the Termination sapscript text, the Employee Group and Employee Subgroup text displays correctly.  To test our syntax, we then connect the Termination sapscript text to the 'New Hire' action and reran the New Hire action.  The Employee Group and Employee Subgroup text fields then disappeared.  So it worked when the action was a termination, but did not work when the action was New Hire.
    The difference between these two actions is that the feature for the sapscript generation for New Hires is being generated upon saving of I0002 (which is created AFTER I0001) - we needed the Employee's name in the text.  For the Termination action, the feature is set to generate the mail upon saving of I0001.  This is the only difference between the two.  But as I need the employee name to display, it seemed the best approach.  I did try to generate the New Hire sapscript after saving of I0008, but had the same problem. 
    Does anyone know how we can add text fields to our New Hire sapscript text and actually get them to display?  We would also like to display the Org Unit text (&'ORGEH_2nd_TEXT(40)&) or even  the Supervisor (from the OM relationship).  But they do not display for the New Hire sapscript either. And our ABAP'er is able to insert the Supervisor logic, but the field still does not display.
    Thanks very much for any help.
    Edited by: Cathryn Westgarth on Nov 17, 2009 6:23 PM
    Edited by: Cathryn Westgarth on Nov 17, 2009 6:24 PM

    I am going to repost this question to the HR forum as it may be more appropriately an HR forum questions.
    Thanks
    Cathryn

  • HR Report for finding details for the new hires and leavers

    Dear All,
    I am very new to SAP HR ABAP.
    Need Help
    I have to create a report which fetches all the details <Details are mentioned below>
    for all the
    1)     New hires
    2)     Leavers
    in between a time range.
    <Details to be fetched :~ 
    Title
    Fax
    Mobile
    Nationality
    Domicile
    Religion
    Passport
    Place of issue
    Issue date
    Valid till
    Date of Hire
    Action Reason
    Reporting to
    Date of exit interview
    Leave Date
    Leaving Reason
    Street
    Address Line2
    City
    District
    Region
    Country
    Postal Code
    Communication Number
    Personal ID
    Date Of Last Hire
    Location
    Job
    Payroll area
    OrgLvl1
    OrgLvl2
    OrgLvl3
    OrgLvl4
    Personnel Number
    Date of seniority
    EEBankName
    Bank account no
    Bank account type
    PERID
    Thanks a lot !!!
    Joy
    Edited by: joydip majumder on Jul 11, 2008 10:46 AM

    Hi  joy ,
    you can create ur own z-report for this requirement  , for this u have to  read the  employee data with in the date rage for   infotype 0 (Action) for hiring and leaving dates. Other related infomation  u can fetch from the related infotypes tables like PA0001 etc using simple select queries.All required fields can be dispalyed in the  ALV output.
    Regards
    Lakhan
    Edited by: lakhan on Jul 11, 2008 2:35 PM

  • AT NEW command in ABAP Objects

    Hi everyone!
    Is there an equivalent of the AT NEW command in abap oo? When I try to use this command inside a BAdi, I get an error message.
    Best Regards,
    Luís.

    Hi,
    Thank you for your response
    Sample code:
    LOOP AT c_t_data ASSIGNING  variants are no longer supported in the OO context. Use dynamic variants instead.
    Regards,
    Luís.

  • IDOC: How to create child segment with abap code.

    Hi,
    I'am trying to write an abap code to create segments for an Idoc which structure is the following:
    ZLE_00060_DLVY
    >  E1EDL20
    > Z1DEL_CONS
    >Z1DEL_MAT_HEADER
    > Z1DEL_MAT
    > E1EDL20RET2
    > E1EDL22
    > E1EDL21
    > E1EDL23
    > E1EDL51
    I receive a sintax error: Error in IDoc with status 26 .
    Checking the result I note all segment at the same level and an error about the segment E1EDL22
    EDI: Syntax error in IDoc (segment cannot be identified)
         Message no. E0078
    Diagnosis
         The segment E1EDL22 does not occur at the current level of the basic
         type DELVRY05 (extension ZLE_00060_DLVY).
         This error can have several reasons:
         o   The segment E1EDL22 is assigned to a group whose header segment does
             not occur.
         o   The segment E1EDL22 does not exist in the syntax description of the
             basic type DELVRY05 (extension ZLE_00060_DLVY).
         o   The sequence of segments in the group in which the segment appears
             is incorrect.
         Previous errors ('mandatory' segment or group missing) may be due to
         this error.
    Procedure
         Please check the IDoc or the syntax description of the basic type
         DELVRY05 (extension ZLE_00060_DLVY).
    After the error I have:
    data records
    E1EDL20
    Z1DEL_CONS
    Z1DEL_MAT_HEADER
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    E1EDL20RET2
    E1EDL22
    E1EDL21
    Abap code:
            idoc_data-segnam = 'Z1DEL_CONS'.
            idoc_data-sdata = s_z1del_cons.
            append idoc_data.
              idoc_data-segnam = 'Z1DEL_MAT_HEADER'.
              s_z1del_mat_header-tsegment = 'MATERIAL'.
              idoc_data-sdata = s_z1del_mat_header.
              append idoc_data.
            clear idoc_data-sdata.                            <<<<<<<<<<< how to indent the structure because this is a child.
             idoc_data-sdata = s_Z1DEL_MAT.
             idoc_data-segnam = 'Z1DEL_MAT'.
             append idoc_data.
             idoc_data-segnam = 'E1EDL20RET2'.
             idoc_data-sdata = s_E1EDL20RET2.
             append idoc_data.
             clear idoc_data.
             idoc_data-segnam = 'E1EDL22'.
             idoc_data-sdata = s_e1edl22.
             append idoc_data.
             clear idoc_data.
             idoc_data-segnam = 'E1EDL21'.
             idoc_data-sdata = s_e1edl21.
             append idoc_data.
    Any help will be well appreciated.
    Thanks in advance.
    Regards,
        Giovanni

    Hi,
    following in debugging mode the abap code of the INCLUDE ZXTRKU02 where is defined the TABLES IDOC_DATA STRUCTURE  EDIDD, I find that all field of the table IDOC_DATA are not set. More exactly my expectation is to find values for SEGNUM, HLEVEL, PSGNUM.
    In a few words I need to execute an enhancement, via abap code, of the struscure of the idoc before sending it out since I have a requirement to test this enhancement in my XI environment, receiving as input this ideoc modified.
    Then, I need to add a new segment and one child.
    Any suggestion will be well appreciated.
    Thanks in advance.
    Regards,
        Giovanni

  • HR_MAINTAIN_MASTERDATA: Not Able to Create a New Hire Employee

    I am trying to create a new hire employee. To do this, I use FM HR_MAINTAIN_MASTERDATA.
    The requirement is to create new employee with data for IT0000 (Actions), IT0001 (Org Management) & IT0002 (Personal Data) only.
    The FM is not working and the given error is "Fill in all required entry fields". When I use parameter DIALOG_MODE = 1 (stop on error), SAP stops on the infotype 0006 screen and prompts me to enter the required fields. The problem is I do not want to create employee data on infotype 0006 and the following screens after that. My intention is to create employee
    data for infotype 0000, 0001 & 0002 only.
    Any idea on the workaround for the problem above?
    Filled the proposed_values tables with following fields:
    IT0000 ***
    'P0000-MASSN'
    'P0000-MASSG'
    'P0000-STAT1'
    'P0000-STAT2'
    IT0001 ***
    'P0001-BUKRS'
    'P0001-WERKS'
    'P0001-BTRTL'
    'P0001-ABKRS'
    'P0001-PLANS'
    'P0001-OTYPE'
    IT0002 ***
    'P0002-NACHN'
    'P0002-VORNA'
    'P0002-CNAME'
    'P0002-TITEL'
    'P0002-GESCH'
    'P0002-GBDAT'
    'P0002-NATIO'
    'P0002-SPRSL'
    'P0002-KONFE'
    'P0002-FAMST'
    'P0002-GBJHR'
    'P0002-GBMON'
    'P0002-GBTAG'
    'P0002-NCHMC'
    'P0002-VNAMC'
    CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
    EXPORTING
       pernr                             = p_pernr
       massn                           = '01'
       actio                              = 'INS'
       tclas                              = 'A'
       begda                            = p_begda
       endda                            = p_endda
      *objps                              =
       seqnr                             = '000'
      *sprps                             =
      *subty                             =
       werks                            = 'US01'
       persg                             = '1'
       persk                             = 'EC'
       plans                             = '00042933'
       dialog_mode                  = '1'
       luw_mode                     = '1'
       no_existence_check     = 'X'
      *no_enqueue                 = 'X'
    IMPORTING
       return                            = lt_bapireturn
       return1                          = lt_bapireturn1
      TABLES
       proposed_values          = lt_value.

    In the methode VIEKN of the class CL_HRPA_VIEKN there is a test to see if PA0003 exists before it is created.
    Use the enhancement to INSERT PA0003 at the begin and to DELETE PA0003 at the end.
    METHOD viekn.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Classe CL_HRPA_VIEKN, Méthode VIEKN, Début D
    *$*$-Start: (1 )--------------------------------------------------------------------------------$*$*
    ENHANCEMENT 1 ZDIH_APPLICATION_EXTERNE_CREAT.    "active version
    DATA : lw_pa0003 TYPE pa0003.
    DATA : fl_pa0003 TYPE flag.
    CLEAR fl_pa0003.
    *  If coming from Web dynpro
    IF sy-cprog EQ 'SAPMHTTP' ANd pernr NE '00000000'.
    *  Check if the infotype 3 already exists
      SELECT SINGLE * FROM pa0003 INTO lw_pa0003 WHERE pernr = pernr.
      IF sy-subrc NE 0.
        fl_pa0003 = 'X'.
        MOVE pernr TO lw_pa0003-pernr.
        MOVE '18000101' TO lw_pa0003-begda.
        MOVE '99991231' TO lw_pa0003-endda.
        MOVE '12' TO lw_pa0003-viekn.
        INSERT pa0003 FROM lw_pa0003.
      ENDIF.
    ENDIF.
    ENDENHANCEMENT.
    *$*$-End: (1 )--------------------------------------------------------------------------------$*$*
    ----> original code of method <----
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(2 ) Classe CL_HRPA_VIEKN, Méthode VIEKN, Fin D
    *$*$-Start: (2 )--------------------------------------------------------------------------------$*$*
    ENHANCEMENT 2 ZDIH_APPLICATION_EXTERNE_CREAT.    "active version
      IF sy-cprog EQ 'SAPMHTTP' AND pernr NE '00000000'.
        IF fl_pa0003 = 'X'.
          DELETE FROM PA0003 WHERE pernr = pernr.
        ENDIF.
      ENDIF.
    ENDENHANCEMENT.
    *$*$-End: (2 )--------------------------------------------------------------------------------$*$*
    ENDMETHOD.

  • ABAP Code for summation of key figure

    Hi Guys,
    I am new to ABAP and my requirement is as follows-
    I have an infocube containing data like
    Location Item      Amount Month
    India       TV        10        Jan
    India       DVD     10        Jan
    India       XBOX   10       Jan
    US          TV        10       Jan
    US          XBOX   15       Jan
    US          DVD     20        Jan
    UK          XBOX   30       Jan
    UK          TV        20       Jan
    UK          DVD     15       Jan
    India       TV      20         Feb
    US          DVD   20         Feb
    UK          XBOX 10        Feb
    India       TV      20        Mar
    Now by using open hub, I want to extract a file which would display report as -
    Output file
    15-Oct-2010
    Location  Item   Amount
    India        TV     50
    India        DVD   10
    India        XBOX 10
    US           TV      10
    US           DVD   40
    US           XBOX 15
    UK          TV       20
    UK          DVD    15
    UK         XBOX  40
    which means it should sum based on combination of location and item and create one single row.
    I need some ABAP code which could be written in expert routine so as to to calculate single rows of amount for all data packets of infocube.
    Kindly suggest on how to proceed on it.
    Thanks in advance
    Moderator Message: Even if you are new-to-ABAP, it does not imply that you can expect others to do your work. If you are a BI consultant, take the help of an ABAP consultant or self-learn the basic concepts of ABAP. If you are an ABAPer, go back to the training center.
    Edited by: kishan P on Oct 15, 2010 10:34 AM

    Follow this white paper .... called, "How to .... Calculate with Attributes":
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc
    Brian

  • Query: How to add new fields in ABAP query?

    Hi All,
    Can any one tell me how to add new fields in the ABAP query output?
    We have to add the new fields using query design or we have
    to add those in the background program(automatically generated behind query) by selecting new fields in the code?

    What kind of report? Usually, you have to add the field in the table declaration and then also in the SQL query. After that, include the field in what kind of report you are using.

  • ABAP code in to JAVA for overwritting condition value for IPC pricing

    Dear experts i am an IPC JAVA developer and i am trying to translate an ABAP Routine in to JAVA code for overwriting condition value in the pricing user exit of IPC
    Here is the ABAPcode segment i am trying to transulate
      DATA: l_kdkg1  LIKE komk-kdkg1,
            l_work TYPE f,
            l_umren LIKE marm-umren,
            l_umrez LIKE marm-umrez.
      SELECT SINGLE peinh FROM mbew INTO mbew-peinh         
      WHERE matnr = komp-matnr
      AND bwkey = komp-werks.
      I need some  help in the following things
      1. I don't know how to transulate the following Line of ABAP code into JAVA
         " AND bwkey = komp-werks."
    Bwkey stands for plant details. I don't know how to get plant details from  Pricing Item.
      2. Someone please tell me weather the following JAVA transulation is correct
      Vector x = prItem.getUserExitConditions();
      db database = pricingEngine.getDatabase();
         // set table name
      String tableStart = "mbew";                                             
         // set query parameters
      sys_query_pair[] queryPair = null;
      //matnr = komp-matnr . Getting the material Number
      String materialNo= prItem.getProduct().toString();
      //bwkey = komp-werks.Getting plant.
      // TODO: werks stands for plant. Not sure how to get it from prItem
       String plant = "";
       queryPair = new sys_query_pair[2];                    
       queryPair[0] = new sys_query_pair("matnr", materialNo);
       queryPair[1] = new sys_query_pair("bwkey", plant);
      // set query columns
       String ZZFIELDStart = "peinh";
       String ZZFIELD_VALUEStart;                   
       String[] projectionStart;
       projectionStart = new String[];
       BigDecimal pricingUnit = null;
       try{     
          // execute query
          res resultSetStart = database.db_read_table(tableStart, queryPair,projectionStart) ;
          if (!res.db_empty_results_p(resultSetStart))
         ZZFIELD_VALUEStart = resultSetStart.db_get_row_element_string(0);
         pricingUnit = new BigDecimal(ZZFIELD_VALUEStart);
         resultSetStart.db_finish();
       else
         System.out.println("Coudn't find a value of field peinh in table mbew!");
       catch (exc_database_error e)
         e.printStackTrace();

    Please login to the server where IPC is installed. In the IPC folder u find libs folder  or search for docs in IPC folder. There it is dealt how ABAP routines are mapped to  user exits in java coding
    Thanks
    Surya

Maybe you are looking for

  • Gdb gets SIGSEGV from JVM in JDK 1.3.1_01 on RedHat Linux 6.2

    Hi all, I'd love to know if anyone has a fix for this problem? I am also posting it as a bug. Thanks in advance! OVERVIEW: When running Tomcat 4.0 via the Java launcher in a gdb debugging session (Red Hat Linux 6.2), I get a SIGSEGV signal (Segmentat

  • Objects

    plse tell anyone what is the use of these reports. u2022     Outstanding PO Report. u2022     Transport Detail Report. u2022     Vendor Open Items Ageing Report. u2022     Sales Turnover Report. Coding as per coding standards.

  • Changing Icons & Reverting to Old?

    Can someone please explain how to change icons on both the dock and desktop as well as a good site with cool new icons? Also - if I change an icon, how do I go about reverting to the old one? Thanks.

  • Quicktime panoramic view over multiple monitors

    hi, my goal is to display a video comprised of 6 moving images using quicktime 7.5 over 6 monitors distributed across the windows desktop. the video is 3840x480 -- i.e., 6*640x480. ideally this would be fullscreen over all six monitors. i've tried th

  • UK requirements on VAT

    Hi Experts, I'm currently working for a UK based company which has to be UK compliant for VAT  The currency settings for the problematic company code is EUR as local currency. The reason therefore is that lots of its vendors send invoices in EUR. Nev