Form design notes - prepopulating fields

When prepopulating fields for uploading (create or change), it is usually recommended to have the outputs of the display transaction or query mapped to the same fields as the input for the upload script (create and/or change script). This will reduce the number of fields needed to maintain in your form. This can be accomplished a number of different ways, so here are some general recommendations and tips on making it easier.

If you use the Search – Query feature in the same form,– the selection from the Search output can also populate the inputs needed to use the display script (e.g. material number, plant, etc.). You can also manually fill in the inputs if the user knows them and chooses to skip the search section.

  1. Launch InfoPath.
  2. In InfoPath, in the right-hand pane, check your field names. If fields are generated twice (usually designated by the "_1", "_2", etc. appended to the name), then delete the extras. You can also merge or delete any groupings (such as Inputs and Outputs). (This is just the logic InfoPath uses, but you can customize it to whatever it makes sense for you.)

Recommendations if you are using both Create and Change functionality in the same form (which is usually only recommended for Customer and Vendor Master):

  • Create a different section for each function. Each section can contain only the fields that are different and the web service button for the respective function.

    Note: You will still need to use an SAP Web service control in the form to run the display script, and therefore might want to add a separate section for the display functionality too.

For Material Master it is usually recommended to create separate forms for create and change due to the complexity of the Material Master and number of fields associated with it. Therefore, the create and change radio buttons will not be required.

If you choose not to map the output of the display scripts to the input of your create/change script as described, you can choose to have all different fields for each web service maintained separately in different sections on your form. (This would be a design decision based on your business needs.)

If you choose this option, it is recommended to use a rule to populate the desired section (create or change) based on the radio button selection. This active trigger will prepopulate the inputs for the create or change script. In addition, this option allows the form to show both the display fields and the create or change fields at the same time.

Tip: Use a Rule to set the default values so you can also change the default value where appropriate. It is possible to set defaults values by using the Text Box Properties but it does NOT allow the default value to be changed. In this case as you will need to modify some or all fields.