Abap hr test exercise

Hi all,
Is  there any good link for test exercises on ABAP Hr.
Thanks
Sanket sethi

Hi,
Just give an entry in infotype 8, 14 or 15 for previous month and run the payroll than retro will run, than compare results using wage type reporter.
When you run the payroll give the sandard SAP Remuneration and compare the results in the SAP payslip and payslip you have developed.
If you have developed payslip using PE51 than the retro amounts are picked authomatically.
Regards,
Ramu N.

Similar Messages

  • ABAP Unit Test Problem

    Here we go again on questions regarding ABAPUnit.  We are trying to use Abap unit within a Class object.  All the examples we have seen have to do with Classes and Methods within a Report program. 
    What we have created:
    Class: ZCL_MAIN
    Type: General Class
    Method:  test_abapunit
    Class: ZCL_MAIN_TEST
    Class type: Abap Unit
    Sub Class of ZCL_MAIN
    Method: Test_abapunit_test 
    We try and run the Abap Unit Test from the Test Class and it says it is complete but does not execute our code.  I know we are doing something wrong but are stumped as to what it is.
    Glenn

    Hi Glenn,
    although Uwe and Klaus actually provided for the relevant information we too faced some difficulties at first understanding 'where' you actually put the test classes. So here are the mechanics:
    Open SE80 or SE24 and implement your class ZCL_MAIN.
    While this class is opened, choose <i>Goto->Class-local types->Local Class Definitions/Types</i> from the menu. An editor for local classes is opened on the right.
    Type in your class definition ZCL_MAIN_TEST like this:
    CLASS lcl_main_test DEFINITION FOR TESTING.
      "#AU Risk_Level Harmless
      PRIVATE SECTION.
        CONSTANTS: some_initial_test_value TYPE i VALUE 5.
        DATA: main_class TYPE REF TO zcl_main.
        METHODS setup     FOR TESTING.
        METHODS teardown  FOR TESTING.
        METHODS check_get_my_int FOR TESTING.
        METHODS check_.. FOR TESTING.
    ENDCLASS.
    This is btw a 'normal' local class, no subclass of cl_abap_unit.. whatsoever.
    Go back (menu <i>Goto->Class Definition</i>).
    Choose <i>Goto->Class-local types->local class implementations</i> from the menu.
    Type in your class implementation for ZCL_MAIN_TEST, i.e. implement especially the setup()-method for the test fixture and the various test-methods.
    Compile/activate your class ZCL_MAIN.
    Run the test by choosing <i>Test->Unit Test</i> from the context menu of the class ZCL_MAIN.
    Hope this helps, regards,
    Sebastian

  • ABAP Mapping - Testing - IDoc - Trouble

    Hi Friends,
    There is one ABAP Mapping used in our system. The outbound interface is based on one message in external definition and inbound interface is IDoc.
    When I try to test this mapping in our PI System using the transaction "SXI_MAPPING_TEST", in the initial screen/input screen in F4 help for the Sender Interface selection, our outbound interface is not displayed. In the Receiver Interface also, it is not display the IDoc.
    What could be the problem ? How to test our Z class in this case with the input XML.
    Could you please help me?
    Kind regards
    Jegathees P.

    Hi,
    don't use SXI_MAPPING_TEST
    use my report which is much better
    XI/PI: Easy ABAP mapping tests - no more SXI_MAPPING_TEST
    BTW
    there is no need to use any HTTP client nor anything to test ABAP mapping - just my report
    Regards,
    Michal Krawczyk

  • Hi Experts, need an example for abap unit test(ABAP OO)?

    Hi Experts,
    I want to do abap unit test for the developed programs, could anyone please give me an example program of development(a simple is ok, just use it to test)? and an abap unit test example for the program, what I want is to use object oriented abap, thanks in advance!
    Merry Christmas to you all.
    Kind regards
    Dawson

    Hi
    Below documents will give you more information,
    http://help.sap.com/saphelp_nw04/helpdata/en/a2/8a1b602e858645b8aac1559b638ea4/content.htm
    ABAP Testing and Troubleshooting [original link is broken]
    http://bi.offis.de/publicProject/g16cglafhqva.htm
    regards
    Nagaraju

  • Transport of ABAP Unit Test Classes between systems.

    Hi guys
    I have a bit of a dilemma on hands here pertaining to the transport of ABAP Unit test classes. Generally when you create a transport containing classes the transport manager will automatically include all "programs" related to the class like the local type definitions, local implementations and with ABAP Unit the local test classes.
    <b>The question that I have is how would one go about excluding the ABAP Unit test classes in transports to production systems and pre-WAS 6.40 systems that do not support ABAP Unit? Does the transport system automatically manage this for you?</b> Any help ideas regarding this would be greatly appreciated.
    Kind regards
    Ettienne Hugo

    Hello Ettienne
    I have a very similar problem that I have to maintain objects for release 6.20 and 6.40. Since I appreciate ABAP Unit Tests as being very helpful I do not want to miss them even in such a situation.
    My approach is as following:
    - If possible, I try to separate the local classes from the tested object, for example:
    - Report or function group
         - contains an include like <z_include_ft01>
                - Within <i><z_include_ft01></i> I have a single stament <i><z_include_au01></i>
    The actual ABAP Unit Tests are coded in <z_include_au01>. Now if I need to ship the development to a release < 6.40 the only thing I need to do is to comment the single INCLUDE statement in <z_include_ft01>. This manual step cannot be ommitted (however, it would be simple task to define an eCATT doing this). In addition, include <z_include_au01> should not be in the transport request for the development (if it happened the import error would not affect the function of the development because it is no longer linked together).
    Advantage of this approach:
    - I clearly see that my development contains ABAP Unit Tests (use naming conventions for the includes) and
    - I can ship - with little effort - the development to SAP releases not supporting ABAP Unit Testing yet
    Regards
      Uwe

  • Hi Experts, questions about abap unit test(abap oo)?

    Hi Experts,
    I am learning abap unit test, could you please tell me some info about how I can test the performance of some specific code in my program? can abap unit test do this kind of job? and could you please tell me what I can do using abap unit test? and some classic examples are appreciated, thanks in advance!
    Kind regards
    Dawson

    Hi
    Below documents will give you more information,
    http://help.sap.com/saphelp_nw04/helpdata/en/a2/8a1b602e858645b8aac1559b638ea4/content.htm
    ABAP Testing and Troubleshooting [original link is broken]
    http://bi.offis.de/publicProject/g16cglafhqva.htm
    regards
    Nagaraju

  • ABAP unit: test classes part of prod. code

    Hi all,
    I've read <a href="https://weblogs.sdn.sap.com/pub/u/266">Thomas Weiss</a>'s weblog: <a href="/people/thomas.weiss/blog/2004/12/17/a-spotlight-on-abap-unit-part-1 Spotlight on ABAP Unit Part 1</a>.
    I posted a question there, but apparently Thomas can't answer at the moment, and since I'm impatient for getting someone's opinion, I reckon we can discuss that topic here  :^)
    As explained in the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c1be1003-0701-0010-3795-f87160de6483">NetWeaver Developer’s Guide Using ABAP</a>, the test classes are part of the program under test (PUT):
    <i>In ABAP Unit, test classes are part of the production code of the TU. This avoids problems arising from the test code being separate from the production code:
    - Programs and tests must be kept synchronized.
    - You have to ensure that the test and program code are transported together.
    - External test code only enables black box tests with an outside perspective of the tested program.
    Since the test code is part of the production code, it is easy to keep the unit tests and the
    production code up to date if the latter is changed.
    Although the test code and the production code are transported through the system landscape, ABAP unit tests do not increase the load on the production system. By default, the test code is not compiled in the production system. Therefore, the test code can never be executed in the production system.</i>
    On the other hand, this idea is quite different from what suggested by other unit testing frameworks.
    For instance, the documentation of <a href="http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html">Test::Unit - Ruby Unit Testing Framework</a> reads:
    <i>It‘s handy to collect a bunch of related tests, each test represented by a method, into a common test class that knows how to run them.
    The tests will be in a separate class from the code they‘re testing for a couple of reasons. First of all, it allows your code to stay uncluttered with test code, making it easier to maintain. Second, it allows the tests to be stripped out for deployment, since they‘re really there for you, the developer, and your users don‘t need them. Third, and most importantly, it allows you to set up a common test fixture for your tests to run against.</i>
    Regarding the advantages outlined by NetWeaver Developer’s Guide:
    - Programs and tests might be kept synchronized even if they don't belong to the same unit of code.
    - Moreover, you could assure that the test and program code are transported together by saving them in the same package.
    - And quite frankly, I don't have a thourough understanding of the reason why external tests only allow <i>black box tests with an outside perspective</i>.
    What are your opinions on this?
    Regards, Davide

    Hi,
    when I started unit testing with JUnit I was quite surprised that SAP groups the tests with the production code. But now I actually really like it. It has a few advantages:
    - Good tests serve as an excellent documentation so why not bundling them together.
    - If you want to look at the tests they are easy to find.
    - I write all my class tests as local classes. I found out that it really helps me to focus on writing tests only for the class under test. Sometimes it is quite easy to forget the "unit" and write integration tests again.
    Regarding your question:
    >And quite frankly, I don't have a thourough understanding of the reason why external tests only allow black box tests with an outside perspective.
    Usually I would not use the term black box testing in this context. Maybe you mean that it is easy to access private attributes, methods when you group class and testclass together?
    Normally black box testing means that you cannot look at the implementation of the code under test. So your tests are based on the specifications or if there is not one, on your common sense.
    cheers
    Thomas

  • Creating ABAP Unit Tests for Report Programs

    How can we create ABAP unit test  for report programs.
    Please explain the steps?

    Hi Devendra.
    I would like to suggest some references which are as below:
    [SAP HELP - Complete ABAP unit|http://help.sap.com/saphelp_nw04/helpdata/en/a2/8a1b602e858645b8aac1559b638ea4/frameset.htm]
    [SDN - Reference for ABAP unit testing|about unit testing;
    Hope that's usefull.
    Good Luck & Regards.
    Harsh Dave
    Edited by: Harsh Dave on Jul 14, 2008 2:13 PM
    Edited by: Harsh Dave on Jul 14, 2008 2:20 PM

  • How to count the number of test ABAP Unit test methods

    I need to count the number of test methods of a class.   Has anybody done this before?   For example, if I have a class that has 3 methods and I wrote 6 abap unit test methods for it.   I can count the number of methods using cl_abap_classdescr=>describe_by_name (which gave me 3 from my example) but I could not find the function module to count the number of test methods (which should give me 6 in my example).
    I appreciate your reply.

    This call does thew trick.  I just had to make sure the prog name that I pass has "CP" from the 30th pos for it return the result.   Here is thew subroutine that I use:
    form get_test_method_count using     query_class
                               changing  test_method_count.
      data: l_progname type progname.
      l_progname = query_class.
      l_progname+30 = 'CP'.  "needed so the following method will recognize this as a class
      data: l_result type if_aunit_prog_info_types=>ty_t_testclasses.
      try.
          call method cl_aunit_prog_info=>get_tests_of_program
            exporting
              progname = l_progname
            receiving
              result   = l_result.
          if l_result is not initial.
            data: result_rec like line of l_result.
            loop at l_result into result_rec.
              test_method_count = lines( result_rec-methods ).
            endloop.
          endif.
        catch cx_root.
      endtry.
    endform.

  • ABAP MAPPING TEST

    Hi all,
    i am testing ABAP mapping using SXI_MAPPING_TEST.
    i am copying my payload in the XML editor and i am using service, namespace and interface name for both sender and receiver sides.
    but my Q is system does not stop in my ABAP mapping program to check step by step.
    plz help me it is urgent
    points should be rewareded.
    regards
    sreeni

    Hi all,
    After giving the XML input data in the editor and executed but it not at all showing or triggering any code which is there in ABAP Mapping Program.
    I have also kept Break Point  one ABAP statement like WHILE (it ther in My program), but it does stop at WHILE.
    plz help me
    Points will be rewareded.
    regards
    sreeni

  • ABAP MAPPING TESTING

    How can I test an ABAP mapping where the input file is a flat file (fieldfixed length file)?
    Kindly give me the detailed steps for doing so.

    Hi Biswa,
    One of the many disadvantages of using ABAP mapping.
    U cannot test in ESR. Unlike Graphical mapping, there will not be any Msg Mapping object in ABAP mapping. Only an operation mapping is there.
    The only way to test the interface is End-To-End. I.E. Process the scenario frm picking the file from Application server location and checking the data posted in backend system correctly.
    One more way, u can test the mapping program in the ABAP stack by passing on the file as input.
    Cheers,
    Souvik

  • ABAP UNIT TEST

    Hi ,
    I am new to oops concept but i am able to understand.
    Now i have to create some Unit test plans in ABAP.We are using SAP Netwever 7.1 and WEB AS 6.0
    I tried from SE24 but i couldn't get the correct path.
    Can you please explain me: if i have a Z program then where and how to write number of Unit test classes. And how it will integrate to with our actual program/FM/any object
    Thanks
    Umashankar.

    You can create the ABAP Unit class as a local class in your program, FM, or class which will test the functionality of that individual code lines. Once you implement the ABAP Unit, you can then run the Unit Test by main menu > Execute > Unit Test. E.g. from Program, Program > Execute > Unit Test.
    Check this previous discussions:
    ABAP Unit, how to use
    Unit Testing concept
    Regards,
    Naimesh Patel

  • ABAP UNIT - Test Driven Development

    Dear ABAPers,
    I hope some of you may have also ventured into this area of Test Driven Development.  I have just started looking into this new and exciting way of development.  My understanding after having gone through the available blogs and some reading material on TDD, is that, we have to religiously embrace Object Oriented programing to actually benefit from TDD methodology.  That raised a big question in my mind, how do we implement this technique when we are coding in the user exits like MV45AFZZ, which is mostly classical ABAP programming?
    Please help me understand the TDD a bit more than I currently do.
    Thanks much,
    SMA.
    <- removed by moderator ->
    Edited by: Neil Gardiner on Sep 29, 2010 10:38 AM

    As Dirk already mentioned TDD is writing test before writing productive code. This approach is not limited to OO practices or unit tests.
    E.g. writing an eCatt script in advance that passes as soon the scenario is working, adheres to TDD practices also..
    Vice versa if one practices unit testing and oo patterns it is no TDD if the tests are written after the productive code.
    Regards
      Klaus

  • Abap unit test debug

    when use unit test,how to start up debug model?

    You can put breakpoints in your unit test methods (or helper methods) the same way you can in regular ABAP. As long as it is being executed in the foreground it should be tripped. I have noticed some quirky behavior about when it allows me to place a breakpoint in the code and when it places the breakpoint on the report statement at the beginning of my program, but it IS possible. I do it frequently.
    Regards,
    Andy

  • ABAP keyword testing

    Hi All,
    If i have a word with me is there any way to know if that particular word is an ABAP keyword or not.
    Ex: If i give 'DATA' as input i should get output as its a keyword,
          If i give 'TEST' as input i should get output as not a keyword.
    Is there any function module or other solution for this?
    Thanks in Advance,

    Hi,
    You can use the below function module.
    TERM_KEYWORDS_SEARCH.
    Take a key word FOR ALL ENTRIES, and pass this to the variable SEARCH_TERM.
    For the parameter, CONTEXT, pass EN as language key.
    In the import parameter, RESULT table will  have this entry, under the column TEXT.
    You can also restrict your search based on the component type.
    Regards,
    Santhosh.

Maybe you are looking for

  • Excise Invoice Tab should not open at GRN

    Hello all, I am trying to procure assets with account assignment A and without material code. I am using 0% tax.  We also do not have any records in J1ID tcode. However, during GRN the Excise invoice tab is opening up. One way to get around at GRN is

  • Script for automatic delete of archive logs/redologs

    Hi Experts, Do you have any idea on how to create a shell script. Actually the function of it, is to automatically deletes the archive logs/redologs if reaches the limit. Or is there any parameter to change to set the automatic deletion of archive lo

  • How affect to characteristic in fact table

    Hi, The Gregorian calendar is not used for Finance Reporting but the InfoObjects are part of the time dimension. Storing "Project Month" and "Gregorian Month" as two not aligned calendars is enforcing an artificial splitting of records in the facts t

  • Best way to introduce iPhone

    My brother has just gotten iPhone 4 for Christmas. He is a little overwhelmed by the whole thing.. What is the best way to introduce him to all the features and basic use? Hopefully some YouTube video!?

  • Post Processing after Changing SID

    Hi, After following the procedure in: Change SID I am able to start msg_server but stuck with the follwing with Java still not starting up. I wonder about Java instance ID, what happens with the instance ID if the above procedure is followed. I have