How to write a routine in infopack to restrict a date range !!!!

Hi
I want to load the data for a speicific date range ,i.e , i want to load the data between created on some date range which is not in between the same range for changed on...so i want to restrict that date range for changed on....Please le tme know the routine logic to restrict a date range....
regards...

How to ... Write Infopackage selection Routine
1.Create an Infopackage 2. Go to selections tab and choose Type: 6 u2013 ABAP Routine.You can see following available options(F4 Help).
3. Give disruption, and hit enter, now you will move to following screen. 4. Write Code between begin of Routine and End of Routine.
5. See below sample code to select date range from Previous 6 days to Current date.
6. L_T_Range table is of Type structure RSSDLRANGE.
a. RSSDLRANGE contains SIGN, OPTION, LOW, HIGH
We need to populate these fields to pass range dynamically.
Sample Code:
***$$ begin of routine - insert your code only below this line -
Data: l_idx like sy-tabix.
Data: date_low like sy-datum.
Date_low = sy-datum u2013 6.u201D(To get 6 days back).
read table l_t_range with key
fieldname = 'CRDAT'.
l_idx = sy-tabix.
Pass Range values to L_T_Range Table.
Move date_low to L_T_Range -Low.
Move sy-datum to L_T_Range -High.
L_T_Range -Sign = u2018Iu2019. *****(Here: I u2013 Include, E u2013 Exclude)
L_T_Range -Option = u2018BTu2019.****( Here: BT u2013 Between )
modify l_t_range index l_idx.
p_subrc = 0.
**$$ end of routine - insert your code only before this line -
7. Syntax check and Save.
Hope it Helps
Srini

