Default SC Plant Company code and Storage location Based on Position

Hi All,
We are on version SRM 7.02.
We are using SAP ECC R/3 EHP7 based system as a back end FI and HR system.
Org structure in SRM is replicated fromm HR system.
We have case of concurrent employment in the HR org structure , which means one USER can be assigned to multiple Positions in an org structure.
We have a user A , who is created in Two different org units say O1 , O2 occupying positions P1 and P2, belonging to company code C1 and C2.
Whenever a SC is created a custom enhancement shows all the user positions to him and he has to choose one from the list of positions.
Now based on the selected position(P1) , i have to default plant(PL1), storage location(SL1) and Company code(C1).
Even after defaulting attributes based on the position, user gets an error "company code C1 is not valid for user"
This error (Message class : /SAPSRM/CLL ; # 135) is thrown from method : /SAPSRM/CL_CH_WD_DODM_SC_I_BD /SAPSRM/IF_CLL_MAPPER~UPDATE
after getting user's Company code using following method.
/sapsrm/cl_pdo_shared_user=>/sapsrm/if_pdo_shared_user~get_company_code
This gets Company code as C2 ; Based on Users Attributes and not based on User Position attributes.
If i overwrite values fetched by this method in Implicit enhancement, then plant(PL1), storage location(SL1) are not getting fetched.
Does anyone have any solution for this problem?
Regards,
Ashish Shah

Hi MURUGESAN !
      Can you give me some information more in Special Procument Configure in plant 2000 like:
          -  Procurement type (maybe F)
          -  Special procurement (Maybe U)
          -  Plant (Maybe 1000).
          - Issuing plant (maybe 2000)
       We will check together.
       Regards,
      Tony

Similar Messages

  • Stock transfer between plants without STO and storage locations

    Hi.
    In case of stock transfer betwen storage locations with one step it is possible to do stock transfer between different stock types. But in Two step it is only possible to do stock transfer from unrestricted to unrestricted.
    In case of Stock transfer between Plants without STO in one and two step stock transfer, it is possible to do stock transfer  from unrestricted to unrestricted.
    Is there any reason for this?

    Hi
    Thanks for your reply. But i could not understand the sentence - But this is not possibles with 2 step procedure. becasue 2 step is recored will be maintained . In 2 step it not possible. Can you please eloborate on this
    Regards,
    Vivek Swarnapuri

  • How to find out the plants and storage location for a given company code

    hi
    How to find out the plants and storage location for a given company code

    Hi
    Check for Assignem,ent of Plant & compnay code in OX18
    & for Combination of Plant & Storage location in OX09
    The total org structure can be viewed in EC01 - Click on Structure  -> navigation
    & Continue, Click on the Compnay code & the wole structure can be viewed
    Thanks & Regards
    Kishore

  • Default Plant and storage location for components in MFBF

    Hi,
    I have 2 plants 1000-procurement plant and 2000- production plant. I am using special procurement key 70( Withdrawal from alternative plant from 1000 to 2000) for components in Plant 2000. The requirements for the components are transferred from 2000 plant to 1000 plant. The 1000 plant run MRP for the dependent requirements and procure the materials and transferred to the production storage location in Plant 2000.The raw materials are purchased in plant 1000 and transferred to Plant 2000 production storage location based on the manual reservations created with movement type 301. This is fine.
    But when I do backflush in MFBF the plant and storage location for the components issue are displayed as plant 1000 which is the procurement plant  and the production storage location in plant 2000-production plant location. In the BOM the production storage location is production storage location of plant 2000. Since we use the special procurement key system defaults the plant as 1000(procurement  plant) insteadd of 2000(production plant). can we make this plant default to the production plant 2000 as default in the MFBF goods issue screen.
    thanks and regards
    Murugesan

    Hi MURUGESAN !
          Can you give me some information more in Special Procument Configure in plant 2000 like:
              -  Procurement type (maybe F)
              -  Special procurement (Maybe U)
              -  Plant (Maybe 1000).
              - Issuing plant (maybe 2000)
           We will check together.
           Regards,
          Tony

  • Determine company code and location (plant) w.r.t., cost center

    Hi,
    How could i determine company code and location based on given cost center. Could anybody please let me know if any table or function module is available to get this.
    Thank you

    Hi,
    As mentioned above im using META_READ_TABLE FM to get company codes from CSKS table of ECC. Below is the code im using:
       DATA:i_opt type STANDARD TABLE OF RFC_DB_OPT, i_fld type STANDARD TABLE OF RFC_DB_FLD,
           i_res type STANDARD TABLE OF TAB512.
    Constants:   c_expr(72) TYPE c VALUE 'KOSTL EQ COST_CTR', c_fld(5) TYPE c VALUE 'BUKRS'.
      w_opt-text = c_expr.
    w_fld-FIELDNAME = c_fld.
    append: w_opt to i_opt,
            w_fld to i_fld.
    data i_control type STANDARD TABLE OF BBP_CONTROL_RECORD.
    **&&--Get Co code from ECC (CSKS table)
    CALL FUNCTION 'META_READ_TABLE'
      EXPORTING
        QUERY_TABLE          = c_table
    *   DELIMITER            = ' '
    *   NO_DATA              = ' '
    *   ROWSKIPS             = '0'
    *   ROWCOUNT             = '0'
        LOGICAL_SYSTEM       = v1_logsys
      TABLES
        OPTIONS              = i_opt
        FIELDS               = i_fld
        DATA                 = i_res
        CONTROL_RECORD       = i_control.
    however it is giving me 'Communication Error' while executing this piece of code. I guess the problem here is with table i_opt which is holding logical expression. while calling this fm system is not recognizing logical expression 'KOSTL EQ COST_CTR'. Could anybody has any suggestion for this. please advise.
    Rgds

  • How to get automatic plant and shipping point and storage location

    hi,
    sap gurus,
    how to get automatic plant and shipping point and storage location automatically into the sales order
    i have done all the config settings for that
    but its not appearing automatically.
    regards,
    balaji.t

    Hi
    Balaji...
    U can get the plant in sales order,  by doing the default the same in customer master or in  material master. In customer master -- sales are data--shipping tab delivering plant there u can assign and get the same in order for that customer. it is better to do in customer master rather than in material master.
    Shipping point is getting determine in sales order and u can not make it default like plant. Shipping point is determine in the basis of Shipping condition of customer ( ship to party)+ loading group of material + Deliverying plant there u have to assing the shipping point and it will flow in the sales order. Tcode OVL2
    For S loc u have to enter manually in the sales order u can not get it automatically.
    Hope this will help you.
    Thx.

  • PO creation-ME21n-Why SAP does not check company code and Plant relation

    Hi All,
    Does someone know, why SAP does not check Plant and company code relation at the time of PO creation or how can we put validation between plant and company code at the time of PO creation.
    <b>Example:</b> Suppose i have a company 0001 which is assinged to Plant 0001. when i am creating a PO with another company code 0002(Entering at header level-Org, data) and using Plant 0001 at line item level. SAP does not do this validation.
    How can we put this check in place?
    Thanks in advance.
    Deepak

    Hello Deepak,
    There are three types of purchasing
    - Company code specific :You need to assign company code to Pur organization
    - Plant specific : You must assign plant to pur organization
    - Cross company purchasing: No assignment between company code and pur organization.
    In the case 3, the system will not check company code and plant relationship, but it will check plant and pur organization specific.
    The following is the copy of sap help text:
    You can assign a purchasing organization to one company code. This is company-specific purchasing.
    You can assign a purchasing organization to no company code. This purchasing organization can then procure for all plants assigned to it, irrespective of the company code to which the plant belongs.
    Since each plant must be assigned to a company code, the company code can be determined via the plant in each procurement transaction, even if the procuring purchasing organization is not assigned to a company code.
    A purchasing organization must be assigned to one or more plants. This is plant-specific purchasing.
    Now, check your company-code and purchase organization assignment.
    Hope this helps.
    Regards
    Arif Mansuri

  • Plant and Storage Location determination at Item level during Copy control

    Hello Freinds,
    We are experiencing issues within Sales Order creation when the line item is referencing a contract. The plant and storage location is being determined from the contract - this should not be done, we have an enhancement in place for sales order plant/storage location determination which is how these values should be determined.
    Kindly suggest, if it can be achieved through configuration setting at Copy control level, to avoid the Plant and Storage location determination from Contract in to Sales Order.
    Thanks,
    Anup Bansal

    Hello
    You can mention the additional logic of redetermining Plant and storage location whenever copied from contract.
    In a sale order, i think you are maintaining a enhancement in prog MV45AFZB & user exit userexit_source_determination.
    YOu can maintain the coding at same place.
    thank you
    Anirudh

  • Where can I find the relation between company code and plant?

    where can I find the relation between company code and plant?
    I need to the list of plants under a company code.
    Which table?

    yes,wayne weng   .What you said is right.
    Thank you very much!
    My MSN:[email protected]

  • Function Module to get Company code and Plant on the basis of infotype and pernr

    Hi Experts,
    I need to know the function module which will return company code and plant based on infotype and pernr(employee Number).
    Thanks,
    Salil Bagchi

    I think thats the only way
    CALL FUNCTION 'CU_READ_RGDIR'
        EXPORTING
          persnr          = p0001-pernr
        TABLES
          in_rgdir        = it_rgdir
        EXCEPTIONS
          no_record_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.
    check whether "Pay date for payroll result" with in Start Date and
                  End date, and "Reason for Off-Cycle Payroll" is initial
      LOOP AT it_rgdir WHERE paydt >= v_begda
                             AND paydt <= v_endda AND
                             void IS INITIAL
                             AND ocrsn IS INITIAL
                             AND srtza = 'A'.
        v_seqnr = it_rgdir-seqnr.
    ENDLOOP.
    Hope this helps.
    Thanks
    Kiran

  • During MRP run unwanted plant and storage location include and exclude

    Hi There,
    During MRP run how to include and exclude the unwanted plant and storage location pls let me know the required configuration settings.
    Thanks in advance.

    HI,
    To control whether a particular storage location will be included or excluded from the MRP run.  (MD02/MD41).
    To exclude it from MRP run :-
    OMIR - Define storage location MRP per plant
    Put the MRP ind. as.         1 - storage location stock excluded for MRP
    To include it from MRP run:-
    OMIR - Define storage location MRP per plant
    Put the MRP ind. as.      space - storage location stock also planned at plant level and save it
    Next go to transaction MM01 - tick only view MRP 2
    Key in Plant and Storage Location
    Look at the Storage Location MRP section
    change the SLoc MRP indicator to space  and save it
    MMD1 - Create MRP Profile - MRP profile is a useful entry aid and makes it easier to manage MRP data.
    You define which fields are filled with values when MRP data is entered in the material master record, which of these values can be overwritten and which not.   You use the information stored in a profile is standard information that is needed again and again in similar constellations when material master records are maintained.
    Regards
    KK

  • Which table contains both company code and Plant

    HI,
    Which table contains both company code and Plant?
    which table contains Purchase requisition number and Company code?
    Please help me.

    plant and company code <b>marc</b>
    MANDT     MANDT     CLNT     3     0     Client
    MATNR     MATNR     CHAR     18     0     Material Number
    WERKS     WERKS_D     CHAR     4     0     Plant
    Purchase requisition number and Company code in <b>ekpo</b>
    MANDT     MANDT     CLNT     3     0     Client
    BANFN     BANFN     CHAR     10     0     Purchase requisition number
    reward fi usefull

  • Material transfers between plants and storage locations report

    Hello experts.
    I´m looking for some help.
    Actually i am looking for a report that show information about material transfers between plants and storage locations. Is there any report that shows the source of the material (plant, storage location) and also shows the target (plant, storage location).
    Thanks for your help.

    Hi,
    Though you may not get report for the same , but you can narrow down the check by using the table MSEG or MB51 using the moment types like 311 643 (sd delivery moments )which are for stock transfers .
    or if you want storage location stock many reports are available like MMBE, or MB53 etc.
    Regards

  • Unable to set plant and storage location in Batch as required/mandatory

    Hi Experts,
    I am having a problem regarding field controls.
    I would like to make plant and storage location as mandatory/required in MSC1N,MSC2N,MSC3N and MSC4N.
    I have follow the path below
    SPRO-logistics-general-batch management-bath master-field selection batch master-assign field to field groups
    What i can see is field groups are being assigned to field name.
    My question is, where do we go to to set the field group?
    Thanks in advance!

    Hi Dex,
    You have gone to the right location.
    On 'change view field control for batch master record' against each transaction like MSC1, MSC2,MSC3 and MSC4 there are number of dots '............'.
    Double click on each dot against the transaction you want to modify. Each dot corresponds to different fields. Over here you can specify wheter you want to make the field required, optional etc.
    Hope this helps.
    Tarang

  • Creating material in multiple plants and storage locations

    Hi Gurus,
    I am wondering if someone could help me out in this issue,
    I frequently get 1's and 2 materials creation requirement , is there any simple way , while creating material in MM01 , I could create/extend to all plants and storage locations.
    I know we can use LSMW , but this is not bulk requirement,it is frequent but in 1or 2 nos.
    Any help highly appriciated and rewared.
    Thanks.

    Hi,
    To my knowledge I doubt if both MM17 & MM50 can meet your need, as MM17 is to mass change the values already existing in the MMR, while MM50 is to extend the views in a given plant & not to extend across plants.
    A suggestion would be to use the BAPI's -
    BAPI_MATERIAL_SAVEDATA         Create and Change Material Master Data
    BAPI_MATERIAL_SAVEREPLICA      BAPI for Mass Maintenance of Material Data
    Give your requirement to your abaper & inform him / her to use the above BAPI's. I am sure your abaper can write a simple & user friendly program to meet your exact need.
    Regards,
    Vivek

Maybe you are looking for