BDC Program Upload Material to Create Master Data (MM01)

REPORT  ZIMMC001.
************************************************************************
*  D A T A   D E C L A R A T I O N                                     *
************************************************************************
*------------------------------------
*  Type Declaration of the Structure.
*------------------------------------
TYPES:  BEGIN  OF  TY_SAVE_INDEX,
          IDNO  TYPE  I,                   "  SAVE Index
        END    OF  TY_SAVE_INDEX.
TYPES:  BEGIN  OF  TY_TABDATA,
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Create Material (Initial Screen).
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          MATNR(18)      TYPE    C,        "  Material Number.
          MBRSH(01)      TYPE    C,        "  Industry Sector.
          MTART(04)      TYPE    C,        "  Material Type.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Organizational Levels.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          WERKS(04)      TYPE    C,        "  Plant.
          LGORT(04)      TYPE    C,        "  Storage Location.
          VKORG(04)      TYPE    C,        "  Sales Organization.
          VTWEG(02)      TYPE    C,        "  Distribution Channel.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Sales Org. 1 : Tax Classification.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          TAXKM1(01)     TYPE    C,        "  Tax classification material 1.
          TAXKM2(01)     TYPE    C,        "  Tax classification material 2.
          TAXKM3(01)     TYPE    C,        "  Tax classification material 3.
          TAXKM4(01)     TYPE    C,        "  Tax classification material 4.
          TAXKM5(01)     TYPE    C,        "  Tax classification material 5.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Additional Data - UoM.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          UMREN1(06)     TYPE    C,        "  Denominator for Conversion to Base Units of Measure 1.
          MEINH1(03)     TYPE    C,        "  Alternative Unit of Measure for Stockkeeping Unit   1.
          UMREZ1(06)     TYPE    C,        "  Numerator for Conversion to Base Units of Measure   1.
*         ..........................................................................................
          UMREN2(06)     TYPE    C,        "  Denominator for Conversion to Base Units of Measure 2.
          MEINH2(03)     TYPE    C,        "  Alternative Unit of Measure for Stockkeeping Unit   2.
          UMREZ2(06)     TYPE    C,        "  Numerator for Conversion to Base Units of Measure   2.
*         ..........................................................................................
          UMREN3(06)     TYPE    C,        "  Denominator for Conversion to Base Units of Measure 3.
          MEINH3(03)     TYPE    C,        "  Alternative Unit of Measure for Stockkeeping Unit   3.
          UMREZ3(06)     TYPE    C,        "  Numerator for Conversion to Base Units of Measure   3.
*         ..........................................................................................
          UMREN4(06)     TYPE    C,        "  Denominator for Conversion to Base Units of Measure 4.
          MEINH4(03)     TYPE    C,        "  Alternative Unit of Measure for Stockkeeping Unit   4.
          UMREZ4(06)     TYPE    C,        "  Numerator for Conversion to Base Units of Measure   4.
