Materials Planner filed in PR

Hi
in screen layout at document level field selection group NBB filed selection "Reference data, item"  Materials  Planner "FAUTX" field mark as required field. still this field is not showing in ME51N  create PR screen. some more setting is required. please gudie
regards
AR

Hi,
If you want the feild material planner in ME51N, then goto-SPRO-Materials Management-Purchasing-Purchase Requisition-Define Screen Layout at Document Level-SELECT THE FIELD ME51N -Reference data, item-Make the field materials planner as requried entry--
Now try to create a new PR-------the materials planner field will appear in PR....
hope this may help yuo...

Similar Messages

  • BDC for MM01

    Hi all.
    I need BDC code for MM01,i need to populate values depending upon "Material type",Because view changing depending upon material type.
    please give me code for that.
    To be reward all helpfull answers.
    Regards.
    jay

    Hi,
    This is a BDC for MM for T-code MM01.I hope this will help u.
    Below is the coding.
    Reward if helpful.
    Regards,
    Seevangi
    REPORT  ZMMBDC_MATERIAL_MASTER_UPD
    LINE-SIZE 255 NO STANDARD PAGE HEADING LINE-COUNT 65.
    Tables
    Structure declaration
    Work Variables and internal tables
    Constants
    Parameters
    Events: Start-Of-Selection
    data : begin of i_mara occurs 0,
            matnr like mara-matnr,
           end of i_mara.
    data : begin of ty_matdata,
            matnr like mara-matnr,   "material number
            mbrsh like rmmg1-mbrsh,  "Industry sector
            mtart like rmmg1-mtart,  "Material Type
            werks like rmmg1-werks,  "Plant
            lgort like rmmg1-lgort,  "Storage Location
            vkorg like rmmg1-vkorg,  "Sales Organization
            vtweg like rmmg1-vtweg,  "Distribution Channel
            maktx like makt-maktx,   "Material Description (Short Text)
            meins like mara-meins,   "Base Unit of Measure
            matkl like mara-matkl,   "Material Group
            bismt like mara-bismt,   "Old material number
            spart like mara-spart,   "Division
            brgew(15) ," like mara-brgew,   "Gross Weight
            ntgew(15), " like mara-ntgew,   "Net Weight
            ekgrp like marc-ekgrp,   "Purchasing Group
            gewei like mara-gewei,   "Weight Unit
            klart like rmclf-klart,  "Class Type
            taxkm like MG03STEUER-TAXKM, "Tax classification material
            ladgr like marc-ladgr,   "Loading Group
            tragr like mara-tragr,   "Transportation Group
            dismm like marc-dismm, "MRP Type
            dispo like marc-dispo, "MRP Controller (Materials Planner)
            fhori like marc-fhori, "Scheduling margin key
            disls like marc-disls, " lot size
            prmod like mpop-prmod, "Forecast model
            peran(3)," like mpop-peran,   "Number of historical periods
            anzpr(3)," like mpop-anzpr,   "Number of forecast periods
            kzini like mpop-kzini,   "Initialization indicator
            siggr(9)," like mpop-siggr,   "Tracking limit
            autru like marc-autru,   "Reset Forecast Model Automatically
            modav like mpop-modav,   "Model selection procedure
            perkz like marc-perkz, "Period Indicator
            verpr(13), " like mbew-verpr, "Moving Average Price/Periodic Unit Price
            prctr like marc-prctr, "Profit Center
            mtvfp like marc-mtvfp, "Checking Group for Availability Check
            bklas like mbew-bklas, "Valuation Class
            vprsv like mbew-vprsv, "Price control indicator
            stprs(13) ," like mbew-stprs, "Standard price
            peinh(5) ,"like mbew-peinh, "Price Unit
           end of ty_matdata,
           begin of ty_matdata1,
           matnr like mara-matnr,   "material number
            mbrsh like rmmg1-mbrsh,  "Industry sector
            mtart like rmmg1-mtart,  "Material Type
            werks like rmmg1-werks,  "Plant
            lgort like rmmg1-lgort,  "Storage Location
            vkorg like rmmg1-vkorg,  "Sales Organization
            vtweg like rmmg1-vtweg,  "Distribution Channel
            maktx like makt-maktx,   "Material Description (Short Text)
            meins like mara-meins,   "Base Unit of Measure
            matkl like mara-matkl,   "Material Group
            bismt like mara-bismt,   "Old material number
            spart like mara-spart,   "Division
            brgew(15) ," like mara-brgew,   "Gross Weight
            ntgew(15), " like mara-ntgew,   "Net Weight
            ekgrp like marc-ekgrp,   "Purchasing Group
            gewei like mara-gewei,   "Weight Unit
            klart like rmclf-klart,  "Class Type
            taxkm like MG03STEUER-TAXKM, "Tax classification material
            ladgr like marc-ladgr,   "Loading Group
            tragr like mara-tragr,   "Transportation Group
            dismm like marc-dismm, "MRP Type
            dispo like marc-dispo, "MRP Controller (Materials Planner)
            fhori like marc-fhori, "Scheduling margin key
            prmod like mpop-prmod, "Forecast model
            peran(3)," like mpop-peran,   "Number of historical periods
            anzpr(3)," like mpop-anzpr,   "Number of forecast periods
            kzini like mpop-kzini,   "Initialization indicator
            siggr(9)," like mpop-siggr,   "Tracking limit
            autru like marc-autru,   "Reset Forecast Model Automatically
            modav like mpop-modav,   "Model selection procedure
            perkz like marc-perkz, "Period Indicator
            verpr(13), " like mbew-verpr, "Moving Average Price/Periodic Unit Price
            prctr like marc-prctr, "Profit Center
            mtvfp like marc-mtvfp, "Checking Group for Availability Check
            bklas like mbew-bklas, "Valuation Class
            vprsv like mbew-vprsv, "Price control indicator
            stprs(13) ," like mbew-stprs, "Standard price
            peinh(5) ,"like mbew-peinh, "Price Unit
            message like bapiret2-message, "Error Message.
           end of ty_matdata1,
           begin of ty_error,
             matnr like mara-matnr,
             mbrsh like rmmg1-mbrsh,  "Industry sector
             mtart like rmmg1-mtart,  "Material Type
             werks like rmmg1-werks,  "Plant
             message like bapiret2-message,
           end of ty_error.
          Data                     Begin with W_                        *
    data : i_matdata like standard table of ty_matdata with header line.
    BAPIMATHEAD - Header Segment with Control Information
    data : i_headdata like bapimathead occurs 0 with header line.
    bapi_makt - Material Descriptions.
    data : i_bapi_makt like bapi_makt occurs 0 with header line.
    *bapi_mlan - Tax data
    data : i_bapi_mlan like bapi_mlan occurs 0 with header line.
    bapi_mara - Material Data at Client Level.
    data : i_clientdata like bapi_mara occurs 0 with header line.
    bapi_marax - Checkbox Structure for BAPI_MARA.
    data : i_clientdatax like bapi_marax occurs 0 with header line.
    bapi_marc - Material Data at Plant Level.
    data : i_plantdata like bapi_marc occurs 0 with header line.
    bapi_marcx - Checkbox Structure for BAPI_MARA.
    data : i_plantdatax like bapi_marcx occurs 0 with header line.
    BAPI_MARD - Material Data at Storage Location Level.
    data : i_storagelocationdata like bapi_mard occurs 0 with header line.
    bapi_mardx - Checkbox Structure for BAPI_MARD
    data : i_storagelocationdatax like bapi_mardx occurs 0 with header line.
    *bapi_mpop - Forecast Parameters
    data : i_forcastingparameter like BAPI_MPOP occurs 0 with header line.
    *bapi_mpopx - Checkbox Structure for BAPI_MPOP
    data : i_forcastingparameterx like BAPI_MPOPX occurs 0 with header line.
    *bapi_mbew - Valuation Data
    data : i_valuationdata like BAPI_MBEW occurs 0 with header line.
    *bapi_mbewx - Checkbox Structure for BAPI_MBEW
    data : i_valuationdatax like BAPI_MBEWX occurs 0 with header line.
    *bapi_mvke - Sales Data
    data : i_salesdata like BAPI_MVKE occurs 0 with header line.
    *bapi_mvkex - Checkbox Structure for BAPI_MVKE
    data : i_salesdatax like BAPI_MVKEX occurs 0 with header line.
    bapiret2 - Return parameter
    data : i_return like bapiret2 occurs 0 with header line.
    Errors displayed on screen.
    data : i_error like standard table of ty_error with header line.
    *Error data to be loaded after correction.
    data : i_matdata1 like standard table of ty_matdata1 with header line.
    *bapi_marm - Unit of measure
    data : i_bapi_marm like bapi_marm occurs 0 with header line.
    *bapi_marmx - unit of measurex
    data : i_bapi_marmx like bapi_marmx occurs 0 with header line.
    To determine error.
    data : w_flg(1).
       S E L E C T I O N     S C R E E N / P A R A M E T E R S
    selection-screen: begin of block b1 with frame.
    parameters: p_file like rlgrap-filename obligatory.
    selection-screen: end of block b1.
    selection-screen skip 1.
    selection-screen: begin of block b2 with frame.
    parameters: p_file1 like rlgrap-filename .
    selection-screen: end of block b2.
              A T   S E L E C T I O N   S C R E E N
    at selection-screen on value-request for p_file.
    WS_FILENAME_GET - Determination of a file name on the presentation
    server using a file selection dialog.
      call function 'WS_FILENAME_GET'
    exporting
       def_filename           = '*.TXT'
       def_path               = 'C:\'
       mask                   = ',.TXT,.*.'
       mode                   = 'O'
      TITLE                  = ' '
       importing
         filename               = p_file
      RC                     =
    exceptions
       inv_winsys             = 1
       no_batch               = 2
       selection_cancel       = 3
       selection_error        = 4
       others                 = 5
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
                      T O P    O F     P A G E                          *
    top-of-page.
      skip.
      write : /01 'Material Number', 30 'Error Message'.
       S T  A R T   O F   S E L E C T I O N
    start-of-selection.
    perform read_data.
    perform create_material.
    perform display_error.
    *&      Form  read_data
          text
    -->  p1        text
    <--  p2        text
    form read_data.
    Uploads a file from the presentation server into an internal table.
    call function 'WS_UPLOAD'
           exporting
                codepage                = 'IBM'
                filename                = p_file
                filetype                = 'DAT'
           tables
                data_tab                = i_matdata
           exceptions
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                others                  = 10.
      if sy-subrc <> 0.
        write:/ 'File Not Uploaded'.
      endif.
    endform.                    " read_data
    *&      Form  create_material
          text
    -->  p1        text
    <--  p2        text
    form create_material.
    loop at i_matdata.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = i_matdata-matnr
    IMPORTING
       OUTPUT        = i_matdata-matnr.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = i_matdata-prctr
    IMPORTING
       OUTPUT        = i_matdata-prctr
    *select matnr from mara into table i_mara .
    *sort i_mara by matnr descending.
    *read table i_mara index 1.
    *i_mara-matnr = i_mara-matnr + 1.
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
      EXPORTING
        INPUT              =  i_mara-matnr
      IMPORTING
        OUTPUT             =  i_mara-matnr
      EXCEPTIONS
        LENGTH_ERROR       = 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.
    *CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
    EXPORTING
       INPUT              =  i_matdata-matnr
    IMPORTING
       OUTPUT             =  i_matdata-matnr
    EXCEPTIONS
       LENGTH_ERROR       = 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.
    i_headdata-material = i_matdata-matnr.
      i_headdata-material = i_mara-matnr.
      i_headdata-ind_sector = i_matdata-mbrsh.
      i_headdata-matl_type = i_matdata-mtart.
      i_headdata-basic_view = 'X'.
      i_headdata-mrp_view = 'X'.
      i_headdata-storage_view = 'X'.
      i_headdata-SALES_VIEW = 'X'.
      i_headdata-PURCHASE_VIEW = 'X'.
      i_headdata-FORECAST_VIEW = 'X'.
      i_headdata-ACCOUNT_VIEW = 'X'.
      i_headdata-COST_VIEW = 'X'.
      i_headdata-prt_view = 'X'.
      i_headdata-work_sched_view = 'X'.
      i_headdata-quality_view = 'X'.
      append i_headdata.
    clear i_headdata.
      i_bapi_makt-langu     = sy-langu.
      i_bapi_makt-matl_desc = i_matdata-maktx.
      append i_bapi_makt.
    clear i_bapi_makt.
      i_clientdata-matl_group = i_matdata-matkl.
      i_clientdata-old_mat_no = i_matdata-bismt.
      i_clientdata-base_uom = i_matdata-meins.
      i_clientdata-division = i_matdata-spart.
      i_clientdata-UNIT_OF_WT = i_matdata-gewei.
      i_clientdata-TRANS_GRP = i_matdata-tragr.
      i_clientdata-NET_WEIGHT = i_matdata-ntgew.
      append i_clientdata.
    clear i_clientdata.
      i_clientdatax-matl_group = 'X'.
      i_clientdatax-old_mat_no = 'X'.
      i_clientdatax-base_uom = 'X'.
      i_clientdatax-division = 'X'.
      i_clientdatax-UNIT_OF_WT = 'X'.
      i_clientdatax-TRANS_GRP = 'X'.
      i_clientdatax-NET_WEIGHT = 'X'.
      append i_clientdatax.
    clear i_clientdatax.
      i_plantdata-plant = i_matdata-werks.
      i_plantdata-mrp_type = i_matdata-dismm.
      i_plantdata-mrp_ctrler = i_matdata-dispo.
      i_plantdata-availcheck = i_matdata-mtvfp.
      i_plantdata-profit_ctr = i_matdata-prctr.
      i_plantdata-LOADINGGRP = i_matdata-ladgr.
      i_plantdata-PUR_GROUP = i_matdata-ekgrp.
      i_plantdata-AUTO_RESET = i_matdata-autru.
      i_plantdata-PERIOD_IND = i_matdata-perkz.
      i_plantdata-MRP_CTRLER = i_matdata-dispo.
      i_plantdata-SM_KEY = i_matdata-fhori.
      i_plantdata-LOTSIZEKEY = i_matdata-disls.
      append i_plantdata.
    clear i_plantdata.
      i_plantdatax-plant = i_plantdata-plant.
      i_plantdatax-mrp_type = 'X'.
      i_plantdatax-mrp_ctrler = 'X'.
      i_plantdatax-availcheck = 'X' .
      i_plantdatax-profit_ctr = 'X' .
      i_plantdatax-LOADINGGRP = 'X' .
      i_plantdatax-PUR_GROUP = 'X' .
      i_plantdatax-AUTO_RESET = 'X'.
      i_plantdatax-PERIOD_IND = 'X'.
      i_plantdatax-MRP_CTRLER = 'X'.
      i_plantdatax-SM_KEY = 'X'.
      i_plantdatax-LOTSIZEKEY = 'X'.
      append i_plantdatax.
    clear i_plantdatax.
      clear i_forcastingparameter.
      i_forcastingparameter-PLANT = i_matdata-werks.
      i_forcastingparameter-HIST_VALS = i_matdata-peran.
      i_forcastingparameter-FORE_PDS = i_matdata-anzpr.
      i_forcastingparameter-INITIALIZE = i_matdata-kzini.
      i_forcastingparameter-TRACKLIMIT = i_matdata-siggr.
      i_forcastingparameter-MODEL_SP = i_matdata-modav.
      i_forcastingparameter-FORE_MODEL = i_matdata-prmod.
      append i_forcastingparameter.
      clear i_forcastingparameterx.
      i_forcastingparameterx-PLANT = i_matdata-werks.
      i_forcastingparameterx-HIST_VALS = 'X'.
      i_forcastingparameterx-FORE_PDS = 'X'.
      i_forcastingparameterx-INITIALIZE = 'X'.
      i_forcastingparameterx-TRACKLIMIT = 'X'.
      i_forcastingparameterx-MODEL_SP = 'X'.
      i_forcastingparameterx-FORE_MODEL = 'X'.
      append i_forcastingparameterx.
      i_valuationdata-MOVING_PR = i_matdata-verpr.
      i_valuationdata-STD_PRICE = i_matdata-stprs.
      i_valuationdata-PRICE_CTRL = i_matdata-VPRSV.
      i_valuationdata-VAL_CLASS = i_matdata-bklas.
      i_valuationdata-PRICE_UNIT = i_matdata-peinh.
      i_valuationdata-VAL_AREA = i_matdata-werks.
      append i_valuationdata.
      i_valuationdatax-VAL_AREA = i_matdata-werks.
      i_valuationdatax-MOVING_PR = 'X'.
      i_valuationdatax-STD_PRICE = 'X'.
      i_valuationdatax-PRICE_CTRL = 'X'.
      i_valuationdatax-VAL_CLASS = 'X'.
      i_valuationdatax-PRICE_UNIT = 'X'.
      append i_valuationdatax.
      i_salesdata-SALES_ORG = i_matdata-vkorg.
      i_salesdata-DISTR_CHAN = i_matdata-vtweg.
      i_salesdata-DELY_UOM = i_matdata-meins.
      append i_salesdata.
      i_salesdatax-SALES_ORG = i_matdata-vkorg.
      i_salesdatax-DISTR_CHAN = i_matdata-vtweg.
      i_salesdata-DELY_UOM = 'X'.
      append i_salesdatax.
      i_bapi_marm-ALT_UNIT = i_matdata-meins.
      i_bapi_marm-GROSS_WT = i_matdata-brgew.
      append i_bapi_marm.
      i_storagelocationdata-plant = i_plantdatax-plant.
      i_storagelocationdata-stge_loc = i_matdata-lgort.
      append i_storagelocationdata.
    clear i_storagelocationdata.
      i_storagelocationdatax-plant = i_plantdatax-plant.
      i_storagelocationdatax-stge_loc = i_storagelocationdata-stge_loc.
      append i_storagelocationdatax.
    clear i_storagelocationdatax.
    i_bapi_mlan-TAXCLASS_1 = i_matdata-TAXKM.
      append i_bapi_mlan.
    BAPI - BAPI_MATERIAL_SAVEDATA is used to Create and Change Material
    Master Data.
      call function 'BAPI_MATERIAL_SAVEDATA'
        exporting
          headdata                   = i_headdata
          clientdata                 = i_clientdata
          clientdatax                = i_clientdatax
          plantdata                  = i_plantdata
          plantdatax                 = i_plantdatax
          FORECASTPARAMETERS         = i_forcastingparameter
          FORECASTPARAMETERSX        = i_forcastingparameterx
        PLANNINGDATA               =
        PLANNINGDATAX              =
          storagelocationdata        = i_storagelocationdata
          storagelocationdatax       = i_storagelocationdatax
          VALUATIONDATA              = i_valuationdata
          VALUATIONDATAX             = i_valuationdatax
        WAREHOUSENUMBERDATA        =
        WAREHOUSENUMBERDATAX       =
          SALESDATA                  = i_salesdata
          SALESDATAX                 = i_salesdatax
        STORAGETYPEDATA            =
        STORAGETYPEDATAX           =
        FLAG_ONLINE                = ' '
        FLAG_CAD_CALL              = ' '
        importing
          return                     = i_return
        tables
          materialdescription        = i_bapi_makt
          UNITSOFMEASURE             = i_bapi_marm
          UNITSOFMEASUREX            = i_bapi_marmx
        INTERNATIONALARTNOS        =
        MATERIALLONGTEXT           =
         TAXCLASSIFICATIONS         = i_bapi_mlan
        RETURNMESSAGES             =
        PRTDATA                    =
        PRTDATAX                   =
        EXTENSIONIN                =
        EXTENSIONINX               =
    if i_return-type = 'E'.
        i_error-matnr = i_mara-matnr.
        i_error-mbrsh = i_matdata-mbrsh.
        i_error-mtart = i_matdata-mtart.
        i_error-werks = i_matdata-werks.
        i_error-message = i_return-message.
      append i_error.
      clear i_error.
      w_flg = 'X'.
    *else.
    Execute external Commit when using BAPIs
    When you call BAPIs in your program that change data in the R/3
    System afterwards you must call this method to write the changes to *
    the database.
    call function 'BAPI_TRANSACTION_COMMIT'
    exporting
       wait          = 'X'
    importing
       return        = i_return
    endif.
    refresh : i_headdata ,  i_bapi_makt, i_clientdata, i_clientdatax ,
              i_plantdata, i_plantdatax,
              i_storagelocationdata,i_storagelocationdatax,
              i_salesdata , i_salesdatax ,
              i_valuationdata , i_valuationdatax,
              i_bapi_marm,i_bapi_marmx,
              i_bapi_mlan.
    clear : i_headdata ,  i_bapi_makt, i_clientdata, i_clientdatax ,
              i_plantdata, i_plantdatax, i_storagelocationdata,
              i_storagelocationdatax,
              i_valuationdata , i_valuationdatax,
              i_bapi_marm,i_bapi_marmx,
              i_bapi_mlan.
    endloop.
    endform.                    " create_material
    *&      Form  display_error
          text
    -->  p1        text
    <--  p2        text
    form display_error.
    loop at i_error.
    read table i_matdata with key matnr = i_error-matnr.
    if sy-subrc = 0.
        i_matdata1-matnr = i_mara-matnr.
        i_matdata1-mbrsh = i_matdata-mbrsh.
        i_matdata1-mtart = i_matdata-mtart.
        i_matdata1-maktx = i_matdata-maktx.
        i_matdata1-meins = i_matdata-meins.
       i_matdata1-matkl = i_matdata-matkl.
       i_matdata1-bismt = i_matdata-bismt.
       i_matdata1-zeinr = i_matdata-zeinr.
       i_matdata1-spart = i_matdata-spart.
       i_matdata1-werks = i_matdata-werks.
       i_matdata1-dismm = i_matdata-dismm.
       i_matdata1-dispo = i_matdata-dispo.
       i_matdata1-beskz = i_matdata-beskz.
       i_matdata1-sobsl = i_matdata-sobsl.
       i_matdata1-lgpro = i_matdata-lgpro.
       i_matdata1-lgfsb = i_matdata-lgfsb.
       i_matdata1-eprio = i_matdata-eprio.
       i_matdata1-mtvfp = i_matdata-mtvfp.
       i_matdata1-lgort = i_matdata-lgort.
       i_matdata1-lgpbe = i_matdata-lgpbe.
       i_matdata1-prctr = i_matdata-prctr.
       i_matdata1-message = i_error-message.
        append i_matdata1.
        clear i_matdata1.
    endif.
    endloop.
    loop at i_error.
      write :/01 i_error-matnr , 30 i_error-message.
    endloop.
    if i_error is initial.
      write :/01 text-001.
    endif.
    if w_flg = 'X'.
      call function 'WS_DOWNLOAD'
       exporting
        BIN_FILESIZE                  = ' '
         codepage                      = 'IBM'
         filename                      = p_file1
         filetype                      = 'DAT'
        MODE                          = ' '
        WK1_N_FORMAT                  = ' '
        WK1_N_SIZE                    = ' '
        WK1_T_FORMAT                  = ' '
        WK1_T_SIZE                    = ' '
        COL_SELECT                    = ' '
        COL_SELECTMASK                = ' '
        NO_AUTH_CHECK                 = ' '
      IMPORTING
        FILELENGTH                    =
        tables
          data_tab                      = i_error
        FIELDNAMES                    =
       exceptions
         file_open_error               = 1
         file_write_error              = 2
         invalid_filesize              = 3
         invalid_type                  = 4
         no_batch                      = 5
         unknown_error                 = 6
         invalid_table_width           = 7
         gui_refuse_filetransfer       = 8
         customer_error                = 9
         others                        = 10
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endif.
    endform.                    " display_error7

  • Dynamic ALV and internal table.

    Hi all,
    I have a requirement of creating a dynamic field catelog based on input values in selection screen.
    Example:
    1) When I enter date range, say  20/03/2008 to 25/03/2008 I should have 6 columns in the output for each date with column heading as date itself.
    2) For entering values for these date columns, i need to create an dynamic internal table.(values in the column will be some numbers like 10 on 20/03/2008, 15 on 21/03/2008  etc)
    A rough output format would look like this:
    Component |  20/03/2008  |  21/03/2008 | .....      |25/03/2008
    comp1        |    10            |      15         |             |      5
    comp2        |    20            |      10         |             |     10
    Please let me know how can i achieve this...
    Need it very urgently..
    Regards,
    Dhareppa

    Hi Dhareppa,
    Refer the code below. Its almost on the same line as your requirments.
    REPORT  zglo2fr_master_planing_sedul NO STANDARD PAGE HEADING.
              P  R  O  G  R  A  M    H  E  A  D  E  R                   *
                        ArthroCare Corporation                          *
    Program            : ZGLO2FR_MASTER_PLANING_SEDUL                   *
    Author             : Munvar Basha                                   *
    Creation Date      : 11Mar08                                        *
    Release            : SAP ECC 6.0                                    *
    Request            : D01K904032                                     *
    Description        : Master Schedule Planning                       *
    Change log (Revisions)                                              *
    Author     Date     Request    Description                          *
                             P  R  O  G  R  A  M                        *
                           DATA DECLARATION                             *
    **--Structure to hold matrial & plant combination records.
    TYPES : BEGIN OF ty_marc,
              matnr  TYPE matnr,
              werks  TYPE werks_d,
              dispo  TYPE dispo,
              beskz  TYPE beskz,
              mtart  TYPE mtart,
            END OF ty_marc.
    **--structure to hold MRP LIST Data.
    TYPES : BEGIN OF ty_mrp_list,
              matnr TYPE matnr,
              werks TYPE werks_d,
              maktx TYPE maktx,
              meins TYPE meins,
              mtart TYPE mtart,
              week  TYPE kweek,
              mng01 TYPE mng01,
              delkz TYPE delkz,
            END OF ty_mrp_list.
    **--structure to hold no of weeks.
    TYPES: BEGIN OF ty_week,
             week TYPE kweek,
           END OF ty_week.
    **--structure to hold output data.
    TYPES : BEGIN OF ty_final,
              matnr TYPE matnr,
              werks TYPE werks_d,
              maktx TYPE maktx,
              meins TYPE meins,
              mtart TYPE mtart,
              week  TYPE kweek,
              mng01 TYPE mng01,
            END OF ty_final.
    TYPES : BEGIN OF ty_range,
              sign   TYPE sign,
              option TYPE option,
              low    TYPE sy-datum,
              high   TYPE sy-datum,
            END OF ty_range.
              Definitions of Table types.                               *
    TYPES : ty_marctab TYPE STANDARD TABLE OF ty_marc.
               Definitions of Ranges                                    *
    *RANGES ran_delkz FOR mdez-delkz.
    DATA : i_ran_delkz TYPE RANGE OF  mdez-delkz,
           wa_ran_delkz LIKE LINE OF i_ran_delkz,
           wa_date type ty_range.
               Definitions of internal tables.                          *
    data : i_marc      type standard table of ty_marc,
           i_mrp_list  type standard table of ty_mrp_list,
           i_week      type standard table of ty_week,
           i_final     type standard table of ty_final,
           i_mdps      type standard table of mdps,
           i_mdez      type standard table of mdez,
           i_mdsu      type standard table of mdsu.
               Definitions of work areas for internal tables            *
    DATA : wa_marc     TYPE ty_marc,
           wa_mrp_list TYPE ty_mrp_list,
           wa_week     TYPE ty_week,
           wa_final    TYPE ty_final,
           wa_mt61d    TYPE mt61d,
           wa_mdez     TYPE mdez.
               Definitiions of General variables                        *
    DATA : v_matnr TYPE mara-matnr, " Material Number
           v_mtart TYPE mara-mtart, " Material Type
           v_beskz TYPE marc-beskz, " Procurement Type
           v_werks TYPE marc-werks, " Plant
           v_dispo TYPE marc-dispo. " MRP Controller (Materials Planner)
    DATA : v_mng01 TYPE mng01. "Requirement Quantity
    DATA : v_year  TYPE char4,
           v_week  TYPE char2,
           v_ok_code TYPE sy-ucomm.
               Definitiions of Constants                                *
    CONSTANTS : k_slash TYPE c     VALUE '/',
                k_6     TYPE char8 VALUE '6',
                k_x     TYPE c     VALUE 'X'.
               Definitiions of Field Catlog                             *
    DATA : wa_fieldcat        TYPE lvc_s_fcat,
           i_fieldcat         TYPE lvc_t_fcat,
           v_container        TYPE scrfname VALUE 'CONTAINER_OUTPUT',
           v_custom_container TYPE REF TO cl_gui_custom_container,
           v_grid             TYPE REF TO cl_gui_alv_grid,
           i_gp_table           TYPE REF TO data,
           wa_gp_line            TYPE REF TO data.
    FIELD-SYMBOLS: <gt_table>  TYPE STANDARD TABLE,
                   <gwa_table> TYPE ANY,
                   <l_field>   TYPE ANY,
                   <l_matnr>   TYPE ANY,
                   <l_werks>   TYPE ANY,
                   <l_maktx>   TYPE ANY,
                   <l_meins>   TYPE ANY,
                   <l_mtart>   TYPE ANY.
                 DECLERATIONS FOR SELECTION SCREEN                      *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_matnr FOR v_matnr,
                     s_mtart FOR v_mtart NO INTERVALS,
                     s_beskz FOR v_beskz NO INTERVALS NO-EXTENSION,
                     s_werks FOR v_werks NO INTERVALS NO-EXTENSION
                     OBLIGATORY,
                     s_dispo FOR v_dispo,
                     s_date  FOR sy-datum OBLIGATORY.
    PARAMETERS :     p_dattp   TYPE dattp OBLIGATORY DEFAULT '1'.
    SELECTION-SCREEN END OF BLOCK b1.
               INITIALIZATION EVENT                                     *
    INITIALIZATION.
      CALL FUNCTION '/BEV4/PLPS__ADD_MONTH_TO_DATE'
        EXPORTING
          months  = k_6
          olddate = sy-datum
        IMPORTING
          newdate = wa_date-high.
      wa_date-low = sy-datum.
      wa_date-option = 'EQ'.
      wa_date-sign = 'I'.
      APPEND wa_date to s_date.
               SELECTION SCREEN EVENT                                   *
    **--Validation for Material
    AT SELECTION-SCREEN ON s_matnr.
      PERFORM validate_material.
    **--Validation for Plant
    AT SELECTION-SCREEN ON s_werks.
      PERFORM validate_plant.
                AT SELECTION-SCREEN ENENT                               *
    AT SELECTION-SCREEN.
      IF s_matnr IS INITIAL AND s_dispo IS INITIAL.
        MESSAGE text-002 TYPE 'E'.
      ENDIF.
      IF s_date-low LT sy-datum.
        MESSAGE text-003 TYPE 'E'.
      ENDIF.
                           START-OF-SELECTION EVENT                     *
    START-OF-SELECTION.
    **--refreshing the internal tables
      REFRESH : i_marc,
                i_mrp_list,
                i_week,
                i_final,
                i_mdps,
                i_mdez,
                i_mdsu.
    **--clearing the work areas of internal tables.
      CLEAR : wa_marc,
              wa_mrp_list,
              wa_week,
              wa_final,
              wa_mt61d,
              wa_mdez.
    To get all the matrial(s) and plant combination records
      SELECT a~matnr
             a~werks
             a~dispo
             a~beskz
             b~mtart
             INTO TABLE i_marc
             FROM marc AS a INNER JOIN
                  mara AS b
                  ON a~matnr = b~matnr
             WHERE a~werks IN s_werks AND
                   a~matnr IN s_matnr AND
                   a~dispo IN s_dispo AND
                   a~beskz IN s_beskz AND
                   b~mtart IN s_mtart.
      IF sy-subrc <> 0.
        MESSAGE text-005 TYPE 'S'.
        LEAVE LIST-PROCESSING.
      ENDIF.
      SORT i_marc BY matnr werks.
    Ranges to Filter the MRP list only for the following MRP Elements.
    MRP Elements are : BA, BE, FE, LE and PA
      wa_ran_delkz-sign = 'I'.
      wa_ran_delkz-option = 'EQ'.
      wa_ran_delkz-low = 'BA'.
      APPEND wa_ran_delkz TO i_ran_delkz.
      CLEAR wa_ran_delkz-low.
      wa_ran_delkz-low = 'BE'.
      APPEND wa_ran_delkz TO i_ran_delkz.
      CLEAR wa_ran_delkz-low.
      wa_ran_delkz-low = 'FE'.
      APPEND wa_ran_delkz TO i_ran_delkz.
      CLEAR wa_ran_delkz-low.
      wa_ran_delkz-low = 'LE'.
      APPEND wa_ran_delkz TO i_ran_delkz.
      CLEAR wa_ran_delkz-low.
      wa_ran_delkz-low = 'PA'.
      APPEND wa_ran_delkz TO i_ran_delkz.
      CLEAR wa_ran_delkz-low.
      LOOP AT i_marc INTO wa_marc.
        CALL FUNCTION 'MD_MRP_LIST_API'
          EXPORTING
            matnr                    = wa_marc-matnr
            werks                    = wa_marc-werks
            sinfg                    = k_x
            inper                    = p_dattp
          IMPORTING
            e_mt61d                  = wa_mt61d
          TABLES
            mdpsx                    = i_mdps
            mdezx                    = i_mdez
            mdsux                    = i_mdsu
          EXCEPTIONS
            mrp_list_not_found       = 1
            material_plant_not_found = 2
            error                    = 3
            OTHERS                   = 4.
        IF sy-subrc = 0.
          LOOP AT i_mdez INTO wa_mdez WHERE dat00 IN s_date AND
                                            delkz IN i_ran_delkz.
            CALL FUNCTION 'DATE_GET_WEEK'
              EXPORTING
                date         = wa_mdez-dat00
              IMPORTING
                week         = wa_mrp_list-week
              EXCEPTIONS
                date_invalid = 1
                OTHERS       = 2.
            IF sy-subrc = 0.
              wa_mrp_list-matnr = wa_mt61d-matnr.
              wa_mrp_list-werks = wa_mt61d-werks.
              wa_mrp_list-maktx = wa_mt61d-maktx.
              wa_mrp_list-meins = wa_mt61d-meins.
              wa_mrp_list-mtart = wa_mt61d-mtart.
              wa_mrp_list-delkz = wa_mdez-delkz.
              wa_mrp_list-mng01 = wa_mdez-mng01.
              APPEND wa_mrp_list TO i_mrp_list.
              CLEAR : wa_mrp_list,
                      wa_mdez.
            ENDIF.
          ENDLOOP.
        ENDIF.
        CLEAR: wa_marc.
      ENDLOOP.
      IF i_mrp_list IS INITIAL.
        MESSAGE text-006 TYPE 'S'.
        LEAVE LIST-PROCESSING.
      ENDIF.
      CLEAR : v_mng01.
      LOOP AT i_mrp_list INTO wa_mrp_list.
        v_mng01 = v_mng01 + wa_mrp_list-mng01.
        AT END OF week.
          wa_final-matnr = wa_mrp_list-matnr.
          wa_final-werks = wa_mrp_list-werks.
          wa_final-maktx = wa_mrp_list-maktx.
          wa_final-meins = wa_mrp_list-meins.
          wa_final-mtart = wa_mrp_list-mtart.
          wa_final-week  = wa_mrp_list-week.
          wa_final-mng01 = v_mng01.
          wa_week-week =   wa_mrp_list-week.
          APPEND : wa_final TO i_final,
                   wa_week  TO i_week.
          CLEAR : v_mng01,
                  wa_final,
                  wa_week.
        ENDAT.
        CLEAR : wa_mrp_list.
      ENDLOOP.
    **-- Populate the Field catalog
      PERFORM populate_fieldcat.
    **--Create table dynamically
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = i_fieldcat
        IMPORTING
          ep_table        = i_gp_table.
      ASSIGN i_gp_table->* TO <gt_table>.
    **--fill table with final output data
      PERFORM fill_table.
      CALL SCREEN 100.
                              SUB ROUTINES                              *
    *&      Form  validate_material                                        *
          Validating Material Number(s)                                  *
    FORM validate_material .
      TYPES : BEGIN OF l_ty_matnr,
               matnr TYPE matnr,
              END OF l_ty_matnr.
      DATA : l_i_matnr TYPE STANDARD TABLE OF l_ty_matnr.
      SELECT matnr
             FROM mara
             INTO TABLE l_i_matnr
             WHERE matnr IN s_matnr.
      IF sy-subrc <> 0.
        MESSAGE text-004 TYPE 'E'.
      ENDIF.
    ENDFORM.                    " validate_material
    *&      Form  validate_plant                                           *
          Validating Plant Number                                        *
    FORM validate_plant .
      DATA : l_v_werks TYPE werks_d.
      SELECT SINGLE werks
                    FROM t001w
                    INTO l_v_werks
                    WHERE werks = s_werks-low.
      IF sy-subrc <> 0.
        MESSAGE e019(zartc) WITH s_werks-low.
      ENDIF.
    ENDFORM.                    " validate_plant
    *&      Form  populate_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM populate_fieldcat .
      DATA : l_v_colname TYPE char7.
      SORT i_week BY week.
      DELETE ADJACENT DUPLICATES FROM i_week COMPARING week.
      LOOP AT i_week INTO wa_week.
        AT FIRST.
          wa_fieldcat-row_pos     = 0.
          wa_fieldcat-col_pos     = 1.
          wa_fieldcat-fieldname   = 'MATNR'.
          wa_fieldcat-scrtext_l   = text-007.
          wa_fieldcat-scrtext_m   = text-007.
          wa_fieldcat-scrtext_s   = text-007.
          wa_fieldcat-fix_column  = 'X'.
          wa_fieldcat-outputlen   = 18.
          wa_fieldcat-tooltip     = text-007.
          APPEND wa_fieldcat TO i_fieldcat.
          CLEAR wa_fieldcat.
          wa_fieldcat-row_pos     = 0.
          wa_fieldcat-col_pos     = 2.
          wa_fieldcat-fieldname   = 'WERKS'.
          wa_fieldcat-scrtext_l   = text-008.
          wa_fieldcat-scrtext_m   = text-008.
          wa_fieldcat-scrtext_s   = text-008.
          wa_fieldcat-fix_column  = 'X'.
          wa_fieldcat-outputlen   = 4.
          wa_fieldcat-tooltip     = text-008.
          APPEND wa_fieldcat TO i_fieldcat.
          CLEAR wa_fieldcat.
          wa_fieldcat-row_pos     = 0.
          wa_fieldcat-col_pos     = 3.
          wa_fieldcat-fieldname   = 'MAKTX'.
          wa_fieldcat-scrtext_l   = text-009.
          wa_fieldcat-scrtext_m   = text-010.
          wa_fieldcat-scrtext_s   = text-011.
          wa_fieldcat-tooltip     = text-009.
          wa_fieldcat-outputlen   = 40.
          APPEND wa_fieldcat TO i_fieldcat.
          CLEAR wa_fieldcat.
          wa_fieldcat-row_pos     = 0.
          wa_fieldcat-col_pos     = 4.
          wa_fieldcat-fieldname   = 'MEINS'.
          wa_fieldcat-scrtext_l   = text-012.
          wa_fieldcat-scrtext_m   = text-013.
          wa_fieldcat-scrtext_s   = text-014.
          wa_fieldcat-outputlen   = 4.
          wa_fieldcat-tooltip     = text-012.
          APPEND wa_fieldcat TO i_fieldcat.
          CLEAR wa_fieldcat.
          wa_fieldcat-row_pos     = 0.
          wa_fieldcat-col_pos     = 5.
          wa_fieldcat-fieldname   = 'MTART'.
          wa_fieldcat-scrtext_l   = text-015.
          wa_fieldcat-scrtext_m   = text-015.
          wa_fieldcat-scrtext_s   = text-016.
          wa_fieldcat-tooltip     = text-015.
          APPEND wa_fieldcat TO i_fieldcat.
          CLEAR wa_fieldcat.
        ENDAT.
        v_year = wa_week-week+0(4).
        v_week = wa_week-week+4(2).
        CONCATENATE v_week k_slash v_year INTO l_v_colname.
        wa_fieldcat-row_pos     = 0.
        wa_fieldcat-col_pos     = 6 + sy-index.
        wa_fieldcat-fieldname   = wa_week-week.
        wa_fieldcat-quantity    = 'X'.
        wa_fieldcat-outputlen   = 18.
        wa_fieldcat-scrtext_l   = l_v_colname.
        wa_fieldcat-tooltip     = l_v_colname.
        APPEND wa_fieldcat TO i_fieldcat.
        CLEAR : wa_fieldcat,
                l_v_colname,
                wa_week.
      ENDLOOP.
    ENDFORM.                    " populate_fieldcat
    *&      Form  fill_table
          text
    -->  p1        text
    <--  p2        text
    FORM fill_table .
    **--Create Work Area Dynamically
      CREATE DATA wa_gp_line LIKE LINE OF <gt_table>.
      ASSIGN wa_gp_line->* TO <gwa_table>.
      DATA : l_v_col TYPE char25,
             l_v_val TYPE char25.
      LOOP AT i_final INTO wa_final.
        l_v_col = wa_final-week.
        ASSIGN COMPONENT l_v_col OF STRUCTURE <gwa_table>
                                           TO <l_field>.
        IF <l_field> IS ASSIGNED.
          l_v_val = wa_final-mng01.
          CONDENSE l_v_val.
          <l_field> = l_v_val.
          clear : l_v_val,
                  l_v_col.
        ENDIF.
        AT END OF matnr.
         READ TABLE   i_final INTO wa_final WITH KEY matnr = wa_final-matnr
                                                              BINARY SEARCH.
          IF sy-subrc = 0.
            ASSIGN COMPONENT 'MATNR' OF STRUCTURE <gwa_table>
                                             TO <l_matnr>.
            IF <l_matnr> IS ASSIGNED.
              <l_matnr> = wa_final-matnr.
            ENDIF.
            ASSIGN COMPONENT 'WERKS' OF STRUCTURE <gwa_table>
                                             TO <l_werks>.
            IF <l_werks> IS ASSIGNED.
              <l_werks> = wa_final-werks.
            ENDIF.
            ASSIGN COMPONENT 'MAKTX' OF STRUCTURE <gwa_table>
                                             TO <l_maktx>.
            IF <l_maktx> IS ASSIGNED.
              <l_maktx> = wa_final-maktx.
            ENDIF.
            ASSIGN COMPONENT 'MEINS' OF STRUCTURE <gwa_table>
                                             TO <l_meins>.
            IF <l_meins> IS ASSIGNED.
              <l_meins> = wa_final-meins.
            ENDIF.
            ASSIGN COMPONENT 'MTART' OF STRUCTURE <gwa_table>
                                             TO <l_mtart>.
            IF <l_mtart> IS ASSIGNED.
              <l_mtart> = wa_final-mtart.
            ENDIF.
            APPEND <gwa_table> TO <gt_table>.
            CLEAR <gwa_table>.
          ENDIF.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " fill_table
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZMUNNA'.
      SET TITLEBAR 'MRP'.
      IF v_custom_container IS INITIAL.
        CREATE OBJECT v_custom_container
          EXPORTING
            container_name = v_container.
        CREATE OBJECT v_grid
          EXPORTING
            i_parent = v_custom_container.
        CALL METHOD v_grid->set_table_for_first_display
          CHANGING
            it_outtab       = <gt_table>
            it_fieldcatalog = i_fieldcat.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      v_ok_code = sy-ucomm.
      CLEAR sy-ucomm.
      CASE v_ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
          SET SCREEN 000.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  exit_program
          text
    -->  p1        text
    <--  p2        text
    FORM exit_program .
      CALL METHOD v_custom_container->free.
      CALL METHOD cl_gui_cfw=>flush.
    ENDFORM.                    " exit_program
    Reward points if that helps.
    Manish

  • What is missing part check in inventory

    Hi Experts,
    I want to know what is missing part check in inventory ?
    Thanks !

    Hi Dipika,
    A missing part is a stock of material that is already assigned to a goods issue at the time of goods receipt.This means that a current requirement could not be covered from existing stock(shortage or requirement undercoverage situation).As a rule,such a missing part bypasses the warehouse and ,upon receipt ,is forwarded directly to the point at which it is needed.However,this is only possible if the entered and the responsible materials planner are informed of such receipt.
    You must make following settings in customizing for <b><i>Inventory management and physical inventory under Goods Receipt>Set Missing Parts Check</i></b>
    1)<b>Activation of missing part check per plant</b>
    2)<b>Definition of a checking rule</b>
    3)<b>Specification of the details for control of the availability check</b>:To use the missing part check,you must enter a checking horizon for the missing part check.The checking horizon indcates for how many days in the future the system checks whether shortfall quantities exist for the material.Within the checking horizon,an email is sent from inventory management informing the materials planner that there has been a goods receipt for a missing part.
    4)<b>Assignment of checking rule:</b>At transaction level,the missing part check uses the same checking rules as the availability check.However,you have the option of maintaining different checking rules at movement type level.The checking rule of the movement type takes precedence over that of the transaction.Note that an entry for the movement type without an entry for the transaction has no effect.
    5)<b>Specification of the mail receipient(Email user):</b>The system sends the missing part message to materials planner(MRP Controller) responsible for the material.In order for this to happen,a user ID must be assigned to the materials planner
    6)<b>Specifications of missing part expediter</b>:If no user ID assigned to the responsible materials planner,the message is ent to the central missing part expediter responsible for the plant.This person is defined per plant.
    Reward if useful
    Thanks and reagrds
    SHYAM.R

  • Profit Centr Issue

    hi all
    we are working on project based scenarion, planning strtegy 21 (MTO with Project).
    we have following cysle.
    Master data creation.
    Prject builder creation
    sale order creation. linking wbs element with sale order.
    MRP run on Project using tcode : MD51
    Procurement cycle
    SFG materials plann order conversion to production orders.
    raw material issue against reservation number created by system w r t prodcuotn order.
    sfg prodcution order confirmation & GR.
    this is the normal cycle we are using.
    we have number of profit centres & according to sales area we are linking thesse profit centres in Projects & as well as sale order. e. g. 100 to 1000 & also we have a dummy profit centre 9999
    my observation :
    when we issue raw materials against reservation. and when we saw the material document it shows linking of 9999 (dummy profit centr) but when we do the gr for SFG or FG materials it goes to respective profit centre which is link in projects.
    i would like to know why system shows me different profit centres for issue / recieved transaction ? if all materials are link to projects only. is there any configuration done wrongly ? or what ever system shows me is it correct ?
    please advise me.

    HI,
    please check in production order , which profit center is entered. If you didnot maintain profit center in production order, then it will automatically pick dummy profit center.
    Regards,
    Sreekanth

  • PP process question

    hi all
    we are working on project based scenarion, planning strtegy 21 (MTO with Project).
    we have following cysle.
    Master data creation.
    Prject builder creation
    sale order creation. linking wbs element with sale order.
    MRP run on Project using tcode : MD51
    Procurement cycle
    SFG materials plann order conversion to production orders.
    raw material issue against reservation number created by system w r t prodcuotn order.
    sfg prodcution order confirmation & GR.
    this is the normal cycle we are using.
    we have number of profit centres & according to sales area we are linking thesse profit centres in Projects & as well as sale order. e. g. 100 to 1000 & also we have a dummy profit centre 9999
    my observation :
    when we issue raw materials against reservation. and when we saw the material document it shows linking of 9999 (dummy profit centr) but when we do the gr for SFG or FG materials it goes to respective profit centre which is link in projects.
    i would like to know why system shows me different profit centres for issue / recieved transaction ? if all materials are link to projects only. is there any configuration done wrongly ? or what ever system shows me is it correct ?
    please advise me.

    Hello,
    Just check how you transfer materials to project. When BOM is transferred to project,  what kind of reservation system creates? Reservation against WBS or else? In this case i suppose evrything shall reflect on WBS / project profit centers.
    Thank you.
    Regards,
    Umesh

  • Goods movement issue

    hi all
    we are working on project based scenarion, planning strtegy 21 (MTO with Project).
    we have following cysle.
    Master data creation.
    Prject builder creation
    sale order creation. linking wbs element with sale order.
    MRP run on Project using tcode : MD51
    Procurement cycle
    SFG materials plann order conversion to production orders.
    raw material issue against reservation number created by system w r t prodcuotn order.
    sfg prodcution order confirmation & GR.
    this is the normal cycle we are using.
    we have number of profit centres & according to sales area we are linking thesse profit centres in Projects & as well as sale order. e. g. 100 to 1000 & also we have a dummy profit centre 9999
    my observation :
    when we issue raw materials against reservation. and when we saw the material document it shows linking of 9999 (dummy profit centr) but when we do the gr for SFG or FG materials it goes to respective profit centre which is link in projects.
    i would like to know why system shows me different profit centres for issue / recieved transaction ? if all materials are link to projects only. is there any configuration done wrongly ? or what ever system shows me is it correct ?
    please advise me.

    Hi,
    as per your posting the dummy profit center is picked for raw materials.
    please check the material master of that raw material there you may find this profit center assigned.
    in case of the SFG and FG you must have used the WBS and sales order so it might be picking from them.
    please check and revert.
    regards,
    Adwait Bachuwar

  • Planning at client level for raw materials

    HI all,
                 I've several plants under one company code, sometimes same raw materials are used to produce finished products in various plants. Here, we are using central purchasing department to procure the raw materials.
    For instance, in plant 1000, the user from purchase department raises a purchase requisition for ' X ' component to produce the finished product, and same ' X '  component exist in the BOM of finished Product in plant 2000, for which stock exists in plant 2000 and is  a high value component.
    The issue here is the purchase planner in the central purchasing department is not aware of the stock which exists in plant 2000, and raises a purchase order for the requisition generated from plant 1000.i.e If the purchase planner could check the stock in plant 2000, this enables him to generate STO for plant 1000 from plant 2000, which save the inventory costs.
    I would like to know, whether this issue can be mapped in APO.
    Any help, much appreciated.
    Thanks & Regards,

    Hi Rajesh,
                    You can actually just do the whole thing in SNP Heuristics. While Optimizer is capable of giving you better solution, I suggest trying Heuristics first as it is simple and inexpensive compared to Optimizer.
    Here is the suggested solution:
    You have plants 1000, 2000 and 3000 and you  have a DC "DCA" ( your procuring department)
    When there is a requirement at DCA, you want to check the stock in 1000 first than in 2000 and then fianlly in 3000.
    Set your material with procurement type E in plant and F at the DC
    Create transportation lanes between
    DCA-1000 with transportation time say 2 Hrs ( in means of transport)
    DCA-2000 with transportation time say 3 Hrs ( in means of transport)
    DCA-3000 with transportation time say 5 Hrs ( in means of transport)
    When you run SNP location heuristics, the system checks the plant with shortest transportation time and takes 1000, if not found it tries 2000 and finally 3000 to create a stock transfer.
    Please remember that transportation lanes are always one way and APO does not support the flow in opposite direction line 1000 to DC is supported but not DC to 1000. This stock transfer has to be manually created in ECC system.
    Please let me know if I got your scenario right.

  • How to Maintain Default materials for clearing house fee (IS Oil) O3RECH1

    Hi,
    I am an ABAPer. I have come accross one issue in Transaction O3RECH1 (Create CH Settlement/ Transmission).
    I am getting error. as No Material Exist. .. In debugging i came to know that material is empty since there is no data in field FEEMATNR  of table OIRECH_APPL.
    Table OIRECH_APPL --> SSR PC:  Clearing House application data  (IS-Oil SSR).
    In that there is one filed FEEMATNR --> SSR PC: Default materials for clearing house fee.
    Can any one please let me know How to maintain it.
    Answer will be rewarded.

    Interesting requirement. This can be achieved through Search String as suggested by Mr. Shanid.
    Try to find a text in the note to payee line for bank charges for creating a search string.
    For Example. See below note to payee line and assume this line for bank charges.
    16,455,130155,0,5/3 BANKCARD SYS  CH,,5/3 BANKCARD SYS  CHARGBACKS.
    Identify a text which should always come with this line for every EBS file for bank charges. Assume here "BANKCARD".
    Now go to T-code OTPM.
    Click on create
    Srch strg name:  Bank Charges
    Description:     Bank Charges
    Search String: BANKCARD ( Based on this text system will search your not to payee line)
    Once you press enter, you will get mapping details on the left side with target field "BANKCARD". Now remove the BANKCARD from target field and put there cost center which you will post for one house bank. Save the data.
    Now move to second step.
    Click on Search String Use.
    Put your company code,
    House bank(mandatroy in your case).
    Interpretation Algorithm( same as you maintained in OT83 for posting rule with external transaction type).
    Search String: BANKCARD.
    Target Field: Cost Center.
    Save.
    Sorry I am not getting option to attach screenshot in SCN now. Dont know why.
    Let us know if you have any doubts.
    Hi Mr. Shanid,
    Correct me if I am wrong.
    Regards,
    Mohammed

  • In house mfgd. raw materials for a production order- Cost capturing

    Hello Experts,
    The scenario is as below:
    Client wants to manufacture in house some of the raw materials for a production order of sub assembly. These raw materials are made from scrap, with some manhours spent on it. After making them in house, these are handed over to stores for kit preparation.
    The planner wants to create a stock of these materials (without making individual prod. orders since there are many of these). One option is, planner can do the cost centre issue reversal (202 movement). But the raw material cost is also getting captured in it from the material master.
    From costing point of view, the cost of raw material should not be included since it is made from scrap. Only the cost of man hours spent is to be accounted for.
    Please help as to how to map this scenario. For capturing cost of man hours spent, we can include a routing for it in the production order of the sub assembly. But how to eliminate or exclude the material cost. All inputs from your side are appreciated. Thanks in advance
    Regards,
    Chetan.

    Hi Chetan,
    Your scenario has some major issue.
    1. You cannot produce RAW material in SAP.
    2. The cost of material produced inhouse will be different than that of original RAW material.
    3. There will be some cost effect in the final finished product if you consider this inhouse produced material for product costing of finished goods.
    We have similar scenario with my client and here is what I have implemented.
    1. Create a new HALB type part number for the inhouse manufactured RAW material. This will ensure that you assign Routing and BOM to same and can capture the COST for the same.
    2. Creating new material will enure that the product costing for inhouse produced RAW material is done.
    3. You can create single Production order for the same as you only have to capture cost. This depends on your Business scenario.
    4. Once you have inhouse produced raw material, you can create alternate BOM for the FINISHED Material with this new Part number in BOM.
    5. Create Production Version for the two BOM and ask Planner to select the Version 2 if he requires new part number in Production Order. I assume that this case would genrally appear in very small numbers.
    6. Now coming to product costing for final assembly. Since we are going to reuse scrap material to create the new part number, only activity cost and component cost will be used to determine cost. This cost will be less than that of RAW material cost.
    So we always suggest our customer to consider OLD part number to determine the PRODUCT COST of final material. BUT business will have to take a call on this.
    Do let me know if u need any thing else.

  • Discount not applicable on some materials

    I am coming across a scenario where for few material discount should not be given, there are some condition records for discount which applicable for all the materials.
    Please suggest.
    Regards
    Rajesh

    Hi,
    1. In the material master record in Bsaic data 1 there is a filed called as 'material group.' Maintain this field for those materials for whom the discount is applicable. For those materials on which the discount will not be given do not enter any value in this field.
    2. Go to V/03 and create a new condition table and select the field 'material group' along with the previous fields. Save it.
    3. Go to V/07, delete the old condition table and assign the new condition table created in step no. 2. Save it.
    4. Go to VK11, select the particular discount condition type, select the new key combination in which the field material group is also there and maintain the condition record for the material group.
    Now all those materials for which the material group has been maintained , the discount will be given. For the remaining ones, no discount.
    Hope this solves your problem.
    Reward points if solution helps.
    Regards,
    Allabaqsh G. Patil

  • Getting Blend materials from Raw Materials in RMWB transaction technically.

    Hi,
    I am working on a PDM report having requirement for determining all unit and case UPC that contain a chemical represented by a CAS.
    I have a requirement for getting Blends using Raw materials.I am able to find the raw materials from pure substance but not able to get a logic for getting the Blends from this raw materials.
    Is there any Function Module to find the Blends from raw materials or any logic which I can put in my program to find this.If anybody could help me in this.
    Then I have to get the Finished Goods using the Blends.
    And Finally Finished Goods comprised of Finished Goods.
    There is no time to debug the Standard RMWB transaction.
    <removed_by_moderator> .Kindly all PDM-ABAP users please help me on this issue.
    Thanking you in advance.
    Sudip
    Edited by: Juan Reyes on Aug 14, 2009 2:49 PM

    Hi Chetan,
    Your scenario has some major issue.
    1. You cannot produce RAW material in SAP.
    2. The cost of material produced inhouse will be different than that of original RAW material.
    3. There will be some cost effect in the final finished product if you consider this inhouse produced material for product costing of finished goods.
    We have similar scenario with my client and here is what I have implemented.
    1. Create a new HALB type part number for the inhouse manufactured RAW material. This will ensure that you assign Routing and BOM to same and can capture the COST for the same.
    2. Creating new material will enure that the product costing for inhouse produced RAW material is done.
    3. You can create single Production order for the same as you only have to capture cost. This depends on your Business scenario.
    4. Once you have inhouse produced raw material, you can create alternate BOM for the FINISHED Material with this new Part number in BOM.
    5. Create Production Version for the two BOM and ask Planner to select the Version 2 if he requires new part number in Production Order. I assume that this case would genrally appear in very small numbers.
    6. Now coming to product costing for final assembly. Since we are going to reuse scrap material to create the new part number, only activity cost and component cost will be used to determine cost. This cost will be less than that of RAW material cost.
    So we always suggest our customer to consider OLD part number to determine the PRODUCT COST of final material. BUT business will have to take a call on this.
    Do let me know if u need any thing else.

  • ESYU: Planner Workbench Release process가 다른 user로부터 planned orders를 release

    Purpose
    Materials Requirement Planning - Version: 11.5.9 to 12.1
    Information in this document applies to any platform.
    11.5.9 ~ R12 version:
    두 명의 users가 MRP Planner Workbench에서 Release를 위해 records updating을 진행하는 경우, 두 명 중 한명만이 update 후 실제로 release를
    submit 했으나 두 명 user의 모든 records가 release 되어 버린다.
    User1은 자신의 Planned Orders 만을 release 할 수 있고, User2 또한 자신의 저장된 Planned Orders 만을 release 해야 한다.
    STEPS:
    1. User 1이 MRP Planned Workbench로 log
    2. User 1은 특정 planner code를 위한 current planned order recommendations 을 찾는다.
    3. User 2가 MRP Planned Workbench로 log
    4. User 2가 특정 planner code를 위한 current planned order recommendations 을 찾는다.
    5. User1은 All for Release를 선택
    6. User2도 All for Release를 선택
    7. User1은 checking process를 끝낸 후 저장
    8. User2는 아직 checking process를 끝내지 못해 save를 아지 않은 상태로 남아 있다.
    9. User1이 [Release] button을 선택
    10. User1이 [Release] button을 선택시 User1과 User2에 의해 저장되거나 check 된 모든 planned order recommendations이 Work in Process와
    Puchasing modules로 released 되어 버림
    Cause
    이 issue의 원인은 현재 MRP planning의 경우 expected functionality 이다.
    MRP Workbench Release process는 모든 planner에 의해 check 되거나 저장된 모든 planned orders를 항상 release 한다.
    Bug 891669 : Enhancement Request
    PLANNER'S WORKBENCH SHOULD RELEASE ORDERS BASED ON PLANNER NAME NOT BY BATCH
    It is explained that this is current functionality in the following rejected Enhancement Request:
    Bug 891669 : PLANNER'S WORKBENCH SHOULD RELEASE ORDERS BASED ON PLANNER NAME NOT BY BATCH
    Solution
    Solution을 적용하기 위해 아래 steps을 실행:
    1. 모든 planner에 의해 check 되거나 저장된 모든 planned orders가 [Release] button에 의해 항상 release 되는것은 현재 MRP Workbench
    Release process에서는 correct functionality 이다.
    2. ASCP Planning의 경우엔 Planner/User에 의해 Release process가 아래 option에 의해 처리 가능하다.
    -- profile MSC:Released Only By User
    -- Standard MRP에서는 이 option은 사용할 수 없고 고려되지 않는다.
    Reference
    Note 311053.1

  • Create multiple materials from existing material

    Hi folks ,
    i need to create several materials with different names and discription by refering the existing material
    please suggest how i can do that at time ;
    Here is the requirement
    I need to creat the following materials at time by copying the existing material
    only the material description filed should  be different.
    the rest of the fileds in the material should be copied from the existing materil
    mat 1
    mat 2
    mat 3
    mat 20
    existing materials   mat1287
    please let me know the step by step  proceedure to do this
    Thanks,

    MM01
    select your material type and industry.enter the copy from material number
    hit enter.
    select your Views
    hit enter
    enter the organsational units  on the left side for the to be created and on the right side for the copy from.
    hit enter.
    Click additional data button, go to tab material description, maintain the new name.
    go back to main data.
    Page true each and every view.
    If you have sales text and PO text, then correct this text.
    Save.

  • Inventory Planner.

    Hi All,,,
    Please can anyone of you say me the menu path for creating a inventory planner. I am not able to find it out.
    Thanks
    Balaji

    Hello Balaji,
    The menu path is SPRO->Materials Management->Consumption-Based Planning->Master Data->Define Stock Planners.
    Thanks,
    Venu

