Application Development and Automation 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: 
Read only

During creating Purchase order

deepak_dhamat
Active Contributor
0 Likes
2,793

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

1 ACCEPTED SOLUTION
Read only

Peranandam
Contributor
0 Likes
2,593

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

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

18 REPLIES 18
Read only

SantoshKallem
Active Contributor
0 Likes
2,593

Are you creating Purchase order with BDC?

If so handle the logic to uncheck those in BDC.

regards,

santosh.

Read only

0 Likes
2,593

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 .

Read only

0 Likes
2,593

Hi Santosh ,

Can i create BDC to uncheck those fields and then use that BDC in user exit .

Regards

Deepak .

Read only

0 Likes
2,593

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.

Read only

0 Likes
2,593

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

Read only

Peranandam
Contributor
0 Likes
2,593

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.

Read only

0 Likes
2,593

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

Read only

0 Likes
2,593

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

Read only

0 Likes
2,593

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

Read only

Peranandam
Contributor
0 Likes
2,594

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

Read only

0 Likes
2,593

hi Peranandam,

We are working on 4.7 and not on ECC is there any solution in 4.7 .

Regards

Deepak

Read only

0 Likes
2,593

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

Read only

0 Likes
2,593

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 .

Read only

0 Likes
2,593

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 .

Read only

0 Likes
2,593

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

Read only

0 Likes
2,593

Solved

Read only

0 Likes
2,593

Hi nilanjana sinha,

I am having the same problem as yours.

How could you update the table, if it is only import parameters?

tks

Read only

0 Likes
2,593

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.