Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bad Length Error on Setting values in SAPGUIEdit
#1
Solved: 11 Years, 4 Months, 2 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
#2
Solved: 11 Years, 4 Months, 2 Weeks ago
How to deal with a scenario where input value is getting fetched from Excel sheet instead of hard-coding it in the code?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Setting a Value in SAPList nivdhi 5 7,351 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,689 09-07-2018, 11:21 AM
Last Post: srikanthbura
  Bad Request anujkabra1985 0 1,969 05-08-2015, 02:44 AM
Last Post: anujkabra1985
  Setting up QTP on Terminal Server timletap 0 2,398 09-24-2012, 06:56 PM
Last Post: timletap
  Run setting for each action for number of iterations blanchedsouza 1 3,073 07-23-2008, 05:04 PM
Last Post: blanchedsouza

Forum Jump:


Users browsing this thread: 2 Guest(s)