Академический Документы
Профессиональный Документы
Культура Документы
Overview
Request
Application Server
Store request to
queue 3
Tables customers.
List
Generate
1
10
Screen(List)
Send Request
Send List
Write: / customersname.
Dispatcher
2
Request
Queue Send request to
WP4
customers where id =
1.
Search for
free WP
Check Program in
Program
Buffer
5
SAP Buffer
Program
Database Server
SQL
Request
Load&Gen
Program
Execute
ABAP
statement
Local Memory
Memory Space
ABAP Processor
DYNPRO Processor
DB Interface
Database
List Buffer
1. Report Listing
2. Drill-down Report
3. Control-break Report
4. ALV Report
Request
Application Server
Store request to
queue 3
Include .
Screen
Generate Dialog
1
10
Screen
Send Request
Send List
Dispatcher
2
Request
Queue Send request to
WP4
Search for
free WP
Check Program in
Program
Buffer
5
SAP Buffer
Program
Database Server
SQL
Request
Load&Gen
Program
Execute
ABAP
statement
Local Memory
ABAP Memory
ABAP Processor
DYNPRO Processor
DB Interface
Database
Screen Buffer
Dialog Program :
Transaction
Dialog Program
Dialog Program
Screen : 100
(Screen Layout)
PAI
Flow Logic
Screen : 200
(Screen Layout)
PBO
PBO
PAI
Flow Logic
SAP Transaction
DB Commit
DB Commit
ok_code
Screen Buffer
Element List
PBO
0000000
customers-id
customersname
PAI
ok_code
name
city
Flow Logic
Screen Attribute
Screen Layout
Flow Logic
Element List
Element
List(ok_code field)
Leave program
screen 0
WHEN SAVE.
UPDATE customers.
MESSAGE S000(38) WITH Update OK.
SET SCREEN 50. LEAVE SCREEN.
ENDCASE.
ENDMODULE.
Example I
Maintain Customers Data
Screen : 100
Screen : 200
Example I
Example I
Screen 100
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
Example I
Screen 100
MODULE status_0100 OUTPUT.
SET PF-STATUS 0100.
SET TITLEBAR 0100.
ENDMODULE.
Example I
Screen 100
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN BACK.
LEAVE PROGRAM. leave to screen 0
WHEN space. if not assign Enter Key
SELECT SINGLE * FROM customers
WHERE id = customers-id.
LEAVE TO SCREEN 200.
ENDCASE.
ENDMODULE.
Example I
Screen 200
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0200.
Example I
Screen 200
MODULE status_0200 OUTPUT.
SET PF-STATUS 0200.
SET TITLEBAR 0200.
ENDMODULE.
Example I
Screen 200
Example I
TOP Include
TABLES customers.
DATA ok_code TYPE sy-ucomm.
Exercise
Create Dialog Program :
SAPMZCUST<nn>
Transaction Code : ZCUST<nn>
Exercise : Customers
Maintenance
Screen : 100
Screen : 200
1. Auxiliary OK_CODE
Variable
TOP Include
TABLES customers.
DATA ok_code TYPE sy-ucomm.
DATA save_ok TYPE sy-ucomm.
Example I - Change
Example I - Change
Example II
Maintain Customers Data
Check Input Data Manually
Example II
Example III
Maintain Customers Data
Check Input Data Using Field
Command
Example III
f2
f4
Call module d
Required Field
Required Field
Required Field
At exit-command
At exit-command
At exit-command
At exit-command
LEAVE PROGRAM.
Function Module
(POPUP_TO_CONFIRM_LOSS_OF_DAT
A)
Example IV
Maintain Customer Data
Popup confirmation data using
function
POPUP_TO_CONFIRM_LOSS_OF_DATA
Example IV
TOP Include
...
DATA ans.
Example IV
ENDMODULE.
SAP Transaction(LUW)
DB Commit
DB LUW
SAP LUW
DB Commit
ENQUEUE_<lock object>
object
DEQUEUE_<lock object>
object
Example IV
User 1
User 2
Example IV (I)
id = customers-id
EXCEPTIONS
...
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
SELECT SINGLE * FROM customers WHERE id = customersid.
Example IV (II)
Example IV
id = customers-id.
LEAVE TO SCREEN 100.
Example IV
id = customers-id.
LEAVE TO SCREEN 100.
...
...