0% found this document useful (0 votes)
19 views155 pages

DL-Application Manual Book 2024-10-07

Our Release Applications ▪DL-SAP Connector ▪DL-Sync ▪DL-Remote ▪DL-SAP Web Framework
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views155 pages

DL-Application Manual Book 2024-10-07

Our Release Applications ▪DL-SAP Connector ▪DL-Sync ▪DL-Remote ▪DL-SAP Web Framework
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 155

®

DL-Application

USER MANUAL

© 2024 DIFO LESTARI


DIFO LESTARI
Table of Contents 2

1. Introduction 4
2. DL-SAP Connector 6
2.1 Overview ......................................................................................................................... 7
2.2 Installation ...................................................................................................................... 9
2.2.1 Windows Installation ............................................................................................... 9
2.2.2 RFC Setup ............................................................................................................... 14
2.3 Configuration ............................................................................................................... 18
2.4 Tips and Trick ............................................................................................................... 22

3. DL-Sync 24
3.1 Overview ....................................................................................................................... 25
3.2 Installation .................................................................................................................... 26
3.3 Configuration ............................................................................................................... 27
3.3.1 SAP Connection ...................................................................................................... 27
3.3.2 ODBC Connection ................................................................................................... 29
3.4 Features ........................................................................................................................ 32
3.4.1 SQL Editor ............................................................................................................... 32
3.4.1.1 Create New Manual ................................................................................................................................ 32
3.4.1.2 Create New Automatic ........................................................................................................................... 37
3.4.1.3 Modify SQL ............................................................................................................................................... 38
3.4.1.4 Copy SQL ................................................................................................................................................... 41
3.4.2 Clone Database Table ............................................................................................ 43
3.4.3 ETL DB to DB .......................................................................................................... 45
3.4.3.1 Single DB .................................................................................................................................................. 46
3.4.3.2 Multi DB ................................................................................................................................................... 55
3.4.4 ABAP Editor ............................................................................................................ 58
3.4.4.1 Create New Manual ................................................................................................................................ 59
3.4.4.2 Create New Automatic ........................................................................................................................... 62
3.4.4.3 Create Custom Search Help .................................................................................................................. 66
3.4.4.4 Create Extract Data Program ................................................................................................................ 69
3.4.4.5 Create Upload Data Program ............................................................................................................... 73
3.4.5 Clone SAP Table ..................................................................................................... 75
3.4.6 ETL SAP to DB ......................................................................................................... 78
3.4.6.1 Single DB .................................................................................................................................................. 79
3.4.6.2 Multi DB ................................................................................................................................................... 87
3.4.7 ETL DB to SAP ......................................................................................................... 91
3.4.7.1 Single DB .................................................................................................................................................. 92
3.4.8 ETL Service ............................................................................................................. 95
3.4.8.1 Database .................................................................................................................................................. 95
3.4.8.2 SAP System ............................................................................................................................................... 99
3.4.9 Custom TCode ...................................................................................................... 102
3.4.10 SAP Directory ........................................................................................................ 105
3.5 Practice ....................................................................................................................... 106

DL-Application © 2024 DIFO LESTARI


Table of Contents 3

3.5.1 Database Examples .............................................................................................. 107


3.5.2 SAP ZTable Examples ........................................................................................... 109
3.5.3 ETL DB to DB ........................................................................................................ 111
3.5.4 ETL SAP to DB ....................................................................................................... 111
3.5.5 ETL DB to SAP ....................................................................................................... 111
3.6 Tips and Trick ............................................................................................................. 111
3.6.1 How to SQL Get Structure Only ............................................................................ 112
3.6.2 How to setup ABAP Screen Generator ................................................................. 112
3.6.3 How to setup ABAP Selection Screen ................................................................... 115
3.6.4 How to change ABAP Search Help ....................................................................... 117

4. DL-Remote 121
4.1 Installation .................................................................................................................. 122

5. DL-SAP Web Framework 129


5.1 Overview ..................................................................................................................... 130
5.2 Installation .................................................................................................................. 131
5.3 First Run ...................................................................................................................... 133
5.4 Test API ....................................................................................................................... 136
5.5 Create Report ............................................................................................................. 137
5.5.1 menu ..................................................................................................................... 139
5.5.2 view ...................................................................................................................... 141
5.5.3 controller .............................................................................................................. 143
5.5.4 model .................................................................................................................... 144

6. Troubleshooting 148
6.1 E_FAIL Status .............................................................................................................. 149
6.2 Localhost refused to connect ................................................................................... 149
6.3 ABAP Selection Screen Blank .................................................................................... 151
6.4 Can't Run DL-Apps ..................................................................................................... 152
6.5 Error Database "Can't connect to" ........................................................................... 153
6.6 DL-Sync Logon Failed ................................................................................................. 154

Index 0

DL-Application © 2024 DIFO LESTARI


Introduction
Introduction 5

1 Introduction
DL = DIFO LESTARI

Difo Lestari is IT Consultant and Application developer company. Established


in 2010, we started as ERP consulting company providing custom
developement, support and training. Our wide-knowledge and experiences in
application communication has shaped our specialty in ERP interfacing.
Weigh bridge, barcode scanner, RFID reader or any device sensor value easily
connect to ERP, either with middleware or direct to ERP screen.

Website : www.difolestari.com
E-mail : [email protected] and [email protected]

Our Release Applications


§ DL-SAP Connector
§ DL-Sync
§ DL-Remote
§ DL-SAP Web Framework
§ DL-Screen Robot

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector
DL-SAP Connector 7

2 DL-SAP Connector
DL-SAP Connector (DL-SAPCon) adalah aplikasi yang digunakan untuk
menghubungkan aplikasi non-SAP dengan SAP System. SAP yang didukung
mulai dari versi 4.6 sampai SAP HANA. Dengan menggunakan teknologi RFC,
DL-SAPCon dapat berkomunikasi dengan sangat cepat. Selain RFC, DL-
SAPCon menggunakan juga teknologi HTTP untuk berinteraksi dengan
aplikasi non-SAP.

2.1 Overview

Keuntungan menggunakan DL-SAPCon adalah sebagai berikut :


§ Minimum system requirement
§ Multithread process (Max 4 Threads)
§ Dynamic Connection to SAP System
§ Configurable
§ Enables any programming language to connect
§ No need installation
§ Low price license

Konsep dasar komunikasi antara sistem lain dengan DL-SAPConnya seperti


berikut ini :
1. One System Landscape

*Server gateway dan DL-SAPCon menjadi satu.

2. Two System Landscape

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 8

*Server gateway dan DL-SAPCon dipisah secara fisik

Bestpractise yang umum di implementasi adalah konsep "One System


Landscape". Dengan 1 server yang sama maka interaksi antara gateway dan
DL-SAPCon akan jauh lebih cepat. Server gateway juga bisa di gabungkan
dengan server FTP untuk mempercepat extract Large Data dari SAP.

DL-SAPCon memiliki 2 license yaitu


1. Community
Max thread :1
Max Instance in 1 Server : Many

2. Profesional
Max thread :4
Max Instance in 1 Server : Many

