11/01/2010

ABAP/4 - Guida completa

Ecco a voi programmatori Sap una guida completa sull'ABAP in formato pdf....
Spero vi possa essere utile.


ABAP/4 - Guida completa - Indice

Capitolo 1 - Panoramica sull'ABAP/4
Capitolo 2 - Definizione dei dati in ABAP/4
Capitolo 3 - Istruzioni ABAP/4
Capitolo 4 - Internal tables
Capitolo 5 - L'ABAP/4 Open SQL
Capitolo 6 - Parameters e Selection-Screen
Capitolo 7 - Il Dizionario Dati

Capitolo 8 - Creazione di un report
Capitolo 9 - Il Dialog Programming

Capitolo 10 - Il Dizionario Dati
Capitolo 11 - Creazione di un report
Capitolo 12 - Il Batch Input

Appendici


A presto con nuovi manuali, esempi e domande...
Ciao

31/08/2009

Massive Download of ABAP Programs and Function Groups

Use the program REPTRAN. It’s a report to easily download complete development programs and function
groups. It is needed to facilitate source code comparison between different systems or installations.

1.jpg

For more info refer to https://service.sap.com/sap/support/notes/766182

18/08/2009

Sap help in pdf

PDF File
ABAP/4 OLE Automation Controller
ABAP Programming (BC-ABA)
Activity-Based Costing
Activity-Based Costing (CO-OM-ABC)
Actual Costing / Material Ledger
Advance Payments
ALE in Profit Center Accounting (EC-PCA-TL)
ALE Introduction and Administration
ALE Programming Guide
ALE Quick Start
ALE QuickStart for Distributed HR
ALE Scenarios in Asset Accounting
ALE Scenarios in Personnel Cost Planning
ALV Gird Control (BC-SRV-ALE)
APIs for Logistics
Archiving Application Data (CA-ARC)
Archiving Application Data (FI)
Argentina
Arrears Processing for Deductions
Assembly-to-order (LO-ASM)
Asset Accounting (FI-AA)
Asset Information for Intranets (FI-AA)
Availability Check and Requirements in Sales and Distribution
Balance Sheet Valuation (MM-IM-VP)
Bank Accounting (FI-BL)
Banks (PA-PA)
BAPI ActiveX Control
BAPI Programming Guide (CA-BFA)
BAPI User Guide (CA-BFA)
Basic Data (QM-PT-BD)
Basic Functions (SD-FT-PRO)
Basic Functions
Basic Functions and Master Data in SD Processing (SD-BF)
Basis (BC)
Basis
Batch Management (LO-BM)
BC - ABAP Dictionary
BC ABAP Workbench Tools
BC ABAP Workbench Tutorial
BC Basis Programming Interfaces
BC - Business Workplace
BC - Central Maintenance and Transport Objects
BC Data Modeler
BC Documentation of System Objects
BC Extended Applications Function Library
BC - Namespaces and Naming Conventions (BC-CTS-NAM)
BC R/3 Database Guide:DB2/400
BC R/3 Database Guide: DB2 Universal Database for UNIX & Windows
BC R/3 Database Guide: Informix
BC SAPconnect
BC SAP Graphics: Programming Interfaces
BC SAP Graphics: User's Guide
BC - SAP Printing Guide
BC SAPscript Raw Data Interface
BC SAPscript: Printing with Forms
BC - SAP Style Guide
BC Style and Form Maintenance
BC System Services
BC The SAP Communications Server
BC - Word-Processing in the SAPscript Editor
Benefits (PA-BN)
Billing (SD-BIL)
Billing Plan (SD-BIL-IV)
Brazil
Business Area (FI)
Business Configuration Sets (BC-CUS)
Business Document Service (BC-SRV-BDS)
Business Partner Master Data (LO-MD-BP)
CA - Cross-Application Components: Workflow Scenarios
CA - Cross-Application Functions
CAD Interface (CA-CAD)
CA - Drilldown Reporting
CA Extended Table Maintenance
CA - Message Control (CA-GTF-BS)
Capacity Evaluation (PP-CRP-ALY)
Capacity Leveling (PP-CRP-LVL)
Capacity Leveling in PP-SOP and LO-LIS-PLN
Capacity Planning in Customer Service and Plant Maintenance
Capacity Planning in Long-term Planning 
Capacity Planning in MPS and MRP
Capacity Planning in Process Industries
Capacity Planning in Repetitive Manufacturing
Capacity Planning in Sales and Distribution
Capacity Planning in Shop Floor Control (PP-SFC)
Capacity Planning in the Project System
Cash Management (TR)
CATT: Computer Aided Test Tool (BC-CAT-TOL)
CATT: Enhanced Mode (BC-CAT-TOL)
CBI Question & Answer Database
Central Adress Management (BC-SRV-ADR)
Change and Transport System - Overview (BC-CST)
Changing the SAP Standard (BC)
Characteristics (CA-CL-CHR)
Check Management
Chile
China
Claim Management
Classification System (CA-CL)
Client Copy and Support
Closing and Reporting (FI)
Collaborative Engineering & Project Management
Computing Center Management System (BC-CCM)
Concept Check Tool
Coding Block
CO External Data Transfer
Colombia
Commitments Management (CO)
Communication / Printing (SD-FT-COM)
Compensation Management (PA-CM)
Components of the Logistics Information System (LIS)
Consolidation (EC-CS)
Controlling (CO)
Controlling (CO)
Controls Tutorial (BC-CI)
Country Versions
Consolidation (FI-LC)
Configuration Management (LO-CM)
Confirmation
Connecting to External Time Management Systems
Connecting to SAP CAMPBELL Personnel Administration
Connection with External Time Recording Systems
Consumption-Based Planning (MM-CBP)
Controlling (CO)
Conversion to the Euro in Human Resources
Cost Center Accounting (CO-OM-CCA)
Cost Center Accounting (CO-OM-CCA)
Costs
Country Versions
Credit and Risk Management (SD-BF-CM)
Cross-Application Components (CA)
Cross-Application Mass Maintenance (CA-GTF-MS)
Cross-System Planning Situation (CA-BFA)
Customer Service (CS)
Customer Service (CS)
Customer Service Processing (BC-SLS-OA)
Customizing (BC-CUS)
Customizing System Settings (BC-CUS)
Customizing Cross-System Tools
Cross-Application Time Sheet (CA-TS)
Dangerous Goods Management (EHS-DGP)
Data Retention Tool (DART)(CA-GTF-DRT)
Database Administration (Oracle) with SAPDBA
Dates
DCOM Connector Logon Component
Decentralized Warehouse Management (LE-IDW)
Defects Recording (QM-IM-RR-DEM)
Demand Management (PP-MP-DEM)
Derivatives
Desktop Office Integration (BC-CI)
Developing an Infotype (Planning)
Developing an Infotype in Personnel Administration
Direct and Indirect Quotation for Exchange Rates
Distributed Contracts (MM-PUR, MM-SRV)
Distributed Profitability Analysis (CO-PA)
Distribution Resource Planning (PP-SOP-DRP)
Documents
Document Management
Documentary Payments (SD-FT-LOC)
Documentation Maintenance
Dynamic Modification of the Inspection Scope
Early Warning System: Overview
Editor for Functions and Operations (PY-XX-TL)
Editor for Personnel Calculation Rules (PY-XX-TL)
Editor for Personnel Calculation Schemas (PY-XX-TL)
EH&S Environment, Health & Safety
Electronic Account Statement (FI-BL)
Electronic Data Interchange / IDoc Interface (SD-EDI)
Employee Self-Service
Employment and Salary Verification in the Internet (PA-PA-US)
Enhancements, Modifications... (CA-BFA)
Engineering Change Management
Engineering Workbench (PP-BD)
Entering Measurement and Counter Readings in the Internet
Entering Planning Data in the Workflow (CO-PA)
Enterprise Controlling (EC)
Enterprise Controlling (EC)
Enterprise Organization (CO)
Enterprise Modelling - Consultant's Handbook
Environment, Health & Safety
European Monetary Union: Euro (CA-EUR)
Evaluating the Payroll Results using Infotypes or the Logical Database
Executive Information System and Business Planning
Expert Mode
External Data Transfer
External Services Management (MM-SRV)
External Supply of the Time Sheet
Features Editor
FI Accounts Receivable and Accounts Payable
Financial Accounting (FI)
Financial Accounting (FI)
Financial Accounting - General Topics
FI Financial Accounting: Data Transfer Workbench
Financial Information System (FI)
FI/SD - Credit Management/Risk Management
FI - Special Purpose Ledger
Flexible General Ledger (FI-GL)
Forecasting (LO-PR)
Foreign Exchange
Foreign Trade / Customs (SD-FT)
Funds Management
General Ledger Accounting (FI-GL)
General Report Selection
Generic Business Tools for Application Developers (BC-SRV-GBT)
Generic Object Service (BC-SRV-GBT)
Getting Started
Goods Receipt Process for Inbound Deliveries
GR/IR Account Maintenace (MM-IM-VP)
Handeling Unit Management (LO-HU)
How do I use the Reuse Library?
Human Resources (HR)
Human Resources (HR)
HR Form Editor (PY-XX-TL)
HR Forms Workplace (PY-XX-FO)
HR Funds and Position Management (PA-PM)
HR - Human Resource Management
HR Infotypes
HR Tools (PY-XX-TL)
HTMLBusiness Language Reference
Hypertext Structure Maintenance (BC-DOC-DTL)
IACs for External Services Management (MM-SRV)
IACs in Foreign Trade
IDoc Class Library (BC-FES-AIT)
IDoc Connector for XML Component (BC-FES-AIT)
IDoc Interface: EDI
IDoc Interface / Electronic Data Interchange (BC-SRV-EDI)
IM - Investment Management
Implementation Assistant
Import Basis Module (SD-FT-IMP)
Incentive Wages: Overview
Inflation Accounting
Information System
Inspection Data Interface (QM-IDI)
Inspection Lot Completion (QM-IM-UD)
Inspection Lot Creation (QM-IM-IL)
Inspection Planning (QM-PT-IP)
Inspection Planning with the Engineering Workbench
Integration with SAP Business Workflow
Interfaces to Accounting (AC)
Interface Toolbox in Human Resources (PX-XX-TL)
Interfaces to the Project System
Internal Orders (CO-OM-OPA)
Internal Service Request
Internet Application Development with Flow Flies: Reference
Internet Application Development with Flow Flies: Tutorial
Internet Time Sheet
Introduction to BPML
Introduction: Overview
Introduction to Data Archiving (CA-ARC)
Inventory Management and Physical Inventory (MM-IM)
Inventory Sampling (MM-IM-PI)
Investment Management (IM)
Investment Management (IM)
ITS Administration Guide
ITS Implementation Models
ITS System Templates
ITS User Management
Job Search
KANBAN on the Internet (PP-KAB-CRL)
Language Transport (BC-CTS-LAN)
Legal Control (SD-FT-CON)
LE - Logistics Execution
Library of ALE Business Processes
Line Design
Loans
Loans Management (TR-LO)
LO - General Logistics Workflow Scenarios
Logistics Execution (LE)
Logistics - General (LO)
Logistics General (LO)
Logistics Information System (LO-LIS)
Logistics Invoice Verification (MM-IV-LIV)
LO Logistics General
Long-Term Planning (PP-MP-LTP)
Maintenance Bills of Material (PM-EQM-BM)
Maintenance Planning
Maintenance Task Lists
Manager's Desktop (PA-MA)
Managing Special Stocks (MM-IM)
Market Risk Management
Master Data Distribution (Human Resources)
Material
Materials Management (MM)
Materials Management (MM)
Material Master
Material Requirements Planning
Memory Management (BC-CST-MM)
Messages 6.2 (BC)
Messages 7.2 (BC)
Mexico
Migration/Upgrading to Oracle Version 8.1.5: UNIX
MM Component Short Description
MM Materials Management
MM - Materials Management: Workflow Scenarios
MM - Material Price Change (MM-IV-MP)
MM MM-MOB and WM-LSR Interfaces
MM Vendor Evaluation
Model Company Great Britain (PY-GB)
Money Market
Network Integration Guide (BC-NET)
Notifications (CA-NO)
Objects on Loan/Internal Control (PA-PA)
Off-Cycle Activities
Old and New Processing of Averages
Order BOMs
Organizational Plan Mode
Other Countries (PY-XX)
Other Single Roles
Output Determination (SD)
PA - Personnel Management: Workflow Scenarios
Partial Period Remuneration (Factoring)
Payments
Payments
Payments
Payment Card Processing
Payment Program for Payment Requests (FI-BL)
Payment Release
Payroll Account (Report RPCKTOx0;HxxCKTO0)
Payroll Argentina (PY-AR)
Payroll Australia (PY-AU)
Payroll Austria (PY-AT)
Payroll Basics (PY-XX-BS)
Payroll Belgium (PY-BE)
Payroll Brazil (PY-BR)
Payroll Canada(PY-CA)
Payroll Denmark (PY-DK)
Payroll France (PY-FR)
Payroll Germany (PY-DE)
Payroll Great Britain (PY-GB)
Payroll Hong Kong (PY-HK)
Payroll in a Background Operation
Payroll Indonesia (PY-ID)
Payroll in the SAP System
Payroll Ireland (PY-IE)
Payroll Italy (PY-IT)
Payroll Japan (PY-JP)
Payroll Journal (Report RPCLJNx0;HxxCLJN0)
Payroll Malaysia (PY-MY)
Payroll Mexico (PY-MX)
Payroll New Zealand (PY-NZ)
Payroll Philippines (PY-PH)
Payroll Portugal (PY-PT)
Payroll Singapore (PY-SG)
Payroll Spain (PY-ES)
Payroll Sweden (PY-SE)
Payroll Taiwan (PY-TW)
Payroll Thailand (PY-TH)
Payroll United States (PY-US)
Payroll Venezuela (PY-VE)
Payroll South Africa (PY-ZA)
Payroll Switzerland (PY-CH)
Pension Fund CH: Reference Guide
Pension Fund CH: Technical User Handbook
Pension Fund CH: User Hand Book
Performance Monitor
Periodic Declarations
Personnel Administration
Personnel Cost Planning
Personnel Development
Personnel Time Management (PT)
Peru
Philippines
Plant Maintenance
Plant Maintenance and Customer Service (PM/CS)
PM/CS - Data Transfer in Plant Maintenance and Customer Service
PM/CS - Plant Maintenance & Customer Service: Workflow Scenarios
Posting (FI)
Posting to Accounting (PY-XX-DT)
PP Bills of Material Guide
PP - Capacity Planning
PP Component Short Description
PP PDC Interface
PP KANBAN
PP - PI-PCS Interface: Linking of Process Control
PP - Production Orders
PP - Work Centers
Preference
Preparations for Consolidation (FI)
Pricing and Conditions
Process Flow Hierarchy
Processing a Calibration Inspection
Product Catalog and Online Store on the Internet (LO-MD-AM)
Product Cost Controlling Information System (CO-PC-IS)
Product Cost Planning
Production lot planning / individual project planning
Production Planning and Control (PP)
Production Planning and Control (PP)
Production Planning and Control (PP)
Production Planning & Control Workflow Scenarios
Production Planning - Process Industries (PP-PI)
Production Resources/Tools (PRT)
Product Lifecycle Management (PLM)
Product Safety (EHS-SAF)
Product Structure Browser
Profitability Analysis (COPA)
Profit Center Accounting (EC-PCA)
Programming Utilities for the Logical Databases PNP and PAP
Project Estimator
Project Information System
Project Progress
Project System (PS)
Project System (PS)
Project System (PS)
Public-Key Technology
Purchasing (MM-PUR)
Quality Certificates
Quality Management
Quality Management (QM)
Quality Management (QM)
Quality Notifications
Quality-Related Costs (QM-IM-IC)
Question & Answer Database
QM in Procurement (QM-PT-RP-PR)
QM in Production
QM in Sales and Distribution (QM-PT-RP-SD)
QM/PM Partner Roles
QM - Quality Management: Data Transfer
QM - Quality Management: Workflow Scenarios
R/3 Database Management CONTROL (BC)
R/3 Database Manager DBMCLI (BC)
R/3 Database Manager DBMGUI (BC)
R/3 on IBM AS/400
Real Estate: Data Transfer (RE)
Real Estate Management
Real Estate Management (RE)
Recruitment
Reference Manual 7.2 (BC)
Remote Communications
Remuneration Statement (Report RPCEDTx0;HxxCEDTO)
Repetitive Manufacturing (PP-REM)
Replication Manager
Reporting in Human Resource Management
Report Programming in HR
Reports and Analyses (SD)
Repository Service Component (BC-FES-AIT)
RE Real Estate Management Archiving
RE Real Estate Management: Workflow Scenarios
Resources
Results Recording
Retroactive Billing
Revenues and Earnings
Reverse Buisness Engineer
RFC C++ Class Library (BC-FES-AIT)
RFC Java Class Library (BC-FES-AIT)
RFC Programming in ABAP
Room Reservation Management (PE-RPL)
Routings (PP-BD-RTG)
Salary Packaging
Sales (SD-SLS)
Sales and Distribution (SD)
Sales and Distribution (SD)
Sales and Distribution
Sales and Distribution (SD) Workflow Scenarios
Sales and Operations Planning (LO-LIS-PLN)
Sales Employee (PA-PA)
Sales Support: Computer-Aided Selling (CAS)
Sample Management
SAP ArchiveLink (BC-SRV-ARL)
SAP ArchiveLink - Scenarios in Applications (BC-SRV-ARL)
SAP Automation
SAP Automation GUI Code Generator (BC-FES-AIT)
SAP Automation GUI Interfaces (BC-FES-AIT)
SAP Automation RFC and BAPI Interfaces (BC-FES-AIT)
SAP@Web Studio
SAP Business Partner (SAP BP)
SAP Business Workflow (BC-BMT-WFM)
SAP Business Workflow Demo Examples
SAP Communication: CPI-C Programming (BC-CST-GW)
SAP Communication: Configuration (BC-SRV)
SAP Container
SAP Control Framework
SAP Data Provider
SAP Exchange Connector (BC-SRV-COM)
SAP Graphics
SAP GUI for HTML
SAP High Availability (BC-CCM-HAV)
SAP HTML Viewer
SAP Internet Mail Gateway (BC-SRV-COM)
SAP Knowledge Provider (BC-SRV-KPR)
SAP License (BC-CST-SL)
SAP List Viewer (ALV): Classic
SAP MAPI Service Provider (BC-SRV-GBT)
SAP/MS SQL Server DBA in CCMS (BC-DB-MSS-DBA)
SAP Open Information Warehouse
SAP Patch Assembly/Distribution Engine (SPADE)
SAP Patch Manager (SPAM)
SAPphone (BC-SRV-COM)
SAP Picture (BC-CI)
SAP Query (BC-SRV-QUE)
SAP Retail
SAProuter (BC-CST-NI)
SAP Session Manager
SAP Smart Forms (BC-SRV-SCR)
SAP Textedit
SAP Time Management
SAP Time Management in the Internet/Intranet
SAP Toolbar (BC-CI)
SAP Tree and Tree Model (BC-CI)
Schedule Manager
Scheduling Agreements for Component Suppliers
SD Partner Functions
SD - Sales and Distribution
Secure Network Communications (BC-SEC-SNC)
Secure Store & Forward / Digital Signatures (BC-SEC-SSF)
Securities
Security Audit Log
Security Audit Log (BC-SEC)
Serial Number Management (LO-MD-SN)
Service: Feedback Notifications (SV-FDB)
Setting Up Activity Allocation in R/3 Time Management
Settlement
Shipping
Simulation
Singapore
South African Model Company (PY-ZA)
South Korea
Space Management Interface (LO-MD-PL)
Spain
Special G/L Transactions: Bills of exchange
Specification System
SQL Studio (BC)
Standard Values Calculation with CAPP (PP-BD-RTG)
Statistical Data Interface (QM-STI)
Statistical Process Control (SPC)
Structures
Supplier Workplace
Supply Chain Planning Interfaces (LO-SCI)
Support Line Feedback
System Administration Assistant
Terminology and Glossary in SAPterm (BC-DOC-TER)
Test Equipment Management
The Appointment Calendar (BC-SRV-GBT)
The BAPI Gateway Component (BC-FES-AIT)
The DCOM Connector
The Form Editor (PT-EV-FO)
The Payroll Process
The RFC API
The RFC Generator
The SAP Lock Concept (BC-CST-EQ)
The Test Workbench in the SAP System (BC-CAT-PLN)
Time Management Aspects in Payroll
Time Sheet and Human Resources in Distributed Systems
Time Zones
Training and Event Management
Transfering Trip Costs to Accounting
Transfering Wage Components to Payroll (PY-XX-TL)
Transfer of Legacy Assets to the R/3 System
Transfer of PRICAT Messages (SD-MD-PL)
Translation Tools for Coordinators
Translation Tools for Translators
Transportation
Transport Management System (BC-CTS-TMS)
Transport Organizer (BC-CTS-ORG)
Transport Tools (BC-CTS-TLS)
Travel Management (FI-TV)
TR - Cash Budget Management
Treasury (TR)
Treasury (TR)
Treasury - Changeover to the Euro
Treasury Workstation
TR - Treasury: Workflow Scenarios
Turkey
United States
Unqualified Advance Payments
Updates in the R/3 System (BC-CST-UP)
Users and Roles (BC-CCM-USR)
Using Evaluation Schemas
ValueSAP
Variant Configuration (LO-VC)
Venezuela
Versions
Wage and Salary Payments
Wage Type Distribution
Wage Type Reporter (H99CWTR0)
Wage Type Statement
Wage Type Valuation
Wage Types
Warehouse Management Guide
Web Transaction API
Web Transaction Programming
Web Transaction Tutorial
WebRFC Programming
Workflow
Working with Parameter Effectivity
Worklist

