2016 Jan 20 5:59 AM
While creating PO in ME21N , I set value of over delivery tolerance to 10.0 % by using BAdi- ME_PROCESS_PO_CUST....... Its successfully getting updated only if I press enter button somewhere on screen before saving the PO..... But If i directly save the PO without pressing Enter button then its not updating desired 10.0 % in ME23N..... Its showing Default 0.0 %..... Can anybody provide the solution.....
Regards,
Akash D
2016 Jan 20 3:56 PM
Which method doid you use in ME_PROCESS_PO_CUST (PROCESS_SCHEDULE, PROCESS_ITEM, CHECK?)
Regards,
Raymond
2016 Jan 21 6:58 AM
I used method- PROCESS_ITEM, also I am attaching the code written for the same, Kindly check and assist with the same.
2016 Jan 21 7:13 AM
Why did you redefine/reassign im_item with a local lo_item (which MM class) im_item already supports some get_data and set_data methods?
Hint: Also don't use hard-coded transaction codes, but define an instance attribute TRTYP (type TRTYP) in the implementing class and set it in OPEN method (me->trtyp = im_trtyp.) so you will be able to check it later in any method (e.g. check me->trtyp ne 'A'. Check values of standard domain TRTYP)
Regards,
Raymond
2016 Feb 04 11:59 AM
2016 Jan 21 3:54 AM
Hi Akash,
U need to implement the logic in method process_item .
Regards
Pallavi
2016 Jan 21 7:01 AM
I used the same method, also its getting displayed on screen of ME21N, but wen you save it and check the same PO in ME23N , Its showing again 0.0 %
I have attached the code above for reference.......
I feel the value only gets set on the screen, not saved ...!!
2016 Jan 21 8:03 AM
Hi Akash,
As per my understanding,the requirement is for purchase org 1100 which is to maintain 'over delivery tolerance as 10.00%.'
1.You dont need to check on the TCODES,
2.casting/reassigning im_item to local reference is also not requried
Below steps can be useful
*--PO Header and Items
st_header = im_item->get_header( ).
st_poheader = st_header->get_data( ).
st_poitem = im_item->get_data( ).
Now check purchase org is 1100
if st_poheader-ekorg = 1100
if 'over delivery tolerance is <> 10.00%.'
*--Raise error message
l_msgv1 = ''Allowed over delivery tolerance is 10%'
CONCATENATE '(Item:' st_poitem-ebelp ')'
INTO l_msgv2.
mmpur_message_forced 'E' 'ME' '303'
l_msgv1 l_msgv2 l_msgv3 l_msgv4.
CALL METHOD im_item->invalidate( ).
*-->then change 'over delivery tolerance as 10.00%.'
using im_item->set_data( ).
endif.
endif.
Hope this is helpful
Regards
Pallavi
2016 Jan 21 8:48 AM
Pallavi, got your point, can you please elaborate the step for changing overdelivery tolerance to 10.0%... it would be great if you specify the exact syntax for it...
Thanks in advance
2016 Jan 21 9:11 AM
Hi Akash,
I think it’s just the same code which you wrote, but let me do this here
*-->then change 'over delivery tolerance as 10.00%.'
st_item-uebto = '10'.
call method im_item->set_data( )
exporting
im_item = st_item.
Hope this is helpful.
Regards
Pallavi