*         ..........................................................................................
          UMREN5(06)     TYPE    C,        "  Denominator for Conversion to Base Units of Measure 5.
          MEINH5(03)     TYPE    C,        "  Alternative Unit of Measure for Stockkeeping Unit   5.
          UMREZ5(06)     TYPE    C,        "  Numerator for Conversion to Base Units of Measure   5.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Sales Org. 1
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          VRKME(03)      TYPE    C,        "  Sales unit.
          DWERK(04)      TYPE    C,        "  Delivering Plant (Own or External).
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Sales Org. 2
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          VERSG(01)      TYPE    C,        "  Material statistics group.
          KTGRM(02)      TYPE    C,        "  Account assignment group for this material.
          MTPOS(04)      TYPE    C,        "  Item category group from material master.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         General/Plant.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          BRGEW(17)      TYPE    C,        "  Gross weight.
          NTGEW(17)      TYPE    C,        "  Net weight.
          MTVFP(02)      TYPE    C,        "  Checking Group for Availability Check.
          TRAGR(04)      TYPE    C,        "  Transportation group
          LADGR(04)      TYPE    C,        "  Loading group.
          PRCTR(10)      TYPE    C,        "  Profit Center.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Foreign Trade Export.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          HERKL(03)      TYPE    C,        "  Country of origin of the material.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Purchasing.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          BSTME(03)      TYPE    C,        "  Order unit.
          KAUTB(01)      TYPE    C,        "  Indicator: "automatic purchase order allowed".
          XCHPF(01)      TYPE    C,        "  Batch management requirement indicator.
          EKGRP(03)      TYPE    C,        "  Purchasing Group.
          WEBAZ(03)      TYPE    C,        "  Goods receipt processing time in days.
          EKWSL(04)      TYPE    C,        "  Purchasing Value Key.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Purch.Order Text.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          PTEXT(40)      TYPE    C,        "  Purchase Order Text.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         MRP 1
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          DISGR(04)      TYPE    C,        "  MRP Group.
          DISMM(02)      TYPE    C,        "  MRP Type.
          MINBE(17)      TYPE    C,        "  Reorder point.
          DISPO(03)      TYPE    C,        "  MRP Controller.
          DISLS(02)      TYPE    C,        "  Lot size (materials planning).
          BSTFE(17)      TYPE    C,        "  Fixed lot size.
          BSTMI(17)      TYPE    C,        "  Minimum lot size.
          BSTMA(17)      TYPE    C,        "  Maximum lot size.
          AUSSS(06)      TYPE    C,        "  Assembly scrap in percent.
          BSTRF(17)      TYPE    C,        "  Rounding value for purchase order quantity.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         MRP 2
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          BESKZ(01)      TYPE    C,        "  Procurement Type.
          SOBSL(02)      TYPE    C,        "  Special procurement type.
          LGPRO(04)      TYPE    C,        "  Issue Storage Location.
          RGEKZ(01)      TYPE    C,        "  Indicator: Backflush.
          LGFSB(04)      TYPE    C,        "  Default storage location for external procurement.
          DZEIT(03)      TYPE    C,        "  In-house production time.
          PLIFZ(03)      TYPE    C,        "  Planned delivery time in days.
          MRPPP(03)      TYPE    C,        "  PPC planning calendar.
          FHORI(03)      TYPE    C,        "  Scheduling Margin Key for Floats.
          EISBE(17)      TYPE    C,        "  Safety stock.
          WEBAZ1(03)     TYPE    C,        "  Goods receipt processing time in days.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         MRP 3
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          STRGR(02)      TYPE    C,        "  Planning strategy group.
          VRMOD(01)      TYPE    C,        "  Consumption mode.
          VINT1(03)      TYPE    C,        "  Consumption period: backward.
          VINT2(03)      TYPE    C,        "  Consumption period: forward.
          MISKZ(01)      TYPE    C,        "  Mixed MRP indicator.
          MTVFP1(02)     TYPE    C,        "  Checking Group for Availability Check.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         MRP 4
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          ALTSL(01)      TYPE    C,        "  Method for Selecting Alternative Bills of Material.
          KAUSF(06)      TYPE    C,        "  Component scrap in percent.
          SBDKZ(01)      TYPE    C,        "  Dependent requirements ind. for individual and coll. reqmts.
          SAUFT(01)      TYPE    C,        "  Ind.: Repetitive mfg allowed.
          SFEPR(04)      TYPE    C,        "  Repetitive manufacturing profile.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Work Scheduling.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          FRTME(03)      TYPE    C,        "  Production unit.
          FEVOR(03)      TYPE    C,        "  Production scheduler.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Plant Data / Stor. 1
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          AUSME(03)      TYPE    C,        "  Unit of issue.
          MHDRZ(05)      TYPE    C,        "  Minimum remaining shelf life.
          MHDHB(05)      TYPE    C,        "  Total shelf life.
          IPRKZ(01)      TYPE    C,        "  Period indicator for shelf life expiration date.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Quality Management.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          WEBAZ2(03)     TYPE    C,        "  Goods receipt processing time in days.
          QMPUR(01)      TYPE    C,        "  QM in Procurement is Active.
          SSQSS(08)      TYPE    C,        "  Control Key for Quality Management in Procurement.
          QZGTP(04)      TYPE    C,        "  Certificate Type.
          QMATV(01)      TYPE    C,        "  Inspection Setup Exists for Material/Plant.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Inspection Setup Data.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          ART1(08)       TYPE    C,        "  Inspection Type 1.
          AKTIV1(01)     TYPE    C,        "  Inspection Type - Material Combination is Active 1.
          ART2(08)       TYPE    C,        "  Inspection Type 2.
          AKTIV2(01)     TYPE    C,        "  Inspection Type - Material Combination is Active 2.
          ART3(08)       TYPE    C,        "  Inspection Type 3.
          AKTIV3(01)     TYPE    C,        "  Inspection Type - Material Combination is Active 3.
          ART4(08)       TYPE    C,        "  Inspection Type 4.
          AKTIV4(01)     TYPE    C,        "  Inspection Type - Material Combination is Active 4.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Accounting 1.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          BKLAS(04)      TYPE    C,        "  Valuation Class.
          VPRSV(01)      TYPE    C,        "  Price Control Indicator.
          PEINH(06)      TYPE    C,        "  Price Unit.
          STPRS(15)      TYPE    C,        "  Standard Price.
          VERPR(15)      TYPE    C,        "  Moving Average Price/Periodic Unit Price.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*         Cost Estimate 1.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          EKALR(01)      TYPE    C,        "  Material Is Costed with Quantity Structure.
          HKMAT(01)      TYPE    C,        "  Material Origin.
          AWSLS(06)      TYPE    C,        "  Variance Key.
          PRCTR1(10)     TYPE    C,        "  Profit Center.
          LOSGR(17)      TYPE    C,        "  Lot Size for Product Costing.
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
          ROWCNT         TYPE    I,        "  Normal Row Count.
          ROW            TYPE    I,        "  Row Count --> Line Items
