Passing parametrs to Sub routines

Hi all,
Please tell me how to pass the Parameters  as message number and message id for an SUB ROUTINE.If possible please give me the sample code.
Regards
Ajay

declare
data : message_nm type  sy-msgno,
        sys_id type sy-repid.
simply write rthe oerform AS
perform sample_form using message_nm
                                        sys_id
then in the form.
form sample_form using message_nm type sy-msgno
                                        sys_id type sy-repid .
endform.
reward points if useful...
Edited by: Rudra Prasanna Mohapatra on Jun 25, 2008 1:41 PM

Similar Messages

  • Dynamic TABLE parameter in Sub routine call

    Hi,
    Is it possible to have a dynamic TABLE parameter in a sub-routine call? The structure of the internal table will be different during different calls to the sub-routine.
    I have a subroutine which has the FM "HR_INFOTYPE_OPERATION" to update the infotype data for an Applicant. Now i want to call this subroutine for every Infotype update. So every time the structure of the internal table to be passed will vary depending on Infotype ( eg P0002 for Infotype 0002, p0006 for infotype 0006).
    Any pointers will be appreciated.
    Thanks in advance.

    Hi Navin,
    yes, why not.
    just use a generic type parameter, i.e.
    FORM process USING IT_00x type table IV_type typc.
    It depend what yout FORM shall do. If you pass the types name, you can dynamically assign to a field-symbol of the respective type.
    Regards,
    Clemens

  • How do i make this a sub routine

    I have a little script to drill down folders and add comments to every folder and ever file inside the parent folder. It works perfectly well when run but itself. This was based heavily on the script found by NovaScotian here http://discussions.apple.com/thread.jspa?messageID=2182916&#2182916
    I basically want to make this script into a sub routine, and i have tried various methods and havent been able to make it work.
    global the_comments
    global each_item
    global pete
    global ddp
    global ddp2
    set ddp to {}
    set ddp2 to {}
    set theLetter to "s"
    set newDroppedFiles to choose folder with multiple selections allowed
    to drilldown(afolder)
    tell application "Finder"
    set file_list to files of a_folder
    set folder_list to folders of a_folder
    end tell
    repeat with i in file_list
    processDrilledDownFile(i)
    tell application "Finder"
    set comment of pete to text of the_comments
    end tell
    end repeat
    repeat with i in folder_list
    copy i to end of ddp2
    drill_down(i)
    end repeat
    end drill_down
    on processDrilledDownFile(a_file)
    copy a_file to end of ddp
    end processDrilledDownFile
    set the_comments to (do shell script "/usr/bin/defaults read com.Rich.move " & theLetter & "Text")
    repeat with each_item in newDroppedFiles
    set pete to each_item
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    drill_down(pete)
    end repeat
    repeat with each_item in ddp
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    end repeat
    repeat with each_item in ddp2
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    end repeat
    regards
    Rich

    Your script already includes several subroutines, so the trick is separating those out first.
    Essentially your script consists of three elements - global declarations, your own subroutines and a run handler. Since there's no explicit 'on run', everything that's not inside a subroutine becomes the run handler.
    Therefore what you should do is strip out all the code that's not a global declaration or an existing handler and just wrap that in a new 'on subroutinename()... end subroutinename' block.
    For sanity's sake I'd also add a specific run handler to bind it all together.
    This means you'll end up with something like:
    <pre class=command>global the_comments
    global each_item
    global pete
    global ddp
    global ddp2
    on run
    my myNiftySubroutine()
    end run
    to drilldown(afolder)
    tell application "Finder"
    set file_list to files of a_folder
    set folder_list to folders of a_folder
    end tell
    repeat with i in file_list
    processDrilledDownFile(i)
    tell application "Finder"
    set comment of pete to text of the_comments
    end tell
    end repeat
    repeat with i in folder_list
    copy i to end of ddp2
    drill_down(i)
    end repeat
    end drill_down
    on processDrilledDownFile(a_file)
    copy a_file to end of ddp
    end processDrilledDownFile
    on myNiftySubroutine()
    set ddp to {}
    set ddp2 to {}
    set theLetter to "s"
    set newDroppedFiles to choose folder with multiple selections allowed
    set the_comments to (do shell script "/usr/bin/defaults read com.Rich.move " & theLetter & "Text")
    repeat with each_item in newDroppedFiles
    set pete to each_item
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    drill_down(pete)
    end repeat
    repeat with each_item in ddp
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    end repeat
    repeat with each_item in ddp2
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    end repeat
    end myNiftySubroutine</pre>
    There's just one other observation - most of the globals are not actually needed since you can just pass them as parameters to the subroutines.
    I'm also not sure what the purpose of the script is - the upshot seems to be that you're setting the comment of items in the Finder, however, since you:
    <pre class=command> set comment of pete to text of the_comments</pre>
    and pete is a global pointing to the folder you're processing, surely this sets the comment of the folder x times, where x is the number of files in the folder - in other words if there are 100 files in the folder, you set the comment of the folder 100 times and don't touch the files themselves. Is that what you intend?

  • Reg, sub routine

    how can u call a sub-routine from other programmes?

    Hi,
    Start of Content Area
    Naming Subroutines Locate the document in its SAP Library structure
    With the PERFORM statement, you can call subroutines which are coded in the same ABAP program (internal calls), or subroutines which are coded in other ABAP programs (external calls).
    You can also specify the name of the subroutine dynamically at runtime, and call subroutines from a list.
    Internal Subroutine Calls
    To call a subroutine defined in the same program, you need only specify its name in the PERFORM statement:
    PERFORM subr [USING    p1 p2... ]
                 [CHANGING p1 p2... ].
    The internal subroutine can access all of the global data of the calling program.
    Example
    REPORT demo_mod_tech_perform_int.
    DATA: num1 TYPE i,
          num2 TYPE i,
          sum  TYPE i.
    num1 = 2. num2 = 4.
    PERFORM addit.
    num1 = 7. num2 = 11.
    PERFORM addit.
    FORM addit.
      sum = num1 + num2.
      PERFORM out.
    ENDFORM.
    FORM out.
      WRITE: / 'Sum of', num1, 'and', num2, 'is', sum.
    ENDFORM.
    This produces the following output:
    Sum of          2 and          4 is          6
    Sum of          7 and         11 is         18
    In this example the subroutines addit and out are defined at the end of the program. addit is called by the program and out is called by addit. The subroutines have access to the global fields num1, num2 und sum.
    External Subroutine Calls
    The principal function of subroutines is for modularizing and structuring local programs. However, subroutines can also be called externally from other ABAP programs. In an extreme case, you might have an ABAP program that contained nothing but subroutines. These programs cannot run on their own, but are used by other ABAP programs as pools of external subroutines.
    However, if you want to make a function available throughout the system, you should use function modules instead of external subroutines. You create function modules in the ABAP Workbench using the Function Builder. They are stored in a central library, and have a defined release procedure.
    You can encapsulate functions and data in the attributes and methods of classes in ABAP Objects. For any requirements that exceed pure functions, you can use global classes instead of external subroutines.
    When you call a subroutine externally, you must know the name of the program in which it is defined:
    PERFORM subr(prog) [USING    p1 p2... ]
                       [CHANGING p1 p2... ] [IF FOUND].
    You specify the program name prog statically. You can use the IF FOUND option to prevent a runtime error from occurring if the program progdoes not contain a subroutine subr. In this case, the system simply ignores the PERFORM statement.
    When you call an external subroutine, the system loads the whole of the program containing the subroutine into the internal session of the calling program (if it has not already been loaded). In order to save memory space, you should keep the number of subroutines called in different programs to a minimum.
    Example
    Suppose a program contains the following subroutine:
    REPORT formpool.
    FORM header.
      WRITE: / 'Program started by', sy-uname,
             / 'on host', sy-host,
               'date:', sy-datum, 'time:', sy-uzeit.
      ULINE.
    ENDFORM.
    The subroutine can then be called from another program as follows:
    REPORT demo_mod_tech_perform_ext.
    PERFORM header(demo_mod_tech_formpool_1) IF FOUND.
    In this example, no data is passed between the calling program and the subroutine.
    Specifying Subroutines Dynamically
    You can specify the name of a subroutine and, in the case of external calls, the name of the program in which it occurs, dynamically as follows:
    PERFORM (fsubr)[IN PROGRAM (fprog)][USING    p1 p2... ]
                                       [CHANGING p1 p2... ]
                                       [IF FOUND].
    The names of the subroutine and the external program are the contents of the fields fsubr und fprogrespectively. By using the option IF FOUND, you can prevent a runtime error from being triggered if no subroutine with the name fsubr is found. If you omit the parentheses, this variant of the PERFORMstatement behaves like the static variant.
    Example
    Assume a program contains the following subroutines:
    PROGRAM formpool.
    FORM sub1.
      WRITE: / 'Subroutine 1'.
    ENDFORM.
    FORM sub2.
      WRITE: / 'Subroutine 2'.
    ENDFORM.
    Dynamic Subroutine Specification:
    PROGRAM form_test.
    DATA: progname(8) TYPE c VALUE 'FORMPOOL',
          subrname(8) TYPE c.
    subrname = 'SUB1'.
    PERFORM (subrname) IN PROGRAM (progname) IF FOUND.
    SUBRNAME = 'SUB2'.
    PERFORM (subrname) IN PROGRAM (progname) IF FOUND.
    This produces the following output:
    Subroutine 1
    Subroutine 2
    The character field progname contains the name of the program, in which the subroutines are contained. The names of the subroutines are assigned to the character field subrname.
    Calling Subroutines from a List
    You can call a subroutine from a list as follows:
    PERFORM idx OF subr1 subr2 ... subrn.
    The system calls the subroutine specified in the subroutine list in position idx. You can only use this variant of the PERFORMstatement for internal subroutine calls, and only for subroutines without a parameter interface. The field idx can be a variable or a literal.
    Example
    REPORT demo_mod_tech_perform_list.
    DO 2 TIMES.
      PERFORM sy-index OF sub1 sub2.
    ENDDO.
    FORM sub1.
      WRITE / 'Subroutine 1'.
    ENDFORM.
    FORM sub2.
      WRITE / 'Subroutine 2'.
    ENDFORM.
    This produces the following output:
    Subroutine 1
    Subroutine 2
    Regards,
    Chandru

  • Select statement in a sub routine(For Sapscript)

    Hi,
    M unable to write select statement for my reqirement in Sap-script in Sub routine.
    My requirement is 1)"Your correspondent for quality" in main window of my form.
    For dis rule is as below
    "Get the 'changed by' value resord in table QCPR field AENDERER.For the same value found in tabe USR21 fiels BNAME,pick up the PERSUNUM value.For dis PERSUNUM value, found in ADRP feild NAME_TEXT the value for "Your Correspondent for Quality".
    2) For this PERSUNUM value found in ADCP-TEL_NUMBER the vakue for "Ph".
    3)For this PERSUNUM value found in ADCP-FAX_NUMBER the vakue for "FAX".
    4For this PERSUNUM value found in ADR6-SMTP_ADDR the vakue for "EMAIL".
    Please help me out it's urgent for me.I wil b waiting 4 ur reply.

    READ TABLE in_par WITH KEY 'QCPR-AENDERER'.
      CHECK sy-subrc = 0.
      MOVE in_par-value TO V_aenderer
    .  READ TABLE in_par WITH KEY 'USR21-BNAME.
      CHECK sy-subrc = 0.
      MOVE in_par-value TO V_bname
      SELECT SINGLE persnumber addrnumber
        INTO wa_usr21-persnumber wa_usr21-addrnumber
        FROM usr21
        WHERE bname = V_bname
    and <b>check field for this</b> = V_aenderer.
      CHECK sy-subrc = 0.
      SELECT SINGLE tel_number fax_number
        INTO adcp-tel_number adcp-fax_number
        FROM adcp
        WHERE addrnumber = usr21-addrnumber
          AND persnumber = usr21-persnumber.
      CHECK sy-subrc = 0.
      READ TABLE out_par WITH KEY 'ADCP-TEL_NUMBER'.
      CHECK sy-subrc = 0.
      out_par-value = adcp-tel_number.
      MODIFY out_par INDEX sy-tabix.
      READ TABLE out_par WITH KEY 'ADCP-FAX_NUMBER'.
      CHECK sy-subrc = 0.
      out_par-value = adcp-fax_number.
      MODIFY out_par INDEX sy-tabix.
      SELECT SINGLE smtp_addr
        INTO adr6-smtp_addr
        FROM adr6
        WHERE addrnumber = usr21-addrnumber
          AND persnumber = usr21-persnumber.
      READ TABLE out_par WITH KEY 'ADR6-SMTP_ADDR'.
      CHECK sy-subrc = 0.
      out_par-value = adr6-smtp_addr.
      MODIFY out_par INDEX sy-tabix.
    Regards

  • How to on Debugging Mode for T-Code F110 from Script in Sub routine Pool Pr

    Hi Every one....
    I have done SAP-Script for Payment Vocher for T-code F110 ..I have a Sub Routine Program where I have few Form statements which is called by SAP - Script using Perform Statements, But my problem is when I set a break point in Sub Routine pool program, the out put is issuing with out Debugger ...
    Could any one plz suggest me wht to do???
    Help ful answers will be rewarded....
    Regards,
    sg

    Hi,
    First see if the 'Perform' statement is getting triggered in Script. To put a breakpoint in any script ( even if you do not know the form name, that is the best part ) is se38---->RSTXDBUG --->F8 & execute your pgm/Transaction. The control will wait in the form-debugger.
    I hope this helps,
    Regards
    Raju Chitale

  • How do we write the sub routines in smart forms?

    1) How do we write the sub routines in smart forms?
    2) What is the’ form interface’ in smart forms?
    3) Write down the path for writing for select queries in smart forms?
    4) How do we put dynamic page break in smart forms?
    5) in which system field contain the total page number of all forms in the currently processed print request in smart forms?
    6) What is the name of function module used to calling smart forms?
    1)     What is the functionality of function module ‘controal_form’?
    2)     How do we print the system date in this format ’15th Jan 2008’ on scripts?
    3)     What r the various print modes available in scripts?
    4)     What is the tcode for text element?
    5)     How do we draw horizontal line in scripts?
    6)     How can we suppress the leading zeros for a field in scripts?
    7)     In which system field is used to print current no page in scripts?
    Which f.m is used to reads text in sap scripts

    1) How do we write the sub routines in smart forms?
    after opening form see global definitions
    click on that there one tab called form routines inthat you can write subroutines logic.
    You can call in program lines .
    2) What is the’ form interface’ in smart forms?
    It is an interface between program and form .
    like function module we provide import,export,tables,exceptions
    Based on import and export parameters form will display for us.
    3) Write down the path for writing for select queries in smart forms?
    On window give right click in that command->programlines
    you can write all select  statements.
    4) How do we put dynamic page break in smart forms?
    you can define break point using break-point<>. syntax.
    5) in which system field contain the total page number of all forms in the currently processed print request in smart forms?
    SFSY-PAGE
    SFSY-JOBPAGES
    6) What is the name of function module used to calling smart forms?
    SSF_FUNCTION_MODULE_NAME
    =================
    1) What is the functionality of function module ‘control_form’?
    This function module is used to insert SAPScript control commands like NEW-PAGE etc from whithin the ABAP program.
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
      COMMAND    =
    EXCEPTIONS
      UNOPENED   = 1
      OTHERS        = 3
    IF SY-SUBRC NE 0.
    MESSAGE ...
    ENDIF.
    2) How do we print the system date in this format ’15th Jan 2008’ on scripts?
    Use SET DATE MASK to change format of date display.
    3) What r the various print modes available in scripts?
    4) What is the tcode for text element?
    se91
    5) How do we draw horizontal line in scripts?
    &ULINE&
    6) How can we suppress the leading zeros for a field in scripts?
    &it_vbak-vbeln(Z)&
    7) In which system field is used to print current no page in scripts?
    &SYST-PAGE& of &SYST-FORMPAGES&
    Which f.m is used to reads text in sap scripts
    READ_TEXT functiomodule.
    Reward points

  • Include or sub-routine in user-exit

    Hi all,
    i want to put  a sub-routine in my customer user-exit (CMOD).but i can not put the subroutine.
    can i put a subroutine or include statement in a user exit?
    correct answers will be rewarded.
    Thanks
    pabi

    You can make subroutine calls inside a User exit, only if the exit is part of a function pool. All the subroutines can be placed in an include in the function pool & can be called with a Perform Statement from the User Exit.
    ~Suresh

  • How do we define a sub-routine in a subroutine pool

    How do we define a sub-routine in a subroutine pool and how do we call the same in an executable program

    Hi
    Go to SE38.Create a program and in the program type select Subroutine pool.Inside this u can code for teh various subroutines or forms.
    For calling these forms these forms in ur main program refer below link:
    <u>http://help.sap.com/saphelp_nw04/helpdata/en/9f/db999535c111d1829f0000e829fbfe/content.htm</u>
    Sample code:
    Below is the subroutine pool used in the creation of the SAP Script:
    Program Name : Z689_SUBROUTINE
    Date          : 03/28/2007
    Author        : Sayee Manojnah Kasala
    Description  : This is the subroutine used for SAP Script,
                   Z689_SAPSCRIPT.It fetches customer details like
                    customer name & place
    PROGRAM  Z689_SUBROUTINE.
    Form GET_LAND1
    Fetches the country key
    *&      Form  get_land1
          text
         -->INTABLE    text
         -->OUTTABLE   text
    FORM get_land1 TABLES intable STRUCTURE itcsy
                          outtable STRUCTURE itcsy.
      DATA: v_kunnr LIKE kna1-kunnr,
            v_land1 LIKE kna1-land1,
            v_name1 LIKE kna1-name1.
      READ TABLE intable INDEX 1.
      v_kunnr = intable-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = v_kunnr
        IMPORTING
          output = v_kunnr.
      IF sy-subrc = 0.
        SELECT SINGLE land1
          FROM kna1
          INTO v_land1
          WHERE kunnr = v_kunnr.
        IF sy-subrc = 0.
          READ TABLE outtable INDEX 1.
          outtable-value = v_land1.
          MODIFY outtable INDEX 1.
        ENDIF.
        SELECT SINGLE name1
          FROM kna1
          INTO v_name1
          WHERE kunnr = v_kunnr.
        IF sy-subrc = 0.
          READ TABLE outtable INDEX 2.
          outtable-value = v_name1.
          MODIFY outtable INDEX 2.
        ENDIF.
      ENDIF.
      CLEAR: intable,outtable.
    ENDFORM.                                                    "get_land1
    Form GET_LANDX
    Fetches the Country Name
    *&      Form  get_landx
          text
         -->INTABLE    text
         -->OUTTABLE   text
    FORM get_landx TABLES intable STRUCTURE itcsy
                          outtable STRUCTURE itcsy.
      DATA: v_land1 LIKE kna1-land1,
            v_landx LIKE t005t-landx.
      READ TABLE intable INDEX 1.
      v_land1 = intable-value.
      IF sy-subrc = 0.
        SELECT SINGLE landx
          FROM t005t
          INTO v_landx
          WHERE land1 = v_land1 AND spras = 'E'.
        IF sy-subrc = 0.
          READ TABLE outtable INDEX 1.
          outtable-value = v_landx.
          MODIFY outtable INDEX 1.
        ENDIF.
      ENDIF.
      CLEAR: intable,outtable.
    ENDFORM.                    "get_landx
    It can be called as follows:
    PERFORM GET_LANDX IN PROGRAM Z689_SUBROUTINE
    USING &V_LAND1&
    CHANGING&V_LANDX&
    ENDPERFORM.
    Reward points if found useful.
    Thanks
    Vasudha
    Message was edited by:
            Vasudha L

  • Urgent!!!!Related To SUB-ROUTINES

    Hi All,
    I have 2 subroutines.My problem is that if a particular sub-routine is terminated in middle for any reason my second sub-routine should not get called.How can i know that?Please answer my question as soon as possible.
    Useful answers will be rewarded with points.
    Regards,
    Chaitanya.
    Message was edited by:
            LEELA KRISHNA SAI CHAITANYA

    Hi leela,
    you can use one global variable for this as flag.
    ex:
    data flag type c.
    perform sub1.
    if flag = 'X'.
    perform sub2.
    endif.
    form sub1.
    if (condition yes).
       flag = 'X'.
    endif.
    endform.
    form sub2.
    endform.
    this will work well

  • How to pass parametrs into application

    I have a applet which i would like to run as a application. Question is how to pass parametrs which applet need. WHen i use this.getParameter("nameofparam") i got stupid NullPointerException.
    Thanks for any advice
    Tomas

    The getParameter method tries to look at the HTML document in which the applet is embedded, so it will always return null if there's no HTML document to inspect (note that the method itself isn't throwing a NullPointerException - that's thrown when you try to do something with the null parameter).
    So you'll have to use a completely different way of setting the parameters. The simplest is to provide a default value for if getParameter returns null:
    String parameter = getParameter("nameofparam");
    if (parameter == null)
       parameter = "Default value";Alternatively you could pass parameters at the command line and reference them with the array passed to the main method, or if your application has a GUI they could be taken from a menu, etc.

  • Smart forms not displaying result from sub routine

    I am working on a smart form and need to display the description of the fabric code. Under Form Routines, I create a sub routine
    FORM fcc_values USING gv_fabrictext.
    which is supposed to store the description in gv_fabrictext. GV_FABRICTEXT has been declared in global data as char64. Then I call prior to displaying my table as
    perform fcc_values using gv_fabrictext.
    And then insert the field &gv_fabrictext& in cell but this does not display any result
    I know for sure that this sub routine works as I have tested it separately as a test program. Any ideas?

    1. put break point at ssf_function madulename and check field value.
    or
    2 fm_name export parameter ur not mentioned
    or
    3 global variable not defined properly
    go through above. still if u didnt get
    need program where the problem to find.
    Message was edited by:
            Deepa KN

  • How do we pass values and Internal tables to Sub-routines

    how do we pass values and Internal tables to Sub-routines

    Hi,
    You can use the USING..or TABLES..or Changing addition..
    Check this example.
    DATA: T_MARA TYPE STANDARD TABLE OF MARA.
    PERFORM DISPLAY USING T_MARA.
    FORM DISPLAY USING LT_MARA LIKE T_MARA.
    DATA: WA TYPE MARA.
    LOOP AT LT_MARA INTO WA.
      WRITE: / WA-MATNR.
    ENDLOOP.
    ENDFORM.
    Thanks
    Naren

  • Passing Select option to the sub routine

    Hi All ,
    how can we pass  select option values to a subroutine ,
    Thanks in Advance
    Vinay

    Hi Vinay Kolla,
    Check out this.
    TYPES: TYP_DATUM TYPE RANGE OF SY-DATUM.
    DATA: WA_DATUM   TYPE LINE OF TYP_DATUM.
    SELECT-OPTIONS : S_DATUM FOR SY-DATUM.
    START-OF-SELECTION.
      PERFORM WRITE_DATUM TABLES S_DATUM[].
    *&      Form  write_datum
    *       text
    *      -->P_S_DATUM  text
    FORM WRITE_DATUM TABLES P_S_DATUM TYPE TYP_DATUM.
      LOOP AT P_S_DATUM INTO WA_DATUM.
        WRITE : /10 WA_DATUM-SIGN,
                    WA_DATUM-OPTION,
                    WA_DATUM-LOW,
                    WA_DATUM-HIGH.
      ENDLOOP.
    ENDFORM.            
    Regards,
    R.Nagarajan.
    We can -

  • Passing values to sub VI and writing data to controls

    As part of a control interface for a VFD i am interfacing with using Modbus TCP I wanted to try and compartmentalise some of my code into a subVi
    However in doing so I am having a lot of trouble understanding how I can read the current drive settings for the Ramp up and Down values and update those values into the main faceplate of my control.
    The sub Vi is tested and works exactly how I want. Selecting Read (latch on pressed) reads the registers from the drive and outputs it to the controls and the indicators. The indicators were incorporated because I did not know how to pass the data out of the sub vi without them. Updating works to write the current value in the controls to the VFD registers.
    However when I incorporate this VI into my larger project the values are always displayed as zeros if I have the switch set to latch. However i do see a momentary flash of the correct values soon after pressing the read button or if i change it from latched operation to switched, however i would prefer it to opperate in a latched mode so as to reduce communication overheads to the drive. 
    Solved!
    Go to Solution.
    Attachments:
    Modbus sub vi.pdf ‏943 KB

    Hi,
    A number of suggestions:
    1. Use references and property nodes to set FP indicators from a subVI (you can learn more here and here)
    2. Don't put output indicators inside Cases. When the case is not Read, the VI outputs default values to the outputs and gives you the zero values. 
    Good luck,
    Danielle
    "Wisdom comes from experience. Experience is often a result of lack of wisdom.”
    ― Terry Pratchett

Maybe you are looking for

  • Making two hard drives work or appear as a single drive

    I have a G5 with two 500 GB internal drives. One I use to backup the first, however, now my drives are full and I would like to buy 1 TB external to back up the two internal drives but is there anyway to setup the second internal drive to work with t

  • [DG Physical] ORA-00368: checksum error in redo log block

    Hi all, I'm building a DR solution with 1 primary & 2 DR site (Physical). All DBs use Oracle 10.2.0.3.0 on Solaris 64bit. The first one ran fine for some days (6), then I installed the 2nd. After restoring the DB (DUPLICATE TARGET DATABASE FOR STANDB

  • Delete with extent returning to the tablespace

    When I delete all the rows from the table I can use: 'truncate table mytable drop storage' and the extents are returned to the tablespace that table resides in. Is something like this possible with the delete statement? If not - or if I just didn't u

  • User query error

    Dear all, I have a user query like below Select T001.ItemCode, T001.Warehouse from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'               FROM OINM T00               Inner Join (SELECT MIN(T0.[TransNum])

  • Creating apps using SDK without any programming skills

    Hey there. I have no idea of writing programs, I'm a total beginner, but would actually like to write an app for the iPhone. So, is it possible to do so with the SDK or do you need any skills?