Live Server DL-SAPCon


§ SAP Interface Server (Free)

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 9

Web Application using DL-SAPCon


§ ABAP Editor Lite
§ Demo PHP Integration with SAP System

Free Windows Application


§ DL-SAP Connector
§ DL-Sync (middleware apps)

2.2 Installation

System Requirement
Mimial
§ Procecor : 2 core 4 Thread
§ Memory : 2 GB
§ Storage : 128 GB SSD
§ OS : Windows 10 Home 64bit
*minimal requirement cannot execute and process large data

Recommended
§ Procecor : 8 core 16 Thread
§ Memory : 16 GB
§ Storage : 1 TB SSD
§ OS : Windows 10 Pro 64bit

Software Requirement
§ XAMPP (Aphace-PHP)
§ SAP GUI 770 (RFC 64bit)

Major Installation to be done


1. Windows 9
2. RFC 14
2.2.1 Windows Installation
1. Install Windows OS
We recomended to install in PC or server and also can install using
MiniPC.
Setup your windows with 2 drive minimal like this below :

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 10

2. Install XAMPP (download)


§ Select only "Aphace" if database and FTP server is already installed in
another server

§ Set destination to drive D:\

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 11

3. Install SAP GUI 770 (download)


§ Select 64bit RFC Controls

§ Restart the windows after SAP GUI installation done

4. Extract file "DL-SAP Connector v1.x.zip" to D:\ (download)

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 12

5. Copy folder "gateway" to folder "D:\xampp\htdocs\"

6. Open XAMPP Control Panel and run "Aphace" service

7. Open browser and test this URL "http://localhost/gateway/"

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 13

8. Copy folder "DL-SAPCon" to folder "D:\"

9. Create desktop shortcut for "DL-SAPCon.exe" file

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 14

10.Done

2.2.2 RFC Setup

1. Login to SAP System as ABAP roles


2. Open SE37 and Create "Function Group" with name "ZDIFOTECH"

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 15

3. Open folder "RFC"

4. Create Function Module "ZRFC_ABAP_INSTALL_AND_RUN",


"YREADFILE_DLSYNC" and "YWRITEFILE_DLSYNC"

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 16

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 17

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 18

5. Done

2.3 Configuration

Setup Gateway Connection


1. Run and execute DL-SAPCon application from desktop (see here 13 ).

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 19

2. Click " " button to open configuration

*Fill all the field for test connection to SAP System


*Make sure your SAP User have an RFC Authorization, such as "S_RFC"

3. Open "Gateway Folder" tab

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 20

4. Change the parameter according to gateway folder installation

*set "Read Delay" to 500 millisecond

5. Open "License" tab

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 21

* Client ID used for online License registration to our Server


* Without any license, this apps is still running perfectly with 1 thread only

6. Click " " button to save your configuration


7. Done

Setup as Background Apps


1. Run DL-SAPCon

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 22

2. Click minimize button

3. Application can be opened again from taskbar

*double click the icon

4. Done

2.4 Tips and Trick

All tips and trick will be given during training session.


§ Create multiple DL-SAPCon instance in 1 server
§ Tuned PHP Configuration
§ Increase waiting process
§ Manage DL-Sync Background Services

DL-Application © 2024 DIFO LESTARI


DL-SAP Connector 23

§ Improve Gateway Security


§ Setup FTP server for SAP System
§ etc

Contact us for Training : [email protected] and


[email protected]

DL-Application © 2024 DIFO LESTARI


DL-Sync
DL-Sync 25

3 DL-Sync
DL-Sync is a middleware developed by Difotech, a part of CV. Difo Lestari, an
Indonesian IT consulting company. It is designed to facilitate communication
between SAP systems and other external systems. Initially launched in 2016,
DL-Sync has evolved significantly, now offering features such as ETL (Extract,
Transform, Load) processes for SAP data, multi-thread processing, and
integration with various databases like MySQL, Oracle, and SQL Server. It is
widely used to streamline data synchronization and integration, particularly
in environments where businesses use SAP ERP systems.

DL-Sync supports various versions of SAP, from older systems like SAP 4.6
and ECC6 to newer versions such as SAP HANA. Additionally, the software
comes with tools for creating and managing SAP reports, field mapping, and
even multi-upload table features for licensed users.

This middleware is particularly valued for its ease of use, as no complex


setup is required—users can simply download and run the application. The
system is also highly configurable, allowing it to meet specific client needs,
such as connecting sensors or devices to SAP systems.

Once you run DL-Sync, configure it to connect to your SAP system. You'll
need to enter details like your SAP client, username, password, and server
information. DL-Sync facilitates synchronization between SAP and external
systems, making this connection critical.

3.1 Overview

DL-Sync have 2 type version, witch is "Free" and "Pro" version. Free version
have fully functional feature and no need License.

Advantage of DL-Sync (free):


§ No License
§ No Data Limit
§ No Installation
§ No Audit

Supported ETL Datasource


§ ODBC for Database
§ DL-SAPCon 7 for SAP System (ECC/HANA)

Feature TCode Free Pro


Main Feature
SQL Editor 32 SQLD01
Clone Database Table 43 SQLD02
ETL DB to DB 45 SQLD03

DL-Application © 2024 DIFO LESTARI


DL-Sync 26

Feature TCode Free Pro


ABAP Editor 58 SAPD01
Clone SAP Table 75 SAPD02
ETL SAP to DB 111 SAPD03
ETL DB to SAP 91 SAPD04
ETL Service 95 ETL01
Custom TCode 102 TCODE
ETL DB (Multi) to SAP SAPD05
SAP Directory 105 SAPD06
DL-Report Config SAPR01

Others
Commercial Ads
Max Field Mapping 30 Many
ABAP generator for SAPD05
Report Mode for User/Staff

Download Link
§ DL-Sync (middleware apps)

3.2 Installation

DL-Sync doesn't require complex installation. Simply download it from the


official Difolestari or SAP-Interface website, and it is ready to run without
additional setup.

System Requirement
Mimial
§ Procecor : 2 core 2 Thread
§ Memory : 2 GB
§ Storage : 128 GB HDD
§ OS for DL-Sync v4 above : Windows 10 Home 64bit
§ OS for DL-Sync v3 : Windows XP 64bit
*minimal requirement cannot execute and process large data

DL-Application © 2024 DIFO LESTARI


DL-Sync 27

Recommended
§ Procecor : 4 core 4 Thread
§ Memory : 8 GB
§ Storage : 128 GB SSD
§ OS : Windows 10 Pro 64bit

Database Connector
§ ODBC Driver for Specific Database 29

SAP Connector
§ DL-SAPCon 7

How to get and run DL-Sync


1. Download the latest DL-Sync (here)
2. Extract file

3. Run "DL-Sync.exe" file


4. Done

*no need installation

3.3 Configuration

1. SAP Connection 27
2. ODBC Connection 29

3.3.1 SAP Connection


1. Run "DL-Sync"
2. Enter your SAP Connection

DL-Application © 2024 DIFO LESTARI


DL-Sync 28

