2009 May 26 5:01 AM
Hi alll ,
My Problem is while creating purchase order through purchase requisition
How to remove the tick mark against invoice reciept i.e (repos) and gr based i.e ( weber )
programatically .
Regards
Deepak
2009 May 26 11:21 AM
hi,
if you are working in ECC version you can easily resolve your porblem by implementing implecit enhancement.
the above specifed user exit is not called exactely.
implement two implecit enhancement in the following include program for resolving your problem
1.Go to inlcude program LMEGUICI5. in that we have one method implementaion. Here implement implecit enhancement at the beginning of the method like below.
METHOD transport_to_dynp.
ENHANCEMENT 50 ZREMOVE_FLAG. "active version
clear: mepo1317_pbo-repos,
mepo1317_pbo-webre,
mepo1317_pbo-erekz.
ENDENHANCEMENT.
mepo1317 = mepo1317_pbo.
ENDMETHOD.
2. Go to include program: MM06EFPO_POT_ETDRK and implement another implecit enhancement at the beginning of the following subroutine.
FORM pot_etdrk.
ENHANCEMENT 100 ZREMOVE_POT. "active version
loop at pot.
CLEAR: pot-repos,
pot-webre,
pot-erekz.
MODIFY pot.
ENDLOOP.
ENDENHANCEMENT.
endform.
If you need any information please let me know.
Regards,
Peranandam
2009 May 26 5:23 AM
Are you creating Purchase order with BDC?
If so handle the logic to uncheck those in BDC.
regards,
santosh.
2009 May 26 5:33 AM
hi Santosh ,
I am not using BDC i am using me57 and then it calls me21n in which there are multiple
user exit . i have added code in those userexit but still it brings that value of repos and webre from info table . And i dont want to update info table . as iwant to create pr_type ='ZFOC' i.e free material .
Regards
Deepak .
2009 May 26 5:43 AM
Hi Santosh ,
Can i create BDC to uncheck those fields and then use that BDC in user exit .
Regards
Deepak .
2009 May 26 6:12 AM
Hi,
After press SAVE button just find out user exit, in that Info record update field contains value X.
just change X to space.
Regards,
Ramesh.
2009 May 26 12:06 PM
I am not using BDC i am using me57 and then it calls me21n in which there are multiple
user exit . i have added code in those userexit but still it brings that value of repos and webre from info table . And i dont want to update info table . as iwant to create pr_type ='ZFOC' i.e free material .
as u said me21n is used in multiple user exits. find the exact one by setting break-point.
there write the condition specific for pr_type = 'ZFOC'.
include the dc logic for uncheck those check boxes.
regards.
santosh
2009 May 26 5:43 AM
HI,
you can clear the flag by implementing any one of the user exit.
EXIT_SAPMM06E_016
EXIT_SAPMM06E_017
EXIT_SAPMM06E_018
Cheers,
Regards,
Peranandam.
2009 May 26 5:51 AM
Hi.. i have used all user exit still not working .
it does removes or clear that fields
but before PBO it bring back that value .
i have used this code in user exit .
LOOP AT tekpo.
tekpo-repos = ''.
tekpo-webre = ''.
tekpo-erekz = ''.
MODIFY tekpo TRANSPORTING repos erekz webre.
ENDLOOP.
i_ekpo-repos = ''.
i_ekpo-webre = ''.
i_ekpo-erekz = ''.
Regards
deepak
2009 May 26 6:01 AM
Hi Deepak...
Use BDC to uncheck those boxes... Use SHDB transaction to do the recording of the transaction where you can pass the value as unchecked.. This will surely solve your problem..
Hope this helps
Regards,
Kanchan
2009 May 26 6:07 AM
Hi Kanchan ,
Even I am trying the same to create BDC but main problem will be , that how can once the PO is open and we will be creating bdc means passing same call transaction again that means
we are trying to open same PO again which is already open it will give Error that it is already open by other user
Regards
Deepak Dhamat
2009 May 26 11:21 AM
hi,
if you are working in ECC version you can easily resolve your porblem by implementing implecit enhancement.
the above specifed user exit is not called exactely.
implement two implecit enhancement in the following include program for resolving your problem
1.Go to inlcude program LMEGUICI5. in that we have one method implementaion. Here implement implecit enhancement at the beginning of the method like below.
METHOD transport_to_dynp.
ENHANCEMENT 50 ZREMOVE_FLAG. "active version
clear: mepo1317_pbo-repos,
mepo1317_pbo-webre,
mepo1317_pbo-erekz.
ENDENHANCEMENT.
mepo1317 = mepo1317_pbo.
ENDMETHOD.
2. Go to include program: MM06EFPO_POT_ETDRK and implement another implecit enhancement at the beginning of the following subroutine.
FORM pot_etdrk.
ENHANCEMENT 100 ZREMOVE_POT. "active version
loop at pot.
CLEAR: pot-repos,
pot-webre,
pot-erekz.
MODIFY pot.
ENDLOOP.
ENDENHANCEMENT.
endform.
If you need any information please let me know.
Regards,
Peranandam
2009 May 26 11:47 AM
hi Peranandam,
We are working on 4.7 and not on ECC is there any solution in 4.7 .
Regards
Deepak
2009 May 26 4:02 PM
Hi,
i have checked by implementing badi definiion ME_HOLD_PO. it is working.
implement BADI definition ME_HOLD_PO in se 19.
method IF_EX_ME_HOLD_PO~IS_ALLOWED .
break-point.
field-symbols: <fs> like line of im_bekpo.
loop at IM_BEKPO assigning <fs>.
*---here write logic
CLEAR: <fs>-repos,
<fs>-webre,
<fs>-erekz.
endloop.
endmethod.
let me know if you need any help.
Regards,
Peranandam
2009 May 27 6:40 AM
hi peranandam ,
Yes you were absolutely correct , it worked fine .
Acually i did'nt thought of using badi as try , any way i learn one thing from you that is approach towards problem .
you deserve full points .
Thank You very much .
Regards
Deepak .
2009 May 27 11:20 AM
hi all ,
my problem was to clear fields repos and webre when document type ='ZFOC' .
solution : using badi me_hold_po and method 'IS_allowed' using tran code se19
METHOD if_ex_me_hold_po~is_allowed .
FIELD-SYMBOLS: <fs> LIKE LINE OF im_bekpo.
IF im_ekko-bsart = 'ZFOC' .
LOOP AT im_bekpo ASSIGNING <fs>.
<fs>-repos = ''.
<fs>-webre = ''.
ENDLOOP.
ENDIF.
ENDMETHOD.
Regards
Deepak .
2011 May 19 12:31 PM
Hi Deepak,
Could you please tell me how did you manage to change the value of import parameter in this badi. I am trying to do the same for WEPOS field but it is giving me dump that is obvious as BEKPO is imported table in this Badi.
Regards,
Nilanjana
2011 May 19 12:58 PM
2011 Aug 05 9:07 PM
Hi nilanjana sinha,
I am having the same problem as yours.
How could you update the table, if it is only import parameters?
tks
2011 Aug 05 9:37 PM
Hi,
Solved too...
My code
I just assinged a FIELD-SYMBOL to table used on parameter
data: v_campo(30) type c value '(SAPLMEPO)POT[]'.
field-symbols: <fs_t_ekpo> type any table,
<fs_w_ekpo> type bekpo.
assign (v_campo) to <fs_t_ekpo>.
if im_ekko-bsart = 'ZUTI' .
loop at <fs_t_ekpo> assigning <fs_w_ekpo>.
<fs_w_ekpo>-wepos = ''.
endloop.
endif.