How to make cost assignment mandatory while SC creation

While creating a SC for account assigned situation,system does not stop even if i do not enter cost center.Any ways we can restrict this.In ECC we have kept this option open for some GLs but in SRM we need to make it mandatory
Please suggest!
BM

Hi,
You can do this in BBP_DOC_CHECK_BADI.
Sample code :
      read table i_e_account into wa2_i_e_account
                             with key p_guid = wa_i_e_item-guid.
      if wa2_i_e_account-acc_cat ne 'NET'.
        if wa2_i_e_account-cost_ctr is initial.
          wa_message-msgty      = 'E'.
          wa_message-msgno      = sy-msgno.
          msg1                  = 'Cost center should not be blank'.
          wa_message-message    = msg1.
          wa_message-item_guid  = wa_i_e_item-guid.
          append wa_message TO et_messages.
          clear wa_message.
        endif.
      endif.
Hope this will help.
Thanks
Venkatesh P

Similar Messages

  • How to make UOM as mandatory while creating PR in ME51N

    Hi all,
    While creating PR, UOM is not populated automatically. The PR also created without entering UOM.
    So, here UOM is optional. how to make this UOM as mandatory while creating PR in ME51N?
    Thanks
    pabi

    Hi Pabitra
    Go to SPRO>Materials Management>Purchasing>Purchase Requisition>Define Document Types ( CHECK which type of field selection is assigned to your PR Document type)
    and then go to
    Go to SPRO>Materials Management>Purchasing>Purchase Requisition>Define Screen Layout at Document Level>select that field selction here eg NBB  then go to details, then double click Quantity and Price ( Filed selection group) there make filed label Unit of measure as Required quantity
    and then  slect the filed selection ME51N and do the same settings as above.
    Cheers
    Kris

  • How to do the cost assignement mandatory in  infotype 0014

    Hi everybody,
    does any of you know how to do the cost assignment mandatory in infotype 0014?
    We have use the feature COBLT  and table T588N for Function Module RP_TIME_COBL_002, and now the field COBL-AUFNR is mandatory, but we need the cost assignment to be mandatory, I mean should be impossible to save a new record without cost assignement. Is is possible using standard functionality or I have to use the user exit in PAI?
    Thanks in advance.
    Cristóbal.

    Hi,
    Instead of user exit, do as below.
    Go to Table using SM30->V_T588M. Give module pool name as MP001400.
    Now check your correct variable key for the feature & click on the corresponding Alternative Screen for e.g. 2010 & now go that field & mark that field as required field by choosing the second radio button.
    Hope this will solve your problem.
    Thanks,
    Sarika.

  • How to make a field Mandatory in a Table view?

    How to make a field Mandatory in a Table view?
    The requirement is, the user should not be able to append a new Row, unless and untill he enteres the data in the column SOLD-TO. Now how do i acheive making this field madatory. Normally in Edit form view, we can go in customizing and flag Mandatory, for table view we don't have this option.
    Please can anyone of you guide me in this approach?
    Jagadish.G

    Hi Jagadish,
    have a look in this thread, part of the code you can use in eh_insert method or logic to write enable/disable insert button.
    Re: Assignment Block Mandatory
    regards
    Ismail
    Edited by: Ismail Shaik on Oct 21, 2009 11:36 AM

  • How to make reason code compulsory while processing F-53

    Hi Boss,
    Can u plz. tell me How to make reason code compulsory while processing F-53. this is because I have defined differnet reason code and one is having blank text.
    Thanks
    S

    hi,
    Just check this one dont check previous one....
    goto TCODE OBC4 and then click on ur company FELD status variant and double click on field status group ....
    Then click on G067 RECONCILTION ACCOUNTS and then double clickn that in that and then click on payment transactions and then select REASON CODE AS REQUIRED.
    ur problem will solve...
    if useful assign points
    regards,
    santosh kumar

  • How to make characteristic as Mandatory

    Dear All,
    In Batch Management, for a class, how to make particular characteristics as a "Required Entry".
    In class, I can see "Required Entry" check box, but it is greyed out. How to make it as Mandatory.
    Because, we have maintained "LOBM_HSDAT" characteristic for a class.
    But while doing MIGO and MB1C, it is not asking to Manufacturing date.
    Please let me know how to make it as mandatory field in a Class.
    Regards,
    Mullairaja

    Not sure this would help you but you can try,
    In t.code CT04, enter the characteristic LOBM_HSDAT and click on change button. Go to basic data tab. Check the box required entry, which you can find on the right hand side and then save. Test again. You must also test in t.code MSC1N apart from MIGO.
    MullaiRaja, I must take a step back. The above solution proposed will not hold good for MIGO. To force the user to enter the manufacturing date/expiry date, then in material master ->Plant data/Stor.1 view, maintain the settings for min.shelf life, total shelf life and Period indicator for SLED. If these data are maintained, then when the user does MIGO and if there is no batch master already maintained, then the system will force the user to enter the manufacturing or expiry date.
    Regards,
    Edited by: Shiva Ram on Jan 5, 2011 11:27 AM

  • How to make a filed mandatory of an editable ALV

    Hi Guru,
    Pls tell me how to make a filed mandatory of an editable ALV so that while a new records is inserted the mandatory fields are filled.

    hi,
    You can make fields as mandatory fields using data changed event.
    validate the entered or blank entries of a column in data changed event and call method 'add_protocol_entry' to raise errors.
    Check the program : BCALV_EDIT_03 & BCALV_EDIT_04for more details.
    Refer to this link....
    about field in alv
    obligatory field editable in ALV

  • How to make a field mandatory in billing

    How to make a field mandatory in billing document,if m right with the help of incomplition log but how.....
         plz reply the full configuration.

    Hi Mohan,
    We normally create a billing document with reference any other document say Order or delivery.
    so, all the necessary information in the invoice will be taken from preceeding doucments. Thats way in the order level we check for incompletion log. If any important data is missing in the order level then the succeding documents will not be created.
    Thats way in the billing documents all the necessary information will come automatically either from preceeding documents or from master data.
    Still you want to make any field mandatory, you can do these by modifieing Billing documents user exists,you can make which ever the fields are mandatory and to be checked before saving. so when you are going to save the invoice, it will check if these fields are maintained or not.
    Hope this is clear.
    Reward if helpful.
    Thanks,
    Praveen

  • How to make all fields mandatory in sales order T- code VA01 initial screen

    Dear all,
    how to make all fields mandatory in sales order T- code VA01 initial screen itself
    The fields are
    Sales Organization
    Distribution Channel
    Division
    Sales Office
    Sales Group
    Regards,
    Amar Reddy

    Hi,
    You can use Transaction Variant to achieve this functionality.Please go through the following link which helps you in creating the same.
    [Link|http://wiki.sdn.sap.com/wiki/display/Snippets/TransactionVariant-AStepbyStepGuidefor+Creation]
    Regards,
    Phani Prasad

  • How to make Business place mandatory

    Hi, SAP Gurus,
    How to make business place mandatory in "MIRO ". As i know there are two ways
    1) Through Screen Variant T/code: SHD0
    2) Validation
    But here  i Never worked on sreen variant level and validation, I need step by step to make business place mandatory in MIRO
    bY USING ABOVE T/CODES,
    Regards,
    Prabhakar

    Hi Bhanu,
    Use T.Code GGB0 - Validation maintenance - Change Validation overview.
    Choose Financial Accounting in Application area. Select Line Item and click Validation create icon.
    Give a Validation ID BP and text Business Place Mandatory and save.
    Click Step icon - Step 01 - now the prerequisites; check and message will come in margin panel.
    Give text for the step 01. Click Prerequisites. You can see the Table Fields  Structure BKPF, BSEG, and SYST.
    If you double click on this you view individual fields relating to these master tables.
    Your prerequisite may be like this :
    Company Code is = XYZ ; T.Code = MIRO & F-43; Posting key = 31 ( Credit Vendor)
    Double click BKPF > double click  BKPF-BUKRS>  click "=" >  click constant > a pop up box will open
    here fill up your company Code XYZ.  This will automatically come in the top box.  Click "AND". Now  there is a back arrow
    button in the table field panel and come back to the original display of master tables.  Here double click SYST
    Click SYST-TCODE > click "=" > click Constant > in the pop up box enter tcode MIRO. If you want to add F-43,
    you have to click "AND" after this and repeate SYST-TCODE = F-43. Now click back arrow and double click BSEG and
    click BSEG-BSCHL > Click "=" > Click Constant > in the popup window enter 31 and save the prerequisites.
    (For the above requisites, the system will check if  Business Place is 1000 is filled up during transaction and if not it has to
    give a error message.)
    Now Click Check in the right margin below prerequisites menu. Again the table list will be seen with BKPF, BSEG and SYST
    Double click BSEG > click BSEG-BUPLA > Click "=" > Click constant and in the pop up box fill the business place 1000 and save
    the check menu.
    In the right margin now double click message.  Here you can create a message text of your own "Business Place mandatory"
    Save the Message and come back and finally save the Validation so created.
    Now use T.Code OB28 and enter your Company Code > give call point 2 > and Activation level 1 and save the entries.
    Now you can check for the transaction in MIRO where without filling the Business Place field you cannot save the entries.
    Hope the above steps will be clear for you.  If you have any doubt please revert back.
    Best Regards,
    Sadashivan

  • How to make relationship block mandatory?

    Hi,
    Please let me know how to make relationship block mandatory to create a business partner?
    Vinay

    Hi Vinay,
    Did you try to set the flag mandatory in the configuration of the relationship view for a field (e.g. relationship).
    Just go to the view in the component workbench, select your configuration, mark a field and go to Show Field Properties.
    Hope this helps.
    Regards, Thea

  • How to make a checkbox mandatory

    Hello,
    I created  a checkbox where I want the user to check that they have read and acknowledged a privacy statement.
    I am curious how I make the checkbox mandatory, as I dont see an option in the Object Pallete.
    Thanks in advance!
    Nik

    Write the following line code on initialize event of the CheckBox to make it mandatory.
    this.mandatory = 'error'
    Nith

  • Make Project Assignment Mandatory

    Tx /TMWFLOW/CMSCONF
    Double clicking the node for my dev system to make project assignment mandatory and getting this message:
    System cancel RFC destination <sid>_TRUSTED, Call TMW_CHANGE_PROJECT_SETTING: Screen output without connection to user.
    RFC destination is fine, all users have sap_all.
    any ideas?

    Please check SMT1 and check for the RFC. Provide authorization S_RFCACL, not included in SAP_ALL
    Rajeev

  • How to make the assignment of a AW variable perminent(Java API+DMLcommands)

    hi,
    i want to modify the analytical workspace.
    i called the dml commmands from java AW api.
    the program is working fine.but i can not see the result.
    i assigned a AW variable with some data by useing DML command
    but after closing the program i unable to get the assigned value from the variable
    i checked by using AW WORK SHEET.
    any one can help me how to make that assignment perminent
    my code is like this
    AWconnection.executeCommand("v_variable=value");

    Hi,
    I have just rephrased the question to make it clear.
    I am working with Jdeveloper and BI beans. We are using Java Analytical workspace API for connecting and saving the user input as Analytical workspace Variable (which will be later used for running the AW Programs). The part of the code looks like below.
    awConn.executeCommand("V_NII_SIM=50");
    awConn.executeCommand("update");
    awConn.executeCommand("commit");
    Despite doing the UPDATE and COMMIT to the analytic workspace, the change is not getting appplied to the AW. i.e After the execution of this program, when I checked the value of the variable V_NII_SIM in the OLAP worksheet (of AWM), then it is not reflecting the new value (50).
    OLAP> show V_NII_SIM
    100.0
    The above command in OLAP worksheet returns the old value of 100 but not the one set by my program.
    Would appreciate your help on this.

  • How to make the screen dim while music is playing

    I can't get the screen to dim while playing music on my iPod Nano.  It used to be that the screen dimmed while music was playing until it lit up when I hit a button to change volume, track, etc.  This preserved the battery life.  It seems that I inadvertantly changed some setting just a few days ago because I saw the apple logo appear on the screen and since then have not been able to figure out how to make the screen dim while playing music.  I think the fact that the screen is staying on while I'm listening now is making the battery out very quickly.  Does anyone know how to solve this problem?  Thank you!

    Hello ZingMA,
    You need to reset the backlight timer.
    Go to settings, general, and backlight. You should be able to set if from there. I am assuming you have a 6th gen nano. If you have a different model the user manuals have the steps. Found here:
    iPod nanos
    Hope this helps.
    ~Julian

Maybe you are looking for