Hi everyone,
I'm new to the use of BADI's and classes in general. I'm using BADI IF_PURCHASE_ORDER_ITEM_MM, and under process_item, I want to use the method get_previous_data. But whenever it's the first time that the method is called (and when there's no previous data, the system generates a runtime error, NO_DATA. I tried to catch this with a try, catch statement, but it isn 't working. Here's my code :
TRY.
CALL METHOD im_item->get_previous_data
IMPORTING
ex_data = ls_prev_mepoitem.
lv_matn = ls_prev_mepoitem-matnr.
CATCH no_data INTO oref.
text = oref->get_text( ).
ENDTRY.
I'm doing something wrong, but what...