rnsap 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f44b42cb85ce971b63caafa40e57062a287861ac3dc221f5627d931c9d2792d6
4
- data.tar.gz: 5403af8af25304f9de38fecb09f380e7ccd9a9c9bb684ae63f5f080e51d44aab
3
+ metadata.gz: 8b17ed3455ce9776e8b3fd560a13d9e2f2a3b3a7d26f93dbf1fe7fb50cb53325
4
+ data.tar.gz: 83a42cfd98a000669e03973067780cd969673fd2fbf31422636638a155e0891e
5
5
  SHA512:
6
- metadata.gz: db5a0dd7f38e5b31dc1136dfda6d6bfba3db5ba8d437fc13711f64a6c6f060aa92148a1e9d996e7612db6dc479c566d9945aab06b782012683b3aa55ca7281ec
7
- data.tar.gz: ebcdcf12bae1cad45e498748b444da864b8e3f3de67031ab8431c16caf43454f985f004b11be060ef8f32f3a863119417d950cf44cb9b8d2a23d7c7be9338a57
6
+ metadata.gz: 673e51916fc84c670b81fe3f751368033899da9a36e388cc03be00b512f84d0e753b46412d86dbf85a857221a946fc9284397b4acf535c638099b089234e4062
7
+ data.tar.gz: 68947fd813d750ef0e2a0566215eaae545676e996de00353e34712b5af52e6c027b9e091b52fd497f9ef2b21ca1493c658ace0bbf728994c25336da8cd9fbc32
@@ -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,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
@@ -0,0 +1,59 @@
1
+ # class used to represent REQUISITION_LIMITS. Used internally
2
+ class PreqLimits
3
+ # @return [Integer] Total value of unplanned entered services
4
+ attr_accessor :act_value
5
+ # @return [Integer] Percentage for price determination
6
+ attr_accessor :cont_perc
7
+ # @return [String] Limit on contract items exists
8
+ attr_accessor :con_exist
9
+ # @return [Integer] Currency Key
10
+ attr_accessor :currency
11
+ # @return [String] ISO Currency Code
12
+ attr_accessor :curr_isocd
13
+ # @return [String] Edition of Service Type
14
+ attr_accessor :edition
15
+ # @return [Integer] Expected value
16
+ attr_accessor :exp_value
17
+ # @return [Integer] Actual value (from other sources)
18
+ attr_accessor :freact_val
19
+ # @return [Integer] Free limit
20
+ attr_accessor :free_limit
21
+ # @return [Integer] Overall limit
22
+ attr_accessor :limit
23
+ # @return [String] No Limit
24
+ attr_accessor :no_frlimit
25
+ # @return [String] No Limit
26
+ attr_accessor :no_limit
27
+ # @return [String] Package number
28
+ attr_accessor :pckg_no
29
+ # @return [String] Price Change in Entry Sheet
30
+ attr_accessor :price_chg
31
+ # @return [String] Short Description of Service Type
32
+ attr_accessor :serv_type
33
+ # @return [Integer] Actual value on service type limit
34
+ attr_accessor :ssc_actval
35
+ # @return [String] Limits exist for service types
36
+ attr_accessor :ssc_exist
37
+ # @return [Integer] Value limits on service types
38
+ attr_accessor :ssc_limit
39
+ # @return [String] No limit on standard service type
40
+ attr_accessor :ssc_nolim
41
+ # @return [Integer] Percentage for price determination
42
+ attr_accessor :ssc_perc
43
+ # @return [String] Price Change in Entry Sheet
44
+ attr_accessor :ssc_prschg
45
+ # @return [Integer] Actual value on model specifications limits
46
+ attr_accessor :tmp_actval
47
+ # @return [String] Limit on service packages exists
48
+ attr_accessor :tmp_exist
49
+ # @return [Integer] Limits on model service specifications
50
+ attr_accessor :tmp_limit
51
+ # @return [String] No Limit on Model Specifications
52
+ attr_accessor :tmp_nolim
53
+ # @return [String] Number of a Set of Model Service Specifications
54
+ attr_accessor :tmp_number
55
+ # @return [Integer] Percentage for Price Determination
56
+ attr_accessor :tmp_perc
57
+ # @return [String] Price Change in Entry Sheet
58
+ attr_accessor :tmp_prschg
59
+ end
@@ -0,0 +1,21 @@
1
+ # class used to represent RETURN. Used internally
2
+ class PreqReturn
3
+ # @return [String] Message code
4
+ attr_accessor :code
5
+ # @return [String] Application log: Internal message serial number
6
+ attr_accessor :log_msg_no
7
+ # @return [String] Application log: log number
8
+ attr_accessor :log_no
9
+ # @return [String] Message Text
10
+ attr_accessor :message
11
+ # @return [String] Message Variable
12
+ attr_accessor :message_v1
13
+ # @return [String] Message Variable
14
+ attr_accessor :message_v2
15
+ # @return [String] Message Variable
16
+ attr_accessor :message_v3
17
+ # @return [String] Message Variable
18
+ attr_accessor :message_v4
19
+ # @return [String] Message type: S Success, E Error, W Warning, I Info, A Abort
20
+ attr_accessor :type
21
+ end
@@ -0,0 +1,153 @@
1
+ # class used to represent REQUISITION_SERVICES. Used internally
2
+ class PreqServices
3
+ # @return [Integer] Purchase Order: Entered Quantity
4
+ attr_accessor :actual_qty
5
+ # @return [Integer] Purchase order: Entered value
6
+ attr_accessor :actual_val
7
+ # @return [String] Alternative Line
8
+ attr_accessor :alternat
9
+ # @return [String] Base Unit of Measure
10
+ attr_accessor :base_uom
11
+ # @return [String] Basic Line
12
+ attr_accessor :basic_line
13
+ # @return [String] Alternatives: Reference to basic item
14
+ attr_accessor :basline_no
15
+ # @return [String] Start Time
16
+ attr_accessor :begintime
17
+ # @return [String] Bidder's Line
18
+ attr_accessor :bidder
19
+ # @return [String] Blanket Line
20
+ attr_accessor :blanket
21
+ # @return [String] Entry: Unplanned from contract
22
+ attr_accessor :con_line
23
+ # @return [String] Entry: Unplanned from contract
24
+ attr_accessor :con_pckg
25
+ # @return [Integer] Contract: Quantity Released (by Issue of Release Orders)
26
+ attr_accessor :con_qty
27
+ # @return [Integer] Contract: Value released (via release orders)
28
+ attr_accessor :con_value
29
+ # @return [Date] Date
30
+ attr_accessor :date
31
+ # @return [String] Deletion Indicator
32
+ attr_accessor :delete_ind
33
+ # @return [String] Distribution indicator for multiple account assignment
34
+ attr_accessor :distrib
35
+ # @return [String] Edition of Service Type
36
+ attr_accessor :edition
37
+ # @return [String] End Time
38
+ attr_accessor :endtime
39
+ # @return [String] Contingency Line
40
+ attr_accessor :eventual
41
+ # @return [String] External Personnel Number
42
+ attr_accessor :extpers_no
43
+ # @return [String] External Reference Key for Service
44
+ attr_accessor :extrefkey
45
+ # @return [String] Line Number
46
+ attr_accessor :ext_line
47
+ # @return [String] Vendor's Service Number
48
+ attr_accessor :ext_serv
49
+ # @return [String] Formula Number
50
+ attr_accessor :formula
51
+ # @return [Integer] Formula Value
52
+ attr_accessor :form_val1
53
+ # @return [Integer] Formula value
54
+ attr_accessor :form_val2
55
+ # @return [Integer] Formula value
56
+ attr_accessor :form_val3
57
+ # @return [Integer] Formula value
58
+ attr_accessor :form_val4
59
+ # @return [Integer] Formula value
60
+ attr_accessor :form_val5
61
+ # @return [String] Lower Limit
62
+ attr_accessor :from_line
63
+ # @return [Integer] Gross value
64
+ attr_accessor :gross_val
65
+ # @return [Integer] Gross price
66
+ attr_accessor :gr_price
67
+ # @return [String] Hierarchically superior line number
68
+ attr_accessor :hi_line_no
69
+ # @return [String] Informatory Line
70
+ attr_accessor :inform
71
+ # @return [String] Entry: Unplanned, limit line
72
+ attr_accessor :limit_line
73
+ # @return [String] Internal line number
74
+ attr_accessor :line_no
75
+ # @return [String] Material Group
76
+ attr_accessor :matl_group
77
+ # @return [Integer] Net value
78
+ attr_accessor :net_value
79
+ # @return [Integer] Non-deductible input tax
80
+ attr_accessor :nond_itax
81
+ # @return [String] Line with Open Quantity
82
+ attr_accessor :open_qty
83
+ # @return [String] Indicator: Outline line
84
+ attr_accessor :outl_ind
85
+ # @return [I] Hierarchy level of group
86
+ attr_accessor :outl_level
87
+ # @return [String] Outline Level
88
+ attr_accessor :outl_no
89
+ # @return [Integer] Overfulfillment Tolerance
90
+ attr_accessor :ovf_tol
91
+ # @return [String] Unlimited Overfulfillment
92
+ attr_accessor :ovf_unlim
93
+ # @return [String] Package number
94
+ attr_accessor :pckg_no
95
+ # @return [String] Personnel Number
96
+ attr_accessor :pers_no
97
+ # @return [Date] Period of Performance End Date
98
+ attr_accessor :per_edate
99
+ # @return [Date] Period of Performance Start Date
100
+ attr_accessor :per_sdate
101
+ # @return [String] Entry: Planned package line
102
+ attr_accessor :pln_line
103
+ # @return [String] Source package number
104
+ attr_accessor :pln_pckg
105
+ # @return [String] Price Change in Entry Sheet
106
+ attr_accessor :price_chg
107
+ # @return [Integer] Price unit
108
+ attr_accessor :price_unit
109
+ # @return [Integer] Quantity with Sign
110
+ attr_accessor :quantity
111
+ # @return [String] Activity Number
112
+ attr_accessor :service
113
+ # @return [String] Short Description of Service Type
114
+ attr_accessor :serv_type
115
+ # @return [String] Short Text
116
+ attr_accessor :short_text
117
+ # @return [String] Standard Service Catalog Item
118
+ attr_accessor :ssc_item
119
+ # @return [String] Service line refers to standard service catalog limits
120
+ attr_accessor :ssc_lim
121
+ # @return [String] Subpackage number
122
+ attr_accessor :subpckg_no
123
+ # @return [String] Supplementary Line
124
+ attr_accessor :supp_line
125
+ # @return [Integer] Target Value
126
+ attr_accessor :target_val
127
+ # @return [String] Tax Jurisdiction
128
+ attr_accessor :taxjurcode
129
+ # @return [String] Tax on Sales/Purchases Code
130
+ attr_accessor :tax_code
131
+ # @return [String] Entry: Unplanned service from model specifications
132
+ attr_accessor :tmp_line
133
+ # @return [String] Entry: Unplanned service from model specifications
134
+ attr_accessor :tmp_pckg
135
+ # @return [String] Upper Limit
136
+ attr_accessor :to_line
137
+ # @return [Integer] Contract: Unplanned Released Quantity
138
+ attr_accessor :unpl_qty
139
+ # @return [Integer] Contract: Unplanned released value
140
+ attr_accessor :unpl_val
141
+ # @return [String] ISO code for unit of measurement
142
+ attr_accessor :uom_iso
143
+ # @return [String] User-Defined Field
144
+ attr_accessor :userf1_num
145
+ # @return [String] User-Defined Field
146
+ attr_accessor :userf1_txt
147
+ # @return [Integer] User-Defined Field
148
+ attr_accessor :userf2_num
149
+ # @return [String] User-Defined Field
150
+ attr_accessor :userf2_txt
151
+ # @return [String] Wage Type
152
+ attr_accessor :wagetype
153
+ end
@@ -0,0 +1,13 @@
1
+ # class used to represent REQUISITION_SERVICES_TEXTS. Used internally
2
+ class PreqServicesText
3
+ # @return [String] Tag column
4
+ attr_accessor :format_col
5
+ # @return [String] Internal line number
6
+ attr_accessor :line_no
7
+ # @return [String] Package number
8
+ attr_accessor :pckg_no
9
+ # @return [String] Text ID
10
+ attr_accessor :text_id
11
+ # @return [String] Text Line
12
+ attr_accessor :text_line
13
+ end
@@ -0,0 +1,23 @@
1
+ # class used to represent REQUISITION_SRV_ACCASS_VALUES. Used internally
2
+ class PreqServicesAccassValues
3
+ # @return [String] Deletion Indicator
4
+ attr_accessor :delete_ind
5
+ # @return [String] Highest package number
6
+ attr_accessor :hpackno
7
+ # @return [String] Inactive account assignment specification
8
+ attr_accessor :inactive
9
+ # @return [String] Line Number
10
+ attr_accessor :line_no
11
+ # @return [Integer] Net value
12
+ attr_accessor :net_value
13
+ # @return [String] Package number
14
+ attr_accessor :pckg_no
15
+ # @return [Integer] Percentage for Account Assignment Value Distribution
16
+ attr_accessor :percentage
17
+ # @return [Integer] Quantity
18
+ attr_accessor :quantity
19
+ # @return [String] Sequential Number of Account Assignment
20
+ attr_accessor :serial_no
21
+ # @return [String] Seq. Number of Acc. Assignment Specification: Service Line
22
+ attr_accessor :serno_line
23
+ end
@@ -0,0 +1,13 @@
1
+ # class used to represent REQUISITION_TEXT STRUCTURE. Used internally
2
+ class PreqText
3
+ # @return [String] Item number of purchase requisition
4
+ attr_accessor :preq_item
5
+ # @return [String] Purchase Requisition Number
6
+ attr_accessor :preq_no
7
+ # @return [String] Tag column
8
+ attr_accessor :text_form
9
+ # @return [String] Text ID
10
+ attr_accessor :text_id
11
+ # @return [String] Text Line
12
+ attr_accessor :text_line
13
+ end
@@ -0,0 +1,14 @@
1
+ # class used to represent a Table Column. Used internally
2
+ # to map SAP's returned working area (WA) into class instances
3
+ class TableColumn
4
+ # @return [String] Name of the table field
5
+ attr_accessor :field_name
6
+ # @return [Integer] Number of characters to offset when looking for the field in the Working Area (WA)
7
+ attr_accessor :offset
8
+ # @return [Integer] Length of the field returned in the Working Area (WA)
9
+ attr_accessor :length
10
+ # @return [String] Data Type (ex: Character, Decimal, Number)
11
+ attr_accessor :type
12
+ # @return [String] Field Description returned by the SAP dictionary
13
+ attr_accessor :description
14
+ end
data/lib/rnsap.rb CHANGED
@@ -1,6 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'nwrfc'
4
+ require 'read_table/table_column'
5
+ require 'preq_detail/preq_item'
6
+ require 'preq_detail/preq_acct_assignment'
7
+ require 'preq_detail/preq_text'
8
+ require 'preq_detail/preq_limits'
9
+ require 'preq_detail/preq_contract_limits'
10
+ require 'preq_detail/preq_services'
11
+ require 'preq_detail/preq_services_texts'
12
+ require 'preq_detail/preq_srv_accass_values'
13
+ require 'preq_detail/preq_return'
14
+ require 'helper/rfc_helper'
4
15
 
