IP pool selection from RADIUS

Hi,
I'm trying to assign different ip addresses to each vpn client depending the group the belong to. To do so, I create three different pools locally to the router and configure the radius server to send the Cisco-AVPair=”ip:addr-pool=poolname”  attribute. The radius server is sending this attribute correctly but the router isn't using it. If I try with the Framed-IP-Address it works fine, but not for the pool.
Here is the related router config:
aaa new-model
aaa authentication login RemoteUsers group radius
aaa authorization network UsersGroup group radius
aaa session-id common
crypto isakmp policy 100
encr aes 256
authentication pre-share
group 2
crypto isakmp client configuration group Users
key xxxx
pool pool1
acl UsersSplit
crypto isakmp profile UsersProfile
   match identity group Users
   client authentication list RemoteUsers
   isakmp authorization list UsersGroup
   client configuration address respond
   virtual-template 1
crypto ipsec transform-set Transf-Users esp-aes esp-sha-hmac
mode transport
crypto ipsec profile Prof-Users
set transform-set Transf-Users
set isakmp-profile UsersProfile
ip local pool pool1 192.168.110.10 192.168.110.20
ip local pool pool2 192.168.120.10 192.168.120.20
ip local pool pool3 192.168.130.10 192.168.130.20
Freeradius config:
testuser Auth-Type := Local, User-Password == "testpass"
Service-Type = Framed-User,
Framed-Protocol = PPP,
cisco-avpair = "ip:addr-pool=pool1",
Without enabling authorization, testuser connects succesfully, but after I enable authorization to instruct the router to accept pool configuration, it automatically authenticate using the isakmp Users user, without asking for the real vpn testuser client and the connection fails.
Is authorization essential? Using authentication I can assign ip addresses from Radius.
I also used the Framed-IP-Pool value without success.
What I'm missing?
Thanks in advance.

Hi Jatin,
Thanks for your quick reply. Here is the new configuration and the debugs. I'm using IOS c890-universalk9-mz.152-1.T.bin and Cisco VPN client 5.0.07.0290 version.
IOS Configuration with authorization and accounting enabled:
aaa new-model
aaa authentication login RemoteUsers group radius
aaa authorization network UsersGroup group radius
aaa accounting network default
aaa session-id common
IOS Debugs:
Jun  4 21:20:46.133: AAA/BIND(00000010): Bind i/f
Jun  4 21:20:46.149: AAA/AUTHOR (0x10): Pick method list 'UsersGroup'
Jun  4 21:20:46.153: RADIUS/ENCODE(00000010):Orig. component type = VPN IPSEC
Jun  4 21:20:46.153: RADIUS:  AAA Unsupported Attr: interface         [222] 11
Jun  4 21:20:46.153: RADIUS:   31 30 2E 31 34 2E 31 34 2E         [ 10.14.14.]
Jun  4 21:20:46.153: RADIUS(00000010): Config NAS IP: 0.0.0.0
Jun  4 21:20:46.153: RADIUS(00000010): Config NAS IPv6: ::
Jun  4 21:20:46.153: RADIUS/ENCODE(00000010): acct_session_id: 6
Jun  4 21:20:46.153: RADIUS(00000010): sending
Jun  4 21:20:46.153: RADIUS/ENCODE: Best Local IP-Address 10.14.14.30 for Radius-Server 10.14.14.17
Jun  4 21:20:46.153: RADIUS(00000010): Send Access-Request to 10.14.14.17:1812 id 1645/4, len 98
Jun  4 21:20:46.153: RADIUS:  authenticator 01 A1 34 BE 06 3D C2 C5 - 4F EE 98 D7 47 4D BF AB
Jun  4 21:20:46.153: RADIUS:  User-Name           [1]   10  "Users"
Jun  4 21:20:46.153: RADIUS:  User-Password       [2]   18  *
Jun  4 21:20:46.153: RADIUS:  Calling-Station-Id  [31]  13  "10.14.14.17"
Jun  4 21:20:46.153: RADIUS:  NAS-Port-Type       [61]  6   Virtual                   [5]
Jun  4 21:20:46.153: RADIUS:  NAS-Port            [5]   6   0
ruc#
Jun  4 21:20:46.153: RADIUS:  NAS-Port-Id         [87]  13  "10.14.14.30"
Jun  4 21:20:46.153: RADIUS:  Service-Type        [6]   6   Outbound                  [5]
Jun  4 21:20:46.153: RADIUS:  NAS-IP-Address      [4]   6   10.14.14.30
Jun  4 21:20:46.153: RADIUS(00000010): Sending a IPv4 Radius Packet
Jun  4 21:20:46.153: RADIUS(00000010): Started 5 sec timeout
ruc#
Jun  4 21:20:48.205: RADIUS: Received from id 1645/4 10.14.14.17:1812, Access-Reject, len 20
Jun  4 21:20:48.205: RADIUS:  authenticator 2A B6 91 42 DF 70 2B 89 - AF D5 59 82 31 3B EA 53
Jun  4 21:20:48.205: RADIUS(00000010): Received from id 1645/4
As you can see, the router authenticates automatically using the Users user configured under at the isakmp client configuration group. The VPN client software does not prompt for the real user account and fails. Why the router is not asking for the user? I was expecting the router performs authentication first and authorization later. Take a look at the FreeRadius debug:
FreeRadius debug:
Ready to process requests.
rad_recv: Access-Request packet from host 10.14.14.30:1645, id=4, length=98
        User-Name = "Users"
        User-Password = "cisco"  <--Where does this password comes from?!
        Calling-Station-Id = "10.14.14.17"
        NAS-Port-Type = Virtual
        NAS-Port = 0
        NAS-Port-Id = "10.14.14.30"
        Service-Type = Dialout-Framed-User
        NAS-IP-Address = 10.14.14.30
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 0
  modcall[authorize]: module "preprocess" returns ok for request 0
radius_xlat:  '../var/log/radius/radacct/10.14.14.30/auth-detail-20130604.log'
rlm_detail: ../var/log/radius/radacct/%{Client-IP-Address}/auth-detail-%Y%m%d.lo
g expands to ../var/log/radius/radacct/10.14.14.30/auth-detail-20130604.log
  modcall[authorize]: module "auth_log" returns ok for request 0
  modcall[authorize]: module "chap" returns noop for request 0
  modcall[authorize]: module "mschap" returns noop for request 0
    rlm_realm: No '@' in User-Name = "Users", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 0
  rlm_eap: No EAP-Message, not doing EAP
  modcall[authorize]: module "eap" returns noop for request 0
    users: Matched entry DEFAULT at line 188
  modcall[authorize]: module "files" returns ok for request 0
rlm_pap: WARNING! No "known good" password found for the user.  Authentication m
ay fail because of this.
  modcall[authorize]: module "pap" returns noop for request 0
modcall: leaving group authorize (returns ok) for request 0
  rad_check_password:  Found Auth-Type System
