T-code ranges

We are using CC 4.0.  We have several roles in SAP that have t-code ranges.  Weekly SoD analyses on these roles produce no conflicts.
We recently broke out one of the t-code ranges in a role in order to remove a t-code.  This gets a little complicated, but I'll do my best to explain it.
The original range was:
From   SURSY
To   Z*
We needed to remove the ZGOLD  t-code from this range, so it now reads:
From   SURSY
To ZGOLC*
From   ZGOLD$
To   Z_ZZ*
The role in it's original state did not produce conflicts.  However, with the range now broken out as above, we are finding Z conflicts that didn't previously exist.
When I put the original range in table TSTCT to see exactly what t-codes it includes, it lists t-codes from SURSY up to the end of the Y t-codes, but did not include any Z t-codes.  This is why we used Z_ZZ* for the To t-code when we broke it out.
I am wondering if CC 4.0 reads t-code ranges the same way table TSTCT does.
Any assistance would be appreciated.
Thanks,
Sandy

Ben Daniels wrote:
Is there any way to go about generating a report of which roles in my systems contain these ranges, outside of manually looking at S_TCODE and then being able to clean them up or at least assign menu items to the offending t-codes?
If you have a look at table AGR_1251 you'll notice that there is a LOW and a HIGH field. If the HIGH field contains a value there is a range. If you filter this table for object S_TCODE and go for the non-empties in HIGH you will probabely get what you're looking for.
Jurjen
P.S. To find 'star' entries in the low field, search for #*