5
16
  include NWRFC
6
17
 
@@ -133,32 +144,70 @@ module RnSap
133
144
  fc_preq_detail[:SERVICE_TEXTS] = services_texts
134
145
 
135
146
  fc_preq_detail.invoke
136
-
137
- list = []
138
- avoid_list = ['!','__','+', '=','!', '?','~','>', '<']
139
- fc_preq_detail[:REQUISITION_ITEMS].each do |row|
140
- preq = PreqItem.new
141
- preq.class.instance_methods.each do |method_name|
142
- begin
143
- if preq.respond_to?("#{method_name}=")
144
- unless avoid_list.any? { |word| method_name.to_s.include?(word)}
145
- value = row[method_name]
146
- eval("preq.#{method_name} = '#{value}'")
147
- end
148
- end
149
- rescue
150
- end
151
- end
152
- list.push(preq)
153
- end
154
147
 
155
- list
148
+ #-- Execute conversions for returned tables to a designated list (array)
149
+ preq_items = get_object_list(fc_preq_detail[:REQUISITION_ITEMS], PreqItem.to_s)
150
+ preq_acct_assignment = get_object_list(fc_preq_detail[:REQUISITION_ACCOUNT_ASSIGNMENT], PreqAcctAssignment.to_s)
151
+ preq_text = get_object_list(fc_preq_detail[:REQUISITION_TEXT], PreqText.to_s)
152
+ preq_limits = get_object_list(fc_preq_detail[:REQUISITION_LIMITS], PreqLimits.to_s)
153
+ preq_contract_limits = get_object_list(fc_preq_detail[:REQUISITION_CONTRACT_LIMITS], PreqContractLimits.to_s)
154
+ preq_services = get_object_list(fc_preq_detail[:REQUISITION_SERVICES], PreqItem.to_s)
155
+ preq_services_texts = get_object_list(fc_preq_detail[:REQUISITION_SERVICES_TEXTS], PreqServicesText.to_s)
156
+ preq_srv_accass_values = get_object_list(fc_preq_detail[:REQUISITION_SRV_ACCASS_VALUES], PreqServicesAccassValues.to_s)
157
+ preq_return = get_object_list(fc_preq_detail[:RETURN], PreqReturn.to_s)
158
+
159
+ {
160
+ preq_items: preq_items,
161
+ preq_acct_assignment: preq_acct_assignment,
162
+ preq_text: preq_text,
163
+ preq_limits: preq_limits,
164
+ preq_contract_limits: preq_contract_limits,
165
+ preq_services: preq_services,
166
+ preq_services_texts: preq_services_texts,
167
+ preq_srv_accass_values: preq_srv_accass_values,
168
+ preq_return: preq_return,
169
+ }
170
+ end
171
+
172
+ def preq_release_strategy_info(pr = 0)
173
+ []
174
+ end
175
+
176
+ def po_detail(po = 0)
177
+ []
178
+ end
179
+
180
+ def po_release_strategy_info(po = 1)
181
+ []
156
182
  end