Similar Messages

  • How to write conversion routine for key figure?

    Our customer has this requirment:
    we need to know the last time of some TV program in BEx report, If a TV program last 500 seconds, we need show the key figure like this:  00:08:20, If a TV program last 100000 seconds, we need show the key figure like 27:46:40 (27 hours and 46 minitues and 27 seconds), If we define a key figure as time,  BW system will report a error that say it is not acceptable time.  If we want to define a integer, but we need display it like hhmmss format.  We know we can write conversion routine for char.  but I don't how to write conversion routine for key figure.   Please give me any hint if any other solutions?
    Edited by: SY DONG on Dec 2, 2010 3:36 AM

    If you want to do in Transformation Layer :
    You can use routine ...break up the seconds into minute hour and seconds
    you will have to handle few cases in this:
    let say your variable lv_seconds holds the number of seconds you want to convert to hour min and seconds
    DATA: lv_seconds type i,
               lv_hrs  type  i,
              lv_sec type i,
              lv_min type i.
    lv_hrs = lv_seconds / 3600
    if lv_hrs >= 1.
    lv_min = (lv_hrs - trunc(lv_hrs))*60
    here again handle seconds if min >60.
    else.
    lv_hrs = '00'.
    lv_min = lv_hrs*60
    It is just hint ..how you can manipulate the seconds to get it...you will have to think about the complete algorithm
    Regards,
    RK

  • How to Write an Routine in APD to make Records blank i.e. 'X'

    Hai,
    I have created an APD in BW 3.5, I need to write a routine to update records which are having 'X' in R/3 Side. So how to write routine in Transformations? Please help me ASAP.
    Thanks,
    Ramesh

    Hi Ramesh,
    if you are familiar with ABAP, just drag and drop a routine transformation into your analysis process, connect it with the source node, double-click it and see the ABAP template. You just need to set the field of the target field accordingly.
    Cheers,
    Thomas

  • " HOW TO WRITE FORM ROUTINES"

    Hi all ,
    I have a Query ..  I have Developed a Smart form ( Delivery Challan ) .. My Functional Consultant asked me , If he Execute the T-code ( VL02N ). He should get the Print Preview of the Layout ...
    I know it can be done through Form routines ..
    Can one Explain me how to write the form routines ...

    Hi ,
    Copy the print program to custom program . Remove the routine " entry " . Write a selction screen with document number . put the read number to nast-OBJKY , V2 to NAST-KAPPL , sy-langu to nast-SPRAS in start of selection .Copy paste the code under the Entry routine .
    hope it helps ...

  • Can any one Tell me how i write std routine if i dont authorization in VOFM

    Dear Guru ,
    I Have Encountered An Technical Issue while writing routine RV61A943 and RV64A978.
    Using access key I have unlocked above two routine to write Pricing Procedure's Requirement (in RV61A943)  and Formula for Condition Value (in RV64A978) in se38 .
    But when i am trying to make some changes in routine RV61A943 or in routine RV64A978 using  SE38  I am not able to write any code within it.
    So Sir I want to know in which way i have to write the routine -- Using VOFM or  can write using SE38 itself.
    (Initially I tried using VOFM to write the routine in development server  But I found doesnot have authorization of VOFM in development server)
    Can any one tell me the full technical procedure to writing the routine..
    Pls help.
    Thanks & Regards
    Saifur Rahaman

    Hi,
    You need to ask for authorization of VOFM then only u can make changes to routined.
    Reward if useful.
    Regards
    Susheel

  • How can I get the start and end of a date range?

    Post Author: RobR
    CA Forum: Formula
    Greetings!
    I have a report whose records are selected if a date field is within the date range returned by the LastFullWeek function.  I want the header for that report to print the first and last dates in that range.  I don't see a way to extract those dates from a date range.  How do I do it?
    Also, I think it would be nice to be able to walk through a date range using a for loop, something along the lines of the following:
    for (thisDate in LastFullWeed)(    do something;)
    but I didn't see syntax like that in the help system.  If I could do this, then I could get the first and last date.  Is this possible?
    Thank you!
    RobR

    Post Author: SKodidine
    CA Forum: Formula
    If all you want is the starting date and ending date of the function LastFullWeek, then all you have to do is this:
    minimum(LastFullWeek) & '          ' & maximum(LastFullWeek);
    On a side note, from your post: for (thisDate in LastFullWeed)  Whatcha smokin'  Willis?? 

  • How to use SQL to display Datethat falls between the date range

    Hi,
    I'm figuring out how do i use SQL to select data
    that falls between the date range stated
    (for eg. 19/02/1955 to 19/02/2003)
    I've tried :
    sql="Select * From StudentRecords WHERE DOB BETWEEN #" jTextField21.getText() "#" +" And " +"#" +jTextField22.getText;
    Using BETWEEN statment , but Between Statement isn't doing what i want..
    even those out of range are displayed... any ideas how??
    Thank yOU in advance!

    oracle:
    sql = "Select * From StudentRecords WHERE DOB between TO_DATE('07/04/2003','dd/mm/yyyy') and TO_DATE('08/04/2003','dd/mm/yyyy')";

  • SUM(Case how to use this structure to get average values over date range

    I am using:
    Oracle SQL Developer (3.0.04) Build MAin-04.34 Oracle Database 11g Enterprise Edition 11.2.0.1.0 - 64bit Production
    How do I use the sum function with a case structure inside.
    so I have data that looks like has an ID, date, and value. I am looking to get the 7 day average for the date range of 4/1/2013 thru 4/20/2013
    with t as (
    select 1 ID_Key,to_date('4/1/2013','mm-dd-yyyy') date_val, 10 Value_num from dual union all
    select 1 ID_key,to_date('4/2/2013','mm-dd-yyyy'), 15 from dual union all
    select 1 ID_key,to_date('4/3/2013','mm-dd-yyyy'), 20 from dual union all
    select 1 ID_key,to_date('4/5/2013','mm-dd-yyyy'), 0 from dual union all
    select 1 ID_key,to_date('4/8/2013','mm-dd-yyyy'), 12 from dual union all
    select 1 ID_key,to_date('4/9/2013','mm-dd-yyyy'), 8 from dual union all
    select 1 ID_key,to_date('4/10/2013','mm-dd-yyyy'), 6 from dual union all
    select 1 ID_key,to_date('4/12/2013','mm-dd-yyyy'), 10 from dual union all
    select 1 ID_key,to_date('4/13/2013','mm-dd-yyyy'), 0 from dual union all
    select 1 ID_key,to_date('4/14/2013','mm-dd-yyyy'), 0 from dual union all
    select 1 ID_key,to_date('4/15/2013','mm-dd-yyyy'), 10 from dual union all
    select 1 ID_key,to_date('4/16/2013','mm-dd-yyyy'), 5 from dual union all
    select 1 ID_key,to_date('4/17/2013','mm-dd-yyyy'), 2 from dual union all
    select 1 ID_key,to_date('4/20/2013','mm-dd-yyyy'), 3 from dual union all
    select 2 ID_key,to_date('4/3/2013','mm-dd-yyyy'), 12 from dual union all
    select 2 ID_key,to_date('4/5/2013','mm-dd-yyyy'), 15 from dual union all
    select 2 ID_key,to_date('4/6/2013','mm-dd-yyyy'), 5 from dual union all
    select 2 ID_key,to_date('4/7/2013','mm-dd-yyyy'), 7 from dual union all
    select 2 ID_key,to_date('4/9/2013','mm-dd-yyyy'), 10 from dual union all
    select 2 ID_key,to_date('4/11/2013','mm-dd-yyyy'), 5 from dual union all
    select 2 ID_key,to_date('4/12/2013','mm-dd-yyyy'), 0 from dual union all
    select 2 ID_key,to_date('4/13/2013','mm-dd-yyyy'), 0 from dual union all
    select 2 ID_key,to_date('4/15/2013','mm-dd-yyyy'), 6 from dual union all
    select 2 ID_key,to_date('4/16/2013','mm-dd-yyyy'), 8 from dual union all
    select 2 ID_key,to_date('4/17/2013','mm-dd-yyyy'), 0 from dual union all
    select 2 ID_key,to_date('4/18/2013','mm-dd-yyyy'), 10 from dual union all
    select 2 ID_key,to_date('4/19/2013','mm-dd-yyyy'), 5 from dual
    )**Please let me know if the table does not load.
    I would like to get the 7 day average as long as there is date for that row has enough previous dates, it not then it will return null.
    the results should look like this
    ID_Key      date_val     Value_num     7Day_Avg     7Day_Avg2
    1     4/1/2013     10          null          null
    1     4/2/2013     15          null          null
    1     4/3/2013     20          null          null
    1     4/5/2013     0          null          null
    1     4/8/2013     12          6.71          11.75
    1     4/9/2013     8          5.71          10.00
    1     4/10/2013     6          3.71          6.50
    1     4/12/2013     10          5.14          9.00
    1     4/13/2013     0          5.14          7.20
    1     4/14/2013     0          5.14          6.00
    1     4/15/2013     10          4.86          5.67
    1     4/16/2013     5          4.42          5.17
    1     4/17/2013     2          3.85          4.50
    1     4/20/2013     3          2.86          4.00
    2     4/3/2013     12          null          null
    2     4/5/2013     15          null          null
    2     4/6/2013     5          null          null
    2     4/7/2013     7          5.57          9.75
    2     4/9/2013     10          7.00          9.80
    2     4/11/2013     5          6.00          8.40
    2     4/12/2013     0          3.86          5.40
    2     4/13/2013     0          3.14          4.40
    2     4/15/2013     6          3.00          4.20
    2     4/16/2013     8          2.71          3.80
    2     4/17/2013     0          2.71          3.17
    2     4/18/2013     10          3.43          4.00
    2     4/19/2013     5          4.14          4.83As you may notice, there are gaps in the dates, so the value are then treated as zeros for the 7Day_Avg and then ignored for teh 7Day_Avg2 (not counted as number of days averaged do to no valu_num row)
    I was trying something like this to start, but getting error "missing keyword"
    select
    t.*/,
    sum(
          case
            when date_val between :day2 - 6 and :day2
            then value_num between date_val - 6 and date_val
            else null
            end
            as 7Day_avg
    form tShould I have the case structure outside the sum function?
    Any thoughts??
    Edited by: 1004407 on Jun 7, 2013 11:06 AM

    Hi,
    If you want the average of the last 7 days, including the current day, then then RANGE should be 6 PRECEDING, not 7.
    Try this:
    WITH     got_min_date_val AS
            SELECT  id_key, date_val, value_num
            ,       MIN (date_val) OVER () AS min_date_val
            FROM    t
            WHERE  date_val BETWEEN TO_DATE ('04-01-2013', 'mm-dd-yyyy')
                             AND   TO_DATE ('04-20-2013', 'mm-dd-yyyy')
    SELECT    id_key, date_val, value_num
    ,         CASE
                  WHEN  date_val >= min_date_val + 6
                  THEN  SUM (value_num) OVER ( PARTITION BY  id_key
                                               ORDER BY      date_val
                                               RANGE         6 PRECEDING
                        / 7
              END  AS avg_7_day
    ,         CASE
                  WHEN  date_val >= min_date_val + 6
                  THEN  AVG (value_num) OVER ( PARTITION BY  id_key
                                               ORDER BY      date_val
                                               RANGE         6 PRECEDING
              END   AS avg_7_day_2
    FROM      got_min_date_val
    ORDER BY  id_key
    ,         date_val
    Output:
       ID_KEY DATE_VAL   VALUE_NUM  AVG_7_DAY  AVG_7_DAY_2
             1 01-APR-13         10
             1 02-APR-13         15
             1 03-APR-13         20
             1 05-APR-13          0
             1 08-APR-13         12       6.71        11.75
             1 09-APR-13          8       5.71        10.00
             1 10-APR-13          6       3.71         6.50
             1 12-APR-13         10       5.14         9.00
             1 13-APR-13          0       5.14         7.20
             1 14-APR-13          0       5.14         6.00
             1 15-APR-13         10       4.86         5.67
             1 16-APR-13          5       4.43         5.17
             1 17-APR-13          2       3.86         4.50
             1 20-APR-13          3       2.86         4.00
             2 03-APR-13         12
             2 05-APR-13         15
             2 06-APR-13          5
             2 07-APR-13          7       5.57         9.75
             2 09-APR-13         10       7.00         9.80
             2 11-APR-13          5       6.00         8.40
             2 12-APR-13          0       3.86         5.40
             2 13-APR-13          0       3.14         4.40
             2 15-APR-13          6       3.00         4.20
             2 16-APR-13          8       2.71         3.80
             2 17-APR-13          0       2.71         3.17
             2 18-APR-13         10       3.43         4.00
             2 19-APR-13          5       4.14         4.83
    Message was edited by: FrankKulash
    Sorry; I meant to reply to OP, not to Greg

  • How can we restrict the date range in the date picker

    While selecting any date a pop up date picker appears. In this date picker the users can select any future dates which can be 30-40 yrs ahead. How can customize this date picker so that the users are not allowed to slected date beyond certain range. ...??

    Hi user570596,
    I think there is no method to actually restrict the date picker popup, but you can use the ApexLib Framework (http://apexlib.sourceforge.net/) to define a min/max value for your date field. This will prevent the user from submitting the page when the date value is outside the defined range.
    See http://inside-apex.blogspot.com/2007/03/min-max-value-validation-in-browser.html
    for details.
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com
    Check out the ApexLib Framework: http://apexlib.sourceforge.net

  • How to write multi row sub query with the row containing range of values?

    Hi all,
    I have to include a column which contains weight ranges and it should come fom table called "report_range_parameters"
    The following query will reutrn those weight ranges.
    select report_parameter_min_value || ' -> ' || report_parameter_max_value
              from report_range_parameters
             WHERE report_range_parameters.report_parameter_id = 2359
               and report_range_parameters.report_parameter_group = 'GVW_GROUP'
               and report_range_parameters.report_parameter_name  = 'GVW_NAME'
                        The below query should return the values group by those weight ranges.
    How could I write that sub query?
    select   SUM(NVL("Class 0", 0)) "Class 0"  ,
                SUM(NVL("Class 1", 0)) "Class 1"  ,
                SUM(NVL("Class 2", 0)) "Class 2"  ,
                SUM(NVL(" ", 0)) "Total"
         FROM (
                 SELECT report_data.bin_start_date_time start_date_time,
                        SUM(DECODE(report_data.gvw, 0, report_data.gvw_count, 0)) "Class 0" ,
                        SUM(DECODE(report_data.gvw, 1, report_data.gvw_count, 0)) "Class 1" ,
                        SUM(DECODE(report_data.gvw, 2, report_data.gvw_count, 0)) "Class 2" ,
                        SUM(NVL(report_data.gvw_count, 0)) " "
                  FROM report_data
                 GROUP BY report_data.bin_start_date_time
              ) results
       RIGHT OUTER JOIN tmp_bin_periods
                     ON results.start_date_time >= tmp_bin_periods.bin_start_date_time
                    AND results.start_date_time <  tmp_bin_periods.bin_end_date_time
               GROUP BY tmp_bin_periods.bin_start_date_time,
                        tmp_bin_periods.bin_end_date_time Thanks.
    Edited by: user10641405 on Jun 15, 2009 3:14 PM
    Edited by: user10641405 on Jun 15, 2009 3:17 PM

    Hi,
    Assuming the following 4 things:
    (1) report_range_parameters contains data like this, from your [previous thread|http://forums.oracle.com/forums/message.jspa?messageID=3541079#3541079]
    id  group      name         min_value      max_value
    1   gvw_group  gvw_name      0              5
    2   gvw_group  gvw_name      5              10
    3   gvw_group  gvw_name     10              15(2) max_value is actually outside the range (that is, a value of exactly 5.000 is counted in the '5->10' range, not the '0->5' range)
    (3) the range has to match some column x that is in one of the tables in your main query
    (4) You want to add that column x to the GROUP BY clause
    then you shopuld do somehting like this:
    select   SUM(NVL("Class 0", 0)) "Class 0"  ,
                SUM(NVL("Class 1", 0)) "Class 1"  ,
                SUM(NVL("Class 2", 0)) "Class 2"  ,
                SUM(NVL(" ", 0)) "Total"
    ,         report_parameter_min_value || ' -> ' || report_parameter_max_value     AS weight_range          -- New
         FROM (
                 SELECT report_data.bin_start_date_time start_date_time,
                        SUM(DECODE(report_data.gvw, 0, report_data.gvw_count, 0)) "Class 0" ,
                        SUM(DECODE(report_data.gvw, 1, report_data.gvw_count, 0)) "Class 1" ,
                        SUM(DECODE(report_data.gvw, 2, report_data.gvw_count, 0)) "Class 2" ,
                        SUM(NVL(report_data.gvw_count, 0)) " "
                  FROM report_data
                 GROUP BY report_data.bin_start_date_time
              ) results
       RIGHT OUTER JOIN tmp_bin_periods
                     ON results.start_date_time >= tmp_bin_periods.bin_start_date_time
                    AND results.start_date_time <  tmp_bin_periods.bin_end_date_time
       LEFT OUTER JOIN  report_range_parameters                                        -- New
                    ON  x >= report_parameter_min_value                                    -- New
              AND x <  report_parameter_max_value                                   -- New
                    AND report_range_parameters.report_parameter_id = 2359                         -- New
                    and report_range_parameters.report_parameter_group = 'GVW_GROUP'               -- New
                    and report_range_parameters.report_parameter_name  = 'GVW_NAME'                    -- New
               GROUP BY tmp_bin_periods.bin_start_date_time,
                        tmp_bin_periods.bin_end_date_time
                  , x                                                       -- New

  • Is it possible to write a routine on excel file while loading data?

    Hi
    I am trying to load data from csv file(Excel flat file) into ODS, while loading data in to ODS, I need to check a condition if one Info Object in ODS is match with column C field in flat file then only the data should load, otherwise reject the data.
    any help is greatly appreciated.
    Thank you
    Harshan

    Hi Harshan,
    in your start routine:
    data: wa_ods type <name of active data ods table>,
          l_index type sy-tabix.
    loop at data_package.
    l_index = sy-tabix.
    select single * into wa_ods
    from   <name of active data ods table>
    where  <your condition>.
    if wa_ods-<fieldname> = <your condition>.
    continue.
    else.
    delete data_package index l_index.
    endif.
    endloop.
    In case of bad performance it might be necessary to post the ods-data to a internal table first and read the internal table instead of doing select single.
    Hope this helps!
    regards
    Siggi

  • How to write a recursive select procedure to read hierarchial data?

    Hi!
    I have a database where two tables are of interest to me.
    TABLE1
    ITEM_ID
    TABLE2
    PARENT_ID
    CHILD_ID
    There is a constrant between the tables so parent_id and child_id must exist in TABLE1 (they are actually same objects as those defined in TABLE1 using PK ITEM_ID)
    This table design is used to create tree structures. But I ahve hit a bump in the road on how to create a procedure that give me the entire structure as a recordset.
    Basically I just want to execute the procedure and I should be able to see the hierarchy, pergaps by appending pipe characters... like
    |Node1
    ||Node11
    |||Node111
    ||Node12
    |||Node121
    |Node2
    Later in my web app I will create a word like document using this information. But first I just need to list the structure from a specific parent.
    Do you perhaps have an idea how to create such a procedure? It should have at least 1 input parameter and that is the start parent. Then it should perhaps work in a recursive manner.
    Im very sure this has been done before, but I have not found a good example using the table design as stated above.
    kind regards
    Henrik

    Please read about [url http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/queries4a.htm#2053937]Hierarchical Queries in the manual.

  • How to write  procedure for creating a row

    Hi
    How to write procedure for creating a new row in data table when button clicked.

    Hi
    I am able to create a row.by writing a method in Application module class.
    method for creating a row in fin_years view:
    public void createRow() {
    Row newRow = (Row)getFinYearsView1().createRow();
    newRow.setNewRowState(Row.STATUS_INITIALIZED);
    //get instance of the above created view object
    ViewObjectImpl vo=getFinYearsView1();
    // to insert row at the end of the table
    vo.insertRowAtRangeIndex(vo.getRangeSize()-1, (Row)newRow);
    System.out.println(getFinYearsView1().getCurrentRowIndex());
    but it doest not create row at last in the data table.Instead it insert row in middle..

  • End Routine Issue - It does not move data from E_T_RESULT to RESULT_PACKAGE

    Hi,
    I am facing an issue with end routine. I have gone through previous posts on, how to write end routine and all.I wrote the end routine accordingly.
    Here is my scenario,
    I have 0CUST_SALES master data , which has all the Sales Org, Distribution Channel and Division, Sold to Party, Sales Grp and Sales Dist.
    I am getting , Sold to party and Distribution channel at the field routine.
    I am using, Sold to Party and Dist Channel and Division = '01'- whatever i populated using a field routine  and trying to get the Sales Org, Sales Grp and Sales Dist at the end routine.
    It looks like, all the code that i wrote seems correct but it does not populate any values into RESULT_PACKAGE.
    Here is the code I wote at the end routine. I am not sure, whats wrong in it. I used, this link to write this routine :
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/203eb778-461d-2c10-60b3-8a94ee91cbfc&overridelayout=true
    Global Declaration----
      DATA : BEGIN OF IT_CUST_SALES,
        DIV TYPE /bi0/pcust_sales-DIVISION,
        DIST_CH TYPE /bi0/pcust_sales-DISTR_CHAN,
        SALES_ORG TYPE /bi0/pcust_sales-SALESORG,
        CUST_SAL TYPE /bi0/pcust_sales-CUST_SALES,
        SALESDIST TYPE /bi0/pcust_sales-SALES_DIST,
        SALESGRP TYPE /bi0/pcust_sales-SALES_GRP,
        END OF IT_CUST_SALES.
    DATA: T_CUST_SALES LIKE TABLE OF IT_CUST_SALES.
    Start of End Routine
       SELECT DIVISION DISTR_CHAN SALESORG CUST_SALES SALES_DIST SALES_GRP
        from
        /bi0/pcust_sales INTO TABLE T_CUST_SALES for all entries in
        RESULT_PACKAGE
        where CUST_SALES = RESULT_PACKAGE-SOLD_TO
         AND DISTR_CHAN = RESULT_PACKAGE-DISTR_CHAN
         AND DIVISION = '01'.
        LOOP AT RESULT_PACKAGE INTO e_s_result.
          READ TABLE T_CUST_SALES INTO IT_CUST_SALES
              WITH KEY CUST_SAL = e_s_result-SOLD_TO
                 DIST_CH = e_s_result-DISTR_CHAN
                 DIV = '01'.
          IF SY-SUBRC EQ 0 .
            MOVE IT_CUST_SALES-SALES_ORG TO E_S_RESULT-SALESORG.
            MOVE IT_CUST_SALES-SALESDIST TO E_S_RESULT-SALES_DIST.
            MOVE IT_CUST_SALES-SALESGRP TO E_S_RESULT-SALES_GRP.
            APPEND E_S_RESULT  TO  E_T_RESULT .
          ENDIF.
        ENDLOOP.
        REFRESH RESULT_PACKAGE.
        MOVE E_T_RESULT[] TO RESULT_PACKAGE[] .
    End End Routine
    Data comes into E_T_RESULT but it does not move to RESULT_PACKAGE. Any inputs will be helpful.
    Regards,
    Kumar

    Hi Hegde,
    Declaration is same , its like this.
       datA: e_s_result type tys_TG_1.
        data: e_t_result type tyt_TG_1.
    I don't know, when i inserted this code in this post, initially it was OK but once i post i also saw , its not that read friendly.
    FYI, i am trying to put the code again, lets see if it works.
      SELECT DIVISION DISTR_CHAN SALESORG CUST_SALES SALES_DIST SALES_GRP
        from    /bi0/pcust_sales INTO TABLE T_CUST_SALES for all entries in
        RESULT_PACKAGE   where CUST_SALES = RESULT_PACKAGE-SOLD_TO
         AND DISTR_CHAN = RESULT_PACKAGE-DISTR_CHAN
         AND DIVISION = '01'.
        LOOP AT RESULT_PACKAGE INTO e_s_result.
          READ TABLE T_CUST_SALES INTO IT_CUST_SALES
              WITH KEY CUST_SAL = e_s_result-SOLD_TO
                 DIST_CH = e_s_result-DISTR_CHAN
                 DIV = '01'.
          IF SY-SUBRC EQ 0 .
            MOVE IT_CUST_SALES-SALES_ORG TO E_S_RESULT-SALESORG.
            MOVE IT_CUST_SALES-SALESDIST TO E_S_RESULT-SALES_DIST.
            MOVE IT_CUST_SALES-SALESGRP TO E_S_RESULT-SALES_GRP.
            APPEND E_S_RESULT  TO  E_T_RESULT .
          ENDIF.
        ENDLOOP.
        REFRESH RESULT_PACKAGE.
        MOVE E_T_RESULT[] TO RESULT_PACKAGE[] .
    Regards,
    Kumar

  • Routines for File name at External Data in Info Package level.

    Hi All,
    Can any one give the example codes of how to write the routine for Files at External Data in Info Package level.
    Regards
    srinivas

    Hi Srinivas
    Here iam attaching a sample code in the infopackage level this code is used to select the Current version from TVARV table ..based on the version from variable the data is loaded into the ods..
    data: l_idx like sy-tabix.
              read table l_t_range with key
                   fieldname = 'FISCPER'.
              l_idx = sy-tabix.
    tables tvarv.
    data: v_prever(6)   type c,
          v_fiscper(7)  type n.
      clear tvarv.
      select single low
       from tvarv
       into v_prever
      where name = 'ZBSK_PREVIOUS_RELEASED_VERSION' and
            type = 'P' and
            numb = '0000'.
    concatenate v_prever(4) '0' v_prever+4(2) into v_fiscper.
       concatenate  '0' v_prever+4(2) v_prever(4) into v_fiscper.
            l_t_range-low = v_fiscper .
              modify l_t_range index l_idx.
    Hope the above code helps you..
    let me know in case of any concerns.. and further help needed..
    bye
    Shu Moh..

Maybe you are looking for

  • Error adding Freight as Expense to Invoice in DI API after SAP upgrade

    Hi All, We recently upgrade from SAP B1 2005 A (6.80.320) SP: 01 Patch Level 36 to SAP B1 2007 A (8.00.178) SP: 00 Patch Level 42. A .Net application using the DI API has successfully created orders/invoices with Tax and Freight charges successfully

  • User deleted, data not saved

    My administrator deleted my account and made me a new one to fix a printing problem. The printing problem is fixed, but all my files are gone. From what I can gather when she deleted my old account she did not choose to save the files (there is no 'd

  • My ipod freezes everytime being touched

    My iPod has been freezing and the screen changes colors I have the 5th generation and I can't even use for over a minute please help? I even tried resetting it

  • Controlling chart scale

    I have created line chart. Where time is at x-axis and pressure is at y-axis. My actual pressure values are within range of 900 to 1000. I want to modify scale of y-axis so that instead of showing a scale from 0 to 1000, the scale range for y-axis sh

  • Sharing question

    I have iPhoto with all of my photos on it on Mac 1 in my house. Is it possible for Mac 2 and Mac 3 to share the same photos? I would like to view the photos on Mac 2 from Mac 1 without having to re-setup face/places/events etc all over again.