cancel
Showing results for 
Search instead for 
Did you mean: 

Setting values on system forms

Former Member
0 Kudos

Hi everybody,

I have to change dynamically, under certain conditions, some value on the Sales Order interface depending on user's selections. For example I could have to force the "authorized" checkbox on the "Logistic" tab folder or other UDF items in other folders.

-Setting values on the binded ORDR datasource (UDF or not UDF) is not allowed from the SDK because of "Item - The item is not a user-defined item".

-Setting the values directly on the UI item (i.e the checked property of a CheckBox) does not work when the tab folder is not Active.

Which is the right approach?

Many thanks.

Daniele

Accepted Solutions (1)

Accepted Solutions (1)

former_member201110
Active Contributor
0 Kudos

Hi Daniele,

As you can't write directly to the datasources on a system form, I typically use the following steps to change a value on a non-active tab:

1) Read the current pane level and store in a variable.

2) Freeze the form.

3) Call the click method of the folder object where the field I want to change is.

4) Change the value on the field using the item properties or methods.

5) Click on the folder object for the original pane level.

6) Unfreeze the form.

Depending on the form design, you might have to call the click method on a field on the original pane (or on a field that is available on all pane levels).

Kind Regards,

Owen

Former Member
0 Kudos

Hi Owen, thank you for your response.

Actually the solution you suggested is the only way I found to get closer to what I wanted to do.

I have to set lot of items and slowdowns and the graphical result (even freezing the form) is really not acceptable.

There is no other way?

Answers (1)

Answers (1)

Former Member
0 Kudos

There are only three "ways" to alter the database through a system form (believe me, I've tried everything I can think of):

  • UserDataSource - Intended to alter the contents of only one field
  • DBDataSource - Intended to load one entire recordset into a form
  • UI manipulation through code - a "hack", and as such, unsupported and very slow

As far as I know, that's it. And it's VERY limiting. It looks like SAP intended any kind of data alteration to happen directly at the database level, and there is very little ability to change this through the "form" except through the UI, which is as you've found, incredibly slow.

It would be nice if in some time in the future, SAP database objects could be manipulated easier in code, such as being able to cast them to temporary Visual Studio DataTables to be manipulated directly and then re-written back to the database with ease, but for now it looks like they REALLY want us to use their forms, their database structure, and their Screen Painter as much as possible.

It wouldn't be quite so frustrating, if they weren't so limiting in functionality. Que sera, sera... c'est la vie.

Former Member
0 Kudos

frustrating, isn't it?