Application Development and Automation 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: 
Read only

ERROR IN BADI CALLING PROGRAMME

Former Member
0 Likes
311

HI EXPERTS,

I have defined a sample badi with single method 'dividing' with params number1, number2 , result ,status.status is for throwing exception .

Now my problem is in the following programme it is unable to create 'exit'.it is showing the message failed.

could u resolve it.

class cl_exithandler definition load.

data: exit type ref to ZIF_EX__BADITEST_DEFINE.

data: v_rnum type i,

v_stat type c.

selection-screen begin of block b1.

parameters:p_num1 type i,

p_num2 type i.

selection-screen end of block b1.

start-of-selection.

CALL METHOD CL_EXITHANDLER=>GET_INSTANCE

EXPORTING

EXIT_NAME = 'Z_BADITEST_DEFINE'

NULL_INSTANCE_ACCEPTED = seex_true

CHANGING

INSTANCE = exit

EXCEPTIONS

others = 1.

if not exit is initial.

call method exit->dividing

exporting

number1 = p_num1

number2 = p_num2

changing

result = v_rnum

status = v_stat .

else.

message 'failed' type 'I'.

endif.

if V_stat = space.

write : / 'result : ', v_rnum.

endif.

Regards,

Pavan.

1 REPLY 1
Read only

Former Member
0 Likes
285

Hi,

I think you have not implimented the defined badi.

For every badi defined there should be implimentation in se19.

Thanks,

NN.

Edited by: Nethaji babu on Apr 28, 2008 2:42 PM