auth: type "System"
  ERROR: Unknown value specified for Auth-Type.  Cannot perform requested action
auth: Failed to validate the user.
Login incorrect: [Users/cisco] (from client vpnServer port 0 cli 10.14.14.17)
Delaying request 0 for 1 seconds
Finished request 0
Going to the next request
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Waking up in 1 seconds...
--- Walking the entire request list ---
Sending Access-Reject of id 4 to 10.14.14.30 port 1645
Waking up in 4 seconds...
--- Walking the entire request list ---
Cleaning up request 0 ID 4 with timestamp 51ae5a41
Nothing to do.  Sleeping until we see a request.
Any idea Jatin?

Similar Messages

  • Restrict selection from LDB 'DDF' based on FI Doc number(BELNR)?

    Hi all,
    I am trying to restrict selection from LDB 'DDF' based on FI Doc number(BELNR).
    Even if i pass only one document number in selection-screen, the program is still printing lot of documents?
    Where I am going wrong?
    *& Report  ZSUB_READ_LDB
    REPORT  ZSUB_READ_LDB.
    DATA wa_BSEG TYPE BSEG.
    SELECT-OPTIONS s_BELNR FOR wa_BSEG-BELNR.
    DATA: callback TYPE TABLE OF ldbcb,
    callback_wa LIKE LINE OF callback.
    DATA: seltab TYPE TABLE OF rsparams,
    seltab_wa LIKE LINE OF seltab.
    callback_wa-ldbnode = 'BSEG'.
    callback_wa-get = 'X'.
    callback_wa-get_late = 'X'.
    callback_wa-cb_prog = sy-repid.
    callback_wa-cb_form = 'CALLBACK_BSEG'.
    APPEND callback_wa TO callback.
    CLEAR callback_wa.
    seltab_wa-kind = 'S'.
    seltab_wa-selname = 'BELNR'.
    LOOP AT s_BELNR.
      MOVE-CORRESPONDING s_BELNR TO seltab_wa.
      APPEND seltab_wa TO seltab.
    ENDLOOP.
    CALL FUNCTION 'LDB_PROCESS'
      EXPORTING
        ldbname                     = 'DDF'
        variant                     = ' '
      TABLES
        callback                    = callback
        selections                  = seltab
      EXCEPTIONS
        ldb_not_reentrant           = 1
        ldb_incorrect               = 2
        ldb_already_running         = 3
        ldb_error                   = 4
        ldb_selections_error        = 5
        ldb_selections_not_accepted = 6
        variant_not_existent        = 7
        variant_obsolete            = 8
        variant_error               = 9
        free_selections_error       = 10
        callback_no_event           = 11
        callback_node_duplicate     = 12
        OTHERS                      = 13.
    IF sy-subrc ne 0.
      WRITE: 'Exception with SY-SUBRC', sy-subrc.
    ENDIF.
    *&      Form  CALLBACK_BSEG
          text
         -->NAME       text
         -->WA         text
         -->EVT        text
         -->CHECK      text
    FORM CALLBACK_BSEG USING name TYPE ldbn-ldbnode
    wa TYPE BSEG
    evt TYPE c
    check TYPE c.
      CASE evt.
        WHEN 'G'.
          WRITE: / wa-BELNR.
          ULINE.
        WHEN 'L'.
          ULINE.
      ENDCASE.
    ENDFORM.                    "CALLBACK_BSEG

    Hi Andreas,
    I have included bukrs and gjahr too...but if I input only one invoice number the report is printing a lot of invoices.
    Not sure from where the data is being picked up?
    Sorry of poor formatting of code.
    Thanks ,
    Subba
    *& Report  ZSUB_READ_LDB
    REPORT  ZSUB_READ_LDB.
    TYPE-POOLS: RSDS, RSFS.
    DATA wa_BSEG TYPE BSEG.
    SELECT-OPTIONS s_BELNR FOR wa_BSEG-BELNR.
    SELECT-OPTIONS s_BUKRS FOR wa_BSEG-BELNR.
    SELECT-OPTIONS s_GJAHR FOR wa_BSEG-BELNR.
    DATA: callback TYPE TABLE OF ldbcb,
    callback_wa LIKE LINE OF callback.
    DATA: seltab TYPE TABLE OF rsparams,
    seltab_wa LIKE LINE OF seltab.
    DATA: TEXPR TYPE RSDS_TEXPR,
    FSEL TYPE RSFS_FIELDS.
    start-of-selection.
      callback_wa-ldbnode = 'BSEG'.
      callback_wa-get = 'X'.
    callback_wa-get_late = 'X'.
      callback_wa-cb_prog = sy-repid.
      callback_wa-cb_form = 'CALLBACK_BSEG'.
      APPEND callback_wa TO callback.
      CLEAR callback_wa.
      seltab_wa-kind = 'S'.
      seltab_wa-selname = 'BELNR'.
    *seltab_wa-LOW =
      LOOP AT s_BELNR.
        MOVE-CORRESPONDING s_BELNR TO seltab_wa.
        APPEND seltab_wa TO seltab.
      ENDLOOP.
      seltab_wa-kind = 'S'.
      seltab_wa-selname = 'BUKRS'.
    *seltab_wa-LOW =
      LOOP AT s_BELNR.
        MOVE-CORRESPONDING s_BUKRS TO seltab_wa.
        APPEND seltab_wa TO seltab.
      ENDLOOP.
      seltab_wa-kind = 'S'.
      seltab_wa-selname = 'GJAHR'.
    *seltab_wa-LOW =
      LOOP AT s_BELNR.
        MOVE-CORRESPONDING s_GJAHR TO seltab_wa.
        APPEND seltab_wa TO seltab.
      ENDLOOP.
      CALL FUNCTION 'LDB_PROCESS'
        EXPORTING
          ldbname                     = 'DDF'
          variant                     = ' '
          EXPRESSIONS                 = TEXPR
          FIELD_SELECTION             = FSEL
        TABLES
          callback                    = callback
          selections                  = seltab
        EXCEPTIONS
          ldb_not_reentrant           = 1
          ldb_incorrect               = 2
          ldb_already_running         = 3
          ldb_error                   = 4
          ldb_selections_error        = 5
          ldb_selections_not_accepted = 6
          variant_not_existent        = 7
          variant_obsolete            = 8
          variant_error               = 9
          free_selections_error       = 10
          callback_no_event           = 11
          callback_node_duplicate     = 12
          OTHERS                      = 13.
      IF sy-subrc ne 0.
        WRITE: 'Exception with SY-SUBRC', sy-subrc.
      ENDIF.
    *&      Form  CALLBACK_BSEG
          text
         -->NAME       text
         -->WA         text
         -->EVT        text
         -->CHECK      text
    FORM CALLBACK_BSEG USING name TYPE ldbn-ldbnode
    wa TYPE BSEG
    evt TYPE c
    check TYPE c.
      CASE evt.
        WHEN 'G'.
          WRITE: / wa-BELNR.
          ULINE.
        WHEN 'L'.
          ULINE.
      ENDCASE.
    ENDFORM.                    "CALLBACK_BSEG

  • Pooling data from an XML file to another XML file using File Adapter

    Hi,
    I am trying to Pool data from an XML file to another XML file using File Adapter. I have added "Target Namespace" in both the XML and XSD.The problem is "At the destination given in the FileAdapter" only a blank XML file is created and it doesnot have any data.
    Kindly suggest me some methods
    Thanks in Advance.

    Ok here is a solution with external tables.
    SQL> CREATE DIRECTORY my_xml_dir AS 'E:\oracle\Log_files\UTL_AKIVATST'
    2 /
    Directory created.
    SQL> DROP TABLE my_xml_et
    2 /
    Table dropped.
    SQL> CREATE TABLE my_xml_et
    2 ( EMPNO NUMBER,
    3 EMPNAME VARCHAR2(10),
    4 JOB VARCHAR2(10),
    5 HIREDATE DATE,
    6 SAL NUMBER
    7 )
    8 ORGANIZATION EXTERNAL
    9 (
    10 TYPE ORACLE_LOADER
    11 DEFAULT DIRECTORY my_xml_dir
    12 ACCESS PARAMETERS
    13 (
    14 records delimited by "</EMP>"
    15 badfile my_xml_dir:'empxt%a_%p.bad'
    16 logfile my_xml_dir:'empxt%a_%p.log'
    17 FIELDS
    18 (
    19 filler char(2000) terminated by "<EMP>",
    20 EMPNO char(2000) enclosed by "<EMPNO>" and "</EMPNO>",
    21 EMPNAME char(2000) enclosed by "<ENAME>" and "</ENAME>",
    22 JOB char(2000) enclosed by "<JOB>" and "</JOB>",
    23 HIREDATE char(2000) enclosed by "<HIREDATE>" and "</HIREDATE>",
    24 SAL char(2000) enclosed by "<SAL>" and "</SAL>"
    25 )
    26 )
    27 LOCATION ('emp.xml')
    28 )
    29 PARALLEL
    30 REJECT LIMIT UNLIMITED
    31 /
    Table created.
    SQL> SELECT * FROM my_xml_et
    2 /
    EMPNO EMPNAME JOB HIREDATE SAL
    7369 SMITH CLERK 17-DEC-80 800
    7499 ALLEN SALESMAN 20-FEB-81 1600
    This is the XML file i used emp.xml
    <EMPLOYEES>
    <EMP>
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    </EMP>
    <EMP>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    </EMP>
    </EMPLOYEES>
    Use this external table to insert into your table.
    Thanks,
    Karthick.

  • ALV grid list  report when selected  from  selection screen

    Hi folks,
                I need to get ALV grid display in my list report when selected the interval values from  the selection screen. If I change the values in list of ALV grid it needs to be updated when I press UPDATE pushbutton. The output of list should be in ALV grid display.I need sorting ,flitering,totaling functionality in the list output.
    For example if I selected BUKRS = 100 and 200 in the selection screen ,I need to display the ALV grid list in below the selection screen as ALV grid display...
    Its urgent as  I am new to ALV grid functionality...
    Thanks in advance..

    hi raja,
    check with the folllowing code.
    REPORT zca0m_zca0fcstftop NO STANDARD PAGE HEADING
                                    MESSAGE-ID zcsv_usrtbl_maintain.
    Type pools                                                           *
    TYPE-POOLS : slis.                          " Used for ALV display
    Tables
    TABLES: zca0fcstftop,
            dd04t,                         "R/3 DD: Data element texts
            tactt.                         "Activities that can be protected
    internal tables
    DATA: BEGIN OF wa_zca0fcstftop .
            INCLUDE STRUCTURE zca0fcstftop.
    DATA: END OF wa_zca0fcstftop.
    DATA: t_zca0fcstftop LIKE STANDARD TABLE OF wa_zca0fcstftop.
    DATA: BEGIN OF i_fcode OCCURS 0,
            fcode LIKE sy-ucomm,
          END OF i_fcode.
    *Record for variant selection
    DATA : BEGIN OF ws_variant,
             selected TYPE c,
             variant  LIKE ltdx-variant,  "Variant name
             text     LIKE ltdxt-text,    "Variant description
           END OF ws_variant.
    *Table for variant selection
    data : itab_variant LIKE STANDARD TABLE OF ws_variant WITH HEADER LINE.
    Variant selection pop-up global variables
    DECLARATION OF TABLECONTROL 'VARIANT_CNTL' ITSELF
    CONTROLS: variant_cntl TYPE TABLEVIEW USING SCREEN 0200.
    LINES OF TABLECONTROL 'VARIANT_CNTL'
    DATA:     g_variant_cntl_lines  LIKE sy-loopc.
    DATA:grid1 TYPE REF TO  cl_gui_alv_grid ,
         g_custom_container TYPE REF TO cl_gui_custom_container.
    Work fields
    DATA: table_name LIKE dd02l-tabname,   "To store table name
          field_name LIKE dd03l-fieldname, "To Store Field Name
          act_auth LIKE tactz-actvt,       "To pass Activity ID
          tab_maint LIKE dd02l-tabname,    "To pass Table Name to be Maintd.
          wg_confirm_ind,                  "To trap User responses
          flag,                            "To trap changes made to an entry
          f_copy,                          "To Identify 'COPY' Command Use
          f_select,                        "To decide between Select-options
                                           " and Internal Table
          l_transaction_code LIKE tstc-tcode,
          v_langu LIKE sy-langu,
          v_repid LIKE sy-repid,
          s_variant TYPE disvariant.
    DATA: ok_code LIKE sy-ucomm.
    DATA:selected_rows TYPE lvc_t_row  ,
         sel_rows TYPE lvc_t_row WITH HEADER LINE.
    DATA:t_lines TYPE i.
    Constants                                                            *
    CONSTANTS :
               c_x TYPE c VALUE 'X',             " Constant 'X'.
               c_f TYPE c VALUE 'F'.             " Constant 'F'.
    Parameters and Selection Options
    *Selection Screen for table maintenance
    *Selection option for Plant
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-b01.
    PARAMETERS:  p_werks   LIKE zca0fcstftop-werks OBLIGATORY.
    SELECT-OPTIONS: s_prdfml  FOR zca0fcstftop-product_family,
                    s_bmach   FOR zca0fcstftop-base_machine,
                    s_factop FOR zca0fcstftop-factory_top,
                    s_optval  FOR zca0fcstftop-option_value,
                    s_week    FOR zca0fcstftop-week.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-b02.
    PARAMETERS     : p_varant LIKE ltdx-variant.          " ALV variant
    SELECTION-SCREEN END OF BLOCK block2.
    At selection screen                                                  *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varant.
      PERFORM alv_variant_f4 CHANGING p_varant.
    AT SELECTION-SCREEN ON p_werks .
    Validating Plant on the selection screen
      PERFORM validate_plant.
    Initialization
    INITIALIZATION.
    Check Authorization for the Transaction
    Authorization Check For T Code
      SELECT tcode
         INTO l_transaction_code
         FROM tstc UP TO 1 ROWS
         WHERE pgmna = sy-repid.
      ENDSELECT.
      AUTHORITY-CHECK OBJECT 'S_TCODE'
                          ID 'TCD' FIELD l_transaction_code.
      IF sy-subrc NE 0.
        MESSAGE e001 WITH l_transaction_code.
      ENDIF.
      v_langu = sy-langu.                             " language
      v_repid = sy-repid .                            " abap Program name
    Start Of Selection
    START-OF-SELECTION.
      CALL SCREEN 0050.
    *&      Form  validate_plant                                           *
          Validating Plant on the selection screen                       *
    FORM validate_plant .
      DATA : l_werks LIKE t001w-werks.                          " Plant
      IF p_werks IS NOT INITIAL.
        SELECT SINGLE werks
            FROM t001w
            INTO l_werks
            WHERE werks EQ p_werks.
        IF sy-subrc NE 0.
          MESSAGE e100(ra) WITH text-001 .
        ENDIF.
      ENDIF.
      AUTHORITY-CHECK OBJECT 'Z_PP_PLANT'
               ID 'ACTVT' FIELD '03'
               ID 'WERKS' FIELD p_werks
               ID 'TCD' FIELD l_transaction_code.
      IF sy-subrc NE 0.
        MESSAGE e000(oo) WITH 'No authorization for plant:'(e80) p_werks.
      ENDIF.
    ENDFORM.                    " validate_plant
    *&      Form  get_data                                                 *
          Get data                                                       *
    FORM get_data .
      SELECT * FROM zca0fcstftop
        INTO TABLE t_zca0fcstftop
        WHERE werks           = p_werks
          AND product_family IN s_prdfml
          AND base_machine   IN s_bmach
          AND factory_top    IN s_factop
          AND option_value   IN s_optval
          AND week           IN s_week.
    ENDFORM.                    " get_data
    *&      Form  fill_fcode
    FORM fill_fcode USING    value(p_0029).
      i_fcode-fcode = p_0029.
      APPEND i_fcode.
      CLEAR i_fcode.
    ENDFORM.                               " fill_fcode
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'UPDATE'.
      CLEAR flag.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    *&      Module  MODIFY_0100  OUTPUT
    MODULE modify_0100 OUTPUT.
      IF sy-ucomm = 'CHNG' OR
           sy-ucomm = 'PICK'.
        LOOP AT SCREEN.
          CHECK screen-group1 = 'CHG'.
          screen-required = '0'.
          screen-output   = '1'.
          screen-input    = '0'.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    Check if you are in create mode & if yes then set the screen elements
    as mandatory
      IF ok_code = 'CREA'.
        LOOP AT SCREEN.
          CHECK screen-group1 = 'CHG'.
          screen-required = '1'.
          screen-output   = '1'.
          screen-input    = '1'.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                             " MODIFY_0100  OUTPUT
    *&      Module  Check_Exit  INPUT
          text
    MODULE check_exit INPUT.
      IF ( sy-ucomm = 'BACK' OR sy-ucomm = 'CANC' OR sy-ucomm = 'EXIT' ) AND
           ( flag = 'Y' ).
        CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
          EXPORTING
            defaultoption  = 'Y'
            textline1      = text-008
            textline2      = text-009
            titel          = text-004
            cancel_display = ' '
          IMPORTING
            answer         = wg_confirm_ind.
        CASE wg_confirm_ind.
          WHEN 'J'.                                             "Yes
            sy-ucomm = 'SAVE'.
            CLEAR flag.
          WHEN 'N'.                                             "No
            sy-ucomm = 'BACK'.
            CLEAR flag.
        ENDCASE.
      ENDIF.
    ENDMODULE.                             " Check_Exit  INPUT
    *&      Module  Exit_0100  INPUT
          text
    MODULE exit_0100 INPUT.
      SET SCREEN 0. LEAVE SCREEN.
    ENDMODULE.                             " Exit_0100  INPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'SAVE'.                       "Save
        Check to see if the user has the appropriate authorization
          IF p_werks NE zca0fcstftop-werks.
          could not update - not in selection
            MESSAGE e000(oo) WITH 'Entry not within selection'.
            SET SCREEN 0. LEAVE SCREEN.
            PERFORM get_data.
          ENDIF.
          IF f_copy = 'X'.
            INSERT zca0fcstftop.
            IF sy-subrc = 0.
              MESSAGE s004.
              PERFORM initialize.
              SET SCREEN 0. LEAVE SCREEN.
              PERFORM get_data.
            ELSE.
              MESSAGE w005.
            ENDIF.
          ELSE.
            MODIFY zca0fcstftop.
            IF sy-subrc = 0.
              MESSAGE s004.
              PERFORM initialize.
              SET SCREEN 0. LEAVE SCREEN.
              PERFORM get_data.
            ELSE.
              MESSAGE w005.
            ENDIF.
          ENDIF.
          PERFORM get_data.
        WHEN 'BACK'.                       "Back
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'CANC'.                       "Cancel
          SET SCREEN 0. LEAVE SCREEN.
        WHEN OTHERS.
      ENDCASE.
      COMMIT WORK.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    *&      Form  Initialize
    FORM initialize.
      CLEAR :   table_name,
                field_name,
                wg_confirm_ind,
                f_copy,
                flag,
                t_zca0fcstftop,
                zca0fcstftop,
                wa_zca0fcstftop,
                i_fcode.
      REFRESH: t_zca0fcstftop.
    ENDFORM.                               " Initialize
    *&      Form  alv_variant_f4
          text
         <--P_VARIANT  text
    FORM alv_variant_f4  CHANGING variant.
      DATA: rs_variant LIKE disvariant.
      DATA nof4 TYPE c.
      CLEAR nof4.
      LOOP AT SCREEN.
        IF screen-name = 'VARIANT'.
          IF screen-input = 0.
            nof4 = 'X'.
          ENDIF.
        ENDIF.
      ENDLOOP.
      rs_variant-report   = sy-repid.
      rs_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = rs_variant
          i_save     = 'A'
        IMPORTING
          es_variant = rs_variant
        EXCEPTIONS
          OTHERS     = 1.
      IF sy-subrc = 0 AND nof4 EQ space.
        variant = rs_variant-variant.
      ENDIF.
    ENDFORM.                               " ALV_VARIANT_F4
    *&      Module  STATUS_0050  OUTPUT
          text
    MODULE status_0050 OUTPUT.
    In this module Initialize the container and put the grid in it
      DATA:grid_layout  TYPE lvc_s_layo,
           fieldcat TYPE lvc_t_fcat,
           wa_fieldcat LIKE LINE OF fieldcat.
      PERFORM set_auth.
      SET PF-STATUS 'UPD_0050' EXCLUDING i_fcode.
      SET TITLEBAR 'UPD_0050'.
      IF g_custom_container IS INITIAL .
        CREATE OBJECT g_custom_container
           EXPORTING
              container_name = 'FTDATA'.
        CREATE OBJECT grid1
           EXPORTING
            i_parent = g_custom_container.
      ELSE.
        CALL METHOD grid1->free.
        CALL METHOD g_custom_container->free.
        CREATE OBJECT g_custom_container
           EXPORTING
              container_name = 'FTDATA'.
        CREATE OBJECT grid1
           EXPORTING
            i_parent = g_custom_container.
      ENDIF.
    Every time refresh The variables
      PERFORM initialize.
      PERFORM get_data.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'ZCA0FCSTFTOP'
        CHANGING
          ct_fieldcat      = fieldcat.
      grid_layout-grid_title = text-t01.
      grid_layout-sel_mode = 'A'.
      grid_layout-stylefname = 'CT'.
      s_variant-report   = sy-repid.
      s_variant-username = sy-uname.
      s_variant-variant  = p_varant.
      CALL METHOD grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'ZCA0FCSTFTOP'
          is_layout        = grid_layout
          is_variant       = s_variant
          i_save           = 'A'
        CHANGING
          it_outtab        = t_zca0fcstftop
          it_fieldcatalog  = fieldcat.
      Create Object to receive events and link them to handler methods.
      When the ALV Control raises the event for the specified instance
      the corresponding method is automatically called.
    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->handle_button_click FOR grid1.
    ENDMODULE.                 " STATUS_0050  OUTPUT
    *&      Module  USER_COMMAND_0050  INPUT
    MODULE user_command_0050 INPUT.
      CALL METHOD grid1->get_selected_rows
        IMPORTING
          et_index_rows = selected_rows.
      DESCRIBE TABLE selected_rows LINES t_lines.
      IF t_lines > 1 .
        MESSAGE e048(zcsv_sfdr).
      ENDIF.
    Clear Header
      CLEAR wa_zca0fcstftop.
      sel_rows[] = selected_rows .
      READ TABLE sel_rows INDEX 1.
      READ TABLE t_zca0fcstftop INTO wa_zca0fcstftop INDEX sel_rows-index.
      CASE ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN 'CREA'.
          CLEAR zca0fcstftop.
          ok_code = sy-ucomm.
          zca0fcstftop-werks = p_werks.
          CALL SCREEN 100.
        WHEN 'COPY'.
          MOVE wa_zca0fcstftop TO zca0fcstftop .
          CLEAR wa_zca0fcstftop.
          f_copy = 'X'.
          CALL SCREEN 100.
        WHEN 'CHNG'.
          CHECK NOT wa_zca0fcstftop IS INITIAL.
          MOVE wa_zca0fcstftop TO zca0fcstftop .
          CLEAR wa_zca0fcstftop.
          ok_code = sy-ucomm.
          CALL SCREEN 100.
        WHEN 'DELE'.
          CHECK NOT wa_zca0fcstftop IS INITIAL.
          CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
            EXPORTING
              defaultoption  = 'N'
              textline1      = text-005
              textline2      = text-006
              titel          = text-007
              cancel_display = ' '
            IMPORTING
              answer         = wg_confirm_ind.
          IF wg_confirm_ind EQ 'J'.
            DELETE zca0fcstftop FROM wa_zca0fcstftop .
            IF sy-subrc EQ 0.
              MESSAGE s004.
            ELSE.
              MESSAGE e005.
            ENDIF.
          ELSEIF wg_confirm_ind EQ 'N'.
          ENDIF.
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                 " USER_COMMAND_0050  INPUT
    *&      Form  exit_program
    FORM exit_program .
      CALL METHOD g_custom_container->free.
      CALL METHOD cl_gui_cfw=>flush.
      SET SCREEN 0.
      LEAVE SCREEN.
    ENDFORM.                    " exit_program
    *&      Form  set_auth
    FORM set_auth.
      REFRESH: i_fcode.
    Check authorization for change
      MOVE '02' TO act_auth.        "02 --> Change
      MOVE 'ZCA0FCSTFTOP' TO tab_maint.
      AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
        ID 'ACTVT' FIELD act_auth
        ID 'TABLE' FIELD tab_maint.
      IF sy-subrc NE 0.
        PERFORM fill_fcode USING 'CHNG'.
      ENDIF.
    Check for authorization for create
      MOVE '01' TO act_auth.        "01 --> Create
      MOVE 'ZCA0FCSTFTOP' TO tab_maint.
      AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
        ID 'ACTVT' FIELD act_auth
        ID 'TABLE' FIELD tab_maint.
      IF sy-subrc NE 0.
        PERFORM fill_fcode USING 'CREA'.
        PERFORM fill_fcode USING 'COPY'.
      ENDIF.
    Check for authorization for delete
      MOVE '06' TO act_auth.        "06 --> Delete
      MOVE 'ZCA0FCSTFTOP' TO tab_maint.
      AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
        ID 'ACTVT' FIELD act_auth
        ID 'TABLE' FIELD tab_maint.
      IF sy-subrc NE 0.
        PERFORM fill_fcode USING 'DELE'.
      ENDIF.
    ENDFORM.                    " set_auth
    *&      Module  check_change  INPUT
    MODULE check_change INPUT.
      flag = 'Y'.
    ENDMODULE.                 " check_change  INPUT
    regards,
    vikas.
    plz reward if helpful

  • How to pass values to a module pool program from another Report Program

    Hi ..
    Please let me know how I can pass values to a MODULE POOL selection screen field from another Report Program.
    Thanks
    RK

    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/frameset.htm

  • Set an ip unnumbered from radius

    Hi all,
    I was reading a lot documentation and testing a lot of scenarios but i can not set template configuration from RADIUS…
    This it my configuration,
    aaa new-model
    aaa authentication login admin local
    aaa authentication ppp default local group radius
    aaa authorization template
    aaa authorization network default group radius local
    aaa accounting delay-start
    aaa accounting update newinfo
    aaa accounting network default start-stop group radius
    bba-group pppoe pruebavrf
    virtual-template 33
    sessions per-mac limit 48
    sessions per-vlan limit 1400
    interface Loopback10
    ip address 192.168.44.1 255.255.255.0
    interface FastEthernet0/0.8
    description PRUEBAS
    encapsulation dot1Q 8
    pppoe enable group pruebavrf
    interface Virtual-Template33
    no ip address
    no ip redirects
    no ip unreachables
    ip mtu 1480
    ip tcp adjust-mss 1400
    peer default ip address pool pool_local
    ppp authentication pap chap
    radius-server attribute 44 extend-with-addr
    radius-server attribute 8 include-in-access-req
    radius-server attribute nas-port format d
    radius-server configure-nas
    radius-server host X.X.X.X auth-port 1812 acct-port 1813 key xxxx
    radius-server retransmit 2
    radius-server timeout 6
    radius-server vsa send accounting
    radius-server vsa send authentication
    ip local pool pool_local x.x.x.x
    And this is RADIUS configuration
    testvdsl@knetip Auth-Type := local, User-Password == "xxxx"
    Service-Type = Framed-User,
    cisco-avpair += "template:ip-unnumbered=Loopback 10",
    Framed-Protocol = PPP
    I think that with this configuration virtual-access would be take the ip of Loopback 10 as unnumbered but doesn't work.
    Router#sh int Vi2.1
    Virtual-Access2.1 is up, line protocol is up
    Hardware is Virtual Access interface
    MTU 1492 bytes, BW 100000 Kbit/sec, DLY 100000 usec,
    reliability 255/255, txload 1/255, rxload 1/255
    Encapsulation PPP, LCP Open
    PPPoE vaccess, cloned from Virtual-Template33
    Vaccess status 0x0
    Keepalive set (10 sec)
    128 packets input, 1803 bytes
    128 packets output, 1799 bytes
    Last clearing of "show interface" counters never
    This is the RADIUS debug,
    .Nov 10 12:38:42: RADIUS(000E4E19): Send Access-Request to x.x.x.x:1812 id 1645/79, len 135
    .Nov 10 12:38:42: RADIUS: authenticator 3C 22 8C 1E AE 21 20 82 - B9 58 57 E3 16 6D C9 8B
    .Nov 10 12:38:42: RADIUS: Vendor, Cisco [26] 41
    .Nov 10 12:38:42: RADIUS: Cisco AVpair [1] 35 "client-mac-address=xxxx"
    .Nov 10 12:38:42: RADIUS: Framed-Protocol [7] 6 PPP [1]
    .Nov 10 12:38:42: RADIUS: User-Name [1] 17 "testvdsl@knetip"
    .Nov 10 12:38:42: RADIUS: User-Password [2] 18 *
    .Nov 10 12:38:42: RADIUS: NAS-Port-Type [61] 6 Ethernet [15]
    .Nov 10 12:38:42: RADIUS: NAS-Port [5] 6 8
    .Nov 10 12:38:42: RADIUS: NAS-Port-Id [87] 9 "0/0/0/8"
    .Nov 10 12:38:42: RADIUS: Service-Type [6] 6 Framed [2]
    .Nov 10 12:38:42: RADIUS: NAS-IP-Address [4] 6 x.x.x.x
    .Nov 10 12:38:42: RADIUS: Received from id 1645/79 x.x.x.x:1812, Access-Accept, len 74
    .Nov 10 12:38:42: RADIUS: authenticator E5 D8 63 D4 D5 EE EC C8 - F7 BB 4A B9 6A C8 60 F6
    .Nov 10 12:38:42: RADIUS: Service-Type [6] 6 Framed [2]
    .Nov 10 12:38:42: RADIUS: Vendor, Cisco [26] 42
    .Nov 10 12:38:42: RADIUS: Cisco AVpair [1] 36 "template:ip-unnumbered=Loopback 10"
    .Nov 10 12:38:42: RADIUS: Framed-Protocol [7] 6 PPP [1]
    .Nov 10 12:38:42: RADIUS(000E4E19): Received from id 1645/79
    Somebody can help me?
    Thank you in advance.

    Hi,
    I'll try to guide you through this though I'm not sure of all the words in English...Well you see, I had just the same problem as you and tried about evertyhing. And I hopes someone would give you tje answer but they didn't so I almost gave up when I suddenly solved the problem.
    What you do is this. Step by step. (On your mac-computer.) (Question-mark (?) means I'm not sure what the term is in Englis but I try to translate it word by word from Swedish)
    1. Open your "Finder"
    2. Click on "Programs"
    3. Open the map called "tool-programs?"
    4. Open the "Airport administration tools?" (It has the symbol of a roundshaped airport.)
    5. Click on Setup. (In the upper left corner there are four different buttons. The third says Setup)
    6. Enter the password for your basestation
    7. Click on Password (the fourth button in the upper left corner with a lock as a symbol)
    8. There you will have a HEX equivalent password (WEP-key) which you need for your PC.
    Then you just type in this password on your PC-computer and you will soon be able to use the internet via your airport and the airtunes as well.
    Good luck!
    /Emanuel

  • LNS to provide IP from Radius

    Hello:
    We currently use a 7301 router as an LNS and have it configured to use a local IP pool and dynamically assigns an IP address to connecting DSL modems.  We would like to start providing a static IP to a username that autheticates to a radius server. I was wondering what the LNS config should have to support receiving an IP address from the radius and not using the local pool on the router.  We want the LNS to take the IP address that radius would provide and send that to the dsl modem.
    If anyone could help with what config items are needed to support this I would appreciate it.  What we are seeing now is radius authenticates the user, sends the IP address in the FRAMED-IP but the LNS picks an IP address from the local pool and assigns it. Just wondering what we are missing here to make the 7301 assign the ip from radius.
    Thank you.
    aaa authentication ppp vpdn local group radius
    aaa authorization network vpdn group radius local
    aaa authorization configuration default group radius
    aaa accounting delay-start
    aaa accounting update periodic 5
    aaa accounting network default
    action-type start-stop
    group radius
    vpdn enable
    vpdn-group NAME-HERE
    ! Default L2TP VPDN group
    accept-dialin
      protocol l2tp
      virtual-template 1
    lcp renegotiation always
    l2tp tunnel password 7 XXXx
    l2tp tunnel framing capabilities all
    interface Virtual-Template1
    mtu 1492
    ip unnumbered Loopback0
    no ip redirects
    no ip unreachables
    no ip proxy-arp
    ip tcp adjust-mss 1392
    timeout absolute 1440 0
    peer default ip address pool dslpool
    ppp mtu adaptive
    ppp authentication pap vpdn
    ppp timeout idle 597600
    ip local pool dslpool x.x.x.x y.y.y.y

    Thank you for the suggestion.  I added debug radius and this is what was returned.  instead of the user getting the IP y.y.y.20 the next available IP in the DHCP local pool y.y.y.13 is assigned to the user instead. 
    Any other suggestions now that you are looking at ths output?
    Tor1-LNS1#test aaa group radius [email protected] password2 new-code
    User successfully authenticated
    Sep  3 01:57:59.682: AAA/AUTHEN/LOGIN (00000000): Pick method list 'default'
    Sep  3 01:57:59.682: RADIUS/ENCODE(00000000):Orig. component type = INVALID
    Sep  3 01:57:59.682: RADIUS/ENCODE(00000000): dropping service type, "radius-server attribute 6 on-for-login-auth" is off
    Sep  3 01:57:59.682: RADIUS(00000000): Config NAS IP: x.x.x.x
    Sep  3 01:57:59.682: RADIUS(00000000): sending
    Sep  3 01:57:59.682: RADIUS(00000000): Send Access-Request to x.x.x.x:1812 id 1645/49, len 65
    Sep  3 01:57:59.682: RADIUS:  authenticator 7E 70 CF 47 95 E5 89 1A - C3 10 3E 3E 18 9F 3B D2
    Sep  3 01:57:59.682: RADIUS:  User-Password       [2]   18  *
    Sep  3 01:57:59.682: RADIUS:  User-Name           [1]   21  "[email protected]"
    Sep  3 01:57:59.682: RADIUS:  NAS-IP-Address      [4]   6   y.y.y.y              
    Sep  3 01:57:59.710: RADIUS: Received from id 1645/49 x.x.x.x:1812, Access-Accept, len 68
    Sep  3 01:57:59.710: RADIUS:  authenticator AF CA 04 C3 A0 89 A5 69 - B7 33 6D A4 7E 56 B5 D9
    Sep  3 01:57:59.710: RADIUS:  Service-Type        [6]   6  
    Tor1-LNS1#Framed                    [2]
    Sep  3 01:57:59.710: RADIUS:  Idle-Timeout        [28]  6   86400                    
    Sep  3 01:57:59.710: RADIUS:  Framed-IP-Address   [8]   6   y.y.y.y.20             
    Sep  3 01:57:59.710: RADIUS:  Framed-IP-Netmask   [9]   6   255.255.255.255          
    Sep  3 01:57:59.710: RADIUS:  Framed-MTU          [12]  6   1500                     
    Sep  3 01:57:59.710: RADIUS:  Message-Authenticato[80]  18 
    Sep  3 01:57:59.710: RADIUS:   81 C4 3A 66 96 11 D3 E6 CF AD AF D2 A5 84 08 CA  [??:f????????????]
    Sep  3 01:57:59.710: RADIUS(00000000): Received from id 1645/49

  • Automatic tunnel group selection through radius on Cisco ASA

    Hi all. I try to let Cisco ASA automatic select a tunnel group for users, after user input username and password. I try to do this without user selection a connection profile on login page. Authentication on ASA<>ACS 5.3<>MS AD. How i can will do this? Radius attribute class=group_policy don't work.
    May be someone did expirience this?

    You can't select a tunnel-group from RADIUS. But you can assign the right group-policy for your user with the class-attribute. For that you need to have different group-policies configured on your ASA. Alternatively instead of assigning the group-policy you can assign the individual parameters like IP, VPN-filter and so on.
    Sent from Cisco Technical Support iPad App

  • Selecting from BKPF and BSEG

    Hi all,
    Can someone help me optimize the performance of this code as i don't know how else to select from BSEG as i cannot use a join coz its a cluster table. I need to find a way to improve the perfomance.Any help would be much appreciated.
    SELECT belnr gjahr bukrs budat stblg awkey blart
             FROM bkpf INTO CORRESPONDING FIELDS OF TABLE t_bkpf
             WHERE belnr IN s_belnr and
                   gjahr = p_gjahr  and
                   bukrs = p_bukrs.
      LOOP AT t_bkpf.
          SELECT belnr gjahr buzei ebeln ebelp
               wrbtr fipos geber fistl fkber
               augbl augdt shkzg
        INTO CORRESPONDING FIELDS OF table t_bseg
        FROM bseg
        WHERE belnr = t_bkpf-belnr
        AND   gjahr = t_bkpf-gjahr
        AND   bukrs = t_bkpf-bukrs.
    Thanks alot
    seema

    Hi Seema,
    You have to avoid the database retrival inside the loop.You can use for all entries.
    This is taken from a link.
    Some of the SAP tables are not transparant, but pooled or clustered. Be aware of this !
    There are a lot of limitations on how such tables can be accessed. You can not include such
    tables in database views and join constructs. The FI-GL table BSEG, which is one of our
    biggest PR1 tables, is an example of a clustered table. At the database-level, there is no table
    called BSEG, but instead RFBLG is being used for the BSEG data. Most of the fields known
    in BSEG are not known in the database table RFBLG, but are compressed in a VARDATA
    field of RFBLG. So tests in the WHERE clause of SELECTs agains BSEG are not used by
    the database (e.g. lifnr = vendor account number, hkont = G/L account, kostl = cost center).
    As a consequence, these tests are done after the facts similar to using the CHECK statement,
    and as already said in tip 1, CHECK statements are worse than tests in the WHERE-clause.
    Check this link also.
    How to Read BSEG Efficiently
    you'll never select table bkpf alone.
    alternatives:
    1) select with header information from bkpf
    2) use secondary index tables
    Re: Tuning cluster table selection
    3) use logical data base e.g.: BRF
    Hope this helps.If so,reward points.Otherwise, get back.

  • Selection from a Maintenance View

    Hi,
        I have to fetch data from a view, unfotunately that view is a mainteance view. Is there any other way to select/fetch data from that view in my report program ?
    Regards,
    Bharath Mohan B

    Hi
    U cannot access the data from maintanence view.
    Only projection and database view can be used in ABAP code.
    If u want to access the Data from more the one table , Create the DATABASE VIEW and use this view in ur program.
    For example : UR Database view name is Ztest
    in ur program
    table Ztest.
    select * from Ztest ***************
    *******************UR Business Logic
    <b>Reward if useful</b>

  • URGENT : select from table statement in ABAP OO

    Hi all,
    I am an absolute ABAP OO beginner and need some quick help from an expert. How can I make a selection from an existing table (eg MARA) in an BADI which is programmed according to ABAP OO principles.
    In the old ABAP school you could make a TABLES statement at the beginning and the do a SELECT¨* FROM but this does not work in ABAP OO.
    How should i define such simple selections from existing tables. Anyone ?
    Thanks a lot,
    Eric Hassenberg

    *define internal table
    data: i_mara like standard table of mara.
    *select to this table
    select * from mara into table i_mara.
    Also you have to define work area for this internal table in order to use it.
    data:w_mara like line of i_mara.

  • Select from v$sql_plan in a procedure

    Hi
    I''m attempting to save plans (from V$SQL_PLAN) into a table using a procedure in schema APPS, but keep getting missing table error,
    PL/SQL: ORA-00942: table or view does not existI then granted an explicit SELECT to APPS on the V$SQL_PLAN table from a schema with
    a DBA role, but still get the same error when compiling the procedure.
    SQL> create table gl_imp_post_plans as ( select * from v$sql_plan where rownum < 1);
    Table created.
    SQL> select count(*) from v$sql_plan;
      COUNT(*)
         13506
    SQL> create or replace procedure Ins_Plan_from_Dictionary as
      2 
      3    begin
      4      insert into GL_Imp_Post_Plans
      5      select  sqo.*
      6      from    v$sql_plan sqo
      7      where  (sqo.sql_id) not in (select distinct gipi.SQL_ID
      8                                  from   GL_Imp_Post_Plans gipi)
      9      and    (sqo.sql_id) in     (select distinct
    10                                         sqi.sql_id
    11                                  from   v$sql_plan sqi
    12                                  where  sqi.object_owner = 'APPS'
    13                                  and    sqi.object_name  in ('GL_BALANCES','GL_DAILY_BALANCES','GL_JE_LINES') );
    14      commit;
    15 
    16 
    17      exception
    18        when others then
    19          rollback;
    20  --        sysao_util.Message ('O', 'Error ' || sqlerrm);
    21 
    22  end Ins_Plan_from_Dictionary;
    23  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE INS_PLAN_FROM_DICTIONARY:
    LINE/COL ERROR
    4/5      PL/SQL: SQL Statement ignored
    11/40    PL/SQL: ORA-00942: table or view does not exist
    SQL>
    SQL> l 11
    11*                                 from   v$sql_plan sqiThe same error occurs when I attempt to select from GV$SQL_PLAN or DBA_HIST_SQL_PLAN.
    Could anybody suggest how I can persist the rows into a table using a procedure?
    thanks

    thanks, yes this works:
    create or replace procedure Ins_Plan_from_Dictionary as
      begin
        execute immediate 'begin
                            insert into GL_Imp_Post_Plans
                            select  sqo.*
                            from    v$sql_plan sqo
                            where  (sqo.sql_id) not in (select distinct gipi.SQL_ID
                                                        from   GL_Imp_Post_Plans gipi)
                            and    (sqo.sql_id) in     (select distinct
                                                               sqi.sql_id
                                                        from   v$sql_plan sqi
                                                        where  sqi.object_owner = ''APPS''
                                                        and    sqi.object_name  in (''GL_BALANCES'',''GL_DAILY_BALANCES'',''GL_JE_LINES'') );
                            commit;
                           end;';
        exception
          when others then
            rollback;
    --        sysao_util.Message ('O', 'Error ' || sqlerrm);
    end Ins_Plan_from_Dictionary;
    /

  • Can not select from v$mttr_target_advice

    Hello
    When i try to select from the view it never comes back and is a problem for the mmon process. Anyone have any ideas.

    Could you pleasse post the error message and the version you are using?
    Best Regards
    Krystian Zieja / mob

  • Can not select from my own MV. Please help.

    Hello Gurus,
    I have created a MV with following clauses
    CREATE or REPLACE MATERIALIZED VIEW "OWNER_NAME1"."MV_Name1"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH COMPLETE
    AS
    SELECT column1, column2 .... from table1,table2
    where .....
    I have logged in to DB with the 'owner_name1' schema itself which is the owner of the MV.
    But, when I try to select from the above MV. It gives error "Ora-00942 table or view does not exist"
    I can see the same under 'user_objects' view as an object of owner_name1 schema.
    Could you please help me in understanding where I have gone wrong?
    DB - Oracle 9i on unix platform.
    Thanks in advance!
    Abhijit.

    Oh! I missed to mention the exact steps followed by me which created error for me,
    viz.
    1) I have 2 Database and their users as follows
    bq. i) DB1 in local server - 'localUser'
    bq. ii) DB2 in remote server - 'RemoteUser1' and 'RemoteUser2'
    2) 'RemoteUser2' user in DB2 has 'select' privilage on table 'RemoteTable1' of 'RemoteUser1' ( both are remote DB's users ! )
    i.e. select * from RemoteUser1.RemoteTable1; --works okay when logged into RemoteUser2. no synonyms are created hence using schema_name.table_name convention.
    3) Logged in to 'localUser' in DB1.
    4) Created a DB link 'local_to_remote2' in 'localUser' schema ( in DB1) to 'RemoteUser2' schema (in DB2)
    i.e.
    create database link local_to_remote2 connect to RemoteUser2 identified by password using 'connection_string';
    DBLink was created successfully.
    5) I could select from the tables of 'RemoteUser2' using DB Link. (by logging in to 'localUser')
    i.e. select * from RemoteUser1.RemoteTable1@local_to_remote2 ; --- gives me expected output. no issues!
    6) Now, I created below MV in 'localUser' ( no need to tell in 'DB1' )
    the exact syntax I used is as follows,
    CREATE or REPLACE MATERIALIZED VIEW "localUser"."MV_Name1"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH COMPLETE
    AS
    SELECT column1, column2
    From RemoteUser1.RemoteTable1@local_to_remote2
    where condition1
    and condition2;
    The MV was created successfully, and I could see it as an 'Valid' object of 'localUser' schema.
    i.e. select * from user_objects where object_name ='MV_NAME1' and status ='VALID' --- tells that above create MV is an object of owner 'localUser'
    But, when I try to select from the said MV. it gives me error "Ora-00942 table or view does not exist"
    i.e. select * from MV_Name1; ---- neither this
    select * from localUser.MV_Name1; ---- nor this works :(
    Even when I try to drop the same MV it gives me same error. :(
    Could you please suggest me anything so that I will be able to select from MY OWN MV ?
    Please help Gurus.

  • Can not select from SAPTOOLS.DB6PMCF

    We use third-party tool to monitor our SAP systems. We receive an error
    Can not select from SAPTOOLS.DB6PMCF
    when we monitor DB2 database.
    Function DB6PMCF is registered in SAPSID schema. Can I register it also in SAPTOOLS schema? What is a correct procedure for this?

    Hi Milan,
    I think you have to issue the following command for the affected user.
    db2 "grant execute on function saptools.db6pmcf to <user>"
    regards, Javier Rocha

Maybe you are looking for

  • Business Objects / BODS Upgrade

    Hi Guys. We have an end to end Business Objects solution implemented in our environment consisting of BODS (XIR3), Business Objects (XIR3) and Crystal Reports (2008). We are planning to upgrade the BODS and Business Objects environments to the latest

  • Adf - decrypt the value from dbms_obfuscation_toolkit.md5

    Currently we store a string value in the DB using dbms_obfuscation_toolkit.md5(input_string=>'124'). How do I decrypt this value back so that I can display in the adf application please?

  • Transparent type in Illustrator CS4

    Hello all, I have an oval logo. The oval is filled with white. I want the point-type object over the logo to knock its letters thru the oval logo to transparency. How? Mike in Alexandria, VA

  • How to automatically scale images to screen resolution?

    Hello I need a bit of help automatically scaling my image to the viewers resolution. I have done so with a table and it works fine: <table width="100%" border="0">   <tr>     <td align="center" bgcolor="#66CCFF"><h1 style="font-size: 30px; text-align

  • Airport is flashing amber, but I can't fix it

    Hello all, My Airport Express, which I use in a WDS as a music relay, is flashing amber (which means that it can't connect) and whenever I try to access it using Airport Setup Assistant or Airport Admin Utility, it says that it can't connect or just