Help Desk - make fields mandatory and sub catagories

Is there a way to make fields mandatory (not in the portal) but on the ticket?
Also, when creating custom attributes, is there a way to make a 'sub attribute' show up based on another attribute?
thanks!
This topic first appeared in the Spiceworks Community

Hello Alex,
To add a message, you can modify the EH_ONSAVE method of the controller class.
For a sample code, please see below.
I hope this helps.
Kind regards,
Kristoff.
data: lv_entity         TYPE REF TO cl_crm_bol_entity,
        lv_coll             TYPE REF TO if_bol_entity_col,
        lv_current        TYPE REF TO if_bol_bo_property_access,
        lv_country          TYPE string,
Address Data
*navigate down to Address
    try.
      lv_coll = lv_entity->get_related_entities(
               iv_relation_name = 'BuilStandardAddressRel' ).
      lv_current = lv_coll->get_current( ).
      catch CX_CRM_GENIL_MODEL_ERROR.
    endtry.
    if lv_current is not bound.
      return.
    endif.
    lv_entity ?= lv_current.
    lv_country = lv_entity->IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY_AS_STRING( 'COUNTRY' ).
    IF lv_country IS INITIAL.
          lv_msgsrv->add_message( iv_msg_type = 'E' iv_msg_id = 'Z_CRM_IC' iv_msg_number = '001' ).
          lv_input_nok = 'X'.
    ENDIF.

