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: 

purchase user exit

Former Member
0 Kudos
218

hello,

I am trying to use EXIT_SAPMM06E_013, EXIT_SAPMM06E_016 and EXIT_SAPMM06E_017, for changing the bstae and kzabs fields of one purchase line, i modify tis fields in the table tekpo, but when i return to see the purchase it hasn´t remove the fields, can anybody help me please?

Thanks in advance

My code:

loop at tekpo.

if tekpo-mtart = 'ZSRV'.

clear tekpo-bstae.

clear tekpo-kzabs.

modify tekpo index sy-tabix.

endif.

endloop.

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos
122

Hi Carl,

Are you sure you have activated your project in CMOD transaction?

If not, go to CMOD transaction create a project for your enhancement and then activate the same.

To cross check, you can put a break point in your code and see if stops or not.

In case it doesn't stop even after you activate your project, then its a wrong exit.

Regards,

Ravi

7 REPLIES 7

former_member181962
Active Contributor
0 Kudos
123

Hi Carl,

Are you sure you have activated your project in CMOD transaction?

If not, go to CMOD transaction create a project for your enhancement and then activate the same.

To cross check, you can put a break point in your code and see if stops or not.

In case it doesn't stop even after you activate your project, then its a wrong exit.

Regards,

Ravi

0 Kudos
122

yes, i have activated the project, and it stops in my break, and it modifies the field in my function, but it has to changed in another place or simply not take in account my changes, do i need any flags?

Thaks in advance

0 Kudos
122

Sorry, i have found another contribution in the forum, that says that with these exits it is not allowed to change these fields:

Is it really?

Thanks in advance

<b>"You cannot modify any Purchase order fields (Header and Line)with these function exits EXIT_SAPMM06E_XXX in 4.6C. They can only be used for validations or outbound scenarios such as updating a custom table. Probably in later versions, you may be able to do that. When we had such a requirement, we ended up creating a custom enhancement."</b>

0 Kudos
122

Hi Carl son,

This means the exit you are using may not be the appropriate one.

You should find the one that triggers the last among the available exits and code your logic in that exit.

The code is perfectly alright and its only a matter of placing it in the correct exit.

Regards,

Ravi

0 Kudos
122

I think that all the users in MM06E005 enhancement is only for z fields, but i need to find out any user or enhancement for change fields in po, has anybody know if with the badi me_process_po_cust can i change the fields?

Thanks in advance

Former Member
0 Kudos
122

Hello Carl,

use the follwoing...

data: fld(50) value '(SAPMM06E)pot[]'.

field-symbols: <fs1> type table.

data: wa_ekpo like ekpo.

assign (fld) to <fs1>.

loop at <fs1> into wa_ekpo.

wa_ekpo-mtart = 'ZSRV'.

clear: wa_ekpo-bstae,

wa_ekpo-kzabs.

modify <fs1> from wa_ekpo index sy-tabix.

endloop.

Hope this works.

0 Kudos
122

Thank you very much, but i am going to try to find another soft solution before modifying fields that are not modificable in my user.

Thanks everybody for the effort!!