*Make sure your SAP User have an RFC Authorization, such as "S_RFC"

3. Open "Gateway" tab and enter Dl-SAPCon gateway

*Check your gateway from DL-SAPCon Configuration 12

4. Open "Function Module" tab

DL-Application © 2024 DIFO LESTARI


DL-Sync 29

*Make sure your already create those function module in your SAP Server (see
here 14 )

5. Back to "SAP Connection" tab and press "Logon"


6. Wait until this message showed up

7. Done
3.3.2 ODBC Connection
Example : Setup MySQL or MariaDB ODBC Connection
1. Download "ODBC driver for MySQL" (here)
2. Run and install "ODBC driver for MySQL"
3. Click "Windows Search" and type "ODBC"
4. Select "ODBC Data Source (64 bit)"

DL-Application © 2024 DIFO LESTARI


DL-Sync 30

5. Click "Add" button

6. Select "MySQl ODBC 9.0 ANSI Driver" and click "Finish"

DL-Application © 2024 DIFO LESTARI


DL-Sync 31

7. Fill all parameter

*ex : connect to local database of MySQL

8. Click "Ok"

DL-Application © 2024 DIFO LESTARI


DL-Sync 32

9. Done
3.4 Features

1. SQL Statement 32
2. Clone Database Table 43

3. ETL DB to DB 45
4. ABAP Program 58
5. Clone SAP Table 75
6. ETL SAP to DB 78
7. ETL DB to SAP 111
8. ETL Service 95
9. Custom TCode 102
10.SAP Directory 105

3.4.1 SQL Editor


SQL Editor is a tools to create and edit SQL statements, and view the result
directly in one screen.
3.4.1.1 Create New Manual
Create new SQL Statement
1. Select "SQLD01"

DL-Application © 2024 DIFO LESTARI


DL-Sync 33

2. Click "Run TCode" or Double Click "SQLD01"


3. Click "Cancel" to create new SQL Statement

4. Click "Build" to create ODBC Connection String

DL-Application © 2024 DIFO LESTARI


DL-Sync 34

5. Select "ODBC Driver" and click "Next>>"

6. Select "your Data Source Name" (create new 29 )

DL-Application © 2024 DIFO LESTARI


DL-Sync 35

*ex : local

7. Click "Test Connection" and "Ok"


8. Connection String is created and then Click "Ok"

9. SQL Editor is ready

DL-Application © 2024 DIFO LESTARI


DL-Sync 36

10.Enter SQL Name "SQL_SELECT_TEST01"


11.Enter Tablename "ZMARA_SOURCE" (create DB example 107 )
12.Insert SQL for select data form table "ZMARA_SOURCE"

13.Click "Test Run"

DL-Application © 2024 DIFO LESTARI


DL-Sync 37

14.Click " " button


15.Done
3.4.1.2 Create New Automatic
Create SQL Statement using SQL Generator
1. Run TCode "SQLD01"
2. Click "Cancel" to create New SQL
3. Setup ODBC Connection String like before (here 32 )
4. Enter SQL Name "SQL_SELECT_TEST02"
5. Click "INS-Structure" button

6. Enter/select "zmara_source"
7. click "Execute" or press "Enter"

DL-Application © 2024 DIFO LESTARI


DL-Sync 38

8. Click "Select" button, SQL Statement is generated automatically

9. Click "Test Run" and then " "


10.Done
3.4.1.3 Modify SQL
Modify exiting SQL Statement
1. Select "SQLD01"

DL-Application © 2024 DIFO LESTARI


DL-Sync 39

2. Click "Run TCode" or Double Click "SQLD01"


3. Select "SQL_SELECT_TEST01" and click open

4. Click " " button and then click "zmara_source"

DL-Application © 2024 DIFO LESTARI


DL-Sync 40

5. Place cursor to SQL Editor and select "*"


6. Double click field "MATNR"

7. Do it again for other field and don't forget write "," between field

DL-Application © 2024 DIFO LESTARI


DL-Sync 41

8. Click "Test Run"

9. Click " " when finish modifying


10.Done

3.4.1.4 Copy SQL


Copy exiting SQL Statement
1. Select "SQLD01"

2. Click "Run TCode" or Double Click "SQLD01"


3. Select "SQL_SELECT_TEST01" and click open

DL-Application © 2024 DIFO LESTARI


DL-Sync 42

4. Change SQL Name "SQL_SELECT_TEST01" to "SQL_SELECT_SOURCE"

*Before

*After

DL-Application © 2024 DIFO LESTARI


DL-Sync 43

5. Click "Test Run" and " "


6. Done
3.4.2 Clone Database Table
1. Select "SQLD02"

2. Click "Run TCode" or Double Click "SQLD02"

DL-Application © 2024 DIFO LESTARI


DL-Sync 44

3. Click " " button and select ODBC connection string


* Left button for Source database
* Right button for Target database
For example, Source DB and Source Target is in the same Database

4. Select "zmara_source" and click "Execute"

5. Click "Create Style 1"


6. Edit SQL Statement, word "zmara_source" to "zmara_copy"

DL-Application © 2024 DIFO LESTARI


DL-Sync 45

7. Click "Run SQL"


8. Open browser and check "PHPMyAdmin"

9. Done
3.4.3 ETL DB to DB
DL-Sync supports ETL processes to extract data from SAP, transform it, and
load it into external databases (e.g., MySQL, Oracle, SQL Server). You can
configure these processes using the built-in GUI.

1. Single DB 46
2. Multi DB 55

DL-Application © 2024 DIFO LESTARI


DL-Sync 46

3.4.3.1 Single DB
1. Select "SQLD03"

2. Click "Run TCode" or Double Click "SQLD03"


3. Click "Cancel" to create new ETL

DL-Application © 2024 DIFO LESTARI


DL-Sync 47

4. Enter ETL Name "ETL_DB2DB_TEST01"


5. Click " " and select "SQL_SELECT_SOURCE"

6. Click " " button and select "SQL_SELECT_TARGET01"


Create "SQL_SELECT_TARGET01"
1. Open TCode "SQLD01"

DL-Application © 2024 DIFO LESTARI


DL-Sync 48

2. Click "Cancel" to create New SQL


3. Setup ODBC Connection String
4. Enter SQL Name "SQL_SELECT_TARGET01"
5. Click "INS-Structure"
6. Select "zmara_target01" and click "Execute"
7. Click "Select" button on left side
8. Add SQL "where 1 = 2"

9. Click " "


10.Done

Detail Step : Create New Automatic 37

7. Click " " button

DL-Application © 2024 DIFO LESTARI


DL-Sync 49

8. Click " " button and wait until finish


9. Select grid pos 1 - "SQL_SELECT_TARGET01" and click "Field Mapping"
*or just double click on grid row

DL-Application © 2024 DIFO LESTARI


DL-Sync 50

10.Click "Get Fields" and "Auto Map"

11. Click " " button and select delete SQL "SQL_DELETE_TARGET01"
Create "SQL_DELETE_TARGET01"
1. Open TCode "SQLD01"
2. Click "Cancel" to create New SQL
3. Setup ODBC Connection String
4. Enter SQL Name "SQL_DELETE_TARGET01"
5. Click "INS-Structure"
6. Select "zmara_target01" and click "Execute"

