rnsap 0.4.8 → 0.4.9
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 +4 -4
- data/lib/helper/rfc_helper.rb +19 -15
- data/lib/po_detail/all.rb +27 -0
- data/lib/po_detail/po_account.rb +93 -0
- data/lib/po_detail/po_addrdelivery.rb +115 -0
- data/lib/po_detail/po_all_versions.rb +55 -0
- data/lib/po_detail/po_components.rb +53 -0
- data/lib/po_detail/po_cond.rb +91 -0
- data/lib/po_detail/po_cond_header.rb +91 -0
- data/lib/po_detail/po_confirmation.rb +39 -0
- data/lib/po_detail/po_contract_limits.rb +21 -0
- data/lib/po_detail/po_exp_imp_header.rb +7 -0
- data/lib/po_detail/po_exp_imp_item.rb +21 -0
- data/lib/po_detail/po_extension_out.rb +13 -0
- data/lib/po_detail/po_header.rb +131 -0
- data/lib/po_detail/po_history.rb +107 -0
- data/lib/po_detail/po_history_ma.rb +37 -0
- data/lib/po_detail/po_history_totals.rb +51 -0
- data/lib/po_detail/po_inv_plan_header.rb +49 -0
- data/lib/po_detail/po_inv_plan_item.rb +51 -0
- data/lib/po_detail/po_item.rb +359 -0
- data/lib/po_detail/po_limits.rb +47 -0
- data/lib/po_detail/po_partner.rb +11 -0
- data/lib/po_detail/po_schedule.rb +59 -0
- data/lib/po_detail/po_serial_number.rb +13 -0
- data/lib/po_detail/po_services.rb +137 -0
- data/lib/po_detail/po_shipping_exp.rb +53 -0
- data/lib/po_detail/po_srv_access_values.rb +17 -0
- data/lib/po_detail/po_text_header.rb +13 -0
- data/lib/po_detail/po_text_item.rb +13 -0
- data/lib/po_release_info/all.rb +1 -0
- data/lib/po_release_info/po_release_final.rb +53 -0
- data/lib/preq_detail/all.rb +8 -0
- data/lib/preq_release_info/all.rb +4 -0
- data/lib/rnsap.rb +130 -31
- metadata +33 -1
data/lib/rnsap.rb
CHANGED
@@ -2,19 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'nwrfc'
|
4
4
|
require 'read_table/table_column'
|
5
|
-
|
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_release_info/preq_gen_release_info'
|
14
|
-
require 'preq_release_info/preq_release_prerequisites'
|
15
|
-
require 'preq_release_info/preq_release_posted'
|
16
|
-
require 'preq_release_info/preq_release_final'
|
5
|
+
|
17
6
|
require 'return'
|
7
|
+
|
8
|
+
require 'preq_detail/all'
|
9
|
+
require 'preq_release_info/all'
|
10
|
+
|
11
|
+
require 'po_detail/all'
|
12
|
+
require 'po_release_info/all'
|
13
|
+
|
18
14
|
require 'helper/rfc_helper'
|
19
15
|
require 'helper/util_helper'
|
20
16
|
|
@@ -202,15 +198,15 @@ module RnSap
|
|
202
198
|
fc_preq_detail.invoke
|
203
199
|
|
204
200
|
#-- Execute conversions for returned tables to a designated list (array)
|
205
|
-
preq_items = get_object_list(fc_preq_detail[:REQUISITION_ITEMS], PreqItem
|
206
|
-
preq_acct_assignment = get_object_list(fc_preq_detail[:REQUISITION_ACCOUNT_ASSIGNMENT], PreqAcctAssignment
|
207
|
-
preq_text = get_object_list(fc_preq_detail[:REQUISITION_TEXT], PreqText
|
208
|
-
preq_limits = get_object_list(fc_preq_detail[:REQUISITION_LIMITS], PreqLimits
|
209
|
-
preq_contract_limits = get_object_list(fc_preq_detail[:REQUISITION_CONTRACT_LIMITS], PreqContractLimits
|
210
|
-
preq_services = get_object_list(fc_preq_detail[:REQUISITION_SERVICES], PreqItem
|
211
|
-
preq_services_texts = get_object_list(fc_preq_detail[:REQUISITION_SERVICES_TEXTS], PreqServicesText
|
212
|
-
preq_srv_accass_values = get_object_list(fc_preq_detail[:REQUISITION_SRV_ACCASS_VALUES], PreqServicesAccassValues
|
213
|
-
tb_return = get_object_list(fc_preq_detail[:RETURN], Return
|
201
|
+
preq_items = get_object_list(fc_preq_detail[:REQUISITION_ITEMS], PreqItem)
|
202
|
+
preq_acct_assignment = get_object_list(fc_preq_detail[:REQUISITION_ACCOUNT_ASSIGNMENT], PreqAcctAssignment)
|
203
|
+
preq_text = get_object_list(fc_preq_detail[:REQUISITION_TEXT], PreqText)
|
204
|
+
preq_limits = get_object_list(fc_preq_detail[:REQUISITION_LIMITS], PreqLimits)
|
205
|
+
preq_contract_limits = get_object_list(fc_preq_detail[:REQUISITION_CONTRACT_LIMITS], PreqContractLimits)
|
206
|
+
preq_services = get_object_list(fc_preq_detail[:REQUISITION_SERVICES], PreqItem)
|
207
|
+
preq_services_texts = get_object_list(fc_preq_detail[:REQUISITION_SERVICES_TEXTS], PreqServicesText)
|
208
|
+
preq_srv_accass_values = get_object_list(fc_preq_detail[:REQUISITION_SRV_ACCASS_VALUES], PreqServicesAccassValues)
|
209
|
+
tb_return = get_object_list(fc_preq_detail[:RETURN], Return)
|
214
210
|
|
215
211
|
retcode = tb_return.detect{|r| r.type == 'E'}
|
216
212
|
|
@@ -244,11 +240,11 @@ module RnSap
|
|
244
240
|
fn_preq_rel_strat_info.invoke
|
245
241
|
|
246
242
|
#-- Execute conversions for returned tables to a designated list (array)
|
247
|
-
preq_gen_release_info = get_object_list(fn_preq_rel_strat_info[:GENERAL_RELEASE_INFO], PreqGenReleaseInfo
|
248
|
-
preq_release_prerequisites = get_object_list(fn_preq_rel_strat_info[:RELEASE_PREREQUISITES], PreqReleasePrerequisites
|
249
|
-
preq_release_posted = get_object_list(fn_preq_rel_strat_info[:RELEASE_ALREADY_POSTED], PreqReleasePosted
|
250
|
-
preq_release_final = get_object_list(fn_preq_rel_strat_info[:RELEASE_FINAL], PreqReleaseFinal
|
251
|
-
tb_return = get_object_list(fn_preq_rel_strat_info[:RETURN], Return
|
243
|
+
preq_gen_release_info = get_object_list(fn_preq_rel_strat_info[:GENERAL_RELEASE_INFO], PreqGenReleaseInfo)
|
244
|
+
preq_release_prerequisites = get_object_list(fn_preq_rel_strat_info[:RELEASE_PREREQUISITES], PreqReleasePrerequisites)
|
245
|
+
preq_release_posted = get_object_list(fn_preq_rel_strat_info[:RELEASE_ALREADY_POSTED], PreqReleasePosted)
|
246
|
+
preq_release_final = get_object_list(fn_preq_rel_strat_info[:RELEASE_FINAL], PreqReleaseFinal)
|
247
|
+
tb_return = get_object_list(fn_preq_rel_strat_info[:RETURN], Return)
|
252
248
|
|
253
249
|
retcode = tb_return.detect{|r| r.type == 'E'}
|
254
250
|
|
@@ -285,7 +281,7 @@ module RnSap
|
|
285
281
|
|
286
282
|
fn_preq_exec_release.invoke
|
287
283
|
|
288
|
-
tb_return = get_object_list(fn_preq_exec_release[:RETURN], Return
|
284
|
+
tb_return = get_object_list(fn_preq_exec_release[:RETURN], Return)
|
289
285
|
|
290
286
|
retcode = tb_return.detect{|r| r.type == 'E'}
|
291
287
|
|
@@ -300,12 +296,115 @@ module RnSap
|
|
300
296
|
end
|
301
297
|
end
|
302
298
|
|
303
|
-
def po_detail(po = 0)
|
304
|
-
|
299
|
+
def po_detail(po = 0, acc_assignment = "", item_text = "", header_text = "", delivery_address = "", version = "", services = "", serialnumbers = "", invoiceplan = "")
|
300
|
+
#-- Execute BAPI_PO_GETDETAIL1
|
301
|
+
fn_po_detail = @conn.get_function('BAPI_PO_GETDETAIL1')
|
302
|
+
fc_po_detail = fn_po_detail.get_function_call
|
303
|
+
|
304
|
+
fc_po_detail[:PURCHASEORDER] = po
|
305
|
+
fc_po_detail[:ACCOUNT_ASSIGNMENT] = acc_assignment
|
306
|
+
fc_po_detail[:ITEM_TEXT] = item_text
|
307
|
+
fc_po_detail[:HEADER_TEXT] = header_text
|
308
|
+
fc_po_detail[:DELIVERY_ADDRESS] = delivery_address
|
309
|
+
fc_po_detail[:VERSION] = version
|
310
|
+
fc_po_detail[:SERVICES] = services
|
311
|
+
fc_po_detail[:SERIALNUMBERS] = serialnumbers
|
312
|
+
fc_po_detail[:INVOICEPLAN] = invoiceplan
|
313
|
+
|
314
|
+
fc_po_detail.invoke
|
315
|
+
|
316
|
+
#-- Execute conversions for returned tables to a designated list (array)
|
317
|
+
po_item = get_object_list(fc_po_detail[:POITEM], PoItem)
|
318
|
+
po_addrdelivery = get_object_list(fc_po_detail[:POADDRDELIVERY], PoAddrDelivery)
|
319
|
+
po_schedule = get_object_list(fc_po_detail[:POSCHEDULE], PoSchedule)
|
320
|
+
po_account = get_object_list(fc_po_detail[:POACCOUNT], PoAccount)
|
321
|
+
po_cond_header = get_object_list(fc_po_detail[:POCONDHEADER], PoCondHeader)
|
322
|
+
po_cond = get_object_list(fc_po_detail[:POCOND], PoCond)
|
323
|
+
po_limits = get_object_list(fc_po_detail[:POLIMITS], PoLimits)
|
324
|
+
po_contract_limits = get_object_list(fc_po_detail[:POCONTRACTLIMITS], PoContractLimits)
|
325
|
+
po_services = get_object_list(fc_po_detail[:POSERVICES], PoServices)
|
326
|
+
po_srv_access_values = get_object_list(fc_po_detail[:POSRVACCESSVALUES], PoSrvAccessValues)
|
327
|
+
po_text_header = get_object_list(fc_po_detail[:POTEXTHEADER], PoTextHeader)
|
328
|
+
po_text_item = get_object_list(fc_po_detail[:POTEXTITEM], PoTextItem)
|
329
|
+
po_exp_imp_item = get_object_list(fc_po_detail[:POEXPIMPITEM], PoExpImpItem)
|
330
|
+
po_components = get_object_list(fc_po_detail[:POCOMPONENTS], PoComponents)
|
331
|
+
po_shipping_exp = get_object_list(fc_po_detail[:POSHIPPINGEXP], PoShippingExp)
|
332
|
+
po_history = get_object_list(fc_po_detail[:POHISTORY], PoHistory)
|
333
|
+
po_history_totals = get_object_list(fc_po_detail[:POHISTORY_TOTALS], PoHistoryTotals)
|
334
|
+
po_confirmation = get_object_list(fc_po_detail[:POCONFIRMATION], PoConfirmation)
|
335
|
+
po_all_versions = get_object_list(fc_po_detail[:ALLVERSIONS], PoAllVersions)
|
336
|
+
po_partner = get_object_list(fc_po_detail[:POPARTNER], PoPartner)
|
337
|
+
po_extension_out = get_object_list(fc_po_detail[:EXTENSIONOUT], PoExtensionOut)
|
338
|
+
po_serial_number = get_object_list(fc_po_detail[:SERIALNUMBER], PoSerialNumber)
|
339
|
+
po_inv_plan_header = get_object_list(fc_po_detail[:INVPLANHEADER], PoInvPlanHeader)
|
340
|
+
po_inv_plan_item = get_object_list(fc_po_detail[:INVPLANITEM], PoInvPlanItem)
|
341
|
+
po_history_ma = get_object_list(fc_po_detail[:POHISTORY_MA], PoHistoryMa)
|
342
|
+
po_header = get_object(fc_po_detail[:POHEADER], PoHeader)
|
343
|
+
po_exp_imp_header = get_object(fc_po_detail[:POEXPIMPHEADER], PoExpImpHeader)
|
344
|
+
tb_return = get_object_list(fc_po_detail[:RETURN], Return)
|
345
|
+
|
346
|
+
retcode = tb_return.detect{|r| r.type == 'E'}
|
347
|
+
|
348
|
+
if retcode
|
349
|
+
api_return_error(retcode)
|
350
|
+
else
|
351
|
+
api_return_success({
|
352
|
+
po_item: po_item,
|
353
|
+
po_addrdelivery: po_addrdelivery,
|
354
|
+
po_schedule: po_schedule,
|
355
|
+
po_account: po_account,
|
356
|
+
po_cond_header: po_cond_header,
|
357
|
+
po_cond: po_cond,
|
358
|
+
po_limits: po_limits,
|
359
|
+
po_contract_limits: po_contract_limits,
|
360
|
+
po_services: po_services,
|
361
|
+
po_srv_access_values: po_srv_access_values,
|
362
|
+
po_text_header: po_text_header,
|
363
|
+
po_text_item: po_text_item,
|
364
|
+
po_exp_imp_item: po_exp_imp_item,
|
365
|
+
po_components: po_components,
|
366
|
+
po_shipping_exp: po_shipping_exp,
|
367
|
+
po_history: po_history,
|
368
|
+
po_history_totals: po_history_totals,
|
369
|
+
po_confirmation: po_confirmation,
|
370
|
+
po_all_versions: po_all_versions,
|
371
|
+
po_partner: po_partner,
|
372
|
+
po_extension_out: po_extension_out,
|
373
|
+
po_serial_number: po_serial_number,
|
374
|
+
po_inv_plan_header: po_inv_plan_header,
|
375
|
+
po_inv_plan_item: po_inv_plan_item,
|
376
|
+
po_history_ma: po_history_ma,
|
377
|
+
po_header: po_header,
|
378
|
+
po_exp_imp_header: po_exp_imp_header,
|
379
|
+
tb_return: tb_return,
|
380
|
+
})
|
381
|
+
end
|
305
382
|
end
|
306
383
|
|
307
|
-
def po_release_strategy_info(po =
|
308
|
-
|
384
|
+
def po_release_strategy_info(po = 0, po_rel_code = "")
|
385
|
+
#-- Execute BAPI_PO_GETRELINFO
|
386
|
+
fn_po_rel_strat_info = @conn.get_function('BAPI_PO_GETRELINFO')
|
387
|
+
fc_po_rel_strat_info = fn_po_rel_strat_info.get_function_call
|
388
|
+
|
389
|
+
fc_po_rel_strat_info[:PURCHASEORDER] = po
|
390
|
+
fc_po_rel_strat_info[:PO_REL_CODE] = po_rel_code
|
391
|
+
|
392
|
+
fc_po_rel_strat_info.invoke
|
393
|
+
|
394
|
+
#-- Execute conversions for returned tables to a designated list (array)
|
395
|
+
po_release_final = get_object_list(fc_po_rel_strat_info[:RELEASE_FINAL], PoReleaseFinal.to_s)
|
396
|
+
tb_return = get_object_list(fc_po_rel_strat_info[:RETURN], Return.to_s)
|
397
|
+
|
398
|
+
retcode = tb_return.detect{|r| r.type == 'E'}
|
399
|
+
|
400
|
+
if retcode
|
401
|
+
api_return_error(retcode)
|
402
|
+
else
|
403
|
+
api_return_success({
|
404
|
+
po_release_final: po_release_final,
|
405
|
+
tb_return: tb_return,
|
406
|
+
})
|
407
|
+
end
|
309
408
|
end
|
310
409
|
|
311
410
|
# Performs SAP Authority check on a certain authorization
|
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.
|
4
|
+
version: 0.4.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rogerio Nascimento
|
@@ -47,6 +47,37 @@ extra_rdoc_files: []
|
|
47
47
|
files:
|
48
48
|
- lib/helper/rfc_helper.rb
|
49
49
|
- lib/helper/util_helper.rb
|
50
|
+
- lib/po_detail/all.rb
|
51
|
+
- lib/po_detail/po_account.rb
|
52
|
+
- lib/po_detail/po_addrdelivery.rb
|
53
|
+
- lib/po_detail/po_all_versions.rb
|
54
|
+
- lib/po_detail/po_components.rb
|
55
|
+
- lib/po_detail/po_cond.rb
|
56
|
+
- lib/po_detail/po_cond_header.rb
|
57
|
+
- lib/po_detail/po_confirmation.rb
|
58
|
+
- lib/po_detail/po_contract_limits.rb
|
59
|
+
- lib/po_detail/po_exp_imp_header.rb
|
60
|
+
- lib/po_detail/po_exp_imp_item.rb
|
61
|
+
- lib/po_detail/po_extension_out.rb
|
62
|
+
- lib/po_detail/po_header.rb
|
63
|
+
- lib/po_detail/po_history.rb
|
64
|
+
- lib/po_detail/po_history_ma.rb
|
65
|
+
- lib/po_detail/po_history_totals.rb
|
66
|
+
- lib/po_detail/po_inv_plan_header.rb
|
67
|
+
- lib/po_detail/po_inv_plan_item.rb
|
68
|
+
- lib/po_detail/po_item.rb
|
69
|
+
- lib/po_detail/po_limits.rb
|
70
|
+
- lib/po_detail/po_partner.rb
|
71
|
+
- lib/po_detail/po_schedule.rb
|
72
|
+
- lib/po_detail/po_serial_number.rb
|
73
|
+
- lib/po_detail/po_services.rb
|
74
|
+
- lib/po_detail/po_shipping_exp.rb
|
75
|
+
- lib/po_detail/po_srv_access_values.rb
|
76
|
+
- lib/po_detail/po_text_header.rb
|
77
|
+
- lib/po_detail/po_text_item.rb
|
78
|
+
- lib/po_release_info/all.rb
|
79
|
+
- lib/po_release_info/po_release_final.rb
|
80
|
+
- lib/preq_detail/all.rb
|
50
81
|
- lib/preq_detail/preq_acct_assignment.rb
|
51
82
|
- lib/preq_detail/preq_contract_limits.rb
|
52
83
|
- lib/preq_detail/preq_item.rb
|
@@ -55,6 +86,7 @@ files:
|
|
55
86
|
- lib/preq_detail/preq_services_texts.rb
|
56
87
|
- lib/preq_detail/preq_srv_accass_values.rb
|
57
88
|
- lib/preq_detail/preq_text.rb
|
89
|
+
- lib/preq_release_info/all.rb
|
58
90
|
- lib/preq_release_info/preq_gen_release_info.rb
|
59
91
|
- lib/preq_release_info/preq_release_final.rb
|
60
92
|
- lib/preq_release_info/preq_release_posted.rb
|