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: 

Request for BADI and its methods for PV12 transaction code.

suresh_subramanian2
Active Contributor
0 Kudos

Dear all,

My requirement is to trigger workflow from PV12 transaction code.

In PV12 transaction code, there are 3 radio buttons.When either of these radio buttons are chosen and saved, respective workflow should trigger.

There is no standard event in business objects to trigger the workflow.The only solution is to create custom event.This custom event can be raised from BADI or user-exit.

Though I have identified list of BADIs for PV12,I struggle a lot to identify the right BADI and right method.

Please suggest me the BADI and its method for each of those 3 radio buttons in PV12 transaction code.

Thanks and regards,

S.Suresh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Suresh,

Go to transaction SE24, class name CL_EXITHANDLER, go to methods, double click on method GET_INSTANCE.

Set a break point at

CALL METHOD cl_exithandler=>get_class_name_by_interface

EXPORTING

instance = instance

IMPORTING

class_name = class_name

CHANGING

exit_name = exit_name

EXCEPTIONS

no_reference = 1

no_interface_reference = 2

no_exit_interface = 3

data_incons_in_exit_managem = 4

class_not_implement_interface = 5

OTHERS = 6.

CASE sy-subrc.

Now run trasaction PV12, and try to press each raidio button, your control will break at each BADI(If any), exit name and instance will give you the BADI details.

I think this is one of the simplest way.

Thanks and Regards,

Antony Thomas

3 REPLIES 3

Former Member
0 Kudos

Hi Suresh,

Go to transaction SE24, class name CL_EXITHANDLER, go to methods, double click on method GET_INSTANCE.

Set a break point at

CALL METHOD cl_exithandler=>get_class_name_by_interface

EXPORTING

instance = instance

IMPORTING

class_name = class_name

CHANGING

exit_name = exit_name

EXCEPTIONS

no_reference = 1

no_interface_reference = 2

no_exit_interface = 3

data_incons_in_exit_managem = 4

class_not_implement_interface = 5

OTHERS = 6.

CASE sy-subrc.

Now run trasaction PV12, and try to press each raidio button, your control will break at each BADI(If any), exit name and instance will give you the BADI details.

I think this is one of the simplest way.

Thanks and Regards,

Antony Thomas

0 Kudos

Hello Antony Thomas !

Thanks a lot for your reply.

I got 6 BADI and one user exit.Following are the BADIs meant for PV12 transaction

1. HRBAS00_GET_PROFL

2.HRBAS00_STRUAUTH

3.BADI_LAYER

4 HR_RHPREL00 - CAN BE CONSIDERED

5.HRTEM_READ_OBJECT

6.RHPV0001

The user-exit for PV12 transaction code is RHPV0001.In this user-exit, there is a function module "EXIT_SAPLRHPV_001".When I double-click this function module, I get message that function module does not exist.

So, I examined the BADIs and its methods to find the most suitable one for my requirement.Atlast,I found HRBAS00_GET_PROFL is most suitable BADI.he BADI RHPV0001 is most useful to cancel business events.

Thanks and regards,

S.Suresh

0 Kudos

You are welcome....