Default Value for Order Type based on Company Code  in ME21N

Hi,
     Using ME21N, I want to make the PO type defaulted to a certain company code, say for instance Company code  XYZ should have a PO type XYZ Purchase Order, ..company ABC should have a PO type ABC Purchase Order, and so on...I'm just puzzled how to implement it. I know that we can set a Default value for PO Headers in Personal Settings but its doesnt give the result I want coz it will only have one Default Value. What I wanted is when a certain company code is chosen, automatically, the corresponding PO type for that Company code will be displayed in the Order Type drop-down menu (so there's no need to choose on the drop down list what Order type) Is this possible in ABAP? Hope i made myself clear.
    Thanks in Advance.

Use BADI IF IF_EX_ME_PROCESS_PO_CUST - method OPEN
View the interface documentation in transaction SE19 and you will see the method OPEN can be used :
2. Opening of a purchase order (OPEN method)
The system opens a new document to create, change or display a purchase order. With the OPEN method,
<b>you can import your own data and prepare it for further processing.</b>
This is available in 4.7 Enterprise but not sure how far back.....
hope this helps
Colin.

Similar Messages

  • Defaulting value of Purchasing Group based on Company Code

    Hi All,
    Currently we have two company codes C1 and C2 each have one - one purchasing org(PO1 and PO2) and purchasing group(PG1 and PG2). So Now hierarchy is as below: -
    C1
      PO1
        PG1
    C2
      PO2
        PG2
    Now user of company code C1 can shop for C2 and vice versa but whenever he shops for C1 his Porg and Pgroup should be PO1 and PG1 only and same in the case for C2. Currently on shopping cart screen both company code C1 and C2 are appearing and like wise values of PO1 : PG1 and PO2 : PG2 is appearing in drop down list.
    Now client is asking that whenever he selects C1 as company code PO1 : PG1 should appear as default entry and for C2, PO2 : PG2.
    Can anyone tell me how this can be achieved and which BADI we are suppose to use to implement this solution?
    Thanks
    Siddarth

    Siddarth,
    You shouldn't require a badi, look into the users attributes and extended attributes to see if that is where the extra information is stored.

  • Define Default Values for Doc type..

    Hi All.
    I set a default value of "ME21N" TO "S21" at Define Default Values for Document Type.
    But, default document type is not "S21" but "NB" in ME21N
    ( system ver. 710)
    Let me know how to correct it..
    Thank you in advance.
    regards..
    nam

    Hi,
    Could u please confirm whether have u created the document type
    in
    IMG...>MM.....>Purchasing.....>Purchase order...>Define Document Types.
    if not please do it.
    and then create the pO.
    I think it will work
    Regards
    Aasif

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

  • Set default value for product type

    I want to set default value in product type drop  down box
    in component PRD01QR.
    view  SearchHelp.
    I tried with setter and getter , but not working
    they are using query string.

    Hi,
    You can achieve this by redefining the method GET_VH_PRODUCT_TYPE() in IMPL class of searchHelp view. Just copy paste the implementation of this method from super class and now control the internal table as per your requirement like
    comment out the line       APPEND INITIAL LINE TO lt_ddlb. (line no: 47)
    as it will add an empty line at the starting of internal of product type values which you dont want. In you case there should be some default value for product type field, so arrange the inetrnal table values according to you requirement and what ever value you want to default for product type that should be the first value in the drop down without empty line and add an empty line at the end of the internal table.
    No need to call super->GET_VH_PRODUCT_TYPE() in your implementation as you have written all the required code in your implemenation itself.
    Hope this would help you!
    Regards,
    Ajay

  • How to determine number range for billing document based on company code ..

    Hi Friends!!
    can anybody tell me how to determine number range for billing document based on company code & tax departure country if required??
    Amit...plz help me!!

    Hi Amit,
    1. Define different Billing Document number ranges in  SPRO -> Sales & Dist -> Billing -> Define number ranges for billing docs. (VN01). Make sure that all are internal number ranges.
    e.g.
    NO.  From number To Number    Current number  Ext
    A1   0930000000    0930999999
    A2   0940000000    0940999999
    A3   0950000000    0950999999
    2. Define a Ztable ZNUMB_RANGE as follows
    Comp. Code | Tax departure country | Billing Doc Type | Number Range
    100                IN                               F2                      A1
    200                IN                               F2                      A2
    200                US                              F2                     A3
    3. In user exit RV60AFZZ (USEREXIT_NUMBER_RANGE)
    Read table ZNUMB_RANGE for Number Range with Comp. Code, Tax country and Billing Doc.
    If found pass this number range value to us_range_intern.
    us_range_intern is a standard SAP variable which tells program which number range use to create the current document which is under process.
    Let me know if you are clear.
    Thanks,
    Mandar

  • Set default value for full name based on usename

    I have an LOV which as the full name of the user, for example 'John Smith'.
    I would like to set the value of this LOV to the full name of the user, based on a match with username. So when JSMITH is logged in, I would like the default value of the LOV to be 'John Smith'.
    I have an page process anonymous block which gets the right short username:
    DECLARE
    p7_assigned_to varchar2(20);
    BEGIN
    select person_name into p7_assigned_to
    from ht_people
    where v('APP_USER')=flow_user;
    END;
    How do I then set the default value of the LOV based on the return value of this block?

    Where do you use the LOV? Is it being used in a Select list? If so, you will have a place to enter the default value. Edit the Select list, and you will see a place where you can enter Default value.
    Ravi

  • Default values for data types

    what are default values for all the data types that exist  in abap
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    For CHAR data type default is SPACE
    for INTEGER,PACK and FLOAT types it is ZERO '0'
    for NUMERIC also so many Zeros
    for Time(TIMS) it is 6 zeros and Date(DATS) it is 8 zeros
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • Setting default value for a jcombobox based on the value not the index

    I am trying to set the default value for my combobox to the current year. One way I thought of doing it was to get the index of the value representing the current year and then use setSelectedInex to make it the default. Any ideas?
    The relevent section of code is below.
    GregorianCalendar gregorianCalendar = new GregorianCalendar();
    int year = gregorianCalendar.get(Calendar.YEAR);
    String currentyear = year + "";
    int startyears = 2000;
    int numyears = 25;
    JComboBox endyearcombobox = new JComboBox();
    endyearcombobox.setBorder( BorderFactory.createLineBorder(Color.DARK_GRAY));
    endyearcombobox.setFont(standardfont);
    endyearcombobox.addActionListener( new ActionListener() {
    public void actionPerformed( ActionEvent event ) {
    endyearcombobox = ( JComboBox )event.getSource();
    endyear = endyearcombobox.getSelectedItem();
    boolean same = endyear.equals(oldItem);
    oldItem = endyear;
    String[] endyearlist = new String[numyears];
    for(int i = startyears; i < startyears+numyears; i++){
    String item = new Integer(i).toString();
    endyearcombobox.addItem(item);
    Thanks
    Ged

    Thanks mate,
    That was what I was looking for. I still had a little more manipulation to do, but sent me on the right track and have got it working now. I don't know why I didn't think of it in the first place.
    Ged

  • Need new description for Data Element based on Company Code.

    Hi,
    Requirement: The data element AUFNR which has the description "Order Number" needs to have description as "Engagement Number" for a specific company code. All other company codes to retain the description "Order Number".
    Example: There are three company codes: AAAA, BBBB and CCCC. The company code CCCC wants the description of data element: AUFNR as "Engagement Number" while AAAA and BBBB wants to retain the standard description: "Order Number".
    Pre-Work: Before posting this question, i did search however have not found a solution for this.
    In SAP i tried to create an Implicit Enhancement at:
    Program: RADBTDDF
    Sub Routine: SE_DD04T_ROLLNAME_ROLLNAME
    However, as the program is SAP Basis program, i was not successful.
    Any hints are appreciated and solution is rewarded.
    Thanks for your time.
    With Regards,
    Goutham.

    Dear Matthew,
    Thank you for the reply.
    I am giving some more details into the requirement.
    If a user assigned to company code: CCCC (may not be directly, relationship will be drawn) has logged into the SAP system. If he opens the transaction related to Internal Order, like KO01, KO02, KO03 etc. He should be able to see the description of field: "Order Type" as "Engagement Type".
    Similarly in the next screen the field "Order" needs to be displayed as "Engagement Number".
    However, for users who belong to company codes: AAAA and BBBB the SAP Standard Descriptions will be shown.
    Please let me know if this is possible or any inputs in that direction are highly appreciated.
    Let me know if further details are required.
    Best Regards,
    Goutham.
    P.S: As far as i know, Anees Jawad proposal would work if it is required to change the description at the system level.

  • Multiple default values for Selection type variable

    Hi all,
    I am using Bex 3.5. I have a fundamental doubt while creating a User Entry, Selection Option, Optional type variable.  I am trying to include multiple single variables in the default section, but it accepts only one. Is it possible to add multiple default values to the variable so that they show up in the selection screen when we run the report via Bex Analyzer ?
    Thanks for the inputs !
    Regards
    Snehith.

    Hi,
    In one of my bi7 reports, i remember i have given multiple default values in a single variable. For example i wanted to have multiple material types in my selection screen.
    But i have to check out the type of that user entry variable.
    Hope the above reply was helpful.
    Kind regards,
    Ashutosh singh

  • Default value of order type is taking in COR1

    Dear All,
    I am facing problem while manual creation of process order. Actually I  have created 2 plants say 5999 & 6999 and two order type say kkp1 & kkp2 both are similar but number ranges are different. Allready I have assigned order type to respective plants in order type dependent parameter. My material type is ND. Now I am creating process order of material in plant 5999 with order type kkp1.As i enter this order type changes to kkp2 and giving the error message " order type kkp2 dependent parameter is missing in plant 5999. Whicjh is not required. We create manual process order.
    I do not know why this happening??? Please guide me further on this..
    Thanks & Regards
    Kundan Kumar

    Hi,
    First step in Cost Estimate is Run the cost estimate in Tcode : CK11N by providing the details like Material / Plant / Costiong Variant  and run . System will display the cost of the material.
    Second step is goto Tcode : CK24 and in the selection fields provide the Posting Period / Fiscal Year...
    Compant code / Plant and Material and click the Marking Allowance and execute, system will display the cost details in the new screen. Now come back and Click Release and execute. System will update the proce in material master.
    Hope this will help you.
    regards
    radhak mk

  • Defaulting Business Area  on IT0001 based on Company Code

    All - My company wants this field ( GSBER maintained in Table TGSB) to default on IT0001 based on the Company Code. Is there a way to do this, since I see no table in SAP that links Company Code to Business Area. Additional Requirement is that all non-employees ( EE Groups) will not have a Business Area mapped to their IT0001, instead it should default to "not assigned".
    Can a custome feature be built in this case based on Molga>Company Code>Employee Group or can you experts provide some recommendations.
    Thanks a milion.

    Hi Niti,
    For PBAS0001 enhancement - EXIT_SAPFP50M_001 function - ZXPADU01 include, write a code like the one below:
    IF INNNN=INFTY EQ '0001'.
    DATA: wa_P0001 like P0001.
    CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
    EXPORTING
    PRELP = INNNN
    IMPORTING
    PNNNN = wa_P0001.
    CASE wa_P0001-BUKRS .
    WHEN '0001'.
    wa_P0001-GSBER = 'B001'.
    WHEN '0002'.
    wa_P0001-GSBER = 'B002'.
    ENDCASE.
    CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
    EXPORTING
    PNNNN = wa_P0001
    IMPORTING
    PRELP = INNNN.
    ENDIF.
    Regards,
    Dilek

  • Change default value for no of records in T code KSB1

    Hi,
    I am trying change the default value (no of records) in T code KSB1.
    Is it defaulted progarmatically or through some configuration?
    Any help is appreciated.
    Thanks
    Govind

    Thank you all for immediate reply.
    I know that I can create a variant or change the value by hitting more settings.
    I have also seen in the program and its hard coded there as 5000.
    We need that value to be defulted as 10000.So my question is that can we change via configuration or it can be done only progamatically?
    Thanks
    Govind

  • Get pernr based on company code in logical databse

    Hi,
        When using the get pernr event, all the pernrs that I get are in the ascending order  I want them first grouped based on the company code and then on pernr.
    Any suggestions would be appreciated abd suitably rewarded.
    for ex: get pernr.
               write:/ pernr, bukrs.
             end-of-selection.
    result:   00000099 1001
              00000002 1003
    Regards
    Vick
    Message was edited by:
            vick vennav

    for ex: get pernr.
    write:/ pernr, bukrs.
    end-of-selection.
    result: 00000099 1001
    00000002 1003
    We are sending the payroll information to the 3rd party for pay check purposes, at my client side they have inserted a custom include in the standard program and populating the information in a flat file which needs to be sorted first based on company code and then on pernr. If I try to do it later,the code is becoming a mess, so I want to know is there a way to get pernr using logical database whose order is based on company code.
    Regards

Maybe you are looking for

  • Problems deleteting PCD-objects at level 9

    Hi Recently our PCD-structure have gotten deeper. Our PCD-structure starts with the folder "Portal Content" at level 1. As a result of the structure getting deeper, I am experiencing problems with deleting PCD-objects, iViews or pages, at level 9. Wh

  • PO line Cancelled but line Items Showing in Shipments

    I have cancelled this PO line Cancelled but line Items Showing in Shipments. Still this PO is open for this Line. How to fix this?

  • Mail crashes on launch after Leopard 10.5.2 update

    I upgraded my Al PB G4 1.67 GHz to Leopard last week. I like Leopard's new features, but have had my share of bugs getting all my programs to work. The latest hiccup is with Mail. Mail (the new version that was installed with Leopard), had been worki

  • DST Issues Remain

    Post Author: fbozek CA Forum: Deployment I have a cluster with 2 app servers and 2 web servers. All 4 have been upgrasded with the MS patches. The 2 app servers have the ESDT Patch 15 for BOXI loaded. But my scheduled jobs are still starting 1 hour l

  • What to enter in dropdown for eBook vendor? [was:Vixy143]

    This is all new to me, what do I put in the drop down on the Adobe Digital Editions to authorise my computer where it asksfor  eBook vendor ?