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

BAdI ME_PROCESS_REQ_CUST: subtle behaviour in PROCESS_HEADER

Former Member
0 Likes
607

Hi all,

I'm using BAdI ME_PROCESS_REQ_CUST to make custom checks during PReq processing via ME51N transaction.

When I change the PReq type as very first change made in transaction the method PROCESS_HEADER doesn't return the PReq type just modified but the default one.

If I change another time the PReq type the method, this time, returns the correct PReq type.

I have already get an official answer saying that this is not a correct behaviour.

A suggested workaround it is to read the variable my_state->flow in the object lcl_req_header that is instantiated by transaction: but how I can read this object ? In other words I have my object related to BAdI implementation and from there I need to read an attribute of another object to which I have a variable to which (object) is a ref.

I know that is it very complicate to explain the situation...

Thanks a lot,

Antonino

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
444

Hello Antonino

A similar problem has been described previously in thread:

[Access to class-attribute by Interface-reference|;.

I explained the solution in more detail in my Wiki posting

[ Accessing the Inacessible - Local Classes within Global Classes|https://wiki.sdn.sap.com/wiki/display/ABAP/AccessingtheInacessible-LocalClasseswithinGlobalClasses]

Since MY_FLOW is a public attribute of MY_STATE like MY_ITEM the solution should work here, too.

Regards,

Uwe

2 REPLIES 2
Read only

uwe_schieferstein
Active Contributor
0 Likes
445

Hello Antonino

A similar problem has been described previously in thread:

[Access to class-attribute by Interface-reference|;.

I explained the solution in more detail in my Wiki posting

[ Accessing the Inacessible - Local Classes within Global Classes|https://wiki.sdn.sap.com/wiki/display/ABAP/AccessingtheInacessible-LocalClasseswithinGlobalClasses]

Since MY_FLOW is a public attribute of MY_STATE like MY_ITEM the solution should work here, too.

Regards,

Uwe

Read only

Former Member
0 Likes
444

Hi Uwe,

the thread you suggested fully solved the problem !

Thanks a lot,

Antonino