๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿง‘‍๐Ÿ’ผ SAP/ABAP

[SAP ABAP] INCLUDE ํŒŒ์ผ๋ช… ๊ทœ์น™ ๋ฐ ์˜๋ฏธ: CLS, F01, I01, O01, T01

by Jay Din 2024. 7. 9.
728x90
๋ฐ˜์‘ํ˜•

INCLUDE ๋ž€?

INCLUDE ํŒŒ์ผ๋ช… ์˜ˆ

 

ABAP์—์„œ INCLUDE ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ”„๋กœ๊ทธ๋žจ์„ ๋ชจ๋“ˆํ™”ํ•˜๊ณ  ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ฝ”๋“œ ๋ธ”๋ก์„ ์ •์˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

์š”์•ฝ ์ •๋ฆฌ

INCLUDE ์ด๋ฆ„ ๋’ค์— ๋ถ™๋Š” ์ ‘๋ฏธ์‚ฌ๋Š” ํ•ด๋‹น INCLUDE ๋ชฉ์ ๊ณผ ์—ญํ• ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.

CLS ํด๋ž˜์Šค๋ฅผ ํฌํ•จํ•˜์—ฌ INCLUDE
F01 ํผ ๋ฃจํ‹ด(์„œ๋ธŒ๋ฃจํ‹ด)์„ ํฌํ•จํ•˜์—ฌ INCLUDE
I01 ์ดˆ๊ธฐํ™” ๋˜๋Š” ์ž…๋ ฅ์ฝ”๋“œ๋ฅผ ํฌํ•จํ•˜๋Š” INCLDUE
O01 ์ถœ๋ ฅ ๊ด€๋ จ ์ฝ”๋“œ๋ฅผ ํฌํ•จํ•˜๋Š” INCLUDE
T01 ํŽ˜์ด์ง€ ์ƒ๋‹จ ์ถœ๋ ฅ ์ฝ”๋“œ ๋˜๋Š” ํ…Œ์ด๋ธ” ๋ฐ ๋ฐ์ดํ„ฐ ์„ ์–ธ ์ฝ”๋“œ๋ฅผ ํฌํ•จํ•˜๋Š” INCLDUE

 

CLS (Class)

ํด๋ž˜์Šค ์ •์˜์™€ ๊ตฌํ˜„์„ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.

INCLUDE ZMYCLASS_CLS.
CLASS zmyclass DEFINITION.
  PUBLIC SECTION.
    METHODS: method1,
             method2.
ENDCLASS.

CLASS zmyclass IMPLEMENTATION.
  METHOD method1.
    " Method implementation
  ENDMETHOD.

  METHOD method2.
    " Method implementation
  ENDMETHOD.
ENDCLASS.

 

F01 (Form Routines)

ํผ ๋ฃจํ‹ด (์„œ๋ธŒ๋ฃจํ‹ด)์„ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.

INCLUDE ZMYINCLUDE_F01.
FORM routine1.
  " Routine1 implementation
ENDFORM.

FORM routine2.
  " Routine2 implementation
ENDFORM.

 

I01 (Initialization or Input)

์ดˆ๊ธฐํ™” ๋˜๋Š” ์ž…๋ ฅ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ ์ฝ”๋“œ๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.

INCLUDE ZMYINCLUDE_I01.
INITIALIZATION.
  " Initialization code

 

O01 (Output)

์ถœ๋ ฅ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ ์ฝ”๋“œ๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.

INCLUDE ZMYINCLUDE_O01.
MODULE STATUS_0100 OUTPUT.
  " Status handling for screen 0100
ENDMODULE.

MODULE STATUS_0200 OUTPUT.
  " Status handling for screen 0200
ENDMODULE.

 

T01 (Top of Page or Table Declarations)

ํŽ˜์ด์ง€ ์ƒ๋‹จ ์ถœ๋ ฅ ์ฝ”๋“œ ๋˜๋Š” ํ…Œ์ด๋ธ” ๋ฐ ๋ฐ์ดํ„ฐ ์„ ์–ธ์„ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.

INCLUDE ZMYINCLUDE_T01.
DATA: lt_flights TYPE TABLE OF sflight,
      wa_flight TYPE sflight.

TOP-OF-PAGE.
  WRITE: / 'Flight Information'.

 

INCLUDE ํŒŒ์ผ ์„ ์–ธ ์˜ˆ์‹œ

REPORT z_example_report NO STANDARD PAGE HEADING MESSAGE-ID ZSDM.

INCLUDE z_example_report_top_of_page. " T01: ํ…Œ์ด๋ธ”๊ณผ ๋ฐ์ดํ„ฐ ์„ ์–ธ
INCLUDE z_example_report_forms.      " F01: ํผ ๋ฃจํ‹ด
INCLUDE z_example_report_initialization. " I01: ์ดˆ๊ธฐํ™” ๋ฐ ์ž…๋ ฅ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ
INCLUDE z_example_report_output.     " O01: ์ถœ๋ ฅ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ

 

 

728x90
๋ฐ˜์‘ํ˜•