Control valve program

Hello dear member of the forum,
1st of all let me tell you all that i am very new to labview i just know the basics.
i am experimenting with a control valve: of LEE LHL series whose specs are asa follows
3-way HDI (High density Interface)
5 volt models 
10 ms maximum for switching states
i am using NI-USB 6501 controller for these valve, i need to use 3 of the above control vales to operate at same time. 
i had done a VI in labview  8.6, but it seem not be working so fine, it does not run at all. i would also like to know if i can know the postion of the valve by placing some graphic indicator?
 i would like to upload the VI that i had done, can you please tell me how to upload the VI
thank you
rgds
Rajan 

The first problem is that the your Case structure selectors are unwired (that's why your run arrow is broken - I wired them to your activate buttons), but that's not your only problem...  I also put each section in its own While Loop.
As a first pass, take a look at what I've done.  It'll take a lot more work to do what I think you finally want, but this should get you running.  Your controls will stay on as long as the valve is closed, as you specified.
Study up on State Machines and Shift Registers; you'll need to do that if you want a maintainable program.  It's really ugly to have a separate loop for each valve.  Write back with any questions you come up with.
jim
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
Attachments:
valve_1[1].vi ‏31 KB

Similar Messages

  • How to get the position of the stem in control valve using slider control in the front panel

    I have created a calibration program for a control valve. Signal (4-20mA) is generated from labview using slider contorl which is given to the valve via DAQ(module 9265) and again the feedback signal from the valve is acquired using DAQ(module 9203).. . There is an input ISO/ISC(Increasing signal to open/ Increasing signal to close) in the front panel.
    ISO would set the output to increase from (4-20)mA further opening the valve
    ISC would set the output to increase from (4-20)mA further closing the valve
    I have doubt, how can i get the position of a stem

    Ravens Fan wrote:
    If the position of the stem is being sent to the PC through a 4-20 mA signal into your DAQ 9203 module, then you just need to do an analog input read in order to get the signal.
    When reading this post, that is what came to mind...  So let's see if both RavensFan & I are trying to understand the same thing...  Are you saying that the position of the stem is linear (or scaled) to the amount of current sent to it?  Meaning a 4mA signal would move it a certain distance, and 10mA would move another given / known distance?  Or are you saying that it is calibrated so that a 20mA signal for a certain duration (ms) would move it a given distance? So the scale would be time and not current unless a lookup table is used to adjust the time duration based on the current being drawn...
    It's just that I am not familiar with solenoid / drive devices that related to current..  To voltage, yes.  To time, yes..  To current, I'm simply saying that I am not familiar with that.  Can you tell us more about this stem (mfg / model designation)?

  • How do I control my program?

    Hi,
    The program below works fine, except the control is all out of whack. I would like to control the program flow from the main method. Hence call the getSNMP() and store the result of fixResponseString() to a global variable.
    But I keep on receiving error when I try to accomplish this. The error is snmp4j.java:67: non-static method fixResponseString(java.lang.String) cannot be referenced from a static context. This is probably very common on here, but I need help to separate my program so it is all controlled from the main method.
    Cheers,
    import org.snmp4j.*;
    import org.snmp4j.PDU;
    import org.snmp4j.asn1.*;
    import org.snmp4j.event.*;
    import org.snmp4j.log.*;
    import org.snmp4j.mp.*;
    import org.snmp4j.security.*;
    import org.snmp4j.smi.*;
    import org.snmp4j.smi.UdpAddress;
    import org.snmp4j.tools.console .*;
    import org.snmp4j.transport.*;
    import org.snmp4j.util.*;
    public class snmp4j{
         public static void main( String [] args ) throws Exception  {
              getSNMP();
         //Retrieves the SNMP variables based on the string OID and stringAddress
         static void getSNMP() throws Exception {
              String stringOID = "1.3.6.1.2.1.1.5.0";
              String stringAddress = "10.31.9.41/161";
              // Target address
              Address targetAddress = new UdpAddress (stringAddress);
              OID targetOID         = new OID(stringOID);
              *  1. PDU and Communityaddress
            *     PDU instance
              PDU requestPDU  = new PDU();
              requestPDU.add(new VariableBinding(targetOID)); // sysName
              requestPDU.setType(PDU.GET);
              // Comunity Target
              CommunityTarget target = new CommunityTarget();
              target.setCommunity(new OctetString("liepsi73"));
              target.setAddress(targetAddress);
              target.setTimeout(500);           // set timeout to 500 milliseconds -> 2*500ms = 1s total timeout
              target.setVersion(SnmpConstants.version1);
              *  2. Classes for SNMP message sending (command generation)
              *  3. Classes for SNMP message dispatching (command responding)
              TransportMapping transport = new DefaultUdpTransportMapping();
              Snmp snmp = new Snmp(transport);
              transport.listen();
              ResponseEvent response = snmp.send(requestPDU, target);
              if (response.getResponse() == null) {
                   System.out.println("Request timed out");
              } else {
                   // dump response PDU
                   // print the response and call the fixResponseMethod
                   //SNMPresult = (response.getResponse().toString());
                   System.out.println(response.getResponse().toString());
                   fixResponseString(response.getResponse().toString());
         // Manipulated the output of the retrieved snmp message.
         static void fixResponseString(String s) {
              s = s.substring(72); // remove everything before "VBS["
              int i = s.indexOf("="); // remove everything before "="
              s = s.substring(i+2); // remove "= "
              int length = s.length(); // get the length
              s = s.substring(0, length-2); // remove last two characters
              System.out.println(s);
    }

    See these existing forum posts.
    http://onesearch.sun.com/search/onesearch/index.jsp?charset=utf-8&col=developer-forums&qt=cannot+be+referenced+from+a+static+context&rt=true&cs=false&y=8&x=6
    Had you searched, you would have had an answer an hour ago.

  • How do I uninstall an "AMD VISION engine control center" "program"? DV7 1264nr

    How do I remove AMD VISION Engine Control Center that appears in my programs section? It does not appear in control center programs for uninstalling. It has never worked--when I try to open it, it is stopped.  I installed it thinking it was an update to my preinstalled AMD audio program. I have Vista 64 bit on a HP pavilion dv7 1264nr. The error that comes up is "host application has stopped working" and the details are:
    Problem signature:
      Problem Event Name:    BEX64
      Application Name:    CCC.exe
      Application Version:    3.5.0.0
      Application Timestamp:    4ca242ed
      Fault Module Name:    StackHash_1a5d
      Fault Module Version:    0.0.0.0
      Fault Module Timestamp:    00000000
      Exception Offset:    0000000000000000
      Exception Code:    c0000005
      Exception Data:    0000000000000008
      OS Version:    6.0.6002.2.2.0.768.3
      Locale ID:    1033
      Additional Information 1:    1a5d
      Additional Information 2:    2763c682d3cf8924ea66429d911698ba
      Additional Information 3:    3711
      Additional Information 4:    a8feb839290a8e26ed1381ba97bf7bec

    Thanks, ideato! That worked great, and I didn't really even have to restart Firefox to see that it did. I just changed it as you suggested, then opened a new tab, and ''voila'', it was blank!
    For anyone else with this issue, if you use ideato's link to about:config, it takes you to a help page which says to type "about:config" into the browser's url field, which takes you to the page where this change can be made....

  • Is there a tool to remove Adobe Air if is is not shown in Control Panel - Programs and Features -- on Windows 8.1

    I am running Win 8.1 and have Air installed, but it does not show up in Control Panel/Programs and Features.
    Is there a way to uninstall AIR since I cannot see it in Programs and Features?

    Moving this discussion to the Creative Cloud Download & Install forum.
    Rosgats is Photoshop, Bridge, and Extension Manager not available to be reinstalled through the Creative Cloud Desktop application?  If not then please see CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html.  If it is listed as being available then please install using the process listed in Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html.

  • I previously had PS CS5 Trial installed but removed it using both Control Panel Programs and deleting all files from the CS5 directory on Program Files.  I then installed a purchased product from Adobe disc using the serial number on the case.  But when I

    I previously had PS CS5 Trial installed but removed it using both Control Panel Programs and deleting all files from the CS5 directory on Program Files.  I then installed a purchased product from Adobe disc using the serial number on the case.  But when I try to launch it, I get a screen headed Photoshop CS5 Extended Trial.  It asks for the serial number and says that my trial has expired.  It rejects the serial number from the Adobe case saying "This Serial Number is not valid for this product".  It thinks that I still have the expired Trial Version installed.  How do I convince it (the program) that the Trial Version is long gone and the currently installed product was installed with a valid and accepted serial number????

    Let me know how it goes. Go into your Adobe account and register your serial number asap.
    https://www.adobe.com/account/my-products-services.html
    That way, should you lose it or you need support, it is on record that it's yours and you can fetch your s/n it from anywhere.
    There are too may sad stories here, where people forgot and the box is buried or lost.
    Gene

  • Copy control and program name for Sales Order to Delivery

    Hi,
    Please provide the copy control and program name to split a single delivery into multiple invoices depending on the sales order it belonged to and to split a single sales order into multiple deliveries depending on the shipping type.
    Thanks in advance.

    Hi there,
    In VTFL, at item level, there is a field called "Data VBRK/VBRP". Routine 001 & 007 are for invoice split. Those may be relevant for your case.
    In VOFM, select data transfer --> billing docs in the menu bar. It will give you the requirement numbers & their description.
    Select the required routine num & click on Source text (note pad icon) on the above. It will give you the prog / include names.
    For eg for 001 its FV60C001, for 007 its FV60C007.
    Regards,
    Sivanand

  • Can you use the apple remote to control tv programs?

    Can you use the apple remote control like a tv remote to control tv programs & DVDs on the computer? Everything I've found about the Apple Remote talks about using it for products other than desktops. I watch some regular tv shows on my iMac & would like to be able to use a remote control.
    I have a built-in infrared receiver.
    Thanks!

    You should be able to control DVD playback now with the Apple Remote. You may be able to get a bit of functionality with web sites by using Remote Buddy by using it as a virtual mouse and keyboard:
    http://www.macupdate.com/app/mac/21872/remote-buddy
    but you're not going to get anything close to the sort of functionality you'd get with a remote and a TV.
    Regards.

  • Controling another program with java

    hi. i have some problems about java. i'm trying to control a program with my java codes.i'm trying to explain that i will write a program and this program will send some keys to another choosen program. forexample i will say my program that i want you to send "A" key to a game for 500 times and at the game my program will write AAAAAAA....... .i look for some examples in c++. c++ uses findwindow and postevent methods for this work but i couldn't find anything.
    so i want some help about this
    what can i do or where can i find some help
    sorry about my little english.
    thanks...

    look up the Robot object in Java 1.31 (I think) or later.

  • Control valve resonse time measurement

    I am a new student in control valves.I am using control valve to control the liquid level by controlling the flow using control valve.I Want to know the response time and time constant of the control valve , I do nt have any idea how to do it,any bodyhave any info about it or any link where i can get some relevant informatiom.
    Regards
    Dost

    You will need to do some transient measurements.
    You can suddenly open your valve and measure the flow rate increase in time and
    can derive the time constant by doing measurements with different inlet
    pressures and valve settings. But normally valve producers are providing this
    information. May be you should first look at the documents of the valve.

  • Control valve that opens and closes linearly using DSC

    I have to create a control valve that opens and closes linearly.I want to view its variation in percentage wise in the graphical form which uses DSC module.

    Hi Gerardjoe,
    I'm not sure that I completely understand what you're trying to do. In the DSC modules, the valves (2D and 3D) are simply boolean indicators.
    One thing you could do, to see some sort of a percentage change, would be to have an indicator such as a vertical fill slide. Here, you would put a number between 0-100.
    Then, you could have a comparison, such that if this value was over, say, 60, then the boolean value would be true and the valve would turn on. Else, the value would be false and the valve would stay false.
    I hope that this answers your question; if I did not understand correctly, please do respond and clarify.
    -Sam F, DAQ Marketing Manager
    Learn about measuring temperature
    Learn how to take voltage measurements
    Learn how to measure current

  • Controlling a proportional control valve

    Hi,
    I wish to control a the flow of air through a pipe using a proportional control valve. I also what to feed back the flow rate with an anemometer. I'm using labview 8.2 and i'm not sure what sort of DAQ card i'm using. I'm a novice with LABview to say the least so any advice in the right direction would be greatly appreciated. Thanks in advance.
    Regards
    Josh

    I don't think a motion control system is necessary.  However, you'll need to provide more information about your system in order to get a helpful answer.  Do you already have a data acquisition card, and if so, can you find out what it is?  If it's a National Instruments card, and installed in your computer, try opening Measurement and Automation Explorer (MAX) and see what device you have.  Do you already have the other components of your system: the proportional valve and the anemometer?  If so, what sort of signals do they need and provide?  How much accuracy in your control do you need?  If you don't already have your valve and meter, have you considered buying a flow controller that already includes both a valve and a meter in one package (I've used Mass Flow Controllers from Brooks Instrument, other companies offer similar valves)?  While such valves aren't cheap, you can simply write a voltage to it corresponding to the desired flow, and read back the actual flow rate.
    Message Edited by nathand on 02-12-2009 08:49 AM

  • Control valve logic?

    I need to control the valve with Labview
    I am using DAQ 6251, PXI 1031.
    Please let me know, how can I develop the VI.
    I am attaching the specification of the control valve.
    Attachments:
    Actuator-irehcontrols20110330CNP1LAL.pdf ‏2245 KB

    So you will need some kind of amplifier/level shifter/current source circuit as an interface between your DAQ device and the valve.
    I am still confused or how can I choose the amplifier/level shifter/current source as per DAQ 6251.Please see the attached manual of the valve.
    Attachments:
    Actuator-irehcontrols20110330CNP1LAL.pdf ‏2245 KB

  • Table control Dialog program

    I am Using table control wizard.once user click on button data will be populated in Table control from datatabase table
    once after getting data the lines which doesnot have data are disabled but
    user should be allowed to  enter and Update and delete data once after clicking
    ENTER Key  that data should be updated in the data base table.
    i am sending my program.
    SCREEN DESIGN .
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TAB1'
      MODULE TAB1_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TAB1_CHANGE_COL_ATTR.
      LOOP AT   IT_TAB3
           INTO WA_TAB3
           WITH CONTROL TAB1
           CURSOR TAB1-CURRENT_LINE.
        MODULE TAB1_GET_LINES.
    *&SPWIZARD:   MODULE TAB1_CHANGE_FIELD_ATTR
      ENDLOOP.
    * MODULE STATUS_1002.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
      LOOP AT IT_TAB3.
        CHAIN.
          FIELD WA_TAB3-VBELN.
          FIELD WA_TAB3-POSNR.
          MODULE TAB1_MODIFY ON CHAIN-REQUEST.
        endchain.
        FIELD WA_TAB3-SP1
          MODULE TAB1_MARK ON REQUEST.
      ENDLOOP.
    *  MODULE TAB1_BUTTON.
      MODULE TAB1_BUTTONIP.
      MODULE TAB1_USER_COMMAND.
    *&SPWIZARD: MODULE TAB1_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TAB1_CHANGE_COL_ATTR.
    * MODULE USER_COMMAND_1002.
    PROGRAM  Z_VI_TABL2.
    TYPES: BEGIN OF TY_TAB3,
           SP1(2) TYPE C,
           VBELN TYPE VBELN_VL,
           POSNR TYPE POSNR_VL,
           END OF TY_TAB3.
    TYPES: BEGIN OF TY_FILL,
           OBJKY TYPE OBJKY,
           END OF TY_FILL.
    DATA : IT_TAB3 TYPE STANDARD TABLE OF TY_TAB3,
           WA_TAB3 TYPE TY_TAB3,
           IT_FILL TYPE STANDARD TABLE OF TY_FILL,
           WA_FILL TYPE TY_FILL,
           G_VBELN TYPE VBELN_VL,
           G_POSNR TYPE POSNR_VL.
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'TAB1' ITSELF
    CONTROLS: TAB1 TYPE TABLEVIEW USING SCREEN 1002.
    *&SPWIZARD: LINES OF TABLECONTROL 'TAB1'
    DATA:     G_TAB1_LINES  LIKE SY-LOOPC.
    DATA:     OK_CODE LIKE SY-UCOMM.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
    MODULE TAB1_CHANGE_TC_ATTR OUTPUT.
      DESCRIBE TABLE IT_TAB3 LINES TAB1-lines.
    ENDMODULE.                    "TAB1_CHANGE_TC_ATTR OUTPUT
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: GET LINES OF TABLECONTROL
    MODULE TAB1_GET_LINES OUTPUT.
      G_TAB1_LINES = SY-LOOPC.
    ENDMODULE.                    "TAB1_GET_LINES OUTPUT
    *&SPWIZARD: INPUT MODULE FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MODIFY TABLE
    MODULE TAB1_MODIFY INPUT.
    *  MODIFY IT_TAB3
    *    FROM WA_TAB3
    *    INDEX TAB1-CURRENT_LINE.
      WA_TAB3-POSNR = 10.
      APPEND WA_TAB3 TO IT_TAB3.
    ENDMODULE.                    "TAB1_MODIFY INPUT
    *&SPWIZARD: INPUT MODUL FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MARK TABLE
    MODULE TAB1_MARK INPUT.
      DATA: g_TAB1_wa2 like line of IT_TAB3.
      if TAB1-line_sel_mode = 1
      and WA_TAB3-SP1 = 'X'.
        loop at IT_TAB3 into g_TAB1_wa2
          where SP1 = 'X'.
          g_TAB1_wa2-SP1 = ''.
          modify IT_TAB3
            from g_TAB1_wa2
            transporting SP1.
        endloop.
      endif.
      MODIFY IT_TAB3
        FROM WA_TAB3
        INDEX TAB1-CURRENT_LINE.
    *    TRANSPORTING SP1.
    ENDMODULE.                    "TAB1_MARK INPUT
    *&SPWIZARD: INPUT MODULE FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: PROCESS USER COMMAND
    MODULE TAB1_USER_COMMAND INPUT.
      OK_CODE = SY-UCOMM.
      PERFORM USER_OK_TC USING    'TAB1'
                                  'IT_TAB3'
                                  'SP1'
                         CHANGING OK_CODE.
      SY-UCOMM = OK_CODE.
    ENDMODULE.                    "TAB1_USER_COMMAND INPUT
    *   INCLUDE TABLECONTROL_FORMS                                         *
    *&      Form  USER_OK_TC                                               *
    FORM USER_OK_TC USING    P_TC_NAME TYPE DYNFNAM
                             P_TABLE_NAME
                             P_MARK_NAME
                    CHANGING P_OK      LIKE SY-UCOMM.
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA: L_OK              TYPE SY-UCOMM,
            L_OFFSET          TYPE I.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
    *&SPWIZARD: Table control specific operations                          *
    *&SPWIZARD: evaluate TC name and operations                            *
      SEARCH P_OK FOR P_TC_NAME.
      IF SY-SUBRC <> 0.
        EXIT.
      ENDIF.
      L_OFFSET = STRLEN( P_TC_NAME ) + 1.
      L_OK = P_OK+L_OFFSET.
    *&SPWIZARD: execute general and TC specific operations                 *
      CASE L_OK.
        WHEN 'INSR'.                      "insert row
          PERFORM FCODE_INSERT_ROW USING    P_TC_NAME
                                            P_TABLE_NAME.
          CLEAR P_OK.
        WHEN 'DELE'.                      "delete row
          PERFORM FCODE_DELETE_ROW USING    P_TC_NAME
                                            P_TABLE_NAME
                                            P_MARK_NAME.
          CLEAR P_OK.
        WHEN 'P--' OR                     "top of list
             'P-'  OR                     "previous page
             'P+'  OR                     "next page
             'P++'.                       "bottom of list
          PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
                                                L_OK.
          CLEAR P_OK.
    *     WHEN 'L--'.                       "total left
    *       PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
    *     WHEN 'L-'.                        "column left
    *       PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
    *     WHEN 'R+'.                        "column right
    *       PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
    *     WHEN 'R++'.                       "total right
    *       PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
        WHEN 'MARK'.                      "mark all filled lines
          PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                            P_TABLE_NAME
                                            P_MARK_NAME   .
          CLEAR P_OK.
        WHEN 'DMRK'.                      "demark all filled lines
          PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                              P_TABLE_NAME
                                              P_MARK_NAME .
          CLEAR P_OK.
    *     WHEN 'SASCEND'   OR
    *          'SDESCEND'.                  "sort column
    *       PERFORM FCODE_SORT_TC USING P_TC_NAME
    *                                   l_ok.
      ENDCASE.
    ENDFORM.                              " USER_OK_TC
    *&      Form  FCODE_INSERT_ROW                                         *
    FORM fcode_insert_row
                  USING    P_TC_NAME           TYPE DYNFNAM
                           P_TABLE_NAME             .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA L_LINES_NAME       LIKE FELD-NAME.
      DATA L_SELLINE          LIKE SY-STEPL.
      DATA L_LASTLINE         TYPE I.
      DATA L_LINE             TYPE I.
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>                 TYPE CXTAB_CONTROL.
      FIELD-SYMBOLS <TABLE>              TYPE STANDARD TABLE.
      FIELD-SYMBOLS <LINES>              TYPE I.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
      ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: get looplines of TableControl                              *
      CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
      ASSIGN (L_LINES_NAME) TO <LINES>.
    *&SPWIZARD: get current line                                           *
      GET CURSOR LINE L_SELLINE.
      IF SY-SUBRC <> 0.                   " append line to table
        L_SELLINE = <TC>-LINES + 1.
    *&SPWIZARD: set top line                                               *
        IF L_SELLINE > <LINES>.
          <TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
        ELSE.
          <TC>-TOP_LINE = 1.
        ENDIF.
      ELSE.                               " insert line into table
        L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
        L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
      ENDIF.
    *&SPWIZARD: set new cursor line                                        *
      L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
    *&SPWIZARD: insert initial line                                        *
      INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
      <TC>-LINES = <TC>-LINES + 1.
    *&SPWIZARD: set cursor                                                 *
      SET CURSOR LINE L_LINE.
    ENDFORM.                              " FCODE_INSERT_ROW
    *&      Form  FCODE_DELETE_ROW                                         *
    FORM fcode_delete_row
                  USING    P_TC_NAME           TYPE DYNFNAM
                           P_TABLE_NAME
                           P_MARK_NAME   .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
      ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: delete marked lines                                        *
      DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
        IF <MARK_FIELD> = 'X'.
          DELETE <TABLE> INDEX SYST-TABIX.
          IF SY-SUBRC = 0.
            <TC>-LINES = <TC>-LINES - 1.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                              " FCODE_DELETE_ROW
    *&      Form  COMPUTE_SCROLLING_IN_TC
    *       text
    *      -->P_TC_NAME  name of tablecontrol
    *      -->P_OK       ok code
    FORM COMPUTE_SCROLLING_IN_TC USING    P_TC_NAME
                                          P_OK.
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA L_TC_NEW_TOP_LINE     TYPE I.
      DATA L_TC_NAME             LIKE FELD-NAME.
      DATA L_TC_LINES_NAME       LIKE FELD-NAME.
      DATA L_TC_FIELD_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <LINES>      TYPE I.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get looplines of TableControl                              *
      CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
      ASSIGN (L_TC_LINES_NAME) TO <LINES>.
    *&SPWIZARD: is no line filled?                                         *
      IF <TC>-LINES = 0.
    *&SPWIZARD: yes, ...                                                   *
        L_TC_NEW_TOP_LINE = 1.
      ELSE.
    *&SPWIZARD: no, ...                                                    *
        CALL FUNCTION 'SCROLLING_IN_TABLE'
             EXPORTING
                  ENTRY_ACT             = <TC>-TOP_LINE
                  ENTRY_FROM            = 1
                  ENTRY_TO              = <TC>-LINES
                  LAST_PAGE_FULL        = 'X'
                  LOOPS                 = <LINES>
                  OK_CODE               = P_OK
                  OVERLAPPING           = 'X'
             IMPORTING
                  ENTRY_NEW             = L_TC_NEW_TOP_LINE
             EXCEPTIONS
    *              NO_ENTRY_OR_PAGE_ACT  = 01
    *              NO_ENTRY_TO           = 02
    *              NO_OK_CODE_OR_PAGE_GO = 03
                  OTHERS                = 0.
      ENDIF.
    *&SPWIZARD: get actual tc and column                                   *
      GET CURSOR FIELD L_TC_FIELD_NAME
                 AREA  L_TC_NAME.
      IF SYST-SUBRC = 0.
        IF L_TC_NAME = P_TC_NAME.
    *&SPWIZARD: et actual column                                           *
          SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
        ENDIF.
      ENDIF.
    *&SPWIZARD: set the new top line                                       *
      <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM.                              " COMPUTE_SCROLLING_IN_TC
    *&      Form  FCODE_TC_MARK_LINES
    *       marks all TableControl lines
    *      -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                   P_TABLE_NAME
                                   P_MARK_NAME.
    *&SPWIZARD: EGIN OF LOCAL DATA-----------------------------------------*
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
      ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: mark all filled lines                                      *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
        <MARK_FIELD> = 'X'.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Form  FCODE_TC_DEMARK_LINES
    *       demarks all TableControl lines
    *      -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                     P_TABLE_NAME
                                     P_MARK_NAME .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
      ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: demark all filled lines                                    *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
        <MARK_FIELD> = SPACE.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Module  TAB1_BUTTON  INPUT
    *       text
    MODULE TAB1_BUTTONIP.
      CASE SY-UCOMM.
        WHEN 'DELI'.
          REFRESH IT_TAB3.
          SELECT OBJKY
                 INTO TABLE IT_FILL
                 FROM DRAD
                 WHERE DOKNR = 'T-F122' AND
                       DOKOB = 'LIPS'.
          IF SY-SUBRC = 0.
            LOOP AT IT_FILL INTO WA_FILL.
              wa_tab3-vbeln = WA_FILL-OBJKY+0(10).
              wa_tab3-posnr = WA_FILL-OBJKY+10(4).
              APPEND wa_tab3 TO IT_TAB3.
            ENDLOOP.
            DELETE ADJACENT DUPLICATES FROM IT_TAB3.
         ENDIF.
      ENDCASE.

    hi Sonarali,
    this FM is of no use to you.
    in your PAI you have to loop at the table control table and put a method here you read the lines and save it.
    if you use wizard to create a table control it will automatically give the code to you...

  • Dynamic header text in table control - Dialog programming

    Hi All,
    I have a table control on one of my dialog screens.  I need to dynamically change the column header texts on this control in my PBO.  Does anyone know how to do this?  I have found all kinds of ways to modify the other characteristics of the fields at run time in the PBO (active, input/output, invisible, etc.) - but not to change the header text!  Any help is appreciated.
    thanks,
    Matt

    Hi Hymavathi,
    I appreciate your help!  This didn't solve the issue, however,...I have used the method you'd mentioned before (many times) for setting it inside the loop at screen:
    %_<screenname>_%_APP_%-TEXT = <text something>.
    - but only in ABAP reports.  It doesn't seem to recogize it (the table control column header text) within a dialog program.  I keep getting a compile error. (saying that the %_<screenname>_%_APP_%-TEXT doesn't exist.
    I tried the suggestion that you stated below (from lateesh) - yet it only let me place i/o field in title text area (not the column header text).  Am still searching...

Maybe you are looking for