Dynamically setting field attributes based on input

Hi all,
I am trying to see if it is possible to dynamically set field attributes depending on other fields.  For example, in screen 1100 of IQ01, I want to make it so that "Certification number" becomes mandatory if "certification status" = 1, and becomes optional if "certification status" = 2,3 or 4.
Is this possible?  If so, how?
Regards,
D.

Have you checked this
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm
if your requirement is to do this in Tcode IQ01 then the above answer is not sufficient
Edited by: Abhishek Jolly on Aug 15, 2008 5:41 PM

Similar Messages

  • How to set field attributes type such as enumeration / boolean / text in Search UIBB when creating search creatria dynamically using default_config?

    Hi Experts !
    I am trying to build search UIBB where I need to configure the search criteria dynamically in the IF_FPM_GUIBB_SEARCH~GET_DEFAULT_CONFIG method.
    Please can anyone tell me is it possible to set the attribute types in dynamic configuration .... because I need to create a drop down field in the selection screen.
    Thanks !

    Was it really necessary to post the whole API description?!?
    Locale[] locales = Locale.ENGLISH();ENGLISH is not a method in class Locale, so do not add the braces "( );".
    Also, the constant ENGLISH is not an array, but just a single Locale object.
    You didn't say what your problem was. What do you want to achieve with your program and what is it that you don't understand?

  • Setting fields mandatory based on other fields

    Hi,
    In my adobe form there are 4 input fields(F1,F2,F3 and F4) and one field(F5) which is input optional. But if any field (F1, F2,F3 or F4) gets changed, the fifth field F5 has to be mandatory. I guess some java scrip is required but I dont have any idea on the same.
    Please help.

    we have a similar situation where a field must be filled in if a value is chosen in our dropdown box.
    you can throw a popup message stating that the field must be filled...
    JavaScript
    xfa.host.messageBox("This is a message", 3, 1);
    FormCalc
    xfa.host.messageBox("This is a message", 3, 1)
    A valid integer representing the value of the button pressed by the user:
    u2022 1 (OK)
    u2022 2 (Cancel)
    u2022 3 (No)
    u2022 4 (Yes)
    Or what we did is just checked all the values after the SUBMIT and issued error messages in a message area letting the user know what they missed.

  • How to set fields contained in an input structure as not mandatory in WSDL

    Hi all,
    I hope someone can help me sort out a problem I've been having recently.
    I'm generating a WSDL from a function module, which has a structure as the only input parameter. This structure contains a number of fields, which need to be presented as not mandatory in the WSDL descriptor.
    I modified the function module by setting the structure and all its contained fields as not mandatory, but when I generate the related WSDL it shows the structure as optional and its subfields as mandatory.
    Below is a snippet of the WSDL:
    <xsd:element name="Zk4RfcTibcoFatt">
       <xsd:complexType>
          <xsd:sequence>
             <xsd:element name="XZk4Headprev" type="tns:Zk4Headprev" minOccurs="0" />       <-- optional structure
          </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="Zk4Headprev">
       <xsd:sequence>
          <xsd:element name="RecordType" type="n0:char4" />                                                    <-- non optional parameters
          <xsd:element name="IdricTecn" type="n0:char15" />
          <xsd:element name="IdricFour" type="n0:char15" />
          <xsd:element name="CodOperaz" type="n0:char4" />
       </xsd:sequence>
    </xsd:complexType>
    I can't understand why the stucture's elements are not defined as optional in the WSDL, while they're configured as optional in the function module definition. I'd expect a minOccurs="0" added to each structure's element definition.
    I even tried modifying manually the WSDL from SE80, but it seems it can't be altered in any way.
    Has anyone  a solution to this problem?
    Thanks in advance.
    Best Regards.

    I tried to do that, but I can't manage to edit the WSDL in SE80, is there a way to do it?
    I also tried modifying the WSDL in an external editor, but I can't find a way to switch the edited one with the original one in SAP.
    Can you please help me on that?
    Thanks in advance for any help you can give me.

  • Dynamic setting name attribute for f:facet

    Hello everyone!
    I'm new here and I really need help with JSF problem.
    I have a tomahawk tree2 component and TreeNode class to render on JSF page. The problem I have is:
    "Unable to locate facet with the name: xyz". That's why I need to dynamically generate a name in getTree
    method. I've tried to also dynamically generated it in JSF file: <f:facet name="#{Bean.property}">
    But it won't work, probably because of JSF's life cycle I suppose.
    Does anyone know how to solve this problem?
    Thank you very much for answers!

    I am assuming that each page has that field on it ...right? The expression that you have created only will access a single field. Each field has a unique expression. To see the expression make the field editable and on th eenter event of th efield add the javascript code app.alert(this.somExpression). Now render your form and click in th efield on each page ....you will see a different somExpression for each object. Typically the page occurance number will increase. So you will need to set each of those fields off ....not just 1. You can do this with by knowing th enumber of pages and then using a for loop to go through each instance and setting the presence property off.
    On your second query, the resolveNode accepts a string ......that string gets resolved at runtime into an object then the presence of that object is manipulated. At design time the product only knows that you have a string not an object hence the object assist cannot determine what should be shown. That is why you do not see anything in the object assist.
    Paul

  • Dynamic table rows created based on input value

    I've been searching the forum for either a tutorial or input
    on how to create a table where the number of rows are based on a
    user input value. I can't seem to find anything on this.
    Here's what I'm trying to do. I have site where people are
    charged based on the number of items they register. So if they want
    to register 2 items. They would input the number 2 for quanity and
    I would display a dynamic table with 2 rows. The user will input
    their data for the 2 items and I insert this into an
    itemsRegistered table. If they entered 4 I would give them 4 rows
    for input. I am using dreamweaver with PHP and MySql database. Can
    anyone point me in the right direction. Any help would be
    appreciated!

    Not exactly. The items are all the same but have a different
    registration number (like a serial number). So if the user wants to
    register 2 items. They would input the number 2 on the form. Then 2
    rows would appear on the table, one for each registration number.
    When they finish entering the data it would be inserted into the
    database as 2 records.
    So for example if item 1 has registration number 10000 and
    item 2 has registration number 11000. The registration numbers are
    unique. The table would look like this :
    CustomerID (links to customer table)
    RegistrationID (Unique in this table)
    ItemColor
    ItemShape
    I don't know if I've explained this well but thanks for even
    attempting to answer this! I really appreciate it!

  • Dynamically set a value based on value selected from LOV

    Apex 4.2
    I'm having trouble creating a dynamic action to set a value. I've used dynamic actions to hide and show regions but for some reason cannot set a value.
    I have a select list  --> P101_LIST. Source Type is 'Database Column'. Source value or expression is 'person_id' The query is as follows:
    Select first_name, person_id
    From Persons
    I have a display value --> P101_DISPLAY. Source Type is 'Static Assignment'. Source value or expression I left blank.
    I would like for every time the user selects a name from P101_LIST, the P101_DISPLAY item gets updated to show the corresponding value(person_id).
    Because there are other page items / information on the page, I would prefer this to not submit / update the page. Wouldn't want other page items / information getting updated.
    Any help on this matter would be greatly appreciated. Thanks in advance.

    Hi,
    Create a DA:
    - event onChange P101_LIST
    - Action: PL/SQL
    - PL/SQL code:
    :P101_DISPLAY := :P101_LIST;
    Items to submit: P101_LIST
    Item to return: P101_DISPLAY
    And done.
    Regards,
    Joni

  • Make a field required based on input in another field

    So I have researched the forum to answer the question of how to make certain fields in a form required if a value is entered in another designated field, and not required if no value is entered in the designated field.
    For example:
    There is a field titled QTY_paper, and if a value is entered into QTY_paper, then the field PROGRow1 should become required.
    If no value is entered into QTY_paper, then PROGRow1 is not required.
    I've tried both FormCalc and Javascript, but with no results. In FormCalc I added this script as a mouseExit event on QTY_paper:
    if ($.isNull == 0) then
         //Make the budget field Required
         PROGRow1.validate.nullTest = "error";
    endif
    and then I added this script in FormCalc to the mouseExit event on PROGRow1:
    if ($.isNull == 0) then
    $.validate.nullTest = "disabled"
    endif
    This came almost verbatim from another post on the forum, so I'm thinking I'm missing something obvious here... which isn't too odd as I'm still pretty new at adding the scripts. Please help if you can!

    You'd want to combine both scripts on the first field with an if/else statement. And I'd use the Exit event instead of Mouse Exit (not sure if Mouse Exit handles tabbing in and out of fields).
    The first script should have worked, but with the second script you were asking if PROGRow1 was null, not QTY_paper.
    FormCalc:
    if ($.isNull) then
         PROGRow1.validate.nullTest = "error"
    else
         PROGRow1.validate.nullTest = "disabled"
    endif

  • Setting screen attributes for select-option in subscreen

    Hello SDN Community,  I have researched this extensively in forums and found much helpful information in getting the select-option working in a subscreen.  Also found information that discussed using standard AT SELECTION-SCREEN statements to process the sub-screen with. 
    I encountered problems when that from the LOOP AT SCREEN within the AT SELECTION-SCREEN OUTPUT,  I set the INPUT/OUPUT attributes to zero, the field was still open for input when it displayed.  For when I do this on other fields of my screen, they are "greyed out".
    Has anyone any experience setting field attributes from within loop at screen for embedded select-option subscreen?  Would appreciate any insight you might have.
    Thank you,
    Dean Atteberry.
    P.S.- I put this thru the debugger and I can see the INPUT and OUTPUT attributes getting changed.  But when displays, it is like the change didn't happen.
    Full description of my processing below...
    I have a screen with four radio-buttons.  Under the first radio-button is my embedded subscreen with one SELECT-OPTION for AUFNR.  Under the other three radio-buttons are single fields declared regular way in main screen.
    In my PBO of main screen I have loop at screen that enables/disables INPUT and OUPTUT attributes based on which radio-button is selected.  This prevents confusion from user entering values in fields other than the one the radio-button is selected for.
    For my embedded select-option subscreen, I have an AT SELECTION-SCREEN OUTPUT statement in which I have a LOOP AT SCREEN.  Within that, based on radio-buttons, I either enable or disable the INPUT and OUTPUT attributes for the S_AUFNR-LOW and S_AUFNR-HIGH fields.
    Edited by: Dean Atteberry on Mar 25, 2009 4:39 PM

    >> I think that you are trying to change select options within main screen, whereby it should be
    >> changed in PBO of that subscreen. You said you do it in AT SELECTION-SCRREN OUTPUT which
    >>  will be only applicable for selection screen (I guess your main screen here). Do loop at screen in
    >>  PBO module of this subscreen not in PBO of the selection screen and see if that helps.
    Hi Marcin,  thank you for your reply.  My "main screen" is not my "selection screen".  Please allow me to further clarify...
    My "main screen" has four radio buttons with a subscreen area under the first one and single fields under the others.
    My "subscreen" is auto-generated by Selection-Screen and Select-Options statements which are in my TOP module.
    I call my auto-generated select-option subscreen in my PBO with...
         call subscreen sca_ordr including sy-repid scr_0121.
    and in my PAI with...
         call subscreen sca_ordr.
    In order to do LOOP AT SCREEN for my system-generated select-option subscreen, I use the AT SELECTION-SCREEN OUTPUT event in which to put my loop. 
    When I walk thru this in the debugger, I can see it setting INPUT/OUTPUT fields to zero, but when the screen displays, there are no changes to my subscreen....  Fields should be "greyed out" instead they are open for intput.
    Doing my best to accurately describe in as few words as possible.  Thank you for your ideas!
    Dean.

  • Dynamically set "mailto:" upon submit

    Hi there,
    How can I dynamically set the "mailto:" part of the submit form (and attach PDF)
    From here:
    https://forums.adobe.com/message/7025028#7025028
    To add an action to button to send the form as an email, you can perform the following steps:
    Add the "Submit a form" action to your Submit button.
    Enter "mailto:" (including a colon) followed by email recipient(s).
    Select "PDF The complete document".
    Thanks

    Thanks MobileDevCK for the fast response,
    I regards to the user entering the email, thanks but i think you missed the /s
    I am designing this in Acrobat Pro, I'm not sure how i'd be referencing code if i wasn't.
    I've read the API, and it says:
    submitForm
    (cURL
    cSubmitAs='FDF']
    [cCharset='utf-8']
    Submits the form to a specified URL. Currently only supports FormsCentral submissions.
    but then FormsCentral will be retired on July 28, 2015. The service is fully functioning and available through June 22, 2015. Learn more.
    I'm trying to get support on:
    AcroForms
    Most Acroform elements and their properties are supported, although email is currently the only supported submit type and barcodes are not supported.
    I want to dynamically set (with code based on fields filled in) the email in acroforms
    Thanks for you help.

  • Help to set value of an attribute based on value selected in another field

    Hi all,
    I want to set the value of an attribute STRUCT.ITM_TYPE to a default value whenever i select one of the value from dropdown list in LC_STATUS.
    I tried to add an event in the get_p method of the lc_status but there i cant able to access the context of the ITM_TYPE as the fields are in different views.
    Please Help,
    Rewards will be awarded.
    Naveenn

    Hi Vineet,
    Thanks for the suggestion.
    Please chech my code and suggest me for any corrections.
    In the Get_P_LCSTATUS method of Context Node BTADMINH in View1.
    METHOD GET_P_LCSTATUS.
      CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
        WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'ACT_STATUS_SELECTED'.
      ENDCASE.
    ENDMETHOD.
    In event handler method in Context Node BTADMINI in View2
    method EH_ONACT_STATUS_SELECTED.
    * Added by wizard: Handler for event 'ACT_STATUS_SELECTED'
    data: lr_ent1 type ref to cl_crm_bol_entity,
             lr_ent2 type ref to cl_crm_bol_entity.
    lr_ent1 = me->typed_context->BTADMINH->collection_wrapper->get_current( ).
    check lr_ent1 is bound.
    * To Get Value of First Attribute
    lv_attr1 = lr_ent1->get_property_as_string( 'LC_STATUS' ).
    * To Set Value of 2nd Input Field now based upon this value
    lr_ent2 = me->typed_context->BTADMINI->collection_wrapper->get_current( ).
    *lr_ent2->lock( ).
    lr_ent2->set_property_as_string( iv_attr_name = 'ITM.TYPE'  iv_value = 'RREQ' ).
    endif.
    endmethod.
    but during syntax check its showing error messge as BTADMINH is unknown.
    2) How and where to bind the context node in custom controller.
    Please help.

  • Dynamically setting the vo attribute Update property

    Hi All,
    Can we set the vo attribute update property dynamically.if so please let me know how can we achieve this.
    I have a read only view..But in my process request i need to set the value for that attribute based on some condition.
    How can i achieve this.I cant set at bean level.only row level i need to set.
    Its a dynamically created seeded vo.
    Please help.
    Thanks
    Bharat

    Hi,
    Capture the VO row and then set the value on the view attribute.
    OAViewObject vo = (OAViewObject)am.findViewObject("viewinstance");
    If(vo!=null)
    Row row = (Row)vo.first();
    row.setAttribute("Attribute Name", "Value");
    Thanks,
    Gaurav

  • Dynamically adding attribute based on PL/SQL function

    I've been tasked with dynamically applying security to an XMLType input sample as a post XML generation process (on an 11g R2 DB) based on several parameters. The best way to describe it is with an example block of code, I need to write ApplySecurity....
    declare
      vXML XMLType;
      BONUS_SEC constant integer := 24; -- Security identifier for Bonus
      function ApplySecurity(pXML        XMLType,
                             pSecurityID integer,    -- A Security identifier
                             pDataIDPath varchar2,   -- Absolute XPath to the data id which is passed to value
                             pAttribPath varchar2    -- Relative XPath to pDataIDPath where we want the security result attribute stored
                             ) return XMLType is
      begin
          for all DataIDs found in pDataIDPath
            Call an PL/SQL function GetSecurityDesc(pSecurityID, pDataID)
              Store the result of this back in the XML in the pAttribPath as SECURITY attribute
      end;
    begin
      vXML := ApplySecurity(XMLType('<ROWSET>
                                       <ROW>                                
                                         <BONUS_ID>8</BONUS_ID>
                                         <DESCRIPTION>Test Bonus</DESCRIPTION>                                                                           
                                       </ROW>
                                       <ROW>                                
                                         <BONUS_ID>9</BONUS_ID>
                                         <DESCRIPTION>Another Bonus</DESCRIPTION>                                                                           
                                       </ROW>                         
                                       <ROW>                                
                                         <BONUS_ID>10</BONUS_ID>
                                         <DESCRIPTION>April Bonus</DESCRIPTION>                                                                           
                                       </ROW>                         
                                     </ROWSET>'),
                             BONUS_SEC,       
                             '/ROWSET/ROW/BONUS_ID',
    end;
    /* Example of the Desired Output =
    <ROWSET>
      <ROW>                                
        <BONUS_ID SECURITY="HIDDEN">8</BONUS_ID>
        <DESCRIPTION>Test Bonus</DESCRIPTION>                                                                           
      </ROW>
      <ROW>                                
        <BONUS_ID SECURITY="READONLY">9</BONUS_ID>
        <DESCRIPTION>Another Bonus</DESCRIPTION>                                                                           
      </ROW>                         
      <ROW>                                
        <BONUS_ID SECURITY="NONE">10</BONUS_ID>
        <DESCRIPTION>April Bonus</DESCRIPTION>                                                                           
      </ROW>                         
    </ROWSET>
    */I have tried several approaches like iterating using a dynamically created XMLTable and calling InsertChildXML for each iteration, but that seems messy and inefficient as the call to InsertChildXML will have to locate the correct node each time. Ideally I think the best solution would be to do it with XQuery, but online examples are few and far between and I don't know how I'd call a PL/SQL function as part of an XQuery iteration as well as passing in the path information.
    Anyone have any ideas? Thanks!

    A funnier option, adapted from http://odieweblog.wordpress.com/2012/06/19/how-to-update-xml-nodes-with-values-from-same-doc/ :
    declare
      BONUS_SEC  constant integer := 24;
      vXML XMLType := XMLType(
    '<ROWSET>
      <ROW>                                
        <BONUS_ID>8</BONUS_ID>
        <DESCRIPTION>Test Bonus</DESCRIPTION>                                                                           
      </ROW>
      <ROW>                                
        <BONUS_ID>9</BONUS_ID>
        <DESCRIPTION>Another Bonus</DESCRIPTION>                                                                           
      </ROW>                         
      <ROW>                                
        <BONUS_ID>10</BONUS_ID>
        <DESCRIPTION>April Bonus</DESCRIPTION>                                                                           
      </ROW>                         
    </ROWSET>');
      pSecurityID integer      := BONUS_SEC;
      pDataIDPath varchar2(80) := '/ROWSET/ROW/BONUS_ID';
      pAttribPath varchar2(80) := '.';
      queryString varchar2(4000);
    begin
      queryString :=
    q'~select xmlpatch(
             :b1
           , xmlelement("xd:xdiff"
             , xmlattributes(
                 'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi"
               , 'http://xmlns.oracle.com/xdb/xdiff.xsd http://xmlns.oracle.com/xdb/xdiff.xsd' as "xsi:schemaLocation"
               , 'http://xmlns.oracle.com/xdb/xdiff.xsd' as "xmlns:xd"
             , xmlpi("oracle-xmldiff", 'operations-in-docorder="true" output-model="current"')
             , xmlagg(
                 xmlelement("xd:append-node"
                 , xmlattributes(
                     'attribute' as "xd:node-type"
                   , '(#DATA-ID-PATH#)[' || x.NodeOrder || ']' as "xd:parent-xpath"
                   , 'SECURITY' as "xd:attr-local"
                 , xmlelement("xd:content", GetSecurityDesc(:b2, x.DataID))
    from xmltable('#DATA-ID-PATH#'
           passing :b3
           columns DataID    integer path '#ATTRIB-PATH#'
                 , NodeOrder for ordinality ) x~';
      queryString := replace(queryString, '#DATA-ID-PATH#', pDataIDPath);
      queryString := replace(queryString, '#ATTRIB-PATH#', pAttribPath);
      execute immediate queryString into vXML using vXML, BONUS_SEC, vXML ;
      dbms_output.put_line(vXML.getclobval);
    end;
    /probably slower though.

  • WD_BADI_DOMODIFYVIEW - dynamically set screen element as mandatory field

    Hi,
    I would like to use WD_BADI_DOMODIFYVIEW to dynamically set a standard screen element on my Webdynpro as a mandatory field. Does anyone know which method in which class that I can use to set the status from 'Normal field' to 'required' ?
    This is a for standard SRM webdynpro screen. Unfortunately I could not get the configuration to set the standard metadata field as a mandatory field.
    Also this standard field does not have an existing binding to a context element to manipulate the status of the field. Hence I need to find a method that can directly change the attribute of this standard screen element to mandatory. I do not want to modify the webdynpro to change the status of the field to 'required'.
    <promise removed by moderator>
    Thanks
    Liam
    Edited by: c958209 on Apr 28, 2011 1:32 PM
    Edited by: Thomas Zloch on Apr 28, 2011 4:58 PM

    Hi Kiran,
    I think I understand what you are suggesting now. The trouble is IF_V_SC_DOFC_I_LIMITEM (the view I'm trying to enhance) does not exist in the BAdI.
    When I go to the attributes of the View of the Webdynpro component that I'm trying to enhance I do see WD_THIS refto IF_V_SC_DOFC_I_LIMITEM.
    It's just that in the BAdI WD_BADI_DOMODIFYVIEW this WD_THIS is not available and trying to define it like below does not work.
        Make Product Category field mandatory
          lo_node = wd_context->get_child_node( co_item_data ).
          lo_value = lo_node->get_element( ).
        Get value of context element SH_CATEGORY_ID
          lo_value->get_attribute( EXPORTING name  = co_sh_category_id
                                   IMPORTING value = lv_sh_category_id ).
          IF lv_sh_category_id IS INITIAL.
            DATA: lo_message_manager TYPE REF TO if_wd_message_manager.
            DATA lo_api_controller     TYPE REF TO if_wd_controller.
            DATA wd_this TYPE REF TO  if_v_sc_dofc_i_limitem.           <================ This gives a syntax error "The type          IF_V_SC_DOFC_I_LIMITEM is unknown
            lo_api_controller ?= wd_this->wd_get_api( ).
            CALL METHOD lo_api_controller->get_message_manager
              RECEIVING
                message_manager = lo_message_manager.
          Report message
            CALL METHOD lo_message_manager->report_attribute_error_message
              EXPORTING
                message_text   = 'Please fill the Document Date'
                element        = lo_value
                attribute_name = 'SH_CATEGORY_ID'.
          ENDIF.

  • In BI how to filter the selection options based on inputs on top field

    Hi Friends,
    In BI, How to filter the selection options based on inputs on top field.
    The system should automatically filter the lower level drop downs based on the selection of a higher level.
    For e.g. :
    If a user selects a Country then the States drop down should only display the State's belongs to the Country. Similarly when a State is selected, the District drop down should display only those District's belongs to the State.
    Thanks in Advance.
    Regards
    Jayaram M

    Hi Anil,
    Thanks for reply but I couldn't use Compounding Characteristic here. Need some other solution.
    Regards
    Jayaram M

Maybe you are looking for

  • Issue with SSRS Loading Report from Definition From Assembly

    I am using SharePoint 2010. I created web-part where there is report viewer control. On the page load of the control. I am writing below codes to load report from definition. Web part is not giving any error but also not lading report. I tried to mak

  • How do I sign out of my account on my iphone

    I'm signed in on an account that is not mine and I wanna sign out how do I do it?

  • Sim Mode Not Working

    When I record in Training or Assessment Simulation mode none of the interactive objects are being added to the timeline. All I get are the slides. When I run the project it plays the slides with no data boxes or prompts. Has anyone seen this problem?

  • Is a WITH...SELECT query more efficient than a SELECT query ?

    Hi folks, Is the WITH...SELECT just a convenience or is it really efficient than a simple SELECT with UNION ALL ? e.g. is the following: with rset as (select dname,empno,ename,hiredate,sal from emp e,dept d where e.deptno=d.deptno) select dname,empno

  • Oracle 10g XE

    I have installed oracle 10g XE & then created a new database manually named "WS". Database service created using ORADIM now how can i change "OracleXETNSListener" to "OracleWSTNSListener " ? Thanks Engr.M.K Chowdhury