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: 

User Exit for PO before Saving

sudhakara_reddy4
Participant
0 Kudos

Hi, i have requirement like this, i have to automatically fill storage location in PO items before saving.

i. e if user enter or leave it blank in storage location input field in PO items, i have to save the PO based on some conditions automatically. i.e i will get storage locations based on some condition and i will update this storage location before saving POor creating PO.

i have tried chaning contnet in PO enhancement MM06E005, EXIT_SAPMM06E_012

but here the probelm is, this is not updating below tables back. i think this enhancement it self (MM06E005) seems to be not useful.

pot[]

ett[]

knt[]

can you please suggest which enhancement and user exits we can use to solve this issue.

thanks

Sudhakar

9 REPLIES 9

GauthamV
Active Contributor
0 Kudos

hi,

check these badi's.

ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order: Customer

ME_PROCESS_PO Enhancements for Processing Enjoy Purchase Order: Intern

0 Kudos

Can we achieve using user exist. unfortunately i have no idea on BADI's.

Former Member
0 Kudos

Try

EXIT_SAPMM06E_016

EXIT_SAPMM06E_017

These exits will hit as soon as you fill mandatory fields while creating PO and hit enter. Hope this helps your req

Thanks

Former Member
0 Kudos

Former Member
0 Kudos

Hi,

Use EXIT_SAPMM06E_016 , this will executed before save.

0 Kudos

Hi

if see code

*-Define Fields:

DATA: l_ci_ekpo LIKE ekpo_ci,

lt_usr_tekpo LIKE bekpo OCCURS 0,

lt_usr_teket LIKE beket OCCURS 0,

lt_usr_tekkn LIKE ekknu OCCURS 0,

lt_usr_tkomv LIKE tkomv OCCURS 0.

*-Copy Tables:

MOVE-CORRESPONDING ekpo TO l_ci_ekpo.

lt_usr_tekpo[] = pot[].

lt_usr_teket[] = ett[].

lt_usr_tekkn[] = knt[].

lt_usr_tkomv[] = tkomv[].

*-User Exit

CALL FUNCTION 'EXIT_SAPMM06E_016'

EXPORTING

i_ekpo = ekpo

i_ekpo_old = *ekpo

i_ekko = ekko

i_aktyp = aktyp

i_ci_ekpo = l_ci_ekpo

i_bstyp = ekko-bstyp

i_no_screen = im_no_screen

i_lfa1 = lfa1

i_lfm1 = lfm1

i_rekpo = rekpo

i_kekpo = kekpo

i_aekpo = aekpo

i_reban = reban

i_mt06e = mt06e

i_eina = *eina

i_eine = *eine

i_komp = komp

i_enj_call = l_enj_call

TABLES

tekpo = lt_usr_tekpo

teket = lt_usr_teket

tekkn = lt_usr_tekkn

tkomv = lt_usr_tkomv

EXCEPTIONS

OTHERS = 0.

in user exist i am changing storage location in table lt_usr_tekpo

but the problem is he is not moving back this internal table lt_usr_tekpo data to pot[].

this is my issues. in this all these user exist are like this.

how can i solve this issue.

0 Kudos

Hi,

I need to modify a field in structure in me21n.

I found the enhancement name MM06E005. I am using exit EXIT_SAPMM06E_017 to modify the structure i_komp.

In the above exit in tkomv structure it is kbetr field. This field is same as i_komp-netpr.

I am clearing the field.In debugging it is cleared. But while displaying it is not cleared.

Cannot find the problem.

How to modify the field..

Can u please help me in this issue..

Regards,

Jenifer

0 Kudos

You are clearing the value which is defined in IMPORTING parameter(I_KOMP-NETPR) of the FM.If you clear this value it does not make any sence because it will not go-out or recognized after FM execution finished.Therefore it is still showing with values.

Thanks for not opening the new thread.

0 Kudos

Hi,

Thanks for ur reply..

How can i clear i_komp-netpr field.

It is used in structure tkomv-kbetr. There also i cleared. but after execution of that include it does not make any sense.

Can u suggest me some solution to solve this issue.

Regards,

Jenifer