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: 

Set "over delivery tolerance" value to default value 10.0 % in ME23N Screen

0 Kudos
850

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

9 REPLIES 9

raymond_giuseppi
Active Contributor
0 Kudos
541

Which method doid you use in ME_PROCESS_PO_CUST (PROCESS_SCHEDULE, PROCESS_ITEM, CHECK?)


Regards,

Raymond

0 Kudos
541

I used method-  PROCESS_ITEM, also I am attaching the code written for the same, Kindly check and assist with the same.

0 Kudos
541

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

0 Kudos
541

Hi Raymond... Need your help regarding the link given below, please let me know if you can look into it....

Former Member
0 Kudos
541

Hi Akash,

U need to implement the logic in method process_item .

Regards

Pallavi

0 Kudos
541

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 ...!!

0 Kudos
541

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

0 Kudos
541

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

0 Kudos
541

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