How To make attachment as mandatory

HI,
I have One requirement to make attachment link as mandatory. I used below code and it is not at all effecting. Pls check below code and suggest.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
OAApplicationModule oam = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("HrSubmit")!= null)
OAMessageAttachmentLinkBean uploadBean = (OAMessageAttachmentLinkBean)webBean.findChildRecursive("AttachmentLink");
String ssdn = (String)uploadBean.getAttributeValue(pageContext.getRenderingContext(), TEXT_ATTR);
if ("None".equals(ssdn.trim()))
throw new OAException("There is no attachment kindly click on add button and browse your attachment",OAException.ERROR);
else
//throw new OAException("link val = " + ssdn);
super.processFormRequest(pageContext, webBean);
else
//System.out.println("There exists an attachment to the expense claim. The process will now continue");
super.processFormRequest(pageContext, webBean);
}

Hi Roopesh,
Thanks for your quick reply..
I extended Review Co only, but after clicking submit it is not showing
any message, it is going to next page.
Pls find below code....
package xxoa.oracle.apps.per.selfservice.review.webui;
import oracle.apps.per.dor.common.DocsOfRecordUtilities;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.OAApplicationModule;
import com.sun.java.util.collections.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Hashtable;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean;
import oracle.apps.per.selfservice.review.webui.ReviewCO;
import java.util.StringTokenizer;
import oracle.apps.fnd.framework.webui.OANavigation;
import oracle.apps.per.common.CommonUtils;
import oracle.apps.per.selfservice.review.common.ReviewParams;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OARow;
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.apps.fnd.framework.webui.OADialogPage;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.form.OAFormValueBean;
import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
import oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageLovInputBean;
import oracle.apps.fnd.framework.webui.beans.nav.OAPageButtonBarBean;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.apps.fnd.framework.webui.beans.OAImageBean ;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageFileUploadBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageAttachmentLinkBean;
import oracle.apps.fnd.framework.webui.OAInnerDataObjectEnumerator;
import oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
import oracle.apps.per.selfservice.workflowservice.server.WFUtility;
import oracle.cabo.ui.data.DataObject;
import oracle.jbo.ViewObject;
import oracle.apps.per.selfservice.common.SSHRParams;
import oracle.apps.per.selfservice.workflowservice.server.WFUtility;
import oracle.jbo.domain.Date;
public class xxReviewCO extends ReviewCO
public static final String RCS_ID = "$Header: ZensarReviewCO.java 120.8.12010000.11 2010/05/28 10:36:58 tkghosh ship $";
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: ZensarReviewCO.java 120.8.12010000.11 2010/05/28 10:36:58 tkghosh ship
$", "%packagename%");
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
OAApplicationModule oam = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("HrSubmit")!= null)
OAMessageAttachmentLinkBean uploadBean = (OAMessageAttachmentLinkBean)webBean.findChildRecursive("AttachmentLink");
String ssdn = (String)uploadBean.getAttributeValue(pageContext.getRenderingContext(), TEXT_ATTR);
//TEXT_ATTR
// String s1 = new String("None");
// string s2 = new String(""View);
if ("None".equals(ssdn.trim()))
throw new OAException("There is no attachment kindly click on add button and browse your attachment",OAException.ERROR);
else
//throw new OAException("link val = " + ssdn);
super.processFormRequest(pageContext, webBean);
else
//System.out.println("There exists an attachment to the expense claim. The process will now continue");
super.processFormRequest(pageContext, webBean);
}

Similar Messages

  • How to make attachment mandatory in E-Separation ?

    How to make attachment mandatory in E-Separation in ESS screen while submitting the resignation?

    Hello,
    Apologies for delayed response. Please find the below steps :
    1) Extend ReviewCO (pkg - oracle.apps.per.selfservice.review.webui.ReviewCO)
    2) In PFR – check button event is Submit then call function ( that check whether doc is attached or not )
    3) Funtion returns True and False. If false display message.
    Pls. let me know if you need any more information.
    Thanks,
    Sudhakar

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

  • 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 extended field mandatory in Master Agreement

    Hello All,
    I am new to SAP CLM, and I have requirement where one extended field in master agreement needs to be made as mandatory field.
    I tried in extension definition but check box to make it required is disabled and I am unable to find other way to do it.
    Can some one help me and Please let me know how make extended fields mandatory in CLM.
    Regards,
    Prabhat

    Hi
    This could be achieved using Page Customization.Go to Setup-> User Interface-> Page Customization, open master agreement object (create new with UI ID:contracts.contract.ui.buyside.default if doesn't exist ) and add a new customization for extended field with Property set to Required.
    Regards
    Mudit Saini

  • How to make a field mandatory in SAP Business one ?

    How to make a text field mandatory in SAP Business one?

    hi nishant,
    check this link
    Making fields mandatory
    To Set Mandatory Fields in Documents
    Jeyakanthan

  • How to make Select Options Mandatory?

    Hi Guys,
                  Can anybnody tell me how to Declare  Selection Options for some of them mandatory.
    Select-Options : v_PurOrg for EKKO-EKORG default '2000',
                             v_GRDate for Sy-Datum ,
                             v_GRPrd  for MSEG-GJAHR.
             In these i have to make v_PurOrg Manadatory.
    Thanks,
    Gopi.

    Hi Gopi,
    In order to make select-options mandatory we add OBLIGATORY in the statement like the below.
    Selection-Screen.
    Select-Options : v_PurOrg for EKKO-EKORG default '2000' OBLIGATORY.
    In this case, only the first option will have the default value of 2000.But if you want both the options low and high of select-options, means you have to add the below code in your program in the initialization event.
    Initialization.
    v_PurOrg-low    =   1000. 
    v_PurOrg-high    =   2000. 
    append v_PurOrg.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • How to make some fields mandatory for a custom screen we have added

    Hi All,
    Please let me know how can I make some fields mandatory through coding in PBO for only some fields of a screen.
    Say if I have 4 fields in my screen(module pool not selection screen) i want to make mandatory 2 fields based on some conditions how to do this? I tried using screen-group but this will make mandatory all the fields of that screen mandatory.
    I want only specific fields based on condition in run time.
    Regards
    Mahesh

    Hi Mahesh,
             Try this ..
      Assign the same group to those fields , say GRP
           in  PAI
             IF <CONDITION>
                Loop at screen.
                   if screen-group1 = 'GRP'.
                      screen-required = '1'.
                      modify screen.
                   endif.
                 endloop.
              ENDIF.

  • 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

Maybe you are looking for

  • Compilations error

    Hi, I finally was able to force feed my computer the J2SDK today. It took a while. I'm trying to compile a few classes and this is the error that is being spit out at me: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java

  • X1 Music channel delay and video function issue.

    For the longest time we have a delay when switching from a video channel to a music channel. 1 time out of 10 the music plays instantly. The other 9 times we have to wait 30 seconds to 7 mins for the music actually play. Sometimes the X1 resests itse

  • Move a site from one Mac to another without losing sites already there

    I would like to move a site from one Mac to another without losing the websites that I have already built on the other Mac. Transfering the Domain file is not helping. Is there away to open the new domain file and adding those sites to the domain fil

  • Dynamic link to After Effects problem

    My computer crashed a little while ago, and we had to reload the system, but no data was lost. The project i am working on, has every single shot dynamicly linked to After Effects. The links held up fine, but there is one problem, about 10 shots have

  • TS or RDP

    Windows Server 2008 R2, sp1 I've been using RDP for our developers because the screen refresh is fast. of late, I've been asked to instead use TS. question is, wouldn't TS consume more bandwidth compared to RDP?