Using the Component Interface Software Development Kit

This chapter discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding the Component Interface SDK

The PeopleSoft Integration SDK (Software Development Kit) is installed with the PeopleTools installation. It provides resources to assist you in developing and testing component interface-based integration between PeopleSoft and third-party applications. The SDK contains sample definitions with data and source code. For easy identification, all of the definition names start with SDK_. The SDK is installed in the PeopleSoft home directory (PS_HOME) under sdk.

Note. The SDK definitions and associated data are for development purposes only and should not be used in a production environment.

Click to jump to top of pageClick to jump to parent topicComponent Interface SDK Samples

Programming samples for the component interface SDK_BUS_EXP are part of the SDK. The samples are available in four languages—Java, C++, VBA, and ASP.

The component interface source code is located in the <PS_HOME>\SDK\PSCOMPINTFC directory.

Note. The source files mentioned in this section are located relative to the installed PeopleSoft home directory (PS_HOME).

Click to jump to top of pageClick to jump to parent topicSetting SDK Prerequisites

To call a PeopleSoft component interface, you must have:

Click to jump to top of pageClick to jump to parent topicUsing the SDK_BUS_EXPENSES Test Page

The SDK includes a component interface, called SDK_BUS_EXP, which is part of the sample development project and is delivered with the SDK. It is built on the component SDK_CI_SAMPLES, which contains the page SDK_BUS_EXPENSES. The page exposes information about employee business expenses for external access.

Note. The component SDK_CI_SAMPLES is a sample and is not for business use.

To test the SDK_BUS_EXPENSES test page:

  1. Provide access to the SDK_CI_SAMPLES component, using PeopleTools security.

  2. Select PeopleTools SDK, PeopleTools SDK, Use, SDK CI Samples.

  3. Search for and select an employee ID.

Click to jump to top of pageClick to jump to parent topicTesting the SDK_BUS_EXP

To test the SDK_BUS_EXP component interface:

  1. View the component interface definition through the PeopleSoft Application Designer.

  2. Test the component interface definition, using the component interface tester.

Click to jump to top of pageClick to jump to parent topicUsing the SDK Java Sample

The component interface sample program for Java is provided as part of the component interface SDK, located in <PS_HOME>\sdk\pscompintfc\src\java\samples\sdk_bus_exp.

The Java source code for the sample is in the following file:

sdk_bus_exp.java

Before you run the sample, you must build the APIs and set up the Java environment.

Click to jump to top of pageClick to jump to parent topicRunning the Java Sample

To run the compiled Java component interface sample:

  1. In a DOS window, change directories to the location of the Java sdk_bus_exp directory cd %PS_HOME%\sdk\pscompintfc\src\java\samples

  2. Launch the executable with javasdk_bus_exp.sdk_bus_exp.

    You are prompted for parameters one at a time.

  3. At each prompt, enter the appropriate value and press Enter.

    Select option 1 to sign in. You are then prompted to provide the connect information.

    If the connect succeeds, a menu appears where you can perform Get or Find functions.

  4. Get details for an employee.

    Select option 1 to get details for an employee. You are then prompted with the different modes and the employee ID for which you want to display information. Enter the employee ID 8001 and press Enter. This presents you with the level 0 data and the options that you can perform.

  5. Select a business expense period.

    Select option 8 to select a business expense period. Selecting this option displays a list of available business expense periods for the selected employee.

    Select the expense period that you want to work with.

  6. Select a business expense detail.

    Select option 18 to select a business expense detail within the selected business expense period. Selecting this option displays a list of available business expense details within the selected business expense periods.

Click to jump to top of pageClick to jump to parent topicUnderstanding the Java Sample Code

The following listings of code are taken from the Java sample program, sdk_bus_exp.java. (The code has been edited for length.)

Import all the required classes:

