-
Notifications
You must be signed in to change notification settings - Fork 0
/
DYNAMIC_IMAGE.txt
143 lines (118 loc) · 4.29 KB
/
DYNAMIC_IMAGE.txt
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
*&---------------------------------------------------------------------*
*& Report ZZZ_DYNAMIC_IMAGE
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
report zzz_dynamic_image.
data: lt_website type zzz_tt_website, "Tablo
ls_website type zzz_s_website, "Structure
lv_qrurl type string. "url string türünde
ls_website-siteurl = 'https://github.com/Gizemkaragozlu'. "Site url
append ls_website to lt_website. "Site url structure ve table türünde alıp apend ediyoruz.
ls_website-siteurl = 'https://www.youtube.com/watch?v=uuQfoeFN8cs'.
append ls_website to lt_website.
ls_website-siteurl = 'https://pub.dev/'.
append ls_website to lt_website.
loop at lt_website into ls_website.
concatenate 'http://encode.i-nigma.com/QRCode/img.php?d='
ls_website-siteurl
'&c=&s=10'
into lv_qrurl.
perform get_html using lv_qrurl changing ls_website-logo.
modify lt_website from ls_website.
endloop.
data fp_outputparams type sfpoutputparams.
data lv_interface_type type fpinterfacetype.
data lv_funcname type funcname.
data ls_formoutput type fpformoutput.
data ls_docparams type sfpdocparams.
fp_outputparams-pdftagged = 'X'.
fp_outputparams-nodialog = 'X'.
fp_outputparams-dest = 'ZPDF'.
fp_outputparams-preview = 'X'.
fp_outputparams-getpdf = ' '.
ls_docparams-langu = 'T'.
ls_docparams-country = 'TR'.
call function 'FP_JOB_OPEN' " adobe çağırmak için kullanılır
changing
ie_outputparams = fp_outputparams
exceptions
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
others = 5.
call function 'FP_FUNCTION_MODULE_NAME' "adobe funnction çağırır ve ismini tanımlamamızı sağlar.
exporting
i_name = 'ZZZ_F_WEBSITE'
importing
e_funcname = lv_funcname
e_interface_type = lv_interface_type.
call function lv_funcname " /1BCDWB/SM00000209 adobe function name
exporting
/1BCDWB/DOCPARAMS = ls_docparams
t_website = lt_website
IMPORTING
/1BCDWB/FORMOUTPUT = ls_formoutput
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 4
.
call function 'FP_JOB_CLOSE'
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
*&---------------------------------------------------------------------*
*& Form get_html
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_URL text
* -->P_DATA text
*----------------------------------------------------------------------*
form get_html using p_url
changing p_data.
data lv_client type ref to if_http_client.
* Create client
call method cl_http_client=>create_by_url
exporting
url = p_url
importing
client = lv_client
exceptions
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
others = 4.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
lv_client->request->set_header_field( name = '~request_method'
value = 'GET' ).
* Get request:
call method lv_client->send
exceptions
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
others = 4.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
* Prepare client-receive:
call method lv_client->receive
exceptions
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
others = 4.
* Get HTML:
clear p_data.
p_data = lv_client->response->get_data( ).
endform.