10/04/2008

Sap - Programma di controllo e generazione IBAN

Come ben saprete a partire dal 1° gennaio 2008 il codice IBAN è obbligatorio per i bonifici. In realtà potranno comunque essere effettuate le operazioni in maniera "tradizionale" nel corso del cosiddetto periodo di transizione che va dal 1 gennaio al 1 giugno 2008, ad un costo più elevato e con tempi tecnici un pò più lunghi.
E' cambiato quindi il codice che identifica il conto corrente per i pagamenti. Le coordinate CAB e ABI non sono più sufficienti, al loro posto arriva l'IBAN composto da 27 caratteri alfanumerici dai quali si risale al Paese, alla banca, allo sportello e al numero di conto.

    * 2 lettere per il codice paese
    * 2 cifre per il CIN europeo
    * 1 lettera per il CIN italiano
    * 5 cifre per il codice ABI
    * 5 cifre per il codice CAB
    * 12 cifre per il numero di conto bancario

Ecco a voi quindi un utile programma ABAP per la verifica e la generazione automatica dei codici IBAN in Sap.
Ovviamente nell'anagrafica dei clienti/fornitori dovranno essere presenti tutti i dati necessari alla generazione:

Il programma è il seguente:

- Nome programma e desrizione:

ZRFIBAN00                      Generazione IBAN