DL-Application © 2024 DIFO LESTARI


DL-Sync 51

7. Click "Delete" button on left side


8. Delete SQL "Where" if not needed

9.

10.Click " "


11.Done

Detail Step : Create New Automatic 37

12. Delete "data1" -> "date" and "time"

13.Select cell "Pos 5" - "Function" and click "date" from left List
14.Repeat to "Pos 6" and result like this

15.Click " " and close the screen


16.Open PHPMyAdmin and create some data for "zmara_source" table

DL-Application © 2024 DIFO LESTARI


DL-Sync 52

17.Back to DL-Sync screen


18.Click " " button

19.Click "Test Run "

DL-Application © 2024 DIFO LESTARI


DL-Sync 53

* if show error message then check "Troubleshooting 149 " page

20.Close the screen and back to main screen of "SQLD03"


21.Click "Test Run"
22.Click "Start" and wait until finished

DL-Application © 2024 DIFO LESTARI


DL-Sync 54

23.Open PHPMyAdmin and check data of "zmara_target01" table

24.Data from "zmara_source" is copied to "zmara_target01"


25.Done

DL-Application © 2024 DIFO LESTARI


DL-Sync 55

3.4.3.2 Multi DB
1. Run "SQLD03"
2. Select ETL Name "ETL_DB2DB_TEST01 46 "

3. Rename ETL Name to "ETL_DB2DB_TEST02" and click " " button

4. Select grid pos 1 - "SQL_SELECT_TARGET01" and click "Field Mapping"


5. Do the mapping like in "Single DB 79 " step number 10-15
6. Click " " and select SQL Name "SQL_SELECT_TARGET02"
Create "SQL_SELECT_TARGET02"
1. Open TCode "SQLD01"
2. Click "Cancel" to create New SQL
3. Setup ODBC Connection String
4. Enter SQL Name "SQL_SELECT_TARGET02"
5. Click "INS-Structure"
6. Select "zmara_target02" and click "Execute"
7. Click "Select" button on left side
8. Add SQL "where 1 = 2"

DL-Application © 2024 DIFO LESTARI


DL-Sync 56

9. Click " "


10.Done

Detail Step : Create New Automatic 37

7. Click " " button

8. Click " " button


9. Select grid pos 2 - "SQL_SELECT_TARGET02" and click "Field Mapping"
10.Do the mapping like in "Single DB 46 " step number 10-15
*Don't forget to create "SQL_DELETE_TARGET02"

DL-Application © 2024 DIFO LESTARI


DL-Sync 57

11.Back to main screen and click "Test Run"


12.Click "Start" and wait until finished

13.Open PHPMyAdmin and Check data of "zmara_target01" and


"zmara_target02"

DL-Application © 2024 DIFO LESTARI


DL-Sync 58

14.Done
3.4.4 ABAP Editor
ABAP Editor is a tools to create and edit ABAP Program, and run the result
directly in one screen. Almost 80% abap syntax is supported using this editor.

Forbidden ABAP Syntax


§ Concatenate using "&"
Ex : lv_filename = p_file & '.csv'.

§ New Declaration "DATA(***)"


Ex : DATA(text) = 'ABC'.

DL-Application © 2024 DIFO LESTARI


DL-Sync 59

3.4.4.1 Create New Manual


1. Select "SAPD01"

2. Click "Run TCode" or Double Click "SAPD01"


3. Click "Cancel" to create new ABAP Program

4. Enter Program name "SAP_SELECT_TEST01"

DL-Application © 2024 DIFO LESTARI


DL-Sync 60

5. Write simple ABAP code like this below

6. Click " " button


7. Click "Test Run"

DL-Application © 2024 DIFO LESTARI


DL-Sync 61

8. Click "Execute" and wait until finish

DL-Application © 2024 DIFO LESTARI


DL-Sync 62

*Explanation about screen generator (here 112 )

9. Done
3.4.4.2 Create New Automatic
Create ABAP Program using ABAP Program Generator
1. Select "SAPD01"
2. Click "Run TCode" or Double Click "SAPD01"
3. Click "Cancel" to create new ABAP Program
4. Enter Program name "SAP_SELECT_TEST02"
5. Click "INS-Structure" button
6. Enter sap table name "MARA" and click "Execute" or press "ENTER"

DL-Application © 2024 DIFO LESTARI


DL-Sync 63

7. Select another fields

8. Click "Text Report" from left side

DL-Application © 2024 DIFO LESTARI


DL-Sync 64

9. Click " "


10.Click "Test Run"

DL-Application © 2024 DIFO LESTARI


DL-Sync 65

11.Click "Execute" and wait until finish

DL-Application © 2024 DIFO LESTARI


DL-Sync 66

*Explanation about screen generator (here 112 )

12.Done
3.4.4.3 Create Custom Search Help
Create ABAP Program using ABAP Program Generator
1. Select "SAPD01"
2. Click "Run TCode" or Double Click "SAPD01"
3. Click "Cancel" to create new ABAP Program
4. Enter Program name "SH_MAKT"
5. Click "INS-Structure" button
6. Enter sap table name "MAKT" and click "Execute" or press "ENTER"

DL-Application © 2024 DIFO LESTARI


DL-Sync 67

7. Select "MAKTX" field

8. Click "Search Help" from left side

DL-Application © 2024 DIFO LESTARI


DL-Sync 68

9. Click " "


10.Click "Test Run"

DL-Application © 2024 DIFO LESTARI


DL-Sync 69

11.Double click one of rows, ex : Material Number "68"

12.Done
3.4.4.4 Create Extract Data Program
Create ABAP Program using ABAP Program Generator
1. Select "SAPD01"
2. Click "Run TCode" or Double Click "SAPD01"
3. Click "Cancel" to create new ABAP Program
4. Enter Program name "SAP_SELECT_MARA"
5. Click "INS-Structure" button
6. Enter sap table name "MARA" and click "Execute" or press "ENTER"

DL-Application © 2024 DIFO LESTARI


DL-Sync 70

7. Select another fields

8. Click "Extract Data "TABLE"" from left side

DL-Application © 2024 DIFO LESTARI


DL-Sync 71

9. Click " "


10.Click "Test Run"

DL-Application © 2024 DIFO LESTARI


DL-Sync 72

11.Click "Execute" and wait until finish

DL-Application © 2024 DIFO LESTARI


DL-Sync 73

*Explanation about screen generator (here 112 )

12.Done
3.4.4.5 Create Upload Data Program
Create ABAP Program using ABAP Program Generator
1. Select "SAPD01"
2. Click "Run TCode" or Double Click "SAPD01"
3. Click "Cancel" to create new ABAP Program
4. Enter Program name "SAP_UPLOAD_ZMARA"
5. Click "INS-Structure" button
6. Enter sap table name "ZMARA_EXTERNAL 109 " and click "Execute" or press
"ENTER"

DL-Application © 2024 DIFO LESTARI


DL-Sync 74

7. Select another fields

