How to separate the GUI interface from program execution in Labwindows?

Hallo,
I am trying to combine TCL interpreter with Labwindows in order to executes tcl scripts with user implemented C functions that interact with devices in Labwindows. The idea is from another hand to have the ability to control my program from GUI and in the same time to be able to execute command scripts that will take a more control on the device interface.
I can invoke the tcl interpreter for a single command or not so complicated script. When I execute a simple loop from the script my user interface stop to respond to any messages until interpreter exits the loop.
The question is how to separate both the GUI and the program that executes in background in my case the tcl interpreter?
Thanks,
Nikolai

Probably the best solution would be to do the TCP loop in another thread. For help with multithreading programming, see the CVI Multithreading Overview (cvi\bin\MultithreadingOverview.pdf) and the multithreading example programs (cvi\samples\utility\Threading).
Best Regards,
Chris Matthews
National Instruments

Similar Messages

  • How to generate the BPEL interface from XSD?

    I am new to the BPEL. How to generate the BPEL interface from XSD because I need the inputed payload to have a complex type instead the simple string?
    Thank you

    I made the following change to the xsd file, however when the input type change to emailDataType, it is underline by red color. and the bpm process, activity guide, organization become the unknown project object.
    <?xml version="1.0" encoding="UTF-8"?>
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/SampleBPM/SampleEmailNotification/SendEmail"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="process">
              <complexType>
                   <sequence>
                        <element name="input" type="emailDataType"/>
                   </sequence>
              </complexType>
         </element>
         <element name="processResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
              </complexType>
         </element>
    <complexType name="emailDataType" >
    <sequence>
    <element name="toEmailAddress" type="string" />
    <element name="ccEmailAddress" type="string" />
    <element name="emailSubject" type="string" />
    <element name="emailContent" type="string" />
    </sequence>
    </complexType>
    </schema>
    The XSD file is viewed by the design mode is fine on JDeveloper. Please help!

  • How to close the command prompt from program

    Hi,
    I am using Swing. i used System.exit(0) to close my frame when a condition is met. But the command prompt is not closed. How do i close that automatically

    @Op.
    When was the command prompt opened?
    It won't close if it was opened before you started your application, and it won't close if you are executing your application from a bat/cmd-file that doesn't terminate.
    Kaj

  • How to get the complete data from Webdynpro using a RFC

    hi guys,
    A form is created in the webdynpro, when that pdf form is called the user have to provide the key field ie the employee number in the form and then when he press the 'go' button a rfc is called and it gives all the details of the employee in the form. Then the user have to input some fields in the form and he have press the submit button. My problem is here, when the user is going to press the submit button that form will be converted to a stream (binary) of data and it is sent to one of the import parameter used in the RFC.
    I have created a RFC and created a import parameter of data type XSTRING, since i want to see what exactly R3 is receiving from web dynpro i am writing this contant in the sever as a text file. When i saw that text file i cant see the complete data.
    And when i searched in R3 the capacity of xstring is 1024 CHAR, so i dont know how to capture the entire data from webdynpro into my R3.
    I give the code what i worte please tell me am i missing anything in my code, or is there any data type which can hold more than 500kb of data which is coming from webdynpro.
    FUNCTION ZSEND_MAIL_ATTACHMENT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(OUT_PLACE_LEVEL) TYPE  XSTRING OPTIONAL
    *"     VALUE(BIN_DATA) TYPE  INDX_CLUST OPTIONAL
    *"  TABLES
    *"      IT_MESSAGE STRUCTURE  SOLISTI1
    Data Declaration
      DATA: gd_cnt TYPE i,
          gd_sent_all(1) TYPE c,
          gd_error TYPE sy-subrc,
          tab_lines LIKE sy-tabix.
    Structure Declaration
      DATA : BEGIN OF it_file OCCURS 0,
              row(255),
             END OF it_file.
      DATA : BEGIN OF i_split OCCURS 0,
      row(50),
      END OF i_split.
    Internal Table Declaration
      data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
      DATA : objbin LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE. "sOLIX
      DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
      data : wa_receiver like table of SOMLRECI1 with header line.
      data : it_receiver like table of SOMLRECI1 with header line.
      data : v_bin_data like SOLISTI1 occurs 0 with header line.
      DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
    *data bin_data1 like table of solix with header line.
      REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
      CLEAR   : objbin, it_packing_list, wa_receiver, it_receivers.
      DATA V_SUBJECT(255) VALUE 'HI'.
      gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SENDFILE'.
      gd_doc_data-obj_descr = v_subject.
      gd_doc_data-sensitivty = 'O'.
      APPEND GD_DOC_DATA.
    Appending The Internal Table it_packing_list
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'RAW'.
      it_packing_list-body_num = tab_lines.
      APPEND it_packing_list.
    *CALL FUNCTION 'GUI_UPLOAD'
    *EXPORTING
    *filename = V_FILE_PATH
    *filetype = 'BIN'
    *TABLES
    *data_tab = BIN_DATA.
      move bin_data to v_bin_data.
      append v_bin_data.
    *move soli to bin_data.
      LOOP AT V_BIN_DATA into objbin.
    MOVE v_bin_data TO objbin-line.
        APPEND objbin.
      ENDLOOP.
      CLEAR it_packing_list.
      DESCRIBE TABLE objbin LINES tab_lines.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'PDF'.
      it_packing_list-body_num = tab_lines.
      it_packing_list-doc_size = tab_lines * 255.
      APPEND it_packing_list.
    data file(255) value '/tmp/bali.txt'.
    *Appending The Internal Table it_receivers
    close dataset '/tmp/bali.txt'.
    open dataset '/tmp/bali.txt' for output in text mode encoding default.
    if sy-subrc = 0.
    loop at objbin.
    transfer objbin to '/tmp/bali.txt'.
    endloop.
    else.
    write 'hi'.
    close dataset '/tmp/bali.txt'.
    endif.
      it_receiver-receiver = '[email protected]'.
      it_receiver-rec_type = 'U'.
      it_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
      append it_receiver.
    *Move wa_receiver[] to it_receivers[].
    Clear it_receivers.
    if i_OUT_PLACE_LEVEL NE 0.
    loop at it_receivers into wa_receiver.
       loop at it_receivers into wa_receiver.
    **Function Module To Post The Message To Externa Mail
         CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
             document_data              = gd_doc_data
             put_in_outbox              = 'X'
             commit_work                = 'X'
           TABLES
             packing_list               = it_packing_list
             CONTENTS_TXT               = objbin
             receivers                  = it_receivers
           EXCEPTIONS
             too_many_receivers         = 1
             document_not_sent          = 2
             document_type_not_exist    = 3
             operation_no_authorization = 4
             parameter_error            = 5
             x_error                    = 6
             enqueue_error              = 7
             OTHERS                     = 8.
         clear wa_receiver.
    ENDFUNCTION.

    You have to convert your long string to a table of shorter strings.
    There may be other ways, but one possibility is to use a loop to process you string.
    while (there is something left)
       put the next e.g. 1024 characters in a new row of your table
    endwhile
    If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
    Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right

  • How to delete the Hierarchy data from Infoobjects.

    How to delete the Hierarchy data from Infoobjects. In my case I had 300 records in the corresponding table of info object.
    When i was trying to delete the hierarchy data, I am getting error message. "Some master data not deleted". Can any one tell me to delete all these records by using a program.

    Hi
    Go to SE11 and enter the hierarchy table name.
    /BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
    Thanks
    TG

  • How to solve the problem when opening program illustrator cs6 ERROR: 16 It is WINDOWS 8.1 / 64 BIT help please

    how to solve the problem when opening program illustrator cs6
    ERROR: 16
    It is WINDOWS 8.1 / 64 BIT
    help please

    Thanks, Jeff! The file Adobe Setup Error.log contains the following information:
    02/14/14 07:20:26:474 | [INFO] |  | OOBE | DE |  |  |  | 8860 | DEVersion: 5.0.0.0
    02/14/14 07:20:26:475 | [INFO] |  | OOBE | DE |  |  |  | 8860 | Loading library from C:\Program Files (x86)\Common Files\Adobe\OOBE\PDApp\DECore\DE5\Setup.dll
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    ::START TIMER:: [Total Timer]
    CHECK: Single instance running
    CHECK : Credentials
    Load Deployment File
    CHECK : Another Native OS installer already running
    Create Required Folders
    Assuming uninstall mode
    Lookup for master payload
    [    8860] Fri Feb 14 07:20:26 2014 ERROR
    DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    :: END TIMER :: [Total Timer] took 6.90443 milliseconds (0.00690443 seconds) DTR = 579.338 KBPS (0.56576 MBPS)
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 1 error(s), 0 warning(s)
    ERROR: DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    Please search the above error/warning string(s) to find when the error occurred.
    These errors resulted in installer Exit Code mentioned below.
    Exit Code: 33 - The product is not installed, cannot uninstall.
    Please see specific errors and warnings for troubleshooting. For example, ERROR: DW040 ...

  • How to do the Validations in Report Programming?

    How to do the Validations in Report Programming?
    how to do screen Validations and Field Validations if posssible can any one send the code regarding the Validation ....
    Tks
    Durusoju

    AT SELECTION-SCREEN - selscreen_event
    Syntax
      | { ON {para|selcrit} }
      | { ON END OF selcrit }
      | { ON BLOCK block }
      | { ON RADIOBUTTON GROUP radi }
      | { }
      | { ON {HELP-REQUEST|VALUE-REQUEST}
      |   FOR {para|selcrit-low|selcrit-high} }
      | { ON EXIT-COMMAND }.
    Alternatives:
    1. ... OUTPUT
    2. ... ON {para|selcrit}
    3. ... ON END OF selcrit
    4. ... ON BLOCK block
    5. ... ON RADIOBUTTON GROUP radi
    6. ... { }
    7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
          {para|selcrit-low|selcrit-high} }
    8. ... ON EXIT-COMMAND
    Effect
    These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
    Alternative 1
    ... OUTPUT
    Effect
    This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
    Note
    The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
    Alternative 2
    ... ON {para|selcrit}
    Effect
    This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
    No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
    Note
    If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
    Alternative 3
    ... ON END OF selcrit
    Effect
    This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
    Alternative 4
    ... ON BLOCK block
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
    Alternative 5
    ... ON RADIOBUTTON GROUP radi
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
    Note
    The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
    Alternative 6
    Effect
    The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
    Alternative 7
    ... ON { HELP-REQUEST | VALUE-REQUEST } FOR
        {para|selcrit-low|selcrit-high} }
    Effect
    The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
    In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
    Notes
    These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
    With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
    Alternative 8
    ... ON EXIT-COMMAND
    Effect
    This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
    Example
    In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
    REPORT demo_at_selection_screen.
    Global data
    DATA: sflight_tab TYPE TABLE OF sflight,
          sflight_wa  LIKE LINE  OF sflight_tab.
    Selection screens
    PARAMETERS p_carrid TYPE spfli-carrid.
    SELECTION-SCREEN BEGIN OF SCREEN 500.
      SELECT-OPTIONS s_conn FOR sflight_wa-connid.
      DATA s_conn_wa LIKE LINE OF s_conn.
    SELECTION-SCREEN END OF SCREEN 500.
    Handling selection screen events
    AT SELECTION-SCREEN ON p_carrid.
      IF p_carrid IS INITIAL.
        MESSAGE 'Please enter a value' TYPE 'E'.
      ENDIF.
      AUTHORITY-CHECK OBJECT 'S_CARRID'
                          ID 'CARRID' FIELD p_carrid
                          ID 'ACTVT'  FIELD '03'.
      IF sy-subrc = 4.
        MESSAGE 'No authorization for carrier' TYPE 'E'.
      ELSEIF sy-subrc <> 0.
        MESSAGE 'Error in authority check' TYPE 'A'.
      ELSE.
        IF sy-ucomm = 'ONLI'.
          CALL SELECTION-SCREEN '0500'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN.
      IF sy-dynnr = '0500'.
        IF s_conn IS INITIAL.
          MESSAGE 'Please enter values' TYPE 'W'.
        ELSE.
          SELECT *
                 FROM sflight
                 INTO TABLE sflight_tab
                 WHERE carrid = p_carrid AND
                       connid IN s_conn.
          IF sy-subrc <> 0.
            MESSAGE 'No flights found' TYPE 'E'.
          ENDIF.
        ENDIF.
      ENDIF.
    Main program
    START-OF-SELECTION.

  • Flat file having multiple header lines , how to separate the same and pushit into my intrnal table

    Hi Guys,
                    I got an issue , My flat file having multiple header lines
    TPS27RPR  MOME                                      THRIFT (SAVING) PLAN SYSTEM                                           Page    2
    09:54 05 JAN 2014                          List of Contributors w/Company Contributions                           Phase DAY Unit TRE
    Company No: xxxxxxxx - xxxxxxxxxxxxx.
                                                                            Employee/       Employee/
    Employee Full Name/                                                       Company         Company                        Allocation
    Number  ID Number                           PS  PN  End Date        Contribution          Profit        Total Balance   Percentage
    some lines of data and again
    TPS27RPR  MOME                                      THRIFT (SAVING) PLAN SYSTEM                                           Page    2
    09:54 05 JAN 2014                          List of Contributors w/Company Contributions                           Phase DAY Unit TRE
    Company No: xxxxxxxx - xxxxxxxxxxxxx.
                                                                            Employee/       Employee/
    Employee Full Name/                                                       Company         Company                        Allocation
    Number  ID Number                           PS  PN  End Date        Contribution          Profit        Total Balance   Percentage
    in this case how could I separate the header lines from the flat file and update the details to my internal table.
    kindly help me on this issue.
    Thanks and regards,
    M.S.Amirtharajvijay.

    Hi Amirthraj,
    If the flat file is static (if the content within it is same for all) then use the offset concept. First get the contents of the flat file into an internal table and later find the field that has to be in final internal table within the line, calculate the offset for the line and get the value into an workarea. Finally modify/append the work area into an internal table. Also wait for other experts answers for any other hassle free way to achieve the requirement.
    With Regards,
    Giriesh M

  • How to find the form name  from VA02 T.code

    how to find the form name  from VA02 T.code

    Hi Rajyam,
    I guess you are looking out for the formname which prints sales related documents.
    If this is what you want,then go to the T-code NACE and select the option K1Sales activities and click on the Output Types button on the top.The new window has all the types of Output types listed.Select the most appropriate and double click on the Processing routines button in the left side screen.
    The new window lists the program names and the forms associated with that output type.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • How to export the comp/interface to local hard disk

    hi all,
    can any one send me how to export the comp/interface to local hard disk
    thanks,
    viswa

    Hi Vishwa,
    It is not possible to export the project or comp/interface from a WDA project to your local hard disk.
    Also if you need more information on WD ABAP please post in WebDnpro ABAP forum. You will definitely get more information regarding your queries in that forum.
    I hope this answer helps you.
    Thanks and Regards,
    Pravesh

  • Anyone know how to stop the "activate" box from blocking usage of a perfectly legal copy of Ilisten? I want to help my dyslexic grandson and this box, including the activation code, keeps popping up, keeping me from using the software. I activated the pro

    Anyone know how to stop the "activate" box from blocking usage of a perfectly legal copy of Ilisten? I want to help my dyslexic grandson and this box, including the activation code, keeps popping up, keeping me from using the software. I activated the program and did a few profile building sessions, now it pops up each time I start the program, blocking me from using it. Help sure would be appreciated.
    Jay

    I looked at your post this morning and did not know enough to respond, other than to find out that links to iListen now go to newer, renamed software. Considering it's been nine hours with no response, I'm suspecting few people here have experience with that software. You could contact the current copmany that used to sell that package and see if they have any archived support info.
    BTW: please check you entry for "Mac OS" in your profile. It says iOS, which cannot run on an iMac. iOS is the system for phone and iPads but can't run on Mac computers. Do "About this Mac" from the Apple menu and see what it says about the OS version. Should look like this:
    If the "Processor" line says "Intel," you have a newer Mac than the old modles this forum covers; Intel iMac have their very own forum here:
    iMac (Intel)

  • How to Fix ''The messaging interface has returned an unknown error. If the problem persists, restart Outlook.' Error

    How to Fix ''The messaging interface has returned an unknown error. If the problem persists, restart Outlook.' Error, user has outlook 2007 connected to exchange 2010 server , I tried scan pst, configuring new profile but no luck so far. Please suggest !
    Aditya Mediratta

    Hi,
    Please try the steps mentioned below and check if it helps:
    Open Computer > Local Disk C > Program Files > Microsoft Office > Office 12 > Outlook.exe.
    Right click on outlook.exe and click on Properties and then click on
    Compatibility tab. Uncheck the box ‘run this program in compatibility mode for’ under compatibility mode, click on Apply and OK.
    Note: If you are using 64 bit computer then the file location of the file will be
    Computer>Local Disk C>Program Files (x86) >Microsoft Office>Office 12>Outlook.exe
    Similar thread:
    https://social.technet.microsoft.com/Forums/en-US/aa396c9e-0ce5-4de5-99e3-4f0d771b07e0/exchange-2007-messaging-interface-has-returned-an-unknown-error
    Best Regards.

  • How to separate the Webi executing duration

    Dear experts,
    I'm running a webi report connected to backend BW via universe. Any idea on how to separate the webi executing duration into BO side part, BW side part?
    Thanks,

    Hi Hong ,
    *The overall runtime can be split into 5 different parts (Database, OLAP, MDX, RFC and
    WebIntelligence) .
    *We have to gather the statistics in the SAP BW system. Use transaction SE16 (Data Browser)
    and go to table RSDDSTAT_OLAP
    *Enter User name and UTIME and calendar date object name (Bex query)
    *Press the execute button and you will get the table with all the statistics in SAP BW. Now, you
    have to separate the backend runtimes into database, OLAP and MDX runtime.
    *Gathering the Database Runtime
    Click on the header of the column “EVENTID” to mark the whole column. Set a filter by pressing
    and select the between range from 9000 to 9011.
    *Gathering the OLAP Runtime
    Click on the header of the column “EVENTID” to mark the whole column. Set a filter by pressing
    and select the between range from 2500 to 4999.
    *Gathering MDX runtime
    Click on the header of the column “EVENTID” to mark the whole column. Set a filter by pressing
    and select the between range from 40000 to 40036.
    *Gathering the Single Statistical Records STAD
    To get the memory consumption, Remote Function Calls (RFC) and the details about all the BAPIs
    called during report execution, we need to enter transaction STAD in SAP BW.
    When starting STAD, set a filter on the connection user for the Universe and select the appropriate
    start time and the length of the interval to be investigated (according to the total runtime of the report).
    This will return a set of RFC calls to the backend. Normally, the major runtime influencing part can be
    easily determined by the column “Response time (ms).
    Subtract all this times from Webi report refresh time , we get time taken at BO end.

  • Can you please how to retrive the new netprice from the new validity period

    Hi,
    When you display  a contract using ME33K and you click on  a item and view its conditions(shift+F6), there might be 2 validity periods for a given item.
    and each period will have different netprice in it.
    One will be old date before the PO was created and the other new one which has validity till 31.12.999..We want to fetch the netprice for the new validity date but currently the program is fetching this data from the table EKPO which is having the netprice of the old date only..
    Can you please how to retrive the new netprice from the new validity period

    Thank you so much.
    But I need more help specific to my problem.
    Let me describe the same.
    Suppose the PO creation date is 04.07.2007
    The conditions for an item in a contract for the PO are as follows;
    1. Validity from 04.07.2007 validity to 04.07.2007 Netprice = 100.00
    2. Validity from 05.07.2007 validity to 31.12.9999 Netprice = 200.00
    We need to always fetch the netprice from the validity period which always matches with the PO creatio date. here the value 100.00 should be the correct netpr as the PO creation date matches with the first validity period.
    But the program is fetching the netprice 200.000 which belongs to the second validity period. That is beacuse the select statement which fetches the data for contracts collects on the basis of EKKO-kdate and ekko-kdtab.the fields kdate and kdtab retrieves the validity period of the contract which is from 04.07.2007 to 31.072007. This data is then used to retrieve the netpr data from EKPO and it fetched 200.00 as it retrives the netprice of current data in contract validity and h not with respect to PO creation date.
    This data is then used to fetch the get the netpr data from EKPO.
    <u>what we need is the netprice for that validity period of item(Conditions) that matches with the PO creation date</u>..
    Below is the code where I'm selecting the data from ekko and ekpo for the contracts data..Can you please add the code snippet to the below attachesd subroutine to get the required data from KONV and KONP so that we can retrieve the correct Netprice.
    FORM select_contracts USING p_s_cebeln LIKE s_cebeln[]
                                p_c_k_bstyp  TYPE ebstyp
                                p_p_bukrs    TYPE bukrs
                                p_p_ekorg    TYPE ekorg
                                p_p_ekgrp    TYPE bkgrp
    *Begin of Mod-004
                                fp_p_cernam   type ty_r_ernam
                               p_p_cernam   TYPE ernam
    *End of Mod-004
                                p_s_werks    LIKE s_werks[]
                                p_s_matnr    LIKE s_matnr[]
                                p_s_lifnr    LIKE s_lifnr[]
                                p_s_val_dt   LIKE s_val_dt[].
    *mod-002
        data : l_amount   type BAPICURR_D,   " Net price
               l_waers    TYPE waers,        " Currency Key
               l_eff_amount type BAPICURR_D. " Effective value
          data: l_v_netpr type bprei.
    *mod-002
    SELECT  ebeln
              bukrs
              bstyp
              aedat
              ernam
              lifnr
              zterm
              ekorg
              ekgrp
              waers
              wkurs
              <b>kdatb
              kdate</b>
              inco1
              INTO TABLE i_ekko
              FROM ekko
              WHERE    ebeln IN p_s_cebeln
                   AND bstyp EQ p_c_k_bstyp
                   AND bukrs EQ p_p_bukrs
                   AND ekorg EQ p_p_ekorg
                   AND ekgrp EQ p_p_ekgrp
    *Begin of Mod-004
                  AND ernam EQ p_p_cernam
                   AND ernam IN fp_p_cernam
    *End of Mod-004
                   AND lifnr IN p_s_lifnr
                   AND ( kdatb IN p_s_val_dt OR kdate IN p_s_val_dt ).
      IF sy-subrc EQ 0.
    Populates internal table i_ekpo using EKPO table.
        SELECT   ebeln
                 ebelp
                 loekz
                 txz01
                 matnr
                 werks
                 ktmng
                 menge
                 meins
                 bprme
                 netpr
                 peinh
                 webaz
                 mwskz
                 uebto
                 untto
                 erekz
                 pstyp
                 knttp
                 repos
                 webre
                 konnr
                 ktpnr
                 ean11
                 effwr
                 xersy
                 aedat
                 prdat
                   INTO TABLE i_ekpo
                   FROM ekpo
                   FOR ALL ENTRIES IN i_ekko
                   WHERE ebeln = i_ekko-ebeln
                     and aedat = i_ekko-aedat
                     AND werks IN p_s_werks
                     AND matnr IN p_s_matnr.
    LOOP AT i_ekpo INTO rec_ekpo.
          MOVE rec_ekpo-ebeln  TO rec_contr-ebeln.
          MOVE rec_ekpo-ebelp  TO rec_contr-ebelp.
          MOVE rec_ekpo-loekz  TO rec_contr-loekz.
          MOVE rec_ekpo-txz01  TO rec_contr-txz01.
          MOVE rec_ekpo-matnr  TO rec_contr-matnr.
          MOVE rec_ekpo-werks  TO rec_contr-werks.
          MOVE rec_ekpo-ktmng  TO rec_contr-ktmng.
          MOVE rec_ekpo-menge  TO rec_contr-menge.
          MOVE rec_ekpo-meins  TO rec_contr-meins.
          MOVE rec_ekpo-bprme  TO rec_contr-bprme.
         MOVE rec_ekpo-netpr  TO rec_contr-netpr.
         move l_v_netpr        TO rec_contr-netpr.
    mod-002
          read table i_ekko into rec_ekko with key
                           ebeln = rec_ekpo-ebeln.
            l_waers =  rec_ekko-waers.
    CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
      EXPORTING
        currency              =  l_waers
        amount_internal       =  rec_contr-netpr
    IMPORTING
       AMOUNT_EXTERNAL       =  l_amount.
                rec_contr-netpr = l_amount.
    mod-002
          MOVE rec_ekpo-peinh  TO rec_contr-peinh.
          MOVE rec_ekpo-webaz  TO rec_contr-webaz.
          MOVE rec_ekpo-mwskz  TO rec_contr-mwskz.
          MOVE rec_ekpo-uebto  TO rec_contr-uebto.
          MOVE rec_ekpo-untto  TO rec_contr-untto.
          MOVE rec_ekpo-erekz  TO rec_contr-erekz.
          MOVE rec_ekpo-pstyp  TO rec_contr-pstyp.
          MOVE rec_ekpo-knttp  TO rec_contr-knttp.
          MOVE rec_ekpo-repos  TO rec_contr-repos.
          MOVE rec_ekpo-webre  TO rec_contr-webre.
          MOVE rec_ekpo-konnr  TO rec_contr-konnr.
          MOVE rec_ekpo-ktpnr  TO rec_contr-ktpnr.
          MOVE rec_ekpo-ean11  TO rec_contr-ean11.
          MOVE rec_ekpo-effwr  TO rec_contr-effwr.
    mod-002
          CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
       EXPORTING
          currency              =  l_waers
          amount_internal       =  rec_contr-effwr
       IMPORTING
          AMOUNT_EXTERNAL       =  l_eff_amount.
               rec_contr-effwr = l_eff_amount.
    *mod-002
          MOVE rec_ekpo-xersy  TO rec_contr-xersy.
          APPEND rec_contr TO i_contr.
          CLEAR: rec_ekpo,rec_contr.
    mod-002
          CLEAR : rec_ekko,l_amount, l_eff_amount,l_waers.
    mod-002
        ENDLOOP.
    Modifying i_contr using i_ekko.
        SORT i_ekko BY ebeln.
        LOOP AT i_contr INTO rec_contr.
          READ TABLE i_ekko INTO rec_ekko WITH KEY
                              ebeln = rec_contr-ebeln
                              BINARY SEARCH.
          MOVE rec_ekko-bukrs  TO  rec_contr-bukrs.
          MOVE rec_ekko-bstyp  TO  rec_contr-bstyp.
          MOVE rec_ekko-aedat  TO  rec_contr-aedat.
          MOVE rec_ekko-ernam  TO  rec_contr-ernam.
          MOVE rec_ekko-lifnr  TO  rec_contr-lifnr.
          MOVE rec_ekko-zterm  TO  rec_contr-zterm.
          MOVE rec_ekko-ekorg  TO  rec_contr-ekorg.
          MOVE rec_ekko-ekgrp  TO  rec_contr-ekgrp.
          MOVE rec_ekko-waers  TO  rec_contr-waers.
          MOVE rec_ekko-wkurs  TO  rec_contr-wkurs.
          MOVE rec_ekko-kdatb  TO  rec_contr-kdatb.
          MOVE rec_ekko-kdate  TO  rec_contr-kdate.
          MOVE rec_ekko-inco1  TO  rec_contr-inco1.
          MODIFY i_contr FROM rec_contr.
        ENDLOOP.
      ENDIF.
      REFRESH: i_ekko,
               i_ekpo.
      CLEAR  : rec_ekko,
               rec_ekpo,
               rec_contr.
    ENDFORM.      "select_contracts
    Thanks.

  • How to get the query values from the url in a servlet and pass them to jsp

    ok..this is the situation...
    all applications are routed through a login page...
    so if we have a url like www.abc.com/appA/login?param1=A&param2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...
    so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanks

    ok..this is the situation...Sounds like you have a bad design on your hands.
    You're going to send passwords in a GET request as clear text? Nice security there.
    Why not start with basic security and work your way up?
    %

Maybe you are looking for

  • I can no longer download anything through firefox & I cannot seem to fix it its OK in chrome

    I am receiving attachments through my emails and they will not download also I try and download movies or music and still the downloads will not work. It was all fine up until about 2 weeks ago. Do not recall anything happening that would have result

  • Printing smartform to a perticular printer

    Hi all. I want to print the samrt form &  DONT WANT to get the POP UP which prompts us to enter output device. Below is the smart form FM. & Parameters .  Even though I am passing the output device in the FM , it is not considering this output device

  • Problem displaying some pages since upgrade of leopard

    Hello everyone Is anyone experiencing difficulties after the new leopard upgrade. It all seemed to go well until I tried to read some of my pages. What is weird is that the pages are published and functionning well if accessed from the http..mydomain

  • JTable disable column selection

    Do we have a convenient way to disable the selection/focusing of a single column in a JTable while tabbing thorugh the tablecells?

  • Livecache stopped

    hello, the livecache shuts down automatically when the database manager window is closed. does anyone have an idea why and how this can be resolved? thanks!