I Need Electronic Banking Doc Urgent

Hi SAP GURUS,
I need urgent requirement  to implement Electonic Banking Can any Send me Documentation As soon as possible its urgent ds is my  mail id:[email protected]
Thanks & Regards,
Prakash

SAP Banking Services
http://help.sap.com/saphelp_banking50/helpdata/en/06/07b73c4505dd5ce10000000a114084/frameset.htm
SAP Deposits Management
http://help.sap.com/saphelp_dm40/helpdata/en/10/293c996b0543e59cc291e6a8d13ab3/frameset.htm
Reward if useful.

Similar Messages

  • GL account issue with Electronic Bank Statement

    Hi Gurus,
    I need your help and advice with the following issue. We are using ECC 6.0 and have implemented electronic bank statement. It is working fine but we havea new requirements.
    Presently all the incoming ACH (ACH in) are being posted to one GL account set- up for such payments +++++++++1. Going forward, we want to post customer incoming ACH payments to seperate GL account and all the other incoming ACH's should keep on posted to the old account +++++++++1. I do not have exposure to configuring EBS and not sure how should I configure this.
    I would really apreciate if you can guide me with step by step details to do this set-up.
    Thanks,
    Best Regards,
    Shalu

    Usually ACH in or outgoing, the corresponding bank will send you a code.
    so once you get into the config item for EBS
    1. you create account symbols( ACHPAY and ACHPAY2) and assign accounts (++++1 and a debit account ++++2) respectively
    2. Create posting keys, usually this is mimicked with a Z attached to the bank code for ACH payments (EX: 675 is the BAI code for ACH, create a posting key with Z675)
    3. create rules for the same posting keys like debit and credit account symbols, doc types, what kind of postings it should post( clearing entry or posting to GL)
    4. Create a transaction type and in the following step create external transaction types (usually bank BAI codes) and map them to posting rules and the processing types
    5. finally map bank accounts to transaction types

  • Electronic bank statement upload - SWIFT MT940 format...

    Hi All,
    i am first doing the electronic bank statement upload to SAP.
    i already done the related config for this.  i did check with my Client bank about the statement format and they able to provide the statement in SWIFT MT940 only not in multi cash format.
    Is any body done this before i mean upload the MT940 format to SAP. If so please share your experience with me.
    i need:
    1) The format of SWIFT MT940 file.
    2) Is any SAP notes related to this format?
    one important thing is -> 1) is this SWIFT MT940 format got two files(statement file  and line item file )  like mult icash format  or only one file.
      2) if this format got only one file  in which field we have to use  to upload this file in TCODE. FF_5. -> Line item field or statement filed.
    Thank you very much.
    Sandhya

    Hi ,
    Check SAPnote 13283. This has information on
    Multicash
    SWIFT MT940
    DTAUS
    BAZ
    MAOBE
    SAP.TXT and SAPKURZ.TXT
    Also you can see the link  http://www.swedbank.lv/lib/en/SWIFT_MT_940_formata_apraksts_ENG.doc
    for the detailed description of SWIFT MT940 File.
    Hope it helps
    SJ

  • Automatic clearing in electronic banking

    Hi all,
    I'm working with the electronic banking program to import statements and want to clear items from sub ledger accounts automatically.
    From the tests I have done so far, it seems that SAP always tries to locate the business partner via the bank details FIRST. In other words:
    IF business partner bank details are provided in the electronic bank statement
    THEN SAP takes this as leading in order to determine the business partner
    I do not want SAP to start the search via the bank account details. I have been using interpretation algorithm 020 (doc.number) and 031 (doc.number and customer from document) but still SAP always starts searching for the business partner based on the bank details.
    My test case is as follows:
    - I have a customer A without bank details maintained
    - I have a vendor B with bank details maintained
    - Customer A is in fact the SAME business parter as vendor B although they are not linked in their master data
    Now Customer A makes a payment to me and the bank provides the bank details of the customer AS WELL AS the invoice number. SAP then starts matching and finds vendor B because the customer bank details are maintained in the vendor master. Clearing from the vendor does -of course- not take place because the invoice exists on the customer, not the vendor. So a payment advice is created which holds the vendor account AND the invoice number.
    I cannot get SAP to avoid finding the vendor, and instead, find the customer with help of the document number that is also in the bank statement file.
    Hope the case is clear, any suggestions would be highly appreciated.
    Rene

    Hi Jay,
    Open items for G/L Accounts, Vendors and Customers can be cleared automatically by running the Clearing Program
    Set up predefined criteria for automatic clearing (Configuration)
    Program groups those items from an account that have the same
    u2022 Trading Partner ID
    u2022 Reconciliation Number
    u2022 Currency in which the General Ledger is updated
    u2022 Four freely definable criteria
    The program groups together items from an account that have the same reconciliation account number, currency, and Special G/L indicator, as well as pre-defined criteria from the document header or item such as the allocation field, reference number and amount.
    If the balance, in local currency, of the items within a group is zero, the system automatically clears them and creates clearing documents.
    Prerequisites for using the automatic clearing program:
    u2022 Accounts must be managed on an open item basis.
    u2022 Accounts to be cleared must be defined in customizing.
    The automatic payment program does not clear noted items, statistical posting, down payments, bills of exchange and items with withholding tax entries.
    When clearing open items in a foreign currency, differences may occur due to fluctuations in exchange rates. The system automatically posts these differences as realized gains or losses.
    Config: IMG>FA>GL. Accounting>Business  transactions>Open item clearing>Prepare automatic clearing.
    AS well see the notes for better understanding.
    Hope it gives better understanding.
    Respectfully,
    Vyas

  • Automatic Clearing & Electronic Bank Statement

    Hi,
    During EBS processing, open items are automatically being cleared but only based on amounts. I've configure in OB74 that criteria for clearing should be amount & value date.  It seems that EBS does not read the settings in OB74? Where is the correct path to set this up?
    Does EBS really allows upload of bank statement even if ending and beginning balance are not equal? Is there a way to control this?
    Thanks,
    Chaikaru

    Hi Chaikaru,
    OB74 is not the path for EBP processing. OB74 is used for account clearing in F.13 or F13E.
    You need to go to the path:-
    SPRO > Financial Accounting (New) > Bank Accounting > Business Transactions > Payment Transactions > Electronic Bank Statement
    You need to define interpretation algoritham. Please go through the below one:-
    OSS Note 494777 - Customer enhancements in electronic bank statement
    OSS Note 597428 - El.accnt statement: Customer-specific interpret.algorithms
    OSS Note 549277 - FAQ: Electronic account statement
    OSS Note 414233 - Accnt statement:customer-specific interpretation algorithms
    Regards,
    Gaurav

  • Automatic bank reconciliation with Electronic bank statement

    Deal All,
    As mentioned in the subject of this mail, this is to request for your inputs to advice the configuration steps with process for Configuration of Electronic Bank Statment in R3 to eneble the user for automatic bank reconciliation with clearing customer/vendor open items.Please send confi doc.
    Request you to provide documentation if possible along with your valuble advices.
    cvs

    Hi
    I implemented the EBS in my company 4 month ago and here are some advises on the problems i experienced in the setup process. As for the setup process it is straightforward just read the manual at help.sap.com.
    We used the MT940 format for importing bank statements from our bank.
    The first thing i would advice you to do is make a list of all the possible transactions that are to be handled by the EBS application.
    Then make estimation of how many payments that are recieved in constant structured way which the EBS can handle. (invoice number in the text)
    The people in our accounting department complained alot about the output format in the EBS not being userfreindly compared to the advises they recieved in e-mail form from the bank so if not the bulk of your payments can be processed automatically it might not be worth the trouble to implement it. (i still think they uses the the email to postprocess the transactions that was not automatically cleraed)
    Make sure you havent got any other applications handling some of the transactions that are contained in the bank statement because this wont work. eg. we had a program automatically placing fx trades on customer and bank account which meant that when we recieved the fx trade on the statement it was already placed and therefore had to be placed on a interims account for later reversal.
    We get alot of bankcharges on our payments and we set up the EBS to place them automatically on a bankcharge account if the difference between the recieved amount on the invoice was less that 30 dollars.(we just assume that a difference is a bank charge) This means that a customer if he wants to always can pay x dollars under the invoice amount because it will be automatically processed and therefore go unnoticed.
    Establish a contact in your bank who knows how their MT940 format has been structured. 
    Then contact your bank and get them to provide some test statements of old bank statements.
    Make sure that you are not the first customer for using the MT940 format or else you will end up being ginny pig for the banks possible mistakes.
    As i learned the way banks interpret the MT940 format guidelines can varry quite alot eg. the ocmt field our bank interpreted as the original payed amount in its original currency. SAP inprets this field as the recieved amount in its original currency and therefore it always try to clear the OCMT amount if availleble which meant it always tried to clear the original amount even though there had been taken som bankcharges underways.
    I also found out that our bank didnt really bother to specify the type of transaction (interest, fx contract, bank charges, check and so on) which meant we only had two external transaction codes availleble s103 for incomming payments and ntrf for outgoing payments. This gave alot of trouble as i had to identify the type of transaction through seach algorithms.
    Our bank also had trouble creating the MT940 file because it has a limited number of characters availleble which meant in the initial file that it only gave the first x characters of each line and then left out the rest. This meant that the text was broken into alot of pieces and you hardly ever had a complete invoice number to clear on. We had the bank altering their format so they now leave out text at the end of the transaction instead.
    In the implementation process we experienced that the EBS application created a payment advice each time the amount of the payment didnt match the invoice in the system. We implemented a note from service.sap which disabled this and just assigned the difference to a bankcharge account.
    I dont know if you can use these advices but just felt i would try to warn you about the potential problems that i experienced in the process. .
    If you have concrete questions to the EBS setup feel free to contact me and i will see if i can help you.

  • Electronic Bank Statement (EBS)

    Hi All,
    My Client is implemented Electronic Bank Statement using BAI format.
    GL Accounts set up is wrong (all bank accounts should be clearing type accounts (Open Item managed, except Operating Account (Main bank account))),but these accounts are not set up as open item management.
    How can I handle this issue and is it possible to create new accounts or any other alternative solution? Any help is appreciated.
    I will assign points.
    Thanks,
    Rau

    HI
    Before executing the programe RFSEPA02 ask your ABAP person to convert the programe to Zprograme as below so that this problem will solve you
    *ZFI_OPEN_ITEM_MANAGE-TO APPLY OPEN ITEM MANAGE TICK
    *& Report  ZFI_OPEN_ITEM_MANAGE
    REPORT  ZFI_OPEN_ITEM_MANAGE MESSAGE-ID FH LINE-SIZE 80.
    THIS IS NOT A STANDARD PROGRAM.
    IT IS ONLY INCLUDED FOR CONVENIENCE IN CASE IT WILL BE NEEDED.
    ONLY USE IT AFTER CONSULTING WITH SAP. S6DK909852
    *REPORT RFSEPA02 MESSAGE-ID FH LINE-SIZE 80.
    INCLUDE FSACHCDF.
    INCLUDE FSACHCDV.
    TABLES: BSIS,
            BSAS,
            BSEG,
            BKPF,
            GLT0,
            T001.
    DATA: BEGIN OF T_BSXX OCCURS 100.
            INCLUDE STRUCTURE BSIS.
    DATA: END OF T_BSXX.
    DATA: BEGIN OF T_LISTE OCCURS 300,
            GJAHR    LIKE BKPF-GJAHR,
            BELNR    LIKE BKPF-BELNR,
            SORT     TYPE I,
            TABLE(4) TYPE C,
            TYPE     TYPE C,
            OK       TYPE C,
          END OF T_LISTE.
    DATA: D_MAX         LIKE SY-TFILL VALUE '100',
          D_BELNR       LIKE BSEG-BELNR,
        D_TFILL       LIKE SY-TFILL.        "<<<< DELETE - NOTE 70203
          D_TFILL       LIKE SY-TFILL,     "<<<< INSERT - NOTE 70203
          D_STORNO      TYPE C.            "<<<< INSERT - NOTE 70203
    DATA: BALANCE_ITEMS   LIKE GLT0-HSL01,
          BALANCE_ACCOUNT LIKE GLT0-HSL01.
    *>>>> BEGIN OF INSERTION - NOTE 66156 <<<<
    DATA: XGLEDTAB LIKE GLEDTAB OCCURS 1 WITH HEADER LINE.
    DATA: BEGIN OF BK_METHODE,
            HWAE1 LIKE T001-WAERS,
            HWAE2 LIKE T001-WAERS,
            HWAE3 LIKE T001-WAERS,
            CURT1 LIKE X001-CURT2,
            CURT2 LIKE X001-CURT2,
            CURT3 LIKE X001-CURT2,
          END OF BK_METHODE.
    DATA: BEGIN OF T_BALANCE_ITEMS_HW OCCURS 1,
            WAERS1 LIKE T001-WAERS,
            VALUE1 LIKE GLT0-HSLVT,
            WAERS2 LIKE T001-WAERS,
            VALUE2 LIKE GLT0-HSLVT,
            WAERS3 LIKE T001-WAERS,
            VALUE3 LIKE GLT0-HSLVT,
          END OF T_BALANCE_ITEMS_HW.
    DATA: BEGIN OF T_BALANCE_ACCOUNT_HW OCCURS 1,
            WAERS1 LIKE T001-WAERS,
            VALUE1 LIKE GLT0-HSLVT,
            WAERS2 LIKE T001-WAERS,
            VALUE2 LIKE GLT0-HSLVT,
            WAERS3 LIKE T001-WAERS,
            VALUE3 LIKE GLT0-HSLVT,
          END OF T_BALANCE_ACCOUNT_HW.
    DATA: BEGIN OF T_BALANCE_ITEMS_TW OCCURS 1,
            WAERS LIKE GLT0-RTCUR,
            VALUE LIKE GLT0-TSLVT,
          END OF T_BALANCE_ITEMS_TW.
    DATA: BEGIN OF T_BALANCE_ACCOUNT_TW OCCURS 10,
            WAERS LIKE GLT0-RTCUR,
            VALUE LIKE GLT0-TSLVT,
          END OF T_BALANCE_ACCOUNT_TW.
    *>>>> END OF INSERTION - NOTE 66156 <<<<
    DATA: NUM_BSEG_SELECT LIKE SY-TFILL,
          NUM_BSEG_UPDATE LIKE SY-TFILL,
          NUM_BSIS_INSERT LIKE SY-TFILL,
          NUM_BSIS_SELECT LIKE SY-TFILL,
          NUM_BSIS_UPDATE LIKE SY-TFILL,
          NUM_BSAS_INSERT LIKE SY-TFILL,
          NUM_BSAS_SELECT LIKE SY-TFILL,
          NUM_BSAS_UPDATE LIKE SY-TFILL.
    CONSTANTS: CHAR_I     TYPE C VALUE 'I',
               CHAR_S     TYPE C VALUE 'S',
               CHAR_U     TYPE C VALUE 'U'.
    *PARAMETER:     P_BUKRS  LIKE BSEG-BUKRS OBLIGATORY.
                                           "<<<< DELETE NOTE - 62751
    *PARAMETER:     P_SAKNR  LIKE BSEG-HKONT OBLIGATORY.
                                           "<<<< DELETE NOTE - 62751
    *>>>> BEGIN OF INSERTION - NOTE 62751 <<<<
    PARAMETERS:     P_BUKRS  LIKE BKPF-BUKRS OBLIGATORY.
    PARAMETERS:     P_SAKNR  LIKE SKA1-SAKNR OBLIGATORY
                                      MATCHCODE OBJECT SAKO.
    *>>>> END OF INSERTION - NOTE 62751 <<<<
    SELECT-OPTIONS P_BELNR  FOR  BSEG-BELNR.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-B01.
    PARAMETERS:    P_LISTE  AS CHECKBOX DEFAULT 'X'.    " list protocol on
    SELECTION-SCREEN END OF BLOCK B01.
    INITIALIZATION.
      CALL FUNCTION 'POPUP_DISPLAY_TEXT'
           EXPORTING
                POPUP_TITLE    = ' '
                TEXT_OBJECT    = 'RFSEPA02'
           EXCEPTIONS
                TEXT_NOT_FOUND = 1
                OTHERS         = 2.
    *{   DELETE         DMUK903910                                        1
    LEAVE PROGRAM.
    *}   DELETE
    AT SELECTION-SCREEN ON P_SAKNR.
      PERFORM CHECK_ACCOUNT.               " locked for posting?
      PERFORM CHECK_ACCOUNT2.              "<<<< INSERT - NOTE 66156
    PERFORM ENQUEUE_ACCOUNT.             "<<<< DELETE - NOTE 65191
    START-OF-SELECTION.
      PERFORM ENQUEUE_ACCOUNT.             "<<<< INSERT - NOTE 65191
      PERFORM CHECK_AUTHORITY_SKA1_BUK.
      PERFORM CHECK_AUTHORITY_SKA1_BES.
    PERFORM CHECK_ACCOUNT_BALANCE.       "<<<< DELETE - NOTE 66156
      PERFORM CHECK_ACCOUNT_BALANCE_2.     "<<<< INSERT - NOTE 66156
    *--- BSIS -
      CLEAR D_BELNR.
      CLEAR T_LISTE. REFRESH T_LISTE.
      CLEAR T_BSXX.  REFRESH T_BSXX.
      DO.
        PERFORM SELECT_ITEMS USING 'BSIS' D_TFILL.
        IF D_TFILL EQ 0.
          EXIT.
        ENDIF.
        LOOP AT T_BSXX.
          PERFORM BKPF_UPDATE.             "<<<< INSERT - NOTE 70203
          PERFORM BSEG_UPDATE.
          PERFORM BSXX_UPDATE USING 'BSIS'.
        ENDLOOP.
        PERFORM WRITE_LIST_PROTOCOL.
        COMMIT WORK.
      ENDDO.
    *--- BSAS -
      CLEAR D_BELNR.
      CLEAR T_LISTE. REFRESH T_LISTE.
      CLEAR T_BSXX.  REFRESH T_BSXX.
      DO.
        PERFORM SELECT_ITEMS USING 'BSAS' SY-TFILL.
        IF SY-TFILL EQ 0.
          EXIT.
        ENDIF.
        LOOP AT T_BSXX.
          PERFORM BSEG_UPDATE.
          PERFORM BSXX_UPDATE USING 'BSAS'.
        ENDLOOP.
        PERFORM WRITE_LIST_PROTOCOL.
        COMMIT WORK.
      ENDDO.
      PERFORM WRITE_PROTOCOL.
    END-OF-SELECTION.
      PERFORM CHANGE_ACCOUNT.
      PERFORM DEQUEUE_ACCOUNT.
    TOP-OF-PAGE.
      ULINE.
      WRITE:/   SY-VLINE,
             2  TEXT-001,
             25 P_SAKNR INTENSIFIED OFF,
             80 SY-VLINE.
      WRITE:/   SY-VLINE,
             2  TEXT-002,
             25 P_BUKRS INTENSIFIED OFF,
             80 SY-VLINE.
      ULINE.
      IF P_LISTE = 'X'.
        WRITE:/          SY-VLINE,
                  2(10)  TEXT-S01 COLOR COL_HEADING,
                  12     SY-VLINE,
                  13(4)  TEXT-S02 COLOR COL_HEADING,
                  17     SY-VLINE,
                  18(62) TEXT-S03 COLOR COL_HEADING,
                  80     SY-VLINE.
      ENDIF.
    *&      Form  SELECT_ITEMS
    FORM SELECT_ITEMS USING TABLE TYPE C
                            FILL  LIKE SY-TFILL.
      SELECT * FROM (TABLE) INTO TABLE T_BSXX
                            UP TO D_MAX ROWS
                           WHERE BUKRS EQ P_BUKRS
                             AND HKONT EQ P_SAKNR
                             AND BELNR IN P_BELNR
                             AND XOPVW EQ SPACE.
      FILL = SY-DBCNT.
    *--- PROTOCOL -
      LOOP AT T_BSXX.
        PERFORM SAVE_PROTOCOL USING T_BSXX-BELNR T_BSXX-GJAHR
                                    1 TABLE CHAR_S 1.
      ENDLOOP.
      SORT T_BSXX BY MANDT BUKRS BELNR GJAHR.
    ENDFORM.                               " SELECT_ITEMS
    *&      Form  BSEG_UPDATE
    FORM BSEG_UPDATE.
      SELECT SINGLE * FROM BSEG WHERE BUKRS = T_BSXX-BUKRS
                                AND   GJAHR = T_BSXX-GJAHR
                                AND   BELNR = T_BSXX-BELNR
                                AND   BUZEI = T_BSXX-BUZEI.
      IF BSEG-KTOSL = 'MVA' OR BSEG-KTOSL = 'VVA'.
        MESSAGE A145(FH) WITH BSEG-HKONT.
      ENDIF.
      IF BSEG-KOART = 'M'.
        MESSAGE A144(FH) WITH P_SAKNR BSEG-BSCHL.
      ENDIF.
      UPDATE BSEG SET XOPVW = 'X'
                WHERE BUKRS EQ T_BSXX-BUKRS
                  AND GJAHR EQ T_BSXX-GJAHR
                  AND BELNR EQ T_BSXX-BELNR
                  AND BUZEI EQ T_BSXX-BUZEI.
    *--- PROTOCOL -
      PERFORM SAVE_PROTOCOL USING T_BSXX-BELNR T_BSXX-GJAHR
                                  2 'BSEG' CHAR_U SY-DBCNT.
    ENDFORM.                               " BSEG_UPDATE
    *&      Form  BSIS_UPDATE
    FORM BSXX_UPDATE USING TABLE TYPE C.
      T_BSXX-XOPVW = 'X'.
      IF D_STORNO = 'X' AND TABLE = 'BSIS'."<<<< INSERT - NOTE 70203
        T_BSXX-XSTOV = SPACE.              "<<<< INSERT - NOTE 70203
      ENDIF.                               "<<<< INSERT - NOTE 70203
      UPDATE (TABLE) FROM T_BSXX.
    *--- PROTOCOL -
      PERFORM SAVE_PROTOCOL USING T_BSXX-BELNR T_BSXX-GJAHR
                                  1 TABLE CHAR_U SY-DBCNT.
    ENDFORM.                               " BSIS_UPDATE
    *&      Form  CHECK_ACCOUNT_BALANCE
    FORM CHECK_ACCOUNT_BALANCE.
      DATA:   D_GJAHR LIKE BSEG-GJAHR.
    Account balance
      PERFORM READ_T001 USING P_BUKRS.
      PERFORM READ_CURRENT_YEAR CHANGING D_GJAHR.
      PERFORM READ_GLDB USING P_BUKRS P_SAKNR D_GJAHR.
      PERFORM READ_BSIS USING P_BUKRS P_SAKNR.
      IF BALANCE_ITEMS NE BALANCE_ACCOUNT.
        MESSAGE E099.
      Summe der Einzelposten stimmt nicht mit Kontensaldo überein. ->
      ENDIF.
    ENDFORM.                               " CHECK_ACCOUNT_BALANCE
    *&      Form  READ_T001
    FORM READ_T001 USING BUKRS LIKE T001-BUKRS.
      SELECT SINGLE * FROM T001 WHERE BUKRS = BUKRS.
      IF SY-SUBRC <> 0.
        MESSAGE E001 WITH BUKRS.
      ENDIF.
    ENDFORM.                               " READ_T001
    *&      Form  READ_CURRENT_YEAR
    FORM READ_CURRENT_YEAR CHANGING GJAHR LIKE T009B-BDATJ.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
           EXPORTING
                I_DATE         = SY-DATUM
                I_PERIV        = T001-PERIV
           IMPORTING
                E_GJAHR        = GJAHR
           EXCEPTIONS
                T009_NOTFOUND  = 1
                INPUT_FALSE    = 1
                T009B_NOTFOUND = 1.
    ENDFORM.                               " READ_CURRENT_YEAR
    *&      Form  READ_GLDB
    FORM READ_GLDB USING XBUKRS LIKE GLT0-BUKRS
                         XSAKNR LIKE GLT0-RACCT
                         XGJAHR LIKE GLT0-RYEAR.
      SELECT * FROM GLT0
               WHERE RLDNR = '00'
               AND   RRCTY = '0'
               AND   RVERS = '001'
               AND   BUKRS = XBUKRS
               AND   RYEAR = XGJAHR
               AND   RACCT = XSAKNR.
        PERFORM CALCULATE_BALANCE.
      ENDSELECT.
    ENDFORM.                               " READ_GLDB
          FORM CALCULATE_BALANCE                                        *
    FORM CALCULATE_BALANCE.
      DATA: BALANCE  LIKE GLT0-TSL01.
      BALANCE_ACCOUNT = BALANCE_ACCOUNT + GLT0-HSLVT.
      DO GLT0-RPMAX TIMES
         VARYING BALANCE FROM GLT0-HSL01 NEXT GLT0-HSL02.
        BALANCE_ACCOUNT = BALANCE_ACCOUNT + BALANCE.
      ENDDO.
    ENDFORM.                               " CALCULATE_BALANCE
    *&      Form  READ_BSIS
    FORM READ_BSIS USING BUKRS LIKE BSIS-BUKRS
                         SAKNR LIKE BSIS-HKONT.
      SELECT * FROM  BSIS
             WHERE  BUKRS = BUKRS
             AND    HKONT = SAKNR.
        IF BSIS-SHKZG = 'S'.
          BALANCE_ITEMS = BALANCE_ITEMS  + BSIS-DMBTR.
        ELSE.
          BALANCE_ITEMS = BALANCE_ITEMS  - BSIS-DMBTR.
        ENDIF.
      ENDSELECT.
    ENDFORM.                               " READ_BSIS
    *&      Form  CHANGE_ACCOUNT
    FORM CHANGE_ACCOUNT.
      SKB1       = *SKB1.
      SKB1-XOPVW = 'X'.
      OBJECTID    = T001-KTOPL.
      OBJECTID+4  = SKB1-SAKNR.
      OBJECTID+14 = SKB1-BUKRS.
      UPD_SKB1    = 'U'.
      UTIME       = SY-UZEIT.
      UDATE       = SY-DATUM.
      USERNAME    = SY-UNAME.
      PERFORM CD_CALL_SACH.
      CALL FUNCTION 'GL_ACCOUNT_IN_COMPANY_UPDATE'
           EXPORTING
                I_SKB1 = SKB1.
      COMMIT WORK.
    ENDFORM.                               " CHANGE_ACCOUNT
    *&      Form  ENQUEUE_ACCOUNT
    FORM ENQUEUE_ACCOUNT.
      CALL FUNCTION 'ENQUEUE_EFSKB1'
           EXPORTING
                BUKRS          = P_BUKRS
                SAKNR          = P_SAKNR
           EXCEPTIONS
                FOREIGN_LOCK   = 1
                SYSTEM_FAILURE = 2.
      CASE SY-SUBRC.
        WHEN 1.
          MESSAGE E042 WITH P_SAKNR P_BUKRS.
        WHEN 2.
          MESSAGE E038 WITH P_SAKNR P_BUKRS.
      ENDCASE.
    ENDFORM.                               " ENQUEUE_ACCOUNT
    *&      Form  DEQUEUE_ACCOUNT
    FORM DEQUEUE_ACCOUNT.
      CALL FUNCTION 'DEQUEUE_EFSKB1'
           EXPORTING
                BUKRS          = P_BUKRS
                SAKNR          = P_SAKNR
           EXCEPTIONS
                SYSTEM_FAILURE = 1.
    ENDFORM.                               " DEQUEUE_ACCOUNT
          FORM WRITE_LIST_PROTOCOL                                      *
          writes list protocol                                          *
    FORM WRITE_LIST_PROTOCOL.
      DATA: TEXT(62)   TYPE C,
            SAVE_BELNR LIKE BKPF-BELNR.
      DESCRIBE TABLE T_LISTE LINES SY-TFILL.
      CHECK P_LISTE = 'X'.
      CHECK SY-TFILL > 0.
      SORT T_LISTE BY GJAHR BELNR SORT TYPE.
      LOOP AT T_LISTE.
        CHECK T_LISTE-OK = 1.
        CASE T_LISTE-TABLE.
          WHEN 'BSEG'.
            CASE T_LISTE-TYPE.
              WHEN CHAR_S.
                TEXT = TEXT-BE1.
              WHEN CHAR_U.
                TEXT = TEXT-BE2.
            ENDCASE.
          WHEN 'BSIS'.
            CASE T_LISTE-TYPE.
              WHEN CHAR_S.
                TEXT = TEXT-XX1.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
              WHEN CHAR_U.
                TEXT = TEXT-XX2.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
              WHEN CHAR_I.
                TEXT = TEXT-XX3.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
            ENDCASE.
          WHEN 'BSAS'.
            CASE T_LISTE-TYPE.
              WHEN CHAR_S.
                TEXT = TEXT-XX1.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
              WHEN CHAR_U.
                TEXT = TEXT-XX2.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
              WHEN CHAR_I.
                TEXT = TEXT-XX3.
                REPLACE '&TAB' WITH T_LISTE-TABLE INTO TEXT.
            ENDCASE.
        ENDCASE.
        AT NEW BELNR.
          ULINE.
          WRITE:/       SY-VLINE,
                  2     T_LISTE-BELNR COLOR COL_KEY,
                  12    SY-VLINE,
                  13    T_LISTE-GJAHR COLOR COL_KEY,
                  17    SY-VLINE.
        ENDAT.
        IF SAVE_BELNR <> T_LISTE-BELNR.
          WRITE: 18(62) TEXT COLOR COL_NORMAL INTENSIFIED OFF,
                    80  SY-VLINE.
          SAVE_BELNR = T_LISTE-BELNR.
        ELSE.
          WRITE:/       SY-VLINE,
                 12     SY-VLINE,
                 17     SY-VLINE,
                 18(62) TEXT COLOR COL_NORMAL INTENSIFIED OFF,
                 80     SY-VLINE.
        ENDIF.
      ENDLOOP.
      ULINE.
    ENDFORM.                               " WRITE_LIST_PROTOCOL
          FORM WRITE_PROTOCOL                                           *
          writes normal protocol                                        *
    FORM WRITE_PROTOCOL.
      DATA: TEXT(62)   TYPE C.
    *- selected items-----
      IF NOT ( NUM_BSIS_SELECT = 0  ).
        TEXT = TEXT-NX1.
        REPLACE '&TAB' WITH 'BSIS' INTO TEXT.
        WRITE:/        SY-VLINE,
                2(58)  TEXT COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSIS_SELECT COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
      IF NOT ( NUM_BSAS_SELECT = 0 ).
        TEXT = TEXT-NX1.
        REPLACE '&TAB' WITH 'BSAS' INTO TEXT.
        WRITE:/        SY-VLINE,
                2(58)  TEXT COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSAS_SELECT COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
      IF NOT ( NUM_BSEG_SELECT = 0 ).
        WRITE:/       SY-VLINE,
                2(58) TEXT-NB1 COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSEG_SELECT COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
    *- changed items-----
      IF NUM_BSIS_UPDATE > 0.
        TEXT = TEXT-NX2.
        REPLACE '&TAB' WITH 'BSIS' INTO TEXT.
        WRITE:/        SY-VLINE,
                 2(58) TEXT COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSIS_UPDATE COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
      IF NUM_BSAS_UPDATE > 0.
        TEXT = TEXT-NX2.
        REPLACE '&TAB' WITH 'BSAS' INTO TEXT.
        WRITE:/        SY-VLINE,
                 2(58) TEXT COLOR COL_KEY INTENSIFIED ON,
                 60(1)  SY-VLINE,
                 61(19) NUM_BSAS_UPDATE COLOR COL_NORMAL INTENSIFIED OFF,
                 80     SY-VLINE.
      ENDIF.
      IF NUM_BSEG_UPDATE > 0.
        WRITE:/        SY-VLINE,
                 2(58) TEXT-NB2 COLOR COL_KEY INTENSIFIED ON,
                60(1)  SY-VLINE,
                61(19) NUM_BSEG_UPDATE COLOR COL_NORMAL INTENSIFIED OFF,
                80     SY-VLINE.
      ENDIF.
      ULINE.
      ADD NUM_BSIS_SELECT TO NUM_BSAS_SELECT.
      IF NUM_BSAS_SELECT = 0.
        ULINE.
        WRITE:/       SY-VLINE,
                2(78) TEXT-NSB COLOR COL_NEGATIVE,
                80    SY-VLINE.
        ULINE.
      ENDIF.
    ENDFORM.
    *>>>> BEGIN OF INSERTION - NOTE 66156
    *&      Form  CHECK_ACCOUNT_BALANCE_2
    FORM CHECK_ACCOUNT_BALANCE_2.
      DATA:   D_GJAHR LIKE BSEG-GJAHR.
    Account balance
      PERFORM READ_T001 USING P_BUKRS.
      PERFORM READ_CURRENT_YEAR CHANGING D_GJAHR.
      PERFORM READ_CURRENCY_T001A USING P_BUKRS.
    Transaktionswährung & Hauswährung
      PERFORM READ_GLDB_2 USING P_BUKRS P_SAKNR D_GJAHR.
      PERFORM READ_BSIS_2 USING P_BUKRS P_SAKNR.
    BEGIN OF INSERTION
      LOOP AT T_BALANCE_ITEMS_TW WHERE VALUE = 0.
        DELETE T_BALANCE_ITEMS_TW.
      ENDLOOP.
      LOOP AT T_BALANCE_ACCOUNT_TW WHERE VALUE = 0.
        DELETE T_BALANCE_ACCOUNT_TW.
      ENDLOOP.
      LOOP AT T_BALANCE_ITEMS_HW WHERE VALUE1 = 0
                                 AND   VALUE2 = 0
                                 AND   VALUE3 = 0.
        DELETE T_BALANCE_ITEMS_HW.
      ENDLOOP.
      LOOP AT T_BALANCE_ACCOUNT_HW WHERE VALUE1 = 0
                                   AND   VALUE2 = 0
                                   AND   VALUE3 = 0.
        DELETE T_BALANCE_ACCOUNT_HW.
      ENDLOOP.
    END OF INSERTION
      IF T_BALANCE_ITEMS_HW[] <> T_BALANCE_ACCOUNT_HW[] OR
         T_BALANCE_ITEMS_TW[] <> T_BALANCE_ACCOUNT_TW[].
        PERFORM DEQUEUE_ACCOUNT.
        MESSAGE E099.
      Summe der Einzelposten stimmt nicht mit Kontensaldo überein. ->
      ENDIF.
    ENDFORM.                               " CHECK_ACCOUNT_BALANCE_2
    *&      Form  READ_GLDB_2
    FORM READ_GLDB_2 USING XBUKRS LIKE GLT0-BUKRS
                           XSAKNR LIKE GLT0-RACCT
                           XGJAHR LIKE GLT0-RYEAR.
      DATA: TYPE(3) TYPE C,
            CURT    LIKE BK_METHODE-CURT1.
      DATA: RESULT LIKE T_BALANCE_ACCOUNT_TW OCCURS 1 WITH HEADER LINE.
      CLEAR T_BALANCE_ACCOUNT_TW.
      CLEAR T_BALANCE_ACCOUNT_HW.
    Transaktionswährung
      CLEAR RESULT. REFRESH RESULT.
      CLEAR XGLEDTAB. REFRESH XGLEDTAB.
      TYPE = 'TW'.
      XGLEDTAB-RLDNR      = '00'.
      APPEND XGLEDTAB.
      PERFORM READ_LEDGER TABLES RESULT XGLEDTAB
                                  USING XBUKRS XSAKNR XGJAHR TYPE.
      LOOP AT RESULT.
        T_BALANCE_ACCOUNT_TW-WAERS = RESULT-WAERS.
        T_BALANCE_ACCOUNT_TW-VALUE = RESULT-VALUE.
        APPEND T_BALANCE_ACCOUNT_TW.
      ENDLOOP.
    1. Hauswährung
      CLEAR RESULT. REFRESH RESULT.
      CLEAR XGLEDTAB. REFRESH XGLEDTAB.
      TYPE = 'HW1'.
      CURT = BK_METHODE-CURT1.
      XGLEDTAB-RLDNR      = '00'.
      APPEND XGLEDTAB.
      PERFORM READ_LEDGER TABLES RESULT XGLEDTAB
                                  USING XBUKRS XSAKNR XGJAHR TYPE.
      READ TABLE RESULT INDEX 1.
      T_BALANCE_ACCOUNT_HW-WAERS1 = RESULT-WAERS.
      T_BALANCE_ACCOUNT_HW-VALUE1 = RESULT-VALUE.
    *2. Hauswährung
      IF BK_METHODE-CURT2 <> SPACE.
        CLEAR RESULT. REFRESH RESULT.
        CLEAR XGLEDTAB. REFRESH XGLEDTAB.
        TYPE = 'HW2'.
        CURT = BK_METHODE-CURT2.
        IF CURT = '30'.
          XGLEDTAB-RLDNR      = '00'.
          XGLEDTAB-CURRNUMBER = '3'.
        ELSE.
          CALL FUNCTION 'G_GIVE_LEDGERS_FOR_GLT0'
               EXPORTING
                    BUKRS  = XBUKRS
                    CURTP  = CURT
               TABLES
                    LEDTAB = XGLEDTAB.
          DESCRIBE TABLE XGLEDTAB LINES SY-TFILL.
          IF SY-TFILL GT 1. SORT XGLEDTAB. ENDIF.
          READ TABLE XGLEDTAB INDEX 1.
        ENDIF.
        PERFORM READ_LEDGER TABLES RESULT XGLEDTAB
                                    USING XBUKRS XSAKNR XGJAHR TYPE.
        READ TABLE RESULT INDEX 1.
        T_BALANCE_ACCOUNT_HW-WAERS2 = RESULT-WAERS.
        T_BALANCE_ACCOUNT_HW-VALUE2 = RESULT-VALUE.
      ENDIF.
      IF BK_METHODE-CURT3 <> SPACE.
    *3. Hauswährung
        CLEAR RESULT. REFRESH RESULT.
        CLEAR XGLEDTAB. REFRESH XGLEDTAB.
        TYPE = 'HW3'.
        CURT = BK_METHODE-CURT3.
        IF CURT = '30'.
          XGLEDTAB-RLDNR      = '00'.
          XGLEDTAB-CURRNUMBER = '3'.
        ELSE.
          CALL FUNCTION 'G_GIVE_LEDGERS_FOR_GLT0'
               EXPORTING
                    BUKRS  = XBUKRS
                    CURTP  = CURT
               TABLES
                    LEDTAB = XGLEDTAB.
          DESCRIBE TABLE XGLEDTAB LINES SY-TFILL.
          IF SY-TFILL GT 1. SORT XGLEDTAB. ENDIF.
          READ TABLE XGLEDTAB INDEX 1.
        ENDIF.
        PERFORM READ_LEDGER TABLES RESULT XGLEDTAB
                             USING XBUKRS XSAKNR XGJAHR TYPE.
        READ TABLE RESULT INDEX 1.
        T_BALANCE_ACCOUNT_HW-WAERS3 = RESULT-WAERS.
        T_BALANCE_ACCOUNT_HW-VALUE3 = RESULT-VALUE.
      ENDIF.
      APPEND T_BALANCE_ACCOUNT_HW.
      SORT T_BALANCE_ACCOUNT_TW.
    ENDFORM.                               " READ_GLDB_2
    *&      Form  READ_BSIS_2
    FORM READ_BSIS_2 USING BUKRS LIKE BSIS-BUKRS
                           SAKNR LIKE BSIS-HKONT.
      CLEAR T_BALANCE_ITEMS_HW. REFRESH T_BALANCE_ITEMS_HW.
      CLEAR T_BALANCE_ITEMS_TW. REFRESH T_BALANCE_ITEMS_TW.
      SELECT * FROM  BSIS
             WHERE  BUKRS = BUKRS
             AND    HKONT = SAKNR.
        IF ( BSIS-PSWSL IS INITIAL OR BSIS-PSWBT IS INITIAL ) AND
             BSIS-XARCH NE 'X'.
          SELECT SINGLE * FROM BSEG WHERE BUKRS = BSIS-BUKRS
                                    AND   BELNR = BSIS-BELNR
                                    AND   GJAHR = BSIS-GJAHR
                                    AND   BUZEI = BSIS-BUZEI.
          IF SY-SUBRC <> 0.
            MESSAGE A500(FE) WITH 'BSEG nicht gefunden'.        "#EC NOTEXT
          ENDIF.
          BSIS-PSWSL = BSEG-PSWSL.
          BSIS-PSWBT = BSEG-PSWBT.
        ENDIF.
        IF BSIS-SHKZG = 'S'.
          T_BALANCE_ITEMS_HW-WAERS1 = BK_METHODE-HWAE1.
          T_BALANCE_ITEMS_HW-WAERS2 = BK_METHODE-HWAE2.
          T_BALANCE_ITEMS_HW-WAERS3 = BK_METHODE-HWAE3.
          T_BALANCE_ITEMS_HW-VALUE1 = BSIS-DMBTR.
          T_BALANCE_ITEMS_HW-VALUE2 = BSIS-DMBE2.
          T_BALANCE_ITEMS_HW-VALUE3 = BSIS-DMBE3.
          T_BALANCE_ITEMS_TW-WAERS  = BSIS-PSWSL.
          T_BALANCE_ITEMS_TW-VALUE  = BSIS-PSWBT.
        ELSE.
          T_BALANCE_ITEMS_HW-WAERS1 = BK_METHODE-HWAE1.
          T_BALANCE_ITEMS_HW-WAERS2 = BK_METHODE-HWAE2.
          T_BALANCE_ITEMS_HW-WAERS3 = BK_METHODE-HWAE3.
          T_BALANCE_ITEMS_HW-VALUE1 = - BSIS-DMBTR.
          T_BALANCE_ITEMS_HW-VALUE2 = - BSIS-DMBE2.
          T_BALANCE_ITEMS_HW-VALUE3 = - BSIS-DMBE3.
          T_BALANCE_ITEMS_TW-WAERS  = BSIS-PSWSL.
          T_BALANCE_ITEMS_TW-VALUE  = - BSIS-PSWBT.
        ENDIF.
        COLLECT T_BALANCE_ITEMS_HW.
        COLLECT T_BALANCE_ITEMS_TW.
      ENDSELECT.
      SORT T_BALANCE_ITEMS_TW.
    ENDFORM.                               " READ_BSIS_2
    *&      Form  CHECK_ACCOUNT2
          Check some things for XOPVW
    FORM CHECK_ACCOUNT2.
      TABLES: TBSL, T030.
      DATA: CHECK_BSCHL LIKE BSIS-BSCHL OCCURS 10 WITH HEADER LINE.
    Belege schon archiviert?
      SELECT * FROM BSIS WHERE BUKRS EQ P_BUKRS
                         AND   HKONT EQ P_SAKNR
                         AND   XARCH EQ 'X'.
        MESSAGE E146.
       Es sind schon Belege archiviert worden. Änderung ist nicht möglich
      ENDSELECT.
    Vorgangsschlüssel MVA und VVA sind nicht erlaubt.
      SELECT * FROM T030 WHERE KTOPL = T001-KTOPL
                          AND  ( KTOSL = 'MVA' OR KTOSL = 'VVA' ).
        IF T030-KONTS = P_SAKNR OR T030-KONTH = P_SAKNR.
          MESSAGE E145(FH) WITH P_SAKNR.
       Konto wird in Kontenfindung für Vorgang MVA oder VVA verwendet
        ENDIF.
      ENDSELECT.
    Buchungsschlüsseln dürfen nicht für KOART = M sein
      SELECT BSCHL INTO TABLE CHECK_BSCHL FROM BSIS
                                          WHERE BUKRS EQ P_BUKRS
                                          AND   HKONT EQ P_SAKNR.
      SORT CHECK_BSCHL.
      DELETE ADJACENT DUPLICATES FROM CHECK_BSCHL.
      LOOP AT CHECK_BSCHL.
        SELECT SINGLE KOART INTO TBSL-KOART FROM TBSL
                                            WHERE BSCHL = CHECK_BSCHL.
        IF SY-SUBRC NE 0.
          MESSAGE E143(FH) WITH CHECK_BSCHL.
         Verwendeter Buchungsschlüssel & ist nicht mehr in der Kontenfindu
        ELSEIF TBSL-KOART = 'M'.
          MESSAGE E144(FH) WITH P_SAKNR CHECK_BSCHL.
          Konto & kann nicht geändert werden -> Langtext
        ENDIF.
      ENDLOOP.
    ENDFORM.                               " CHECK_ACCOUNT2
    *>>>> END OF INSERTION - NOTE 66156 <<<<
    INCLUDE FSACHCDC.
    INCLUDE EPA00F00.
    *&      Form  READ_CURRENCY_T001A
    FORM READ_CURRENCY_T001A USING P_BUKRS LIKE T001-BUKRS.
      TABLES: X001.
      CALL FUNCTION 'FI_CURRENCY_INFORMATION'
           EXPORTING
                I_BUKRS                = P_BUKRS
           IMPORTING
                E_X001                 = X001
           EXCEPTIONS
                CURRENCY_2_NOT_DEFINED = 1
                CURRENCY_3_NOT_DEFINED = 2
                OTHERS                 = 6.
      BK_METHODE-HWAE1 = T001-WAERS.
      BK_METHODE-HWAE2 = X001-HWAE2.
      BK_METHODE-HWAE3 = X001-HWAE3.
      BK_METHODE-CURT1 = '10'.
      BK_METHODE-CURT2 = X001-CURT2.
      BK_METHODE-CURT3 = X001-CURT3.
    ENDFORM.                               " READ_CURRENCY_T001A
    *&      Form  READ_LEDGER
    FORM READ_LEDGER TABLES   RESULT      STRUCTURE T_BALANCE_ACCOUNT_TW
                              XGLEDTAB    STRUCTURE GLEDTAB
                     USING    XBUKRS      LIKE      GLT0-BUKRS
                              XSAKNR      LIKE      GLT0-RACCT
                              XGJAHR      LIKE      GLT0-RYEAR
                              TYPE        TYPE      C.
      DATA: BALANCE LIKE GLT0-TSLVT.
      DATA:    I_GJAHR     LIKE GLT0-RYEAR.
      STATICS: I_RECURSIV  TYPE I.
      CHECK I_RECURSIV < 2.
      CLEAR RESULT. REFRESH RESULT.
      READ TABLE XGLEDTAB INDEX 1.
      SELECT * FROM GLT0
               WHERE RLDNR = XGLEDTAB-RLDNR
               AND   RRCTY = '0'
               AND   RVERS = '001'
               AND   BUKRS = XBUKRS
               AND   RYEAR = XGJAHR
               AND   RACCT = XSAKNR.
        CASE TYPE.
          WHEN 'TW'.
            RESULT-WAERS = GLT0-RTCUR.
            RESULT-VALUE = GLT0-TSLVT.
            DO GLT0-RPMAX TIMES
               VARYING BALANCE FROM GLT0-TSL01 NEXT GLT0-TSL02.
              RESULT-VALUE = RESULT-VALUE + BALANCE.
            ENDDO.
          WHEN 'HW1'.
            RESULT-WAERS = BK_METHODE-HWAE1.
            RESULT-VALUE = GLT0-HSLVT.
            DO GLT0-RPMAX TIMES
               VARYING BALANCE FROM GLT0-HSL01 NEXT GLT0-HSL02.
              RESULT-VALUE = RESULT-VALUE + BALANCE.
            ENDDO.
          WHEN 'HW2' OR 'HW3'.
            IF XGLEDTAB-CURRNUMBER = '3'.
              GLT0-HSLVT   = GLT0-KSLVT.
              GLT0-HSL01 = GLT0-KSL01. GLT0-HSL02 = GLT0-KSL02.
              GLT0-HSL03 = GLT0-KSL03. GLT0-HSL04 = GLT0-KSL04.
              GLT0-HSL05 = GLT0-KSL05. GLT0-HSL06 = GLT0-KSL06.
              GLT0-HSL07 = GLT0-KSL07. GLT0-HSL08 = GLT0-KSL08.
              GLT0-HSL09 = GLT0-KSL09. GLT0-HSL10 = GLT0-KSL10.
              GLT0-HSL11 = GLT0-KSL11. GLT0-HSL12 = GLT0-KSL12.
              GLT0-HSL13 = GLT0-KSL13. GLT0-HSL14 = GLT0-KSL14.
              GLT0-HSL15 = GLT0-KSL15. GLT0-HSL16 = GLT0-KSL16.
            ENDIF.
            IF TYPE = 'HW2'.
              RESULT-WAERS = BK_METHODE-HWAE2.
            ELSE.
              RESULT-WAERS = BK_METHODE-HWAE3.
            ENDIF.
            RESULT-VALUE = GLT0-HSLVT.
            DO GLT0-RPMAX TIMES
               VARYING BALANCE FROM GLT0-HSL01 NEXT GLT0-HSL02.
              RESULT-VALUE = RESULT-VALUE + BALANCE.
            ENDDO.
        ENDCASE.
        COLLECT RESULT.
      ENDSELECT.
      IF SY-SUBRC = 0.
        CLEAR I_RECURSIV.
      ELSE.
        ADD 1 TO I_RECURSIV.
        I_GJAHR = XGJAHR - 1.
        PERFORM READ_LEDGER TABLES  RESULT
                                    XGLEDTAB
                            USING   XBUKRS
                                    XSAKNR
                                    I_GJAHR
                                    TYPE.
      ENDIF.
    ENDFORM.                               " READ_LEDGER
    BEGIN OF INSERTION - NOTE 70203
    *&      Form  BKPF_UPDATE                   P30K137533
    FORM BKPF_UPDATE.
    *--- Stornovormerkung löschen? -
      CLEAR D_STORNO.
      SELECT SINGLE * FROM BKPF WHERE BUKRS = T_BSXX-BUKRS
                                AND   GJAHR = T_BSXX-GJAHR
                                AND   BELNR = T_BSXX-BELNR.
      IF BKPF-STBLG NE SPACE.
        D_STORNO = 'X'.
      ENDIF.
    ENDFORM.                               " BKPF_UPDATE
    END OF INSERTION - NOTE 70203
    If you find solution to your answer donot forget to reward points
    Regards

  • Electronic banking

    Because of a bank requirement I had to modifi our document numbers on the invoice outputs to include an extra character at the end. Example 85130000762 (2 being the check digit based on the Modulus 10 methodology).
    By default this is also the number that appears on the Note to Payee field when I process the electronic bank statement but because our document numbers only contains 10 characters the automatic clearing of the AR sub ledger fails. Could I use Search Strings to ignore the last character (check digit) on the document number? Could someone please advise me!

    Hi Frank.
    Go to the following node
    Financial accounting >Bank Accounting> Business Transaction -->Payment Transaction --> Electronic Bank Statement -->Define search string for electronic bank statement.
    In the resulting screen perform the following steps
    1. Create a new entry (in Search string definition node)
    2. Specify a string name
    3. provide a description for the string
    4. In search string type 11 # sign (like ###########)
    5. You will get this strings updated in the mapping column down.
    6. In the table below you will find the target field empty. Update all the fields up to 10 digit with #. Leave the 11th field blank.
    7.  Now you can update some entry in the Enter text field and see what the system will give as the search result. (note the enter text is the note to payee entry in your electronic bank statement)
    Once the above step is done and tested your string is ready. Now you can assign this string to you company code and house bank by selecting the search string use in the left side tree.
    Once this assignment is done your issue should be solved.
    Hope it helps. Let me know if you need any further clarification.
    Note: Please go through the SAP Documentation against Define search string for electronic bank statement in the IMG node it has lot of information and it will make you understand the algorithm perfectly.  
    Regards
    Naveen
    Edited by: Naveen Singh on Jul 5, 2011 10:37 PM

  • Electronic Bank Reconciliation

    Dears,
    We are on our way to implement electronic bank reconciliation in our SAP system.
    However, there are certain points I am not very clear. Could you please offer your valuable comments:
    WE understand that we can download the data from the Bank in approved data format such as (BAI, MT*, etc.) and directly upload into the system.
    But what is the difference between these:
    - What is MT100 & MT940 format ?
    - Do they serve the same purpose ?
    We are planning to use MT940 Statement uploading.

    Hello Nikitha,
    Please refer below mentioned links and documents it will help you to understand.
    What is a swift message mt940 - 1Q5A
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20d2f203-4959-2e10-239f-bce48eef858d?overridelayout=t…
    Regards,
    Basappa

  • Customer enhancements in electronic bank statement

    Hello Guys,
    I have the following requirement for electronic Bank statement regarding customer incoming payments operations:
    I need to clear Customer open items based on the bank data: the system should find the customer code based on his bank account number and clear the open items for this customer based on the amount and other text elements.
    Do you know if I can use an existing function module or program to do so?
    Thank you in advance for your help
    Best regards
    Pascal.

    Why post to the clearing account? You can directly post to the customer account.
    Debit Bank
    Credit customer
    For this you have to create a posting rule which will be linked to the external code (BAI code if you are getting the bank statement in BAI format) and the posting rule should have 'standard algorithm' assigned to it.
    Then while uploading the bank statement you have to give the range of customer invoice numbers against BELNR or XBELNR. The system will automatically identify the customer based on the invoice number on Record type 16 appearing in Bank statement and clear the open item and generate the above accounting entry.
    For a detailed description of how the EBS works, please see the thread titled EBS posted by Sheena Mehta and answered by me.

  • Electronic bank statement with CTX payment advice

    Hi:
    I'm trying to figure out how I can process an electronic bank statement that contains the payment advice embedded as a CTX addendum. I'm finding info how to issue an ACH and add the CTX addendi. But how can I process it when that info comes back from the bank on the electronic bank statement and I'm on the receiving end of that transaction?
    Of course I'm looking to clear the corresponding customer open items along the provided payment advice info.
    I do see an interpretation algorithm 032, which will look at a payment advice that has already been received prior to the bank statement. That's close, but not quite it.
    Maybe the answer is 'functionality not available in SAP standard' and that will be just fine. I've got the list of all the various enhancement points for the process and if that's the route I need to take, I'll be on my merry enhancing way...
    Any pointers highly welcome!
    Thanks
    Stephen

    Hello,
    From FF.5, if you are using interpretation algorithms 11, 12 or 13,
    the check encashment date ( PAYR-BANCD ) will be updated in PAYR when
    the check is neither voided nor cashed. The relevant code is as under
    RFEBBU10. Source Code :
    CASE FEBEP-INTAG.
          WHEN '000'.                 <- A when for every Int. Algorithm
          WHEN '011'.
                PERFORM SEARCH_CHECK_IN_PAYR.
    FORM SEARCH_CHECK_IN_PAYR.
      check is not voided nor cashed
        SELECT SINGLE * FROM BKPF WHERE BUKRS = FEBKO-BUKRS
                                    AND BELNR = PAYR-VBLNR
                                    AND GJAHR = PAYR-GJAHR.
        IF SY-SUBRC = 0.
          PAYR-XBANC = 'X'.
          PAYR-BANCD = FEBEP-VALUT.
      So, the field PAYR-BANC is always updated with FEBEP-VALUT
      (Value Date) and there is no standard way to avoid it.
    If the check number in the statement is wrong, then the interpretation
    algorithm could not update the encashment date. The interpretation
    algorithm run only when the electronic bank statement is loaded
    (hence only once) and not when FEBA is processed.
    In FEBA (SAPMF40A), there is no further update in PAYR, and hence you
    need to go to the Cheque Register and change the date manually in this case.
    Check Note 115147 for further information.
    Regards,
    REnan

  • Electronic Bank Statment/MT940

    hi Guru,
    i am configuring Electronic Bank statement for my company and facing a scenario.
    we make payment to our employees for re-imbursment of their expenses. it is done through straight to bank facility of standard chartered bank. we make payment in SAP employee code wise and update a batch in bank (S2B).
    Bank use 508 swift code for such payments and in string 61 after N508 it is updating its own reference and our our employee reference is being updated in string 86
    i have following Questions
    what configuration /interpretation algorithm should i use to auto clear such payment as by using 015 interpretaion algorithm i am not able to auto clear the outgoing bank
    second have i write a search string to read the data form stirng 86 instead of 61. if yes please give me step to step solution
    my solution is ready to deliever and i am stuck on tihs point. if it is not done all my effort will be in vain
    i am expecting very quick slution as ever
    BR
    Sajida

    Hi Sajida,
    Request you to go through the below link:
    http://scn.sap.com/docs/DOC-54815
    Please let us know if you have some specific scenario.
    Thanks,
    Vishal

  • Issue with electronic bank statement upload

    Hi All,
              Presently I face an inssue in posting electronic bank statement upload (Tcode - ff_5).
    The scenario goes like this.
             First we do payment to vendor using 'f110' transaction.Here the document currency is different from local currency.Let us say we paid 100 EBP i.e, approximately 177 USD.
    After the payment we get statement from Bank (in this case BAI format).In the bank statement due to exchange rate difference the amount will not be exactly 177 USD but slightly different like 185 USD or may be 170 USD.
           At this point we have to upload this statement using transaction 'FF_5' to system.Here obviously the differential amount goes to the system ( 185 USD or 170 USD).
    Now the issue is we have to post this difference amount like USD 8 or USD 7 to a specific GL account ( 11800 or any other GL acc number ).
    The 'FF_5' transaction updates the tables 'FEBKO,FEBEP' by using the programs 'RFEBBU00',
    'RFEBBU10'.There is an exit also like 'FEB00001'. We can put this difference amount in one of the fields of FEBEP table by using this exit.
       But the point I don't know is how to post this difeerence amount 8 or 7 USD to a specific G/l account ? I could not locate in the above program 'RFEBBU00' where the posting happens ?
    Thanks for any help.
    Vinod.

    Hi Sharaad & Naga,
                         Thanks for the replies.One more doubt, Will I have to use these function modules inside the exit or do I need to change the sap standard program to incorporate these FM calls ?
    Thanks
    Vinod.

  • Format file problem uploading electronic bank statement files FF_5 RFEBKA00

    hello
    I am facing a problem when uploading electronic bank statement files with the file format. The situation is as follows:
    1- Electronic bank statement files are sent by FTP from the bank to a certain directory in AL11
    2- we have developed a "z" program that just picks electronic bank statement files from AL11 directory and process them using standard FF_5 (RFEBKA00) program.
    3- When processing some files had an error, when debugging we have verified that errors are caused by some "special" characters non Unicode as "®" (=Hex'AE') with UTF-8, a '#' is displayed.
    SAP answers a question as follows:
    AL11 is designed to display os-files (log-files, trace-files etc.)
    from within the SAP-system for supporting purposes in order not to
    logon to the os itself.
    It was not designed to display any file-content in the system created
    with any code-page.
    AL11 opens the file in textmode with encoding option default, which
    means UTF-8 in a unicode system and NON-UNICODE in the other case.
    You cannot change this setting.
    If you have the need to specify these options, depending on your files,
    you can make a copy of report RSWATCH0 and customize the OPEN-statement
    to yor needs.
    On a Unicode system, the files need to be in Unicode format (UTF-8).
    Eg:When you interpret a non-Unicode "®" (=Hex'AE') with UTF-8, a '#' is
    displayed.
    Case 1:
    Who is creating those files? Are these files
    1) created by you
    2) are they written by a SAP application?
    ==>There are the notes 752835 and 747615 for cases like these.
    In case 2) it may be that the application responsible for the file
    download (not AL11!) should be the problem, considering note 752835.
    There is also the possibility for you to convert the file to the correct format using our tool RSCP_CONVERT_FILE (note 747615).
    System administrator has told me to copy standard RFEBKA00 program and modify the OPEN-statement but I am not agree because I think that the problem is when generating the files in bank's system and/or sending the files to SAP by FTP.
    Does any body face a problem like this before? Any ideas?
    Thanks a lot

    Hello,
    The files that are available in AL11 are in Unicode.
    Can you convert them to text by using the following method and then try:
    You must have mapped this directory and having access.
    Right click on file
    Open with: Microsoft Office Word
    Then the pop-up comes: File conversion - bacs
    Select Other encoding radio button
    Then select "Unicode" from list
    and say OK
    Now the file is being opened in readable format:
    File SAVE as PLAIN TEXT
    Save the file in the same folder that you are referring to in AL11
    Now if you try with this .txt file, it should work in FF_5
    Thanks,
    Ravi

  • Electronic bank statement Germany

    Dear all,
    I should configure electronic bank statement for a German customer that should change from one system to SAP. Their format on electronic bank statement is MT940 and in the file they have all transactions that appeared on their bank statement; incoming payments (both manual and by direct debit), outgoing payments (both manual and automatic paymens by file) and other costs as bank fee (total to about 5 cost accounts).
    When looking at transaction FF_5 i have some questions:
    1. I guess in Germany, when having format MT940, I don´t need to convert the file in FEBC?
    2. In FF_5 - elect. bank statement format should be entered, which one should I use?:
    G SWIFT MT940- Field 86: Structure Recgnized automatically
    I SWIFT MT940 international format (field 86 unstructured)
    or
    S SWIFT MT940 with field 86 structured?
    3. What is the difference by statement file and line item file, should I have both? Today, in their current system, they only import one file from bank, so if I only have one file, which field to use?
    Thanks in advance!
    Best Regards L

    Hi,
    The ?20, ?21, ... are in the record beginning with :86:.
    Here is an example:
    :86:835?00PAIEMENT?20FRE / 22548?31xxxxxxxxxxxxxxxxxxxxxxxx?32xxxxxxxx
    In most cases, you have ?00 and ?20 but there are other possible codes like ?21, ?22, ?23, ?31, ?32, ...
    Eventually, the ? may be replaced by another character but I think it is not frequent. In this case, the first character after the 3 digits following :86: is the character replacing the ?.
    Look at your MT940 files and you will see the presence or absence of these ?00, ?20, ?21, ... codes in record :86:.
    If there are present, it is structured; if not unstructured.

