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: 

Purchase Order Statistical Delivery Date changed automatically

former_member207480
Participant
0 Kudos

Hi,

In the purchase order, when I go to change the delivery date, the statistical delivery date changed automatically.

I do not want to change the statistical delivery date.

Is there any User Exit or BADI to validate this?

Please suggest the same.

Regards

Amol Khochare

1 ACCEPTED SOLUTION

atul_mohanty
Active Contributor
0 Kudos

Hi

Is the delivery date get copied to statistical delivery date ?

For validation, please check BADI - ME_PROCESS_PO_CUST and Method - PROCESS_ITEM

From the interface - IF_PURCHASE_ORDER_ITEM_MM use method GET_SCHEDULES and subsequently from the interface IF_PURCHASE_ORDER_SCHEDULE_MM use method - GET_DATA to get schedule line details.

Let us know, if it helps.

6 REPLIES 6

atul_mohanty
Active Contributor
0 Kudos

Hi

Is the delivery date get copied to statistical delivery date ?

For validation, please check BADI - ME_PROCESS_PO_CUST and Method - PROCESS_ITEM

From the interface - IF_PURCHASE_ORDER_ITEM_MM use method GET_SCHEDULES and subsequently from the interface IF_PURCHASE_ORDER_SCHEDULE_MM use method - GET_DATA to get schedule line details.

Let us know, if it helps.

0 Kudos

Hi,

Thanks Atul.

How to call the schdule details?

Regards

Amol Khochare

0 Kudos


BADI - ME_PROCESS_PO_CUST and Method - PROCESS_ITEM


In the above method of your implementation write the below code ,


Data :  li_schedule       TYPE purchase_order_schedules,

           lw_schedule       TYPE purchase_order_schedule,

            lw_po_schedule    TYPE  meposchedule,

CALL METHOD im_item->get_schedules

                 RECEIVING

                   re_schedules = li_schedule.

               IF li_schedule IS NOT INITIAL.

                 LOOP AT li_schedule INTO lw_schedule.

                   lif_schedule = lw_schedule-schedule.

                   CALL METHOD lif_schedule->get_data

                     RECEIVING

                       re_data = lw_po_schedule.

* Here you can check each schedule lines in lw_po_schedule

                ENDLOOP.

               ENDIF.

Let us know, if it helps.

0 Kudos

This message was moderated.

former_member207480
Participant
0 Kudos

Thanks for your coding. But, I have already assigned the logic and it is working.

Regards

Amol Khochare

0 Kudos

Hi,

I have implemented the BADI successfully with logic. But, everyday first time the logic does not work.

e.g. If I create purchase order and next day if I go to change the delivery date, the statistical delivery date get changed which should not be changed.

But, second time and then after the logic works and the date does not change.

I checked all these logic and settings but, why system does not apply the logic first time?

Please suggest the same.

Thanks and Regards

Amol Khochare