Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Use of changing parameter and raising parameter in methods

Junaidshaik284
Participant
0 Kudos

I would like to know about that and I am a little bit confusing using it and so tell me an appropriate example to know the working process of changing parameter and raising also and I know the working process in methods in oops

Thanks

8 REPLIES 8

FredericGirod
Active Contributor

Could you be more specific ? what is the context ?

Sandra_Rossi
Active Contributor

I don't understand the question. I don't see any relationship between changing and raising. I guess it should be 2 different questions. What is "changing"? What is "raising"? Of course, it's very well detailed in the ABAP documentation, so you should explain WHAT you don't understand.

manfred_reinart
Active Participant

are you asking about basics on using CHANGING parameters in ABAP OO methods and basics about raising exceptions?

Junaidshaik284
Participant
0 Kudos

yes I am asking basics and I Just little bit confused changing parameter

Sandra_Rossi
Active Contributor

"Changing" is to indicate parameters which need to be changed, like "translating" a text to upper case, you need an input text, and it's changed. Why are you confused?

"Raising" is about the concept of class-based exceptions. It's same as Exceptions that you may know for function modules but with many more features.

Of course, they are explained in the ABAP documentation: ABAP Keyword Documentation - CHANGING and ABAP Keyword Documentation - Class-Based Exceptions.

Junaidshaik284
Participant
0 Kudos

We also can change export parameter. While calling methods, we can pass values and can be modified and same working in changing also and how it is different both

FredericGirod
Active Contributor
0 Kudos

If you are speaking about method, you are suppose to use IMPORTING EXPORTING or RETURNING.

Better is to use only IMPORTING and RETURNING, because a method should return only one result as it should do only one task (SOLIDE Principle)

You are maybe making confusion with FORM and CALL FUNCTION, having other kind of parameters, but it is old school

Sandra_Rossi
Active Contributor

Okay, so that's your question: "why having Changing and Exporting if they do the same?" Which is not related to "Changing and Raising".

Please ask a new question then.