8. Click "Upload Data" from left side

DL-Application © 2024 DIFO LESTARI


DL-Sync 75

9. Click " "


10.Done
3.4.5 Clone SAP Table
1. Select "SAPD02"

2. Click "Run TCode" or Double Click "SAPD02"

DL-Application © 2024 DIFO LESTARI


DL-Sync 76

3. Enter table "MARA" and click "Execute"

4. Click " " button and select ODBC Connection String


* Right button for Target database

DL-Application © 2024 DIFO LESTARI


DL-Sync 77

5. Check "Comment" and Click "Create Style 1"

6. Click "Run SQL"


7. Open PHPMyAdmin and check "MARA" table

DL-Application © 2024 DIFO LESTARI


DL-Sync 78

8. Done
3.4.6 ETL SAP to DB
The tool allows for syncing data from SAP to external databases or vice
versa. This can be particularly useful for automating reports or data transfer
across systems. You can configure field mapping and data transfer settings
based on your needs.

1. Single DB 79
2. Multi DB 87

DL-Application © 2024 DIFO LESTARI


DL-Sync 79

3.4.6.1 Single DB
1. Select "SAPD03"

2. Click "Run TCode" or Double Click "SAPD03"


3. Click "Cancel" to create new ETL

DL-Application © 2024 DIFO LESTARI


DL-Sync 80

4. Enter ETL Name "ETL_SAP2DB_TEST01"


5. Click " " and select "SAP_SELECT_MARA"

6. Click " " button and select "SQL_SELECT_TARGET01"


Create "SQL_SELECT_TARGET01"
1. Open TCode "SQLD01"

DL-Application © 2024 DIFO LESTARI


DL-Sync 81

2. Click "Cancel" to create New SQL


3. Setup ODBC Connection String
4. Enter SQL Name "SQL_SELECT_TARGET01"
5. Click "INS-Structure"
6. Select "zmara_target01" and click "Execute"
7. Click "Select" button on left side
8. Add SQL "where 1 = 2"

9. Click " "


10.Done

Detail Step : Create New Automatic 37

7. Click " " button

DL-Application © 2024 DIFO LESTARI


DL-Sync 82

8. Click " " button and wait until finish


9. Select grid pos 1 - "SQL_SELECT_TARGET01" and click "Field Mapping"
*or just double click on grid row

DL-Application © 2024 DIFO LESTARI


DL-Sync 83

10. Click "Get Fields" and "Auto Map"

11. Click " " button and select delete SQL "SQL_DELETE_TARGET01"
Create "SQL_DELETE_TARGET01"
1. Open TCode "SQLD01"
2. Click "Cancel" to create New SQL
3. Setup ODBC Connection String
4. Enter SQL Name "SQL_DELETE_TARGET01"
5. Click "INS-Structure"
6. Select "zmara_target01" and click "Execute"

DL-Application © 2024 DIFO LESTARI


DL-Sync 84

7. Click "Delete" button on left side


8. Delete SQL "Where" if not needed

9.

10.Click " "


11.Done

Detail Step : Create New Automatic 37

12. Delete "data1" -> "date" and "time"

13.Select cell "Pos 5" - "Function" and click "date" from left List
14.Repeat to "Pos 6" and result like this

15.Click " " and close the screen


16.Open SAP GUI and goto SE16 -> MARA

DL-Application © 2024 DIFO LESTARI


DL-Sync 85

17.Back to main screen of "SAPD03"


18.Click "Test Run"
19.Click "Start" and wait until finished

DL-Application © 2024 DIFO LESTARI


DL-Sync 86

20.Open PHPMyAdmin and check data of "zmara_target01" table

DL-Application © 2024 DIFO LESTARI


DL-Sync 87

21.Data from SAP "MARA" is copied to "zmara_target01"


22.Done
3.4.6.2 Multi DB
1. Run "SAPD03"
2. Select ETL Name "ETL_SAP2DB_TEST01 79 "

3. Rename ETL Name to "ETL_SAP2DB_TEST02" and click " " button

DL-Application © 2024 DIFO LESTARI


DL-Sync 88

4. Select grid pos 1 - "SQL_SELECT_TARGET01" and click "Field Mapping"


5. Do the mapping like in "Single DB 79 " step number 10-15
6. Click " " and select SQL Name "SQL_SELECT_TARGET02"
Create "SQL_SELECT_TARGET02"
1. Open TCode "SQLD01"
2. Click "Cancel" to create New SQL
3. Setup ODBC Connection String
4. Enter SQL Name "SQL_SELECT_TARGET02"
5. Click "INS-Structure"
6. Select "zmara_target02" and click "Execute"
7. Click "Select" button on left side
8. Add SQL "where 1 = 2"

9. Click " "

DL-Application © 2024 DIFO LESTARI


DL-Sync 89

10.Done

Detail Step : Create New Automatic 37

7. Click " " button

8. Click " " button


9. Select grid pos 2 - "SQL_SELECT_TARGET02" and click "Field Mapping"
10.Do the mapping like in "Single DB 79 " step number 10-15
*Don't forget to create "SQL_DELETE_TARGET02"

11.Back to main screen and click "Test Run"


12.Click "Start" and wait until finished

DL-Application © 2024 DIFO LESTARI


DL-Sync 90

13.Open PHPMyAdmin and Check data of "zmara_target01" and


"zmara_target02"

DL-Application © 2024 DIFO LESTARI


DL-Sync 91

14.Done
3.4.7 ETL DB to SAP
The tool allows for syncing data from external databases to SAP or vice
versa. This can be particularly useful for automating reports or data transfer
across systems. You can configure field mapping and data transfer settings
based on your needs.

DL-Application © 2024 DIFO LESTARI


DL-Sync 92

3.4.7.1 Single DB
1. Select "SAPD04"

2. Click "Run TCode" or Double Click "SAPD04"


3. Click "Cancel" to create new ETL

4. Enter ETL Name "ETL_DB2SAP_TEST01"

DL-Application © 2024 DIFO LESTARI


DL-Sync 93

5. Click " " and select "SQL_SELECT_SOURCE"

6. Click " " button and select "SAP_UPLOAD_ZMARA"

7. Click " " button and wait until finish


8. Open PHPMyAdmin and create some data for "zmara_source" table

DL-Application © 2024 DIFO LESTARI


DL-Sync 94

9. Back to DL-Sync screen


10.Click "Test Run"
11.Click "Start" and wait until finished

12.Logon to SAP System and open "SE16"->ZMARA_EXTERNAL

DL-Application © 2024 DIFO LESTARI


DL-Sync 95

13.Data from External Database "ZMARA_SOURCE" is copied to


"ZMARA_EXTERNAL"
14.Done
3.4.8 ETL Service
DL-Sync includes ETl-Service and monitoring tools that allow you to track the
performance and logs of your synchronization processes. This ensures
smooth operation and helps troubleshoot any issues.

1. Database 95
2. SAP System 99

3.4.8.1 Database
1. Open Windows Explorer
2. Create new Folder "D:\Services\SQL\"

3. Select "ETL01"

DL-Application © 2024 DIFO LESTARI


