The Excel To CI spreadsheet makes it easy to import data from Excel into PeopleSoft. It lets you enter data in a familiar Excel spreadsheet, and when you're ready it loads the data to PeopleSoft via Component Interface. Since Component Interface is used, it runs the PeopleCode edit checks that run when you enter the data on-line and it enforces the integrity of the data as it loads. Any errors are reported back so that you can correct them. This article will explain step-by-step how to use ExcelToCI to load a simple set of data (locations) into your PeopleSoft application.
The spreadsheet is called ExcelToCI.xls and is located in your PS_HOME directory under excel folder. The PeopleBooks documentation is located at http://<YourHelpWebServer:Port>/PSOL/htmldoc/eng/psbooks/tcpi/htm/tcpi10.htm #i090f42a6803232d2. Before you can use the Excel To CI Spreadsheet, you’ll need to know the name of the Component Interface that you’re working with as well as the WEBLIB_SOAPTOCI web library added to one of your permission lists. The ExcelToCI utility is a Microsoft Excel spreadsheet with 5 tabs, one for each worksheet. Each worksheet has a special function. Start by opening the ExcelToCI spreadsheet. After opening the file you will be warned that the spreadsheet contains macros. Make sure to click the Enable Macros button. |  | | If you don’t see the Macro warning dialog, your security settings may be set too high to run any macros. Navigate to Tools > Macro > Security and double-check your macro security settings. Anything above Medium will cause problems with this spreadsheet. |  | | Once the spreadsheet is open, it is a good idea to click File > Save As and save it to your local hard drive. |  | Coversheet Tab | The coversheet tab is a general worksheet that explains how to configure and use the utility. Nothing to see here. Move along. |  | Connect Information Tab | This tab is where you specify the parameters needed to log in to PeopleSoft and submit data to the application. The parameters you’ll need will depend on the environment you’ll be working in. |  | | Most of the time you can map the parameters from the target environment’s URL directly to fields on this page. The example on the right illustrates this. You may have to ask your administrator what the default local node is. If you need to guess, PT_LOCAL and PSFT_EP are pretty good ones. There’s usually no need to change the Chunking Factor. Error Threshold can be set if you want to stop the import after a certain number of errors are reached. The value for the Action field is populated by the system when the component interface is retrieved from the database, so you don’t need to set it at this point. |  | Template Tab | The template tab is where you identify the component interface you want to use and which fields you want to map to and submit. The Template Actions toolbar will make everything possible. |
| | First, click the New Template button. You’ll be prompted for your PeopleSoft user id, password, and component interface name. As you can see, I’m using the Location Table CI for purposes of this demonstration. When you’re done, click OK. |  | | If you entered everything correctly, the template will be auto-generated based on the component interface. The next step is to tell ExcelToCI which fields you want to include for the CI. We’ll be working with the buttons on the second row of the Template Actions toolbar. Select the grey box below the field name you want to include in your CI mapping. Then click the Select Input Cell button on the Template Actions tab. The Grey box will change colors to indicate that it has been selected. If you make a mistake, repeat the process but click Deselect Input Cell. |  | | Continue the process until all of the cells you need have been selected. |  | | When you’re done, click the New Data Input button. This will build the next worksheet called Data Input. You will get a warning about deleting existing data. We don’t have existing data so just click Yes. |   | Data Tab | The Data Input worksheet is where we will enter the data that we want to load. The fields that we selected on the Template tab have been brought forward to this worksheet, so all we have to do now is enter the data that we want to load. |  | | Now we’re ready to submit this data to the Component Interface. But before we do, go back to the Connect Information worksheet and verify that the Action field reflects what we really want to do. If you’re loading new data, make sure the action is Create. It is possible to update data with the ExcelToCI spreadsheet too, so if that’s what you’re trying to do just set the action to UPDATE. Once you verify this is correct, go back to the Data Input worksheet. |  | | Now click the Stage Data for Submission button. This will build the final tab, Staging and Submission. |  | | | | | Staging and Submission | The Staging and Submission tab shows all of the data that you’re going to send to PeopleSoft via Component Interface. It’s formatted for PeopleSoft’s purposes, so you might see data broken out on different lines. If you feel good about the data you’ve entered, click the Submit Data button. |  | | The logon box will appear again. Verify your username and password, and click OK. |  | | If the rows load correctly, you should see a green OK button in the Status field of this page. Otherwise you’ll see a red ERROR. |  | | And this shows the data successfully loaded in PeopleSoft. |  | Dealing with Errors Sometimes errors happen. The next example was created by submitting the same data a second time. | Here’s what the Staging & Submission tab looks if you submit data that is in error. |  | | If you mouse over the error cell, you’ll see the error message. As you can tell, the row already existed. |  | | If you think this is something you can correct, click the Post Results button which will copy the data back to the Data Input tab. From there you can correct whatever was wrong and resubmit. |  | | To correct this, I’d just change the key information and click the Stage Data for Submission button again. |  | Loading Effective Dated Tables with ExcelToCI
If you’re populating a component with Effective Date as a key, and you want to populate multiple Effective Dates for the same key value, you’ll have to do some special processing. Here’s why: Remember on the Connection Information tab, there’s an Action field that can be either Add or Update/Display. This means that for each row it attempts to load, it’ll either load it in Add mode or Update/Display mode. If, for example you have the same location with two effective dates, it’ll attempt to add the first row. This will succeed. Then it’ll try to add the next row with the different effective date. But since there’s already a row for the same key values, you’ll get the “Row already exists with the specified keys” error message So to make it work, you’ll have to create two loads. The first load will be done with the Action field on the Connection Information tab set to Add. It will contain just one row (and one effective date) for each unique key field. This should load successfully. The next load will be done with the Action field set to Update/Display. It will contain all of the rows that you didn’t process in the first load. Update/Display mode will allow new effective-dated rows to be added to the existing keys so this load will succeed as well. A Parting Note of Caution As nice as the spreadsheet is, it only works on components that have a pre-built Component Interface. A component interface is a mapping between an external system and a PeopleSoft component. Since it’s a mapping, the tables and fields won’t necessarily match the tables and fields in the database, or even the component for that matter! And you may see fields for in-memory, or “derived work” records that don’t really exist in the database but are used for on-line computations before data is actually written to the database. Mapping to the right fields can require a bit of trial and error, but if the Component Interface and the underlying component are designed well (and the delivered CI's usually are) the process should go smoothly.
Comments () |
 |
|
|
|
|