Posted: Sat Oct 20, 2007 12:00 pm Post subject: BAPI_PBSRVAPS_GETDETAIL
Code:
*---------------------------------------------------------------------*
* DATA DECLARATIONS
*---------------------------------------------------------------------*
DATA: vit_selection LIKE bapi10030pbselection
OCCURS 0 WITH HEADER LINE,
vit_selection_temp LIKE bapi10030pbselection
OCCURS 0 WITH HEADER LINE,
vit_group_by LIKE bapi10030pbselection
OCCURS 0 WITH HEADER LINE,
vit_kf_selection LIKE bapi10030keyfigure
OCCURS 0 WITH HEADER LINE,
vit_t_s LIKE bapi10030pbtimeserieso
OCCURS 0 WITH HEADER LINE,
vit_t_s_all LIKE bapi10030pbtimeserieso
OCCURS 0 WITH HEADER LINE,
vit_t_s_i LIKE bapi10030pbtimeseriesitemo
OCCURS 0 WITH HEADER LINE,
vit_t_s_i_all LIKE bapi10030pbtimeseriesitemo
OCCURS 0 WITH HEADER LINE,
vit_c_c LIKE bapi10030pbcharo
OCCURS 0 WITH HEADER LINE,
vit_c_c_all LIKE bapi10030pbcharo
OCCURS 0 WITH HEADER LINE,
vit_return LIKE bapiret2
OCCURS 0 WITH HEADER LINE,
vit_onelocation LIKE s_locations OCCURS 0 WITH HEADER LINE,
p_datfrm TYPE sydatum.
DATA: l_lines TYPE i,
l_cnt TYPE i,
l_exit TYPE c,
l_max_lines TYPE i,
l_max_plus_1 TYPE i,
lit_items LIKE bapi10030pbselection
OCCURS 0 WITH HEADER LINE,
vit_ver_loc LIKE bapi10030pbselection
OCCURS 0 WITH HEADER LINE.
DATA: v_first_day_save LIKE v_first_day.
DATA: v_im3_msg LIKE z0sis_msg.
DATA: lv_errflg(3) .
DATA: BEGIN OF ls_cluster_id,
intf LIKE z022-intf,
ifrun LIKE z022-ifrun,
wstep LIKE z022-wstep,
type(6) TYPE c,
END OF ls_cluster_id.
*DECLARING INTERNAL TABLE THAT WILL HAVE RECORDS CONTAINING INPUT DATA
DATA: BEGIN OF rsparams OCCURS 0.
INCLUDE STRUCTURE rsparams.
DATA END OF rsparams.
IMPORT lv_errflg FROM MEMORY ID c_zpmo0009_memoryid.
* this builds Version selection criteria for BAPI_PBSRVAPS_GETDETAIL
vit_selection-characteristic_name = c_version.
vit_selection-char_val_low = version.
vit_selection-char_val_sign = c_include.
vit_selection-char_val_option = c_equal.
vit_selection-char_val_high = ''.
APPEND vit_selection.
CLEAR vit_selection.
ENDFORM. "PROCESS-SELECTION
*---------------------------------------------------------------------*
* FORM get-extract-dates *
*---------------------------------------------------------------------*
* This form obtains: *
* The last periods last day *
* The current period from todays date. *
* The first day in the current period. *
* The last day in the period. *
* The day of the week 1 = monday 7 = sunday *
* The reports last period, 20 months out (=19th future period) *
*---------------------------------------------------------------------*
FORM get-extract-dates USING p_1prd p_1week p_day p_datfrm.
* Get the current week of the year
DATA: l_week LIKE scal-week,
v_to_day LIKE sy-datum.
DATA: lv_week_temp(10) TYPE c.
DATA: lv_temp1(10) TYPE c,
lv_fract(10) TYPE c,
lv_tot_week(10) TYPE c.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = p_datfrm
IMPORTING
week = l_week
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
RAISE conv_date_error.
ENDIF.
* Get the date of the first day of the current week.
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
week = l_week
IMPORTING
date = v_first_day-wk
EXCEPTIONS
week_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
RAISE conv_date_error.
ENDIF.
IF p_1prd IS NOT INITIAL.
* Processing for the to week calculation
* Obtain the current period from todays date
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = p_datfrm
i_periv = c_fiscal-cal
IMPORTING
e_buper = v_period
e_gjahr = v_year
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc <> 0.
RAISE conv_date_error.
ENDIF.
* Save actual period
v_actual_period = v_period.
* Obtain the first day of the current period
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = v_year
i_periv = c_fiscal-cal
i_poper = v_period
IMPORTING
e_date = v_first-day
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc <> 0.
RAISE conv_date_error.
ELSE.
v_first-day-b = v_first-day.
ENDIF.
* Obtain the last day of the current period
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = v_year
i_periv = c_fiscal-cal
i_poper = v_period
IMPORTING
e_date = v_last-day-end-per
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc <> 0.
RAISE conv_date_error.
ENDIF.
* calculate last day of nth future period that user inputs
DO p_1prd TIMES.
*Get to week from the last day of last period
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = v_last-day-end-per
IMPORTING
week = v_to_week
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
RAISE conv_date_error.
ENDIF.
ENDIF. "p_1prd
IF p_1week IS NOT INITIAL.
DO p_1week TIMES.
v_to_day = v_to_day + 7.
ENDDO.
*Get to week by calculating the nth week
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = v_to_day
IMPORTING
week = v_to_week
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
RAISE conv_date_error.
ENDIF.
ENDIF.
IF p_day IS NOT INITIAL.
lv_week_temp = p_day / 7.
SPLIT lv_week_temp AT '.' INTO lv_temp1 lv_fract.
IF lv_fract IS NOT INITIAL.
lv_tot_week = lv_temp1 + 1.
ELSE.
lv_tot_week = lv_temp1.
ENDIF.
DO lv_tot_week TIMES.
v_to_day = v_to_day + 7.
ENDDO.
*Get to week by calculating the nth week
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = v_to_day
IMPORTING
week = v_to_week
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
RAISE conv_date_error.
ENDIF.
ENDIF.
ENDFORM. "get-extract-dates
*---------------------------------------------------------------------*
* FORM GET-DETAIL *
*---------------------------------------------------------------------*
* This form executes the bapi: BAPI_PBSRVAPS_GETDETAIL *
* The BAPI extracts data from livecache in the format of the *
* planning book requested. Also the date range is built *
* dynamically using start date specified on the selection screen*
* of the program as the starting point. *
*---------------------------------------------------------------------*
* Parameters for BAPI follow: *
* --> VIT_SELECTION *
* --> VIT_GROUP_BY *
* --> VIT_KF_SELECTION *
* --> VIT_T_S *
* --> VIT_T_S_I *
* --> VIT_C_C *
* --> VIT_RETURN *
* --> PLANNING_BOOK *
* --> LOGICAL_SYSTEM *
* --> BUSINESS_SYSTEM_GROUP *
*---------------------------------------------------------------------*
FORM get-detail
TABLES
lit_items STRUCTURE bapi10030pbselection
vit_group_by STRUCTURE bapi10030pbselection
vit_kf_selection STRUCTURE bapi10030keyfigure
vit_t_s STRUCTURE bapi10030pbtimeserieso
vit_t_s_i STRUCTURE bapi10030pbtimeseriesitemo
vit_c_c STRUCTURE bapi10030pbcharo
vit_return STRUCTURE bapiret2
USING
planning_book
logical_system
business_system_group.
DATA: l_from_week TYPE /sapapo/cdps_eval_date_from,
l_to_week TYPE /sapapo/cdps_eval_date_to.
DATA: lv_mess(220) TYPE c.
DATA: lv_len(4) TYPE c.
DATA: l_im3_msg LIKE z0sis_msg.
CONCATENATE v_from_week+4(2) v_from_week+0(4)
INTO l_from_week.
CONCATENATE v_to_week+4(2) v_to_week+0(4)
INTO l_to_week.
CLEAR vit_onelocation.
REFRESH vit_onelocation.
APPEND it_locations TO vit_onelocation.
CLEAR: vit_matloc.
REFRESH: vit_matloc.
* Build materials selections.
IF NOT s_material[] IS INITIAL.
v_flag = 'X'.
LOOP AT s_material.
IF NOT s_material-low IS INITIAL.
SHIFT s_material-low RIGHT DELETING TRAILING ' '.
OVERLAY s_material-low WITH
'0000000000000000000000000000000000000000'.
ENDIF.
IF NOT s_material-high IS INITIAL.
SHIFT s_material-high RIGHT DELETING TRAILING ' '.
OVERLAY s_material-high WITH
'0000000000000000000000000000000000000000'.
ENDIF.
MODIFY s_material INDEX sy-tabix.
ENDLOOP.
ENDIF.
IF version = '000'.
* SELECT matnr locno lsuom matid
* FROM /sapapo/v_matloc AS mloc LEFT JOIN /sapapo/matlotsz AS mlot
* ON mloc~lszid = mlot~lszid
* INTO TABLE vit_matloc
* WHERE mloc~matnr IN s_material AND
* mloc~locno IN vit_onelocation AND
* mloc~beskz IN s_proc.
SELECT mloc~matnr locno mloc~matid att01
FROM /sapapo/v_matloc AS mloc INNER JOIN /sapapo/matkey AS mkey
ON mloc~matid = mkey~matid
INTO TABLE vit_matloc
WHERE mloc~matnr IN s_material AND
mloc~locno IN vit_onelocation AND
mloc~beskz IN s_proc.
ELSE.
* SELECT matnr locno lsuom matid
* FROM /sapapo/v_mlsim AS mloc LEFT JOIN /sapapo/matlotsz AS mlot
* ON mloc~lszid = mlot~lszid
* INTO TABLE vit_matloc
* WHERE mloc~matnr IN s_material AND
* mloc~locno IN vit_onelocation AND
* mloc~beskz IN s_proc AND
* mloc~vrsioex = version.
SELECT mloc~matnr locno mloc~matid att01
FROM /sapapo/v_mlsim AS mloc INNER JOIN /sapapo/matkey AS mkey
ON mloc~matid = mkey~matid
INTO TABLE vit_matloc
WHERE mloc~matnr IN s_material AND
mloc~locno IN vit_onelocation AND
mloc~beskz IN s_proc AND
mloc~vrsioex = version.
ENDIF.
loop at vit_matloc.
lv_phase = vit_matloc-phase+8(2).
if lv_phase not in s_material_phase.
delete vit_matloc.
endif.
endloop.
ENDFORM. "BUILD-LOCATION-MATERIALS
*&--------------------------------------------------------------------*
*& Form combine_locations
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
* -->S_LOCATIONStext
* -->IT_LOCATIONStext
*---------------------------------------------------------------------*
FORM combine_locations TABLES
s_locations STRUCTURE /scf/locnorng_str
it_locations STRUCTURE it_locations.
*---------------------------------------------------------------------*
* FORM PREPARE-OUTPUT *
*---------------------------------------------------------------------*
* Form populates the internal table in output format *
*---------------------------------------------------------------------*
* The following tables are required *
* --> vit_t_s *
* --> vit_t_s_i *
* --> vit_c_c. *
*---------------------------------------------------------------------*
FORM prepare-output TABLES
vit_output STRUCTURE vit_output
vit_data STRUCTURE vit_data
USING
version
p_datfrm.
DATA: lit_loc_prod TYPE /sapapo/epegkey_tab.
DATA: lfl_loc_prod LIKE LINE OF lit_loc_prod.
DATA: lit_pegkey TYPE /sapapo/pegkey_tab.
DATA: lfl_pegkey LIKE LINE OF lit_pegkey.
DATA:lit_missing_key TYPE /sapapo/epegkey_tab.
DATA: lfl_missing_key LIKE LINE OF lit_missing_key.
DATA: lit_pegid TYPE /sapapo/pegid_tab.
DATA: lfl_pegid LIKE LINE OF lit_pegid.
DATA: lv_atpcat TYPE /sapapo/atpcat.
DATA: lit_stock TYPE /sapapo/matstock OCCURS 0.
DATA: lfl_stock LIKE LINE OF lit_stock.
DATA: lit_rc TYPE /sapapo/om_stock_rc_tab.
DATA: lfl_rc LIKE LINE OF lit_rc.
DATA: lit_output_inv LIKE vit_output OCCURS 0.
DATA: lfl_output_inv LIKE LINE OF lit_output_inv.
DATA: BEGIN OF vit_char_comb OCCURS 0,
char_comb_id TYPE bapi10030pbcharo-char_comb_id,
location TYPE /sapapo/loc-locno,
product TYPE /sapapo/matkey-matnr,
END OF vit_char_comb.
DATA: BEGIN OF lit_stock_temp OCCURS 0,
pegid TYPE /sapapo/pegid,
stock TYPE /sapapo/stock,
END OF lit_stock_temp.
DATA: BEGIN OF lit_atpcat OCCURS 0,
atpcat TYPE /sapapo/atpcat,
END OF lit_atpcat.
DATA: lv_per TYPE bapi10030pbtimeseriesitemo-period_begin,
lv_per_beg(15) TYPE c.
CALL FUNCTION 'Z0_WRITE_IFRUN_PROTOCOL'
EXPORTING
msg = l_im3_msg.
ENDIF.
ENDIF.
ENDIF.
REFRESH lit_stock_temp.
CLEAR lit_stock_temp.
LOOP AT lit_stock INTO lfl_stock.
MOVE-CORRESPONDING lfl_stock TO lit_stock_temp.
COLLECT lit_stock_temp.
ENDLOOP.
LOOP AT vit_data.
CLEAR lfl_output_inv.
CONCATENATE 'SC' lv_datefrm INTO lfl_output_inv-version.
lfl_output_inv-matnr = vit_data-product.
lfl_output_inv-plant = vit_data-location.
lfl_output_inv-uom = 'GU'.
lv_temp_date = lv_datefrm - 1.
lfl_output_inv-period = lv_temp_date.
lfl_output_inv-split = 'D'.
lfl_output_inv-conblkinv = 0.
lfl_output_inv-conunrestinv = 0.
lfl_output_inv-conqltyinsp = 0.
lfl_output_inv-qmrct = 0.
lfl_output_inv-depdem = 0.
lfl_output_inv-distdem = 0.
lfl_output_inv-stdprodfxd = 0.
lfl_output_inv-stdprodpln = 0.
lfl_output_inv-distrectfxd = 0.
lfl_output_inv-distrectpln = 0.
lfl_output_inv-custorders = 0.
lfl_output_inv-custindreq = 0.
lfl_output_inv-affsn = 0.
lfl_output_inv-non_affsn = 0.
lfl_output_inv-stdprice = 0.
lfl_output_inv-currency = 0.
CLEAR lv_inv.
IF lv_atpcat = c_cc.
READ TABLE lit_stock_temp WITH KEY
pegid = vit_data-pegid.
IF sy-subrc = 0.
lv_inv = lit_stock_temp-stock.
lfl_output_inv-unrestinv = lv_inv.
lfl_output_inv-mrp_inv = lv_inv.
APPEND lfl_output_inv TO lit_output_inv.
CLEAR lfl_output_inv.
ELSE.
lfl_output_inv-unrestinv = 0.
lfl_output_inv-mrp_inv = 0.
APPEND lfl_output_inv TO lit_output_inv.
CLEAR lfl_output_inv.
ENDIF.
ENDIF.
IF lv_atpcat = c_ci.
READ TABLE lit_stock_temp WITH KEY
pegid = vit_data-pegid.
IF sy-subrc = 0.
lv_inv = lit_stock_temp-stock.
lfl_output_inv-blockinv = lv_inv.
MODIFY lit_output_inv FROM lfl_output_inv
TRANSPORTING blockinv
WHERE matnr = vit_data-product AND
plant = vit_data-location.
ELSE.
lfl_output_inv-blockinv = 0.
MODIFY lit_output_inv FROM lfl_output_inv
TRANSPORTING blockinv
WHERE matnr = vit_data-product AND
plant = vit_data-location.
ENDIF.
ENDIF.
IF lv_atpcat = c_cf.
READ TABLE lit_stock_temp WITH KEY
pegid = vit_data-pegid.
IF sy-subrc = 0.
lv_inv = lit_stock_temp-stock.
lfl_output_inv-qltyinsp = lv_inv.
MODIFY lit_output_inv FROM lfl_output_inv
TRANSPORTING qltyinsp
WHERE matnr = vit_data-product AND
plant = vit_data-location.
ELSE.
lfl_output_inv-qltyinsp = 0.
MODIFY lit_output_inv FROM lfl_output_inv
TRANSPORTING qltyinsp
WHERE matnr = vit_data-product AND
plant = vit_data-location.
ENDIF.
ENDIF.
IF lv_atpcat = c_cs.
READ TABLE lit_stock_temp WITH KEY
pegid = vit_data-pegid.
IF sy-subrc = 0.
lv_inv = lit_stock_temp-stock.
lfl_output_inv-intransit = lv_inv.
MODIFY lit_output_inv FROM lfl_output_inv
TRANSPORTING intransit
WHERE matnr = vit_data-product AND
plant = vit_data-location.
ELSE.
lfl_output_inv-intransit = 0.
MODIFY lit_output_inv FROM lfl_output_inv
TRANSPORTING intransit
WHERE matnr = vit_data-product AND
plant = vit_data-location.
ENDIF.
ENDIF.
ENDLOOP. " vit_data
ENDLOOP. " lit_atpcat
APPEND LINES OF lit_output_inv TO vit_final_output.
REFRESH lit_output_inv.
APPEND LINES OF vit_output TO vit_final_output.
REFRESH vit_output.
ENDFORM. "PREPARE-OUTPUT
*---------------------------------------------------------------------*
* delete_zero_qty *
*---------------------------------------------------------------------*
* Form deletes records which have all the zero qty *
*---------------------------------------------------------------------*
* The following tables are required *
* --> vit_final_output *
*---------------------------------------------------------------------*
FORM delete_zero_qty TABLES
vit_final_output.
LOOP AT vit_final_output INTO vfl_final_output.
IF vfl_final_output-depdem = 0 AND
vfl_final_output-distdem = 0 AND
vfl_final_output-stdprodfxd = 0 AND
vfl_final_output-stdprodpln = 0 AND
vfl_final_output-distrectfxd = 0 AND
vfl_final_output-distrectpln = 0 AND
vfl_final_output-custorders = 0 AND
vfl_final_output-custindreq = 0 AND
vfl_final_output-unrestinv = 0 AND
vfl_final_output-mrp_inv = 0 AND
vfl_final_output-blockinv = 0 AND
vfl_final_output-qltyinsp = 0 AND
vfl_final_output-intransit = 0.
DELETE TABLE vit_final_output FROM vfl_final_output.
CONTINUE.
ENDIF.
READ TABLE vit_xref INTO vfl_xref WITH KEY
value_01 = vfl_final_output-plant.
IF sy-subrc = 0.
CLEAR vfl_final_output-plant.
vfl_final_output-plant = vfl_xref-value_06.
MODIFY vit_final_output FROM vfl_final_output.
ENDIF.
SHIFT: vfl_final_output-unrestinv RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-blockinv RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-qltyinsp RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-conblkinv RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-intransit RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-mrp_inv RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-conunrestinv RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-conqltyinsp RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-qmrct RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-depdem RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-distdem RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-stdprodfxd RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-stdprodpln RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-distrectfxd RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-distrectpln RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-custorders RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-custindreq RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-affsn RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-non_affsn RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-stdprice RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-currency RIGHT DELETING TRAILING space.
SHIFT vfl_final_output-matnr RIGHT DELETING TRAILING ' '.
OVERLAY vfl_final_output-matnr WITH '0000000000'.
MODIFY vit_final_output FROM vfl_final_output.
ENDLOOP.
ENDFORM. "delete_zero_qty
*---------------------------------------------------------------------*
* insert header *
*---------------------------------------------------------------------*
* Form inserts header to the output file *
*---------------------------------------------------------------------*
* The following tables are required *
* --> vit_final_output *
*---------------------------------------------------------------------*
FORM insert_header TABLES
vit_final_output.
* Preparation of header record
vfl_header-version = 'Version'.
vfl_header-matnr = 'Product'.
vfl_header-plant = 'Loc'.
vfl_header-uom = 'UOM'.
vfl_header-period = 'Period'.
vfl_header-split = 'SP'.
vfl_header-unrestinv = 'Qty1'.
vfl_header-blockinv = 'Qty2'.
vfl_header-qltyinsp = 'Qty3'.
vfl_header-conblkinv = 'Qty4'.
vfl_header-intransit = 'Qty5'.
vfl_header-mrp_inv = 'Qty6'.
vfl_header-conunrestinv = 'Qty7'.
vfl_header-conqltyinsp = 'Qty8'.
vfl_header-qmrct = 'Qty9'.
vfl_header-depdem = 'Qty10'.
vfl_header-distdem = 'Qty11'.
vfl_header-stdprodfxd = 'Qty12'.
vfl_header-stdprodpln = 'Qty13'.
vfl_header-distrectfxd = 'Qty14'.
vfl_header-distrectpln = 'Qty15'.
vfl_header-custorders = 'Qty16'.
vfl_header-custindreq = 'Qty17'.
vfl_header-affsn = 'Qty18'.
vfl_header-non_affsn = 'Qty19'.
vfl_header-stdprice = 'STDPR'.
vfl_header-currency = 'CURR'.
INSERT vfl_header INTO vit_final_output INDEX 1.
ENDFORM. "insert_header
*---------------------------------------------------------------------*
* FORM PREPARE-OUTPUT *
*---------------------------------------------------------------------*
* Form populates the internal table in output format *
*---------------------------------------------------------------------*
* The following tables are required *
* --> vit_t_s *
* --> vit_t_s_i *
* --> vit_c_c. *
*---------------------------------------------------------------------*
FORM livecache-key-fig TABLES
vit_t_s STRUCTURE bapi10030pbtimeserieso
vit_t_s_i STRUCTURE bapi10030pbtimeseriesitemo
vit_c_c STRUCTURE bapi10030pbcharo
vit_output STRUCTURE vit_output
vit_data STRUCTURE vit_data
USING
version
p_datfrm.
DATA: lit_loc_prod TYPE /sapapo/epegkey_tab.
DATA: lfl_loc_prod LIKE LINE OF lit_loc_prod.
DATA: lit_pegkey TYPE /sapapo/pegkey_tab.
DATA: lfl_pegkey LIKE LINE OF lit_pegkey.
DATA:lit_missing_key TYPE /sapapo/epegkey_tab.
DATA: lfl_missing_key LIKE LINE OF lit_missing_key.
DATA: lit_pegid TYPE /sapapo/pegid_tab.
DATA: lfl_pegid LIKE LINE OF lit_pegid.
DATA: lv_atpcat TYPE /sapapo/atpcat.
DATA: lit_stock TYPE /sapapo/matstock OCCURS 0.
DATA: lfl_stock LIKE LINE OF lit_stock.
DATA: lit_rc TYPE /sapapo/om_stock_rc_tab.
DATA: lfl_rc LIKE LINE OF lit_rc.
DATA: lit_output_inv LIKE vit_output OCCURS 0.
DATA: lfl_output_inv LIKE LINE OF lit_output_inv.
DATA: BEGIN OF vit_char_comb OCCURS 0,
char_comb_id TYPE bapi10030pbcharo-char_comb_id,
location TYPE /sapapo/loc-locno,
product TYPE /sapapo/matkey-matnr,
END OF vit_char_comb.
DATA: BEGIN OF lit_stock_temp OCCURS 0,
pegid TYPE /sapapo/pegid,
stock TYPE /sapapo/stock,
END OF lit_stock_temp.
DATA: BEGIN OF lit_atpcat OCCURS 0,
atpcat TYPE /sapapo/atpcat,
END OF lit_atpcat.
DATA: lv_per TYPE bapi10030pbtimeseriesitemo-period_begin,
lv_per_beg(15) TYPE c.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.