-
Notifications
You must be signed in to change notification settings - Fork 0
/
CLASS ZST9_SIMPLE_PROCEDURES IMPLEMENTATION.
51 lines (31 loc) · 1.37 KB
/
CLASS ZST9_SIMPLE_PROCEDURES IMPLEMENTATION.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
CLASS ZST9_SIMPLE_PROCEDURES DEFINITION PUBLIC.
PUBLIC SECTION.
INTERFACES IF_AMDP_MARKER_HDB.
TYPES: BEGIN OF TYP_SALES,
VBELN TYPE VBELN,
AUART TYPE AUART,
END OF TYP_SALES,
BEGIN OF TYP_MAT,
MATNR TYPE MATNR,
MTART TYPE MTART,
END OF TYP_MAT,
TT_SALES_DETAILS TYPE TABLE OF TYP_SALES,
TT_MAT_DETAILS TYPE TABLE OF TYP_MAT.
CLASS-METHODS GET_SALES_DETAILS IMPORTING VALUE(IM_SALES_TYPES) TYPE ZST9_TT_SALES_TYPE
EXPORTING VALUE(EX_SALES_DETAILS) TYPE TT_SALES_DETAILS.
METHODS GET_MATERIAL EXPORTING VALUE(EX_MAT_DETAILS) TYPE TT_MAT_DETAILS.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZST9_SIMPLE_PROCEDURES IMPLEMENTATION.
METHOD GET_SALES_DETAILS BY DATABASE PROCEDURE FOR HDB LANGUAGE
SQLSCRIPT OPTIONS READ-ONLY USING VBAK TVAK.
it_sales_types = select auart from tvak where auart like 'Z%';
ex_sales_details = select vbeln, auart from vbak
where auart in (select * from :it_sales_types);
ENDMETHOD.
METHOD GET_MATERIAL BY DATABASE PROCEDURE FOR HDB LANGUAGE
SQLSCRIPT OPTIONS READ-ONLY USING MARA.
ex_mat_details = select matnr, mtart from mara;
ENDMETHOD.
ENDCLASS.