- Potete copiare ed incollare il codice sorgente oppure scaricarlo da qui:

*&---------------------------------------------------------------------*
*& Report  ZRFIBAN00                                                   *
*&                                                                     *
*&---------------------------------------------------------------------*
REPORT zrfiban00 LINE-SIZE 132.

TABLES: lfbk, knbk, t005.

SELECT-OPTIONS:
  vendor    FOR lfbk-lifnr,
  customer  FOR knbk-kunnr,
  country   FOR lfbk-banks OBLIGATORY.
PARAMETERS:
  testrun   LIKE rfpdo1-allgtest DEFAULT 'X'.

DATA:
  t_lfbk    LIKE lfbk OCCURS 0 WITH HEADER LINE,
  t_knbk    LIKE knbk OCCURS 0 WITH HEADER LINE,
  g_type(8) TYPE c,
  lines     TYPE i.

AT SELECTION-SCREEN.
  PERFORM warning.

TOP-OF-PAGE.
  CASE g_type.
    WHEN 'LFBK'.
      WRITE / 'Vendor  '.
    WHEN 'KNBK'.
      WRITE / 'Customer'.
    WHEN OTHERS.
      WRITE / g_type.
  ENDCASE.
  ULINE.

START-OF-SELECTION.

  describe table country lines lines.
  if lines eq 0.
    exit.
  endif.

  SELECT * FROM  lfbk
           INTO  TABLE t_lfbk
           WHERE lifnr IN vendor
           AND   banks IN country.
  SELECT * FROM  knbk
           INTO  TABLE t_knbk
           WHERE kunnr IN customer
           AND   banks IN country.
  SORT t_lfbk BY lifnr.
  SORT t_knbk BY kunnr.

