Create a solution from an existing script
In addition to using the default templates that are included with Journal Entry Management (JEM), you can import Winshuttle Transaction scripts for any of the supported t-codes and use them to create custom solutions.
Important: Nested loops are not supported in Journal Entry Management.
Tips for importing Transaction scripts
- Test the Transaction script thoroughly before you import it into Journal Entry Management.
- For t-codes such as FB60, custom scripts can be recorded with tax information entered on either the Basic tab or the Tax tab, and JEM will balance tax amounts in the header and line items. However, fields on the Tax tab cannot be included in a loop.
- If you need to add, delete, or change a field, make the update first in Transaction and test it.
- If you are updating an existing script, first delete the old script in JEM and then import the updated Transaction script.
- Do not map multiple fields to the same cell or column in Transaction (for example, posting date and document date). JEM requires a separate cell or column for each field.
The exception is the case of debit/credit indicators. Multiple debit/credit indicator fields in the header should be mapped to the same column or cell in the header items. Multiple debit/credit indicator fields in the line items should be mapped to the same column in the line items.
Choose the script
- Click the File tab, and then click New.
- Click Journal Entry Management, and click Create from Existing Script.
- Click the Browse button (the open folder) and browse to the Transaction script that you want to use.
- Click the Business process box and then click the business process that the solution will use.
This will tell Journal Entry Management (JEM) where to store the solution.
- Click Create Template.
If you are not logged on to SAP, JEM will open the logon box.
Configure the script
After you click Create Template and log on to SAP, Journal Entry Management starts the Configure JEM Solution wizard. Step through the wizard to enter the settings that JEM needs for document balancing and splitting.
- On the Script Properties tab,
choose the actions that runners will be able to do, whether to automatically attach the Excel workbook if the run is successful, and the document length. If the script includes a header amount, specify whether that amount appears in the header or as the first line item.
- On the Posting Date tab, check the box for the posting date field.
- If your script contains an amount in the header,
select the amount field, and then specify whether that header amount is a debit or a credit. Or click From Specified Field, and select the field that will contain the debit/credit indicator.
- On the Line Item Amount tab,
check the box for the line item field that contains the amount, and then select the field that will contain the debit/credit indicator.
Note: You will be able to specify custom debit/credit indicators in the Properties panel on the Map tab.
- On the Tax Amount field,
check the box for the field that contains the tax amount in the header, if applicable, and in the line items.
- To allow long documents to be split, check the Allow document splitting box on the Document Splitting tab. The tab displays the document length that was specified on the Script Properties tab, and the Split after number of rows box shows the same value.
When JEM splits the document, it adds split rows to balance the values in the split sections. On this tab, you can specify the values to be added for fields that are in the split rows.
For more information, see Split documents.
- Click Done.
Map the script
The template opens on the Map tab, with the mapping type that was specified when the script was saved in Transaction.
First steps
- If the script used column-based mapping, you can change it to cell-based mapping by clicking Cell Based Mapping.
- Save the script. JEM saves a copy of the original Transaction script as a new JEM solution.
- If the Mapper does not display the field type and length, click Synchronize.
- If you do not see a field that you need for your solution, you might be able to add it to the Mapper. For more information, see Add fields.
Cell-based mapping
- Map the header fields by dragging from the data preview up to the Mapper rows. Drag the field to where you want the data to display, which is one field to the right of where the header will be displayed. For example, to show the header in cell A1, drag the field to cell B1.
- Drag the script log fields down to the data preview.
- Click the Expert View tab, and confirm that the line-item fields are contained in a range-based loop.
- Click the loop indicator, and in the Start row box, enter a row number that is below the header fields. The row number is for the data, so be sure to allow a row for the line-item headers.
- To map each line item field, drag from a column in the data preview up to the field in the Mapper.
- Drag the Extended Log and Validate Log fields from the Mapper down to columns in the data preview.
Column-based mapping
- Click the Expert View tab, and confirm that the line-item fields are contained in a loop.
- Click the loop indicator, enter a column for the loop indicator, and enter the text that will identify the data as a header item or a line item.
To add more loops, select the rows in the Mapper, click Create Loop, and enter a column for the loop indicator, and enter the text that will identify the data as a header item or a line item. Because some rows will contain information for both loops, you will have a separate loop ID column for each loop, with a different line-item identifier value for each loop.
Important: Journal Entry Management supports loops at the same level in column-based mapping, but it does not support nested loops.
- Drag the header fields down to the data preview.
- To map each line item field, drag from a column in the data preview up to the field in the Mapper.
Set the script properties
- Choose the JEM actions: Post, Park, or Save as Completed.
Important: At least one action must be specified before you can publish the solution to an Excel worksheet.
You can select more than one action (Park and Post or Post and Save As Completed), but you cannot select Park and Save As Completed, because these are both parking functions. - To allow online validation and whole-document simulation, check the Allow validate and Allow simulate boxes.
- To attach the current workbook, check the Attach current workbook box.
Note: To set the default attachment mode, click File, click Options, click the SAP Settings tab, and then choose the mode from the Default attachment mode list.
- To write headers when you publish the solution, check the Write header item headers box or the Write line item headers box, or check both boxes.
- To change the maximum document length, type a new value in the Document length box.
- To allow the document to be split, check the Allow splitting of journal entry box and, if you want to split the document after a certain number of line items, type the number in the Split after line item box. The number cannot be greater than the document length.
The way that the runner splits the document depends on the transaction code. For more information about splitting documents, see Split documents.
Set the field properties
- To specify the split field, select the field in the Mapper, and then check the Is split field box. You can also provide a fixed value for the split field and then click the Lock button to prevent runners from changing the value.
- Specify the posting date field, the debit/credit indicator field, and the document value field by selecting the field in the Mapper and then checking the box in the Properties panel.
For example, in the Mapper, select the row for the Posting Date in Document field, and then in the Properties panel, check the Is posting date box.
Important:
These properties must be set before you can publish the solution to an Excel worksheet.
For solutions created from scripts that were recorded using Transaction 10.x or earlier, the debit/credit indicator data type must be updated before the debit/credit indicator can be set in the field properties. Click Synchronize, and then click the debit/credit indicator row in the Mapper and check the Is debit/credit indicator box in the Properties panel.
The only exception is that you cannot specify a debit/credit indicator field for BAPI-based solutions, which use plus or minus signs in the amount field instead of a separate debit/credit indicator field. - Make a field mandatory by selecting the field in the Mapper and then checking the Data required box in the Properties panel.
- To provide a list of allowed values for a field, select the field in the Mapper, and then click the Allowed Values button in the Properties panel. For more information, see Lists of values.
- If you want a field to always use the same value, click Mapping Direction, click Fixed Value, and type the value.
JEM will remove that field from the mapped data set and automatically upload the value to SAP.
- If you are importing an FB60, FB65, FB70, or FB75 script that was recorded using the complex posting method (all amounts are contained within the loop, including the header amount), check the First line item contains an amount from the Header box. This is critical if you are going to use the Split Document feature with these transaction codes.
Important: The check box will not be displayed if you marked an amount in the header.
Test and debug the solution
You can test the script by running it from Studio. Click the Run tab to check the data, validate, simulate and post, park, or save as completed. If the solution returns errors, you can run it in Debug mode.
Find detailed steps in Uploading data with Journal Entry Management, which documents the Winshuttle Run tab in the Excel Add-in. You can perform the same tests on the Run tab in Studio.
The next step is to publish the solution.
More Studio customizations
When creating your Journal Entry Management solution, you can also use Studio features. See the following Studio topics for more information: