rnsap 0.4.0 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f44b42cb85ce971b63caafa40e57062a287861ac3dc221f5627d931c9d2792d6
4
- data.tar.gz: 5403af8af25304f9de38fecb09f380e7ccd9a9c9bb684ae63f5f080e51d44aab
3
+ metadata.gz: 5dd7ba84b18711bdaf64bc605af4003b21f41296896cba5ae13681b41244750f
4
+ data.tar.gz: 51728b725b3aaa900a517425aa0897b25f449fd44f962fa7ce3ab346917d4a53
5
5
  SHA512:
6
- metadata.gz: db5a0dd7f38e5b31dc1136dfda6d6bfba3db5ba8d437fc13711f64a6c6f060aa92148a1e9d996e7612db6dc479c566d9945aab06b782012683b3aa55ca7281ec
7
- data.tar.gz: ebcdcf12bae1cad45e498748b444da864b8e3f3de67031ab8431c16caf43454f985f004b11be060ef8f32f3a863119417d950cf44cb9b8d2a23d7c7be9338a57
6
+ metadata.gz: a1de3138f78004c63c9174e5c97441babc5e83efb7e930ec8bdb4986a5768f6f3aca8fefdc762c1548350bb8116cbf532c76370b969ccfad7c963513ecf3b968
7
+ data.tar.gz: d6fcd634233711dccb18da6ba342c9bf9ddccef11ca50917c31bb39d53767fcfc2b7e41996d7fa41445e07740b371b84a6083cae24cfec5e4d956e37c98f1b92
@@ -0,0 +1,21 @@
1
+ def get_object_list(table, klass_name)
2
+ list = []
3
+ avoid_list = ['!','__','+', '=','!', '?','~','>', '<']
4
+ table.each do |row|
5
+ obj = eval("#{klass_name}.new")
6
+ obj.class.instance_methods.each do |method_name|
7
+ begin
8
+ if obj.respond_to?("#{method_name}=")
9
+ unless avoid_list.any? { |word| method_name.to_s.include?(word)}
10
+ value = row[method_name]
11
+ eval("obj.#{method_name} = '#{value}'")
12
+ end
13
+ end
14
+ rescue
15
+ end
16
+ end
17
+ list.push(obj)
18
+ end
19
+
20
+ list
21
+ end
@@ -0,0 +1,39 @@
1
+ module UtilHelper
2
+ require 'JSON'
3
+
4
+ def log(msg='no message')
5
+ puts obj_to_s(msg)
6
+ end
7
+
8
+ def obj_to_s(msg)
9
+ case msg.class
10
+ when Hash
11
+ JSON.pretty_generate(msg)
12
+ else
13
+ begin
14
+ JSON.pretty_generate(JSON.parse(msg.to_json))
15
+ rescue
16
+ msg
17
+ end
18
+ end
19
+ end
20
+
21
+ # def api_return(*options)
22
+ # puts 'options'
23
+ # log api_return2(options[1], options[0]) if options[0].class.to_s == 'Integer'
24
+ # log(options)
25
+ # end
26
+
27
+
28
+ def api_return(rc=0, message ='', obj=nil, exception=nil )
29
+ ret = {
30
+ rc: exception ? (rc > 0 ? rc : 8) : rc,
31
+ message: message
32
+ }
33
+ ret[:exception] = exception.to_s if exception
34
+ ret[:return] = obj if obj
35
+ ret
36
+ end
37
+
38
+
39
+ end
@@ -0,0 +1,109 @@
1
+ # class used to represent REQUISITION_ACCOUNT_ASSIGNMENT. Used internally
2
+ class PreqAcctAssignment
3
+ # @return [String] Activity Number
4
+ attr_accessor :activity
5
+ # @return [String] Main Asset Number
6
+ attr_accessor :asset_no
7
+ # @return [String] FM: Budget Period
8
+ attr_accessor :budget_period
9
+ # @return [String] Business Area
10
+ attr_accessor :bus_area
11
+ # @return [String] Change Type (U, I, E, D)
12
+ attr_accessor :change_id
13
+ # @return [String] Commitment Item
14
+ attr_accessor :cmmt_item
15
+ # @return [String] Commitment item
16
+ attr_accessor :cmmt_item_long
17
+ # @return [String] Cost Center
18
+ attr_accessor :cost_ctr
19
+ # @return [String] Cost Object
20
+ attr_accessor :cost_obj
21
+ # @return [String] Internal counter
22
+ attr_accessor :counter
23
+ # @return [String] Controlling Area
24
+ attr_accessor :co_area
25
+ # @return [String] Name of Person Who Created the Object
26
+ attr_accessor :created_by
27
+ # @return [Date] Date on Which Record Was Created
28
+ attr_accessor :created_on
29
+ # @return [Integer] Currency Key
30
+ attr_accessor :currency
31
+ # @return [String] Deletion indicator: purchase requisition account assignment
32
+ attr_accessor :delete_ind
33
+ # @return [Integer] Distribution percentage in the case of multiple acct assgt
34
+ attr_accessor :distr_perc
35
+ # @return [String] United States Federal Government Fields
36
+ attr_accessor :fmfgus_key
37
+ # @return [String] Functional Area
38
+ attr_accessor :func_area
39
+ # @return [String] Functional Area
40
+ attr_accessor :func_area_long
41
+ # @return [String] Fund
42
+ attr_accessor :fund
43
+ # @return [String] Funds Center
44
+ attr_accessor :funds_ctr
45
+ # @return [String] Obsolete
46
+ attr_accessor :fund_long
47
+ # @return [String] Grant
48
+ attr_accessor :grant_nbr
49
+ # @return [String] Goods recipient
50
+ attr_accessor :gr_rcpt
51
+ # @return [String] G/L Account Number
52
+ attr_accessor :g_l_acct
53
+ # @return [String] Network Number for Account Assignment
54
+ attr_accessor :network
55
+ # @return [String] Order Number
56
+ attr_accessor :order_no
57
+ # @return [String] Partner account number
58
+ attr_accessor :part_acct
59
+ # @return [String] Item number of purchase requisition
60
+ attr_accessor :preq_item
61
+ # @return [String] Purchase Requisition Number
62
+ attr_accessor :preq_no
63
+ # @return [Integer] Purchase requisition quantity
64
+ attr_accessor :preq_qty
65
+ # @return [String] Purchase requisition unit of measure
66
+ attr_accessor :preq_unit
67
+ # @return [String] Profit Center
68
+ attr_accessor :profit_ctr
69
+ # @return [String] Profitability Segment Number (CO-PA)
70
+ attr_accessor :prof_segm
71
+ # @return [String] Project definition
72
+ attr_accessor :proj_ext
73
+ # @return [String] Old: Project number : No longer used --> PS_POSNR
74
+ attr_accessor :proj_no
75
+ # @return [String] Recovery Indicator
76
+ attr_accessor :rec_ind
77
+ # @return [Date] Reference date for settlement
78
+ attr_accessor :ref_date
79
+ # @return [String] Document number for earmarked funds
80
+ attr_accessor :res_doc
81
+ # @return [String] Earmarked Funds: Document Item
82
+ attr_accessor :res_item
83
+ # @return [String] Internal Key for Real Estate Object
84
+ attr_accessor :rl_est_key
85
+ # @return [String] Routing number of operations in the order
86
+ attr_accessor :routing_no
87
+ # @return [String] Schedule Line Number
88
+ attr_accessor :sched_line
89
+ # @return [String] Sales Document Item
90
+ attr_accessor :sdoc_item
91
+ # @return [String] Sales and Distribution Document Number
92
+ attr_accessor :sd_doc
93
+ # @return [String] Serial number for PReq account assignment segment
94
+ attr_accessor :serial_no
95
+ # @return [String] Asset Subnumber
96
+ attr_accessor :sub_number
97
+ # @return [String] Posting to cost center?
98
+ attr_accessor :to_costctr
99
+ # @return [String] Post To Order
100
+ attr_accessor :to_order
101
+ # @return [String] Post to project
102
+ attr_accessor :to_project
103
+ # @return [String] Unloading Point
104
+ attr_accessor :unload_pt
105
+ # @return [String] Work Breakdown Structure Element (WBS Element)
106
+ attr_accessor :wbs_elem
107
+ # @return [String] Work breakdown structure element (WBS element)
108
+ attr_accessor :wbs_elem_e
109
+ end
@@ -0,0 +1,27 @@
1
+ # class used to represent REQUISITION_CONTRACT_LIMITS. Used internally
2
+ class PreqContractLimits
3
+ # @return [Integer] Total value of unplanned entered services
4
+ attr_accessor :act_value
5
+ # @return [String] Item number, contract
6
+ attr_accessor :con_item
7
+ # @return [String] Contract number
8
+ attr_accessor :con_number
9
+ # @return [String] Deletion Indicator
10
+ attr_accessor :delete_ind
11
+ # @return [String] Short Text 1
12
+ attr_accessor :ktext1
13
+ # @return [Integer] Overall limit
14
+ attr_accessor :limit
15
+ # @return [String] Internal line number for limits
16
+ attr_accessor :line_no
17
+ # @return [String] No Limit
18
+ attr_accessor :no_limit
19
+ # @return [String] Package number
20
+ attr_accessor :pckg_no
21
+ # @return [String] Price Change in Entry Sheet
22
+ attr_accessor :price_chg
23
+ # @return [String] Short Text 1
24
+ attr_accessor :short_text
25
+ # @return [String] Package number
26
+ attr_accessor :sub_packno
27
+ end
@@ -0,0 +1,259 @@
1
+ # class used to represent REQUISITION_ITEMS. Used internally
2
+ class PreqItem
3
+ # @return [String] Account Assignment Category
4
+ attr_accessor :acctasscat
5
+ # @return [String] Advance procurement: project stock
6
+ attr_accessor :advance
7
+ # @return [Integer] Item number of principal purchase agreement
8
+ attr_accessor :agmt_item
9
+ # @return [String] Number of principal purchase agreement
10
+ attr_accessor :agreement
11
+ # @return [String] Assigned Source of Supply
12
+ attr_accessor :assigned
13
+ # @return [String] Batch Number
14
+ attr_accessor :batch
15
+ # @return [String] BOM explosion number
16
+ attr_accessor :bomexpl_no
17
+ # @return [String] FM: Budget Period
18
+ attr_accessor :budget_period
19
+ # @return [String] Acct.asst.modifiable
20
+ attr_accessor :changeable
21
+ # @return [String] Change Type (U, I, E, D)
22
+ attr_accessor :change_id
23
+ # @return [Date] Date of Last Change
24
+ attr_accessor :ch_on
25
+ # @return [String] Purchase requisition closed
26
+ attr_accessor :closed
27
+ # @return [Date] Committed date
28
+ attr_accessor :cmmttddate
29
+ # @return [Integer] Committed Quantity
30
+ attr_accessor :cmmttd_qty
31
+ # @return [String] Commitment Item
32
+ attr_accessor :cmmt_item
33
+ # @return [String] Commitment item
34
+ attr_accessor :cmmt_item_long
35
+ # @return [String] Item affects commitments
36
+ attr_accessor :commitment
37
+ # @return [String] Origin of Configuration
38
+ attr_accessor :config_org
39
+ # @return [String] Cross-Plant Configurable Material
40
+ attr_accessor :conf_matl
41
+ # @return [String] Long Material Number for CONF_MATL field
42
+ attr_accessor :conf_matl_external
43
+ # @return [String] External GUID for CONF_MATL Field
44
+ attr_accessor :conf_matl_guid
45
+ # @return [String] Cross-Plant Configurable Material (40 ch tech. necessary)
46
+ attr_accessor :conf_matl_long
47
+ # @return [String] Version Number for Field CONF_MATL
48
+ attr_accessor :conf_matl_version
49
+ # @return [String] Consumption posting
50
+ attr_accessor :consumpt
51
+ # @return [String] Name of Person Who Created the Object
52
+ attr_accessor :created_by
53
+ # @return [String] Creation indicator (purchase requisition/schedule lines)
54
+ attr_accessor :create_ind
55
+ # @return [String] Control indicator for purchasing document type
56
+ attr_accessor :ctrl_ind
57
+ # @return [String] Currency Key
58
+ attr_accessor :currency
59
+ # @return [String] ISO Currency Code
60
+ attr_accessor :currency_iso
61
+ # @return [Integer] Price in purchase requisition
62
+ attr_accessor :c_amt_bapi
63
+ # @return [String] Deletion indicator in purchasing document
64
+ attr_accessor :delete_ind
65
+ # @return [Date] Item delivery date
66
+ attr_accessor :deliv_date
67
+ # @return [String] Date type (day, week, month, interval)
68
+ attr_accessor :del_datcat
69
+ # @return [String] Category of delivery date
70
+ attr_accessor :del_datcat_ext
71
+ # @return [String] Required Vendor
72
+ attr_accessor :des_vendor
73
+ # @return [String] Distribution indicator for multiple account assignment
74
+ attr_accessor :distrib
75
+ # @return [String] Purchasing document category
76
+ attr_accessor :doc_cat
77
+ # @return [String] Purchase Requisition Document Type
78
+ attr_accessor :doc_type
79
+ # @return [String] Purchase requisition is fixed
80
+ attr_accessor :fixed
81
+ # @return [String] Fixed vendor
82
+ attr_accessor :fixed_vend
83
+ # @return [String] United States Federal Government Fields
84
+ attr_accessor :fmfgus_key
85
+ # @return [String] Funds Center
86
+ attr_accessor :found_ctr
87
+ # @return [String] Functional Area
88
+ attr_accessor :func_area
89
+ # @return [String] Functional Area
90
+ attr_accessor :func_area_long
91
+ # @return [String] Fund
92
+ attr_accessor :fund
93
+ # @return [String] Obsolete
94
+ attr_accessor :fund_long
95
+ # @return [String] Overall release of purchase requisitions
96
+ attr_accessor :general_release
97
+ # @return [String] Grant
98
+ attr_accessor :grant_nbr
99
+ # @return [String] Goods Receipt Indicator
100
+ attr_accessor :gr_ind
101
+ # @return [String] Goods Receipt, Non-Valuated
102
+ attr_accessor :gr_non_val
103
+ # @return [Integer] Goods receipt processing time in days
104
+ attr_accessor :gr_pr_time
105
+ # @return [Integer] Quantity of goods received
106
+ attr_accessor :gr_qty
107
+ # @return [String] Number of purchasing info record
108
+ attr_accessor :info_rec
109
+ # @return [Integer] Configuration (internal object number)
110
+ attr_accessor :int_obj_no
111
+ # @return [String] Invoice receipt indicator
112
+ attr_accessor :ir_ind
113
+ # @return [String] Item category in purchasing document
114
+ attr_accessor :item_cat
115
+ # @return [String] Item Category in Purchasing Document
116
+ attr_accessor :item_cat_ext
117
+ # @return [String] Kanban indicator
118
+ attr_accessor :kanban_ind
119
+ # @return [Date] Date of last resubmission
120
+ attr_accessor :last_resub
121
+ # @return [String] Mfr part profile
122
+ attr_accessor :manuf_prof
123
+ # @return [String] Manufacturer Part Number
124
+ attr_accessor :manu_mat
125
+ # @return [String] Material Number
126
+ attr_accessor :material
127
+ # @return [String] Long Material Number for MATERIAL Field
128
+ attr_accessor :material_external
129
+ # @return [String] External GUID for MATERIAL Field
130
+ attr_accessor :material_guid
131
+ # @return [String] Material Number (40 Characters, needed f. technical reasons)
132
+ attr_accessor :material_long
133
+ # @return [String] Version Number for MATERIAL Field
134
+ attr_accessor :material_version
135
+ # @return [String] Material Group
136
+ attr_accessor :mat_grp
137
+ # @return [String] Manufacturer number
138
+ attr_accessor :mfr_no
139
+ # @return [String] External manufacturer code name or number
140
+ attr_accessor :mfr_no_ext
141
+ # @return [String] MRP Controller
142
+ attr_accessor :mrp_contr
143
+ # @return [Integer] Number of resubmissions
144
+ attr_accessor :no_resub
145
+ # @return [Integer] Quantity ordered against this purchase requisition
146
+ attr_accessor :ordered
147
+ # @return [String] Partial invoice indicator
148
+ attr_accessor :part_inv
149
+ # @return [Integer] Package number
150
+ attr_accessor :pckg_no
151
+ # @return [String] Plant
152
+ attr_accessor :plant
153
+ # @return [Date] Purchase Order Date
154
+ attr_accessor :po_date
155
+ # @return [Integer] Purchase order item number
156
+ attr_accessor :po_item
157
+ # @return [String] Purchase order number
158
+ attr_accessor :po_number
159
+ # @return [String] Use Requisition Price in Purchase Order
160
+ attr_accessor :po_price
161
+ # @return [String] Purchase Order Unit of Measure
162
+ attr_accessor :po_unit
163
+ # @return [String] Order unit in ISO code
164
+ attr_accessor :po_unit_iso
165
+ # @return [Date] Requisition (Request) Date
166
+ attr_accessor :preq_date
167
+ # @return [Integer] Item number of purchase requisition
168
+ attr_accessor :preq_item
169
+ # @return [String] Name of requisitioner/requester
170
+ attr_accessor :preq_name
171
+ # @return [String] Purchase Requisition Number
172
+ attr_accessor :preq_no
173
+ # @return [String] Purchase requisition unit of measure
174
+ attr_accessor :preq_unit
175
+ # @return [String] ISO code for unit of measure in purchase requisition
176
+ attr_accessor :preq_unit_iso
177
+ # @return [Integer] Price unit
178
+ attr_accessor :price_unit
179
+ # @return [String] Procuring Plant
180
+ attr_accessor :procuring_plant
181
+ # @return [String] Processing status of purchase requisition
182
+ attr_accessor :proc_stat
183
+ # @return [String] Promotion
184
+ attr_accessor :promotion
185
+ # @return [String] Purchasing Organization
186
+ attr_accessor :purch_org
187
+ # @return [String] Purchasing Group
188
+ attr_accessor :pur_group
189
+ # @return [String] Material number
190
+ attr_accessor :pur_mat
191
+ # @return [String] Long Material Number for PUR_MAT Field
192
+ attr_accessor :pur_mat_external
193
+ # @return [String] External GUID for PUR_MAT Field
194
+ attr_accessor :pur_mat_guid
195
+ # @return [String] Material Number (40 Characters, Technical Requirement)
196
+ attr_accessor :pur_mat_long
197
+ # @return [String] Version Number for PUR_MAT Field
198
+ attr_accessor :pur_mat_version
199
+ # @return [Integer] Purchase requisition quantity
200
+ attr_accessor :quantity
201
+ # @return [Integer] Quota arrangement item
202
+ attr_accessor :quotarritm
203
+ # @return [String] Number of quota arrangement
204
+ attr_accessor :quota_arr
205
+ # @return [String] Reason for Item Block
206
+ attr_accessor :reason_blocking
207
+ # @return [Date] Purchase Requisition Release Date
208
+ attr_accessor :rel_date
209
+ # @return [String] Release group
210
+ attr_accessor :rel_group
211
+ # @return [String] Release Indicator
212
+ attr_accessor :rel_ind
213
+ # @return [String] Release State
214
+ attr_accessor :rel_status
215
+ # @return [String] Release strategy in the purchase requisition
216
+ attr_accessor :rel_strat
217
+ # @return [String] Purchase Requisition Blocked
218
+ attr_accessor :req_blocked
219
+ # @return [Integer] Number of reservation/dependent requirements
220
+ attr_accessor :reserv_no
221
+ # @return [Integer] Resubmission interval of purchase requisition
222
+ attr_accessor :resubmis
223
+ # @return [String] Document number for earmarked funds
224
+ attr_accessor :res_doc
225
+ # @return [Integer] Earmarked Funds: Document Item
226
+ attr_accessor :res_item
227
+ # @return [String] Reservation or purchase requisition
228
+ attr_accessor :res_req_id
229
+ # @return [String] Revision level
230
+ attr_accessor :rev_lev
231
+ # @return [Integer] Settlement reservation number
232
+ attr_accessor :setreserno
233
+ # @return [Integer] Item number of the settlement reservation
234
+ attr_accessor :settlitmno
235
+ # @return [Integer] Shortage (stock undercoverage) quantity
236
+ attr_accessor :shortage
237
+ # @return [String] Short Text
238
+ attr_accessor :short_text
239
+ # @return [String] Special Stock Indicator
240
+ attr_accessor :spec_stock
241
+ # @return [String] Special stock indicator for physical stock transfer
242
+ attr_accessor :spstck_phy
243
+ # @return [String] Storage Location
244
+ attr_accessor :store_loc
245
+ # @return [String] Release Not Yet Completely Effected
246
+ attr_accessor :subj_to_r
247
+ # @return [String] Supplying (issuing) plant in case of stock transport order
248
+ attr_accessor :suppl_plnt
249
+ # @return [String] Requirement Tracking Number
250
+ attr_accessor :trackingno
251
+ # @return [String] Purchase requisition unit of measure
252
+ attr_accessor :unit
253
+ # @return [String] Valuation Type
254
+ attr_accessor :val_type
255
+ # @return [String] Material number used by vendor
256
+ attr_accessor :vend_mat
257
+ # @return [String] Production Version
258
+ attr_accessor :version
259
+ end