DL-Sync 96

4. Click "Run TCode" or Double Click "ETL01"


5. Select folder "D:\Services\SQL\" and click "Ok"

6. Select "ETL_DB2DB_TEST01" and "ETL_DB2DB_TEST02"

DL-Application © 2024 DIFO LESTARI


DL-Sync 97

7. Click " "

*DL_Process created in folder "D:\Services\SQL\"

8. Click "Test Run"

DL-Application © 2024 DIFO LESTARI


DL-Sync 98

9. Click "Start All"

DL-Application © 2024 DIFO LESTARI


DL-Sync 99

10.Done
3.4.8.2 SAP System
1. Open Windows Explorer
2. Create new Folder "D:\Services\SAP\"

3. Select "ETL01"

4. Click "Run TCode" or Double Click "ETL01"


5. Select folder "D:\Services\SAP\" and click "Ok"

DL-Application © 2024 DIFO LESTARI


DL-Sync 100

6. Select "ETL_DB2SAP_TEST01" and "ETL_SAP2DB_TEST02"

7. Click " "

DL-Application © 2024 DIFO LESTARI


DL-Sync 101

*DL_Process created in folder "D:\Services\SAP\"

8. Click "Test Run"

9. Click "Start All"

DL-Application © 2024 DIFO LESTARI


DL-Sync 102

10.Done
3.4.9 Custom TCode
1. Select "TCode"

2. Click "Run TCode" or Double Click "TCode"

DL-Application © 2024 DIFO LESTARI


DL-Sync 103

3. Enter parameter like this bellow

4. Click " "


5. Enter parameter "ZMARA01" in Command Field

DL-Application © 2024 DIFO LESTARI


DL-Sync 104

6. Press "ENTER"

7. Click "Close"

8. Click "Execute" to run Report

DL-Application © 2024 DIFO LESTARI


DL-Sync 105

9. Done

3.4.10 SAP Directory


1. Select "SAPD06"

2. Click "Run TCode" or Double Click "SAPD06"

DL-Application © 2024 DIFO LESTARI


DL-Sync 106

3. Click any row and Click "Preview"

4. Done

3.5 Practice

Preparation
§ Database 107
§ SAP ZTable 109

Create ETL
§ ETL DB to DB

DL-Application © 2024 DIFO LESTARI


DL-Sync 107

§ ETL SAP to DB
§ ETL DB to SAP
3.5.1 Database Examples
1. Open webbrowser
2. Enter this URL "http://localhost/"
3. Click "phpmyadmin"

4. Click "test" in the Tree

5. Open "SQL" tab and enter this SQL


