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

doubt in user exit

Former Member
0 Likes
889

hi,

while implementing SAP, generally one will write functionality for standard userexit programs or only in enhancement projects we will write our own funcationality to the user exit?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
866

As per client requiremnet ,we need to use logic ..

One simple example :

When you go Purchase order ,there should be account assignment category,

if account assignment category contains 'I' and then we need to use material group Starting with 'I' otherwise we need use error message.

I done this developemnt for client.

Create Project at CMOD and project name start with Z* and click on create button.

please assign enhancement - MM06E005

save the current screen.

now click on component and use Function module - EXIT_SAPMM06E_017

User exit includes starting with ZX*

within include you need to write the code -

Code follows -

  • Transport Request DEVK922305

IF I_EKPO-KNTTP = 'I'.

IF I_EKPO-MATKL+0(1) NE 'I'.

message e037(z01) with i_ekpo-ebelp.

ENDIF.

ENDIF.

IF I_EKPO-KNTTP = ''.

IF I_EKPO-MATKL+0(1) = 'I'.

message e038(z01) with i_ekpo-ebelp.

ENDIF.

ENDIF.

Reward Points if it is helpful

Thanks

Seshu

hi,

while implementing SAP, generally one will write functionality for standard userexit programs or only in enhancement projects we will write our own funcationality to the user exit?

7 REPLIES 7
Read only

Former Member
0 Likes
866

Hi,

It can be in the both.

The decision whether to use or not, about the user exit is depend on the business requirement.

Lets say any particalar business requirement is not solved by implementing standard SAP functionality then one need to use the user-exit at that point(if it is provided in that code).

Revert back if you have further query.

Reward points if useful.

Regards,

Atish

Read only

Former Member
0 Likes
867

As per client requiremnet ,we need to use logic ..

One simple example :

When you go Purchase order ,there should be account assignment category,

if account assignment category contains 'I' and then we need to use material group Starting with 'I' otherwise we need use error message.

I done this developemnt for client.

Create Project at CMOD and project name start with Z* and click on create button.

please assign enhancement - MM06E005

save the current screen.

now click on component and use Function module - EXIT_SAPMM06E_017

User exit includes starting with ZX*

within include you need to write the code -

Code follows -

  • Transport Request DEVK922305

IF I_EKPO-KNTTP = 'I'.

IF I_EKPO-MATKL+0(1) NE 'I'.

message e037(z01) with i_ekpo-ebelp.

ENDIF.

ENDIF.

IF I_EKPO-KNTTP = ''.

IF I_EKPO-MATKL+0(1) = 'I'.

message e038(z01) with i_ekpo-ebelp.

ENDIF.

ENDIF.

Reward Points if it is helpful

Thanks

Seshu

Read only

0 Likes
866

hi,

can u explain by this

USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_FILL_VBRK_VBRP

I mean what are the functionality i can add on my own on this..Plz Give some real time scenario?

can u first briefly explain what is the functionality of save document and prepare and then.. can u explain what can i add on this?

I awarded points for both of us.

Read only

0 Likes
866

Hi Praba,

I am not able to find out these FM (user-exits) in the system.

Can you please check and let me know the name of the same so that I may be able to help you.

Regards,

Atish

Read only

0 Likes
866

USEREXIT_SAVE_DOCUMENT_PREPARE

This user exit will trigger before saving sales order.

Let me tell you one example :

i want to validate customer on basis of country.

write the code between form and enform.

select single land1 from kna1 into kna1-land1

where kunnr = vbak-kunnr.

if kna1-land1 ne 'US'.

message 'Customer should be US Country'

endif

and USEREXIT_FILL_VBRK_VBRP

this user exit you can fille some values to vbrk vbrp like billing information

Thanks

Seshu

Read only

0 Likes
866

This is not function module and which is available at MV45AFZZ Includes,MV45AFZB,MV45AFZA . this form routine will trigger at sales order transaction like VA01,VA02,VA03

Read only

0 Likes
866

hi seshu,

thanks for ur answer once again.

I rewarded points again..