Triggering a 6024E into data acquisition from start and end number of finite pulse generator from a 6602

My motion control system is driven by a 6602 I wanted to acquire analog current (to a voltage via I/V converter) from a 6024 AI when:
(1) At the start of the pulse generation
(2) Stop at the end of the pulse generation
(3) Read every possible data between and stream it on the harddisk
(4) Option to skip at regular intervals to reduce amount of data accumulation
Anyone have some suggestions? What I did try and attempted was to "loop an AI from a triggered intermediate Analog Input VIs" this is rather erratic!My question for the analog input software are:
(1)Can you trigger an AI to start a continuous acquisition?
(2) How do you do AI from a "start" p
ulse train to "end" pulse train?
(3) How do you manage time for File I/O meanwhile doing (1) and (2) above?
Bernardino Jerez Buenaobra
Senior Test and Systems Development Engineer
Test and Systems Development Group
Integrated Microelectronics Inc.- Philippines
Telephone:+632772-4941-43
Fax/Data: +632772-4944
URL: http://www.imiphil.com/our_location.html
email: [email protected]

"(1)Can you trigger an AI to start a continuous acquisition?
(2) How do you do AI from a "start" pulse train to "end" pulse train?
(3) How do you manage time for File I/O meanwhile doing (1) and (2) above?"
Answer 1 and 2)
Yes you can, This VI is part of the search examples that ships with LV:
"Continuous Acquisition & Graph Using Digital Triggering and External Scan Clock
Demonstrates how to continuously retrieve data from one or more analog input channels using an external scan clock when a digital start trigger occurs."
Go to Search Examples in the Help/Contents of LV. Then pick I/O Interfaces/Data Acquisition (DAQ)/Analog Input/Triggering an Acquisition/Triggering a Continuous Acquistion.
This VI is appropriate ifs you want to clock the DAQ with some clock (external scan clock) other than the on board clock.
The start trigger required by the DAQ card will be a TTL signal attached to the PFI0/TRIG1 pin of you DAQ card (via whatever signal conditioning you have).
The external clock also needs to be TTL and is attached to the PFI7/STARTSCAN pin.
You tell it which AI channel to use and wire that up appropriately.
All of this stuff is in the context help for the VI.
Answer 3)
You have a misconception of how the acquisition makes its way into a file on the hard disk. You don't really "stream to disk." The VI above will run a buffered acquisition. The DAQ card sets up a buffer that fills with the data continously. When you use the VI you set up how the buffer is configured, you will see controls for buffer size, number of scans to read at a time, etc. The acquisition runs data into the buffer continously and reads from the buffer are a parallel process where chuncks of the buffer are extracted serially. You can end up with a scan backlog where the reads are falling behind the data. Making the buffer bigger helps. All of this is limited by the sampling capability of the DAQ card. 200kSamples/second is for one channel of AI. Divide by 2 for 2 channels. etc.
The short answer is that the VI and DAQ card manage the file I/O for you.
The VI above writes the scan out to the waveform chart on the front panel. You will want to wire that data out from the AI Read Sub VI to a spreadsheet file in tab delimited form or similar.
Look inside the VI block diagram. There is a While loop containing the AI Read. Every time the loop runs (unless you hit STOP), the AI Read plucks the specified # of scans from the buffer (starting from the last unread datum). If you wire the double orange wire from AI Read out of the loop (and set the tunnel for Auto Indexing) the Vi will build another buffer in memory that is a series of AI Reads appended to each other, a sequencial record of the acquisition. Here you put in a Write to Spreadsheet VI. This is in the Functions Pallete, it is the first VI in the File I/O Pallette (icon looks like a 3 1/2 disckette).
There is more to it than this. The spreadsheet Write is 1D or 2D only. By running the array out of the while loop with auto indexing enabled, you create a 3D array. (If you turn off auto indexing you will only get the last array performed by the AI Read.) You will need to create a new array withe the pages of the array placed serially into a 2d array. I don't think I want to get into that. It isn't that bad to do, but you should get some time messing with arrays on your own, then you will see how to do it yourself. One solution is to only run the While loop once with a buffer big enough to hold the whole acquisition, or in other words no loop at all. I don't know how many scans you want. The other thing is by wiring that AI Read out of the loop you are creating an array that must be dynamically resized as the loop runs. Kind of a no no. Better to know what you are acquiring size wise and letting the VI set up buffers and array space that does not need to be changed as the program runs.
Caveat: I am fairly new to this and I could be wrong about the arrays and buffers and system resources stuff. However, I have done essentially what you are trying to do succesfully, but not "continuously." I limited the AI Read to one large read that gets what I need.
"Continously" is usually reserved for screen writes as in the VI above. The computer is not required to continually allocate space for an ever expanding array to be written as a file later. Each time this VI runs the While Loop the data goes to the waveforn chart. Each new AI read overwrites the previous one. Sort of like if you turn the Auto Indexing off. When the VI stops, the waveform chart on screen would show the same data as was written to the spreadsheet.
Feel free to email me directly: [email protected]. I will help as I can.
Mike Ross