Similar Messages

  • Making a UI field mandatory and error out on save if no entry made

    Hi Experts,
       I have a requirement to make a UI field mandatory and not allowing the opportunity to save if the field has no entry selected out of a DDLB. I marked the field mandatory in the config page and it displays an error message if it is left unentered but still allows to save , ie even with the error message u can save the opportunity.
      How can I get this to work and not allow save if the field is entered?
    I tried putting a check in the DO_FINISH_INPUT and DO_VALIDATE_INPUT but didnt work........ please help

    Arpita,
    This is a standard program bug with opportunity screen. Fix it by applying SAP Note 1353553 - Opportunity: Behavior of mandatory fields in Web UI

  • How to make fields mandatory in cost center

    Hi Sap Experts,
    How to make fields mandatory in cost center.
    Please give me advise.
    Regards,
    Raj

    If you want to make "Profit Center" field as mandatory, then OBA5 transaction code
    Application Area - KS
    Number 096
    make this as error for online and batch input. Then profit center will become mandatory.

  • How to make Fields mandatory in service entry sheet

    Dear Experts,
    I need to make  "Quality of Service" and "Service Timeliness" fields mandatory for user entry  in VENDOR EVALN tab during Service Entry Sheet.
    Kindly help..

    Check the note attached to the configuration node.
    + for required (mandatory) field
    . for optional field
    - for hide
    for display
    Double click on the line showing ...+++...
    It will open up a list of fields grouped logically and you now have a radiobutton style way of changing status.

  • Make field mandatory through coding

    Hi experts,
    I would like to know if there is a way to make a field mandatory through coding.
    I have a field that should become mandatory based on the content of another field.
    Any idea on how i can achieve that ?
    Thanks for your help.
    Regards.
    Aw

    Hi,
    You could implement the DO_HANDLE_EVENT to check if you have value in the first field and based on that make second field as mandatory.
    data: lv_wrapper type ref to cl_bsp_wd_collection_wrapper,
    lv_order type ref to cl_crm_bol_entity,
    lv_value1 type string,
    lv_value2 type string,
    lv_msgsrv type ref to cl_bsp_wd_message_service.
    lv_wrapper = typed_context->[contex_node]->get_collection_wrapper( ).
    lv_order ?= lv_wrapper->get_current( ).
    * Check for required values
    check lv_order is bound.
    lv_value1 = lv_bp->get_property_as_string( iv_attr_name = '[first_field]' ).
    if lv_value1 is not initial.
    lv_value2 = lv_bp->get_property_as_string( iv_attr_name = '[second_field]' ).
    if lv_value2 is not initial.
    lv_msgsrv = cl_bsp_wd_message_service=>get_instance( ).
    lv_msgsrv->add_message( iv_msg_type = 'E'
    iv_msg_id = '[you_message_class]'
    iv_msg_number = 'your_msg_no'
    iv_msg_level = '1' ).
    endif.
    Hope this helps!
    Cheers
    Ajay

  • Make field mandatory thru SPRO

    Hi All,
             I wanna make a field mandatory in tcode J1IS . field name is STRTYP (Sub Tran type). I think we can do it thru SPRO. can u tell how i do it.
    Regards
    Jitendra

    Hi,
    Create a customizting Switch in SPRO, that is create a customizing table with fields KEY VALUES and then make this aviaalbe for customizing in SPRO.
    Like below
    KEY      VALUE
    FILED1  X
    Then in your program check the value of this customizing table entry.
    And make the filed mandatory/optional based on this value.
    Regards,
    Sesh

  • LEAD MANAGEMENT- how to make fields mandatory

    Is there a provision in lead management to make the fields mandatory so that lead number is not generated without filling the mandatory fields/ as it is in business partnerm using field groupings in customizing (eg. without submitting address proof BP number is not generated)

    Hi
    I dont know Kai's solution but it could be good.
    If you want to deal with badi you can use its method CHECK_BEFORE_SAVE, and in it
    if some fields are not filled you can write: RAISE do_not_save.
    Document won't be saved then.
    I checked in my system, and guid is generated (perhaps it is just generated by special FM, but you can not find it
    in any of tables like crmd_orderadm_h or crmd_order_index).
    So in my opinion just guid is generated but not saved in database, until this BADI allows to save.
    Regards
    Radek

  • Profit center field mandatory and error in OKB9

    Hello everyone,
    I have a question on Profit center. My user wants to see a message that profit center is mandatory at the time of GL posting and also add a profit center at the time of GL posting.
    What I tried was in OKB9 added cost element (GL), assigned category 3 for 'Profit center mandatory' but when I assigned a profit center it gave me a message that 'cost element needs to be a revenue element  (Note - cost element is assigned category 11)  to assign profit center so  I left that. and only used category 3 with cost element and company code.
    My question is
    1) Why is it giving me this error in OKB9, when I assign cost element.
    2) How can I make Profit center field mandatory for the client and he can add his own Profit center

    HI,
    In OKB9 for profit center assingment it can be only Revenue elements. For those expenses item it can be cost elemtn with category 1.
    It can be possible make it as mandatory fiile  in field status variant for respective GL accounts and also document type you can make profit center is mandatory in that FSV.
    Revert for clarification.
    S.Subbiah.

  • Make field mandatory conditionally ?

    I have two items
    a select list
    a date field
    if i select Yes in the select list
    i need to make the date field mandatory
    else
    make optional
    how can i do that ?

    See Region 3 at http://htmldb.oracle.com/pls/otn/f?p=24317:91
    If Yes is selected from that dropdown list, the mandatory indicator (red star) is shown otherwise it is hidden.
    Steps:
    1. Choose a Optional Label template for the Date Picker item
    2. Put the following in the Label field for the Date Picker item
    Date< span id="redstar" style="display:none;color:red">*< /span>3. Put the following in the HTML Form Element attributes of the Select list item
    onchange="RedStar();"4. Put the following in the Region Header for the Region 3
    <script type="text/javascript">
    function RedStar()
    var val=html_SelectValue('P91_SELECT2');
    if (val=='Yes') html_ShowElement('redstar')
    else            html_HideElement('redstar');
    window.onload=RedStar;
    </script>Hope this helps.

  • Make fields mandatory in screen painting

    How to make the fields mandatory in customizing screens?
    I understand that i need to do some changes with fieldseection group.
    but in that screen i am confused what i should actually do.
    can some one guide me.

    Hi,
    Please Follow the Steps Bellow ,
    --> Double Click on the Field you want Obligatory
    --> A window will appear on the right side
    --> In this window you will see a box with heading u2018Attributesu2019
    --> There are Three u2018Tabsu2019
    --> Go to the 2nd tab which is u2018Programu2019
    --> The Label u2018Inputu2019 From the Dropdown menu  You can Select u201CRequiredu201D
    Hope will solve out your problem,
    Kind Regards,
    Faisal

  • How can I help apple make a itunes and app store in my country?

    The lack of an iTunes store and AppStore in my country(Macedonia) is frustrating, as would many other users agree. My question is not why, but how can I help apple achieve this? How can I help create both the iTunes and App store? I believe that many developers in Macedonia are more than willing to become iOS Developers, and there is a lot of music, books and movies to go around too. Please reply with an answer if and how I can help.
    Thank you in Advance

    Launch iTunes.
    Select iTunes Store in the source list on the left.
    Go to the bottom of the window and click the round flag icon.
    Europe > Macedonia
    Same for the Mac App Store.

  • How to make fields mandatory in Message Address for Custom Notification.

    Hi Experts,
    We have created a new custom Notification Type and we were in the process of configuring it. I want to know, if I want to make a few fields obligatory in Message Address, can that be achieved through configurations. I am basically an ABAPer so please pardon my ignorance if the question looks basic.
    In our implementation, I have seen different Work Orders with different mandatory fields in Message Addresses. I hope the same is achievable for notification as well.
    Thanks for your help.
    Regards,
    Subhrangsu

    There are 2 ways to make any Notification filed mandatory.
    1. Configuration route:
    Here Under Plant Maintenance->Maintenance and Service Processing>Maintenance & Service Notifications>Notification Creation>Notification types> Set Field selection for Notifications:
    You select influencing button and your notification type then select the Radio button under Required column (against the 
    field you want to make mandatory)
    2. User Exit Route: Through SMOD -->User Exit QQMA0014 -->Cutsomer Exit EXIT_SAPMIWO0_020 -->Include ZXQQMU20.
    Then put your code in this include.
    Code Sample:
    IF I_VIQMEL-QMART= 'AC'.
    IF T_VIQMSM-MNGRP IS INITIAL.
    MESSAGE ID 'IW' TYPE 'I' NUMBER 464 WITH 'Tasks'.
    RAISE EXIT_FROM_SAVE.
    ENDIF.
    ENDIF.
    (The above Code makes the 'Tasks' filling mandatory in the Notification type 'AC')
    Hope this answers your query.
    Regards
    Jogeswara Rao
    Edited by: K Jogeswara Rao on Oct 8, 2010 9:21 AM

  • Make Field mandatory on SU01

    Hi
    I want to know, If it is possible to make certain fields on user master record mandatory? For user ID creation I want to make Department and Function field as mandatory??

    Please take note that there is some tricky terminology in this area:
    There is an important difference between a standard transaction variant and a custom transaction variant (these are sometimes also called "variant transactions" which is not the same as a "transaction variant"). Some OSS notes mix the terms as well.
    Creating a new variant assigned to the standard transaction is better in my opinion, as it makes it possible to harden the tcode further without being forced to assign the "core" tcode for the custom transaction variants.
    As described in the note, the super users should have the additional standard access, via the additional custom code.
    This also means that if "normal" users can navigate back and forth (see transaction SU01_NAV) then they always experience the same screen variant.
    Cheers,
    Julius
    Edited by: Julius Bussche on Jul 9, 2009 10:11 PM

  • How to make field mandatory in Sales Order Item level?

    Hi SDN's,
    I need to make Shipping type field(Item level) mandatory in Sales order.
    Can any one tell me what is the user-exit to achieve this?
    Thanks in advance..
    Regards,
    Rahul

    Rahul,
    U can check the BADI     'BADI_SD_SALES_ITEM'
    othewise u can check
    Exit Program MV45AFZZ.
    Check the program SAPMV45A
    V45W0001
    V46H0001

  • How to make field mandatory

    Hi all,
    i want to make price ,tax code and ware house code in purchase order rows mandatory.
    i have designed following Stored procedure..
    IF @transaction_type IN (N'A', N'U') AND
    (@Object_type = N'22')
    BEGIN
    if exists (SELECT T0.docnum FROM [dbo].[OPOR] T0 INNER
    JOIN [dbo].[POR1] T1 ON T1.DOCENTRY =
    T0.docENTRY
    WHERE   T1.[Price] = 0
    and T1.DOCENTRY = @list_of_cols_val_tab_del)
    select @Error = 1, @error_message =
    'Enter Price'
    else
    if exists (SELECT T0.docnum FROM [dbo].[OPOR] T0 INNER
    JOIN [dbo].[POR1] T1 ON T1.DOCENTRY =
    T0.docENTRY
    WHERE    T1.[TaxCode] is  null
    and T1.DOCENTRY = @list_of_cols_val_tab_del)
    begin
    select @Error = 2, @error_message =
    'Enter Tax Code'
    end
    else if exists (SELECT T0.docnum FROM [dbo].[OPOR] T0 INNER
    JOIN [dbo].[POR1] T1 ON T1.DOCENTRY =
    T0.docENTRY
    WHERE    T1.[WhsCode] is  null
    and T1.DOCENTRY = @list_of_cols_val_tab_del)
    begin
    select @Error = 3, @error_message =
    'Enter Warehouse Code'
    end
    END
    but system checks only for price and not for other two validation .
    kindly suggest me way where system will check for all the validation defind in the Stored Procedure.

    Hi Chetan
    Try this, This should definitely work
    if @object_type = '22' and @transaction_type in ('A','U')
    begin
    select @Total = (select T1.Price from OPOR T0 join POR1 T1 on T0.docentry = T1.docentry
    where T0.docentry=cast(@list_of_cols_val_tab_del as int))
    Select @comm = (select T1.TaxCode from OPOR T0 join POR1 T1 on T0.docentry = T1.docentry
    where T0.docentry=cast(@list_of_cols_val_tab_del as int))
    Select @venref = (select T1.TaxCode from OPOR T0 join POR1 T1 on T0.docentry = T1.docentry
    where T0.docentry=cast(@list_of_cols_val_tab_del as int))
    if @Total = 0
    begin
    set @Error =11
    set @Error_Message = 'Cannot have Zero Price'
    end
    else
    if @comm is null
    begin
    set @Error =12
    set @Error_Message = 'Select Tax'
    end
    else
    if @venref is null
    begin
    set @Error =13
    set @Error_Message = 'Select Warehouse'
    end
    end
    Regards
    Reno

