How to modify array elements from a separate class?

I am trying to modify array elements in a class which populates these fields by reading in a text file. I have got mutator methods to modify the array elements and they work fine in the same class.
public class Outlet {
     private Outlet[] outlet;
     private String outletName;
     private int phoneNumber;
     private int category;
     private int operatingDays;
static final int DEFAULT = 99;
     public void setPhoneNumber(int newPhoneNumber) {
          phoneNumber = newPhoneNumber;
     public void setCategory(int newCategory) {
          category = newCategory;
     public void setOperatingDays(int newOperatingDays) {
          operatingDays = newOperatingDays;
public static void readFile(Outlet[] outlet) throws FileNotFoundException {
          Scanner inFile = new Scanner(new FileReader("outlets.txt"));
          int rowNo = 0;
          int i = 0;
          String outletValue;
          while (inFile.hasNext() && rowNo < MAXOUTLETS) {
               outlet[rowNo] = new Outlet();
               outletValue = inFile.nextLine();
               outlet[rowNo].setOutletName(outletValue.toUpperCase());
               outlet[rowNo].setPhoneNumber(DEFAULT);
               outlet[rowNo].setCategory(DEFAULT);
               outlet[rowNo].setOperatingDays(DEFAULT);
          inFile.close();
     public static void displayUnassignedOutlets(Outlet[] outlet) {
          int i = 0;
          System.out.println("Showing all unassigned Outlets");
          System.out.println(STARS);
          for (i = 0; i < MAXOUTLETS; i++ ) {
               if (outlet.getCategory() == DEFAULT) {
               System.out.println("\nOutlet Number: " + (i + 1) + "\t" +
                         outlet[i].getOutletName());
Now in the other class that I want to modify the array elements I use the following code but I get an error that "The expression type must be an array but a Class ' Outlet' is resolved".
So how can I modify the array elements? What do I have to instantiate to get the following code to work?
public class Franchise {
     private Franchise[] franchise;
     public Outlet[] outlet;
     public static void createFranchise(Franchise[] franchise) throws FileNotFoundException {
          Scanner console = new Scanner(System.in);
          int choice = -1;
++++++++++++++++++++++++++++++++++++
          Outlet outlet = new Outlet();
          Outlet.readFile(outlet.getOutlet());
++++++++++++++++++++++++++++++++++++
          boolean invalidChoice = true;
          while (invalidChoice) {
          System.out.println("\nCreating a New Franchise...");
          System.out.println(STARS);
          System.out.println("Please select an outlet from the list below");
          Outlet.displayUnassignedOutlets(outlet.getOutlet());
          choice = console.nextInt();
          if (choice < 0 || choice > 10) {
               System.out.println("Error! Please choose a single number between 1 and 10");               
          else {
               invalidChoice = false;
          invalidChoice = true;
          while (invalidChoice) {
               System.out.println("Please enter the Phone Number for this Outlet");
               choice = console.nextInt();
               String phone = new String();
          phone = new Integer(choice).toString();
               if (phone.length() < 8 || phone.length() > 10) {
                    System.out.println("Error! Please enter 8 to 10 digits only");
               else {
+++++++++++++++++++++++++++++++++++++++
                    outlet[(choice - 1)].setPhoneNumber(choice);
+++++++++++++++++++++++++++++++++++++++
                    invalidChoice = false;

Hi Pete!
Thanks for your comments. I have included my full classes below with their respective driver modules. Hope this helps out a bit more using the code tags. Sorry, it was my first posting. Thanks for the heads up!
import java.util.*;
import java.io.*;
public class Outlet {
     public Outlet[] outlet;
     private String outletName;
     private int phoneNumber;
     private int category;
     private int operatingDays;
//     private Applicant chosenApplicant;
     static boolean SHOWDETAILS = false;
     static final String STARS = "****************************************";
     static final int MAXOUTLETS = 10;
     static final int DEFAULT = 99;
     public Outlet[] getOutlet() {
          return outlet;
     public String getOutletName() {
          return outletName;
     public int getPhoneNumber() {
          return phoneNumber;
     public int getCategory() {
          return category;
     public int getOperatingDays() {
          return operatingDays;
     public void setOutletName(String newOutletName) {
          outletName = newOutletName;
     public void setPhoneNumber(int newPhoneNumber) {
          phoneNumber = newPhoneNumber;
     public void setCategory(int newCategory) {
          category = newCategory;
     public void setOperatingDays(int newOperatingDays) {
          operatingDays = newOperatingDays;
     public Outlet() {
          outlet = new Outlet[10];
     public static void readFile(Outlet[] outlet) throws FileNotFoundException {
          Scanner inFile = new Scanner(new FileReader("outlets.txt"));
          int rowNo = 0;
          int i = 0;
          String outletValue;
          while (inFile.hasNext() && rowNo < MAXOUTLETS) {
               outlet[rowNo] = new Outlet();
               outletValue = inFile.nextLine();
               outlet[rowNo].setOutletName(outletValue.toUpperCase());
               //System.out.println(rowNo % 2);
          //     if (rowNo % 2 == 0) {
               outlet[rowNo].setPhoneNumber(DEFAULT);
               outlet[rowNo].setCategory(DEFAULT);
               outlet[rowNo].setOperatingDays(DEFAULT);
//               System.out.println("Outlet Name+++++++  " + rowNo + "\n" + outlet[rowNo].getOutlet());               
               rowNo++;
     //          System.out.println(rowNo);
          if (SHOWDETAILS) {
               if (rowNo > 6) {
                    for (i = 0; i < rowNo; i++ ) {
                         System.out.println("\nOutlet Name+++++++  " + (i + 1) + "\t" +
                                   outlet.getOutletName());
          inFile.close();
     public static void displayAllOutlets(Outlet[] outlet) {
          int i = 0;
          System.out.println("Showing All Outlets");
          System.out.println(STARS);
          for (i = 0; i < MAXOUTLETS; i++ ) {
               System.out.println("\nOutlet Number: " + (i + 1) + "\t" +
                         outlet[i].getOutletName());
     public static void displayUnassignedOutlets(Outlet[] outlet) {
          int i = 0;
          System.out.println("Showing all unassigned Outlets");
          System.out.println(STARS);
          for (i = 0; i < MAXOUTLETS; i++ ) {
               if (outlet[i].getCategory() == DEFAULT) {
               System.out.println("\nOutlet Number: " + (i + 1) + "\t" +
                         outlet[i].getOutletName());
     public static void main(String[] args) throws FileNotFoundException {
          Outlet start = new Outlet();
          Outlet.readFile(start.getOutlet());
          Outlet.displayUnassignedOutlets(start.getOutlet());
================================
So in the below Franchise class, when I specify:
outlet[(choice - 1)].setPhoneNumber(choice);
I get the error that an array is required but the class Outlet is resolved. Any feedback is greatly appreciated!
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.*;
public class Franchise {
     private Franchise[] franchise;
     public Outlet[] outlet;
     static final int MAXOUTLETS = 10;
     static final int DEFAULT = 99;
     static boolean SHOWDETAILS = false;
     static final String STARS = "****************************************";
     static final double REGHOTDOG = 2.50;
     static final double LARGEHOTDOG = 4;
     static final int SALESPERIOD = 28;
     static final int OPERATINGHOURS = 8;
     public Franchise[] getFranchise() {
          return franchise;
     public Franchise() {
     public static void createFranchise(Franchise[] franchise) throws FileNotFoundException {
          Scanner console = new Scanner(System.in);
          int choice = -1;
          //franchise[i] = new Franchise();
          Outlet outlet = new Outlet();
          //outlet[i] = new Franchise();
          Outlet[] myOutlet = new Outlet[10];
          Outlet.readFile(outlet.getOutlet());
          boolean invalidChoice = true;
          while (invalidChoice) {
          System.out.println("\nCreating a New Franchise...");
          System.out.println(STARS);
          System.out.println("Please select an outlet from the list below");
          Outlet.displayUnassignedOutlets(outlet.getOutlet());
          choice = console.nextInt();
          if (choice < 0 || choice > 10) {
               System.out.println("Error! Please choose a single number between 1 and 10");               
          else {
               invalidChoice = false;
          //System.out.println(j);
          invalidChoice = true;
          while (invalidChoice) {
               System.out.println("Please enter the Phone Number for this Outlet");
               choice = console.nextInt();
               String phone = new String();
              phone = new Integer(choice).toString();
               if (phone.length() < 8 || phone.length() > 10) {
                    System.out.println("Error! Please enter 8 to 10 digits only");
               else {
                    outlet[(choice - 1)].setPhoneNumber(choice);
                    invalidChoice = false;
          invalidChoice = true;
          while (invalidChoice) {
               System.out.println("Please enter the category number for this Outlet");
               choice = console.nextInt();
               if (choice < 1 || choice > 4) {
                    System.out.println("Error! Please choose a single number between 1 and 4");
               else {
                    outlet.setCategory(choice);
                    invalidChoice = false;
          invalidChoice = true;
          while (invalidChoice) {
               System.out.println("Please enter the Operating Days for this Outlet");
               choice = console.nextInt();
               if (choice < 5 || choice > 7) {
                    System.out.println("Error! Please choose a single number between 5 and 7");
               else {
                    outlet.setOperatingDays(choice);
                    invalidChoice = false;
//          Applicant chosenApplicant = new Applicant();
     //     Applicant.readFile(chosenApplicant.getApplicant());
          //Applicant.checkCriteria(chosenApplicant.getApplicant());
     //     System.out.println("This Franchise has been assigned to : " +
          //          chosenApplicant.displayOneEligibleApplicant());
          Outlet.displayUnassignedOutlets(outlet.getOutlet());
     public static void main(String[] args) throws FileNotFoundException {
          Franchise start = new Franchise();
          Franchise.testing(start.getFranchise());
          //Franchise.createFranchise(start.getFranchise());
          //Franchise.displaySalesForcast();
          //Franchise.displayAllFranchises(start.getOutlet());

Similar Messages

  • How to Call a method from a separate class...?

    Hi there...
    I have a class name HMSCon which has a method named con...
    method con is the one the loads the jdbc driver and establishes the connection....Now!I have a separate class file named TAQueries,this is where i am going to write my SQL Statements...any idea how to use my variables from HMSCon to my TAQueries class???
    here's my code:
    public class HMSCon{
    public static void con(){
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url="jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=" +
    "E:/samer/HardwareMonitoringSystem/src/hms/pkg/hmsData.mdb";
    Connection cn = DriverManager.getConnection(url,"Admin", "asian01");
    }catch(Exception s){
    System.err.print(s);}
    here's my seperate class file TAQueries,i put an error message below..
    class TAInfoQueries{
    public void insertNewTA(String TAID,String Fname,String Mname, String Lname,String Age,
    String Bdate,String Haddress,String ContactNo){
    // Statement stmt=cn.createStatement(); ERROR: Cannot find symbol cn.
    // stmt.executeUpdate("INSERT INTO TechnicalAssistants VALUES('sdfas','sdfsdf','sdfdsf','sdfdsf',3,04/13/04,'asdf','asdfsdf')");
    // stmt.close();
    }

    You can try the below code, but it's a bad idea to use staitc member for connection:(
    public class HMSCon{
    static Connection cn;
    static{
    con();
    public static void con(){
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url="jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=" +
    "E:/samer/HardwareMonitoringSystem/src/hms/pkg/hmsData.mdb";
    cn = DriverManager.getConnection(url,"Admin", "asian01");
    }catch(Exception s){
    System.err.print(s);}
    here's my seperate class file TAQueries,i put an error message below..
    class TAInfoQueries{
    public void insertNewTA(String TAID,String Fname,String Mname, String Lname,String Age,
    String Bdate,String Haddress,String ContactNo){
    // Statement stmt=HMSCon.cn.createStatement(); ERROR: Cannot find symbol cn.
    // stmt.executeUpdate("INSERT INTO TechnicalAssistants VALUES('sdfas','sdfsdf','sdfdsf','sdfdsf',3,04/13/04,'asdf','asdfsdf')");
    // stmt.close();
    }

  • How to call a method from a separate class using IBAction

    I can't work out how to call a method form an external class with IBAction.
    //This Works 1
    -(void)addCard:(MyiCards *)card{
    [card insertNewCardIntoDatabase];
    //This works 2
    -(IBAction) addNewCard:(id)sender{
    //stuff -- I want to call [card insertNewCardIntoDatabase];
    I have tried tons of stuff here, but nothing is working. When i build this I get no errors or warnings, but trying to call the method in anyway other that what is there, i get errors.

    Can you explain more about what you are trying to do? IBAction is just a 'hint' to Interface Builder. It's just a void method return. And it's unclear what method is where from your code snippet below. is addNewCard: in another class? And if so, does it have a reference to the 'card' object you are sending the 'insertNewCardIntoDatabase' message? Some more details would help.
    Cheers,
    George

  • How to make a callback from a separate class

    Hi guys!
    I've got a class that I'm trying to instantiate in downloadButton, which handles a bunch of NSURLConnection/authentication stuff, and I want it to make a callback to setWebView after it's finished. I don't think I can use the delegates built into NSURLConnection because then all the events will have to be handled by my base class, and I really just want to be notified when the connection and download has been completed and be given back the saved filename.
    Thanks!
    #import "Controller.h"
    #import "fetch.h"
    @implementation Controller
    - (IBAction)downloadButton {
    fetch *downloader = \[\[fetch alloc\] init\];
    \[downloader setAuth:Username.text password:Password.text saveName:@"test.html"\];
    \[downloader download:@"http://google.com"\];
    -(void)setWebView:(NSString *)file
    }

    True, that works. I thought there might be a way to do it with a pointer to the controller function but this works great. Thanks a lot!

  • Label TS array elements from LV

    Hi,
    How can I change the Label of a TS array element from my LabVIEW code??? Se picture added.
    It is done when you insert at ”Multiple Numeric Limit Test” step in a test sequence and select “Edit Limits…” you get the “Edit Multiple Numeric Limit Test” dialog box. When this is closed with OK the Names of the Measurement Set is applied to the elements in Step.Result.Measurement. How can I do this from LabVIEW???
    I am looking forward to hear from you.
    Best Regards,
    Morten Pedersen
    CIM Industrial Systems A/S
    Attachments:
    ArrayElementsNames.jpg ‏98 KB

    You can access the name of an object by using ActiveX to get to the step's Property Object. Once there, you can use a property node for the name and change it to write.
    Let me know if you need more information about this.
    Regards
    Anders M.
    National Instruments DK

  • How to reinstall Photoshop Elements from old Pc into Mac?

    How do I reintall Photoshop Elements Windows version into my new Mac.  PC was stolen.

    I looked at it, Barbara, but you can't download 9 without the discs.  I
    originally downloaded it online and Adobe now tells me it only has 10 to
    download.
    On Tue, 19 Jun 2012 07:02:00 -0600 "Barbara B." <[email protected]>
    writes:
    Re: How to reinstall Photoshop Elements from old Pc into Mac?
    created by Barbara B. in Photoshop Elements - View the full discussion
    Did you not look at the link in the thread in my last post, Lorna?
    When you buy software it's your responsibility to keep the media against
    future reinstallations, whether you purchase via download or on disc. If
    you registered your software, for PSE 9 you may still find a download
    link in your adobe store account, if you purchased PSE that way, also.
    Replies to this message go to everyone subscribed to this thread, not
    directly to the person who posted the message. To post a reply, either
    reply to this email or visit the message page:
    http://forums.adobe.com/message/4504088#4504088
    To unsubscribe from this thread, please visit the message page at
    http://forums.adobe.com/message/4504088#4504088. In the Actions box on
    the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Elements by email or at Adobe Forums
    For more information about maintaining your forum email notifications
    please go to http://forums.adobe.com/message/2936746#2936746.

  • WebDynpro Java: how to remove blank element from Table and Dropdown.

    Hi  Folks
    In a webdynpro application,
    I created a table and witten the below code to populate the table
         IPrivateDummyView.IFirst_TableElement First_Table_Element = null;
         First_Table_Element = wdContext.nodeFirst_Table().createFirst_TableElement();
         First_Table_Element.setF_Value("One");
         wdContext.nodeFirst_Table().addElement(First_Table_Element);
         First_Table_Element = wdContext.nodeFirst_Table().createFirst_TableElement();
         First_Table_Element.setF_Value("2");
         wdContext.nodeFirst_Table().addElement(First_Table_Element);
    As per the code, i got 2 row in the table.
    But , i have one Empty row on top of the table ,  how to get ride of this.
    i find the same problem happening with dropdown too, where i used DDBI, i populated a the content as mention, but i initial 2 row as blank and then i have my own elements ,as per my code.

    >
    > how to remove blank element from Table and Dropdown
    >
    Change selection property of related node to from 0..1 to 1..1 (mandatory)
    Re: DropdownByIndex and empty line (Thread: DropdownByIndex and empty line )
    Re: Can the empty selection be removed from element dropdownbykey(Thread: Can the empty selection be removed from element dropdownbykey )
    Edited by: Anagha Jawalekar on Nov 18, 2008 10:28 PM

  • How to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • How to get a char from a String Class?

    How to get a char from a String Class?

    Use charAt(int index), like this for example:
    String s = "Java";
    char c = s.charAt(2);
    System.out.println(c);

  • How do I programmat​ically modify array element sizes?

    Hi All,
    I have a quick question about modifying the size of array elements. Hopefully someone can help, because I am at a dead end!
    I am logging some intensities from a Fibre Array using a camera. For calibration of the system, I acquire an image from the camera, click points on the image to divide it into areas of interest. I overlay my image with a grid showing the regions of interst - for example a 4x6 array. I then have to select the fibres - or ROIs - I want to log from.
    I have a cluster type-def ( a number and a boolean) to specify the fibre number and to turn logging from that fibre on/off. I overlay an (transparent) array of this typedef over my image to correspond with the regions of interest. So here's my problem - I want to modify the dimensions of the array so each control matches my ROI. I can resize the elements by rightclicking on the elements on the frontpanel, but can't find a way to do it programmatically. The Array Property Node>>Array Element>>Bounds won't 'change to write'...thats the first thing I tried.
    Its really only important that the elements align with my ROIs - so programmatically adding in gaps/spacings would also work for me...but again I can't figure out how to do this! I've attached a screenshot of part of my image with array overlaid to show you all exactly what my problem is.
    Thanks in advance for you help,
    Dave
    PS I am running Labview 8.6 without the vision add on.
    Solved!
    Go to Solution.
    Attachments:
    Array_Overlay.png ‏419 KB

    Here's my cheat (and cheap?) way If you want to get fancy and center the numeric and boolean indicators, you could add spacers on the north and west sides, too.
    Attachments:
    ClusterSpacer.vi ‏13 KB

  • How to get array values from one class to another

    Supposing i have:
    - a class for the main()
    - another for the superclass
    And i want to create a subclass that does some function on an array object of the the superclass, how can i do so from this new subclass while keeping the original element values?
    Note: The values in the array are randomly generated integers, and it is this which is causing my mind in failing to comprehend a solution.
    Any ideas?

    If the array is declared as protected or public in the superclass you can directly access it using its identifier. If not, maybe the superclass can expose the array via some getter method.
    If this functionality can be generified (or is generic enough) to apply to all subclasses of the superclass the method should be moved to the superclass to avoid having to reproduce it in all the subclasses.

  • How do I extract elements from a file?

    Let's say I have a larger file with several layers and various elements on the layers - like a web page layout.
    On 1 layer the is top logo.
    I am trying to extract just that 1 part and save for web as small jpg or png and put that one pic in my web design app.
    Q: How do I easily exctract / export / save for web (small version) just that one part?

    If you do a lot of saving graphic elements from web page mock-ups, it's worth reading up on using slices.
    Also have a look at layer comps. Combining the two enables you to save all the graphic elements of the web page (including various roll-over states) from one master file.

  • How to insert queue element from C

    I want to insert a single queue element into a LabView Queue from C (from a DLL).
    The only thing I found is How to set an Labview-Occurence from C. I assume that I have to do that in 2 steps: 1. copy the string data into the queue with a push/pop command. 2. Set the Occurence from the queue to notify waiting queue elements.
    I only need to know how to realize this in the exactly way. (internals of Queue handling, Queue structure, example code, ....)
    I'm using LabView 6.0.2 with WinNT 4.0
    Thank's for help.
    Robert

    Robert,
    You currently cannot access Queue elements from external code. We hope to add this feature to a future version.
    Marcus Monroe
    National Instruments

  • Accessing array elements from the Faces EL

    Someone had this question on email and I thought it best to share the answer here.
    On Tue, 23 Mar 2004 16:25:23 +0800, zhang xinxin said:ZX> I want to ask you how can output array
    ZX> for example
    ZX> I define an array in SearchItemBean and bind value to it:
    ZX> private String[] array=new String[2];
    ZX> public String[] getArray() {
    ZX> array[0]="a";
    ZX> array[1]="b";
    ZX> return array;
    ZX> }
    ZX> and I can output the array as following:
    ZX> <h:output_text id="arra" value="#{SearchItemBean.array[0]}"/> <br>
    ZX> but if I wang to output using parameter,it failed:
    ZX> in jsp page it write as this:
    ZX> <%
    ZX> int i=0;
    ZX> %>
    ZX> <h:output_text id="arra" value="#{SearchItemBean.array[<%=i%>]}"/> <br>
    ZX> Can you tell me how to use paremeter in output_text?thanks!
    Sure,
    The reason what you're doing doesn't work is that anything inside of
    "#{}" is for deferred evaluation and is evaluated by the JSF engine,
    while scriptlets are evaluated by the JSP engine. I have modified the
    guessNumber demo included in the 1.0 release to do what you're trying to
    do.
    8<-------------------------------------
    Index: greeting.jsp
    ===================================================================
    RCS file: /export/cvs/jsf-demo/guessNumber/web/greeting.jsp,v
    retrieving revision 1.22
    diff -u -r1.22 greeting.jsp
    --- greeting.jsp     9 Mar 2004 22:51:27 -0000     1.22
    +++ greeting.jsp     23 Mar 2004 16:36:20 -0000
    @@ -40,6 +40,7 @@
    <HEAD> <title>Hello</title> </HEAD>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    + <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <body bgcolor="white">
    <f:view>
    <h:form id="helloForm" >
    @@ -54,6 +55,10 @@
         <h:commandButton id="submit" action="success" value="Submit" />
    <p>
         <h:message style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique; text-decoration: overline" id="errors1" for="userNo"/>
    +          <hr />
    + <c:set value="1" var="i" scope="request" />
    +
    + <h:outputText id="array" value="#{UserNumberBean.array[requestScope.i]}" />
    </h:form>
    </f:view>
    8<-------------------------------------
    What I'm doing here is to store the variable into request scope, then I
    can access it using the implicit object requestScope.
    This approach should give you what you need.
    Ed (EG Member)

    Thank you for your answer!
    but I still have question.
    I will output a array,but the size of array is dynamic,
    and the size is passed by the SearchItemBean.
    How can I control the i to increase to the specify number?
    how can I pass the size parameter into the <c:set>?
    How can I use a paratemer passed by size and control the "i" to increase to it?
    thanks!

  • How to modify screen element in module pool

    Hii...
    I have developed a screen with table control..my requirement is
    I have one column (i.e) check box in edit mode..after it was checked and pressed 'enter' I want to go for display mode only..how can I solve this problem..
    i tried like this but this is not working..
    if checkbox = 'X'.
    Loop at screen.
    screen-active = 0.
    screen-input = 0.
    modify screen.
    endloop.
    regards
    sugu

    Hello,
    Suppose your tablecontrol name is TCTRL.
    Declare a work area  WA_COLS.
    Now in the PBO (in the table control loop) you can write a new module suppose its MODULE SET_SCR.
    MODULE SET_SCR.
      LOOP AT TCTRL-cols INTO WA_COLS.
        WA_COLS-SCREEN-INPUT = 0.
        MODIFY TCTRL-cols FROM WA_COLS INDEX SY-TABIX.
      ENDLOOP.
    ENDMODULE.
    Hope this clears .
    Neeraj

Maybe you are looking for