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: 

Cursor position on the SAP standard screen.

Former Member
0 Kudos

Hello SAP experts,

How do we know, where the cursor is, on the screen, PO (ME21N). I know this sounds like a basic question, but am not able to find any help on this. I have tried to loop at screen and check for the fieldname, but that worked for me only in the reports. I want to enter data on the sap screens and based on which field the cursor is positioned, I want to carryout certain actions.

Could anyone help me. If anything like this was answered, please help me with the link.

Thanks v much,

Sorab.

8 REPLIES 8

Former Member
0 Kudos

Hi,

Your question sounds unclear, but the cursor stands in order type BSART.

0 Kudos

go to Tcode SHDB and do the recording of the transactin u want... like VA21 or whatever...

in recording u ll easily come to know where is the cursor on screen.....

Former Member
0 Kudos

Thank you for your answers. Here:

Let me make it more clear. On the transaction like VA01 OR ME21N, when the user enters data, based on the field the user is keying in the data for , I want to do some validation ( which I am trying to through a BADI ), but since a different validation is done for different fields, I am trying to find which field user is actively working with, in the BADI.

Hope I am clear now. Do let me know otherwise.

Thanks much,

Sorab

0 Kudos

Hi

In order to validate data you can validate it on save in the badi.. To get cursor position a command is there with get cursor press f1 and read the documentation on how to use it.

Nabheet

0 Kudos

Hello Nabheet,

I am looking for the command. Which command is that. I know that, I can get the screen parameters by pressing F1 and looking at its technical data. I have the program name and screen field name which I need to compare with. What I do not know is, the left side parameter(command?). In the BADI , when I say,

if <command name> = 'SCREEN FIELDNAME'

....

endif.

Can you tell me, what the command name will be?

Thank you,

Sorab

0 Kudos

Did anyone get a chance to look at it?

Sorab

0 Kudos

Hello,

Sorry for the late reply. Actaully i was thinking your badi can trigger at save how will you know the cursors and all. Can you please explain in detail what do u want to achieve for the time being taking one or two field into account.

Nabheet

0 Kudos

Hi Nabheet ,

Thanks for your response. This is what I am trying to do.

On the ME21N transaction, in the item overview, when I enter an account assignment category(KNTTP) , I want to bring a validated material group(MATKL) help list for the user (corresponding to the acct.asgmt cat.) when they are on the material group field.

Let me know, if I don't make sense.

Thanks,

Sorab