Skip to Content
avatar image
Former Member

Script button for add a condition in a sales order (set focus doesn't work correctly)

Add Condition in a sales order

Use Case à Transaction VA02 «Change Order»

Header > Tab > Conditions

Customer doesn’t want to scroll down to press the “add condition button”.

So, we offered to copy the button and add a script button on the topwith exactly the same function

Original button

Script button

If original button is pressed, cursor jumps into a new row and is blinking

So we want exactly the same function for our script button.

For that reason, we’ve recorded the function of the original button and added to the script button



  • After pressing the script button, position is changed as we like and focus is on a new row, but there is no cursor blinking.

We’ve also tried with

session.sendCommand('=V69A_KOAN')instead of findbyId

optional we tried the following

session.findById("wnd[0]").sendVKey(0);> without success

If I use the following script

session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP*/tabpT\\06/ssubSUBSCREEN_BODY:SAPLV69A:6201/tblSAPLV69ATCTRL_KONDITIONEN/ctxtKOMV-KSCHL[1,1]").setProperty("backgroundColor", "red");

Background color Red > is working > correct field is selected

So as an alternative solution, we entered the following

session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP*/tabpT\\06/ssubSUBSCREEN_BODY:SAPLV69A:6201/tblSAPLV69ATCTRL_KONDITIONEN/ctxtKOMV-KSCHL[1,1]").text = "|";

but, this couldn’t be a final “version”.

We’re looking forward to any advise from you!

Thanks and Kind Regards

6nalk.jpeg (13.3 kB)
9q8ji.jpeg (37.1 kB)
e90cu.jpeg (9.9 kB)
ywrjx.jpeg (18.7 kB)
ml3ym.png (12.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 19, 2017 at 03:08 PM

    Couldn't you just move the button, instead of trying to replicate its function?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Tamas

      Thanks for your reply

      Sure, we could move the button, but this wouldn't solve the problem, because the customer want to keep the original button on its position and add a new button as additional function with the same behaviour.

      Thanks and Regards