2012 Feb 09 7:43 PM
hello,
I have a requirement that I am working on, I need to create a program that will have vendor number and vendor bank account number on the selection screen.
Now what I need to do is I need to call a method from a class that will do some kind of validation, method name is 'validation'
My problem here is that method validation has only vendor bank account number as a parameter. Vendor number is defined as an attribute in the class, let's say z_vendor, and in the method we are using Z_vendor as a vendor number.
Can you please tell me how can I set the value of the attribute to the one that the user will enter using a FM and then how to call the method validation in to my program.
I can not make any change the way class has been declared.
The attribute z_vendor is defined as follows:
1. Level - Instance Attribute
2. Visibility - Public
I am very new to OOPS.. so any help will be really appreciated.
2012 Feb 09 8:15 PM
Hi Rahul,
You can do like this:
data:lr_object type ref to CLASS (NAME of your class)
create object lr.
1.lr_object->z_vendor = vendor no.
2. call method lr_object->method name (in Importing parameter pass the vendor bank account no.
And then in the method your vendor no and bank account will be passed.
Thanks
Bhanu
Useless...
2012 Feb 09 8:15 PM
Hi Rahul,
You can do like this:
data:lr_object type ref to CLASS (NAME of your class)
create object lr.
1.lr_object->z_vendor = vendor no.
2. call method lr_object->method name (in Importing parameter pass the vendor bank account no.
And then in the method your vendor no and bank account will be passed.
Thanks
Bhanu
2012 Feb 13 3:21 AM
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |