The DT Call
When a user brings up a form, right clicks in a drillable field, and clicks Drill, a DT call is made to the Drill Service. Some standard parameters are passed with this call. There are also a number of optional parameters that can be included to help narrow the return results. These parameters correspond to a form’s fields that have a "keynbr" attribute defined. For more information, see Definitions and Rules for Drill Rule Calls.
The result of a DT call is a KV call, one or more OV and OW calls, or a KV call and one or more OV and OW calls.
In the following calls, the _PDL and _RECSTOGET parameters may have different values, depending on the Lawson Environment being accessed and the user's settings.
Using the Detail Rule in an Empty Form
-
Bring up the form AC20.1 in Lawson Portal. The form should be empty.
-
Right click in the text box for the Activity field and click on "Drill". The following call is made to the Drill service:
TYP=DT&_PDL=APPS810&_SYS=AC&_TKN=AC20.1&FT1=&37=&HD2=0&37D=&98A=&98G=&98H=&_KNB=11P&_RECSTOGET=25
The FT1=&37=&H2=&37D=&98A=&98G=&98H=
portion of the query
string includes the preceding keynbrs for the Activity text field. All of these parameters
are the keynbr attribute values for fields that precede the Activity text field in the form
definition. These fields are of different types, including text, hidden, and out. Because
none of these fields have values, the keynbr parameters do not have values.
In the form definition, the keynbr attribute of the Activity text box has a value of "11P". Thus the _KNB parameter’s value in the DT call above is 11P, indicating that the Drill is being done on the Activity field.
To discover the rule corresponding to this _KNB value is a two-step process:
-
Make a call to the Data Service using the product line and the value of the _KNB parameter as keys, like:
Data/Erp?PROD=GEN&FILE=CFKEYNBR&KEY=APPS810=11P
-
Use the value returned in the CFKEYNBRNAME field (here it is POST-TO-ACTIVITY) to find the corresponding rule in the
$LAWDIR/productline/systemcodesrc/systemcode.sr
r file (here, the AC.sr file).
Searching for a SCRFLD of POST-TO-ACTIVITY may yield multiple rules, but since a DT call is being done, the type of rule to look for is a SCRDTL rule. In this case, there are two such rules:
DEFINE SCRDTL
|
"Activity" AC-ACV-D-0007 POST-TO-ACTIVITY ACACTIVITY ACVSET1 @CURSCRFLD |
DEFINE SCRDTL
|
"Status Of All Activities"
|
When the DT call is executed, it first gets the KV call, if one exists. In this case, it gets AC-ACV-D-0008. Drill then checks to see if any OV/OW calls can be made by verifying that there is a corresponding primary record. In this case, it does that by executing the database call that is represented by rule AC-ACV-D-0007.
PROD=APPS810&FILE=ACACTIVITY&INDEX=ACVSET1&KEY=
Since the KEYRNG is defined as @CURSCRFLD, it uses the value from the current field (in this case the empty Activity field corresponding to the _KNB parameter of 11P) as the key value for the database call. Since 11P is not a parameter in the DT call, the key value is empty. As a result, no primary record is found, so no OV/OW calls can be made. Thus the only thing returned is a KV call:
_TYP=KV&PDL=APPS810&SYS=AC&KNB=11P&RID=AC-ACV-D-0008
Lawson Portal executes this KV call, the results of which populate the Drill Explorer popup. Note the fields in the right pane correspond to the DSPFLDS defined in the SCRDTL rule AC-ACV-D-0008.
Using Detail Rule in a Non-Empty Form
-
On an empty AC20.1 form, right click in the text box for the Activity field and click on "SELECT".
-
From the popup window, select an Activity (for example, 05-DESIGN) to populate the Activity box. This causes the Activity Group field to be populated as well.
-
Right click on the populated Activity box and click on "Drill". The following DT call is made to the Drill service:
_TYP=DT&_PDL=APPS810&_SYS=AC&_TKN=AC20.1&FT1=&37=05MWO%20%20%20%20% 20%20%20%20%20%20&HD2=0&37D=&98A=&98G=&98H= &11P=05-DESIGN%20%20%20 %20%20%20&11D=05%20Design%20test%20%20%20%20%20%20%20%20%20%20%20 %20%20%20%20%20&98=USD%20%20&_KNB=11P&_RECSTOGET=25
%20
denotes empty
spaces and could be removed for readability. For example:
_TYP=DT&_PDL=APPS810&_SYS=AC&_TKN=AC20.1&FT1=&37=05MWO&HD2=0&37D=&98A=
&98G=&98H=&11P=05-DESIGN&11D=05%20Design%20test&98=USD%20%20&_KNB=11P&_
RECSTOGET=25
In this call, some of the Form Key Values (11P, 11D) are populated because they correspond to fields (Activity and Activity Group) that are populated.
In this case, since the _KNB is 11P (as in the Empty Form example above), the same KV call as above will be constructed. However, now when Drill checks to see if there is corresponding primary record, it will be able to supply a value for the KEYRNG in rule AC-ACV-D-0007. So the call to the database now looks like:
PROD=APPS810&FILE=ACACTIVITY&INDEX=ACVSET1&KEY=05-DESIGN
There is a record in the ACACTIVITY table corresponding to this call, so now Drill can proceed to build OV and OW calls. The resulting Drill Explorer window looks like:
The right pane displays the effect of the KV rule, and in the left pane, the OV/OW calls are represented.