package sdk_bus_exp; import java.io.*; import java.util.*; import psft.pt8.joa.*; import PeopleSoft.Generated.CompIntfc.*; public class sdk_bus_exp { .....

Declare all the required objects. Only one active period and one active detail record are possible at any time. Users are prompted to select the needed values if they are not active. oSdkBusExpCollection is the collection object for the root, SDK_BUS_EXP, and oSdkBusExp is an item object for that collection:

oSdkBusExpPerCollection is the collection object for level 1, SDK_BUS_EXP_PER, and oSdkBusExpPer is an item object for that collection:

oSdkBusExpDtlCollection is the collection object for level 2, SDK_BUS_EXP_PER_DTL. oSdkBusExpDtl is an item object for that collection.

The CompIntfPropInfoCollection object is used to access the structure of a component interface. It is not specific to a component interface.

Declare the PeopleSoft session object.

The function executeMethod is used to launch the appropriate method depending upon the user input (nMethodIn). Options 1 to 5 are executed on the component interface itself. Options 6 to 15 are executed on the SDK_BUS_EXP_PER collection, and options 16 to 24 are executed on the SDK_BUS_EXP_DTL collection.

Option 1. Save any changes made to the component interface so far in this program.

Option 2. Cancel any changes made to the component interface so far in this program.

Option 3. The GetPropertyByName method is used to get the value of a property at the specified level. The getSdkBusExpPropertyName() function gets a list of all properties of the component interface. It lists only those properties that are relevant at this level and prompts the user to select a property. The selected property name is passed to the GetPropertyByName method to get the value of the property:

Option 4. The GetPropertyInfoByName method returns information about the selected property. The getSdkBusExpPropertyName() function is used to prompt the user for appropriate properties at this level. The selected property is returned into the variable tempName.

Option 5. InsertBusExpDtlDefaults is the user-defined method of the SDK_BUS_EXP component interface.

Option 6. Activate a business expense period by selecting option 8 before using this option. The GetPropertyByName method is used to get the value of a property at the specified level. The getSdkBusExpPropertyName() function gets a list of all properties of the component interface. It lists only those properties that are relevant at this level and prompts the user to select a property. The selected property name is passed to the GetPropertyByName method to get the value of the property.

Option 7. Activate a business expense period by selecting option 8. Then the GetPropertyByName method is used to get the value of a property at the specified level. The getSdkBusExpPropertyName() function gets a list of all properties of the component interface. It lists only those properties that are relevant at this level and prompts the user to select a property. The selected property name is passed to the GetPropertyInfoByName method, which returns an CompoIntfcPropertyInfo object. The function printoutPropertyInfor() is passed in this object to display the information, such as Format, Type, Length, and so on, for the property.

Option 8. Item for collection SDK_BUS_EXP_PER sets the pointer to the item number selected by the user. It also prompts the user for alternate values and then saves the new values. The updateSdkBusExpPer() function is used to set and save these new values.

Option 9. The function insertSdkBusExpPer is used to enable the user to add a new item in the SDK_BUS_EXP_PER collection. This function is discussed later in this section.

Option 10. The DeleteItem method is used to delete items from a collection. The user is prompted with a list of business expense periods by the function selectSdkBusExpPer(). The selected value is passed to the method DeleteItem:

Option 12. The CurrentItem method is used to get the current item for the specified collection.

Option 13. The CurrentItemNum method is used to number the current item for the specified collection.

Options 6 to 15 are for the SDK_BUS_EXP_PER collection, and options 16 to 25 are for the SDK_BUS_EXP_DTL collection. The logic used in the corresponding options of these collections is identical.

The getSdkBusExpPer() function lists business expense periods for the selected employee.

The updateSdkBusExpPer() function lists business expense periods for the selected employee.

The insertSdkBusExpPer() function lists business expense periods for the selected employee.

The functions getSdkBusExpPer, updateSdkBusExpPer, and insertSdkBusExpPer on the SDK_BUS_EXP_PER collection are identical to the functions getSdkBusExpDtl, updateSdkBusExpDtl, and insertSdkBusExpDtl.

This is the main method. It performs such functions as starting the session, getting the component interface, and disconnecting:

public static final void main(String[] args)System.out.println(" "); System.out.println("\t 1) Sign In "); System.out.println("\t q) Quit "); System.out.println(" "); System.out.print("Command to execute (1, q) [1]: "); charTemp = readCharacter(); switch (charTemp) {case 'q':case 'Q':..... disconnectFromAppServer(); return; default: getConnectParameters(); if (connectToAppServer()) { oSdkBusExp = (ISdkBusExp) oSession.getCompIntfc(m_strCIName); while (getKeyType()) { methodInt = selectMethod(); while (methodInt != 0) { executeMethod(methodInt); if (methodInt == 2) { methodInt = 0; } else { methodInt = selectMethod(); .....

Click to jump to top of pageClick to jump to parent topicUsing the SDK C++ Sample

The component interface sample program for C/C++ is provided as part of the component interface SDK, located in <PS_HOME>\sdk\pscompintfc\src\cpp\samples\sdk_bus_exp.

The C++ source code for the sample is in the following file:

sdk_bus_exp\sdk_bus_exp.cpp

Before you run the sample, you must build the APIs and set up the C++ environment.

Click to jump to top of pageClick to jump to parent topicBuilding the C++ Sample

To build the C++ component interface sample:

  1. Open the sdk_bus_exp workspace in the Microsoft Visual C++ editor.

  2. Build the project by selecting Build, Rebuild All.

Click to jump to top of pageClick to jump to parent topicRunning the SDK C++ Sample

To run the compiled C++ component interface sample:

  1. In a DOS window, change directories to the location of the C++ sdk_bus_exp directory, cd%PS_HOME%\sdk\pscompintfc\src\C++\samples\sdk_bus_exp\Debug

  2. Launch the executable with sdk_bus_exp

    You’ll be prompted for parameters one at a time.

  3. At each prompt, enter the appropriate value and press Enter:

    Select Option 1 to sign in. You are then prompted to provide the connect information.

    If the connect succeeds, a menu appears where you can perform Get or Find functions.

  4. Get details for an employee.

    Select option 1 to get details for an employee. You are then prompted with the different modes and the employee ID for which you want to display information.

    Enter the employee ID 8001 and press Enter. This presents you with the level 0 data and the options that you can perform.

  5. Select a business expense period.

    Select option 8 to select a business expense period. Selecting this option displays a list of available business expense periods for the selected employee.

    Select the expense period that you want to work with.

  6. Select a business expense detail.

    Select option 18 to select a business expense detail within the selected business expense period. Selecting this option displays a list of available business expense details within the selected business expense periods.

Click to jump to top of pageClick to jump to parent topicUnderstanding the C++ Sample Code

The following listings of code are taken from the C++ sample program, sdk_bus_exp.cpp. (The code has been edited for length.)

Include all the headers

#ifdef PS_WIN32 #include "stdafx.h" #endif #include "cidef.h" #include "apiadapterdef.h" #include "PSApiExternalLib.h" #include "PSApiAdapterInter.h" #include "PeopleSoft_PeopleSoft_i.h" #include <stdio.h> #include <stdlib.h> #include <iostream.h> #include <wchar.h>

Declare the PeopleSoft session handle.

HPSAPI_SESSION hSession;

Declare all the required objects. Only one active period and one active detail record are possible at any time. The user is prompted to select the needed values if they are not active. hSdkBusExpCollection is the collection handle for the root, and SDK_BUS_EXP. hSdkBusExp is an item handle for that collection.

hSdkBusExpPerCollection is the collection handle for level 1, SDK_BUS_EXP_PER. hSdkBusExpPer is an item handle for that collection.

hSdkBusExpDtlCollection is the collection handle for level 2, SDK_BUS_EXP_PER_DTL. hSdkBusExpDtl is an item handle for that collection.

The function executeMethod is used to launch the appropriate method depending upon the user input (nMethodIn), and options 16 to 24 are executed on the SDK_BUS_EXP_DTL collection.

Option 1. Save any changes made to the component interface so far in this program.

Option 2. Cancel any changes made to the component interface so far in this program.

Option 3. The GetPropertyByName function is used to get the value of a property at the specified level. The user selects a property from the list. The selected property name is passed to the GetPropertyByName method, which returns a handle. This handle is passed to the function PSApiGetStringValue() to get the value of the property:

Option 4. GetPropertyInfoByName returns information about the selected property. The user selects a property from the list. The selected property name is passed to GetPropertyInfoByName method to get a handle to hCompIntfcPropertyInfo. This handle is then passed to the function getPropertyInfo() to display the property information.

Option 5. InsertBusExpDtlDefaults is the user-defined method of the SDK_BUS_EXP component interface.

Option 6. Activate a business expense period by selecting option 8 before using this option. The user selects a property from the list provided. The selected property name is passed to the GetPropertyByName method. The method returns a handle that is passed to the function PSApiGetFloatValue for numeric properties, or to PSApiGetStringValue for string properties, to return the actual value.

Option 7. Activate a business expense period by selecting option 8 before using this option. The user selects a property from the list provided. The selected property name is passed to the GetPropertyInfoByName method, which returns a HPSAPI_COMPINTFCPROPERTYINFO handle. This handle is passed to the function getPropertyInfo to display the information, such as Format, Type, Length, and so on, for the property.

Option 8. Item for collection SDK_BUS_EXP_PER sets the pointer to the item number selected by the user. It also prompts the user for alternate values and then saves the new values. The updateBusinessExpensePeriod () function is used to set and save these new values.

Option 9. The function insertBusinessExpensePeriod is used to enable the user to add a new item in the SDK_BUS_EXP_PER collection. This function is discussed later in this section.

Option 10. The DeleteItem method is used to delete items from a collection. The user is prompted with a list of business expense periods by the function selectBusinessExpensePeriod (). The selected value is passed to the method DeleteItem.

Option 12. The CurrentItem method is used to get the current item for the specified collection.

Option 13. The CurrentItemNum method is used to number of the current item for the specified collection.

Options 6 to 15 are for the SDK_BUS_EXP_PER collection, and options 16 to 25 are for the SDK_BUS_EXP_DTL collection. The logic used in the corresponding options of these collections is identical.

Click to jump to top of pageClick to jump to parent topicUsing the SDK COM Excel Sample

The component interface sample program for Microsoft Excel is provided as part of the component interface SDK, located in <PS_HOME>\sdk\pscompintfc\src\com\samples\vba.

The Visual Basic source code for the sample is in the following file:

sdk_bus_exp.xls

Before you run the sample, you must build the APIs and set up the COM environment.

Click to jump to top of pageClick to jump to parent topicRunning the COM Excel Sample

When running the Microsoft Excel sample, you use the Get and Find sheet to find an employee.

To run the Microsoft Excel component interface sample:

  1. Launch Microsoft Excel.

  2. Open the Microsoft Excel sample spreadsheet.

    The Microsoft Excel spreadsheet is located in <PS_HOME>\sdk\pscompintfc\src\com\samples\vba\sdk_bus_exp. When prompted about macros, select Enable Macros.

  3. Attach PeopleSoft References to the spreadsheet.

    This example uses early bindings and hence requires attaching references to the spreadsheet. Select Tools, Macro, Visual Basic editor from the Microsoft Excel menu. This opens the VBA editor.

    Select Tools, References from the menu. A dialog box appears, listing all the available references. Select the reference PeopleSoft_PeopleSoft.

  4. Sign in to the sdk_bus_exp sample.

    Sheet 1 of the sdk_bus_exp spreadsheet is the sign-in page. Provide the connect information and press Tab to navigate out of the fields. Click Connect to establish the connection.

  5. Find an employee by using the Find keys.

    The Find and Get keys are located on Sheet 2.

  6. Select an employee from the list.

    Select an employee ID from the list by making the cell active and then pressing the GET selected button.

  7. Get an Employee by providing the Get key.

    Enter the complete employee ID in cell B3. Press Tab to navigate out of the cell, and click Get (EMPLID). A list of all the available periods is displayed.

  8. View details.

    To view the details for the listed business expense periods, click the Toggle Details button.

  9. Add a new business expense period.

    Click the Insert period button. This redirects you to Sheet 3. Enter the business expense period date. Press Tab and click the Save New Period button.

  10. Add a new business expense detail.

    Click the Insert Detail button. This redirects you to Sheet 3. Enter the charge date, expense code, amount, department ID, and business purpose. Press Tab, and save the new detail by pressing the Save New Detail button.

You can list the expense periods for the employee.

Click to jump to top of pageClick to jump to parent topicUnderstanding the COM Excel Sample Code

The following listings of code are taken from the Microsoft Excel sample program, sdk_bus_exp.xls. (The code has been edited for length.)

View the code by selecting Tools, Macro, Visual Basic Editor from the menu.

Declare the PeopleSoft session object.

List Business Expense Periods, using the Item method to get a specific item of the type SDK_BUS_EXP_PER.

List Business Expense Details, using the Item method to get a specific item of the type SDK_BUS_EXP_DTL.

To save a new business expense period, use the InsertItem method. This method inserts a new row and returns an item of the type SDK_BUS_EXP_PER. The item contains the properties. Set the properties and execute the Save method.

To save a new business expense detail, use the InsertItem method. This method inserts a new row and returns an item of the type SDK_BUS_EXP_DTL. The item contains the properties. Set the properties and execute the Save method.

Click to jump to top of pageClick to jump to parent topicUsing the SDK COM ASP Sample

The component interface sample program for ASP is provided as part of the component interface SDK, located in <PS_HOME>\sdk\pscompintfc\src\com\samples\asp\sdk_bus_exp.

The ASP source code for the samples is in these files.

Before you run the sample, you must build the APIs and set up the COM environment.

Click to jump to top of pageClick to jump to parent topicRunning the COM ASP Sample

When running the ASP sample, you use the Get key to find an employee.

To run the ASP component interface sample:

  1. Install and configure the IIS web server.

  2. Create a virtual directory to point to <PS_HOME>\sdk\pscompintfc\src\com\samples\asp\sdk_bus_exp.

  3. Start the web server.

  4. Run the SDK example through the browser.

    The web address http://machinename/sdkSDK_BUS_EXP_Signon.asp launches the SDK application.

  5. Provide the connect information and click Submit.

  6. Get details for an employee.

    Enter the Get key (SDK_EMPLID) and click the Get button. This lists all the business periods for the selected employee ID.

  7. Update a business expense period.

    Click the Update button to update the business expense period. Update the expense period end date and click the Save button.

  8. Insert a business expense period.

    Click the Insert button to update the business expense period. Add the new expense period end date and click the Save button.

  9. Delete a business expense period.

    Click the Delete button to delete the business expense period. You are prompted to decide to delete the row. Click OK to confirm the delete, and click Cancel to cancel the operation.

  10. Update a business expense detail.

    Select a business expense period by clicking the Update button from the business expense period row.

  11. Insert a business expense detail.

    Click the Insert button to insert a new business expense period. Enter the values for charge date, expense code, expense amount, currency code, business purpose, and department ID. Click the Save button to save changes.

  12. Delete a business expense detail.

    Click the Delete button to delete the business expense detail. You are prompted to decide to delete the row. Click OK to confirm the delete, and click Cancel to cancel the operation.

You can list the expense periods for the employee:

Click to jump to top of pageClick to jump to parent topicUnderstanding the COM ASP Sample Code

The following listings of code are taken from the ASP sample programs. (The code has been edited for length.)

SDK_BUS_EXP_Signon.asp

This is a sign-on page to the SDK Business Expense sample.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Provide the form action. On the submit from this page SDK_BUS_EXP_GetSearchParameters.asp is called.

Click the Submit button to run a JavaScript function checkRequiredFields(), which checks that all the connect information is provided.

The connection information is forwarded to the next page, using hidden fields.

SDK_BUS_EXP_GetSearchParameters.asp

This page prompts for the Find and Get Keys. You can also set the component interface modes: Interactive Mode, Get History Items, and Edit History Items.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Sub getSearchParameters prompts the user for the Get or Find key and the component interface modes (interactive, get history items, and edit history items).

Sub getSearchParameters calls the appropriate page for Get and Find, using the JavaScript function invokeMethod().

SDK_BUS_EXP_GetSearchResults.asp

This page is called if the Find option was selected.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the Find keys.

Get the search result.

The function getSearchResults lists all the employees for the provided Find keys by setting the Find keys and executing the Find method.

Loop through the collection to list all the employee IDs.

SDK_BUS_EXP_GetBusinessExpenses.asp

This page lists all the business expense periods for the selected employee.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the Key Field.

Set the Component Interface Get Key.

Get the business expense periods by executing the function getBusinessExpensePeriods.

The function getBusinessExpensePeriods gets the business expense period, and then loops through the collection, using the Item method to get a specific business expense period. Each property in that item is then displayed.

The Update button is of the type submit. Since the form action is set to SDK_BUS_EXP_UpdateBusinessExpensePeriod.asp, this page is launched. The Insert and Delete buttons use the JavaScript functions insertBusinessExpensePeriod() and deleteBusinessExpensePeriod().

The JavaScript function insertBusinessExpensePeriod sets the form.action to SDK_BUS_EXP_InsertBusinessExpensePeriod.asp and submits the page.

The JavaScript function deleteBusinessExpensePeriod sets the form.action to SDK_BUS_EXP_DeleteBusinessExpenseDetail.asp and submits the page.

SDK_BUS_EXP_UpdateBusinessExpensePeriod.asp

This page enables the user to update the expense period data as well as insert and delete business expense details.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the key fields.

Update business expense details for the selected employee ID and business expense period

Submitting the updateBusinessExpensePeriod gets the business expense period collection. It passes PERIODNUM to the Item method to get the business expense period to be modified.

This page also lists the business expense details, using the getBusinessExpenseDetails function.

The Save button uses the JavaScript function saveBusinessExpensePeriod to save changes made to the business expense period. The function saveBusinessExpensePeriod sets the form action to SDK_BUS_EXP_SaveBusinessExpensePeriod.asp and submits the form.

SDK_BUS_EXP_SaveBusinessExpensePeriod.asp

This page enables the user to update the expense period data as well as insert and delete business expense details.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the key fields.

Save business expense period for the selected employee ID and business expense period. Get the specific business expense period by using the Item method. Set the SDK_EXP_PER_DT property with the new value and execute the Save method.

SDK_BUS_EXP_InsertBusinessExpensePeriod.asp

This page enables the user to insert a new business expense period.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the key fields.

Call the insertBusinessExpensePeriod function to insert a new business expense period.

Get the business expense period.

The InsertItem method is used to insert a new item in the SDK_BUS_EXP_PER collection.

A field to enter the SDK_BUS_PER_DT is created.

The Save button calls the JavaScript function newBusinessExpensePeriod. This function sets the action of the form to SDK_BUS_EXP_NewBusinessExpensePeriod.asp and submits the form.

SDK_BUS_EXP_NewBusinessExpensePeriod.asp

This page enables the user to update the expense period data as well as insert and delete business expense details.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the key fields.

Get the SDK_BUS_EXP_PER_COLLECTION. Execute the InsertItem method. Set the SDK_EXP_PER_DT property and execute the Save method.

SDK_BUS_EXP_DeleteBusinessExpensePeriod.asp

This page enables the user to update the expense period data as well as insert and delete business expense details.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the key fields.

The Submit deleteBusinessExpensePeriod deletes a business expense period.

This Submit gets the SDK_BUS_EXP_PER collection. The DeleteItem method deletes the specified row. The Save method is executed. To view the updated SDK_BUS_EXP_PER collection, execute the Cancel method. Set the keys and execute the Get method. The function getBusinessExpensePeriods displays the business expense periods.

Execute the Save method.

Execute the Cancel method

Set the component interface Get Key.

Execute the Get method.

SDK_BUS_EXP_InsertBusinessExpenseDetail.asp

This page enables the user to update the expense period data as well as insert and delete business expense details.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the key fields.

Sub insertBusinessExpenseDetail inserts a business expense detail for the selected business expense period.

Get the SDK_BUS_EXP_PER collection in Sub insertBusinessExpenseDetail.

Get the SDK_BUS_EXP_PER collection, using the Item method.

Get the SDK_BUS_EXP_DTL collection.

Get the SDK_BUS_EXP_DTL using the Item method.

Create a form to get the properties for SDK_BUS_EXP_DTL.

The Save button calls the JavaScript function saveBusinessExpenseDetail sets action of the form to SDK_BUS_EXP_SaveBusinessExpenseDetail.asp and submits the form.

SDK_BUS_EXP_SaveBusinessExpenseDetail.asp

This page enables the user to update the expense period data as well as insert and delete business expense details.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the key fields.

Submit saveBusinessExpenseDetail saves the business expense detail.

Submit saveBusinessExpenseDetail gets the SDK_BUS_EXP_PER collection.

Get the SDK_BUS_EXP_PER, using the Item method.

Get the SDK_BUS_EXP_DTL collection.

Get the SDK_BUS_EXP_DTL, using the InsertItem method. Set the properties.

Execute the Save method.

SDK_BUS_EXP_DeleteBusinessExpenseDetail.asp

This page enables the user to update the expense period data as well as insert and delete business expense details.

Include SDK_BUS_EXP_FUNCLIB.asp. This file contains all the common functions.

Get the connection information forwarded from the previous page.

Get the key fields.

Sub deleteBusinessExpenseDetail deletes a business expense detail from the selected business expense period.

Get the SDK_BUS_EXP_PER collection in Sub insertBusinessExpenseDetail.

Get the SDK_BUS_EXP_PER collection, using the Item method.

Get the SDK_BUS_EXP_DTL collection.

Execute the DeleteItem method.

Execute the Save method.