Detecting which line the User is Editing IN table control

Hi,
I am doing a Dialog programming where there is a Table control. Now the problem is I have to decide to checks  certain rules based on data entered in the Table control. But the Rules should be applicable only to the Row in which the User is entering data. And even if the the same rules are failing in another Row of the Table control it should not get validated i.e The rule should be applicable only to the ROW the user is entering the data or Changing the Data.
How do i sense in which row the User is entering data in the PAI of the Table control.

You will have to use GET CURSOR,  please do F1 help on GET CURSOR,  your answer is there.
You will be doing something like this.....
DATA: CURSORFIELD(20) TYPE C,
      CURSORLINE TYPE I,
      CURSORVALUE(20) TYPE C.
GET CURSOR FIELD CURSORFIELD LINE CURSORLINE VALUE CURSORVALUE.
* To know exactly which line in the internal table you
* must account for which page of table control the user
* is currently one,  so you need to add the TOP_LINE
* value from the table control to find the exact
* internal table row
* Set cursorline and read table.
  CURSORLINE = ( CURSORLINE + <table_control>-TOP_LINE ) - 1.
Regards,
Rich Heilman
Message was edited by: Rich Heilman

Similar Messages

  • How to use progress indicator which block the user for editing ?

    Hi All,
    I have a requirement where i need to show a round progress bar while processing to the database.For example :- I have a bounded taskflow and inside it I have a two jspx page called as "First.jspx" and "Second.jspx".And i have two textboxes and one "Save" button on first.jspx page.
    Now when user puts the values in the textboxes and hits the "Save" button , my ticker or progress indicator should say "Please wait while processing" and as soon as the transaction is complete , i need to show another page which is "Second.jspx" page. "Save" button action has method inside a managed bean which has some functionality and then it executes the VO(View Object) and commits the data.
    How should i implement the indicator?
    I have read this article :- http://www.oracle.com/technetwork/developer-tools/adf/learnmore/42-progressbarcolor-169184.pdf but it doesn't fit to my requirement.I need indicator which holds the user to edit anything on the page.Like what we get when we do any transaction in banks while navigating to payment gateway.
    Please suggest!!!
    Thanks and Regards,
    Shah

    Hi Shah,
    The answer was around the same are that you were looking into. http://www.oracle.com/technetwork/developer-tools/adf/learnmore/27-long-running-queries-169166.pdf but the sample was the 27.
    - Juan Camilo

  • How to insert a dialog box which prompt the user enter the general information in the SDI application?

    Im using the SDI application to build a system and now i would like to insert a dialog box which allow the user to enter the general information about themselves and then it will be saved into a text file. How to insert the dialog box and show the dialog box at the beginning of the program.

    Hi Lee,
    The easyest way to achieve this is to declare an object of your dialog box derived class (e.g. CUserInfo, public CDialog) into the InitInstance method of the main application class.
    Depending on the behavior you want you can place the code before dispatching the commands from command line (in which case the main frame of the SDI application will not be shown), or after, in which case the UserInfo dialog box will be shown over the main application window as modal.
    The code snipped bellow can be more helpfull:
    BOOL CSDIApp::InitInstance()
    AfxEnableControlContainer();
    // Parse command line for standard shell commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);
    //prompt user for data
    CUserInfo dlg;
    if (dlg.DoModal() == IDOK)
    //do something here with the data
    else
    return FALSE;//i.e. quit the application if the user presses the 'Cancel' button
    // Dispatch commands specified on the command line
    if (!ProcessShellCommand(cmdInfo))
    return FALSE;
    // The one and only window has been initialized, so show and update it.
    m_pMainWnd->ShowWindow(SW_SHOW);
    m_pMainWnd->UpdateWindow();
    return TRUE;
    Hope this helps,
    Silvius
    Silvius Iancu

  • How to show asterisk * effect once the user starts editing the document??

    I wrote a java text editor. I creat a new internal frame and allows to open a document.
    How to have an effect (an asterisk * follows the filename in title bar) once
    the user starts editing the document? And once I save that file, that asterisk * will
    disappear. It seems to me we need to add a listener, but not sure how to change
    the title bar of internal frame??

    just use DocumentListener like
    myTextArea.getDocument().addDocumentListener(new DocumentListenet(){
    public void changedUpdate(DocumentEvent e){
    frame.setTitle( frame.getTitle() + "*" );
    implements two other methods too

  • Wanted: Popup which allows the user to enter one string

    Hello,
    as the topic states, I am searching for a (modal) popup which lets the user enter one string in a text field and returns this string.
    I am currently using the function module 'POPUP_TO_GET_ONE_VALUE' for this purpose which works quite good - BUT it has one major drawback: the string that is returned is entirely in capital letters. This is not acceptable as I want to build a case-sensitive search based on the input...
    Any suggestions are greatly appreciated !
    Best regards,
    Patrick

    Anand,
    I'm just finished with your first reply - checked out 'POPUP_TO_SEARCH_VALUE' - and you already gave a second option - marvellous !
    Will try the other one out right now.
    You are right, the parameters that reference to the DDIC made me wonder and decide against this FM when I searched through all the available popups some time ago.
    To your first reply:
    the popup is quite good. It does indeed deliver a 'case preserved' string. What I don't like is the checkbox and the fact, that the confimation button is labeled 'search' rather than just the 'ICON_OK'. I should mention at this point that I reuse the popup in other scenarios where the string is not used for a search but to name certain objects. Again an all uppercase string (or all lowercase string as well) is unwanted.
    Now on to the second popup...
    Regards,
    Patrick

  • Roles for the user to Edit the Dimension without being an administrator

    Dear Users,
    I have a query based on Planning security.
    I want the user to edit the dimensions and members in planning application. However, the user cannot be administrator.
    I have created a user and assigned the role of "Interactive User" on Planning roles and of "Dimension Editor" on Shared Services access. With this provisioning user the "Administration-->Dimension" is grayed out for the user.
    Please suggest if roles can be assigned to the user in order to Edit the Dimension without being an administrator?
    Regards,
    Praveen.

    I am sure this question gets asked over and over, they need to be an administrator.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to determine which cell the user has just left?

    I want to check the contents of a JTable cell just after the user has left that cell.
    What is the most reliable way to determine which cell the user has just left?

    Hi,
    I use the cellRenderer for that... if the value is not correct, I call an editCellAt() method...
    JRG

  • Restrict the user to edit Activity

    Hi guys
    What will be the validation for the below scenarion
    1) To restrict the user to edit any activity a " 5 Days after the close of the month". for eg is a activity is created on 13/02/2011 , it can be edited till 05/03/2011
    Waiting for the solutions

    Another approach will be to use a pair of dynamic pages. Dynamic Pages for Task are base on "Type".
    So if you have Types like ToDo, CallBack, Research create 3 more as ToDo-RO, CallBack-RO, Research-RO
    Make copies of the Task Pages that you use for ToDo, CallBack, Research and make all the field as Read Only.
    So "Cust ToDo Task Page" is copies as "Cust ToDo Task Page - RO" and so on
    All fields in the - RO pages are Read Only.
    Create a Dynamic Page and assign the correct pages to the Type Values
    Type "ToDo" has the "Cust ToDo Task Page"
    Type "ToDo-RO" has the "Cust ToDo Task Page - RO"
    and so on
    Create an field "RecordRO" with Field Type "Checkbox" called Default Value as "N". Have a workflow set this field as "Y" on appropriate event or time tigger.
    In your case one workflow will be Time triggered to set this to Y on 5th of Month post the creation. So simply export on 4th or 5th night all Records that have the filed as N and reimport the Field as Y. Else use a WebService.
    Have one more workflow (Workflow Expression could be like FieldValue('<bRecordRO_ITAG>') = "Y") to set Type as PreValue of Type +"-RO"; Update Expression will be PRE('<Type>') + "-RO" with Overwrite Existing Values as TRUE
    Let me know if this works for you.
    How much we miss the On Premise State Models :-(.

  • One row as editable and other row as non-editable in table control

    Hi Experts,
               Is this possible to make one row as editable and another row is non editable in table control?
    My Requirement is
    1st row non editable field
    Customer code, description,amount will come from the previous screen this will be non editable for user.
    2nd row editable
    User has to enter the amount in 2nd row here the customer code description will be empty.
    If 4 customer are there
    1,3,5,7 should be non editable and 2,4,6,8 should be editable..
    Pls help me in this issue..
    Thanks in Advance!

    hI
    This is a simple Module POOL program with only Table control and nothing else
    " This is Tested to Enable one row and disabling the next row
    in TOP Include
    controls : tc type tableview using screen 100.
    DATA : OK TYPE SY-UCOMM.
    DATA : ITAB TYPE TABLE OF SPFLI WITH HEADER LINE.
    in PBO
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      LOOP AT itab WITH CONTROL tc.
       MODULE TC_MOD.
      ENDLOOP.
    in PAI
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
      LOOP AT itab.
      ENDLOOP.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'TEST'.
      SET TITLEBAR 'TEST'.
      DESCRIBE TABLE itab LINES tc-lines.
      IF tc-lines = 0.
        tc-lines = 20.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE tc_mod OUTPUT.
      DATA : mod TYPE i.
      LOOP AT SCREEN.
        mod =  tc-CURRENT_LINE MOD 2  .
        IF mod = 1.
          IF screen-name = 'SPFLI-CARRID'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " TC_MOD  OUTPUT
    Edited by: Ramchander Krishnamraju on Jan 25, 2011 7:17 AM

  • Adding quantity field for the same material number in Table control

    Hello Experts,
    I have an requirement, where I need to add the quantity field when the material number is repeated in a table control.
    Here I show the pop-up message "Material already exists, do you want to add the quantity". If the user clicks on Yes I need to add the quantity.
    I created the pop-up message using the FM " POPUP_TO_CONFIRM" and tried to add the quantity filed using COLLECT statement but I couldn't because my non-numeric field value will be different and it will insert new entry with same material in my internal table.
    I have a z data base table & internal table with the below fields in it.
    Best Regards,
    Mani

    hi deepthi,
    chk a sample one which will help u. <b><i>f4 hlp in table control</i></b>
    * Screen flow logic........
    PROCESS BEFORE OUTPUT.
    *MODULE PBO_MODULE.
    PROCESS AFTER INPUT.
    *MODULE PAI_MODULE.
    PROCESS ON VALUE-REQUEST. "F4
      FIELD EKPO-EBELP MODULE help_ekpo.
    * populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
    *&      Module  help_responsibility  INPUT
    *       text
    MODULE help_ekpo INPUT.
    **Transport values to table dynpro/screen table control
      DATA: l_stepl LIKE  sy-stepl,
            l_indx  LIKE  sy-stepl.
      DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.
    * Adjust for scroling within table control
      CALL FUNCTION 'DYNP_GET_STEPL'
        IMPORTING
          povstepl        = l_stepl
        EXCEPTIONS
          stepl_not_found = 0
          OTHERS          = 0.
      l_indx = tc_ekpotable-top_line + l_stepl - 1.
              "tc_ekpotable should already have been declared
      REFRESH dynpfields.
      CLEAR   dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELN'.
      dynpfields-fieldvalue = '00010'   "wa_ekpo-ebeln.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELP'.
      dynpfields-fieldvalue = '00020'   "wa_ekpo-ebelp.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname     = 'SAPLZZ_EKKO'    "Program name
          dynumb     = '0100'           "Screen number
        TABLES
          dynpfields = dynpfields
        EXCEPTIONS
          OTHERS     = 0.
    ENDMODULE.                 " help_ekpo  INPUT
    rgds
    Anver
    <b><i>if hlped kindly mark points</i></b>

  • In the component overview screen of CO01 I want  to disable all  the field in  screen of table control.I want to make it as output screen only.

    Hi all
      In the component overview screen of CO01 I want  to disable all  the field in  screen of table control.I want to make it as output screen only.
    Thanks & Regards,
    Rajib.

    Isn't that just exactly what transaction CO02 does? CO01 is for creating production orders so what sense does it make to have it display mode only?
    Maybe your goal is to stop then end user changing the component assignment that is automatically  detected by the system. If so, personally I think a better starting point would be PP configuration or user authorizations rather than looking to change the screen by whatever method. As we don't know what you are trying to achieve it's hard to offer much more advice maybe all you need is to change transaction to CO02

  • What are the prerequisites before creating a Table Control?.

    What are the prerequisites before creating a Table Control?.

    It depends on the kind of application you want to develop....You can use Editable ALV or Table Control......
    If you need a table control...The best is create an Structure in SE11 to assing the fields to the table....It's easy -;)
    Greetings,
    Blag.

  • How to findout Which are the User Exist had been activated for T.Code

    Hi Everybody,
    -->I want to know, what are the user exits have been activated or used for a particular t.code.
    --> I will give a small example it will be give clear idea on my question.
    -->For my client, they used lot of user exist and screen exist in the sales order screen,how to find out them. Is their any easy way to find out which are user exist had been acitviated for a particular template.
    Regards,
    Madhan

    If you mean how to see a user list with the T-Code they are using.
    Then you can just use T-Code SM04.
    It will give all the information about those user.
    Or If you mean User Exists.
    then please use this link
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    Thanks,
    Sugauli
    Edited by: Sugauli on Dec 11, 2008 9:20 PM

  • How to find which are the user exits that updating z table.

    There was a question posted by someone else which said:
    I have a z table. my requirement is to find the user exits that update the value to this table?
    but my requirement is to get only those user exits that update my z table.
    Before that question was rejected, it got 5 replies which made me think that this tip is worth sharing.
    So the steps are:
    Do a where-used list search from SE11
    Click on Search Range button at bottom
    Type UPDATE (you can also add Insert, Delete etc to select-option) to ABAP Key Words field
    Say No to the popup that asks whether to include Fields of the Table
    Result will show relevant programs with code snippets doing static Update on that custom table.

    EWK1 would be too performance heavy in this case. It scans the source code to get the result.
    You can however, download the list of programs given in where-used list, and give that as limiting condition in EWK1 or some other code scanning utility.
    Using my method, where-used list of table is taken from database tables, and then code scanning is done only on the that list, not on entire Z* programs.
    Try it yourself to notice the speed difference.

  • How to end showing the JTextfild in a JTable, after the user ended editing?

    Hi,
    I created a JTable with an own TableModel and I wrote my own
    editingStopped function:
    public void editingStopped(ChangeEvent e)
    String helpName = new String(Framed.currentGame.players.getPlayerNames()[getEditingRow()]);
    JTextField helpNewName = (JTextField)getEditorComponent();
    Framed.currentGame.players.setName(helpName, helpNewName.getText());
    Well everything works fine, except that the JTextfield doesnt go away after the user clicked on another cell. How can I return to show the cell instead of the JTextfield used for editing?

    Or if the value is String you may try:
    Object obj = table.getValueAt(i,j);
    String str=null;
    if (obj instanceof String){
    str = (String) obj;
    }

Maybe you are looking for

  • Background Job is not creating the List ID

    Hello Experts, I am scheduling a program as a Background Job. When I go and check the tables TBTCP & TBTCO, I see the List ID field (TBTCP-LISTIDENT or TBTCO-LISTIDENT) value as 0 . Hence I am not able to get the Spool ID for this List. Can anybody p

  • Reader 10 Internal Error

    I'm using reader 10 on my machine using win 7 home premium in Firefox 5. When trying to open a pdf in the browser I get an error box saying " an internal error occured" and that's  all it says. I tried the fix install, and tried to un- and re-install

  • Importing calendar into iCloud on a Windows PC

    I cannot figure out how to import my calender en masse from Google. I have a Windows (7) PC and an iPhone (6) on iOS 8. I do not have a Mac I have Google contacts in iCal (.ics) format. I have an iCloud account. I have observed the following problems

  • Mac jam at the apple logo.

    i was downloading an update, but i had to restart before it finishes. while restarting it asked me if i want to install the update or not, i said yes. after few minutes it gave me an error. then i restated my macbook. after that  it keeps jamming at

  • Free disk space recommendation

    Hi, I have a question about free disk space recommendation. My system now has <25% free space at ASP3, I can't see any problems until now, but I think that I can some troubles in the future depending on DB growth, it isn't? Have you any tip about thi