157
183
 
158
184
  private
159
185
 
160
186
  attr_writer :conn
161
187
 
188
+ # def get_object_list(table, klass_name)
189
+ # list = []
190
+ # avoid_list = ['!','__','+', '=','!', '?','~','>', '<']
191
+ # table.each do |row|
192
+ # byebug
193
+ # obj = eval("#{klass_name}.new")
194
+ # obj.class.instance_methods.each do |method_name|
195
+ # begin
196
+ # if obj.respond_to?("#{method_name}=")
197
+ # unless avoid_list.any? { |word| method_name.to_s.include?(word)}
198
+ # value = row[method_name]
199
+ # eval("obj.#{method_name} = '#{value}'")
200
+ # end
201
+ # end
202
+ # rescue
203
+ # end
204
+ # end
205
+ # list.push(obj)
206
+ # end
207
+
208
+ # list
209
+ # end
210
+
162
211
  # Dumps to the output the content of an object
163
212
  def dump_instance_variables(obj)
164
213
  puts "Class: #{obj.class} -> #{obj}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rnsap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rogerio Nascimento
@@ -45,6 +45,17 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - lib/helper/rfc_helper.rb
49
+ - lib/preq_detail/preq_acct_assignment.rb
50
+ - lib/preq_detail/preq_contract_limits.rb
51
+ - lib/preq_detail/preq_item.rb
52
+ - lib/preq_detail/preq_limits.rb
53
+ - lib/preq_detail/preq_return.rb
54
+ - lib/preq_detail/preq_services.rb
55
+ - lib/preq_detail/preq_services_texts.rb
56
+ - lib/preq_detail/preq_srv_accass_values.rb
57
+ - lib/preq_detail/preq_text.rb
58
+ - lib/read_table/table_column.rb
48
59
  - lib/rnsap.rb
49
60
  homepage: https://github.com/rnasc/rnsap
50
61
  licenses: