Checkbox control  event - URGENT

Hi all,
I need to customize a standard page in iProcurement.
The requirement is on click of check box few fields should be mandatory and on uncheck of check box the fields shouldn't be mandatory.
I have done with making fields mandatory on click of checkbox, but on uncheck the fields are still shown mandatory.
PG : oracle/apps/icx/icatalog/shopping/webui/NonCatalogRequestPG , has "New Supplier" box. On click of check box the Contact Name
Vendor e-mail ,Supplier Item ,Phone fields are marked mandatory. For this I have extended controller.
On checkbox there is firePartialEvent - "updateNewSupplierFlag".
In extended controller , i have written the following code in ProcessFormRequest :
if ("updateNewSupplierFlag".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
System.out.println("Inside updateNewSupplierFlag");
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean supplierCntBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContact");
supplierCntBean.setRequired("yes");
     pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue1 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierCntEmailBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContactEmail");
SupplierCntEmailBean.setRequired("yes");
     pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue2 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierItemBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierItem");
SupplierItemBean.setRequired("yes");
     pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue3 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierCntPhone = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContactPhone");
SupplierCntPhone.setRequired("yes");
else if ("updateNewSupplierFlag".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
OAMessageCheckBoxBean oamessagecheckboxbean = (OAMessageCheckBoxBean) webBean.findChildRecursive("NewSupplierFlag");
Object NewSupplierFlagObj = oamessagecheckboxbean.getValue(pageContext);
String supplierFlagValue = NewSupplierFlagObj.toString();
if ("N".equalsIgnoreCase(supplierFlagValue))
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean supplierCntBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContact");
supplierCntBean.setRequired("no");
     pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue1 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierCntEmailBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContactEmail");
SupplierCntEmailBean.setRequired("no");
     pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue2 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierItemBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierItem");
SupplierItemBean.setRequired("no");
     pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue3 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierCntPhone = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContactPhone");
SupplierCntPhone.setRequired("no");
But else block doesnt call. How to unmark mandatory when checkbox is unchecked.
NOTE:working on R11.5.10
Thanks
Edited by: rbojja on Jun 6, 2012 1:55 PM

you mean to say like this, below code...
if ("updateNewSupplierFlag".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
OAMessageCheckBoxBean oamessagecheckboxbean = (OAMessageCheckBoxBean) webBean.findChildRecursive("NewSupplierFlag");
Object NewSupplierFlagObj = oamessagecheckboxbean.getValue(pageContext);
String supplierFlagValue = NewSupplierFlagObj.toString();
System.out.println("supplierFlagValue is ::"+ supplierFlagValue);
if ("Y".equals(supplierFlagValue))
System.out.println("Inside updateNewSupplierFlagONE");
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean supplierCntBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContact");
supplierCntBean.setRequired("yes");
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue1 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierCntEmailBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContactEmail");
SupplierCntEmailBean.setRequired("yes");
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue2 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierItemBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierItem");
SupplierItemBean.setRequired("yes");
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue3 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierCntPhone = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContactPhone");
SupplierCntPhone.setRequired("yes");
else if ("N".equals(supplierFlagValue))
System.out.println("Inside updateNewSupplierFlagTWO");
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean supplierCntBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContact");
supplierCntBean.setRequired("no");
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue1 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierCntEmailBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContactEmail");
SupplierCntEmailBean.setRequired("no");
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue2 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierItemBean = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierItem");
SupplierItemBean.setRequired("no");
pageContext.writeDiagnostics(this,"!!!!!!!!!... inside if block of supplierFlagValue3 ",OAFwkConstants.STATEMENT);
OAMessageTextInputBean SupplierCntPhone = (OAMessageTextInputBean) webBean.findChildRecursive("SupplierContactPhone");
SupplierCntPhone.setRequired("no");
}

Similar Messages

  • Events from C# Control ? Urgent !!

    Hi all,
        Is there any way to handle events from a C# customcontrol in ABAP?
        When I used ActiveX controls, it was easy - just check by EventID in DISPATCH, and RAISE EVENT that would then be handled...
        But now, with C# controls, events are "delegate" functions, and I just can't figure out how to make ABAP subscribe to this tricky kind of event...
        Please, help!!!
    Thanks,
    Arnaldo.

    This article will explain how to declare and use the C# events in your application as Event Control. You can design your event control in couple of mints, making your event as control will be easy for GUI developers to implement events in client side.
    Here are the steps:
    Create one Windows Application Project
    Add “Component Class” using "Add New Item". This is going to be your Event Control.
    Declare your delegate in your Event Control under your namespace
    Now declare your event inside your Event Control class.
    Also add the FireTheEvent method to fire the event.
    Build the project.
    Go to Form, then ToolBox, add the Event Control using “Add/Remove Items” menu by right clicking on the tool box.
    Drag and drop the new control. Using the property window of the control you can easily implement the Event method in your application.
    Call The FireTheEvent method in your button click after adding new button to your form.
    Run the application and click on your button, you should see your Event firing.
    Here's a list of all the events for the DataGrid control:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIWebControlsDataGridEventsTopic.asp.
    After referring to the DataGrid Event Handler (http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsdatagriditemeventhandlerclasstopic.asp) information, I think you'll want your code to look something like this:
    <%@ Page Language="C#" AutoEventWireup="True" %>
    <%@ Import Namespace="System.Data" %>
    <script language="C#" runat="server">
    void Page_Load(Object sender, EventArgs e)
    // Set things up...
    void Item_Data_Bound(Object sender, DataGridItemEventArgs e)
    // Your event code
    </script>

  • Can we use control events in smartforms

    Hi all,
    I am srinivas. can we use control events in smartforms, I mean at new, at end of ..... if these are not used can you suggest me any alternative....
    Actually my requirement is like a classical report, for which I need to display subtotal and grand totals based on two fields....
    Please help me out in this issue as it is very urgent.
    <b><REMOVED BY MODERATOR></b>
    Thanks in advance....
    Regards,
    Sri...
    Message was edited by:
            Alvaro Tejada Galindo

    Hi Nick,
            Thanks for the reply... it is really very useful for me.
    As I discussed in my earlier mail regarding the output sequence, which should be in the below format.
                                           number       quantity uom      unitprice        amount curr
    plant
           material
                   date
                                             x                 y                    z                      A           
                                             e                 f                     g                      h
                                             p                 q                     r                      s
                   subtotal date..... 1                   2                    3                       4
                   subtotal  material.5                  6                    7                       8
    As you said when I using <b>event of Begin</b> its working fine. but while using the <b>event of end</b>,  I am specifying date and then matnr (sort) its taking(nodes are created mean first matnr and then date) in the reverse order and when I am taking matnr and date it is placing the events(nodes) in the right order but the order date is not triggering.
    can please tell me how to proceed here..
    waiting for your reply..
    Regards,
    Srinivas

  • How to hide/unhide the all Treenodes on Treeview based on Checkbox changed event in Sharepoint custom webpart Sitecollections

    How to  hide/unhide the all Treenodes on Treeview based on Checkbox changed event?
    Checkbox(Control)
    1.Checkbox Checked:(Action below like)
     if user click on  Checkbox, all the treenodes on treeview is hide.
    2.Checkbox Unchecked(Action below like)
    If user uncheck the Checkbox  all the treenodes on treeview is unhode.
    Could you please help me how to do above one.
    Badri

    Hi,
    According to your post, my understanding is that you want to hide/show the TreeView when the Checkbox checked/unchecked.
    We can use jQuery to achieve it, the following script for your reference:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    $("input[type=checkbox]").click(function () {
    if (this.checked) {
    $("#TreeViewID").hide();
    } else {
    $("#TreeViewID").show();
    </script>
    More information:
    http://dineshsharepoint.blogspot.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Control Events

    Hi,
    Can anyone tell me what control events in ABAP are and their syntax.
    Thanks n Regards
    Dinesh

    Hi,
    Control Events are
    1. AT NEW f.
    2. AT END OF f.
    3. AT FIRST.
    4. AT LAST.
    When you sort an extract dataset, control levels are defined in it.The control level hierarchy of an extract dataset corresponds to the sequence of the fields in the HEADER field group. After sorting, you can use the AT statement within a loop to program statement blocks that the system processes only at a control break, that is, when the control level changes.
    AT NEW <f> | AT END OF <f>.
    ENDAT.
    A control break occurs when the value of the field <f> or a superior field in the current record has a different value from the previous record (AT NEW) or the subsequent record (AT END). Field <f> must be part of the HEADER field group.
    If the extract dataset is not sorted, the AT... ENDAT block is never executed. Furthermore, all extract records with the value HEX 00 in the field <f> are ignored when the control breaks are determined.
    The AT... ENDAT blocks in a loop are processed in the order in which they occur. This sequence should be the same as the sort sequence. This sequence must not necessarily be the sequence of the fields in the HEADER field group, but can also be the one determined in the SORT statement.
    If you have sorted an extract dataset by the fields <f1>, <f2>, ..., the processing of the control levels should be written between the other control statements as follows:
    LOOP.
      AT FIRST.... ENDAT.
        AT NEW <f1>....... ENDAT.
          AT NEW <f2>....... ENDAT.
              AT <fgi>..... ENDAT.
              <single line processing without control statement>
          AT END OF <f2>.... ENDAT.
        AT END OF <f1>.... ENDAT.
      AT LAST..... ENDAT.
    ENDLOOP.
    You do not have to use all of the statement blocks listed here, but only the ones you require.
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_itab.htm
    Regards
    Sudheer

  • Register Control events?

    Hallo,
    I've discovered that I can connect a control reference to the EventSource
    input of the RegisterForEvents function. This event (e.g Button1:MouseUp)
    appears as dynamic event in the EventStructure editor. Up to this point it
    seems to be possible to dynamically register for control events. But
    register another event (e.g Numeric1:ValueChanged) in the Button1:MouseUp
    handler fails and LabVIEW tells "Cannot connect different refnum types".
    Dynamically register for control events is something I'm desperately
    searching for.
    1. Is it just an unwanted behaviour that I can connect a control reference
    to a RegisterForEvents function or is this the first step to an
    undocumented feature.
    2. If it is intended behaviour, how can I complete to
    register another
    event in a handler?
    Thank you
    Oliver Friedrich

    > I've discovered that I can connect a control reference to the EventSource
    > input of the RegisterForEvents function. This event (e.g Button1:MouseUp)
    > appears as dynamic event in the EventStructure editor. Up to this point it
    > seems to be possible to dynamically register for control events. But
    > register another event (e.g Numeric1:ValueChanged) in the Button1:MouseUp
    > handler fails and LabVIEW tells "Cannot connect different refnum types".
    >
    > Dynamically register for control events is something I'm desperately
    > searching for.
    >
    > 1. Is it just an unwanted behaviour that I can connect a control reference
    > to a RegisterForEvents function or is this the first step to an
    > undocumented feature.
    >
    > 2. If it is intended behaviour, how can I
    complete to register another
    > event in a handler?
    The register for events lets you specify which object(s) you are
    interested in receiving events on. If you have a VI event, you can
    register and reregister at various points in your program to specify
    which you are currently interested in. If the events is a Boolean
    event, then any Boolean will work, but numerics aren't Booleans. If you
    define the initial event to take a Control reference, then both Booleans
    and Controls can be wired up since both inherit from Control.
    Also note that wiring a not-a-refnum will unregister everything meaning
    you don't want events for any particular control.
    As for whether or not it is unintended or undocumented. It is
    definitely intended, and I suspect that it is documented. Also, I'm
    pretty sure the examples show how to do this.
    Greg McKaskle

  • How to toggle checkbox control in template-d​riven Excel spreadshee​t?

    I am developing a report generation routine for a DAQ LabVIEW application
    running a small public water system. Every month critical operating data
    must be organized and reported to the state health department. They provide
    an Excel template for these forms, which I am populating from LabVIEW.
    After giving up on the MS document express VIs (they are apparently incompatible
    with a multi-sheet template unless you are only populating the default current
    sheet of the template, a restriction I only figured out after hours of "jiggling"
    and rooting in the bowels of the block diagrams), I have managed to populate
    almost everything in the form using the basic report generation and Excel-specific
    VIs.
    However, the one item in the spreadsheet I have not figured out how to write are
    the checkbox controls embedded in the template. These checkboxes do not appear to
    control anything; they just provide a convenient way in the state form to record an
    answer for each of a short list of questions.
    Anyone know how to toggle, or better, check/uncheck these from LabVIEW? I can modify
    the template if necessary to provide names or other hooks for these objects; I just
    haven't a clue what to actually do.
    I am developing the VI in LV 7.1 DS-PCE, so I have all of the latest add-on goodies
    at my disposal.
    Bob

    When it is not clear where best to start with automating a feature of Excel in LabVIEW, using Excel macros can be very helpful. If you record a macro and toggle the state of your checkbox's you will be able to more closely examine how Excel automates this action.
    After the macro is recorded you can edit the macro to see which ActiveX function calls you would have to use from LabVIEW to accomplish the same task. Alternatively, you can record the macro, and automate the playback from inside LabVIEW. The two links below will give you more information on how to implement one of these options.
    Example Program: Run Excel Macro from LabVIEW
    Using ActiveX to Copy an Excel Range to a LabVIEW Table
    Scott Y.
    NI

  • Link Menu Event and control event

    I would like to have a menu item that performs the same function as a control event ("Save" or "Print"). Because there is only an event case for general "menu selection," it appears that I cannot just add an event for a specific case.
    For example
    Save Data case:
    Button: Save Data
    Menu Item: Save Data (Ctrl+S)
    Print case:
    Button: Print
    Menu Item: Print (Ctrl+P)
    Is there a way to do this without just duplicating the entire event case?
    Solved!
    Go to Solution.

    Use Producer Consumer with Events template to start
    In the consumer decode the event into a case structure by reading the menu item or menu tag string.
    Heres a simple example
    Attachments:
    BooMAIN.vi ‏13 KB
    Boo.zip ‏11 KB

  • Problem with checkbox and Event.stop(event)

    Hello,
    I cannot change the checkbox in a row, if the Event.stop(event) is fired on checkbox. My aim is, that the event OnRowClick is stoped, if I change the checkbox in the row.
    <rich:extendedDataTable id="requestTable" value="#{requestListHandler.normalisedRawRequestList}" var="req"
                             rows="#{requestListHandler.limitRows}" selectionMode="single">
                             <a4j:support event="onRowClick" action="#{requestListHandler.viewRequest}">
                                  <f:setPropertyActionListener value="#{req}"
                                       target="#{requestHandler.selectedRequest}" />
                                  </a4j:support>
                            <rich:column>
                                       <h:outputText value="#{req.offerListSize}">
                                            <f:convertNumber type="number" />
                                       </h:outputText>
                         </rich:column>
                             <rich:column id="checkBoxColumns">
                                       <h:selectBooleanCheckbox onclick="Event.stop(event);"
                                            value="#{req.firstInterpreterTimeChecked}"/>
                         </rich:column>
    </rich:extendedDataTable>I know I am using richfaces, but I have problem with sun-ri component <h:selectBooleanCheckbox..../>.
    Have you any idea?
    Manu
    Edited by: Argonist on Jun 16, 2009 8:27 AM
    Edited by: Argonist on Jun 16, 2009 12:25 PM

    I had the same problem. I read you post and was so disappointed that no one had answered you. But I have a good news for you :) My team leader managed to solve this awkward problem.Add to h:selectBooleanCheckbox style="z-index: 20;" so that it is "above" the table row that fires its own onclick event.

  • Badi and Business event( Urgent)

    Hi experts,
          I am new to badi and business event 1120P. Please post how this business event exactly comes in to picture in this badi. also how to find this business event?
    And also Post the logic or code. The requirement is given below . Pls Post the solution. Its very urgent.
    Enhancement Summary
    Two user exits are needed to determine the correct G/L Account and Cost Center on Shipment Cost documents and post the Material Group on the Accounting document. BADI_SCD_ACCTG and Business Event 1120P can be used to accommodate the new functionality.
    Business Process
    Specific G/L Accounts and Cost Centers have to be determined to post on the Shipment Cost document. This is needed to provide accurate management reporting capabilities on shipments for Sales Order or Stock Transfer Order. A new custom table must be created which contains the following information: Distribution, Mode of Transport, Account, Cost Center Material group. Distribution is an identifier here if this shipment originated from an SO or STO.
    There are no screens involved in this enhancement.
    Components
    Table: ZTABLE1
    Field     Data Element     Type     Length     Description
    MANDT     MANDT     CLNT (key)     3     Client
    DISTRIBUTION     Z_DISTRIBUTION     CHAR (key)     1     Distribution
    MOT     ZZDEF_MOT     CHAR (key)     2     Mode of Transportation
    MATKL     MATKL     CHAR (key)     9     Material group
    SAKNR     SAKNR     CHAR     10     G/L Account Number
    KOSTL     KOSTL     CHAR     10     Cost Center
    This table gets updated manually by the FI team.
    Values for Distribution are:
    ‘1’  =  Primary Distribution to Refinery
    ‘2’ = Primary and Secondary– Excluding refinery
    All entries must be checked against SAP config and master tables
    User exit BADI BADI_SCD_ACCTG will be used to determine the correct G/L Account, Cost Center and Product Group based on Distribution and Mode of Transport. This BADI gets called only when a new Shipment Cost document get created.
    Once the BADI determined the new values it populates field c_vfkn-sakto with the G/L account, field c_vfkn-kostl with the Cost Center and exports the Product group to memory.
    There is no field on the Shipment Cost Document to store the Product group. Therefore another mechanism must be used to get the Product Group on the accounting document.
    Business Event 1120P can be used to import the Product group out of memory and put it on BSEG-MATNR. Structure BSEG_SUBST must be enhanced with field MATNR for this purpose.
    Function, Rules, Exits      Description of Functionality, Rules, Exits
    BADI_SCD_ACCTG     Business Add-In for Shipment Cost Account Assignment
    Business Framework     Business Event 1120P can be used to import the Product Group from memory and to populate field BSEG_SUBST-MATNR.
    This event gets called from different places. It needs to be ensured that it only populates the value when it was called from BADI_SCD_ACCTG.
    Custom Table     A look-up Table needs to be maintained for Distribution, Mode of Transport, G/L Account, Cost Center and Material Group
    Transaction code     To maintain the new table
    Append Structure     To enhance structure BSEG_SUBST with MATNR
          Business Add-In BADI_SCD_ACCTG can be used to determine the account assignments for a shipment cost item to set the G/L Account and Cost Center. All data needed to determine the new information gets provided in this BADI.
    Logic:
    •     Determine if STO or SO based on Document Category from internal table I_REFOBJ-VTRLP field VGTYP If is C then Distribution type is Sales Order (Primary and Secondary – Excluding Refinery – ‘2’ ) else we need to check the receiving plant. If the receiving plant (I_REFOBJ-VTRLK field WERKS) is a refinery the Distribution type is Primary (1) else it’s a (Primary and Secondary – Excluding Refinery – ‘2’ ). Refineries can be identified via Function Module ZPLANTCLASSIFICATION. The plant must be passed into Import Parameter IP_SAPPLANT and field INT_PLANTCHAR-ATNAM must be looked up with value SAPTYPE. If it exists and field ATWRT contains ‘RFY’, the plant is a refinery.
    •     Product Group can be determined from the Material master through Material group field MARA-MATKL.
    •     Mode of Transport will be passed in the BADI in VTRLK-OIC_MOT.
    •     Select single entry from table ZTABLE1based on Distribution, Mode of Transport and Material Group. If nothing gets selected, error message ‘No entry exists in table ZTABLE1for Distribution (distribution), MOT (MOT) & Mat. Group (material group)’ should be triggered.
    •     Move ZTABLE1-SAKNR  to c_vfkn-sakto and ZTABLE1-KOSTL to c_vfkn-kostl
    •     The Material group must be exported to memory in BADI_SCD_ACCTG
    •     The Material group must be imported from memory in Business Event BP1120P
    •     Free Memory in Business Event BP1120P
    This is VI01 – Creation of Freight Cost Item screen
    and also code for function module ZPLANTCLASSIFICATION below
    FUNCTION zplantclassification .
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(IP_SAPPLANT) LIKE  AUSP-OBJEK OPTIONAL
    *"     REFERENCE(IP_CPSPLANT) LIKE  AUSP-ATWRT OPTIONAL
    *"     REFERENCE(IP_SISLOC) LIKE  AUSP-ATWRT OPTIONAL
    *"  EXPORTING
    *"     VALUE(EP_SAPPLANT) LIKE  AUSP-OBJEK
    *"     VALUE(EP_CPSPLANT) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SISLOC) LIKE  AUSP-ATWRT
    *"     VALUE(EP_OWNERSHIP) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SMISTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SPOTREF) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SUBTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SUPPLYREGION) LIKE  AUSP-ATWRT
    *"     VALUE(EP_TYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_DISTAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_GEOGAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_HMF) LIKE  AUSP-ATWRT
    *"     VALUE(EP_IATACODE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_IRSTCN) LIKE  AUSP-ATWRT
    *"     VALUE(EP_OPSAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_PLANTSTAT) LIKE  AUSP-ATWRT
    *"     VALUE(EP_PORTCODE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_REFAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SAPTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_MFGWARRANTY) LIKE  AUSP-ATWRT
    *"     VALUE(EP_USERTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_TRMCENTER) LIKE  AUSP-ATWRT
    *"     VALUE(EP_TRANSCENTER) LIKE  AUSP-ATWRT
    *"     VALUE(EP_FEIN) LIKE  AUSP-ATWRT
    *"  TABLES
    *"      INT_PLANTCHAR STRUCTURE  ZPLANTCLASSIFICATION OPTIONAL
    *"  EXCEPTIONS
    *"      NO_OBJEK_FOUND
    *"      NO_CPSPLANT_FOUND
    *"      NO_SISLOC_FOUND
    *"      NO_INPUT_FOUND
    *"      VALID_PLANT_NO_CHARACTERISTIC
    *"      ONE_TO_MANY_ISSUE
    *"      PLANT_NOT_FOUND_ZDEF_DELPLANT
    *"      UNKNOWN_ERRORS
    FM Name: ZPLANTCLASSIFICATION     
    Created By  :  SYUB                                                  *
    Description : Function Module to retrieve plant characteristics      *
    The function module has two capabilities:
    1. Retrieve only the necessary characteristics
    2. Retrieve the whole characteristics into an internal table.
    Parameter Description                                                *
    In the future, if there is a new characteristic added to the
    plant classification tables, the characteristic has to be added
    to the list of the export parameters and the loop statement.
      TABLES: ausp, cabn, ksml, zdef_delplant.
      DATA: ws_objek LIKE ausp-objek,
            ws_countchar TYPE i,
            ws_countplant TYPE i.
    *Internal table for SAP plant
      DATA: BEGIN OF int_plant OCCURS 0,
            plant LIKE ausp-objek,
            END OF int_plant.
    *sap plant code is the input parameter.Move objek, atnam, and atwrt to
    *internal table PLANTCHAR using inner join of AUSP, CABN, and KSML to
    *synch up the internal characteristic numbers throughout the 3 tables.
      IF NOT ip_sapplant IS INITIAL.
        SELECT auspobjek cabnatnam ausp~atwrt
          INTO CORRESPONDING FIELDS OF TABLE int_plantchar
          FROM ksml AS ksml
          INNER JOIN cabn AS cabn
            ON cabnatinn = ksmlimerk
          INNER JOIN ausp AS ausp
            ON ausp~objek = ip_sapplant
            AND auspatinn = cabnatinn
            AND ausp~mafid = 'O'
            AND ausp~klart = 'Z01'.
    *Checking the existence of ip_sapplant in the table, if it doesn't
    *exist, raise the exception else if it exists, check if it has
    *characteristic values.
        IF sy-subrc NE 0.
          RAISE no_objek_found.
        ELSE.
          DESCRIBE TABLE int_plantchar LINES ws_countchar.
          IF ws_countchar LT 2.
            RAISE valid_plant_no_characteristic.
          ENDIF.
        ENDIF.
    *cps plant code is the input parameter. Move objek from table AUSP to
    *ws_objek using inner join of CABN and AUSP to match up the internal
    *characteristic numbers from the 2 tables.
      ELSEIF NOT ip_cpsplant IS INITIAL.
        SELECT ausp~objek
          INTO TABLE int_plant
          FROM ausp AS ausp
          INNER JOIN cabn AS cabn
            ON cabn~atnam = 'OLDCODE'
              WHERE auspatinn = cabnatinn
                AND ausp~mafid = 'O'
                AND ausp~klart = 'Z01'
                AND ausp~atwrt = ip_cpsplant.
    *Checking the existence of ip_cpsplant in the table
        IF sy-subrc EQ 0.
    *Counting the number of SAP plants in the internal table int_plant
          DESCRIBE TABLE int_plant LINES ws_countplant.
    *Moving the values of objek, atnam, and atwrt to PLANTCHAR using objek
    *from ws_objek.
          IF ws_countplant EQ 1.
            LOOP AT int_plant.
              SELECT auspobjek cabnatnam ausp~atwrt
                INTO CORRESPONDING FIELDS OF TABLE int_plantchar
                FROM ksml AS ksml
                INNER JOIN cabn AS cabn
                  ON cabnatinn = ksmlimerk
                INNER JOIN ausp AS ausp
                  ON ausp~objek = int_plant-plant
                  AND auspatinn = cabnatinn
                  AND ausp~mafid = 'O'
                  AND ausp~klart = 'Z01'.
            ENDLOOP.
    *If there more than one SAP Plants, then raise an exception.
          ELSEIF ws_countplant GT 1.
            RAISE one_to_many_issue.
          ENDIF.
        ELSE.
          SELECT SINGLE werks FROM zdef_delplant
            INTO ws_objek
            WHERE cpsloc = ip_cpsplant.
          SELECT auspobjek cabnatnam ausp~atwrt
           INTO CORRESPONDING FIELDS OF TABLE int_plantchar
           FROM ksml AS ksml
           INNER JOIN cabn AS cabn
             ON cabnatinn = ksmlimerk
           INNER JOIN ausp AS ausp
             ON ausp~objek = ws_objek
             AND auspatinn = cabnatinn
             AND ausp~mafid = 'O'
             AND ausp~klart = 'Z01'.
          if sy-subrc ne 0.
            raise plant_not_found_zdef_delplant.
          endif.
        ENDIF.
    *cps plant code is the input parameter. Move objek from table AUSP to
    *ws_objek using inner join of CABN and AUSP to match up the internal
    *characteristic numbers from the 2 tables.
      ELSEIF NOT ip_sisloc IS INITIAL.
        SELECT ausp~objek
          INTO TABLE int_plant
          FROM ausp AS ausp
          INNER JOIN cabn AS cabn
            ON cabn~atnam = 'SISLOC'
              WHERE auspatinn = cabnatinn
                AND ausp~mafid = 'O'
                AND ausp~klart = 'Z01'
                AND ausp~atwrt = ip_sisloc.
    *Checking the existence of ip_sapplant in the table
        IF sy-subrc EQ 0.
          DESCRIBE TABLE int_plant LINES ws_countplant.
    *Moving the values of objek, atnam, and atwrt to PLANTCHAR using objek
    *from ws_objek.
          IF ws_countplant EQ 1.
            LOOP AT int_plant.
              SELECT auspobjek cabnatnam ausp~atwrt
                INTO CORRESPONDING FIELDS OF TABLE int_plantchar
                FROM ksml AS ksml
                INNER JOIN cabn AS cabn
                  ON cabnatinn = ksmlimerk
                INNER JOIN ausp AS ausp
                  ON ausp~objek = int_plant-plant
                  AND auspatinn = cabnatinn
                  AND ausp~mafid = 'O'
                  AND ausp~klart = 'Z01'.
            ENDLOOP.
    *If there more than one SAP Plants, then raise an exception.
          ELSEIF ws_countplant GT 1.
            RAISE one_to_many_issue.
          ENDIF.
        ELSE.
          SELECT SINGLE werks FROM zdef_delplant
            INTO ws_objek
            WHERE sisloc = ip_sisloc.
          SELECT auspobjek cabnatnam ausp~atwrt
           INTO CORRESPONDING FIELDS OF TABLE int_plantchar
           FROM ksml AS ksml
           INNER JOIN cabn AS cabn
             ON cabnatinn = ksmlimerk
           INNER JOIN ausp AS ausp
             ON ausp~objek = ws_objek
             AND auspatinn = cabnatinn
             AND ausp~mafid = 'O'
             AND ausp~klart = 'Z01'.
          if sy-subrc ne 0.
            raise plant_not_found_zdef_delplant.
          endif.
        ENDIF.
      ELSE.
    *Checking if there is an input parameter entered.
        RAISE no_input_found.
      ENDIF.
    Modified 7/30 by RFOR to validate SAP plant is in plant master
      data: wa_t001w like t001w.
      read table int_plantchar.
      SELECT SINGLE * from t001w into wa_t001w where
      werks = int_plantchar-objek.
      if sy-subrc ne 0.
        raise NO_OBJEK_FOUND.
      endif.
    *Moving all the characteristic values to the export parameters
      LOOP AT int_plantchar.
        MOVE int_plantchar-objek TO ep_sapplant.
        CASE int_plantchar-atnam.
          WHEN 'OLDCODE'.
            MOVE int_plantchar-atwrt TO ep_cpsplant.
          WHEN 'SISLOC'.
            MOVE int_plantchar-atwrt TO ep_sisloc.
          WHEN 'OWNERSHIP'.
            MOVE int_plantchar-atwrt TO ep_ownership.
          WHEN 'SMISTYPE'.
            MOVE int_plantchar-atwrt TO ep_smistype.
          WHEN 'SPOTREF'.
            MOVE int_plantchar-atwrt TO ep_spotref.
          WHEN 'SUBTYPE'.
            MOVE int_plantchar-atwrt TO ep_subtype.
          WHEN 'SUPPLYREGION'.
            MOVE int_plantchar-atwrt TO ep_supplyregion.
          WHEN 'TYPE'.
            MOVE int_plantchar-atwrt TO ep_type.
          WHEN 'DISTAREA'.
            MOVE int_plantchar-atwrt TO ep_distarea.
          WHEN 'GEOGAREA'.
            MOVE int_plantchar-atwrt TO ep_geogarea.
          WHEN 'HMF'.
            MOVE int_plantchar-atwrt TO ep_hmf.
          WHEN 'IATACODE'.
            MOVE int_plantchar-atwrt TO ep_iatacode.
          WHEN 'IRSTCN'.
            MOVE int_plantchar-atwrt TO ep_irstcn.
          WHEN 'OPSAREA'.
            MOVE int_plantchar-atwrt TO ep_opsarea.
          WHEN 'PLANTSTAT'.
            MOVE int_plantchar-atwrt TO ep_plantstat.
          WHEN 'PORTCODE'.
            MOVE int_plantchar-atwrt TO ep_portcode.
          WHEN 'REFAREA'.
            MOVE int_plantchar-atwrt TO ep_refarea.
          WHEN 'SAPTYPE'.
            MOVE int_plantchar-atwrt TO ep_saptype.
          WHEN 'MFG_WARRANTY'.
            MOVE int_plantchar-atwrt TO ep_mfgwarranty.
          WHEN 'USER_TYPE'.
            MOVE int_plantchar-atwrt TO ep_usertype.
          WHEN 'TERMINALCENTER'.
            MOVE int_plantchar-atwrt TO ep_trmcenter.
          WHEN 'TRANSPORTATIONCENTER'.
            MOVE int_plantchar-atwrt TO ep_transcenter.
          when 'FEIN'.
            move int_plantchar-atwrt to ep_fein.
        ENDCASE.
      ENDLOOP.
    ENDFUNCTION.
    Pls help me out from this problem its very urgent.
    Thanks

    hi SK ,
    process like this .
    in BADI
    method.
    1.Here u have to put ur logic based on the Requirement.
    2.then u have to call BTE like this
    <b>call function 'OPEN_FI_PERFORM_00001020_E'
          tables
            t_bseg = xbseg
            t_bkpf = xbkpf.</b>
    3.Update Ztables.
    endmethod.
    this is sample logic only.First get logic of TS then u will come to know how to do?
    regards
    prabhu

  • Having Problem in access to Source Code Control System (URGENT help needed)

    I am using JDeveloper 9i first time. The repository is in Oracle 8i.
    I have established a connection from JDeveloper 9i to Oracle 8i repository running on Sun Solaris.
    We have created a shared area and my colleague have checked-in some files. I have all access to shared area and I can see the checked-in files, but I am not able to check-out to the local folder.
    I need help to resolve this problem urgently. Please consider this as an SOS call. Thanks

    Hi,
    The JDeveloper help system strongly recommends that you don't use shared workareas in this way. In fact, it's not possible in the beta release of JDeveloper to work this way at all, because there is no way for you both to get the files on to your file system in a way that JDeveloper will recognize.
    The JDeveloper documentation on Repository is a very good source of information on the best way to organize developer workareas (particularly the section on best usage recommendations). The Repository is a very complex product originally intended for much more than just source control and there are many ways of using it. We have necessarily had to focus on a subset of this functionality in JDeveloper, mainly to keep the UI from being excessively complex for new users.
    Here's a summary of the way we recommend working:
    o Create a workarea in the RON which will be used as the basis of developer workareas (developers will not actually use this workarea directly). Make this workarea shared by granting access rights to the PUBLIC role.
    o Each developer uses the Workarea wizard in JDeveloper (Source Control->Configure... in the beta release) to create a developer workarea based on the shared workarea.
    Thanks,
    Brian
    JDeveloper Team
    null

  • C# control event handling with javascript

    How can I get javascript to execute for "onchange" / "OnSelectedIndexChanged" event instead of a CodeBehind method? I think "OnSelectedIndexChanged" event has to be handled by CodeBehind; but how can I replace that (or onchange) with
    a javascript event handler?
    I have the following in my xyz.ascx file:
    <asp:DropDownList ID="ddlTypeCar" CssClass="BatsRefAddressTypes" runat="server"
                      onchange="javascript: testAlert();"
                      OnSelectedIndexChanged="ddlTypeCar_SelectedIndexChanged"
                      AutoPostBack="True" />
    I could not get the javascript to execute, even though I removed OnSelectedIndexChanged="ddlTypeCar_SelectedIndexChanged" and/or set AutoPostBack="false".
    Additionally, I tried added the following in xyz.ascx.cs Page_Load() method.
    ddlTypeOfAddress.Attributes.Add("onchange", "javascript: testAlert();");
    which didn't help.
    Thanks for your help in advance.

    Hi,
    you can control client events instead of server events with javascript
    look this url for more information
    http://www.w3schools.com/js/js_events.asp
    Regards

  • Flex ActiveX Control Event is Missing

    Hi,
    I wrote an ATL CAxDialogImpl based dialog DLL to host a flash
    activex control. When I launched the DLL dialog box from a command
    line C# program, I can get all the events sent from the flash
    activex control to the dialog instance object, e.g. fscommand,
    FlashCall, OnReadyStateChange, etc.
    Now, I try to load the dialog DLL in IE using a simple local
    html with VBScript, the dialog box shows up and the flash shows up
    too. But I can no longer get fscommand, and FlashCall events from
    the Flash activex control to the dialog instance object,
    interestingly, I can still get the OnReadStateChange events.
    I don't know if this is a known problem already, or it's a
    bug, or is there any workaround for it, or I simply did something
    wrong.
    Your help is highly appreciated.
    Best Regards,
    EJIANG

    Hi,
    This is due to security functionality introduced in Flash
    8.0. I have read the
    Security
    Changes in Flash Player 8 and pages linked in the
    fscommand
    function documentation several times but it's unclear for me in
    which sandbox are put files opened in hosted ActveX Flash control.
    If someone knows this would be very helpful.
    Adobe states that embeding Flash Player ActiveX is not
    supported and stays quiet. Maybe SliverLight guys will be more
    comunicative.
    We have resolved this by using AxWebBrowser control and
    hosting the Flash player in a webpage instead of hosting it in
    Flash ActiveX.
    Another solution if you are using only local files is to try
    to use "file://YOUR_PATH_TO_FILE" as an argument for LoadMovie
    method. But this works only on local files.
    Hope this helps

  • SAP 2007 CheckBox Click Event

    Hi Pro,
       I created a checkbox in a Matrix on a form and set up a click event for the checkbox.  If I click once at a time slowly, the click event triggered as noraml.  If I click it twice fast, it only triggered the click event once, not twice.  Is it a bug in SAP 2007?
       One more thing, put a focus on that checkbox column in a matrix, then press the "UP" or "DOWN" arrow key, the focus goes to previous or next row, it works perfect, except why it triggers the click event as well?  Do you think this is wrong?
    Chris

    Hi Chris,
    When you click twice (fast), this translates to et_DOUBLE_CLICK event. Of course, et_CLICK is also fired.
    When you press the "UP" or "DOWN" arrow key, along with et_CLICK event, other events are also fired e.g. et_GOT_FOCUS, et_LOST_FOCUS etc.
    You can use Event Logger tool (part of B1DE) to look at all the events fired when a certain action is performed. This will help you determine which events you want to handle in your code.
    Regards
    Aravind

  • Currency in credit control area - Urgent !

    Hi,
    The client wants to change the currency in the credit control area from SIT (Slovenian Tolar) to EUR ( Euro). Can somebody list the impact of changing the currency in the credit control area.
    Its URGENT !
    Regards
    Karpagam

    Hi,
    I don't think we can change the currency of Credit Control Area after the transaction data is posted. For the same Custome account part of the transactions will be in SIT and part of them in EUR. Even if it allows it leads to inconsistencies in the tables.
    Check whether there are any OSS notes for changing the currency of Credit Control Area.
    Probably, you can consider to set up a new Credit Control Area with EUR currency.
    Thanks
    Murali.

Maybe you are looking for