BAdI ME_PROCESS_PO_CUST only for ME21N
I've implemented the method POST_ITEM of BAdI ME_PROCESS_PO_CUST and it works fine so far.
Now, I've the little problem that the coding should only be executed in ME21N and not in ME22N (only for new purchase orders). At the moment I'm doing this with the following coding:
header_obj = im_item->get_header( ).
ls_mepoheader = header_obj->get_data( ).
select single ebeln from ekko where ebeln = ls_mepoheader-ebeln.
If not ( sy-subrc = 0 ).
I tried to use the field SY_TCODE also, but that doesn't work because that field contains value "ME23N" if you call ME23N and then goto change the po.
Is there a better solution for this issue than the ekko-select?