Maybe you are looking for

  • Is there a way i can view video streams to my mac on apple tv

    im new to macs but after getting an iphone 4 have got the bug. im struggleing with some of the ways macs work. i want to be able to view content streamed to my laptop on my tv. I have an apple tv box linked to my tv but cant figure out how to view wh

  • Installing Adobe Story Desktop Application

    Trying to install, no luck. Windows 7 64 bit. Air already installed . . . read on a forum to try a browser other than Chrome . . . still would not install. Any suggestions? Thanks!

  • How to model ABAP classes in a correct manner?

    Hi, I'm creating a conceptual design for an ABAP Objects program. The program should collect some data from standard tables like VBAK, VBAP, etc. (SD environment) in one flat structure/table, calculate some characteristic numbers for each dataset and

  • Suggestions for Oracle 10g  Installation using VMware in Windows XP.

    Hi All, I am using Intel(R) Core (TM) 2 Duo CPU P8600 @2.4 Ghz with 1.98 GB RAM with Windows XP with 70 GB disk space. I would like to install a 2 node RAC with ASM and if possible also configure a DG for learning and testing purpose.Please advice if

  • OOPs related Code for BI

    Hi Actually for learning purpose, i was looking for Simple example on OOPs related coding in BI routines. Pls let me know if someone has any sort of doc. Thanks...