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

BAdIs in class_constructor

Former Member
0 Likes
738

Dear Gurus,

I had asked help on this question some days before. I am rephrasing the question, hoping someone would offer help this time.

There is a BAdI method being called in a class_constructor. What and how can I code this method, as there are no parameters involved.

I am referring to the class_constructor of the CLASS lcl_req_header (for Purchase Requisitions) and the method INITIALIZE of the BAdI ME_PROCESS_REQ_CUST.

Thank you,

Fred.

Dear Gurus,

I had asked help on this question some days before. I am rephrasing the question, hoping someone would offer help this time.

There is a BAdI method being called in a class_constructor. What and how can I code this method, as there are no parameters involved.

I am referring to the class_constructor of the CLASS lcl_req_header (for Purchase Requisitions) and the method INITIALIZE of the BAdI ME_PROCESS_REQ_CUST.

Thank you,

Fred.

4 REPLIES 4
Read only

Former Member
0 Likes
682

Hi, Your question is not quiet clear.

Do you want to explicitly call the method INITIALIZE of the BADI definition ME_PROCESS_REQ_CUST?

Is this BADI definition part of class_constructor? How this is triggered in this constructor?

Thanks

Kamal

Read only

0 Likes
682

Kamal,

I want to put some code in the INITIALIZE method to initialize structures that carry the item data (TYPE MEREQ_ITEM) and fill them with different sets of default values. (I have implemented the BADI)

This is how it is called in the class_constructor:

  • BAdI ME_PROCESS_REQ

CALL FUNCTION 'MEREQBADI_INITIALIZE'

EXCEPTIONS

error_message = 0.

The data is defined in the FUNCTION-POOL MEREQBADI as:

.....

....

DATA: gf_me_process_req_cust TYPE REF TO if_ex_me_process_req_cust,

....

.....

Thank you very much for your time and help,

Fred.

Read only

Former Member
0 Likes
682

Fred,

How much ABAP Objects experience do you have?

Read only

0 Likes
682

John,

Hope I am not missing your point. I have good understanding of the ABAP objects, and about a year programming with it.

Thank you for sparing time and your help,

Fred.