cancel
Showing results for 
Search instead for 
Did you mean: 

Help reqd on USER EXIT

Former Member
0 Kudos

Hi all....

I got a new object in USER EXIT for my current impl project...

1st,i know that how to creat it in cmod but i desnt know how to do enhancement assignment and writing a code for the below requirement

my SD consultant req is......

IN VA01, the end user will able to enter(create std order) only 4 items(POSNR)

at a time as maximum....(should restrict it) and if while entering the 5th item,it throws an error msg and revert back it.....

the std program is "MV45AFZZ" ,here the enhancement assignment should be added in,inside the below sub-routine......as include program

"Form USEREXIT_SAVE_DOCUMENT_PREPARE"...

Endform..

Do u people know how to do it.....if anyone have done already...pls help on this by replying with sample codes and ur helps...

waiting for ur replies

thanks & regards

sankar

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks to u guys...

but pls wait for my rewards ...bcos just now im checking it...once i've done,will do my replies/response in points....sure wiil give u def....(2guys only replied for my actual message)

will come to u soon,if i have any queries...and do the needful for that also...

thanks

sankar

Former Member
0 Kudos

Hi,

These are standard enhancements available for VA01.

SDAPO001 Activating Sourcing Subitem Quantity Propagation

SDTRM001 Reschedule schedule lines without a new ATP check

V45A0001 Determine alternative materials for product selection

V45A0002 Predefine sold-to party in sales document

V45A0003 Collector for customer function modulpool MV45A

V45A0004 Copy packing proposal

V45E0001 Update the purchase order from the sales order

V45E0002 Data transfer in procurement elements (PRreq., assembly)

V45L0001 SD component supplier processing (customer enhancements)

V45P0001 SD customer function for cross-company code sales

V45S0001 Update sales document from configuration

V45S0003 MRP-relevance for incomplete configuration

V45S0004 Effectivity type in sales order

V45W0001 SD Service Management: Forward Contract Data to Item

V46H0001 SD Customer functions for resource-related billing

V60F0001 SD Billing plan (customer enhancement) diff. to billing plan

this can be checkit out in 'SMOD' and find out the user exits like screen, filed, funtionction exits etc under each enhancement which mentioned above.

Once if you find the user exit under one enhancement let suppose 'V60F0001' go to 'CMOD' and crete one project and click on create button.

then give the enhance ment name V60F0001 under the 'enhancement assign' componet

Then bydefault u will get all userexits available under this enhancement select one them a/c to your require ment press on one userexit and it enter the funtion exit and double click on 'INCLUDE' it ask to create press yes then write ur won code 'ACTIVATE' and come back and 'ACTIVATE' and come backe 'ACTIVATE' and come to initial screen ie 'CMOD' and press 'ACTIVATE' button.

this is the way how to create user exit.

There are some exit for checking order

User exits in the program MV45AFZZ :

  • USEREXIT_SAVE_DOCUMENT_PREPARE

Use this user exit to make certain changes or checks immediately before saving a document. It is the last possibility for changing or checking a document before posting.

The user exit is carried out at the beginning of the FORM routine BELEG_SICHERN.

User-Exits in program MV45AFZB :

  • USEREXIT_CHECK_VBAK

This user exit can be used to carry out additional checks (e.g. for completion) in the document header. The system could, for example, check whether certain shipping conditions are allowed for a particular customer group.

  • USEREXIT_CHECK_VBAP

This user exit can be used to carry out additional checks (e.g. for completion) at item level.

etc.

Look at User Exits in Sales Docuemnet Processing

<a href="http://">User Exits in Sales Docuemnet Processing</a>

<b>some of tips to find user exits :</b>

User Exits & Customer Exits :

User Exits: Executed with the help of user exits (these are subroutines reserved for customers that have been inserted in objects in the SAP namespace) 'hard-coded' at various points within SAP Repository objects.

Customer Exits :

1. Menu Exits: Menu exits add items to the pull down menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications. These special entries have function codes that begin with "+" (a plus sign).

2. Screen Exits: Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special sub screen areas on a standard R/3 screen and calling a customer sub screen from the standard screen’s flow logic.

it is called by call customer- sub screen

3.Function Module Exits :Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits. When you add a new menu item to a standard pulldown menu, you use a function module exit to define the actions that should take place once your menu is activated. Function module exits also control the data flow between standard programs and screen exit fields.

it is called by Call Customer- function

Go to SMOD and press F4 where you will get the options of screen, menu, function exits.

Go to SE81 select the module which you want to check and find the enhancement.

In IMG (SPRO), search for enhancements in interested area.

Go to the program or transaction and search for “CALL CUSTOMER-FUCTION” or “EXIT_<Progname>_nnn”

For screen exits go to screen in SE51/SE80 search for- “CALL CUSTOMER-SUBSCREEN..”

<b>Reward with points if helpful.</b>

Regards,

Vijay

Former Member
0 Kudos

Hi vijay krishna...

i dont know really how to work with these std enhancements....Do u know particularly...which one is correct to go for my requirement...

if u've done this already(the same req),pls fwd ur replies exactly....since im on critical stage to finish this out....

Sorry to trouble u...

thanks & regards

sankar

Former Member
0 Kudos

Hi vijay krishna,

as u said.....how to get the enhancement assignment or call the predefined/standard one for "USEREXIT_SAVE_DOCUMENT_PREPARE".

i.e., how to declare it in cmod....to entering the include program....

pls post ur replies on urgent basis

thanks & regards

sankar

former_member200338
Active Contributor
0 Kudos

Hi,

Goto the program MV45AFZZ in display mode. then press the enhacement button on the tool bar ( the button with curls). you will see the change in screen color.

Then goto the form USEREXIT_SAVE_DOCUMENT_PREPARE.

Right click and select enhacment implemention->create. you will get a popup showing lot of enhacments. if you want to create a new one, press create button. give some name. then select the enhacement name which you have given from the dialog box. An enhacement implemention wil be created like this.

Enhacement ztest "inactive version.

*

end enhacement.

Ztest is the name of the implementation which you have given. right click on ztest and select enhacement->change.

uncomment the * and write your code here.

once your coding is over click on activate button. once your enhancement is active you will get a active version near ur enhacement name

Reward points if usefull

Regards,

Niyaz

Former Member
0 Kudos

Hi Niyaz,

for me,after to enhancement mode....it says "In this mode, you can create implementations only" while clicking create in Enhancement implementation by right click....

what to do.....just i want to know.....have u did the same object/requirment at any time???if so,pls fwd me exactly and step by step basis....

i dont know these things....and really im on help!!!!

thanks & regards

sankar

former_member188827
Active Contributor
0 Kudos

try da following code in da form:

if vbap-posnr gt '000040'.

message 'error' type 'E'.

endif.