Similar Messages

  • Filter on postal code for multiple postal code ranges

    Hello,
    can anybody support me with your experience for the following requirement:
    - Select multiple filters on zip code ranges (1 to 7) in order to make the segmentation of BP belonging
      to for instance
          zip code range 10000 - 12999 and 14000 - 15000 and 18000 - 19999 and 30000 - 40000 etc.
    Many thanks for your help.
    Regards,
    Markus

    Hi,
    assuming you talk about segmentation in CRM 7.0: you can select the filters and drag them on the Segmentation Basis / the staging area and choose "split". With this action you create a profile for every filter you use.
    Best Regards
    Klaus

  • Wild Card Postal Codes in Transportation Zones and Postal Code Range in TCM

    Hello Experts,
    I have 2 queries on Postal Codes usability in SAP TM:
    1. Postal Code Transportation Zones:
    Business Scenario: Some countries have non-numeric Postal Codes and you can not maintain From and To Postal Code range. System supports Postal Code to be entered as Wild Card (XY1*) in Transportation Zone but does not respect them during charge calculation.
    2. Postal Code Range in Rate Table:
    There are standard Calculation Bases for Source/Destination Postal Code Range but these do not allow maintaining values like Source Postal Code Range (90100-90199) to Destination Postal Code Range (63100-63199). I am unable to understand the use of these 2 calculation bases since they do not accept range.
    Kindly suggest.
    Thanks and Best Regards,
    Vikas Chhabra

    I start with the first question: Well, well, well. Probably one of the most underestimated topics in the transportation network. A bit of a background: Postal codes are alphanumeric meaning they allow numbers and characters. Of course for some countries only numbers are required and those are pretty easy to handle. Nevertheless, SAP produces global software and there are countries having postal codes with unfixed length, character first, in the middle, at the end. This makes ranges ugly, tough, sometimes impossible.
    The range definition works alphanumeric, which is a position to position comparison based on single chars. You can check the inclusion results in excel or with any database. For the zone definition this can mean that you are forced to enter postal codes and no ranges. Of course this blows up the maintenance effort in the beginning, but ensures the correctness.
    I was surprised by your comment that the zone definition allows '*' because this would make this whole thing even more complicated and error prone. I tested it and it does not work, at least for Germany. I think in the address definition per country you can define valid formats for postal codes and there '*' is not valid for Germany. The transportation zone location inclusion will not work with pattern!
    In case you have manages to maintain this: I would advise to take the effort and enter at least valid ranges.

  • Project Code range on Profit & Loss Report

    Forum,
    Is there a system variable which can be added to the Profit & Loss Statement which will show selected project codes on the PLD.
    Regards,
    Juan

    Hi Juan,
    Simply click on Expanded Selection criteria and you will see the fields you want. Use them in your PLD.
    OFLT WhsFrom1
    OFLT WhsTo1
    OFLT WhsFrom2
    OFLT WhsTo2

  • Postal Code Range

    Hello Everyone,
    I came across a situation where I need to find "Postal Codes for a particular County" from any TABLE. Is there any wayout.
    Thank You in Advance.

    Version of the application?
    What module? (are you looking for customer zip codes, supplier zip codes, etc.?)

  • Can we put a range on company code 100 to 999 in query row definition?

    Hi all,
    Does anyone know how to define a blank range on a query row definition? For example, we need to put a company code range from 100 to 999 in order to have a range large enough to cover future new comapny codes, but we do not have master data exist for comapny code 999 in BW, It does not seem I can put ccode 999 in the query definition screen.  I used hierarchy as a workaround. I created a company code hierarchy to include the range from 100 to 999 and then pull the hierarchy to the query definition.  It worked, but I have some problems when I use structure in conjunction with the hierarchy.  Anybody have an idea?

    Hi Nancy,
    I believe a simple selection option variable can work for you..
    You would have to create them for each row..
    So for each selection in your structure you can restrict by the respective Variable..
    While creating the variable specify the default values you want eg: 100 to 999 .
    You doot need to have it ready for input..and even if these values are not present in master data it will allow you to use these values in the variable default values..
    Let me know if you need any clarification..
    Ashish..

  • Message Codes in essbase

    Version: Essbase 6.5 and 7.1
    I'm trying to parse certain application specific essbase log files (for both versions listed above) to track user activity. Basically I'm just targetting the "Requestor" message code range
    I'm finding the user logged in by determining what comes after the word "User".
    Examples:
    1. "Administrator Has Temporarily Disabled User Commands"
    2. "Received Command [GetAttributeNameSpecs] from user [testlc]"
    3. "Received Command [GetAlias] from user [testcoml]"
    However, my logic won't work in the first example. It will treat "Commands" as a
    My question is there a thumb rule by which I can say that if it finds the word "User [" the word following it will be the user id?

    Go to the Essbase error messages file http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_error/erhelp.htm
    and look for the codes you need. It's better to look for the error number than the description if you can as it will be more precise

  • Problem in executing FS10N transaction code -

    Hi All,
    I am executing FS10N transaction code, in selection criteria for company code, I have selected multiple selection tab. Here in ranges tab, I have entered " 01 to 32" Company codes range. Then I am receiving the following message "ONLY SELECT COMPANY CODES WITH SAME FISCAL YEAR".
    I am sure that all the selected comapny codes are having same fiscal year variant.
    Please advise me what is the problem and what should I do to rectify it.

    Hi chandra,
    This problem occur because you had been posted documents for some company code with another fiscal year variant and changed afterwards.
    Enter in OBY6: Utilities - Changed logs - Display status.
    You can display companies codes balances with same document posting period.

  • Plz explain the code

    REPORT zfi_vendor_ageing
    NO STANDARD PAGE HEADING
    LINE-COUNT 58
    line-size 168
    MESSAGE-ID zh_msg.
    D A T A B A S E T A B L E S D E C L A R A T I O N
    TABLES: lfa1, " Vendor Master (General)
    t001, " Company Codes
    rfpdo.
    I N T E R N A L T A B L E S D E C L A R A T I O N S *
    Internal Table for Vendor Open Items Data
    DATA: BEGIN OF int_bsik OCCURS 0,
    lifnr LIKE bsik-lifnr, " Vendor Number
    name1 LIKE lfa1-name1, " Vendor Name
    shkzg LIKE bsik-shkzg, " Dr/Cr Indicator
    belnr LIKE bsik-belnr, " Document Number
    xblnr LIKE bsik-xblnr, " Ref Doc No
    blart LIKE bsik-blart, " Document Type
    zfbdt LIKE bsik-zfbdt, " Base Line Date
    zbd1t LIKE bsik-zbd1t, " Due date1
    zbd2t LIKE bsik-zbd2t, " Due Date2
    zbd3t LIKE bsik-zbd3t, " Due Date3
    waers LIKE bsik-waers, " Currency
    dmbtr LIKE bsik-dmbtr, " Amount in Local Curr
    END OF int_bsik.
    Internal Table for Amounts Sum Up Data
    DATA: BEGIN OF int_final OCCURS 0,
    lifnr LIKE bsik-lifnr, " Vendor Number
    name1 LIKE lfa1-name1, " Vendor Name
    total1 LIKE bsik-dmbtr, " Amount in Local Curr
    total2 LIKE bsik-dmbtr, " Amount in Local Curr
    total3 LIKE bsik-dmbtr, " Amount in Local Curr
    total4 LIKE bsik-dmbtr, " Amount in Local Curr
    total5 LIKE bsik-dmbtr, " Amount in Local Curr
    total6 LIKE bsik-dmbtr, " Amount in Local Curr
    total LIKE bsik-dmbtr, " Amount in Local Curr
    END OF int_final.
    D A T A D E C L A R A T I O N S
    DATA : v_flag, " Flag
    v_gtotal1 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal2 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal3 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal4 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal5 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal6 LIKE bsik-dmbtr, " Amount Totals
    v_gtotal LIKE bsik-dmbtr, " Amount Totals
    v_subtotal1 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal2 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal3 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal4 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal5 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal6 LIKE bsik-dmbtr, " Amount Totals
    v_subtotal LIKE bsik-dmbtr, " Amount Totals
    v_date LIKE bsik-zfbdt, " Due Date
    v_tage1(4), " Age 30 days
    v_tage2(4), " Age 60 days
    v_tage3(4), " Age 90 days
    v_fir(15), " Column Text1
    v_sec(15), " Column Text2
    v_thir(15), " Column Text3
    v_four(17), " Column Text4
    v_fidd(4), " Days field1
    v_sedd(4), " Days field2
    v_thdd(4), " Days field3
    v_fodd(4), " Days field4
    v_str TYPE SY-LISEL, " String
    v_str1(11), " String
    v_tage(3), " String
    v_date1(10). " Date field
    R A N G E D E C L A R A T I O N S
    RANGES: r_date1 FOR bsik-zfbdt, " Date Range 1
    r_date2 FOR bsik-zfbdt, " Date Range 2
    r_date3 FOR bsik-zfbdt, " Date Range 3
    r_date4 FOR bsik-zfbdt. " Date Range 4
    S E L E C T I O N S C R E E N *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr. "Vendor account
    PARAMETERS: p_bukrs LIKE t001-bukrs. "Co. Code
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: p_allgst LIKE rfpdo-allgstid OBLIGATORY DEFAULT sy-datum.
    "Open items at key date
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_tage1 LIKE rfpdo1-allgfael DEFAULT '30',
    p_tage2 LIKE rfpdo1-allgfael DEFAULT '60',
    p_tage3 LIKE rfpdo1-allgfael DEFAULT '90',
    p_tage4 LIKE rfpdo1-allgfael DEFAULT '120'.
    SELECTION-SCREEN END OF BLOCK b3.
    A T S E L E C T I O N S C R E E N *
    AT SELECTION-SCREEN.
    Validate the screen fields
    PERFORM validate_flds.
    S T A R T O F S E L E C T I O N *
    START-OF-SELECTION.
    Fetch main data
    PERFORM fetch_data.
    T O P O F P A G E
    Header
    TOP-OF-PAGE.
    PERFORM header.
    E N D O F P A G E
    Footer
    END-OF-PAGE.
    ULINE.
    T O P O F P A G E D U R I N G L I N E S E L E C T I O N *
    Top of Page in Secondary List
    TOP-OF-PAGE DURING LINE-SELECTION.
    PERFORM header1.
    A T L I N E S E L E C T I O N *
    AT LINE-SELECTION.
    Perform Line Selections
    PERFORM line_selection.
    E N D O F S E L E C T I O N
    END-OF-SELECTION.
    List generation
    PERFORM basic_list.
    *& Form validate_flds
    Validation of Selection Screen fields
    FORM validate_flds .
    Validate Vendor Code
    CLEAR lfa1-lifnr.
    SELECT lifnr UP TO 1 ROWS
    INTO lfa1-lifnr
    FROM lfa1
    WHERE lifnr IN s_lifnr AND
    spras = sy-langu.
    ENDSELECT.
    IF sy-subrc <> 0.
    MESSAGE e000 WITH 'Invalid Vendor Code range'(023).
    ENDIF.
    Validate Company Code
    CLEAR t001-bukrs.
    SELECT bukrs UP TO 1 ROWS
    INTO t001-bukrs
    FROM t001
    WHERE bukrs = p_bukrs AND
    spras = sy-langu.
    ENDSELECT.
    IF sy-subrc <> 0.
    MESSAGE e021. " Invalid Company Code range
    ENDIF.
    IF ( p_tage1 > p_tage2 ) OR ( p_tage1 > p_tage3 ) OR
    ( p_tage1 > p_tage4 ).
    MESSAGE e999 WITH 'Column 1 greater'(004)
    'than Column# 2 or 3 or 4'(005).
    ENDIF.
    *column 2
    IF ( p_tage2 > p_tage3 ) OR ( p_tage1 > p_tage4 ).
    MESSAGE e999 WITH 'Column 2 greater'(006)
    'than Column# 3 or 4'(007).
    ENDIF.
    *column3
    IF ( p_tage3 > p_tage4 ).
    MESSAGE e999 WITH 'Column 3 greater'(008)
    'than Column#4'(009).
    ENDIF.
    ENDFORM. " validate_flds
    *& Form fetch_data
    Fetching Data from Database Tables
    FORM fetch_data .
    Date Range Population
    r_date1-sign = 'I'.
    r_date1-option = 'BT'.
    r_date1-low = p_allgst.
    r_date1-high = r_date1-low + p_tage1.
    APPEND r_date1.
    r_date2-sign = 'I'.
    r_date2-option = 'BT'.
    r_date2-low = r_date1-high + 1.
    r_date2-high = r_date1-low + p_tage2.
    APPEND r_date2.
    r_date3-sign = 'I'.
    r_date3-option = 'BT'.
    r_date3-low = r_date2-high + 1.
    r_date3-high = r_date1-low + p_tage3.
    APPEND r_date3.
    r_date4-sign = 'I'.
    r_date4-option = 'BT'.
    r_date4-low = r_date3-high + 1.
    r_date4-high = r_date1-low + p_tage4.
    APPEND r_date4.
    Select the Vendor Open Items data from BSIK
    SELECT l~lifnr
    l1~name1
    b~waers
    b~dmbtr
    b~zfbdt
    b~zbd1t
    b~zbd2t
    b~zbd3t
    b~belnr
    b~xblnr
    b~shkzg
    b~blart
    INTO CORRESPONDING FIELDS OF TABLE int_bsik
    FROM lfb1 AS l INNER JOIN lfa1 AS l1
    ON llifnr = l1lifnr
    INNER JOIN bsik AS b
    ON llifnr = blifnr AND
    lbukrs = bbukrs
    WHERE l~lifnr IN s_lifnr AND
    l~bukrs = p_bukrs and
    b~zfbdt le p_allgst.
    IF SY-SUBRC <> 0.
    MESSAGE i000 WITH 'No Data found'(027).
    ENDIF.
    Removing the date limit to get the due items in the past
    DELETE int_bsik WHERE
    ( blart NE 'RE' AND blart NE 'KR' ) OR
    shkzg NE 'H'.
    SORT int_bsik BY lifnr.
    ENDFORM. " fetch_data
    *& Form header
    Display the Report Columns
    FORM header .
    v_tage1 = p_tage1 + 1.
    v_tage2 = p_tage2 + 1.
    v_tage3 = p_tage3 + 1.
    v_fidd = p_tage1.
    v_sedd = p_tage2.
    v_thdd = p_tage3.
    v_fodd = p_tage4.
    MOVE v_fodd0(4) TO v_fodd1(3).
    v_fodd+0(1) = space.
    CONCATENATE '1 to'(010) v_fidd INTO v_fir.
    CONCATENATE v_tage1 ' to '(011) v_sedd INTO v_sec.
    CONCATENATE v_tage2 ' to '(011) v_thdd INTO v_thir.
    CONCATENATE v_tage3 ' to '(011) space v_fodd INTO v_four.
    Standard header
    clear: v_date1, v_str, v_str1, v_tage.
    write p_allgst to v_date1.
    Move p_tage4 to v_tage.
    concatenate '>' v_tage text-025 into v_str1.
    concatenate
    'Summary of Ageing Analysis for Vendor Open Invoices as on'(013)
    v_date1 into v_str separated by space.
    FORMAT COLOR OFF.
    WRITE : /1(168) sy-uline.
    FORMAT COLOR 1 INTENSIFIED.
    WRITE :/1 sy-vline, 13 sy-vline, 49 sy-vline,
    50(101) 'Invoices Due For(In Days)'(014) CENTERED,
    151 sy-vline, 168 sy-vline .
    WRITE :/1 sy-vline, 2(11) 'Vendor#'(015) CENTERED,
    13 sy-vline ,14(35) 'Vendor Name'(016) CENTERED,
    49 sy-vline,
    50(101) sy-uline,151 sy-vline,
    152(16) 'Total'(017) CENTERED,
    168 sy-vline.
    WRITE : /1 sy-vline,13 sy-vline, 49 sy-vline,
    50(16) v_fir CENTERED, 66 sy-vline,
    67(16) v_sec CENTERED, 83 sy-vline,
    84(16) v_thir CENTERED, 100 sy-vline,
    101(16) v_four CENTERED, 117 sy-vline,
    118(16) v_str1 centered, 134 sy-vline,
    135(16) 'Already Overdue'(018) CENTERED,151 sy-vline,
    168 sy-vline.
    FORMAT COLOR OFF.
    WRITE : /1(168) sy-uline.
    ENDFORM. " header
    *& Form basic_list
    Display the Basic List
    FORM basic_list .
    NEW-PAGE LINE-SIZE 168.
    LOOP AT int_bsik.
    CLEAR v_date.
    IF int_bsik-zbd3t <> ' '.
    v_date = int_bsik-zfbdt + int_bsik-zbd3t.
    ELSE.
    IF int_bsik-zbd2t <> ' '.
    v_date = int_bsik-zfbdt + int_bsik-zbd2t.
    ELSE.
    v_date = int_bsik-zfbdt + int_bsik-zbd1t.
    ENDIF.
    ENDIF.
    IF int_bsik-zbd1t = ' '.
    v_date = int_bsik-zfbdt.
    ENDIF.
    IF v_date IN r_date1.
    int_final-total1 = int_final-total1 + int_bsik-dmbtr.
    ELSEIF v_date IN r_date2.
    int_final-total2 = int_final-total2 + int_bsik-dmbtr.
    ELSEIF v_date IN r_date3.
    int_final-total3 = int_final-total3 + int_bsik-dmbtr.
    ELSEIF v_date IN r_date4.
    int_final-total4 = int_final-total4 + int_bsik-dmbtr.
    ELSEif v_date > r_date4-high.
    int_final-total5 = int_final-total5 + int_bsik-dmbtr.
    ELSEif v_date < p_allgst.
    int_final-total6 = int_final-total6 + int_bsik-dmbtr.
    ENDIF.
    AT END OF lifnr.
    v_flag = 1.
    ENDAT.
    IF v_flag = 1.
    int_final-lifnr = int_bsik-lifnr.
    int_final-name1 = int_bsik-name1.
    int_final-total = int_final-total1 + int_final-total2 +
    int_final-total3 + int_final-total4 + int_final-total5 +
    int_final-total6.
    APPEND int_final.
    v_gtotal1 = v_gtotal1 + int_final-total1.
    v_gtotal2 = v_gtotal2 + int_final-total2.
    v_gtotal3 = v_gtotal3 + int_final-total3.
    v_gtotal4 = v_gtotal4 + int_final-total4.
    v_gtotal5 = v_gtotal5 + int_final-total5.
    v_gtotal6 = v_gtotal6 + int_final-total6.
    v_gtotal = v_gtotal + int_final-total.
    WRITE: /1 sy-vline,
    2 int_final-lifnr COLOR 4 INTENSIFIED ON,
    13 sy-vline,
    14 int_final-name1 COLOR 4 INTENSIFIED ON,
    49 sy-vline.
    DATA : v_rem.
    v_rem = sy-tabix MOD 2.
    IF v_rem NE 0.
    FORMAT COLOR 2 INTENSIFIED.
    WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
    66 sy-vline,
    67 int_final-total2 CURRENCY int_bsik-waers,
    83 sy-vline,
    84 int_final-total3 CURRENCY int_bsik-waers,
    100 sy-vline,
    101 int_final-total4 CURRENCY int_bsik-waers,
    117 sy-vline,
    118 int_final-total5 CURRENCY int_bsik-waers,
    134 sy-vline,
    135 int_final-total6 CURRENCY int_bsik-waers,
    151 sy-vline,
    152 int_final-total CURRENCY int_bsik-waers,
    168 sy-vline.
    ELSE.
    WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
    66 sy-vline,
    67 int_final-total2 CURRENCY int_bsik-waers,
    83 sy-vline,
    84 int_final-total3 CURRENCY int_bsik-waers,
    100 sy-vline,
    101 int_final-total4 CURRENCY int_bsik-waers,
    117 sy-vline,
    118 int_final-total5 CURRENCY int_bsik-waers,
    134 sy-vline,
    135 int_final-total6 CURRENCY int_bsik-waers,
    151 sy-vline,
    152 int_final-total CURRENCY int_bsik-waers,
    168 sy-vline.
    ENDIF.
    FORMAT COLOR OFF.
    HIDE int_final.
    CLEAR int_final.
    v_flag = 0.
    ENDIF.
    AT LAST.
    WRITE : /1(168) sy-uline.
    FORMAT COLOR 3 INTENSIFIED.
    WRITE : /1 sy-vline, 2(47) 'GRAND TOTAL'(022) CENTERED,
    49 sy-vline, 50 v_gtotal1 CURRENCY int_bsik-waers,
    66 sy-vline, 67 v_gtotal2 CURRENCY int_bsik-waers,
    83 sy-vline, 84 v_gtotal3 CURRENCY int_bsik-waers,
    100 sy-vline,101 v_gtotal4 CURRENCY int_bsik-waers,
    117 sy-vline,118 v_gtotal5 CURRENCY int_bsik-waers,
    134 sy-vline,135 v_gtotal6 CURRENCY int_bsik-waers,
    151 sy-vline,152 v_gtotal CURRENCY int_bsik-waers,
    168 sy-vline.
    HIDE : v_gtotal1,
    v_gtotal2,
    v_gtotal3,
    v_gtotal4,
    v_gtotal5,
    v_gtotal6,
    v_gtotal.
    ENDAT.
    FORMAT COLOR OFF.
    ENDLOOP.
    WRITE : /1(168) sy-uline.
    ENDFORM. " basic_list
    *& Form line_selection
    When double clicked on the line display the seconday list
    FORM line_selection .
    NEW-PAGE LINE-SIZE 206.
    Sy-lsind = 1.
    DATA : v_rem,v_cnt LIKE sy-tabix.
    v_cnt = 0.
    SORT int_bsik BY belnr zfbdt.
    LOOP AT int_bsik WHERE lifnr EQ int_final-lifnr.
    v_rem = v_cnt MOD 2.
    CLEAR v_date.
    IF int_bsik-zbd3t <> ' '.
    v_date = int_bsik-zfbdt + int_bsik-zbd3t.
    ELSE.
    IF int_bsik-zbd2t <> ' '.
    v_date = int_bsik-zfbdt + int_bsik-zbd2t.
    ELSE.
    v_date = int_bsik-zfbdt + int_bsik-zbd1t.
    ENDIF.
    ENDIF.
    IF int_bsik-zbd1t = ' '.
    v_date = int_bsik-zfbdt.
    ENDIF.
    IF v_rem NE 0.
    format color 2 intensified.
    WRITE :/1 sy-vline, 2 int_bsik-belnr,
    12 sy-vline,13 int_bsik-lifnr,
    23 sy-vline,24 int_bsik-name1,
    59 sy-vline,60 int_bsik-xblnr,
    76 sy-vline,77 int_bsik-zfbdt,
    87 sy-vline.
    WRITE : 104 sy-vline,121 sy-vline,
    138 sy-vline,155 sy-vline,
    172 sy-vline, 189 sy-vline,
    190 int_bsik-dmbtr CURRENCY int_bsik-waers,
    206 sy-vline.
    IF v_date IN r_date1.
    v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
    WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date2.
    v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
    WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date3.
    v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
    WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date4.
    v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
    WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEif v_date > r_date4-high.
    v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
    WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEif v_date < p_allgst.
    v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
    WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ENDIF.
    format color off.
    ELSE.
    WRITE :/1 sy-vline, 2 int_bsik-belnr,
    12 sy-vline,13 int_bsik-lifnr,
    23 sy-vline,24 int_bsik-name1,
    59 sy-vline,60 int_bsik-xblnr,
    76 sy-vline,77 int_bsik-zfbdt,
    87 sy-vline.
    WRITE : 104 sy-vline,121 sy-vline,
    138 sy-vline,155 sy-vline,
    172 sy-vline,189 sy-vline,
    190 int_bsik-dmbtr CURRENCY int_bsik-waers,
    206 sy-vline.
    IF v_date IN r_date1.
    v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
    WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date2.
    v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
    WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date3.
    v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
    WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEIF v_date IN r_date4.
    v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
    WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEif v_date > r_date4-high.
    v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
    WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ELSEif v_date < p_allgst.
    v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
    WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
    ENDIF.
    ENDIF.
    FORMAT COLOR OFF.
    v_cnt = v_cnt + 1.
    ENDLOOP.
    WRITE : /1(206) sy-uline.
    v_subtotal = v_subtotal1 + v_subtotal2 + v_subtotal3
    + v_subtotal4 + v_subtotal5 + v_subtotal6.
    FORMAT COLOR 3 INTENSIFIED.
    WRITE : /1 sy-vline,
    2(85) 'Total'(017) CENTERED CURRENCY int_bsik-waers ,
    87 sy-vline,
    88 v_subtotal1 CURRENCY int_bsik-waers,
    104 sy-vline,
    105 v_subtotal2 CURRENCY int_bsik-waers,
    121 sy-vline,
    122 v_subtotal3 CURRENCY int_bsik-waers,
    138 sy-vline,
    139 v_subtotal4 CURRENCY int_bsik-waers,
    155 sy-vline,
    156 v_subtotal5 CURRENCY int_bsik-waers,
    172 sy-vline,
    173 v_subtotal6 CURRENCY int_bsik-waers,
    189 sy-vline,
    190 v_subtotal CURRENCY int_bsik-waers,
    206 sy-vline.
    FORMAT COLOR OFF.
    WRITE : /1(206) sy-uline.
    CLEAR : v_subtotal,v_subtotal1,v_subtotal2,v_subtotal3,
    v_subtotal4,v_subtotal5,v_gtotal1,v_gtotal2,v_gtotal3,
    v_gtotal4, v_gtotal5,v_gtotal,v_subtotal6,v_gtotal6.
    ENDFORM. " line_selection
    *& Form header1
    Secondary List Header
    FORM header1 .
    Standard header
    clear: v_date1, v_str, v_str1, v_tage.
    write p_allgst to v_date1.
    Move p_tage4 to v_tage.
    concatenate '>' v_tage text-025 into v_str1.
    concatenate
    'Details of Ageing Analysis for Vendor Open Invoices as on'(024)
    v_date1 into v_str separated by space.
    FORMAT COLOR 1 intensified.
    WRITE :/1(206) sy-uline.
    WRITE :/1 sy-vline,12 sy-vline ,
    23 sy-vline,59 sy-vline,76 sy-vline,87 sy-vline,
    88(101) 'Invoices Due For(In Days)'(014) CENTERED,
    189 sy-vline,206 sy-vline.
    WRITE : /1 sy-vline, 2(10) 'Doc Number'(021) CENTERED,
    12 sy-vline, 13(10) 'Vendor#'(015) CENTERED,
    23 sy-vline, 24(35) 'Vendor Name'(016) CENTERED,
    59 sy-vline, 60(16) 'Ref invoice#'(019) CENTERED,
    76 sy-vline, 77(10) 'Inv dt'(020) CENTERED,
    87 sy-vline, 88(101) sy-uline,
    189 sy-vline,190(16) 'Total'(017) CENTERED,
    206 sy-vline.
    WRITE : /1 sy-vline, 12 sy-vline,
    23 sy-vline,59 sy-vline,
    76 sy-vline,87 sy-vline,
    88(16) v_fir CENTERED, 104 sy-vline,
    105(16) v_sec CENTERED, 121 sy-vline,
    122(16) v_thir CENTERED, 138 sy-vline,
    139(16) v_four CENTERED, 155 sy-vline,
    156(16) v_str1 CENTERED,
    172 sy-vline,
    173(16) 'Already Overdue'(018) CENTERED,
    189 sy-vline,
    206 sy-vline.
    format color off.
    WRITE : /1(206) sy-uline.
    ENDFORM. " header1

    Hi
    Account Payables(AP) data related vendor invoices is stored in BSIK and BSAK tables
    SO fetching the data from those tables for the given vendor and the bucket selected (as I told this ageing is calculated in daysbuckets) and display and the totals at the end of the vendor
    go through the code it is easily understandable as we are fetching data just  from table BSIK and vendor tables LFA1 LFB1.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Sample code in Update Rule to restrict data selection?

    We used to restrict data selection in InfoPackage data selection, e.g., for company code range when loading data from a source system (e.g. EBP which is similar to R3), but somehow the company code range we set in InfoPackage data selection not working and we found actually it occurs on the source system side when running RSA3 on EBP side and input the company code range in RSA3 selection section, but still it extracts data beyond the company code range.  We don't understand why EBP data selection doesn't work, then we consider in update rule on BW to set the company code range.  We know in update rule, we can select Start Routine, formula, or routine to set the company code range.  But we would be appreciated if experts here can recommend which one is the most efficient to load data fast for data load performance reason and would be appreicated if you can let us know the sample code!
    Thanks in advance!

    hi Hari,
    I copy the whole code of the start routine below:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    Includes to update generic objects
    INCLUDE rsbctgn_top .
    INCLUDE rsbctgn_update_rules .
    INCLUDE rsbctbbp_generic_objects.
      The following section is prepared for you if you compound
      the business partner 0BPARTNER with the
      Source System 0BBP_SYS_BP or if you compound the organizational
      Unit 0ORGUNIT with the source System 0BBP_SYS_BP
    TYPE-POOLS: RRSV.
    Data: L_HLP_CHAVL_CMP       TYPE RSCHAVL.
    DATA:
           L_S_DEP       TYPE RRSV_S_DEP,
           L_T_DEP       TYPE RRSV_T_DEP.
      End of compound
    DATA: l_s_errorlog        TYPE rssm_s_errorlog_int,
          l_hlp_chavl         TYPE rschavl.
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CS0BBP_CONF_TD_1.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    delete data_package where 0comp_code < 'X300' OR 0comp_code > 'X6ZZ'.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.

  • Range valuses in Select statment.

    Hi experts,
    i am retriving the data from the data base table and in where cluse im using the RANGE tables i difiened and appending the values of sign option low ,high to it.
    i have defined as:
    ranges:post for bsak-budat.
    post-sign   = post_dat-sign .
    post-option = post_dat-option.
      post-low    = post_dat-low.
      post-high   = post_dat-high.
      append post.
    comp-sign = comp_code-sign .
      comp-option = comp_code-option.
      comp-low  = comp_code-low.
      comp-high = comp_code-high.
      append comp.
    vend-sign   =  vendor-sign  .
      vend-option =  vendor-option  .
      vend-low    = vendor-low.
      vend-high   = vendor-high  .
      append vend.
    select bukrs gjahr belnr
             xblnr lifnr wskto
             skfbt waers wrbtr
             wmwst augdt budat
             bldat cpudt zfbdt
             zterm zbd1t zbd2t
             zbd3t zbd1p zbd2p
             zlsch  from bsak into  corresponding fields of table g_bsak
                                                 where
                                                 budat in  post and
                                                 bukrs in comp and
                                                 lifnr in vend .
    but in select i am not getting any rows retrieval but entries are there in Table for same condition.
    Plz help me how to code ranges values in select statement where condition and in anything wrong in my code mentioned above.
    Mahesh
    Edited by: mahesh s on Sep 4, 2009 10:59 AM

    Hi,
    Thats true if you are using select-options to get the values then its not required for you to move into ranges...
    but stil if you want to move them into ranges....
    use the following code...
    ranges:post for bsak-budat.
    loop at post_dat.
    move post_dat to post.
    append post.
    endloop.
    loop at comp_code.
    move comp_code to comp.
    append comp.
    endloop.
    loop at vendor.
    move vendor to vend.
    append vend.
    endloop.
    select bukrs gjahr belnr
    xblnr lifnr wskto
    skfbt waers wrbtr
    wmwst augdt budat
    bldat cpudt zfbdt
    zterm zbd1t zbd2t
    zbd3t zbd1p zbd2p
    zlsch from bsak into corresponding fields of table g_bsak
    where
    budat in post and
    bukrs in comp and
    lifnr in vend .
    Regards,
    Siddarth

  • VAT CODE Date

    Dear Guru,
    is there a possibility for VAT CODE RANGE VALIDITY percent tax rate ?
    For example: 20% until 18 Septmber 2011 and 21% start 19 Septmber 2011 .
    Thank you very much

    Hello,
    when it's output tax code used in billing, you can maintain it directly from SD in VK12 for specific condition type (e.g. MWST)
    Best regards
    Pablo

  • Delete authorization for specific Company Code

    All,
    For a specific transactions, our users may only run the transaction for a specific company code. Transaction is TPM55A
    What authorization object do I need to add to my role, so the users have only authorization for let's say Company code range 1000 - 1050.
    Many thanx for help
    kr,
    Stef

    Hi Stef,
    Please try to add this authorisation object manually F_BKPF_BUK- Authorisation object for company code.
    In the filed BUKRS you can maintain the company code as you required for the users.
    I hope this may help you in resolving the issue.
    Thanks
    Karthick

  • Range and dump

    i had this code
    RANGES r_clienti FOR kna1-kunnr.
    START-OF-SELECTION.
      CLEAR ok_exit.
      CLEAR sti_knvp2.
      IF NOT s_vendi[] IS INITIAL.
      SELECT kunnr FROM knvp INTO r_clienti-low
                            WHERE kunn2 IN s_vendi
                              AND vkorg EQ 'IT07'
                            AND kunnr IN dd_kunnr
                            AND parvw = 'V2'.           "ae-modif 19.04.08
         r_clienti-option = 'EQ'.
          r_clienti-sign = 'I'.
         APPEND r_clienti.
        ENDSELECT.
        DESCRIBE TABLE r_clienti LINES n_cli.
        IF n_cli < 1000.
          dd_kunnr[] = r_clienti[].
          IF dd_kunnr[] IS INITIAL.
            EXIT.
          ENDIF.
        ENDIF.
    i want to take off the select/end select and i made
    SELECT kunnr FROM knvp APPENDING TABLE sti_knvp2
                            WHERE kunn2 IN s_vendi
                              AND vkorg EQ 'IT07'
                              AND kunnr IN dd_kunnr
                              AND parvw = 'V2'.           "ae-modif 19.04.08
        LOOP AT sti_knvp2.
          r_clienti-low = sti_knvp2-kunnr.
          r_clienti-option = 'EQ'.
          r_clienti-sign = 'I'.
          MODIFY r_clienti.
        ENDLOOP.
        DESCRIBE TABLE r_clienti LINES n_cli.
        IF n_cli < 1000.
          dd_kunnr[] = r_clienti[].
          IF dd_kunnr[] IS INITIAL.
            EXIT.
          ENDIF.
        ENDIF.
    but the report goes in dump and i can't understand why.
    who can help me please?

    using the ranges will effect the performance... try if you can eliminate it..
    SELECT kunnr FROM knvp into vl_kunnr
                            WHERE kunn2 IN s_vendi
                              AND vkorg EQ 'IT07'
                              AND kunnr IN dd_kunnr
                              AND parvw = 'V2'.           "ae-modif 19.04.08
        LOOP AT sti_knvp2.
          r_clienti-low = vl_kunnr.
          r_clienti-option = 'EQ'.
          r_clienti-sign = 'I'.
          MODIFY r_clienti.
        ENDLOOP.

  • BAPI at INPUT give range like SELECT-OPTIONS

    hi all
         i don't know weather it right forum for BAPI , but writing under this .
         my requirement is like , as we give range in SELECT-OPTIONS,
    like wise i want to give range in BAPI at INPUT level .
    i.e.  say i want to get details of Vendors , i will write a BAPI and i will give VENDOR code range to get information of all vendor with in that range.
    please guide me in this .

    Hi!
    You could use this bapi fm: BAPI_VENDOR_GETDETAIL
    I could imagine it like this:
    1. You have to create an FM, with the RA_LIFNR range.
    2.
    SELECT * FROM lfa1 INTO TABLE gt_lfa1
    WHERE lifnr IN ra_lifnr.
    LOOP AT gt_lfa1 INTO gs_lfa1.
    CALL FUNCTION 'BAPI_VENDOR_GETDETAIL'
    with the parameters
    collect data into an output table
    ENDLOOP.
    3. Give back the output table to the caller program
    Regards
    Tamá

Maybe you are looking for