‎2007 Feb 16 3:45 PM
Hi I have created a OO transaction for my report , and i want to print some output using "Write " statement .
Even if i copy standard program give by sap DEMO_OO_TRANSACTION to Z program and try to change statement
" message 'Instance method in local class' type 'I'.
to
Write " message 'Instance method in local class' type 'I'. "
Output is not shown.
If its not possible then how to do this, in work around.
I want to print one line message for user saying "Table successfuly updated" or "Updation Failed! "
Can anyone help.
Thanks in advance.
‎2007 Feb 16 4:00 PM
Do like this:
class demo_class implementation.
method instance_method.
submit zrtwrite1 and return.
endmethod.
endclass.
Create a Program zrtwrite1 in se38 with code:
report zrtwrite1.
write:/ 'Test'.
Regards,
Ravi
‎2007 Feb 16 4:00 PM
Do like this:
class demo_class implementation.
method instance_method.
submit zrtwrite1 and return.
endmethod.
endclass.
Create a Program zrtwrite1 in se38 with code:
report zrtwrite1.
write:/ 'Test'.
Regards,
Ravi
‎2007 Feb 16 4:16 PM
Thanks Ravi, i will reward points for this. But is this the only option. Can you explain me why direct write statement is not working .
Thanks a lot.
‎2007 Feb 16 4:25 PM
Hi Sharad,
I am not sure as to why is not working. Please continue to search for the reason.
Regards,
Ravi
‎2007 Feb 17 7:40 AM
Hi,
Try this,
class DEMO_CLASS definition.
public section.
methods INSTANCE_METHOD.
endclass.
*
class DEMO_CLASS implementation.
method INSTANCE_METHOD.
message 'Table sucessfully updated' type 'I'.
endmethod.
endclass.
data : obj1 type ref to demo_class.
start-of-selection.
create object obj1.
call method obj1->instance_method.
*----
The problem is you didn't create the object.
Thanks.
Note : Reward points if helpful..
‎2007 Feb 20 2:29 PM
Hi Vijay ,
thanks for your reply. but in your code if you replace
message 'Table sucessfully updated' type 'I'
by
write 'Table Successfully updated' and try running it with object oriented transaction then it will not work.
Am looking for the reason of the same, and with submit statement it will work.
Thanks & Regards,
Sharad.
Message was edited by:
Sharad T