10-22-2010 10:15 PM
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.
10-23-2010 12:33 AM
Hi,
Your question sounds unclear, but the cursor stands in order type BSART.
10-23-2010 12:18 PM
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.....
10-23-2010 9:43 PM
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
10-24-2010 12:04 AM
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
10-25-2010 11:01 AM
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
10-25-2010 2:58 PM
10-25-2010 3:03 PM
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
10-25-2010 3:13 PM
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