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.
Showing results for 
Search instead for 
Did you mean: 

Set cursor in a specific view of transaction MM01/MM02

Former Member
0 Kudos


We have to check a condition in the user-exit EXIT_SAPLMGMU_001, for transaction MM01/MM02, and if the condition fails the client wants to set the cursor in a specific field from a specific view. Is it possible? I tried to use the sentence SET CURSOR referenced to a remote program but it doesn't work.

Does anybody knows how to solve this problem?

Thanks in advance




Former Member
0 Kudos


I hope, you have read the documetation attached with this Standard Enhancement - MGA00001.




Where Is the Customer Exit - EXIT_SAPLMGMU_001 called?

The customer exit is in function module MATERIAL_UPDATE_ALL. The

function module checks the data for errors (logical relationships,

foreign keys, fixed domain values, and so on) when the material master

is updated.


o New fields

You can make checks possible for new fields of your own. These

checks must be identical to the checks that you carry out for your

new fields in online maintenance.

o Existing fields

For existing fields, you can extend and intensify the checks.

You can also change data for descriptions and general material data

(MARA). For example, the descriptions can be generated from attributes

of the material.


You cannot bypass existing checks.

Interface to Application

The respective data of the current logical transaction is contained in

the structures, for example, in structure WMARA for MARA. Nonrelevant

structures are transferred with their initial values.

General material data that can be changed (CMARA) has the structure

MARU. This MARA view contains fewer internal fields than MARA itself. If

WMARA is filled, CMARA is also filled when accessed.

The customer exit contains the exception APPLICATION_ERROR for your

self-defined error situations.

Using the language element MESSAGE .. RAISING APPLICATION_ERROR, you can

terminate the current (logical) transaction and display your message in

the log.


Also, I guess, have you put some code in the Includes available with the EXITS and then activated the Project in CMOD.

<b>Reward points</b>


Former Member
0 Kudos

Hello Maribel,

it is possible ,i done similar requirement.

SELECT SINGLE ean11 INTO wa_ean11 FROM mean

WHERE meinh = 'LB' AND

matnr = wmarc-matnr.

IF sy-subrc = 0.

IF wa_ean11+0(1) <> 'W'.

SET PARAMETER ID 'MAT_ERROR' FIELD 'E032'. -> this will put partcular view

MESSAGE e032(z01).


field 'E032' -> message number

Reward Points if it is helpful.



Former Member
0 Kudos

Guys, I think you're on the wrong track! My guess is that Maribel is talking about something else...

She wants to know if there is a way of <b>setting/placing the cursor on a specific field</b> of the MM01/02 transaction. For example, if you would like the cursor to be placed on the "Material Description" field of the basic data view, how would it be done?

It is usually done with the SET CURSOR command, but it seems that Maribel tried it and it doesn't work...

0 Kudos

Maribel... something not quite orthodox which you may try in your user exit is calling the transaction again using batch input.

There you may specify where you want the cursor to be placed..

Reward points if you find it helpfull please



Former Member
0 Kudos


Can you tell me which version of SAP you are working in ?



0 Kudos

I'm working in 'SAP R/3 Enterprise'.

Active Contributor
0 Kudos

Check this FM : MATERIAL_BTCI_SELECTION_NEW to find the views of a material.