Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bad Length Error on Setting values in SAPGUIEdit
#1
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi All,

This is very common issue with SAP.

There are few fields in SAP which throws 'Bad Length' error on setting values into it during run time(using Script). However you will be able to set the values manually.

The problem is with the length assigned to such field during run session. The field length is usually smaller ,say 4, at runtime. So if you are trying to set a value of length more than 4, you will get this error.

I figured out a way of doing with using the below undocumented method.

Code:
SAPGuiSession("Session").SAPGuiWindow("Display Order").SAPGuiEdit("<FieldName>").Object.text="<Your Text>"

The above code worked fine for me.

Hope this will help few of you. Smile

Regards,
Ankesh
Reply


Messages In This Thread
Bad Length Error on Setting values in SAPGUIEdit - by Ankesh - 02-03-2012, 06:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Setting a Value in SAPList nivdhi 5 6,680 02-19-2020, 01:51 AM
Last Post: balahex
  Changing System Display Setting and Resolution using UFT or VB script or any code srikanthbura 0 2,429 09-07-2018, 11:21 AM
Last Post: srikanthbura
  Bad Request anujkabra1985 0 1,863 05-08-2015, 02:44 AM
Last Post: anujkabra1985
  Setting up QTP on Terminal Server timletap 0 2,279 09-24-2012, 06:56 PM
Last Post: timletap
  Run setting for each action for number of iterations blanchedsouza 1 2,870 07-23-2008, 05:04 PM
Last Post: blanchedsouza

Forum Jump:


Users browsing this thread: 1 Guest(s)