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: 

Return to main screen after validation by ME_PURCHDOC_POSTED

Former Member
0 Kudos

I tried to validate whether batch is input on the PO by using the BADI ME_PURCHDOC_POSTED~POSTED method.

I can successfully stop the posting if no batch is input for line item, however, message "PO XXXX is changed" is still issued. How can I return to main screen, so that user can change the input and post again?

Thanks,

Vicki

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

you are just checking the BADI which executes at the last. so try with this BADI ME_PROCESS_PO_CUST , there you can use CHECK method.

12 REPLIES 12

former_member181995
Active Contributor
0 Kudos

If your condition faild bot batch than you may stop processing by issued some error message to user.

Amit.

0 Kudos

If i issued error message, another message prompted after my message.

"System error: MB_POSTED error", so I asked if I can return to the main screen if validation failed.

0 Kudos

Than i think as per you business requirement you need to check on at header or item level not at the time of document posted.

please try with same code in BADi:ME_PROCESS_PO_CUST it will trigger at onlymain screen of me21n. fire message here.

Amit.

Former Member
0 Kudos

Hello ,

for validation u can try BADI ME_PROCESS_PO , check its sample code .

regards

prabhu

0 Kudos

>

> for validation u can try BADI ME_PROCESS_PO , check its sample code .

I'm in ECC and i cannot use BADI ME_PROCESS_PO anymore because of definition is only designated for internal SAP usage.

Amit.

former_member188685
Active Contributor
0 Kudos

you are just checking the BADI which executes at the last. so try with this BADI ME_PROCESS_PO_CUST , there you can use CHECK method.

0 Kudos

there is not enough infomration in ME_PROCESS_PO_CUST

I need the data from EKET.

0 Kudos

Than use Method:PROCESS_SCHEDULE

PS:this is from SAP documention >>If you wish to mark a schedule (line) as invalid, use the INVALIDATE() method of the IF_PURCHASE_ORDER_SCHEDULE_MM interface.

0 Kudos

there is , But it will hidden,

from the header object read the item objects -> then read the schedule lines data.

IM_HEADER->GET_ITEMS, now loop each item object and get the schedules information using the method item->GET_SCHEDULES

0 Kudos

The problem is solved.

Thanks.

0 Kudos

Hi,

I have also same issue.

How could solve this?

Plz explain in detail

Thanks

0 Kudos

as mentioned, can write code in PROCESS_SCHEDULE

but I write code in PROCESS_HEADER and get_items() and get_schedules()

The following link may help