Maybe you are looking for

  • How to populate the Cover Sheet of a Distributed Form

    I am a newbie to LiveCycle forms and have created my first simple form to manage travel requests within my company.  This is then distributed to employees who fill out their multiple travel requests with associated expected costs and return the form

  • Oracle 11gR1 Installation problem on RH 5.6

    Hi to all, I try to create a new Oracle 11g R1 database using the following script: create database MDO01XXI MAXINSTANCES 1 MAXLOGHISTORY 1752 MAXLOGFILES 8 MAXLOGMEMBERS 2 MAXDATAFILES 666 CHARACTER SET UTF8 NATIONAL CHARACTER SET UTF8 set default S

  • How to define scriptmanager timeout property in custom master page

    I have a custom master page. When you create a custom master page then another page with similar name is automatically created by SharePoint. For e.g. my master page name is mymaster.html so sharepoint created mymaster.master file with it. I want to

  • 11g Tp3 Tutorial execution problems

    I tried creating the 1st JDeveloper targeted Toplink tutorial at http://www.oracle.com/technology/products/ias/toplink/doc/11110/tutorial/index.htm. What are the correct libraries to execute the test? I have TopLink Oracle XML Parser v2 Oracle JDBC *

  • .SWF files in Adobe Connect Training

    Hello, I've successfully created a Captivate project but when I add it to Adobe Connect Training I can only get the .swf to play if I don't include the skin options (playbar). With the playbar all the loads in Adobe Connect is the playbar and no movi