method GET_RFIDS_BY_BTD_INTID

  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
method GET_RFIDS_BY_BTD_INTID.
data: ls_btd_intid TYPE /AIN/PUB_BTD_INTID_STR,
lt_btd_intid TYPE /AIN/PUB_BTD_INTID_tab,
lt_btd_header TYPE /ain/pub_btd_header_tab,
ls_btd_header TYPE /ain/pub_btd_header_str,
lt_btd_obj_act type /AIN/PUB_BTD_OBJ_ACT_TAB,
*{ REPLACE AIDK900022 4
*\ ls_btd_obj_act type /AIN/PUB_BTD_OBJ_ACT_str.
ls_btd_obj_act type /AIN/PUB_BTD_OBJ_ACT_str,
lt_btd_othattr TYPE /AIN/PUB_BTD_OTHATTR_CRE_TAB,
ls_btd_othattr TYPE /AIN/PUB_BTD_OTHATTR_CRE_STR.
data: lt_pobj_othattrs type /AIN/PUB_POBJ_OTHATTR_TAB.
*} REPLACE
data: lt_pobj_tab type /AIN/PUB_POBJ_INTID_TAB,
ls_pobj_tab type /AIN/PUB_POBJ_INTID_STR,
lT_POBJ_ID TYPE /AIN/PUB_POBJ_ID_TAB,
ls_pobj_id type /AIN/PUB_POBJ_ID_str.
data: lt_return type BAPIRETTAB.
data: ls_items type ZSC_RFID_ITEMS,
lt_items TYPE ZT_RFID_ITEMS.
data ls_tag TYPE ZST_TAG.
LS_BTD_INTID-BTD_INTID = IV_BTD_INTID.
APPEND LS_BTD_INTID to LT_BTD_INTID.
CALL FUNCTION '/AIN/PUB_BO_BUFFER_REFRESH'.
CALL FUNCTION '/AIN/PUB_BTD_BY_INTIDS'
TABLES
IT_BTD_INTID = LT_BTD_INTID
ET_BTD_HEADER = lt_btd_header
* ET_BTD_ITM = ET_BTD_ITM
* ET_BTD_ITM_ACT = lt_btd_obj_act
* ET_BTD_ITM_EXP = ET_BTD_ITM_EXP
ET_BTD_OBJ_ACT = lt_btd_obj_act
* ET_BTD_OBIT_ACT =
* ET_BTD_OBJ_EXP = lt_btd_obj_exp
* ET_BTD_OBIT_EXP =
*{ REPLACE AIDK900022 5
*\* ET_BTD_OTHATTR =
ET_BTD_OTHATTR = LT_BTD_OTHATTR
*} REPLACE
* ET_BTD_STATUS =
ET_RETURN = lt_return
* ET_BTD_ITM_OTHATTR =
* IT_BTD_INTID_ACTP =
* ET_BTD_OBIT_ACT_AGGR =
* ET_BTD_OBJ_ACT_AGGR =
* ET_QCHAR_COMB =
* IT_POBJ_INTID =
* ET_BTD_HEADER_TZONE =
*{ REPLACE AIDK900022 7
*\* EXCEPTIONS
EXCEPTIONS
TECHNICAL_LEVEL_ERROR = 1
BUSINESS_LEVEL_ERROR_INPUT = 2
OTHERS = 3
*} REPLACE
*{ REPLACE AIDK900022 6
*\* TECHNICAL_LEVEL_ERROR = 1
*\* BUSINESS_LEVEL_ERROR_INPUT = 2
*\* OTHERS = 3
*} REPLACE
.
IF SY-SUBRC eq 0.
LOOP AT LT_BTD_OBJ_ACT INTO LS_BTD_OBJ_ACT.
LS_POBJ_TAB-POBJ_INTID = LS_BTD_OBJ_ACT-POBJ_INTID.
APPEND LS_POBJ_TAB to LT_POBJ_TAB.
ENDLOOP.
*{ INSERT AIDK900022 1
IF LT_POBJ_TAB is NOT INITIAL.
*
*} INSERT
CALL FUNCTION '/AIN/PUB_POBJ_BY_INTIDS' TABLES
IT_POBJ_INTID = LT_POBJ_TAB
* ET_POBJ_HEADER = ET_POBJ_HEADER
ET_POBJ_ID = LT_POBJ_ID
*{ REPLACE AIDK900131 8
*\* ET_POBJ_OTHATTR = ET_POBJ_OTHATTR
ET_POBJ_OTHATTR = et_pobj_othattrs
*} REPLACE
ET_RETURN = lt_return
* ET_POBJ_AGGR = ET_POBJ_AGGR
* ET_QCHAR_COMB =
* EXCEPTIONS
* TECHNICAL_LEVEL_ERROR = 1
* BUSINESS_LEVEL_ERROR_INPUT = 2
* OTHERS = 3
.
IF SY-SUBRC eq 0.
data: lr_assist TYPE REF TO ZCL_WD_ASSISTANCE.
CREATE OBJECT LR_ASSIST.
LOOP AT LT_POBJ_ID INTO LS_POBJ_ID.
data lv_xstr TYPE xstring.
LV_XSTR = LS_POBJ_ID-POBJ_EXTID.
* ZCL_WD_ASSISTANCE=>DECODE_TAG_DATA( EXPORTING IV_XSTRING = LV_XSTR RECEIVING E_TAG = ls_tag ).
LR_ASSIST->DECODE_TAG_DATA_I( EXPORTING IV_XSTRING = LV_XSTR RECEIVING E_TAG = ls_tag ).
LS_TAG-POBJ_INTID = LS_POBJ_ID-POBJ_INTID.
IF sy-SUBRC eq 0.
*{ INSERT AIDK900022 3
LS_TAG-RFID = LV_XSTR.
*} INSERT
APPEND LS_TAG to ET_TAGS.
ENDIF.
ENDLOOP.
ENDIF.
*{ INSERT AIDK900022 2
ENDIF.
*} INSERT
ENDIF.
*{ INSERT AIDK900131 9
et_pobj_id = lt_pobj_id.
*} INSERT
endmethod.