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: 

BADI IF_EX_ME_PROCESS_PO_CUST~PROCESS_SCHEDULE

Former Member
0 Kudos

Hi,

I need some help on Badi.My requirement is to auto determine the route in Tcode ME22N when a shipping point/Contition is changed for an Item .Iam using the method Process_Schedule method of the interface IF_EX_ME_PROCESS_PO_CUST defined in the defnition ME_PROCESS_PO_CUST.Here i need to map to the corresponding structure to carry forward to the screen after the method call.I have used Get and Set methods of the shipping data.Iam facing problem while executing the Transaction.Its giving a short dump specifying null reference. There is a code before the call like

--->> mmpur_dynamic_cast l_if_item my_model (????)

ls_ekpv =

l_if_item->if_purchase_order_item_mm~get_shipping_data( ).

If i use the mmpur_dynamic_cast parameter its saying i need to define but if i check out in Standard code iam unable to go the declaration point .

Else if i dont use the call method is going for null reference could any one please help me in this regard its bit Urgent.

Thanks & Regards

Vamsi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

please define a local data l_schedule TYPE REF TO IF_PURCHASE_ORDER_SCHEDULE_MM.

mmpur_dynamic_cast l_schedule IM_SCHEDULE.

Then you can use the methods of IF_PURCHASE_ORDER_SCHEDULE_MM.

For example GET_ITEM to get the corresponding item.

Regards

Christian

2 REPLIES 2

Former Member
0 Kudos

Hi,

please define a local data l_schedule TYPE REF TO IF_PURCHASE_ORDER_SCHEDULE_MM.

mmpur_dynamic_cast l_schedule IM_SCHEDULE.

Then you can use the methods of IF_PURCHASE_ORDER_SCHEDULE_MM.

For example GET_ITEM to get the corresponding item.

Regards

Christian

0 Kudos

Hi,

Thanks for the answer but i have already done the Get method part iam struck with the set part as iam setting the shipping data in IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.

I have refer to the micro

mpur_transport_fields my_data_pai

my_data_pbo

ls_ekpv.

and i declared

DATA: my_data_pbo TYPE mepo1331,

my_data_pai TYPE mepo1331.

and the method call is like this

CALL METHOD l_if_item->set_shipping_data( ls_ekpv ).

when i call the set method its giving a null reference handler could you please help me in this regard

Regards

Vamsi