Ysrilop c00016 f01 Fed
Ysrilop c00016 f01 Fed
Ysrilop c00016 f01 Fed
*&---------------------------------------------------------------------*
*& Form upl_xml
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM upload_xml .
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-supid = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-dndate = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-supplt = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-dnno = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-plant = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-plantdesc = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-po = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-gate = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-vin = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-etd = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-rcvawal = lw_xml_data-cvalue.
tabixx = sy-tabix + 1.
READ TABLE lt_xml_data INTO lw_xml_data INDEX tabixx.
gw_h_tab-rcvakhir = lw_xml_data-cvalue.
gw_h_tab-count = count.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-sup_num = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-desc = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-subc = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-batchno = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-qty = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-packid = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-packdesc = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-packqty = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-vpartnum = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-critic = lw_xml_item-cvalue.
tabix = sy-tabix + 1.
READ TABLE lt_xml_item INTO lw_xml_item INDEX tabix.
gw_i_tab-p3cqty = lw_xml_item-cvalue.
gw_i_tab-count = count.
*&---------------------------------------------------------------------*
*& Form upload_xls_fed
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM upload_xls_fed .
lv_filename = p_fname.
*&---------------------------------------------------------------------*
*& Form set_data_xml
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM set_data_xml.
REFRESH : gt_rslt.
CLEAR : gw_rslt.
gw_rslt-auart = 'ZDOE'.
gw_rslt-po = gw_h_tab-po.
gw_rslt-dnno = gw_h_tab-dnno.
gw_rslt-plant = gw_h_tab-plant.
gw_rslt-plantdesc = gw_h_tab-plantdesc.
gw_rslt-vin = gw_h_tab-vin.
* gw_rslt-po_item = gw_i_tab-po_item.
gw_rslt-vpartnum = gw_i_tab-sup_num.
PERFORM get_int_matnr USING gw_i_tab-sup_num
gw_rslt CHANGING gw_rslt-sup_num.
gw_rslt-qty = gw_i_tab-qty.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = gw_i_tab-po_item
IMPORTING
output = gw_rslt-po_item.
CLEAR : gw_rslt-msg.
ENDLOOP.
ENDLOOP.
gt_header[] = gt_rslt[].
gt_item[] = gt_rslt[].
*&---------------------------------------------------------------------*
*& Form set_data_xls
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM set_data_xls .
REFRESH : gt_rslt.
CLEAR : gw_rslt.
gw_rslt-auart = lw_upload-col1+0(4).
gw_rslt-po = lw_upload-col16.
gw_rslt-dnno = lw_upload-col2.
gw_rslt-plant = lw_upload-col7.
gw_rslt-plantdesc = lw_upload-col8.
gw_rslt-po_item = lw_upload-col19.
gw_rslt-sup_num = lw_upload-col20.
gw_rslt-vpartnum = lw_upload-col20.
gw_rslt-qty = lw_upload-col26.
gw_rslt-flag_cd = lw_upload-col25.
gw_rslt-qq_code = lw_upload-col28.
gt_header[] = gt_rslt[].
gt_item[] = gt_rslt[].
*&---------------------------------------------------------------------*
*& Form get_int_matnr
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> GW_I_TAB
*& <-- GW_RSLT_SUP_NUM
*&---------------------------------------------------------------------*
FORM get_int_matnr USING matnr
gw_rslt TYPE gs_rslt
CHANGING sup_num.
SELECT SINGLE *
FROM knmt
INTO @lw_knmt
WHERE kdmat EQ @matnr
AND vkorg EQ @gw_rslt-vkorg
AND vtweg EQ @gw_rslt-vtweg.
IF sy-subrc EQ 0.
sup_num = lw_knmt-matnr.
ENDIF.
ENDFORM.