CREATE TABLE `zmara_source` (
`MATNR` char(18) NOT NULL COMMENT 'Material Number',
`ERSDA` date NOT NULL COMMENT 'Created On',
`ERNAM` char(12) NOT NULL COMMENT 'Name of Person who Created
the Object',
`LAEDA` date NOT NULL COMMENT 'Date of Last Change',
`date` date NOT NULL COMMENT 'date dl-sync',
`time` time NOT NULL COMMENT 'time dl-sync',
PRIMARY KEY (`MATNR` )
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

DL-Application © 2024 DIFO LESTARI


DL-Sync 108

CREATE TABLE `zmara_target01` (


`MATNR` char(18) NOT NULL COMMENT 'Material Number',
`ERSDA` date NOT NULL COMMENT 'Created On',
`ERNAM` char(12) NOT NULL COMMENT 'Name of Person who Created
the Object',
`LAEDA` date NOT NULL COMMENT 'Date of Last Change',
`date` date NOT NULL COMMENT 'date dl-sync',
`time` time NOT NULL COMMENT 'time dl-sync',
PRIMARY KEY (`MATNR` )
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
CREATE TABLE `zmara_target02` (
`MATNR` char(18) NOT NULL COMMENT 'Material Number',
`ERSDA` date NOT NULL COMMENT 'Created On',
`ERNAM` char(12) NOT NULL COMMENT 'Name of Person who Created
the Object',
`LAEDA` date NOT NULL COMMENT 'Date of Last Change',
`date` date NOT NULL COMMENT 'date dl-sync',
`time` time NOT NULL COMMENT 'time dl-sync',
PRIMARY KEY (`MATNR` )
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

6. Click "Go" button on right bottom


7. New table is created

DL-Application © 2024 DIFO LESTARI


DL-Sync 109

8. Done

3.5.2 SAP ZTable Examples


1. Login to SAP System
2. Open "SE11"
3. Enter table name "ZMARA_EXTERNAL"

4. Click "Create" button and fill this parameter

DL-Application © 2024 DIFO LESTARI


DL-Sync 110

5. Enter field like this bellow

6. Click " " and Click "Local Object"


7. Click "Technical Setting" and fill this parameter

DL-Application © 2024 DIFO LESTARI


DL-Sync 111

8. Click " " and "Back"


9. Click " " to activate the table
10.Done
3.5.3 ETL DB to DB
3.5.4 ETL SAP to DB
3.5.5 ETL DB to SAP
3.6 Tips and Trick

Basic tips and trick


§ How to SQL Get Structure Only 112
§ How to setup ABAP Screen Generator 112
§ How to setup ABAP Selection Screen 115
§ How to change ABAP Search Help 117

Advanced tips and trick will be given during training session.


§ Advanced ETL Mapping/Configuration
§ Extract SAP Report using Submit technique

DL-Application © 2024 DIFO LESTARI


DL-Sync 112

§ Extract SAP Large Data using FTP


§ Posting/Change SAP Transaction from external database
§ Create SAP ETL Services at specific date
§ Upload multiple table to SAP System in one service
§ SAP ABAP Debugger
§ etc

Contact us for Training : [email protected] and


[email protected]
3.6.1 How to SQL Get Structure Only
SQL Statement can be generate a structure only without selecting data. This
SQL is used for ETL Mapping feature.

Common SQL :

SELECT * FROM ZMARA_SOURCE;

Structure Only SQL :

SELECT * FROM ZMARA_SOURCE WHERE 1;

or in some DB using this style

SELECT * FROM ZMARA_SOURCE WHERE 1 = 2;

3.6.2 How to setup ABAP Screen Generator


Every first line code in Abap Editor 58 have a special code for screen
generator.

DL-Application © 2024 DIFO LESTARI


DL-Sync 113

Report VARIANT
§ REPORT <free_name> : Output as Text
§ REPORT TEXT_* : Output as Text

§ REPORT HTML_* : Output as HTML

DL-Application © 2024 DIFO LESTARI


DL-Sync 114

§ REPORT HTML_GRID_* : Output as HTML with JSGRID

§ REPORT SEARCH_HELP_* : Output as Grid. It's used for Search Help


feature.

DL-Application © 2024 DIFO LESTARI


DL-Sync 115

§ REPORT EXTRACT_DATA_* : Output as Text and File that contain data.


Only for ETL Purpose not for reporting.

3.6.3 How to setup ABAP Selection Screen


1. Run TCode "SAPD01"
2. Select program "SAP_SELECT_TEST02"
3. Open tab "Search Help"

DL-Application © 2024 DIFO LESTARI


DL-Sync 116

4. Click "Regenerate"

5. Click " "


6. Click "Test Run"

DL-Application © 2024 DIFO LESTARI


DL-Sync 117

7. Done
3.6.4 How to change ABAP Search Help
Make sure the "Search Help" is already generated.
Tutorial : How to set ABAP Selection Screen 115

1. Run TCode "SAPD01"


2. Select program "SAP_SELECT_TEST02"
3. Click "Test Run"

DL-Application © 2024 DIFO LESTARI


DL-Sync 118

4. Open tab "Search Help"

5. Click " " and select "SH_MAKT"

Create Custom Search Help (here 66 )

6. Click "Update"

DL-Application © 2024 DIFO LESTARI


DL-Sync 119

7. Click " "


8. Click "Test Run"

9. Click " " button

DL-Application © 2024 DIFO LESTARI


DL-Sync 120

10.Double click any row, ex : Material Number "68"

11.Done

DL-Application © 2024 DIFO LESTARI


DL-Remote
DL-Remote 122

4 DL-Remote
DL-Remote is very small and easy application for remote or display Desktop
from another computer via Webbrowser.

§ No License
§ No Data Limit
§ No Installation
§ No Audit

Live Demo Server :


http://103.31.250.116/

Download Link
§ DL-Remote

4.1 Installation

1. Download the lastest version (here)

2. Extract to any folder, ex : D:\

DL-Application © 2024 DIFO LESTARI


DL-Remote 123

3. Right click on "This PC" and select "Properties" to Check your windows

4. Read this information

DL-Application © 2024 DIFO LESTARI


DL-Remote 124

5. Open folder DL_Remote v1.3 (64bit)"" bit then copy all then content to "D:
\DL_Remote v1.3"
6. Select and delete 2 folder above

DL-Application © 2024 DIFO LESTARI


DL-Remote 125

7. Open "config.dfl" with notepad

127.0.0.1 : IP Address
8080 : Port Number
1.5 : Screen scale
70 : Quality ( 1 - 100)
Y : Y = Remote On, N = Remote Off

8. Open "Command Prompt" / "Terminal" and enter "ipconfig" to get


computer IP Address

9. Change parameter according to IP Address

DL-Application © 2024 DIFO LESTARI


DL-Remote 126

10.Click save and close


11.Open "passkey.dfl" if you want to change the password
12.Run "DL-Remote.exe"
Check "Can't Run DL-Apps 152 "
13.Check all and click "Allow Access" button

14.Application automatic run in background and you can find it in taskbar

15.Double click " " icon on taskbar To open DL-Remote apps

DL-Application © 2024 DIFO LESTARI


DL-Remote 127

16.Click "http://<ipaddress>:8080"

17.Enter pass key "difotech2021"

DL-Application © 2024 DIFO LESTARI


DL-Remote 128

18.Test this "http://<ipaddress>:8080" from another computer in same


network
19.Have fun

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework
DL-SAP Web Framework 130

5 DL-SAP Web Framework


DL-SAP Web Framework (DL-SWF) adalah alternative dari SAP Fiori dengan
kemudahan instalasi dan development. DL-SWF dibuat berbasis bahasa
pemrograman PHP dan menggunakan teknologi DL-SAPCon 7 untuk
berinteraksi dengan SAP System.

5.1 Overview

Keuntungan menggunakan DL-SWF adalah sebagai berikut :


§ Minimum system requirement
§ Easy development
§ No License
§ No Audit

DL-SWF menerapkan konsep MVC (Module View Conttroller) agar


mempermudah dan mempercepat dalam development.
Module
-> berfungsi untuk mengatur process data SAP dalam bentuk source code
ABAP

View
-> berfungsi untuk menampilkan informasi dalam bentuk GUI

Controller
-> berfungsi untuk menghubungankan antara View dan Model menjadi
satu kesatuan

Kelebihan DL-SWF yang tidak dimiliki framework lainnya adalah tidak perlu
menggunakan API standard (REST, OData, RFCWebeservices dst) dalam
melakukan koneksi ke SAP System tetapi langsung menggunakan ABAP
Program yang tersimpan di server DL-SWF. ABAP Program di "Model"
tersebut yang nantinya di kirim oleh "Controller" ke DL-SAPCon untuk di
process dan dikembalikan hasilnya ke server DL-SWF dan ditampilkan oleh
"View".

Selain itu ada kelebihan lainnya adalah Source code ABAP yang disimpan di
folder "Model" dapat diganti langsung tanpa harus melalui transport seperti
didalam SAP System.

Live Demo
§ DL-SWF

Download Link
§ DL-SWF

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 131

5.2 Installation

System Requirement
Mimial
§ Procecor : 2 core 4 Thread
§ Memory : 2 GB
§ Storage : 128 GB SSD
§ OS : Any Linux or Windows
*minimal requirement cannot execute and process large data

Recommended
§ Procecor : 4 core 8 Thread
§ Memory : 8 GB
§ Storage : 256 GB SSD
§ OS : Any Linux or Windows

Software Requirement
§ XAMPP (Aphace-PHP)
§ Sublime Text

SAP Connector
§ DL-SAPCon 7

1. Download and Install "XAMPP" and "Sublime Text"


*Recomended to install XAMPP in "D:\" drive
2. Download the lastest DL-SWF
3. Extract dl-swf to "D:\xampp\htdocs"

4. Open "XAMPP Control Panel" and click "Start" Aphace

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 132

5. Open Webbrowser and enter this URL "http://localhost/dl-swf"

*DL-SWF framework already has defaul connection. it's a Free Connection to


SAP IDES ECC6

6. Done

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 133

5.3 First Run

1. Open Webbrowser and enter this URL "http://localhost/dl-swf"

*DL-SWF framework already has defaul connection. it's a Free Connection to


SAP IDES ECC6

2. Click "Login" button

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 134

*There is 3 template is provide and can run perfectly

3. Click "Template Text"

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 135

4. Click "Execute"

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 136

By default this template connected to DL-SAPCon and SAP IDES in SAP-


Interface server
In the future you can change to your server

5. Try another "Template"


6. Done
5.4 Test API

1. Install "Postman" application (download)


2. Run Postman and create new
3. Enter parameter like this bellow

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 137

*ebeln = Purchase Order Number

4. Click "Send"

5. Done
5.5 Create Report

Scenario "Display PO Header List"

1. Menu 139 : Modify "main.php"


2. View 141 : create "po_header_list.php"
3. Controller 143 : create "execute_po_header_list.php"
4. Model 144 : create "abap_po_header_list.php"

Result :

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 138

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 139

5.5.1 menu
1. Open Sublime and click open folder

2. Select "D:\xampp\htdocs\dl-swf\"

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 140

3. Click "main.php" file


4. Add new code like this

5. Click "Save"
6. Done

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 141

5.5.2 view
1. Right Click on "view"

2. Click "Save" as "po_header_list.php"


3. Click file "text000.php" and copy and paste the source to
"po_header_list.php"
4. Change objectname with "po_header_list" and Change the title to "PO
Header List"

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 142

5. Change "Selection Screen" with this code

6. Click "Save"
7. Done

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 143

5.5.3 controller
1. Right Click on "view"

2. Click "Save" as "execute_po_header_list.php"


3. Click file "execute_text0001.php" and copy and paste the source to
"execute_po_header_list.php"
4. Change the logic screen with this code

5. Click "Save"
6. Done

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 144

5.5.4 model
1. Right Click on "view"

2. Click "Save" as "abap_po_header_list.src"


3. Click file "abap_text0001.php" and copy and paste the source to
"abap_po_header_list.src"
4. Write abap code, select data from "EKKO" table and display with "WRITE"
Example Code
REPORT TEXT_EKKO LINE-SIZE 256.
*This source code generated using DL-Sync application

TABLES : EKKO.

TYPES : BEGIN OF TY_EKKO,


EBELN TYPE EKKO-EBELN,
BUKRS TYPE EKKO-BUKRS,
BSART TYPE EKKO-BSART,
AEDAT TYPE EKKO-AEDAT,
ERNAM TYPE EKKO-ERNAM,
LIFNR TYPE EKKO-LIFNR,
ZTERM TYPE EKKO-ZTERM,
EKORG TYPE EKKO-EKORG,
EKGRP TYPE EKKO-EKGRP,
END OF TY_EKKO.
DATA GI_EKKO TYPE STANDARD TABLE OF
TY_EKKO WITH HEADER LINE.

SELECT-OPTIONS S_EBELN FOR EKKO-EBELN. " Purchasing Document


Number

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 145

SELECT-OPTIONS S_AEDAT FOR EKKO-AEDAT. " Date on Which Record


Was Created

PARAMETER P_MAXR TYPE N LENGTH 10 DEFAULT [maxno]. " Max Row

START-OF-SELECTION.

*Additional Code
S_EBELN-SIGN = 'I'.
S_EBELN-OPTION = 'CP'.
S_EBELN-LOW = '[EBELN]'.
WRITE : / S_EBELN-LOW.
IF S_EBELN-LOW IS NOT INITIAL.
APPEND S_EBELN.
ENDIF.

S_AEDAT-SIGN = 'I'.
S_AEDAT-OPTION = 'CP'.
S_AEDAT-LOW = '[AEDAT]'.
WRITE : / S_AEDAT-LOW.
IF S_AEDAT-LOW IS NOT INITIAL.
APPEND S_AEDAT.
ENDIF.
*End of additional code

SELECT
EBELN
BUKRS
BSART
AEDAT
ERNAM
LIFNR
ZTERM
EKORG
EKGRP
INTO TABLE GI_EKKO UP TO P_MAXR ROWS
FROM EKKO
WHERE EBELN IN S_EBELN AND
AEDAT IN S_AEDAT.

END-OF-SELECTION.

DATA : LV_TOTAL TYPE N LENGTH 10,


LV_INDEX TYPE N LENGTH 10.
LV_TOTAL = LINES( GI_EKKO ).

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 146

WRITE : / 'TOTAL DATA : ', LV_TOTAL ,' row(s)'.


SKIP 1.

DATA LV_H0(10) VALUE 'NO'.


DATA LV_H1(10) VALUE 'Purchasing Document Number'.
DATA LV_H2(4) VALUE 'Company Code'.
DATA LV_H3(4) VALUE 'Purchasing Document Type'.
DATA LV_H4(8) VALUE 'Date on Which Record Was Created'.
DATA LV_H5(12) VALUE 'Name of Person who Created the Object'.
DATA LV_H6(10) VALUE 'Vendor Account Number'.
DATA LV_H7(4) VALUE 'Terms of Payment Key'.
DATA LV_H8(4) VALUE 'Purchasing Organization'.
DATA LV_H9(3) VALUE 'Purchasing Group'.

"Header
ULINE AT 0(84).
WRITE : / LV_H0, LV_H1,
LV_H2,
LV_H3,
LV_H4,
LV_H5,
LV_H6,
LV_H7,
LV_H8,
LV_H9.
ULINE AT /0(84).

"Content
LOOP AT GI_EKKO.
ADD 1 TO LV_INDEX.
LV_H0 = LV_INDEX.
WRITE GI_EKKO-EBELN TO LV_H1.
WRITE GI_EKKO-BUKRS TO LV_H2.
WRITE GI_EKKO-BSART TO LV_H3.
WRITE GI_EKKO-AEDAT TO LV_H4.
WRITE GI_EKKO-ERNAM TO LV_H5.
WRITE GI_EKKO-LIFNR TO LV_H6.
WRITE GI_EKKO-ZTERM TO LV_H7.
WRITE GI_EKKO-EKORG TO LV_H8.
WRITE GI_EKKO-EKGRP TO LV_H9.
WRITE : / LV_H0,
LV_H1,
LV_H2,
LV_H3,
LV_H4,
LV_H5,

DL-Application © 2024 DIFO LESTARI


DL-SAP Web Framework 147

LV_H6,
LV_H7,
LV_H8,
LV_H9.
ENDLOOP.
ULINE AT /0(84).

5. Click "Save"
6. Done

DL-Application © 2024 DIFO LESTARI


Troubleshooting
Troubleshooting 149

6 Troubleshooting

6.1 E_FAIL Status

Error Message
"Data provider or other service returned an E_FAIL Status"

Solution
1. Open table structure
2. Check if any field of "date" and "time" type that have a "Null".

3. Change the Null value with "Yes"

6.2 Localhost refused to connect

Error Message

DL-Application © 2024 DIFO LESTARI


Troubleshooting 150

Solution
1. Open "XAMPP Control Panel"
2. Click "Start" for "Aphace"
3. Open browser and enter "http://localhost/gateway"

4. Done

DL-Application © 2024 DIFO LESTARI


Troubleshooting 151

6.3 ABAP Selection Screen Blank

Error

Solution
1. Open ABAP Program
2. Check if any code like this below

3. Change line 5-6

4. Click " "

DL-Application © 2024 DIFO LESTARI


Troubleshooting 152

5. Click "Test Run"

6. Done
6.4 Can't Run DL-Apps

Error

Solution
1. Click "More Info"

DL-Application © 2024 DIFO LESTARI


Troubleshooting 153

2. Click "Run anyway"


3. Done

6.5 Error Database "Can't connect to"

Error

Solution
1. Check your connection to database server
2. Make sure your database server is running
3. Close the DL-Apps

DL-Application © 2024 DIFO LESTARI


Troubleshooting 154

4. Run again

6.6 DL-Sync Logon Failed

Error

"Loading" is very long n never finish.


Even though it was finished, it failed to log in

Solution
1. Open "Gateway" tab

2. Copy gatewate URL and test it in browser


if failed then do this step (here 149 )
if okay then next step

DL-Application © 2024 DIFO LESTARI


Troubleshooting 155

3. Check DL-SAPCon is running or not

4. If DL-SAPCon not running then run "DL-SAPCon" from desktop


5. Test login again from DL-Sync

DL-Application © 2024 DIFO LESTARI

You might also like