Application Development 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: 

Exit for custom transaction

Former Member
0 Kudos

Dear fellow ABAPers

We're using MB1B for creating documents on goods movement and

have used the exit EXIT_SAPMM07M_001 (ZXMBCU02) for some validations.

now that , a scenario has come to copy MB1B (SAPMM07m) to custom transaction.

All the changes required were done in that and working fine , but the exit is not called.

How to make that work ie., the exits/BADIs (currently implemented and that will be implemented in future) for MB1B to be called for my custom transaction/program (for ex: ZMB1B).

Regards

Prabumanoharan

5 REPLIES 5

Former Member
0 Kudos

why do you need exits in you own code. just code normally .

Former Member
0 Kudos

Hi

The problem is the system can't find the exit in the custom transaction.

U should consider the logic used to call the exit:

In the program there's a code like:

CALL CUSTOMER-FUNCTION <XYZ>

So the system call the fm EXIT_<PROGRAM NAME>_XYZ

If you've copied the std program SAPMM07M in a new custom program (perhaps ZAPMM07M) the system will search the exit EXIT_ZAPMM07M_001: it doesn't exist of course.

So in your custom program u need to replace all calls of customer-exit:

Instead of

CALL CUSTOMER-FUNCTION <XYZ>

U need to place

CALL FUNCTION EXIT_<PROGRAM NAME>_XYZ

Max

0 Kudos

Thanks Max

It really helped me.

1 more doubt, where this transaction to exit/ badi relation is made, if i make that link to my custom transaction / program , it will be easy to maintain in future , right.

Regards

Prabumanoharan

0 Kudos

Hi

I don't know if there's a place where this link is done, but I could be a characteristic of the SAP kernel, because CALL CUSTOMER-FUNCTION is an abap statament.

Max

Former Member
0 Kudos

got 95% of the answer, issue solved, thanks to all