END-OF-SELECTION.
  LOOP AT t_lfbk.
    PERFORM iban_update USING t_lfbk-banks
                              t_lfbk-bankl
                              t_lfbk-bankn
                              t_lfbk-bkont
                              t_lfbk-bkref
                              'LFBK'
                              t_lfbk-lifnr.
  ENDLOOP.
  NEW-PAGE.
  LOOP AT t_knbk.
    PERFORM iban_update USING t_knbk-banks
                              t_knbk-bankl
                              t_knbk-bankn
                              t_knbk-bkont
                              t_knbk-bkref
                              'KNBK'
                              t_knbk-kunnr.
  ENDLOOP.
  COMMIT WORK.
  CALL FUNCTION 'BUFFER_REFRESH_ALL'.

*--------------------------------------------------------------------*
*      Form  warning                                                 *
*--------------------------------------------------------------------*
FORM warning.

  DATA:
    l_count(5)  TYPE n,
    l_text(70)  TYPE c,
    l_answer(1) TYPE c.

  STATICS:
    s_country LIKE country OCCURS 0 WITH HEADER LINE.

  CHECK sy-batch EQ space.
  CHECK s_country[] NE country[].

  SELECT COUNT(*) FROM  t005
                  INTO  l_count
                  WHERE land1 IN country.
  IF l_count LE 1.
    l_text = 'is allowed in the specified country?'.
  ELSE.
    l_text = 'You have selected &N bank countries.'.
    SHIFT l_count LEFT DELETING LEADING '0'.
    REPLACE '&N' WITH l_count INTO l_text.
    CONDENSE l_text.
    CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
      EXPORTING
        defaultoption = 'N'
        textline1     = l_text
        textline2     = 'Do you really want to proceed?'
        titel         = 'Number of Countries'
      IMPORTING
        answer        = l_answer.
    IF l_answer NE 'J'.
      REFRESH country.
      EXIT.
    ENDIF.
    l_text = 'is allowed in all specified &N countries?'.
    REPLACE '&N' WITH l_count INTO l_text.
    CONDENSE l_text.
  ENDIF.

  CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
    EXPORTING
      defaultoption = 'N'
      textline1     = 'Are you sure that the generation of IBANs'
      textline2     = l_text
      titel         = 'Generation of IBAN'
    IMPORTING
      answer        = l_answer.
  IF l_answer NE 'J'.
    REFRESH country.
  ENDIF.

  s_country[] = country[].