*         ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        END  OF  TY_TABDATA.
*------------------------------------------------
*  Declaration of the Internal Table & Work Area.
*------------------------------------------------
DATA:   IT_SAVE_INDEX      TYPE  STANDARD  TABLE  OF  TY_SAVE_INDEX,
        WA_SAVE_INDEX      TYPE                       TY_SAVE_INDEX.
DATA:   IT_TABDATA         TYPE  STANDARD  TABLE  OF  TY_TABDATA,
        WA_TABDATA         TYPE                       TY_TABDATA.
*-------------------------------------------------------------------------------------
*  Declaration of the Internal Table with Header Line comprising of the uploaded data.
*-------------------------------------------------------------------------------------
DATA:  BEGIN  OF  IT_FILE_UPLOAD  OCCURS  0.
         INCLUDE  STRUCTURE  ALSMEX_TABLINE.  "  Rows for Table with Excel Data
DATA:  END  OF  IT_FILE_UPLOAD.
*-------------------------------
*  Global Variable Declarations.
*-------------------------------
DATA:  GV_ANS  TYPE  C.
*--------------------------------------------
*  Batch Input Data for a single Transaction.
*  Message of Call Transaction.
*--------------------------------------------
DATA:  BDCDATA  LIKE  BDCDATA     OCCURS  0  WITH  HEADER  LINE,
       MSGTAB   LIKE  BDCMSGCOLL  OCCURS  0  WITH  HEADER  LINE.
************************************************************************
*  S E L E C T I O N - S C R E E N                                     *
************************************************************************
  SELECTION-SCREEN:  BEGIN  OF  BLOCK  B1  WITH  FRAME,
                       BEGIN  OF  BLOCK  B2  WITH  FRAME.
  PARAMETERS:            P_FNAME  LIKE  RLGRAP-FILENAME  OBLIGATORY.
  SELECTION-SCREEN:    END  OF  BLOCK  B2,
                     END  OF  BLOCK  B1.
************************************************************************
*  E V E N T : AT    S E L E C T I O N - S C R E E N                   *
************************************************************************
AT  SELECTION-SCREEN  ON  VALUE-REQUEST  FOR  P_FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
     EXPORTING
*       PROGRAM_NAME        = SYST-REPID
*       DYNPRO_NUMBER       = SYST-DYNNR
*       FIELD_NAME          = ' '
       STATIC              = 'X'
*       MASK                = '.'
      CHANGING
        FILE_NAME           = P_FNAME
*     EXCEPTIONS
*       MASK_TOO_LONG       = 1
*       OTHERS              = 2
              .
    IF SY-SUBRC <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
************************************************************************
*  E V E N T : S T A R T - O F - S E L E C T I O N                     *
************************************************************************
START-OF-SELECTION.
* --------------------------------------
* Upload Excel file into Internal Table.
* --------------------------------------
  PERFORM  UPLOAD_EXCEL_FILE.
  IF  NOT  IT_FILE_UPLOAD  IS  INITIAL.
*   ----------------------------------------------------
*   Confirm whether you want to proceed with the Upload.
*   ----------------------------------------------------
    PERFORM  CONFIRM_UPLOAD.
    IF  GV_ANS  EQ  '1'.
*     -------------------------------------------------------
*     Organize the uploaded data into another Internal Table.
*     -------------------------------------------------------
      PERFORM  ORGANIZE_UPLOADED_DATA.
*     -----------------------------------
*     Modify Row No. for Line Item Count.
*     -----------------------------------
      PERFORM  MODIFY_ROW_NUMBER.
*     -----------------
*     Open BDC Session.
*     -----------------
*      PERFORM  OPEN_BDC_SESSION.
*     ------------------------
*     Kick-start BDC Operation
*     ------------------------
      PERFORM  BDC_OPERATION.
*     ------------------
*     Close BDC Session.
*     ------------------
*      PERFORM  CLOSE_BDC_SESSION.
    ENDIF.
  ENDIF.
