2007 Jun 07 5:50 PM
Hi Dear Friends!
I ve a doubt in the below mentioned answer for the thread 'how to prepare tech spec'.
What is error handling & test cases?
i ve marked in bold also my issue.
Re: How do you prepare technical speck?
Posted: Nov 20, 2006 3:05 PM in response to: raja reddy Reply E-mail this post
based on user requirements, we need to analyze the requirement...then check which all database tables needs to be accessed and what are the links...then which way the select statements needs to be written...next are there any calculations etc...<b>what are steps for error handling...what are the test cases...</b>.how iwll the output displayed...
Looking for your reply friends
Rahul.
2007 Jun 07 6:04 PM
Hello Rahul
If you have a reasonably complex application you will end up with 50% or less of business logic coding and the rest is used for error handling.
I will give you an example. Let us assume you want to read open items of a debitor from a remote system (via RFC). Now if the RFC connections fails how will your application react? Because you could not read any open items does it return to the user:
- Debitor xyz => 0 open items???Obviously this would be wrong. Instead, you have to handle the RFC failure
CALL FUNCTION '<rfc function module>'
DESTINATION ld_target
EXPORTING
...
IMPORTING
...
EXCEPTIONS
system_failure = 1 MESSAGE ld_rfc_failure
connection_failure = 2 MESSAGE ld_rfc_failure
others = 99.The application must inform the user that, due to an RFC failure, the open items for debitor xyz could not be read:
- Debitor xyz => reading open items failed (RFC error)From this example you can immediately derive test cases:
(1) RFC connection ok & debitor has n open items => expected test result:
- Debitor xyz => n open items(2) RFC connection ok & debitor has 0 open items => expected test result:
- Debitor xyz => 0 open items(3) RFC connection failed & debitor has n open items => expected test result:
- Debitor xyz => reading open items failed (RFC error)(4) RFC connection failed & debitor has 0 open items => expected test result:
- Debitor xyz => reading open items failed (RFC error)I hope I could give you some input.
Regards
Uwe
Hello Rahul
If you have a reasonably complex application you will end up with 50% or less of business logic coding and the rest is used for error handling.
I will give you an example. Let us assume you want to read open items of a debitor from a remote system (via RFC). Now if the RFC connections fails how will your application react? Because you could not read any open items does it return to the user:
- Debitor xyz => 0 open items???Obviously this would be wrong. Instead, you have to handle the RFC failure
CALL FUNCTION '<rfc function module>'
DESTINATION ld_target
EXPORTING
...
IMPORTING
...
EXCEPTIONS
system_failure = 1 MESSAGE ld_rfc_failure
connection_failure = 2 MESSAGE ld_rfc_failure
others = 99.The application must inform the user that, due to an RFC failure, the open items for debitor xyz could not be read:
- Debitor xyz => reading open items failed (RFC error)From this example you can immediately derive test cases:
(1) RFC connection ok & debitor has n open items => expected test result:
- Debitor xyz => n open items(2) RFC connection ok & debitor has 0 open items => expected test result:
- Debitor xyz => 0 open items(3) RFC connection failed & debitor has n open items => expected test result:
- Debitor xyz => reading open items failed (RFC error)(4) RFC connection failed & debitor has 0 open items => expected test result:
- Debitor xyz => reading open items failed (RFC error)I hope I could give you some input.
Regards
Uwe
2007 Jun 07 6:04 PM
Hello Rahul
If you have a reasonably complex application you will end up with 50% or less of business logic coding and the rest is used for error handling.
I will give you an example. Let us assume you want to read open items of a debitor from a remote system (via RFC). Now if the RFC connections fails how will your application react? Because you could not read any open items does it return to the user:
- Debitor xyz => 0 open items???Obviously this would be wrong. Instead, you have to handle the RFC failure
CALL FUNCTION '<rfc function module>'
DESTINATION ld_target
EXPORTING
...
IMPORTING
...
EXCEPTIONS
system_failure = 1 MESSAGE ld_rfc_failure
connection_failure = 2 MESSAGE ld_rfc_failure
others = 99.The application must inform the user that, due to an RFC failure, the open items for debitor xyz could not be read:
- Debitor xyz => reading open items failed (RFC error)From this example you can immediately derive test cases:
(1) RFC connection ok & debitor has n open items => expected test result:
- Debitor xyz => n open items(2) RFC connection ok & debitor has 0 open items => expected test result:
- Debitor xyz => 0 open items(3) RFC connection failed & debitor has n open items => expected test result:
- Debitor xyz => reading open items failed (RFC error)(4) RFC connection failed & debitor has 0 open items => expected test result:
- Debitor xyz => reading open items failed (RFC error)I hope I could give you some input.
Regards
Uwe
2007 Jun 07 6:55 PM
2007 Jun 07 7:27 PM
Hello Uwe!
This sound's amazing can u pls give some more real time example
Looking for your reply.
Thanks in Advance
Rahul.
2007 Jun 09 8:20 PM
Hi!
Can any one pls give more detail for this issue!
Also more examples with real time scenarios
Thanks
Rahul
2007 Jun 09 8:40 PM
Hello Rahul,
Let me say one example about error handling and prepare test cases.
Suppose if you are uploading the data to one transaction ,then you will be writing the code in Development system ,so development system does not contain real time data. before moving ur development from dev to PRD ,we need to prepare test cases and show them to ur manager.
I have one file and need to upload into sales order..
you get the data from file to internal table and using bdcdata you can process to sap r/3 sales order screen.
suppose file has some wrong data ,this should not be updated ,this is one case
suppose file has good data ,this should be updated ( take the screenshots and copy into word dcoument ( Every company has own test case documents)
once you done ,log file should be created in one directory,you can download log files using gui_download...
you can log messages using BDCMSGCOLL Structure when you use bdc method
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |