Help Center>Step-by-Step Guides Help

FBS1 step by step: Posting Accrual/Deferral documents

This document describes how you can use Winshuttle Transaction to post accruals/ deferrals in the SAP Business Suite from data in Microsoft Excel using the SAP transaction FBS1 (Enter Accrual/Deferral Document). The example here will show how to use the Transaction loop feature to upload multiple-line entries from an Excel file into SAP.

Steps

The FBS1 transaction is very similar to the FB01 (Post Document), F-02 (Enter G/L Account Posting), and F-43 (Enter Vendor Invoice) transactions, and the steps that are shown here can also be used for those transactions.

Record

  1. Start Winshuttle Studio from the desktop shortcut or from the Windows Start menu.
  2. Click New.

    file new

  3. Click Transaction, and then click Create from Recording.

    click transaction create from recording

  4. Choose the SAP system that you want to use, enter the appropriate user data, and then click Log On to SAP.

    log on to sap

    If you do not see the SAP system that you want, click Advanced SAP Logon, click Add System, provide the system information, and click OK.

  5. In the Transaction code box, type FBS1.

    type fbs1 in transaction code box

  6. Leave the recording mode as Standard. If you do not see Standard, click Change, click Non-Batch Without SAP Controls, and then click OK.

    Note: For most transactions, the default mode is Standard, and the Winshuttle Function Module (WFM) selects the optimum mode for the t-code that is being recorded.  If the WFM is not installed, Non-Batch Input Mode Without Controls will work for most transactions. Non-Batch modes are necessary for downloading information from SAP transactions, or for Finance or HR transactions in which there are Dynamic Actions executing or user parameter values being used; otherwise, if you do not have access to Non-Batch modes, you can try recording in Batch Mode. The difference between Without SAP Controls and With SAP Controls is just a matter of what tools are on the transaction screens. For more information, see the Recording modes topic (Connect mode or Foundation mode).

  7. Click Start Recording.

    start recording button

    The FBS1 transaction starts.

    Note: The following screens may vary according to the way your SAP system has been configured.

    To make this process repeatable by Transaction, there will be a few changes to the process compared with how you would manually create a material. These differences will be identified throughout the rest of this document.

  8. Enter data into the header section:
    • Document Date
    • Type
    • Company Code
    • Posting Date
    • Period
    • Currency
    • Document Header Text
    • Reversal Reason
    • Reversal Date
    • Posting Key
    • Account

    header data

  9. Press the Enter key.
  10. Enter data for the first line item:
    • Amount
    • Text

    add g/l account item

    Important: These steps will most likely be different from manual entry.

  11. After you enter the item data, click the Back button.

    s a p gui back button

  12. Now enter the next posting key and account number, and then press the Enter key.

    Important: Because the header screen changes after the first line item entry, we will be starting our loop from here. So one line item entry will remain in our header section later on when we get into the Mapper.

    display overview

  13. Enter data for the second line item:
    • Amount
    • Text
  14. After you enter the item data, click the Back button.

    Important: While you record this transaction, the line item screen here will change, based on the account type of the posting key. If you will be using multiple posting keys in this transaction, you will need to account for the different screen numbers.

  15. Click the Save button. This will also end the recording.

    s a p save button

After Studio finishes compiling the script, it will take you to the Map tab.

Map

It is now time to create the mapping for this transaction. Mapping a script is just a matter of connecting SAP fields to fields in your data file. Transaction provides a Mapper to facilitate this process.

Auto Mapping will map the entire script to an Excel spreadsheet in the order that they appear in the Mapper. Because of the complexity of this transaction, we will map the fields manually instead.

The screenshot below shows the Basic View tab of the Mapper.

In each of the rows of the Mapper, you will see:

  • Mapper row number: This is just a reference number.
  • Enable flag: only enabled Mapper rows will be executed by Transaction.
  • Field Description: The label associated with the SAP technical field name.
  • Field Name: The SAP technical field name.
  • Field Type & Length: For example, String or Decimal, and the padding options.
  • Mapping direction: Fixed Value, Excel to SAP, SAP to Excel (or, if mapping to Access: Access to SAP, SAP to Access).
  • Value: Values assigned to the SAP field; either fixed values or mapped locations in the associated data source.

Note: The Properties pane is also displayed, but it is not shown below.

basic view of mapper

In the Data Set panel, you will see a preview screen of the selected data source type.

To change the data source type, click the drop-down menu under the Data Set tab and choose the data source type that you want.

change data source type drop down menu

The preview will change to reflect the choice. In this case, we will use Excel.

  1. To map the script to the data source, you will drag in the direction that the data will move. For this script, you are uploading data from Excel to SAP, so you will drag from Excel to the Mapper.

    Drag column B up and drop it onto Document Date in row 2.

    Continue this process for all of the fields that you want to update, including the posting key, account, amount, and item text for both line items.

    fields mapped to excel preview

  2. Click the Expert View tab.

    Expert View displays the fields organized by screens, and you can see the screen name, number, and description.

    expert view of mapper

  3. There are two sections where you input the posting key/account number and then the amount and item text. The first entry will remain in the header, and you will create a loop around the second entry.

    Highlight the entire second line item entry, in this case rows 22 through 31, by clicking the first row in the entry, holding down the Shift key, and clicking the last row in the entry. Then click the Create Loop button.

    create loop button

    The Loop box opens with default values, which you can change:

    • The boxes at the top show the start and end rows of the loop in the Mapper (the highlighted rows—in this case, 21 through 30).
    • The Loop identifier column box displays the column in the spreadsheet that will contain the Header and Detail (line item data) identifiers.

      To map the loop identifier to column A, click the Loop identifier column box, click Show unmapped columns, click A, and then click Go.

    • The Text to identify Transaction Header and Text to identify repeating Line Items boxes display the values that will identify the Header (H) and Line Item (D) rows.

    loop box

  4. Click OK to insert the loop around the selected Mapper rows.

    The Mapper reflects the following changes as a result of inserting the loop:

    • The graphical depiction of the Loop around the selected lines indicates which Mapper rows will be contained within the loop.
    • The ID Column has been identified in the Preview panel.
    • Row 2 contains the first Header ID value, and row 3 contains the Line Item ID value.

      Note: This will appear in the preview file only if you are mapping to a blank file.

    loop in mapper

Add the data and run the script

  1. Click the Run tab.

    run tab

    Note: Transaction will automatically assign the Log column to the next available column after the last mapped column (in this case, column S).

  2. Type the data in the columns.

    You can specify a start and end row, specify the Excel sheet that contains the data, and change the Log column.

  3. To execute the upload, click the Test button, if you are a Foundation user, or click the Run button if you are not a Foundation user.

    Studio prompts you to save the script and data files.

    save box

    The best practice is to name the Excel spreadsheet the same name as the script unless an Excel spreadsheet will be used for multiple scripts.

    After you save the script and data files, the script runs.

    The yellow message bar displays a message when the run has finished.

    success message in message bar

  4. Check the log column. The run was successful and the messages returned from SAP were entered into the log column.

    log messages