************************************************************************
*  E V E N T : E N D - O F - S E L E C T I O N                         *
************************************************************************
END-OF-SELECTION.
*&---------------------------------------------------------------------*
*&      Form  UPLOAD_EXCEL_FILE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM UPLOAD_EXCEL_FILE .
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      FILENAME                      = P_FNAME
      I_BEGIN_COL                   = 1
      I_BEGIN_ROW                   = 4
      I_END_COL                     = 107
      I_END_ROW                     = 32000
    TABLES
      INTERN                        = IT_FILE_UPLOAD
    EXCEPTIONS
      INCONSISTENT_PARAMETERS       = 1
      UPLOAD_OLE                    = 2
      OTHERS                        = 3
            .
  IF SY-SUBRC <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " UPLOAD_EXCEL_FILE
*&---------------------------------------------------------------------*
*&      Form  CONFIRM_UPLOAD
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM CONFIRM_UPLOAD .
  CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
      TITLEBAR                    = 'Pop-Up to Confirm'
*     DIAGNOSE_OBJECT             = ' '
      TEXT_QUESTION               = 'Do you like to proceed with the Upload ???'
*     TEXT_BUTTON_1               = 'Ja'(001)
*     ICON_BUTTON_1               = ' '
*     TEXT_BUTTON_2               = 'Nein'(002)
*     ICON_BUTTON_2               = ' '
*     DEFAULT_BUTTON              = '1'
*     DISPLAY_CANCEL_BUTTON       = 'X'
*     USERDEFINED_F1_HELP         = ' '
*     START_COLUMN                = 25
*     START_ROW                   = 6
*     POPUP_TYPE                  =
*     IV_QUICKINFO_BUTTON_1       = ' '
*     IV_QUICKINFO_BUTTON_2       = ' '
   IMPORTING
     ANSWER                       = GV_ANS
*   TABLES
*     PARAMETER                   =
   EXCEPTIONS
     TEXT_NOT_FOUND              = 1
     OTHERS                      = 2.
  IF SY-SUBRC <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " CONFIRM_UPLOAD
*&---------------------------------------------------------------------*
*&      Form  ORGANIZE_UPLOADED_DATA
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM ORGANIZE_UPLOADED_DATA .
  DATA:  LV_ROW_CNT  TYPE  I.
  CLEAR: LV_ROW_CNT.
  SORT  IT_FILE_UPLOAD  BY  ROW
                            COL.
  LOOP  AT  IT_FILE_UPLOAD.
    CASE  IT_FILE_UPLOAD-COL.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     Create Material (Initial Screen).
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  1.
                WA_TABDATA-MATNR        =  IT_FILE_UPLOAD-VALUE.
      WHEN  2.
                WA_TABDATA-MBRSH        =  IT_FILE_UPLOAD-VALUE.
      WHEN  3.
                WA_TABDATA-MTART        =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     Organizational Levels.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  4.
                WA_TABDATA-WERKS        =  IT_FILE_UPLOAD-VALUE.
      WHEN  5.
                WA_TABDATA-LGORT        =  IT_FILE_UPLOAD-VALUE.
      WHEN  6.
                WA_TABDATA-VKORG        =  IT_FILE_UPLOAD-VALUE.
      WHEN  7.
                WA_TABDATA-VTWEG        =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     Sales Org. 1 : Tax Classification.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  8.
                WA_TABDATA-TAXKM1       =  IT_FILE_UPLOAD-VALUE.
      WHEN  9.
                WA_TABDATA-TAXKM2       =  IT_FILE_UPLOAD-VALUE.
      WHEN  10.
                WA_TABDATA-TAXKM3       =  IT_FILE_UPLOAD-VALUE.
      WHEN  11.
                WA_TABDATA-TAXKM4       =  IT_FILE_UPLOAD-VALUE.
      WHEN  12.
                WA_TABDATA-TAXKM5       =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     Additional Data - UoM.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  13.
                WA_TABDATA-UMREN1       =  IT_FILE_UPLOAD-VALUE.
      WHEN  14.
                WA_TABDATA-MEINH1       =  IT_FILE_UPLOAD-VALUE.
      WHEN  15.
                WA_TABDATA-UMREZ1       =  IT_FILE_UPLOAD-VALUE.
*     ...........................................................
      WHEN  16.
                WA_TABDATA-UMREN2       =  IT_FILE_UPLOAD-VALUE.
      WHEN  17.
                WA_TABDATA-MEINH2       =  IT_FILE_UPLOAD-VALUE.
      WHEN  18.
                WA_TABDATA-UMREZ2       =  IT_FILE_UPLOAD-VALUE.
