Using Formatted Search on SAP B1
Using Formatted Search on SAP B1
Format SAP
SAP B1 provides complete fields in its modules. But the need for additional fields according to the company's internal needs is certainly inevitable. SAP B1 has anticipated this by providing UDF facilities (regarding UDF you can read in my previous article on #UDT & UDF on SAP B1). On this occasion I will discuss how to fill in fields automatically by using the Formatted Search (FS) facility. We can use FS to fill in the default SAP B1 fields or our own custom fields (UDF).
This automatic field filling is done to simplify and speed up the data input process. For example, we have a project with the code "PROJECT-1", the fields related to the project (eg area, project area, company, document format, etc.) will be automatically filled after we press the Tab key (note SAP B1 use the Tab key to move between fields, not the Enter key).
FS can be used for calculation operations or copy the contents of a field to another field. For example in the Banking Module -> Outgoing Payment, all we need to do is write Remarks and then press the Tab key automatically, the contents will be copied into the Journal Remarks field below. In the following simple example we will implement it. Follow the steps below:
- Make a simple query using a query generator (about the details of how to use the query generator you can read in my previous post in #Name Table & Field in SAP B1 - Part1), write the query in the Select column: SELECT LEFT ($ [OVPM.Comments ], 50), then click the Execute button and ignore the error message that appears. Save the query by clicking the Save button and name it FS_JURNALREMARKS.
- Place the mouse cursor position in the Journal Remarks field by clicking on the field, then pressing Alt + Shift + F2 together, the "User Defined Values - Setup" dialog form is displayed
- Choose the third option which is "Search in Existing User-Defined Values according to Saved Query"
- Press the "Open Saved Query" button then look for the query that you created (FS_JURNALREMARKS) then click OK.
- The "User-Defined Values - Setup" dialog form is displayed again with the query selected. Check the "Auto Refresh When Field Changes" option and in the drop down box look for the "Remarks" field, click the "Display Saved User-Defined Values" option then click the Update button.
When you click in the Journal Remarks field there will be a "magnifying glass" sign that indicates that the field is an FS. To try it write a word such as "Testing FS" then press the Tab key, the contents will automatically be copied in the Journal Remarks field below.
Hopefully useful, enjoy