On the PCI-6503 the outputs change unexpectedly

When I write to one port, the others re-set

Algore,
The PCI-6503 contains the 8255 chip. When you configure any port on this chip (3 ports), the digital lines on all of the port are reset. Thus, it appears that your method of writing to one port is also configuring this port. The "easy" digital I/O VIs and functions contain port configuration within them, so you may not know that you are configuring your port each time you are writing to it. You should configure all of your ports before you write any output information to them and not configure them again unless it is needed.
Good luck with your application.
Spencer S.

Similar Messages

  • Usb 6009 output changes

    Hi, I'm using a NI USB 6009 device.  I am using the analog output to drive very small currents (less than 1 micro Amp) through a 1 MOhm resistor.  I find that the output often changes significantly when I begin to acquire data, or if the computer is doing something, such as fitting data, or even if I am simply opening other files or programs.  Any advice?
    Thanks!
    Micah

    Hi, thanks for the responses.
    I'm outputing a DC voltage with values typically ranging from 0.1 V to 1 V.  The signal goes through a 1 MOhm resistor in series with a coil for producing very small magnetic fields applied to an atomic magnetometer.   It appears that the output changes by tens of millivolts, as recorded by a yokogawa oscilloscope with input impedance of 1 MOhm.  The coil and scope are both grounded.  I am using only a single input channel on the USB6009, coming from an SRS voltage preamp with output impedance of 50 Ohms
    I can also infer that there are changes in the current when the computer "does something" by looking at the signal in the atomic magnetometer.   
    Perhaps it would help if I shunted the output with some smaller resistor, say 10kOhm?
    I will look at the document you mentioned.
    Thanks again.

  • For PCI-4451,How to change the frequency of an output signal without any undefined state

    I would like to generate a signal using output channels of PCI-4451 and at the same time capture data using the input channels. Is there any method that I can generate a continuous signal without any undefined state when the signal frequency is being changed?
    Attachments:
    Input_Signal.bmp ‏729 KB

    Wee,
    DSA boards such as the PCI-4451 have a number of very desirable properties including high precision and a high sampling rate. The trade-off for the combination of these two properties is that the DSA boards cannot adjust their sampling rate on-the-fly. Instead they have to be stopped and reconfigured. During this reconfiguration time, the value of the board's output becomes flat and level.
    If you are looking to adjust the board's output without seeing these flat spots, you have to take a different approach to programming a DSA board. Instead of reconfiguring the board, what you need to do is allow the board to continue to run (at the same output frequency), and then overwrite the output buffer that the board reads to output values. This will
    allow you to output new data without the flat spots. Below you will find an example that displays this behavior.
    If you determine that this is not an acceptable workaround due to the limitations on output rates, you may want to look at using a Multifunction DAQ board (60xx or 62xx) or an arbitrary waveform generator (54xx) device instead.
    Best of luck with your application.
    Regards,
    Jed R.
    Applications Engineer
    National Instruments
    Attachments:
    Cont_Gen_Voltage_Wfm-Int_Clk-With_Updates_for_DSA.llb ‏161 KB

  • How do I rent SD movies on my 3rd Gen Apple TV?  I have changed the output resolution in Apple TV's setup to 720, but it didn't make any difference.

    I returned my 14 month old 3rd Gen Apple TV to the Apple store today because it would no longer see my wireless network.  Apple said that because of this problem, it was still covered under warranty, and gave me a new one.  Took it home and went through all the setup screens.  Even downloaded the latest software update.  Everything else appears to be working fine, but I can't rent a movie in SD like I used to be able to.  Everything I've read says that the settings is where I change that, but the one setting that I did find and change, under audio and visual, made no difference.  What am I missing?
    Thanks!

    This problem has been solved by me.  The settings under the Apple TV menu for audio/visual do adjust for the output to your screen either 1080 or 720, but don't have any effect on the iTunes purchases.
    The solution is under the Apple TV menu option "iTunes Store".  There you can choose from 1080 HD, 720 HD or 720 SD.  Now my movie selections in iTunes do offer the SD option.

  • How to change the output as text format in Apps R12.1.3

    Hi All,
    Currently iam trying to modify the Java Concurrent Program (FDExtractAndFormatting) in Batch Payment Process. This Program is generated in text format in 11i APPS. Now we are upgrading to R12.1.3. In R12.1.3 output is coming as PDF format. Here my requirement is how to change the output as text format in R12.1.3 also.
    Please do the needful and suggest me.
    Regards,
    Jagadeesh

    1. It is seeded java concurrent program. Some attributes are missing from 11i to R12. In 11i it is a text format.So i have to investgate on how to retrive those attributes in R12. What is the concurrent program name?
    Have you tried to change the output and submit the request?
    2. Once all are attributes are coming in PDF format. Client wants to open same output in text format as it is 11i (In R12 it is generated in PDF format).If the above does not help, please log a SR.
    Thanks,
    Hussein

  • How do I reduce the time from the detection of a input threshold to changing the output?

    Hi,
    I am using LabWindows 8.1 and a PXI-4461 with Vista (home) on a 2.81 GHz Dual Core Processor.  I wrote code to do the following:
    (1) output a ramp, input a signal concurrently (precise sychronization of these two is not important at this point)
    (2) if the input signal rises above 0.5 V, hold the output constant for 2 seconds, while continuing the input
    (3) finish the ramp
    More info: I do a continuous sampling, with 4 samples per Write, to do the output.  The input is read and analyzed with RegisterEveryNSamples (where N = 4).  The communication between the tasks is through a global variable "trap," which is set to 1 when threshold is reached.  I achieve holding the output constant by stopping the task (maintain existing value = true), and then restarting after the pause.  At 40kHz and 4 samples per Write, the limit imposed by the discrete data blocks would be  0.1 msec, but in fact I am getting delays of about 2.5 msec.  My write buffer is 120x4 samples, just so that there is space for me to write.  I do need to save the input data after the
    acquisition, preferably the whole sweep, but most importantly the data
    while the output is held constant.  
    So my questions are:
    (a) Does it really take 2 ms to stop a task? When I put in "Timer()"  functions as below, I get a difference of 0.002, which is of course limited to the resolution of the Timer() function. Returning from a function (the EveryN callback) should not take that long, right?
    (b) Can you suggest any better ways of doing this?
    /*****begin excerpt *****/
    DAQmxErrChk (DAQmxRegisterEveryNSamplesEvent(inputTaskHandle,DAQmx_Val_Acquired_Into_Buffer,4 ,0,EveryNCallback,NULL));
    DAQmxErrChk (DAQmxWriteAnalogF64(outputTaskHandle,480,0,10.0,DAQmx_Val_GroupByChannel,outData,&written, NULL));
    DAQmxErrChk (DAQmxStartTask(inputTaskHandle));
    DAQmxErrChk (DAQmxStartTask(outputTaskHandle));
        for (count =120;count<10000; count++)
            if (trap==0) {
                DAQmxErrChk (DAQmxWriteAnalogF64(gTaskHandle,4,0,10.0,DAQmx_Val_GroupByChannel,&outData[count*sampsToWrite],&written,NULL));
            } else {
                    DAQmxErrChk (DAQmxStopTask(outputTaskHandle));
                    time2 = Timer();
                    done = 1;
                    ProcessDrawEvents();
                    ProcessSystemEvents();
                    Delay (2.0);
                    trap = 0;
                    count++;
                    DAQmxErrChk (DAQmxWriteAnalogF64(outputTaskHandle,480,0,10.0,DAQmx_Val_GroupByChannel,&outData[count*4],&written,NULL));
                    count = count+119;
                    DAQmxErrChk (DAQmxStartTask(outputTaskHandle));
    /*****end excerpt *****/
    int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples,void *callbackData)
        DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,nSamples,10.0,DAQmx_Val_GroupByScanNumber,&readData[inCount*nSamples],nSamples,&numRead,NULL));
        if (trap == 0 && done == 0) {
            for (i=0; i<nSamples; i++) {
                if (readData[inCount*nSamples+i] > 0.5) {
                    trap = 1;
                    time1 = Timer();
                    break;
        } else done = 1;
        inCount++;
    Error:
        return 0;
    I would appreciate any help or advice! Thanks.  (Sorry about oddities in the code.)

    There are a number of applictations like Carbonite, Aperture, Entourage, VM Fusion, Parellels, etc that treat any change to the application as a complete change to application's database.
    So, if you make one small email change in Entourage for example, the entire database is backed up on the next pass. As you might imagine, this can fill up a Time Capsule very quickly.
    Suggest that you download a utility like BackupLoupe to find out exactly what is being backed up on each pass. Then you can exclude that item from backups if you wish.
    http://soma-zone.com/BackupLoupe/

  • I have s mac book pro--I would like very much to have the output to the DVI cable --my audio(sound) wilkl nit default to DVI output  --How can this be changed

    I have a mac book pro--I would like very much to have the output to the DVI cable --my audio(sound) wilkl nit default to DVI output  --How can this be changed, so it does not default to interabnl speaker
    Is there a way to force the system to change to DVI output?????
    thanks a lot

    Hi there,
    You may find the troubleshooting steps in the article below helpful.
    Troubleshooting issues with no audio from built-in speakers on Macs
    http://support.apple.com/kb/ts1574
    -Griff W.

  • ALV- Changing the output data and saving in database

    hi friends,
    I have to change the material description in the output and have to save the changes in database..
    For changing the description I have to raise a pop-up, then I have to give the required change and then save..
    How to do it?
    My code is as follows:
    TABLES : vbrk,vbrp,vbpa,adrc.
    TYPE-POOLS : slis.
    DATA: w_report_id  LIKE sy-repid.
    DATA: w_title    TYPE lvc_title VALUE      'DIPLAY CUSTOMER BILLING DOCUMENT'.
    DATA: w_layout   TYPE slis_layout_alv.
    DATA: w_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: w_events   TYPE slis_t_event.
    DATA: w_header   TYPE slis_t_listheader.
    DATA: sum LIKE vbrk-netwr.
    SELECT-OPTIONS:
         erdat FOR vbrk-erdat,
         vkorg FOR vbrp-vkorg_auft,
         kunag FOR vbrk-kunag.
    DATA : BEGIN OF itab OCCURS 0,
           fkdat TYPE vbrk-fkdat,
           kunrg TYPE vbrk-kunrg,
           name1 TYPE adrc-name1,
           vbeln TYPE vbrk-vbeln,
           augru_auft TYPE vbrp-augru_auft,
           netwr TYPE vbrk-netwr,
           waerk TYPE vbrk-waerk,
           vbtyp TYPE vbrk-vbtyp,
           fkart TYPE vbrk-fkart,
           END OF itab.
    DATA itab1 LIKE STANDARD TABLE OF itab.
    SELECT vbrkfkdat vbrkkunrg adrcname1 vbrkvbeln vbrp~augru_auft
           vbrknetwr vbrkwaerk
           INTO TABLE itab1
           FROM ( ( ( vbrk INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln )
           INNER JOIN vbpa ON vbpavbeln = vbrkvbeln )
           INNER JOIN adrc ON adrcaddrnumber = vbpaadrnr )
           WHERE vbtyp = 'O'
           AND vbrk~erdat IN erdat
           AND vbrp~vkorg_auft IN vkorg
           AND vbrk~kunag IN kunag.
    w_report_id = sy-repid.
    PERFORM i_layout CHANGING w_layout.
    PERFORM i_fieldcat CHANGING w_fieldcat.
    SORT itab1 BY waerk fkart .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program = 'ZTRAINING2'
        i_grid_title       = w_title
        is_layout          = w_layout
        it_fieldcat        = w_fieldcat
        i_save             = 'A'
      TABLES
        t_outtab           = itab1
      EXCEPTIONS
        program_error      = 1
        OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  i_fieldcat
          text
         -->P_W_FEILDCAT  text
    FORM i_fieldcat  CHANGING p_w_feildcat.
      DATA: l_line_fieldcat TYPE slis_fieldcat_alv.
      CLEAR l_line_fieldcat.
      l_line_fieldcat-fieldname = 'FKDAT'.
      l_line_fieldcat-ref_tabname = 'ITAB1'.
      l_line_fieldcat-edit_mask  = '__-__-____'.
      l_line_fieldcat-seltext_m = 'Billing Document date '.
      APPEND l_line_fieldcat TO w_fieldcat.
      CLEAR l_line_fieldcat.
      l_line_fieldcat-fieldname = 'KUNRG'.
      l_line_fieldcat-ref_tabname = 'ITAB1'.
      l_line_fieldcat-seltext_m = 'Cust no'.
      APPEND l_line_fieldcat TO w_fieldcat.
      CLEAR l_line_fieldcat.
      l_line_fieldcat-fieldname = 'NAME1'.
      l_line_fieldcat-ref_tabname = 'ITAB1'.
      l_line_fieldcat-seltext_m = 'Name of the reseller'.
      APPEND l_line_fieldcat TO w_fieldcat.
      CLEAR l_line_fieldcat.
      l_line_fieldcat-fieldname = 'VBELN'.
      l_line_fieldcat-ref_tabname = 'ITAB1'.
      l_line_fieldcat-seltext_m = 'Billing document number'.
      APPEND l_line_fieldcat TO w_fieldcat.
      CLEAR l_line_fieldcat.
      l_line_fieldcat-fieldname = 'AUGRU_AUFT'.
      l_line_fieldcat-ref_tabname = 'ITAB1'.
      l_line_fieldcat-seltext_m = 'Order reason'.
      APPEND l_line_fieldcat TO w_fieldcat.
      CLEAR l_line_fieldcat.
      l_line_fieldcat-fieldname = 'NETWR'.
      l_line_fieldcat-ref_tabname = 'ITAB1'.
      l_line_fieldcat-seltext_m = 'Amount'.
      APPEND l_line_fieldcat TO w_fieldcat.
      CLEAR l_line_fieldcat.
      l_line_fieldcat-fieldname = 'WAERK'.
      l_line_fieldcat-ref_tabname = 'ITAB1'.
      l_line_fieldcat-seltext_m = 'Currency'.
      APPEND l_line_fieldcat TO w_fieldcat.
    ENDFORM.                    "i_fieldcat
    *&      Form  i_layout
          text
         -->P_W_LAYOUT text
    FORM i_layout  CHANGING p_w_layout.
      CLEAR w_layout.
      w_layout-colwidth_optimize = 'X'.
      w_layout-edit = 'X'.
    ENDFORM.                    " i_layout
    Thanks,
    Revathi Raju.

    Check out the following link for top_of_page event in OOPs ALV.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    You can also check out the following program.
    DATA: save_ok LIKE sy-ucomm,
    g_container TYPE scrfname VALUE 'CC1',
    g_grid TYPE REF TO cl_gui_alv_grid,
    g_custom_container TYPE REF TO cl_gui_custom_container,
    gt_fieldcat TYPE lvc_t_fcat,
    g_max TYPE i VALUE 100.
    * declarations for top of page event
    Data: gv_c_split type ref to cl_gui_splitter_container,
    gv_c_ptv type ref to cl_gui_container,
    gv_alv_ptv type ref to cl_gui_alv_grid,
    o_dd_doc TYPE REF TO cl_dd_document,
    text TYPE sdydo_text_element,
    o_split type ref to cl_gui_easy_splitter_container,
    o_top type ref to cl_gui_container,
    o_bot type ref to cl_gui_container,
    gv_c_vp type ref to cl_gui_container.
    * end of declaration for top of page.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    *class lcl_application_dc definition deferred.
    DATA: o_event_receiver TYPE REF TO lcl_event_receiver.
    * g_dc type ref to lcl_application_dc.
    DATA: gt_outtab TYPE TABLE OF sbook.
    * CLASS lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS: handle_f4 FOR EVENT onf4 OF cl_gui_alv_grid
    IMPORTING e_fieldname
    es_row_no
    er_event_data
    et_bad_cells
    e_display,
    handle_top_of_page FOR EVENT top_of_page OF cl_gui_alv_grid
    IMPORTING e_dyndoc_id.
    METHODS: reset.
    METHODS: show_f4.
    PRIVATE SECTION.
    * attributes for creating an own F4-Help
    * (using a second ALV Grid Control
    DATA: f4_grid TYPE REF TO cl_gui_alv_grid,
    f4_custom_container TYPE REF TO cl_gui_custom_container.
    TYPES: BEGIN OF ty_f4.
    TYPES: value TYPE s_class.
    TYPES: descr(20) TYPE c.
    TYPES: END OF ty_f4.
    DATA: f4_itab TYPE TABLE OF ty_f4.
    DATA: f4_fieldcatalog TYPE lvc_t_fcat.
    * attributes to store event parameters
    * (after the CALL SCREEN command, the event parameters
    * are not accessible)
    TYPES: BEGIN OF onf4_event_parameters_type.
    TYPES: c_fieldname TYPE lvc_fname.
    TYPES: cs_row_no TYPE lvc_s_roid.
    TYPES: cr_event_data TYPE REF TO cl_alv_event_data.
    TYPES: ct_bad_cells TYPE lvc_t_modi.
    TYPES: c_display TYPE char01.
    TYPES: END OF onf4_event_parameters_type.
    DATA: f4_params TYPE onf4_event_parameters_type.
    * Methods to create own F4-Help
    * (This is done using a second ALV Grid Control)
    METHODS: init_f4.
    METHODS: build_fieldcatalog.
    METHODS: fill_f4_itab .
    METHODS: on_double_click FOR EVENT double_click OF cl_gui_alv_grid
    IMPORTING es_row_no.
    ENDCLASS. "lcl_application_f4 DEFINITION
    * CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    *§2. Implement an event handler method for event ONF4.
    METHOD handle_f4.
    * Save event parameter as global attributes of this class
    * (maybe solved differently if you use a function module!)
    f4_params-c_fieldname = e_fieldname.
    f4_params-cs_row_no = es_row_no.
    f4_params-cr_event_data = er_event_data.
    f4_params-ct_bad_cells = et_bad_cells.
    f4_params-c_display = e_display.
    *§3. Call your own f4 help. To customize your popup check
    * first if the cell is ready for input (event parameter E_DISPLAY).
    * (parameter E_DISPLAY is checked later in method on_double_click)
    * (Probably, you would call a function module at this point,
    * pass the needed event parameter and call the popup screen
    * within that function module. This is not done in this example
    * to avoid scattering its code).
    CALL SCREEN 101 STARTING AT 10 10.
    *§7. Inform the ALV Grid Control that an own f4 help has been processed
    * to suppress the standard f4 help.
    er_event_data->m_event_handled = 'X'.
    ENDMETHOD. "on_f4
    METHOD show_f4.
    * DATA: ls_outtab TYPE sbook.
    * initialize own f4 help if needed
    IF f4_custom_container IS INITIAL.
    CALL METHOD init_f4.
    ENDIF.
    CALL METHOD fill_f4_itab.
    * refresh list of values in f4 help and show it
    CALL METHOD f4_grid->refresh_table_display.
    * CAUTION: Do not use method REFRESH_TABLE_DISPLAY for
    * your editable ALV Grid instances while handling events
    * DATA_CHANGED or ONf4. You would overwrite intermediate
    * values of your output table on frontend.
    * 'f4_grid' is a non-editable ALV Grid Control for the
    * application specific F4-Help. Therefore, calling
    * REFRESH_TABLE_DISPLAY for this instance has no
    * negative effect.
    CALL METHOD cl_gui_cfw=>flush.
    ENDMETHOD. "show_f4
    METHOD init_f4.
    DATA: ls_f4_layout TYPE lvc_s_layo.
    * build fieldcatalog entries for f4
    CALL METHOD build_fieldcatalog.
    * create controls
    CREATE OBJECT f4_custom_container
    EXPORTING container_name = 'CC_ONF4'.
    CREATE OBJECT f4_grid
    EXPORTING i_parent = f4_custom_container.
    * hide toolbar
    ls_f4_layout-no_toolbar = 'X'.
    CALL METHOD f4_grid->set_table_for_first_display
    EXPORTING
    is_layout = ls_f4_layout
    CHANGING
    it_fieldcatalog = f4_fieldcatalog
    it_outtab = f4_itab.
    * register event double click on backend
    SET HANDLER me->on_double_click FOR f4_grid.
    * flush since 'ls_layout' is local!
    CALL METHOD cl_gui_cfw=>flush.
    ENDMETHOD. "init_f4
    METHOD fill_f4_itab.
    DATA ls_f4_itab TYPE ty_f4.
    * Delete all entries in f4_itab to determine
    * offered values dynamically
    CLEAR f4_itab[].
    ls_f4_itab-value = 'C'.
    ls_f4_itab-descr = text-t03. "Business Class
    APPEND ls_f4_itab TO f4_itab.
    ls_f4_itab-value = 'Y'.
    ls_f4_itab-descr = text-t04. "Economie Class
    APPEND ls_f4_itab TO f4_itab.
    ls_f4_itab-value = 'F'.
    ls_f4_itab-descr = text-t05. "First Class
    APPEND ls_f4_itab TO f4_itab.
    ENDMETHOD. "fill_f4_itab
    METHOD build_fieldcatalog.
    DATA: ls_fcat TYPE lvc_s_fcat.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'VALUE'.
    ls_fcat-coltext = text-t02.
    * ls_fcat-inttype = 'S_CLASS'.
    ls_fcat-outputlen = 5.
    APPEND ls_fcat TO f4_fieldcatalog.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'DESCR'.
    ls_fcat-coltext = text-t01.
    ls_fcat-inttype = 'C'.
    ls_fcat-outputlen = 20.
    APPEND ls_fcat TO f4_fieldcatalog.
    ENDMETHOD. "build_fieldcatalog
    METHOD on_double_click.
    *§5. If not already caught by your own f4 help, check whether
    * the triggered cell was ready for input by using E_DISPLAY
    * and if not, exit.
    IF f4_params-c_display EQ 'X'.
    LEAVE SCREEN.
    ENDIF.
    *§6. After the user selected a value, pass it to the ALV Grid Control:
    *§ 6a. Define a field symbol of type: LVC_T_MODI and a structure of
    * type LVC_S_MODI to pass the value later on.
    FIELD-SYMBOLS <itab> TYPE lvc_t_modi.
    DATA: ls_modi TYPE lvc_s_modi,
    ls_f4_itab TYPE ty_f4.
    *§ 6b. Dereference attribute M_DATA into your field symbol and add
    * the selected value to the table to which this symbol points to.
    ASSIGN f4_params-cr_event_data->m_data->* TO <itab>.
    ls_modi-row_id = f4_params-cs_row_no-row_id.
    ls_modi-fieldname = f4_params-c_fieldname.
    READ TABLE f4_itab INTO ls_f4_itab INDEX es_row_no-row_id.
    ls_modi-value = ls_f4_itab-value.
    APPEND ls_modi TO <itab>.
    LEAVE TO SCREEN 0.
    ENDMETHOD. "on_double_click
    METHOD reset.
    FIELD-SYMBOLS <itab> TYPE lvc_t_modi.
    ASSIGN f4_params-cr_event_data->m_data->* TO <itab>.
    CLEAR <itab>[].
    ENDMETHOD. "reset
    METHOD handle_top_of_page.
    text = 'Top of page for program ZAMIT_SPLIT_CONTAINER'.
    CALL METHOD e_dyndoc_id->add_text
    EXPORTING text = text
    sap_fontsize = 'LARGE'
    sap_style = 'HEADING'.
    CALL METHOD e_dyndoc_id->display_document
    EXPORTING parent = o_top.
    ENDMETHOD. "handle_top_of_page
    ENDCLASS. "lcl_application_f4 IMPLEMENTATION
    END-OF-SELECTION.
    CALL SCREEN 100.
    * MODULE PBO OUTPUT *
    MODULE pbo OUTPUT.
    SET PF-STATUS 'MAIN100'.
    SET TITLEBAR 'MAIN100'.
    IF g_custom_container IS INITIAL.
    PERFORM create_and_init_alv CHANGING gt_outtab[]
    gt_fieldcat.
    ENDIF.
    ENDMODULE. "pbo OUTPUT
    * MODULE PAI INPUT *
    MODULE pai INPUT.
    save_ok = sy-ucomm.
    CLEAR sy-ucomm.
    CASE save_ok.
    WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
    PERFORM exit_program.
    WHEN 'SWITCH'.
    PERFORM switch_edit_mode.
    WHEN OTHERS.
    * do nothing
    ENDCASE.
    ENDMODULE. "pai INPUT
    * FORM EXIT_PROGRAM *
    FORM exit_program.
    LEAVE PROGRAM.
    ENDFORM. "exit_program
    *& Form build_fieldcat
    * text
    * -->PT_FIELDCAT text
    FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
    DATA ls_fcat TYPE lvc_s_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    i_structure_name = 'SBOOK'
    CHANGING
    ct_fieldcat = pt_fieldcat.
    LOOP AT pt_fieldcat INTO ls_fcat.
    * Exchange smoker field with invoice field - just to
    * make the dependance between SMOKER and CLASS more transparent
    * (Smoking is only allowed in the first class).
    IF ls_fcat-fieldname EQ 'SMOKER'.
    ls_fcat-col_pos = 11.
    ls_fcat-outputlen = 10.
    ls_fcat-edit = 'X'.
    * Field 'checktable' is set to avoid shortdumps that are caused
    * by inconsistend data in check tables. You may comment this out
    * when the test data of the flight model is consistent in your system.
    ls_fcat-checktable = '!'. "do not check foreign keys
    MODIFY pt_fieldcat FROM ls_fcat.
    ELSEIF ls_fcat-fieldname EQ 'INVOICE'.
    ls_fcat-col_pos = 7.
    MODIFY pt_fieldcat FROM ls_fcat.
    ELSEIF ls_fcat-fieldname EQ 'CLASS'.
    ls_fcat-edit = 'X'.
    ls_fcat-outputlen = 5.
    ls_fcat-checktable = '!'. "do not check foreign keys
    MODIFY pt_fieldcat FROM ls_fcat.
    ENDIF.
    ENDLOOP.
    ENDFORM. "build_fieldcat
    *& Form create_and_init_alv
    * text
    * -->PT_OUTTAB text
    * -->PT_FIELDCAT text
    FORM create_and_init_alv CHANGING pt_outtab TYPE STANDARD TABLE
    pt_fieldcat TYPE lvc_t_fcat.
    DATA: lt_exclude TYPE ui_functions,
    ls_layout TYPE lvc_s_layo.
    CREATE OBJECT g_custom_container
    EXPORTING container_name = g_container.
    * CREATE OBJECT g_grid
    * EXPORTING i_parent = g_custom_container.
    CREATE OBJECT gv_c_split
    EXPORTING
    * link_dynnr = lv_dynnr
    * link_repid = lv_repid
    parent = g_custom_container
    rows = 2
    columns = 1
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    others = 3 .
    CALL METHOD gv_c_split->set_border
    EXPORTING
    border = space.
    CALL METHOD gv_c_split->get_container
    EXPORTING
    row = 1
    column = 1
    RECEIVING
    container = gv_c_ptv.
    CALL METHOD gv_c_split->set_row_height
    EXPORTING
    id = 1
    height = 20
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 6 .
    CALL METHOD gv_c_split->get_container
    EXPORTING
    row = 2
    column = 1
    RECEIVING
    container = gv_c_vp .
    CALL METHOD gv_c_split->set_row_height
    EXPORTING
    id = 2
    height = 10
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3 .
    CREATE OBJECT o_split
    EXPORTING
    parent = gv_c_ptv
    with_border = 1
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    others = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    o_top = o_split->top_left_container.
    o_bot = o_split->bottom_right_container.
    CREATE OBJECT gv_alv_ptv
    EXPORTING
    i_parent = o_bot
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    others = 5 .
    CREATE OBJECT g_grid
    EXPORTING
    i_parent = gv_c_vp
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    others = 5 .
    PERFORM build_fieldcat CHANGING pt_fieldcat.
    * Optionally restrict generic functions to 'change only'.
    * (The user shall not be able to add new lines).
    PERFORM exclude_tb_functions CHANGING lt_exclude.
    PERFORM build_data CHANGING pt_outtab.
    ls_layout-grid_title = 'F4 help implemented for field CLASS'.
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver->handle_top_of_page FOR gv_alv_ptv.
    SET HANDLER o_event_receiver->handle_top_of_page FOR g_grid.
    CREATE OBJECT o_dd_doc EXPORTING style = 'ALV_GRID'
    no_margins = 'X'.
    CALL METHOD gv_alv_ptv->set_table_for_first_display
    EXPORTING
    is_layout = ls_layout
    CHANGING
    it_outtab = pt_outtab[]
    it_fieldcatalog = pt_fieldcat
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4.
    CALL METHOD g_grid->set_table_for_first_display
    EXPORTING
    it_toolbar_excluding = lt_exclude
    is_layout = ls_layout
    CHANGING
    it_fieldcatalog = pt_fieldcat
    it_outtab = pt_outtab[].
    CALL METHOD gv_alv_ptv->list_processing_events
    EXPORTING
    i_event_name = 'TOP_OF_PAGE'
    i_dyndoc_id = o_dd_doc.
    * register f4 for field CLASS
    PERFORM register_events.
    * Set editable cells to ready for input initially
    CALL METHOD g_grid->set_ready_for_input
    EXPORTING
    i_ready_for_input = 1.
    ENDFORM. "CREATE_AND_INIT_ALV
    *& Form exclude_tb_functions
    * text
    * -->PT_EXCLUDE text
    FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
    * Only allow to change data not to create new entries (exclude
    * generic functions).
    DATA ls_exclude TYPE ui_func.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
    APPEND ls_exclude TO pt_exclude.
    ENDFORM. " EXCLUDE_TB_FUNCTIONS
    *& Form build_data
    * text
    * --> p1 text
    * <-- p2 text
    FORM build_data CHANGING pt_outtab TYPE STANDARD TABLE.
    DATA: ls_sbook TYPE sbook,
    l_index TYPE i.
    SELECT * FROM sbook INTO TABLE gt_outtab UP TO g_max ROWS.
    IF sy-subrc NE 0.
    PERFORM generate_entries CHANGING pt_outtab.
    ENDIF.
    LOOP AT pt_outtab INTO ls_sbook.
    l_index = sy-tabix.
    CLEAR ls_sbook-class.
    * Alternate between smoker and non smoker to make
    * it more obvious what this example is about
    l_index = l_index MOD 2.
    IF l_index EQ 1.
    ls_sbook-smoker = 'X'.
    ELSE.
    ls_sbook-smoker = ' '.
    ENDIF.
    MODIFY pt_outtab FROM ls_sbook.
    ENDLOOP.
    ENDFORM. " build_data
    *& Form generate_entries
    * text
    * -->PT_SBOOK text
    FORM generate_entries CHANGING pt_sbook TYPE STANDARD TABLE.
    DATA: ls_sbook TYPE sbook,
    l_month(2) TYPE c,
    l_day(2) TYPE c,
    l_date(8) TYPE c,
    l_prebookid TYPE i.
    ls_sbook-carrid = 'LH'.
    ls_sbook-connid = '0400'.
    ls_sbook-forcurkey = 'DEM'.
    ls_sbook-loccurkey = 'USD'.
    ls_sbook-custtype = 'B'.
    DO 110 TIMES.
    l_prebookid = sy-index.
    ls_sbook-forcuram = sy-index * 10.
    ls_sbook-loccuram = ls_sbook-loccuram * 2.
    ls_sbook-customid = sy-index.
    ls_sbook-counter = 18.
    ls_sbook-agencynum = 11.
    l_month = sy-index / 10 + 1.
    DO 2 TIMES.
    l_day = 3 + l_month + sy-index * 2.
    l_date+0(4) = '2000'.
    l_date+4(2) = l_month.
    l_date+6(2) = l_day.
    ls_sbook-fldate = l_date.
    SUBTRACT 3 FROM l_day.
    ls_sbook-order_date+0(6) = l_date+0(6).
    ls_sbook-order_date+6(2) = l_day.
    ls_sbook-bookid = l_prebookid * 2 + sy-index.
    IF sy-index EQ 1.
    ls_sbook-smoker = 'X'.
    ELSE.
    ls_sbook-smoker = space.
    ENDIF.
    ls_sbook-luggweight = l_prebookid * 10.
    IF ls_sbook-luggweight GE 1000.
    ls_sbook-wunit = 'G'.
    ls_sbook-class = 'C'.
    ELSE.
    ls_sbook-wunit = 'KG'.
    ls_sbook-class = 'Y'.
    ENDIF.
    IF ls_sbook-bookid > 40 AND ls_sbook-wunit EQ 'KG'.
    ls_sbook-invoice = 'X'.
    ENDIF.
    IF ls_sbook-bookid EQ 2.
    ls_sbook-cancelled = 'X'.
    ls_sbook-class = 'F'.
    ENDIF.
    APPEND ls_sbook TO pt_sbook.
    ENDDO.
    ENDDO.
    ENDFORM. " generate_entries
    *& Form register_events
    * text
    FORM register_events.
    *§1. Register event ONF4 at frontend using method
    * register_f4_for_fields. For this purpose, you pass a table
    * with all fields, for which you want to implement your own
    * f4 help.
    * remark: If you want to use an own f4 help for fields where
    * no standard f4 help exists set field F4AVAILABL for
    * this field in the fieldcatalog.
    DATA: lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
    CLEAR lt_f4.
    lt_f4-fieldname = 'CLASS'.
    * If you would like to deregister the field again,
    * pass value SPACE with field 'register'.
    lt_f4-register = 'X'.
    *§ 1b. If the value range in your f4 help depends on other
    * values of cells that are input enabled, set the
    * GETBEFORE parameter.
    * The consequence is that the ALV Grid Control raises
    * event DATA_CHANGED before the f4 help is called to
    * check values that the f4 help depends on.
    lt_f4-getbefore = 'X'.
    * The next parameter is used to change values after onf4 has
    * been processed. The ALV Grid Control will raise
    * event DATA_CHANGED afterwards, if you set it.
    lt_f4-chngeafter = space.
    INSERT TABLE lt_f4.
    CALL METHOD g_grid->register_f4_for_fields
    EXPORTING
    it_f4 = lt_f4[].
    * register events for abap objects (backend)
    SET HANDLER o_event_receiver->handle_f4 FOR g_grid.
    ENDFORM. " register_events
    * MODULE status_0101 OUTPUT
    MODULE status_0101 OUTPUT.
    SET PF-STATUS 'POPUP'.
    SET TITLEBAR 'POPUP'.
    CALL METHOD o_event_receiver->show_f4.
    ENDMODULE. " STATUS_0101 OUTPUT
    *& Module USER_COMMAND_0101 INPUT
    * text
    MODULE user_command_0101 INPUT.
    PERFORM user_command.
    ENDMODULE. " USER_COMMAND_0101 INPUT
    *& Form user_command
    * text
    FORM user_command.
    DATA: save_ok TYPE sy-ucomm.
    save_ok = sy-ucomm.
    CLEAR sy-ucomm.
    CASE save_ok.
    WHEN 'CANCEL'.
    CALL METHOD o_event_receiver->reset.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDFORM. "user_command
    *& Form switch_edit_mode
    * text
    FORM switch_edit_mode.
    IF g_grid->is_ready_for_input( ) EQ 0.
    * set edit enabled cells ready for input
    CALL METHOD g_grid->set_ready_for_input
    EXPORTING
    i_ready_for_input = 1.
    ELSE.
    * lock edit enabled cells against input
    CALL METHOD g_grid->set_ready_for_input
    EXPORTING
    i_ready_for_input = 0.
    ENDIF.
    ENDFORM. "switch_edit_mode
    For popup try this
    reward if helpfull
    Regards
    Pavan

  • How to change the output directory of .xml files

    Hi,
    There are lots of .xml files generated under
    $ORACLE_AS_HOME/j2ee/home/applications/xmlpserver/xmlpserver/xml.
    (ex:/usb/bipub3/oracle/oc4j_bi/j2ee/home/applications/xmlpserver/xmlpserver/xml).
    I found these files are generated in the following operation;
    1.Log in BI Publisher.
    2.Select the Schedules tab.
    I think they are kind of temp files so we will be able to delete them.
    But I'd like to know how to change the output directory.
    Can we change the above directory to other path?
    Regards.

    Why? As that may invalidate support since you configure/alter the deployment.
    The location is specified in oc4j_bi\j2ee\home\applications\xmlpserver\xmlpserver.war, so you could go into the war file and alter it.

  • How to change the output executable file name(a.prj:(output)--- b.exe)

    LabWindows / CVI: how to change the output executable file name
                For example, I have an A project a.prj, I do not want to compile the output file is a.exe, but b.exe.
    I will try to save as a.prj b.prj, a.cws save as b.cws
    eg:a.prj  ---->(output)--->b.exe
    Solved!
    Go to Solution.

    You can go to Build >> Target Settings menu item, select Release (or Release 64) in the Configuration filed and set the name of the executable to create in Application FIle field, withouyt need to change the prj or cws filename.
    See the complete description of available options here.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to change the ColumnName in the output of an ALV List

    ello Experts,
    Can you please let me know how can I change the column name of a field in an ALV List. For eg: I want to see the 'I_FIELDCAT-MATNR' field's name as 'ITEM NUMBER' in the output.
    Thanks for the help

    Hi Raj,
    Have a look at this file.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/eac1fa0b-0e01-0010-0990-8530de4908a6
    Reward if useful.
    Thanks
    Aneesh.

  • How to change the font size of the output data ?

    Hi,
    In my sap script, I have an include statement which fetches the data based on some input values. It so happens that the value fetched is displayed in very small font and is not readable. I want to increase the font size of that particular output. Is there any function to increase the output text size, may be relative to current size ??
    Hope I am clear.
    thanks

    Hi Rad,
    If you want to change the font for a particular O/P then
    YOu can use IF condition
    /: IF &NAST-KSCHL& EA 'ZNEU'.  ( Your O/P type
    PD   & TEXT&
    /: ELSE
    GD  &TEXT&
    /:ENDIF.
    PD : Paragraph with default font 8
    GD is paragraph of default font 12
    For Include text:
    /: IF &NAST-KSCHL& EA 'ZNEU'.  ( Your O/P type
    /: INCLUDE 'ADRS_HEADER' OBJECT TEXT ID ADRS LANGUAGE &PRINT_LANGUAGE&  Paragraph  PD
    /: ELSE
    /: INCLUDE 'ADRS_HEADER' OBJECT TEXT ID ADRS LANGUAGE &PRINT_LANGUAGE&  Paragraph  GD
    /:ENDIF.
    Hope this will help you.
    Lanka
    Message was edited by: Lanka Murthy

  • Using PCI-6503 on Win NT 4.0, with NIDAQ 6.8 or 6.9, in a C++ program I found the following DLL Initialization error..

    "Initialization of the DLL C:\WINNT\System32\NIPALU.dll failed. The process is terminating abnormally"
    The card tests OK with MAX2.0 and if I open the test panel first and then compile the exe, it works. So what exactly is the initialization Im missing but happens in MAX ?? While using PCI-6503 with Windows NT 4.0 SP6, and NI-DAQ 6.8.1 or 6.9, is there any initialization that a C++ program needs to do before trying to write to DIO lines ? I have a program in C++ which works fine (writes and reads the DIO lines from PCI-6503) IF I run it after opening the test panel for PCI-6503 in MAX 2.0. Otherwise it gives the following error..
    "DLL Initialization failed
    Initialization of the dynamic link library C:\WINNT\System32\NIPALU.dll failed. The process is terminating abnormally."
    The PCI-6503 tests OK using either NI-DAQ 6.8.1 or 6.9 and I can read write to the DIO lines using the MAX2.0's test panel. Also my program works fine if before compiling the code I open the test panel for PCI-6503 in MAX2.0, so I suspect there is some initialization Im missing in my program. Can someone educate me more on this. Thanks.

    Are you using ComponentWorks++ or just the NI-DAQ C interface?

  • Just connected apple tv. Everything works perfectly but the screen is not in color. I have tried reversing the HDMI cable and changing the output in settings and restarting. Any ideas of how to fix this?

    Just connected apple tv. Everything works perfectly but the screen is not in color. I have tried reversing the HDMI cable and changing the output in settings and restarting. The screen is still black and white. Any ideas of how to fix this?

    Hi im,
    Thanks for using Apple Support Communities.  This article has a few troubleshooting ideas for issues with color on your TV when using Apple TV:
    Apple TV (2nd and 3rd generation): Troubleshooting video issues
    http://support.apple.com/kb/TS5148
    Cheers,
    - Ari

  • DATAEXPORT - Can the output to the file be changed

    Hi,
    I have a working DATAEXPORT calc. However I was wondering if there is a way to change the output that ends up in the file? Currently it is putting the dimensions in an order that does not coincide with my fix statement. I assume Essbase just knows the optimal output order or something. I basically want to change the output order and then maybe eliminate some columns and possibly concatenate two together with a '_'. Is this possible within the calc itself?
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    SET DATAEXPORTOPTIONS
    DataExportDECIMAL 4;
    DataExportRELATIONALFILE ON;
    DataExportOVERWRITEFILE ON ;
    DataExportDynamicCalc OFF;
    DataExportDimHeader ON;
    DataExportCOLHEADER "PERIOD";
    /* Exports zero level data to specified directory */
    FIX (
    @Descendants("NU_Consolidated",0),
    @Descendants("TOTCO_FERC",0),
    @Descendants("NU_Actv",0),
    @Children("YEARS"),
    "NU_RESC",
    "TOT_SCCC",
    "TOT_CCCC",
    "Charge_Type_Total",
    "Final",
    "Budget"
    DATAEXPORT "File" "|" "/essbase111/cfa_test_090909.txt";
    ENDFIX

    Sorry Sam,
    Dataexport does things in the most efficient way possible so it dies not allow you to order the dimensions. It also does not let you drop columns. The two options you have are:
    1. Export to a relationsal table where you can then have a sql (dts or otherwise) reorder the columns, remove unwanted columns, concatinate columns, etc
    2. write a perl or vb or other program to post process the file to be what you want
    I would have offered using the jExport cdf as an alternative since it will do what you want, but I know you are not allowed it in your environment

Maybe you are looking for

  • My nano isnt working and the updater isnt working

    i've had my nano for a few months, a little before apirl i think. and i havent been adding new songs for about a month. i recently got a new cd for my birthday and i wanted to import them into my ipod. the updater came up and said i needed an update.

  • Thunderbolt to hdmi blinking problem

    I'm trying to plug my macbook into my lcd TV. I have an adaptor that is a mini display to HDMI adaptor. When I plug the laptop into the TV the TV looks for he signal and after a few seconds it blinks momentarily with the image from the macbook and th

  • How to disable slection parameter?

    can any body tell how to disable a selection parameter. I have parameter p_filename. I want to disable this. Please let me know. Thanks and Regards Harish

  • Boolean Search Criteria in Smart Folder

    I noticed that the smart folders that come with OS X 10.5 include "Today" "Yesterday" and so on. Examining the search criteria I saw that there is a boolean line "Any/None/All of the following are true". I cannot find how to add this line to my searc

  • Media Encoder CS5.5  Audio being converted into white noise

    I have recently started getting an intermittent problem where some video files are being encoded to FLV with the picture looking fine, but the sound coming out as white noise. The file used for the encoding looks and sound fine in every other app i h