*     ...........................................................
      WHEN  19.
                WA_TABDATA-UMREN3       =  IT_FILE_UPLOAD-VALUE.
      WHEN  20.
                WA_TABDATA-MEINH3       =  IT_FILE_UPLOAD-VALUE.
      WHEN  21.
                WA_TABDATA-UMREZ3       =  IT_FILE_UPLOAD-VALUE.
*     ...........................................................
      WHEN  22.
                WA_TABDATA-UMREN4       =  IT_FILE_UPLOAD-VALUE.
      WHEN  23.
                WA_TABDATA-MEINH4       =  IT_FILE_UPLOAD-VALUE.
      WHEN  24.
                WA_TABDATA-UMREZ4       =  IT_FILE_UPLOAD-VALUE.
*     ...........................................................
      WHEN  25.
                WA_TABDATA-UMREN5       =  IT_FILE_UPLOAD-VALUE.
      WHEN  26.
                WA_TABDATA-MEINH5       =  IT_FILE_UPLOAD-VALUE.
      WHEN  27.
                WA_TABDATA-UMREZ5       =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     Sales Org. 1
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  28.
                WA_TABDATA-VRKME        =  IT_FILE_UPLOAD-VALUE.
      WHEN  29.
                WA_TABDATA-DWERK        =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     Sales Org. 2
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  30.
                WA_TABDATA-VERSG        =  IT_FILE_UPLOAD-VALUE.
      WHEN  31.
                WA_TABDATA-KTGRM        =  IT_FILE_UPLOAD-VALUE.
      WHEN  32.
                WA_TABDATA-MTPOS        =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     General/Plant.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  33.
                WA_TABDATA-BRGEW        =  IT_FILE_UPLOAD-VALUE.
      WHEN  34.
                WA_TABDATA-NTGEW        =  IT_FILE_UPLOAD-VALUE.
      WHEN  35.
                WA_TABDATA-MTVFP        =  IT_FILE_UPLOAD-VALUE.
      WHEN  36.
                WA_TABDATA-TRAGR        =  IT_FILE_UPLOAD-VALUE.
      WHEN  37.
                WA_TABDATA-LADGR        =  IT_FILE_UPLOAD-VALUE.
      WHEN  38.
                WA_TABDATA-PRCTR        =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     Foreign Trade Export.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  39.
                WA_TABDATA-HERKL       =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     Purchasing.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  40.
                WA_TABDATA-BSTME       =  IT_FILE_UPLOAD-VALUE.
      WHEN  41.
                WA_TABDATA-KAUTB       =  IT_FILE_UPLOAD-VALUE.
      WHEN  42.
                WA_TABDATA-XCHPF       =  IT_FILE_UPLOAD-VALUE.
      WHEN  43.
                WA_TABDATA-EKGRP       =  IT_FILE_UPLOAD-VALUE.
      WHEN  44.
                WA_TABDATA-WEBAZ       =  IT_FILE_UPLOAD-VALUE.
      WHEN  45.
                WA_TABDATA-EKWSL       =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     Purch.Order Text.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  46.
                WA_TABDATA-PTEXT       =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     MRP 1
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  47.
                WA_TABDATA-DISGR       =  IT_FILE_UPLOAD-VALUE.
      WHEN  48.
                WA_TABDATA-DISMM       =  IT_FILE_UPLOAD-VALUE.
      WHEN  49.
                WA_TABDATA-MINBE       =  IT_FILE_UPLOAD-VALUE.
      WHEN  50.
                WA_TABDATA-DISPO       =  IT_FILE_UPLOAD-VALUE.
      WHEN  51.
                WA_TABDATA-DISLS       =  IT_FILE_UPLOAD-VALUE.
      WHEN  52.
                WA_TABDATA-BSTFE       =  IT_FILE_UPLOAD-VALUE.
      WHEN  53.
                WA_TABDATA-BSTMI       =  IT_FILE_UPLOAD-VALUE.
      WHEN  54.
                WA_TABDATA-BSTMA       =  IT_FILE_UPLOAD-VALUE.
      WHEN  55.
                WA_TABDATA-AUSSS       =  IT_FILE_UPLOAD-VALUE.
      WHEN  56.
                WA_TABDATA-BSTRF       =  IT_FILE_UPLOAD-VALUE.
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*     MRP 2
*     :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      WHEN  57.
                WA_TABDATA-BESKZ       =  IT_FILE_UPLOAD-VALUE.
      WHEN  58.
                WA_TABDATA-SOBSL       =  IT_FILE_UPLOAD-VALUE.
      WHEN  59.
         &nbs

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值