Maybe you are looking for

  • How do I boot from an external drive?

    I've just Carbon Cloned my 60GB drive to a firewire external drive. I'm about to replace the 60GB with a 160GB drive and the CCC instructions say boot from the external drive I'd just created once the new disk is installed. Then CCC the cloned drive

  • Media Imports offline?

    just finished a recording and as usual I copied all of my dslr footage of my SDHC memory card onto my desktop into a new folder. opened up final cut pro X and imported the folder. However after it finished importing all of my clips are showing up as

  • PDF Organization, Library?

    Hello, I have a collection of pdfs downloaded from the USPTO, specifically the Chapters from the MPEP, including a TOC pdf. It appears that the pdfs are linked, in the TOC document, there is a search link that opens up the full Acrobat search, from w

  • I can't see some podcasts from iTunes to delete them!

    I just got my "5G+" iPod yesterday. All the podcasts that were in iTunes copied over fine. However, podcasts I had copied out of iTunes (because I didn't have an iPod for a while) and then dragged back on to the iPod don't show up in the iPod's Podca

  • Unable to Install Leopard in my late 2006 Imac.

    Hi, Please help me in installing Leopard on my late 2006 Imac. After starting the installing dvd my system is not displaying Macintosh HD in start up disk and after reading in Mac forum. I have partition my HD in GUID partition format but still its n