‎2010 Aug 03 2:07 PM
Hi All
In badi ME_PROCESS_REQ_CUST.
I want in check or process_item method to change one of the field values (EBAN structure)
if im_count = 1.
DATA: l_preq TYPE mereq_item.
CALL METHOD IM_ITEM->get_data
RECEIVING
re_data = l_preq.
If l_preq-MATNR IS INITIAL.
MOVE 'YES' TO l_preq-REVNO.
ELSE.
MOVE 'NO' TO l_preq-REVNO.
ENDIF.
DATA: ls_datax type MEREQ_ITEMX.
MOVE 'X' to ls_datax-revno.
CALL METHOD im_item->set_datax
EXPORTING
im_datax = ls_datax
.
CALL METHOD IM_ITEM->set_data
EXPORTING
im_data = l_preq.
endif.
This is my code in process item.
However the set_data method does not store the new value set.
I marked the field for update with set_datax. And tried without this method.
Anny1 got a clue on this?
And the code is actually being fully executed.
I can't see what i'm doing wrong and i've been trying this for houres now...
Anny help would be welcome.
Regards,
Tim
Edited by: LeysTim on Aug 3, 2010 3:07 PM
‎2010 Aug 03 3:04 PM
‎2010 Aug 03 3:44 PM
Thank you for your feedback.
But if I can not modify standard fields there, can you tell me where i should place this piece of code?
Thanks in advandce
‎2010 Aug 03 3:59 PM
Hi Tym,
Could you please let me know the transaction code where you want to insert this code
Regards,
Antony Thomas
‎2010 Aug 03 4:19 PM
I need this for transactions
ME51N
ME52N
ME53N
ME54N
ME55
ME57
Kind regards,
Tim
‎2010 Aug 03 4:25 PM
Hi Tym,
Go to transaction SE24, class name CL_EXITHANDLER, go to methods, double click on method GET_INSTANCE.
Set a break point at
CALL METHOD cl_exithandler=>get_class_name_by_interface
EXPORTING
instance = instance
IMPORTING
class_name = class_name
CHANGING
exit_name = exit_name
EXCEPTIONS
no_reference = 1
no_interface_reference = 2
no_exit_interface = 3
data_incons_in_exit_managem = 4
class_not_implement_interface = 5
OTHERS = 6.
CASE sy-subrc.
Now run trasactions ME51N,ME52N,ME53N,ME54N,ME55,ME57
,your control will break at each BADI(If any), exit name and instance will give you the BADI details.
I think this is one of the simplest way.
Thanks and Regards,
Antony Thomas
‎2010 Aug 04 8:32 AM
Thank you for your reply,
I know how to find BADI's.
But I can not find one other then IF_EX_ME_PROCESS_REQ_CUST where I could put my code.
Best i Found is ME_PROCESS_REQ and I'll try to use that one now.
I'll keep you updated.
Update: I can not put my code there because it is standard SAP...
I can not add an implementing class there.
Anny further help would be welcome
Edited by: LeysTim on Aug 4, 2010 9:37 AM
Edited by: LeysTim on Aug 4, 2010 10:19 AM
‎2010 Aug 05 8:37 AM
I still couldn't find a way to solve this issue, i tried with custom field now but it is also not working...
Anny help / ideas?
‎2010 Aug 05 11:23 AM
Hi Tym,
I am Really sorry for this delayed reply, as I was bit nusy with some work..
I had done an analysys on this issue, and I am feeling like can you give a trial and error in imlementaion of BADI ME_PROCESS_REQ_CUST in method POST. In my last thread me only told you not to use it, but while going through the documentaion of this BADi I am feeling like this is the better one, but method should be POST. I think that particular thread wad misleading us.
Please check whether your required fields are available here in this method, as method CHECK and PROCESS_ITEM is not updating anythiing.
Another way is keep the curren code in PROCESS_ITEM, then chek the interface of POST.
Regards,
Keep me updated, will help you if Ican, dont have ME51n athourisation, so couldnt replicate the issue.
Regards,
Antony Thomas
‎2010 Aug 05 11:31 AM
Hi Tym,
I am Really sorry for this delayed reply, as I was bit busy with some work..
I had done an analysys on this issue, and I am feeling like can you give a trial and error in the implementaion of BADI ME_PROCESS_REQ_CUST in method POST. In my last thread me only told you not to use it, but while going through the documentaion of this BADi I am feeling like this is the better one, but method should be POST. I think that particular thread was misleading us.
Please check whether your required fields are available here in this method, as method CHECK and PROCESS_ITEM is not updating anythiing.
Another way is to keep the current code in PROCESS_ITEM, then chek the interface of POST, whether update indiacator is there or not!
Regards,
Keep me updated, will help you if I can, don't have ME51n authourisation, so couldn't replicate the issue.
Regards,
Antony Thomas
‎2010 Aug 20 8:29 AM
Problem is solved.
Could not be done from inside BADI in a proper way, used userexit instead.
‎2011 Sep 16 5:08 AM
Hi Leystim ,
Can you tell me in user exit where you have updated field value of EBAN .
regards
deepak
‎2011 Sep 27 11:22 AM
‎2021 Jun 01 8:48 AM
This thread is >10 years old but I stumbled across it on Google and thought I'd share that using the BAdI worked just fine for me in ECC EhP8.
method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_ITEM.
DATA(ls_item) = im_item->get_data( ).
ls_item-EKGRP = '105'.
im_item->set_data( ls_item ).
im_item->set_datax( VALUE MEREQ_ITEMX( EKGRP = 'X' ) ).
endmethod.