Company code and plant should get defaulted from PO Document Type

Dear All,
           We have three company codes 1000 ,1010 ,1020 .We have three purchase document types.NB,NB1,NB2.My requirement is if the user selects document type NB system should automatically take company 1000 and plant 1000 .Same is the requirement for other 2 documents . Is there any settings from which we can achieve company code ,plant getting defaulted according to document type ?
Thanks & Regards
Abhijit Das

Dear,
Ask your Abaper to write code in GUIXT scripts....
There if you select particular document type then by default in PO it will popup your plant and company code.
The above mentioned functionality we do not have in our current projetc, but related tho this we have done it by using the same scripts.
Try def it will work.
Regards
Utsav

Similar Messages

  • 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

  • Assignment of Purchase Organization with Company Code and Plant

    Please give me solution to Assign Purchase Organization with Company Code and Plant. While creating a material in organization level plant and purchase organization should be assigned.
    Please help me out.
    Thanks

    Hi,
    I am not sure if i have really understood your query.
    Material creation means creating master data, as far as creation and assignment of organization elements with other organizational elements are concern for eg : purchase org in you case is part of standard configuration.
    You create Purchase org using t-code OX08 here you copy from and existing one and then chane the description of Pur org as per your requirement.
    You assign Purchase Org using t-code OX01 to company code assignment, t- codeOX17 for plant assignment to Purchase Org.
    Normally you do all your changes in Devlopment server save the changes in an transport request then move it to quality and production enviornment.
    Hope this helps.
    BR

  • 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

  • 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]

  • 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

  • Creating order with out Company code and plant - just for pricing -possible

    Hi gurus
    Just for creating sales order (let us say no delivery and no billing, client was not intrested in the initial setup) for just pricing thing, does we really need Company code and plant. with out that just with sales org setup(sale org+D.C) can I create an order to full fil the pricing scenario.
    Please I need help on this
    Thanks
    Kris

    hi kris,
            we cannot create a order with out company code and plant , due to the following reasons
          we do not require the company code to create the order , but we require the plant to create a material and use it in the sales order .and we require a company code to create a customer .
    the pricing procedure is determined depending upon the sales area(sales org+distribution channel +division).
    please reward the points if it is helpful
    Regards,
    Murali

  • 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

  • Excise rate and value is not getting defaulted from the purchase order

    Hi all,
    While capturing excise invoice , the excise rate and value is not getting defaulted from the purchase order and in Excise Item Tab BED,AED,ECS is Zero at both header as well as item level for only one material in STO process and if we are doing same process taking other material all things are coming perfectly and We are maintaining condition with respect to vendor,plant and material combination.Any input related to this will be helpfull and rewarded.
    Regards
    Vishal

    Hi,
    Follow STO Process for this;
    1.Create a vendor for the company code of receiving plant, using account group: 0007 using T-Code XK01.
    2. Assign this vendor to Delivering plant
    Go to XK02 >Purchasing view>Extras>Add. Purchasing data>Plant
    3. Create internal customer with the sales area of the vendor. Go To XD01
    4. In pricing procedure determination relevant to STO, assign document Pricing Procedure and customer pricing procedure appropriate for STO to get the pricing in the invoice.
    5. Maintain condition records for the relevant pricing condition.
    6. Some more setting for STO: Go to MM> Purchasing > Purchase Order > Set up STO > define shipping data for plants > Go to Receiving plant >assign customer here & Supplying SA (for billing) to Receiving plant here
    7. Go to MM > Purchasing > Purchase Order > Set up STO > define shipping data for plants > Go to Supplying plant and assign the sales area of receiving plant.
    8. Go to MM > Purchasing > Purchase Order > Set up STO > assign delivery Type & Checking rule
    Assign the delivery type to document type. In this case, Delivery type NLCC is assigned to Document type NB
    9. Go to MM> Purchasing > Purchase Order > Set up STO > Assign document Type, One step Procedure, Under delivery tolerance
    Assign the document type NB to supplying plant and receiving plant
    10. After all settings, Create the STO using T-Code: ME21N and maintain pricing conditions of freight and Save.
    11. In supplying plant Maintain condition record in sales using VK11 the same will flow in receiving plant when referring the OBD no during MIGO.
    10. Create Delivery: VL10G
    12. Picking, PGI: VL02N
    13. Billing: VF01
    Save the document and its done
    14. J1IIN - Outgoing Excise Invoice
    15. MIGO - Goods Receipt against outbound Delivery
    16. J1IEX - Capture & Post Excise Invoice
    Rgs

  • To get the company code and country grouping attached to a position

    Hi everyone,
    I have a position and I need to get the company code and the country grouping that this position is attached to. Could you kindly suggest an FM or a class which would fetch the above data keeping in mind the inheritance tree. That is, if the company code is not maintained in HRP1008, then it should look for the same in the Org Unit that this position belongs to and so on..
    Any help will be greatly appreciated.
    Regards,
    Alpana.

    Hi
    Check the A011 relationship of the position and get the cost center, from cost center you can get the company code and country grouping from Cost Center Master CSKS.
    ~~~Ganesh Kumar K.

  • Position to inherit company code and cost centre from Org Unit

    Hi Team,
    I have entered the company code and controlling area in my root Org. Unit.  All the sub-ordinate org units that I've created have inherited this company code and controlling area, however none of the positions I've created have inherited them.  What do I have to do to get my positions to inherit this information from their org unit.
    Regards,
    Jeanette

    Hi,
    Check table T7SS0, there are three switches
    PPOM     INHIC     X     'X': PPOM: Obligatory Inheritance of Company Code
    PPOM      INHIH     X     'X': PPOM: Obligatory Inheritance of Contr. Area
    PPOM     INHS     X     Inheritance of acc. ***. features by positions
    So just check these switches that they are set in this table, and I hope your problem should resolve
    Regards,
    guds

  • How to get new company code and controlling area in SRM

    Hi SDN,
    we are on SRM 5.0.
    Our finacial experts want to implement a new company code and controlling area.
    In SRM I can set up a new company code easily in ppoma_bbp and import a new plant from backend for the new company code.
    When testing in EBP I get the error: "company code xyz not available in controlling area zzz"
    So I need to import the new backend controlling area, too. How can I get the second controlling area in SRM?
    Thanx for help,
    matthias

    Hi Muthuraman Govi  and Sanjeev,
    in fact I can see in backend in transaction KS03 (show cost center) there in the F4s, which comp.code + controll area combinations are valid and have indeed cost centers assigned.
    So I have a new valid comp.code and a new valid cont.area.
    The new comp.code belongs to the new contr. area.
    In SRM I set the BUK attribute as described by Sanjeev (I had that already done). Still, if it is like you say, why do I get an error in EBP when trying to buy products from the new plant in the new company code...
    Is there any more config.work necessary in backend or SRM?
    kind regards, matthias

  • How to derive Company Code and Vendor Number from CDHDR / CDPOS ?

    Hi everyone,
    This is my first post and my apologies if this is a wrong forum to ask this.
    I'm creating an analytic that will track changes to the vendor master.  I know that I have to look into CDHDR and CDPOS tables and that CDHDR.OBJECTCLAS = KRED.
    However, part of the requirements is to be able to filter the results by Company Code and Vendor Number as well.  How do I do this? How can I link CDHDR to LFA1/LFB1 to get the company code and vendor code?
    Any information will be highly appreciated
    Thanks!

    I think you would have gotten answers sooner in the abap forum :P. Anyways the change pointer tables are kept in a different format, not in the normal flatly structured tables. What this means is that the data which comes through the pointer tables are somewhat encrypted. The object class and id present you records; Each change in master data (where the option is set) is recorded in these pointer tables.
    I believe there is a function module for converting the data into a readable format; that data should have your company code/vendor number in it.  You cannot link the chdr and lfa tables directly- you will need to first convert the data from the pointer tables

  • 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

  • I changed my id. When I want, now, update my apps I'm asked my pwd corresponding to my old id. I forgot this old pwd and can(t get it from apple. It seems the old id doesn(t exist anymore. What should I do?

    I changed my id. When I want, now, update my apps I'm asked my pwd corresponding to my old id. I forgot this old pwd and can(t get it from apple. It seems the old id doesn(t exist anymore. What should I do?
    J'ai changé mon id. Je veux mettre à jour mes appli mais on me demande le pwd de mon ancien id que j'ai oublié. Je ne peux pas le récupérer. Il semblerait que mon ancien id n'existe plus. que dois je faire?

    Did yoo go to Settings>iTunes and App Stores and sign out and sign back in?
    Next see:
    Frequently Asked Questions About Apple ID

Maybe you are looking for

  • Private key

    Hello people, i'm creating a program that needs to generate private keys, i've found out that java has built in libraries that support this so i've tried:                 KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");                

  • Cannot copy A/P Invoice from GRPO

    Hi Expert, In one of the GRPO when I use copy to A/P Invoice, it brings zero in Qty. Where as in other GRPO it works fine. Does anybody has idea, what would have gone wrong ? BR Samir Gandhi

  • HT4623 I tried several times to download iTunes version 6.3.1 but it says safari can't download file. What do I do next?

    Need help installing iTunes version 6.3.1 or higher on my iPhone 4S. It tells me that safari can't open the file.

  • How to change the recipients in workflow?

    I'm not  a workflow expert. Please help me how to change the recipients in workflow. The approver already resigned and we would like to change it to a new approver. We already deactivated the user and I stiil see him in SOST. In some releases, he is

  • Does CS4 have "Find Previous" and "only to end of document"

    Scene1 I'm in TextEdit whipping through a FIND, speeding as usual, and suddenly "Whoa" I missed that one. No problem. Just hit Previous. It's a very useful option. Q1: Is there a similar option hidden somewhere in CS4? Scene 2 I'm searching through a