ENDFORM.                               "warning


*--------------------------------------------------------------------*
*      Form  iban_update                                             *
*--------------------------------------------------------------------*
FORM iban_update USING p_banks LIKE lfbk-banks
                       p_bankl LIKE lfbk-bankl
                       p_bankn LIKE lfbk-bankn
                       p_bkont LIKE lfbk-bkont
                       p_bkref LIKE lfbk-bkref
                       p_type  TYPE any
                       p_konto TYPE any.

  DATA:
    l_bnklz          LIKE bnka-bnklz,
    l_bankn_long(35) TYPE c,
    l_bkont          LIKE lfbk-bkont,
    l_iban           LIKE tiban-iban,
    l_msgtx(82)      TYPE c,
    l_tabname        LIKE tiban-tabname,
    l_tabkey         LIKE tiban-tabkey.

  STATICS:
    s_counter TYPE i.

  CALL FUNCTION 'READ_IBAN'
    EXPORTING
      i_banks = p_banks
      i_bankl = p_bankl
      i_bankn = p_bankn
      i_bkont = p_bkont
      i_bkref = p_bkref
    EXCEPTIONS
      OTHERS  = 4.
  IF sy-subrc EQ 0.
    EXIT.
  ENDIF.

  g_type = p_type.
  WRITE: / p_konto,
           p_banks,
           p_bankl,
           p_bankn.

  CALL FUNCTION 'CONVERT_BANK_ACCOUNT_NUMBER'
    EXPORTING
      i_banks      = p_banks
      i_bankk      = p_bankl
      i_bankn      = p_bankn
      i_bkont      = p_bkont
      i_bkref      = p_bkref
    IMPORTING
      e_bankn_long = l_bankn_long
      e_bkont      = l_bkont.

  CALL FUNCTION 'CONVERT_BANK_ACCOUNT_2_IBAN'
    EXPORTING
      i_bank_country     = p_banks
      i_bank_key         = p_bankl
      i_bank_number      = l_bnklz
      i_bank_account     = l_bankn_long
      i_bank_control_key = l_bkont
    IMPORTING
      e_iban             = l_iban
    EXCEPTIONS
      error_message      = 4
      OTHERS             = 4.

  IF sy-subrc NE 0.
    CALL FUNCTION 'K_MESSAGE_TRANSFORM'
      EXPORTING
        par_msgid = sy-msgid
        par_msgno = sy-msgno
        par_msgty = sy-msgty
        par_msgv1 = sy-msgv1
        par_msgv2 = sy-msgv2
        par_msgv3 = sy-msgv3
        par_msgv4 = sy-msgv4
      IMPORTING
        par_msgtx = l_msgtx
      EXCEPTIONS
        OTHERS    = 4.
    IF sy-subrc NE 0.
      l_msgtx = 'IBAN could not be generated, country not supported'.
    ENDIF.
    WRITE l_msgtx COLOR COL_NEGATIVE.
    EXIT.
  ENDIF.
  IF l_iban IS INITIAL.
    l_msgtx = 'IBAN could not be generated, country not supported'.
    WRITE l_msgtx COLOR COL_NEGATIVE.
    EXIT.
  ENDIF.

  WRITE: 'IBAN', l_iban.

  IF testrun EQ 'X'.
    WRITE 'IBAN generated in test mode'.
    EXIT.
  ENDIF.

  l_tabname = p_type.
  l_tabkey  = p_konto.
  CALL FUNCTION 'MAINTAIN_IBAN_FROM_DATA'
    EXPORTING
      i_banks       = p_banks
      i_bankl       = p_bankl
      i_bankn       = p_bankn
      i_bkont       = p_bkont
      i_iban        = l_iban
      i_valid_from  = sy-datum
      i_bkref       = p_bkref
      i_tabname     = l_tabname
      i_tabkey      = l_tabkey
    EXCEPTIONS
      error_message = 4
      OTHERS        = 4.

  IF sy-subrc NE 0.
    WRITE 'IBAN not valid, please contact SAP' COLOR COL_NEGATIVE.
  ELSE.
    WRITE 'IBAN inserted'.
  ENDIF.

  ADD 1 TO s_counter.
  IF s_counter EQ 100.
    CLEAR s_counter.
    COMMIT WORK.
    CALL FUNCTION 'BUFFER_REFRESH_ALL'.
  ENDIF.

ENDFORM.                               "iban_update