Urgent: Pagination event

Hi all !
I'm searching for a possibility to handle the click event for the next or previous link of a pagination.
Exactly I want to reset an item, but only when the user clicks on next or previous.
Any ideas how to solve this problem?
Thx
Michal

Just had a quick look at this. In the 'Layout and Pagination' section you can use 'Externally Created Pagination Buttons.'
By looking at what link the automatic ones are building, and incorporating the clear cache URL syntax you might be able to cobble something together.
Someone might come along with a better solution though - the request might be set to some parameter than you can make a process conditional on, but I'm not sure what that might be.

Similar Messages

  • Urgent- Mouse Event ..problem..

    Hello
    I am developing a client server application.
    The client when receives some messages processes it,which is in a while Loop and this while loop is in a thread...these messages are recieved from the server. The client has a gui..on which I want to listen to MouseEvent...so I have overridded processMouseEvent() and for the enableEvents() of components I have used a mask for only the mouseEvent.
    The problem is that it never comes into this method,which should actually come as I have used the enableEvent() of the Component class("will allow the specified event even if a listener is not added").
    What could be the problem?????
    Say
    Class XClient extends Jframe implements Runnable()
    .open a socket connecting to server say "socket"
    input = new DatainputStram(socket.getinputStream);
    ..public void start(){
    enableEvent(AWtEvent.MOUSE_MOVE_EVENT);
    Thread t = new thread(this);
    t.start();
    public void run(){
    while(true){
    String s = input.readUTF();
    processMessage(s)
    protected void processMouseEvent(MouseEvent e){
    do some processing....
    Its urgent.
    Thank you in advance..
    regards
    Oliver

    Dear Friend
    Change the code from
    enableEvent(AWtEvent.MOUSE_MOVE_EVENT);
    to
    enableEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);

  • Urgent: Timer Event

    Hi,
    i have a scenario, were i want to have timer event.
    ie enduser login to the portal(they will do their work in the application ),behind a timer will be running and  after 30 minutes i want to tigger a event.
    if the application is running more than 30 minutes i want print a message, How to know that application is running from last 30 minutes.
    Its urgent & will be Appreciated.
    Thanks
    Maha

    Hi
    I think you must use the IWDTimedTrigger, that automatically triggers an event with specified delay.
    You can set the delay property for the UI element and set it according to your need.
    Hope this link may help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/03/7c6b40dde0980ae10000000a155106/content.htm
    Regards
      - Vinod

  • URGENT:PR event not triggering

    Hi Experts,
                  I am creating a PR through me51n.It should create an event of BUS2009(Releasestepcreated).But not event is triggering.Is it related to some setting in SPRO.Please help me

    Hi Vivek,
    Hope you have gone thru' SAP help for the  customizing requiredfor this scenaro.
    Pls re-check all your customizing steps from MM side and also if you have mentioned the workflow indicators in the MM config, which indicate that workflow has to be used for release starategy.
    Regds,
    Akshay

  • Urgent: onload event in HTMLB

    Hi,
    I am not able to find out what is the name of the event when HTMLB form control gets loaded.
    I am doing some mathematical operations on form load event.
    i.e.In HTML we write <body onLoad "abc()">
    where abc() is a java script function.
    Could anyone please tell me how I can achieve the same in HTMLB?
    I am using HTMLB tagLibs
    The sample format of my code is as follows
    <%@ taglib uri="tagLib" prefix="hbj" %>
    class="src.api.CreateDDSBean" />
    <hbj:content id="createDDSContext" >
      <hbj:page title="createDDSPage">
        <script language="javascript">
         function abc()
        </script>
       <hbj:form id="formCreateDDS">
           //some jsp code with htmlb taglibs
       </hbj:form>
      </hbj:page>
    </hbj:content>
    From where I can get the information regarding various trigger events for various controls?
    Thanks
    Parag

    Hi,
    And to make it more easier to update you could do something like this:
    <script language="JavaScript">
    // alert box
    function abc(){
      alert('this is function abc');
    // set window status
    function xyz() {
      window.status = "this is xyz function";
    // functions for onload
    function myonload() {
      abc();
      xyz();
    window.onload=myonload;
    </script>
    Regards,
    Ville

  • URGENT----- JTree Event

    I have a JTree with parent node---- PARENT1.
    To it are added CHILDNODE1 and CHILDNODE2.
    Another parentnode PARENT2 with CHILDNODE3 CHILDNODE4.
    PARENT1 and PARENT2 added to ROOTNODE
    JTree is added to LHS of JSplitPane
    Similar to Explorer in Windows.
    Added listeners to JTree like this
    mTree.addTreeSelectionListener(new TreeHandler(this));
    mTree.addMouseListener(new TreeHandler(this));
    where TreeHandler is a class extending MouseAdapter and implementing TreeSelectionListener.
    Overidden public void valueChanged(TreeSelectionEvent aTreeEvent)
    by calling aTreeEvent.getPath() and from the obtained path, I determine PathCount and PathComponent.
    Based on this I display Panel on RHS of JSplitPane.
    I have a situation say CHILDNODE1 is selected and corresponding Panel is displayed. If I select CHILDNODE2 with mouse, I prompt for saving changes made to CHILDNODE1 panel...So I should reselect CHILDNODE1 in JTree programmatically and not CHILDNODE2
    I have used mTree.setSelectionPath(path_of_CHILDNODE1) .
    But the problem is it is triggering an event on selection of CHILDNODE1, which I donot want to. How do I stop this????
    and also will call to mTree.setSelectionPath(aPath) trigger a TreeSelectionEvent or my event handling is wrong ?
    Thanks in advance

    If I have understood clearly ur problem, When the other cell in the tree is selected the corresponding rHS componet will be updated is that right. And wht U wanna do is to holp updationg rhs before saving previous content.
    If that is right, then y dont U ask for the save option in the treeevent itself?i mean in the overridden value chnaged function

  • Urgent : One Event alert Cause another Event Alert to Fire Aslo

    Dear Friends,
    i have two event alerts say :
    xx_employee_termination (After Insert - on PER_ALL_PEOPLE_F) -- Fires once i terminate any employee.
    xx_proposal_approved (after update - on PER_PAY_PROPOSALS) -- Fires once i approve any proposed salary
    my issue is
    When i terminate any employee it will update also PER_PAY_PROPOSALS which cause xx_proposal_approved alerts to fire if his status is (Approved)
    So, How to stop firing of Proposal Alert if i terminate any employee?
    Waiting for help friends,
    Regards,

    some would say why did you keep PER_ALL_PEOPLE_F instead of (per_periods_of_service)
    it is same..
    termination would affect Per_all_people_f ,per_pay_proposal ,,,,etc

  • Urgent, merged events

    On my external hard drive I have my Final Cut Events folder set up. The videos that were located in the sub folders were not imported through FCPX but placed in there manually. In FCPX under the year tab there were a list of the events. There were no clips seen by FCP but they were there on the external drive. The events were merged in FCPX but in doing this FCPX seems to have gotten rid of all the files that were in the event folders on the external drive. I can not locate them in my Trash, or anywhere in FCPX. Is there a way to recover this data?

    You really set yourself up for disaster by putting files manually into the Events folder, do a spotlight search for the missing files by name hopefully FCPX put them into a temp folder somewhere.
    Best luck.

  • Urgent:Proration Event group Not firing

    Hello,
    I have setup a Proration event group. What i find is if i set an element with the termination rule as Last Standard Process, then Pro-ration event group doesnt fire , however
    if the termination rule is set as Actual termination rule , then the proration event is firing.
    Can somebody pls explain why this is happening and also i want to pay the employee only till the termination date of the employee. Can someone tell me if i need to set the termination rule to actual termination date?
    Regards,
    Gayatri

    When you set an element with the termination rule as Last Standard Process the 'end date' of the element is set to the last day of the month when the employee gets terminated. This is why the Pro-ration event group doesnt fire.
    You can add the following datetracked events in your proration group and make necessary changes in your fast formula.
    Datetrack Update - PER_ALL_ASSIGNMENTS_F - ASSIGNMENT_STATUS_TYPE_ID
    HTH

  • How to create event alert for particular column get updated

    Hi every one.... plz help me
    How to create oracle event alert when particular column is update. plz help me.... Acutually i need email alert when ever list price for an item column in pricing table get updated+... plz. Its urgent.

    Oracle Event alert is based on update of specific table and not on specific column in table.
    However you can create a trgigger on table which is based on updat of column. And in this trigger you can send a mail using plsql.
    HTH

  • Pagination and remove_sort_preferences

    Oracle 10g, Apex 3.1.1
    Hello,
    I have a dynamic report that uses a SQL Query (PL/SQL function body returning SQL query). The SQL statement is built in a package and depends on the values selected in two Select List With Submit on the page. Since one of the select lists can change the number of result columns, I am using apex_util.remove_sort_preferences immediately before the return statement in the function body. This works great, except that each time the user clicks on a pagination link, the sort preference is reset. I'm wondering if it's possible to somehow preserve the sort preference when the user is moving between results pages, but remove the sort preference when the query changes via the select list. I thought about setting up an application item to store the user's sort preference, but I don't know how to capture the pagination event. Does anyone have any suggestions how I can do this, or is there a more efficient way? I'm using Search Engine 1,2,3,4 (set based pagination). Thanks!
    Lisa

    I think maybe setting the "reset pagination" on the self referencing page branch may serve you better. You can set this page branch with pagination reset to be conditional on the Request being equal to either of your select list names (Select list with submit sets the actual submit request to the name of the item (list) that triggered the submit), then have a default self-page branch that doesn't contain the pagination reset.
    -Richard

  • Paging large results?? - Woodstock + Provider Framework

    I'm using the Table & TableRowGroup components out of the com.sun.webui.jsf.component package. I created a table backed by an ObjectListDataProvider. Since my query will literally return thousands of very large objects, I must implment the provider in such a way that the internal list it wraps only has a page of that data at a time.
    In order to do this, I need to make sure that whenever the user clicks on one of the buttons on some pagination control (page forward, page backward) that the server-side backing UIComponent object gets that updated state.
    I'm already sure that the refresh method on my provider is executing after the ApplyRequestValues phase, but it seems that those state values aren't updated. The UI shows that the page number is moving forward and backward, but the backing UIComponent still shows page=1.
    I've looked at the source for the TablePaginationActionListener, and it seems to respond to the table events of interest (all pagination events), but I don't see how to attach this listener to the table. The javadoc in the class says that it should be attached to the Table component using addActionListener, but I do not see that method available on the Table.
    I even tried adding the listener as a child <f:actionListener> tag. For completeness sake, I tried nesting this tag in the Table, the TableRowGroup, and the TableColumn - but all of them threw exceptions because it's not a valid child tag. So I have no idea how to attach this listener to the table to make sure the server-side model values will stay fresh.
    I want to use the provider framework, but I can't afford to load all of the table data into memory. I need to be able to have the provider contain a single page of data at a time, and for the server-side UIComponent to always be up-to-date (so that my refresh method on the provider always knows which page of data to get from my backing Session Facade).
    Am I using the wrong provider? Is there something fundamental I'm misunderstanding? I'm using 4.0.1 stable release of Woodstock.
    Regards,
    -joseph

    Well the server right now is a 32-bit VM machine, so the memory limit is 1400m on -XMX setting. We are upgrading from the one production machine to 2 production machines with 2 instances of Jboss and 16gb of memory each machine. So each Jboss would theoretically have 7750mb of memory, leaving 512mb for Windows 2003 64-bit. It will help the problem, but only delay capacity.
    Sometimes our data is the exact same, and we are loading it for each user. We may go out and get all the routes for all of our trucks, and refresh that every 5 minutes for each user. Even that piece is taking up probably 2-3mb per user...so if we could streamline that it would help.
    What can you recommend for having a central cache of data say on our Jboss server that we update say every 5 minutes, and multiple users could access it? I was looking into EJB 3.0, but they are a little confusing when it comes to persistence, and I have not found a good example of a bean holding a cache of data, and having a way to refresh every X minutes.
    How much memory can JVM take up for the heap on a 64-bit machine?

  • Description

    AT SELECTION SCREEN OUTPUT
    AT SELECTION-SCREEN ON VALUE-REQUEST
    AT SELECTION-SCREEN ON HELP-REQUEST
    AT SELECTION-SCREEN ON
    AT SELECTION-SCREEN ON BLOCK
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP
    can any one explain these events in detail and when they will trigger .Its urgent please

    Hi,
    EVENTS in ABAP Report
    These are the Events(In order of execution) in ABAP Report
    1.INITIALIZATION
    2.AT SELECTION SCREEN OUTPUT
    3.AT SELECTION-SCREEN ON VALUE-REQUEST
    4.AT SELECTION-SCREEN ON HELP-REQUEST
    5.AT SELECTION-SCREEN ON
    6.AT SELECTION-SCREEN ON BLOCK
    7.AT SELECTION-SCREEN ON RADIOBUTTON GROUP
    8.AT SELECTION-SCREEN
    Selection screen processing starts after the INITIALIZATION event with AT SELECTION SCREEN OUTPUT. The selection screen is then sent to the screen. User actions on the selection screen result in other events that are either used for field or possible entries help, or that trigger PAI processing of the selection screen. During PAI processing, error messages in the relevant event blocks allow users to return to the selection screen. Only if the AT SELECTION-SCREEN event is exited properly, that is not through an error message, are the other events of the executable program triggered, starting with START-OF-SELECTION.
    <b>INITIALIZATION</b>
    This event occurs before the standard selection screen is called. You can use it, for example, to initialize the input fields of the standard selection screen. This is the only possible way to change the default values of parameters or selection criteria defined in logical databases. To change a selection criterion, you must fill at least the components <seltab>-SIGN,
    <seltab>-OPTION, and <seltab>-LOW of the selection table <seltab>, otherwise it remains undefined.
    In the PBO of the selection screen, the
    <b>AT SELECTION-SCREEN OUTPUT</b>
    event is triggered. This event block allows you to modify the selection screen directly before it is displayed.
    <b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field></b>
    The event is triggered when the user calls the F4 help for the field <field>. If no corresponding event block has been defined, the possible values help from the ABAP Dictionary is displayed, or none at all if the field has no Dictionary reference. If a corresponding event block exists, it takes precedence over the default possible values help mechanism. It is then up to the programmer to ensure that an appropriate list of values is displayed, and that the user can choose a value from it.
    You cannot declare the event block AT SELECTION-SCREEN ON VALUE-REQUEST for input fields on the selection screen that are declared within a logical database. You cannot override the possible values help mechanism of a logical database within the program. You can define separate help within the logical database program using the VALUE-REQUEST option in the PARAMETERS and SELECT-OPTIONS statements.
    <b>AT SELECTION-SCREEN ON HELP-REQUEST FOR <field></b>
    The event is triggered when the user calls the F1 help for the field <field>. If no corresponding event block has been defined, the help from the ABAP Dictionary is displayed, or none at all if the field has no Dictionary reference. If a corresponding event block exists, it takes precedence over the default help mechanism. It is then up to the programmer to ensure that appropriate help is displayed.
    You cannot declare the event block AT SELECTION-SCREEN ON HELP-REQUEST for input fields on the selection screen that are declared within a logical database. You cannot override the help mechanism of a logical database within the program. You can define separate help within the logical database program using the HELP-REQUEST option in the PARAMETERS and SELECT-OPTIONS statements.
    <b>AT SELECTION-SCREEN ON <field></b>
    In the PAI event of the selection screen, the event
    is triggered when the contents of each individual input field are passed from the selection screen to the ABAP program. The input field <field> can be checked in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.
    <b>AT SELECTION-SCREEN ON BLOCK <block></b>
    In the PAI event of the selection screen, the event
    is triggered when the contents of all of the fields in a block are passed from the selection screen to the ABAP program. You define a block by enclosing the declarations of the elements in the block between the statements SELECTION-SCREEN BEGIN OF BLOCK <block> and SELECTION-SCREEN END OF BLOCK <block>. You can use this event block to check the consistency of the input fields in the block. If an error message occurs within this event block, the fields in the block are made ready for input again on the selection screen.
    <b>AT SELECTION-SCREEN ON RADIOBUTTON GROUP <radi></b>
    In the PAI event of the selection screen, the event
    is triggered when the contents of all of the fields in a radio button group are passed from the selection screen to the ABAP program. To define a radio button group <radi>, use the addition RADIOBUTTON GROUP <radi> in the corresponding PARAMETERS statements. This event block allows you to check the whole group. If an error message occurs within this event block, the radio button group is made ready for input again on the selection screen. The individual fields of radio button groups do not trigger the event AT SELECTION-SCREEN ON <field>.
    <b>AT SELECTION-SCREEN</b> is the basic form of a whole series of events that occur while the selection screen is being processed.
    The standard selection screen in an executable program or in the logical database linked to it is automatically called between the INITIALIZATION and START-OF-SELECTION events. When you call the selection screen, and when users interact with it, the ABAP runtime environment generates selection screen events, which occur between INITIALIZATION and START-OF-SELECTION.
    Regards,
    Ranjit Thakur.
    <b>Please Mark The Helpful Answer.</b>

  • 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

  • Mouse down event and Click event in List Box Very urgent.

    Hi,
           How can i differentiate mouse down and itemclick in ListBox.Its very urgent.
    Regards,
    Jayagopal.

    Nick wrote:
    Turns out need update value while typing turned on if you want to gaurantee a correct read of a text input control in a mouse down event.
    AFAIK, "Update value while typing" will trigger only a Value Change event of the Str Ctl.
    Mouse Down event will preceed a Value Change event, if you have both the event cases configured in your code.
    - Partha
    LabVIEW - Wires that catch bugs!

Maybe you are looking for

  • New Hard Drive Won't Configure

    I just bought a new Hard Drive (Crucial 256gb SSD) and physically installed it. However I am having problems configuring it. When I C or option boot and go to Diskutil and erase/partition the drive I get the same error: "POSIX reports: the operation

  • ALV - Desactivate Check box on a specific line

    Hello all, I need your help for desactivate my checkbox on ALV GRID on specific line. See on the screen shot on the link : http://www.casimages.com/img.php?i=101006040322252671.jpg See the implementation of my ALV and my Catalog : g_container type sc

  • How to calculate number of days between two date in Template design?

    Hello guys I have a situation where I have to create a template that returns data, and one of the thing of the existing report is that there is a column that is actually the number of days between start date and end date columns.. So in template, how

  • Flash Media Server 3 and Adobe Connect 6.0 SP2

    Hi all, I have a doubt. It's possible to run Adobe Connect Server 6.0 SP2 and Flash Media Server 3 in the same machine? Thnx.

  • BLOB causing FRM-40505

    Any clue why a blob field in a datablock would cause an FRM-40505 (query failed). This only happens only after I upload to the server (Forms Servlet and 9iDB). Works fine in the developer (client/server mode). HELP!