Similar Messages

  • XML Publisher pdf output need each page wise start and end number

    Hi ,
    I have xml publisher out put in PDF. Now i need on each page header and detail part.
    In header for each page it should repeat and should be print the min and maximam number of the columns.
    I mean in the header start and end number of the column value for that particular page.
    I did many ways but there is no luck.
    Can you please suggest me how to do.
    Thanks
    Sampath

    pls give me reply on this if any body have the answer

  • Make Quarters from Start and End date

    Hi,
    I have a requirement to make the quarters for fiscal year from the given start and end date.
    For example if I have
    start date : 01-Jan-09
    end date : 31-Dec-09
    I have to split it into 4 quarters as bellow:
    QTR1 : 01-Jan-09 - 31-Mar-09
    QTR2 : 01-Apr-09 - 30-Jun-09
    QTR3 : 01-Jul-09 - 30-Sept-09
    QTR4 : 01-Oct-09 - 31-Dec-09
    plz help.
    Regards,
    Fahim

    Hi,
    SQL> SELECT ADD_MONTHS(to_date('01-JAN-2008','DD-MON-YYYY'),(ROWNUM-1)*3) start_dt,(ADD_MONTHS(to_date('01-JAN-2008','DD-MON-YYYY'),ROWNUM*3))-1 End_Date
      2  FROM DUAL
      3  CONNECT BY ADD_MONTHS(to_date('01-JAN-2008','DD-MON-YYYY'),(LEVEL-1)*3) <=to_date('30-SEP-2009','DD-MON-YYYY');
    START_DT  END_DATE
    01-JAN-08 31-MAR-08
    01-APR-08 30-JUN-08
    01-JUL-08 30-SEP-08
    01-OCT-08 31-DEC-08
    01-JAN-09 31-MAR-09
    01-APR-09 30-JUN-09
    01-JUL-09 30-SEP-09
    7 rows selected.
    SQL>Cheers,

  • SSRS Bar Chart grouping date series into Months, setting scaler start and end ranges

    I've been trying to solve this issue for a few days now without writing a sql script to create a "blank" for all of missing data points so that I get a bar for each month.  I have date series (by day) data points grouped by two items
    that creates a set of bar charts.  EG:  one chart per product in the tablix detail grouped to site level.
    My issue is I would like the start and end of the charts to be the same for all charts and the only way I get it to work is with a chart that continues to show each date on the chart. 
    EG:
    I have the graph start and end points set and scaling by month as I would like but each bar is a day instead of aggregating to a month level.   My issue I hope to find a workaround for is if I go to Category Groups and define the grouping
    to group with a year and month function the series is no longer treated as date data and I cannot control scaling.  It works fine if all months have activity, but I can't figure out how to always have all charts start at "May 2012" in this example. 
    The only start and end point that I've been able to get to work once doing this are integer based, eg normal start would be 1 for each graph, but 1 doesn't equate to the same month from chart to chart.
    I hope SSRS can provide the solution.  I do know I can write a query that creates a ZERO value for each month/product/site but I don't want to leave the client with a query like that to support.
    -cybertosis

    Hi cybertosis,
    If I understand correctly, you want to display all month category label in the X-Axis. You have configure the Scalar Axis, however, it cannot display the requirement format.
    In your case, if we want the specific data format, we can configure Number property to set the corresponding Category data format. Please refer to the following steps:
    Right click the X-Axis, select Horizontal Axis Properties.
    Click Number in the left pane. Click Date option in the Category dialog box.
    Then, select Jan 2000 option.
    Please refer to the following screenshot below:
    If there are any misunderstanding, please feel free to let me know.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • Trimming silence from start and end of mp3

    The presence of 3 to 7 seconds of silence at the beginning and end of mp3 files makes it all but impossible to achieve consistant crossovers in my internet radio station. I'd like to find a utility that would automatically trim the silence from the beginning and end of a group of mp3 files. Any suggestions would be greatly appreciated.

    The presence of 3 to 7 seconds of silence at the
    beginning and end of mp3 files makes it all but
    impossible to achieve consistant crossovers in my
    internet radio station. I'd like to find a utility
    that would automatically trim the silence from the
    beginning and end of a group of mp3 files. Any
    suggestions would be greatly appreciated.
    Thank you all for your replies. I have MP3 Trimmer, but I am not looking forward to hand trimming thousands of mp3 files. I was hoping to find something similar to IVolume, that could automatically analyze and trim a group of files.
    I have multiple computers running ITunes with an Applescript that controls the timing; inserting station ids, announcements etc. I'd like to be able to program my automation with tight cuts and crossfades where I want them. The wide variety of silent periods at the beginning and end of the mp3s makes this impossible.
    A utility that could strip out the silence automatically would make me quite happy.

  • Display all dates between a start and end date on an Apex Calendar

    Hi Guys,
    I am encountering an issue where Apex doesn't display the data from a valid query in a Calendar.
    I have a simple table used to capture events data with the following columns and data:
    event_id   start_date   end_date
    1           20-APR-09   22-APR-09
    2           24-APR-09   24-APR-09Using an Apex Calendar I would like to display the continuous dates of an event on each relevant date, so in the above example I would like to see Event ID 1 shown on the 20th, 21st & 22nd April in the Calendar.
    I have created the following query :
    SELECT     ees.event_id,
               ees.start_date + LEVEL - 1 AS date_range
    FROM       dual
             , (SELECT ee.event_id,
                       (ee.start_date) AS start_date,
                       (ee.end_date)   AS end_date
                FROM   ees_event ee  ) ees
    CONNECT BY LEVEL <= (ees.end_date - ees.start_date + 1)the results from this query list the dates as I require them in terms of an ID and a row for each date in the date range.
    I then wrap this query into a view and use that to base an Apex Calendar on and the when I run the page nothing is displayed on the Calendar?!
    Does anyone have any tips or pointers please?
    Kind regards,
    stu

    A bit more digging and once again I have found my solution on Denes' website - thanks for such and excellent resource!
    Solution I have used can be found here:
    http://apex.oracle.com/pls/otn/f?p=31517:83:4441524250972745::NO

  • How to input my own Validity Start and End Dates in ME21N

    Hi All,
    I have to change the Validity Start and Validity End date in Addiitional Data Tab of ME21 transaction( PO Create ) using default Customer Values.How Can i accomplish it?
    I have used the BAdI ME_PROCESS_PO_CUST and implemented it, I have coded in the method PROCESS_HEADER.First I retrieved the data using get_data( ) method, changed the values with Customer Values and called the method set_data( ).
    However my validity start and End Dates and not changing.
    Even in ME21N if I create the PO with my own Validity Start and End dates, and go to ME23N to display the created PO, still in the additional data tab, the start and End dates are current date and Next date respectively.why its happening?
    Thanks in advance

    Hi,
    Can you please let us know in which business scenario this is required.
    SAP has provided separate functionality of Outline Agreement for considering validity period.
    If you let us know the business scenarion some solution/workaround can be suggested.
    Regards

  • Function module to derive start and end dates from fiscal year and period.

    Hi,
    I want to know a function module to derive start and end dates from fiscal year and period.
    ie: If I have say fiscal year '2010' and period '07', then the start date of this period would be '01.10.2010'.
    Thanks.
    Moderator Messge: Basic Date questions are not allowed.
    Edited by: kishan P on Oct 18, 2010 4:45 PM

    Hi,
    This is one of my exit that display the calmonth (offset -12). Usefull when I have to retrieve in a KF a complete rolling year depending one calmonth.
    S_VMUCMN is my selection variable
    S_TXTCMN_M12 is my text variable calmonth-12
    S_TXTCMN_M0 is my text variable for selected calmonth.
    WHEN 'S_TXTCMN_M12'.
        IF i_step = '2'.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'S_VMUCMN'.
            CLEAR l_s_range.
            " First day of the selected month
            CONCATENATE loc_var_range-low '01' INTO l_calday.
            CALL FUNCTION 'YFRBW_FUM_CAL_DATE_IN_INTERVAL'
              EXPORTING
                date      = l_calday
                months    = 12
                signum    = '-'
              IMPORTING
                calc_date = l_calday.
            l_s_range-low = l_calday+0(6).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    Thus, in KF header you have to put the two text variable to display the complete period.
    Hope it helps,

  • How to retrieve start and end date values from sharepoint 2013

    Hi,
    How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
    Thanks
    Gowri Balaguru

    Hi Srini
    Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
    Thanks
    Tripple k

  • Calculate Start and End date in Connect By -- When Hirerchy Changes

    /* Formatted on 5/20/2013 9:53:00 AM (QP5 v5.115.810.9015) */
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Hello , Can some one Please help me or Guide me in calculating Start and End dates for the below logic
    I want to calculate the Manager Hirerchy for the given Agent.
    Then Below Query is working fine and its giving me the desired results
    But when there is a change in the Manager Hirerchy or Manager gets Promoted
    Then i need to calculate the start date and end date.
    CREATE TABLE PERSON_DTL
      SID                 VARCHAR2(10 BYTE),
      EMP_MGRS_ID         VARCHAR2(10 BYTE),
      START_EFFECTIVE_DT  DATE,
      END_EFFECTIVE_DT    DATE
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M100', 'M107', TO_DATE('05/20/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M101', 'M102', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/18/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('A100', 'M100', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M100', 'M101', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/18/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M107', 'M102', TO_DATE('05/20/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M102', 'M103', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M103', 'M104', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('A101', 'M105', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M105', 'M106', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;
    SELECT   CONNECT_BY_ROOT (b.sid) agent_sid,
                 TRIM (
                    LEADING ',' FROM    SYS_CONNECT_BY_PATH (b.sid, ',')
                                     || ','
                                     || b.emp_mgrs_id
                    PATH,
                 START_EFFECTIVE_DT Start_dt,
                 END_EFFECTIVE_DT End_dt
          FROM   PERSON_DTL b
         WHERE   CONNECT_BY_ISLEAF = 1
    START WITH   sid IN ('A101', 'A100')
    CONNECT BY   PRIOR b.emp_mgrs_id = b.sid
    This is the results that i am getting now.
    AGENT_SID    PATH                       START_DT    END_DT
    A100    A100,M100,M101,M102,M103,M104    1/1/2010    12/31/9999
    A100    A100,M100,M107,M102,M103,M104    1/1/2010    12/31/9999
    A101    A101,M105,M106                   1/1/2010    12/31/9999
    Results Required
    A100    A100,M100,M101,M102,M103,M104    1/1/2010    5/18/2013
    A100    A100,M100,M107,M102,M103,M104    5/20/2013   12/31/9999
    A101    A101,M105,M106                   1/1/2010    12/31/9999

    May be this..
    SQL> select agent_sid,max(path) path,max(start_dt) start_dt,
      2         min(end_dt) end_dt
      3  from
      4  (
      5    select agent_sid,path,start_dt,end_dt,
      6           sum(flg) over(order by rn) sm
      7    from
      8    (
      9      select agent_sid,
    10             path,
    11             start_dt,
    12             end_dt,rn,
    13             case when path like lag(path) over(order by rn)||'%' then 0 else 1 end flg
    14      from
    15      (
    16        SELECT   CONNECT_BY_ROOT (b.sid) agent_sid,
    17                 TRIM (
    18                    LEADING ',' FROM    SYS_CONNECT_BY_PATH (b.sid, ',')
    19                                     || ','
    20                                     || b.emp_mgrs_id
    21                 )
    22                  PATH,
    23                 START_EFFECTIVE_DT Start_dt,
    24                 END_EFFECTIVE_DT End_dt,rownum rn
    25        FROM   PERSON_DTL b
    26        START WITH   sid IN ('A101', 'A100')
    27        CONNECT BY   PRIOR b.emp_mgrs_id = b.sid
    28      )
    29    )
    30  )
    31  group by agent_sid,sm
    32  order by agent_sid;
    AGENT_SID  PATH                                     START_DT  END_DT
    A100       A100,M100,M101,M102,M103,M104            01-JAN-10 18-MAY-13
    A100       A100,M100,M107,M102,M103,M104            20-MAY-13 31-DEC-99
    A101       A101,M105,M106                           01-JAN-10 31-DEC-99Edited by: jeneesh on May 20, 2013 7:54 PM
    Not thoroughly tested.And not sure whether an easy way exists..

  • Hyperion Planning dynamic forms based on start and end date across years

    Hi All,
    I have a requirement where i need to be able to view a form showing periods across years that are dynamically built depending on the start and end dates. If i have a start date of 01/11/2009 and an end date of 31/7/2013 i want to be able to view a form that shows all of the periods (Jan,Feb etc) in a form that is driven by these dates, in addition it will need to show the actual scenario up to the current month and the forecast from the current month to the end date. So basically if a user inputs the start and end dates the form will display the relevant periods driven by these dates.
    Any tips very much appreciated!

    Hello,
    This is difficult to realize, but you can get quite far with a workaround. The first question is, where do you want to input your selection of time periods? Assuming you have a webform with the complete timeline in months and years and you type in the start period and end period.
    Webforms have the option to suppress rows and columns.
    This can be extended with option of empty cells or not empty cells.
    You will need to apply your creativity on this.
    Put every month-year combination in a column and add the suppression.
    Calculate the timeline between start period and end period with a dummy member, so data exists for these and columns will show.
    Maybe you will need to copy the required timeline into a separate version for this, to avoid having periods which were outside the selection and still have data.
    I hope these hints help a bit in this challenge.
    Regards,
    Philip Hulsebosch
    www.trexco.nl

  • How to determine current period start and end dates

    Hi All,
    If given previous period start date and end date, how to determine current period start date and end date?
    Suppose if given previous period start and end dates are 12/28/08 - 01/30/09, then current period start date and end date will be 01/30/09 - 02/27/09. (where 12 is the previous period, 28 is the day, 08 is the year......)
    Can you please suggest an FM to determine the current period dates?
    Thanks & Regards
    Gowthami

    >
    gowthami karunya wrote:
    > If given previous period start date and end date, how to determine current period start date and end date?
    > Suppose if given previous period start and end dates are 12/28/08 - 01/30/09, then current period start date and end date will be 01/30/09 - 02/27/09. (where 12 is the previous period, 28 is the day, 08 is the year......)
    Hello,
    I am assuming you have the Company Code with you & proposing this solution.
    TABLES: bkpf.
    PARAMETERS:
    p_bukrs TYPE bukrs.
    SELECT-OPTIONS:
    s_date FOR bkpf-budat.
    DATA :
    l_perio LIKE bkpf-monat,
    l_poper TYPE poper,
    l_year  LIKE bkpf-gjahr,
    l_spmon TYPE spmon,
    l_periv TYPE periv,
    l_date1 TYPE datum,
    l_date2 TYPE datum.
    CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
      EXPORTING
        companycodeid = p_bukrs
        posting_date  = s_date-high
      IMPORTING
        fiscal_year   = l_year
        fiscal_period = l_perio.
    CONCATENATE l_year l_perio INTO l_spmon.
    * Get the next period
    IF l_perio < 12.
      l_perio = l_perio + 1.
    ELSE.
      l_perio = '01'.
      l_year = l_year + 1.
    ENDIF.
    MOVE l_perio TO l_poper.
    SELECT SINGLE periv INTO l_periv
    FROM t001
    WHERE bukrs = p_bukrs.
    IF sy-subrc = 0.
      CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = l_periv
          i_poper        = l_poper
        IMPORTING
          e_date         = l_date1
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = l_periv
          i_poper        = l_poper
        IMPORTING
          e_date         = l_date2
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      WRITE: / l_date1, l_date2.
    ENDIF.

  • Start and end dates update IW31 tcode

    Hi
    I have an requirement that when work order is released system should take the basic start date on the work order (AFKO-GSTRP) at the time of release and set the constraint “Must Start On” (AFVV-EINSA) for the 1st active operation (i.e. operation is not deleted) and set the basic start date as the date on the operation constraint (AFVV-NTANF). 
    i have found the exit (IWO10009 ),but my question is how can i update the basic start date as date of operation in Date tab.
    is there any FM available for update?
    Please help me.
    Regards
    Niru

    Hi uirji,
    There is an exclusive Enhancement for Release Conditions. This is IWO10002.
    I have tested a code to suit to your needs.
    DATA: LV_EINSA TYPE AFVV-EINSA,
          LV_NTANF TYPE AFVV-NTANF,
          LV_AUFPL TYPE AFVV-AUFPL.
    SELECT SINGLE AUFPL FROM AFKO INTO LV_AUFPL WHERE AUFNR = CAUFVD_IMP-AUFNR.
    SELECT SINGLE EINSA FROM AFVV INTO LV_EINSA WHERE AUFPL = LV_AUFPL AND APLZL = '1'.
    SELECT SINGLE NTANF FROM AFVV INTO LV_NTANF WHERE AUFPL = LV_AUFPL AND APLZL = '1'.
    IF LV_EINSA <> '1' AND LV_NTANF <> CAUFVD_IMP-GSTRP.
    MESSAGE 'Release not possible due to Date condition for Operation1 not satisfied' TYPE 'I' .
    NO_RELEASE = 'X'.
    ENDIF.
    As per this when your given conditions do not match, the following pop-ups would appear one after one and the RELEASE stopped.
    Custom pop-up
    Exit pop-up (No_Release)
    When the user Saves the order with values EINSA = '1' (Must start on) and NTANF with GSTRP Date, and Release tried again, he will be successful.
    In the above code, you may include field NTANZ (time field for NTANF) to match with time field of GSTRP, if you need.
    Hope this post is of some help to you.
    Jogeswara Rao K

  • Contract start and end date in BAPI_CONTRACT_CREATEFROMDATA

    HI,
    I am using BAPI_CONTRACT_CREATEFROMDATA to create a contract from within a custom ABAP program. However I cannot figure out how to get the contract start and end dates into the contract header. I know that you can enter them into the ONTRACT_DATA_IN table parameter but these dates only appear on the line items and not the header.
    Does anyone know which parameters on the function map to the contract header start and end dates.
    Thanks.

    Hi,
    there are also fields QT_VALID_F and QT_VALID_T for quotation or inquiry. So it looks like for different contract types you need to use different fields. This BAPI calls FM SD_SALESDOCUMENT_CREATE which has subroutine ms_move_header_in which maps from BAPI fields to internal fields. Here is a small part of this routine.
      MOVE order_header_in-qt_valid_f       TO e_vbakkom-angdt.
      MOVE order_header_in-qt_valid_t       TO e_vbakkom-bnddt.
      MOVE order_header_in-ct_valid_f       TO e_vbakkom-guebg.
      MOVE order_header_in-ct_valid_t       TO e_vbakkom-gueen.
    When I check technical fields for the screen  fields "Valid from" and "Valid to" in VA43 I get names GUEBG and GUEEN. So it still looks like you should use CT_VALID_F and CT_VALID_T.
    I forgot to mention you can still debug BAPI to figure out where the problem is.
    Good luck
    Edited by: Martin Voros on Sep 11, 2009 9:57 AM

  • Stacked area chart with start and end dates

    Hi,
    I'm trying to create a stacked area chart from values that have a start date and an end date. I'd like the area to be drawn as a sum of the values at each x-axis date interval. So if I have data like:
    Start              
    End               
    Value
    2013-01-01      2015-01-01     
    100
    2013-09-01      2014-01-01     
    200
    2013-01-01      2016-01-01     
    300
    What I need is to have the chart show the area y-axis at 400 from the start up to 2013-09-01 where it would rise to 600. At 2014-01-01 it would drop back down to 400 and at 2015-01-01 it would drop to 300 until the end.
    Is this possible without calculating the sums for each date beforehand?

    Hi Erba,
    According to your description, it seems that you need add Start and End fields with the same level (without group relationship) to the x-axis in stacked area chart. As per my understanding, we couldn’t add multiple fields in one group at the same level.
    So in order to work around this issue, we can modify the dataset to combine the Start and End field into one filed, then add the new filed to x-axis. For more details, please refer to the steps below:
    Modify the dataset with the following query statement:
    select Start as date , Value as value
    from table_name
    union
    select [End] as date, (0-Value) as value
    from table_name 
    Drag a Stacked Area Chart to design surface.
    Insert value field to Values pane, then modify it with the expression below:
    =runningvalue(Fields!vlaue.Value,sum,"DataSet_name")
    Insert date field to Category Group pane.
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • Payment report

    Hi, Is it possible to find a report that show all FI documents linked together during posting, payment and clearing? Have some purchase orders where we use fast payment when receiving shipment documents and then post the invoice when receiving the or

  • Import and export

    my import and export utility in oracle database 10g is not working. how to overcome this problem.

  • Why do I keep getting error occurred. Please try later again when trying to watch youtube videos

    Why do I keep getting "Error occurred. Please try later again." , eveytime when trying to watch youtube videos. I have the latest adobe flash player and java so why can't I watch videos at youtube?? It's very, very, frustrating having had so many peo

  • ADF: Passing parameters from one page to another using setPropertyListener

    Hi, I'm trying to find a simple way to pass a parameter from one page to another. On the first page I have a table, the second page is a history page, showing the change history of rows from the table on the first page. In the table on the first page

  • Premiere Pro CS 5.5 Slow Playback

    So.. I have the creative cloud and have been working on Premiere for a few months now. It just started giving me a rendering/play back issue. Even AFTER I wait for the entire project to render, the playback while editing jumps like CRAZY.. if it play