Bounds in ABAP HR

hai folks..
                  Can anybody tell me what is 'bounds' statement in abap-hr.
                  and also eloborate the function of provide and endprovide.
Regards
Sekhar.C

hi,
PROVIDE FIELDS {*|{comp1 comp2 ...}}
               FROM itab1 INTO wa1 VALID flag1
               BOUNDS intliml1 AND intlimu1
               [WHERE log_exp1]
        FIELDS {*|{comp1 comp2 ...}}
               FROM itab2 INTO wa2 VALID flag2
               BOUNDS intliml2 AND intlimu2
               [WHERE log_exp2]
        BETWEEN extliml AND extlimu
        [INCLUDING GAPS].
ENDPROVIDE.
To be able to process internal tables using PROVIDE, all tables itab1 itab2 ... must be fully typed index tables and contain two special columns that have the same data type (d, i, n, or t) for all relevant tables. For every table you must specify the names intliml1 intliml2 ... and intlimu1 intlimu2 ... of these columns using the addition BOUNDS.
The columns intliml1 intliml2 ... and intlimu1 intlimu2 ... in every row of the relevant internal tables must contain values that can be interpreted as limits of closed intervals. Within a table, the intervals specified in these columns must not overlap and must be sorted in ascending order. The intervals therefore make up a unique key for every row.
Regards,
Arjun.

Similar Messages

  • ABAP/4 error during dynamic assign beyond program bounds

    Hi experts,
    after an Upgrade from 4.7 to Ecc 6.0, launching transaction AC03 an error (green light) occours "ABAP/4 error during dynamic assign beyond program bounds".
    Is there anyone who find a solution?
    regards
    andrea brescia
    Edited by: andrea brescia on Nov 30, 2010 1:42 PM

    Dear Andrea,
    The problem should be caused by obsolete entry in table TFAWX.
    Please use the following report for deleting this entry (test before in your TEST System) :
    report ztfawx_delete.
    tables tfawx.
    select single * from tfawx where prog = 'SAPLBAS0'
                                and bldgr = '0110'
                                and mnum  = 23
                                and bfeld = '$GENERAL'.
    if sy-subrc = 0.
      delete tfawx.
    endif.
    Buona Giornata
    Mauro

  • Regarding Bounds Statement in ABAP HR

    Hi Guys!!!!
    I have been trying to work on provide, end provide in an HR program and then when I went into f1 of the statement I found an simple provide,end provide which I am pasting here:
    PROVIDE FIELDS col3 FROM itab1 INTO wa1
                                   VALID flag1
                                   BOUNDS col1 AND col2
            FIELDS col3 FROM itab2 INTO wa2
                                   VALID flag2
                                   BOUNDS col1 AND col2
            BETWEEN 2 AND 14.
    Now, I am really not able to understand the meaning of BOUNDS here, What does it actually do?? Could someone please explain. I searched in SCN and could not find any apt reply actually.
    Regards,
    Vishwa.

    hi,
    PROVIDE FIELDS {*|{comp1 comp2 ...}}
                   FROM itab1 INTO wa1 VALID flag1
                   BOUNDS intliml1 AND intlimu1
                   [WHERE log_exp1]
            FIELDS {*|{comp1 comp2 ...}}
                   FROM itab2 INTO wa2 VALID flag2
                   BOUNDS intliml2 AND intlimu2
                   [WHERE log_exp2]
            BETWEEN extliml AND extlimu
            [INCLUDING GAPS].
    ENDPROVIDE.
    To be able to process internal tables using PROVIDE, all tables itab1 itab2 ... must be fully typed index tables and contain two special columns that have the same data type (d, i, n, or t) for all relevant tables. For every table you must specify the names intliml1 intliml2 ... and intlimu1 intlimu2 ... of these columns using the addition BOUNDS.
    The columns intliml1 intliml2 ... and intlimu1 intlimu2 ... in every row of the relevant internal tables must contain values that can be interpreted as limits of closed intervals. Within a table, the intervals specified in these columns must not overlap and must be sorted in ascending order. The intervals therefore make up a unique key for every row.
    Regards,
    Arjun.

  • HR ABAP dump - CX_SY_PROVIDE_TABLE_NOT_SORTED

    Hello Experts,
    I'm executing a custom program and getting the following dump
    CX_SY_PROVIDE_TABLE_NOT_SORTED
    this is the code:
      sort lt_0147_results by perf_result_begda.
      sort lt_mbo_results by perf_result_begda.
    ok - now have two tables that we can compare!
    this is the line where the dump is generated.  --->provide fields * from lt_0147_results
                                                                                    into ls_0147 valid l_0147_valid
                                                                                    bounds perf_result_begda and perf_result_endda
                                                                                    fields * from lt_mbo_results
                                                                                    into ls_mbo valid l_mbo_valid
                                                                                    bounds perf_result_begda and perf_result_endda
                                                                                    between c_lowdate and endda.
    Do you know why I'm getting this dump?
    Thank you in advance

    This is what SAP  says:
    CX_SY_PROVIDE_TABLE_NOT_SORTED
    Cause: One of the involved tables is not sorted in ascending order by the intervals within extlim1 and extlim2.
    Reason?
    [provide fields|http://help.sap.com/abapdocu_70/en/ABAPPROVIDE.htm]
    The columns intliml1 intliml2 ... and intlimu1 intlimu2 ... in every row of the relevant internal tables must contain values that can be interpreted as limits of closed intervals. Within a table, the intervals specified in these columns must not overlap and must be sorted in ascending order by the primary table index. The intervals therefore make up a unique key for every row.
    The ABAP runtime environment checks for every table involved, whether the condition of sorted and non-overlapping intervals is met within the interval made up by extliml and extlimu and, if necessary, triggers an exception that can be handled.
    Regards
    Marcin

  • ABAP webDynpro MS Office component usage throws -  Access via 'NULL' object

    I am trying to include MS office word in my custom ABAP webDynro application based on the sample SAP Package SIOS for all the MS office component usage. <br>
    In WDMODIFY method  , when the courser is reaching the point to call office component  it throws a Null pointer exception. Not sure , if i am missing some thing here or skip a step. Please advice. <br>
    get the IOS interface <br>
      wd_this->factory ?= office->_method_handler. <br>
    Below is the code for WDMODIFY <br>
    method WDDOMODIFYVIEW . <br>
    DATA: <br>
        office TYPE REF TO cl_wd_view_element, <br>
        office_res TYPE REF TO cl_wd_view_element,<br>
        mime_repository TYPE REF TO if_mr_api,<br>
        content TYPE xstring, <br>
        url TYPE string VALUE <br>
    '/SAP/BC/WebDynpro/SAP/PUblic/BC/ssr/uuielibs/office_integration' & <br>
    '/iostest_fields.doc'. <br>
      DATA refexp TYPE REF TO cx_ios_exception.
      DATA: msgid TYPE syst-msgid,
         msgnr TYPE syst-msgno,
         msgty TYPE syst-msgty.
      get message manager
      DATA: l_current_controller TYPE REF TO if_wd_controller,
            l_message_manager    TYPE REF TO if_wd_message_manager.
      DATA envproxy TYPE REF TO if_ios_environment.
    just do it once
      CHECK first_time = abap_true.
      mime_repository = cl_mime_repository_api=>get_api( ).
      CALL METHOD mime_repository->get
        EXPORTING
          i_url     = url
        IMPORTING
          e_content = content.
      wd_context->set_attribute( name = 'DATAS' value = content ).
    get the office control
      office ?= view->get_element( 'GENERIC_OFFICE' ).
      ASSERT ID sios_demo CONDITION  office IS BOUND.
    not possible : Missing bugfix component bc-wd-aba
    office_res ?= view->get_element( 'RESULT_DOCUMENT' ).
    ASSERT ID sios_demo CONDITION  office IS BOUND.
    get the IOS interface
      wd_this->factory ?= office->_method_handler.
      ASSERT ID sios_demo CONDITION wd_this->factory IS BOUND.
    wd_this->factory_res ?= office_res->_method_handler.
    ASSERT ID sios_demo CONDITION wd_this->factory_res IS BOUND.
      TRY.
          wd_this->factory->get_wordprocessing_proxy(
             IMPORTING proxy = wd_this->document  ).
          ASSERT ID sios_demo CONDITION wd_this->document IS BOUND.
         wd_this->factory_res->get_wordprocessing_proxy(
            IMPORTING proxy = wd_this->document_res  ).
         ASSERT ID sios_demo CONDITION wd_this->document IS BOUND.
    *calling    setfields
          DATA co_error_info_getfields TYPE REF TO if_wd_context_element.
          DATA co_error_info_getfields_stru TYPE wdr_ext_attribute_pointer.
          co_error_info_getfields = wd_context->get_lead_selection( ).
          co_error_info_getfields_stru-attribute_name =
    'error_info_getfields'.
          co_error_info_getfields_stru-element = co_error_info_getfields.
          DATA fields TYPE if_ios_wordprocessing=>fields_type.
          DATA fieldstable TYPE if_ios_wordprocessing=>fields_type_table.
          DATA co_fieldcontent TYPE REF TO if_wd_context_element.
          DATA co_fieldcontent_stru TYPE wdr_ext_attribute_pointer.
          DATA inputfield1 TYPE xstring.
          DATA tabulator TYPE xstring.
          DATA endofline TYPE xstring.
          DATA: conv TYPE REF TO cl_abap_conv_out_ce.
          DATA: testfielddata TYPE string.
          testfielddata = 'SAPTEST'.
          conv = cl_abap_conv_out_ce=>create( encoding = '4110'
    ignore_cerr = abap_true ).
          CALL METHOD conv->convert( EXPORTING data = 'field1'
                                           IMPORTING buffer =
    fields-fieldidentifier  ).
          CALL METHOD conv->convert( EXPORTING data = testfielddata
                                           IMPORTING buffer = fields-value
          CALL METHOD conv->convert( EXPORTING data =
    cl_abap_char_utilities=>horizontal_tab
                                           IMPORTING buffer = tabulator  ).
          CALL METHOD conv->convert( EXPORTING data =
    cl_abap_char_utilities=>cr_lf
                                           IMPORTING buffer = endofline  ).
          wd_context->set_attribute( name = 'inputfield1'
                                     value = testfielddata ).
          APPEND fields TO fieldstable.
          wd_context->set_attribute( name = 'fieldcontent' value =
    fieldstable ).
          co_fieldcontent = wd_context->get_lead_selection( ).
          co_fieldcontent_stru-attribute_name = 'fieldcontent'.
          co_fieldcontent_stru-element = co_fieldcontent.
    document is set through datasource!
          wd_this->document->setfields( EXPORTING fieldsptr =
    co_fieldcontent_stru
                                                  tabulator = tabulator
                                                  endofline = endofline
                                                  errorinformation =
    co_error_info_getfields_stru ).
    *calling    opening result document
          DATA co_error_getcontent TYPE REF TO if_wd_context_element.
          DATA co_error_getcontent_stru TYPE wdr_ext_attribute_pointer.
          co_error_getcontent = wd_context->get_lead_selection( ).
          co_error_getcontent_stru-attribute_name = 'error_getcontent'.
          co_error_getcontent_stru-element = co_error_getcontent.
          DATA co_createdcontent TYPE REF TO if_wd_context_element.
          DATA co_createdcontent_stru TYPE wdr_ext_attribute_pointer.
          co_createdcontent = wd_context->get_lead_selection( ).
          co_createdcontent_stru-attribute_name = 'createdcontent'.
          co_createdcontent_stru-element = co_createdcontent.
    waiting of ACF Patch!
         wd_this->document->getcontent( errorinformation =
    *co_error_getcontent_stru
         contentpointer_result =  co_createdcontent_stru ).
    *calling    reopening template
          DATA error_opendocument TYPE REF TO if_wd_context_element.
          DATA error_opendocument_stru TYPE wdr_ext_attribute_pointer.
          error_opendocument = wd_context->get_lead_selection( ).
          error_opendocument_stru-attribute_name = 'error_opendocument'.
          error_opendocument_stru-element = error_opendocument.
         wd_this->document_res->if_ios_document~opendocument( EXPORTING errorinformation = error_opendocument_stru ).
        CATCH cx_ios_document INTO refexp.
        CATCH cx_ios_communicationwrapper INTO refexp.
        CATCH cx_ios_factory INTO refexp.
        CATCH cx_ios_environment INTO refexp.
        CATCH cx_ios_exception INTO refexp.
      ENDTRY.
      IF refexp IS NOT INITIAL.
        refexp->get_message( IMPORTING
                  mtype = msgty
                  number = msgnr
                  mid = msgid ).
        l_current_controller ?= wd_this->wd_get_api( ).
        CALL METHOD l_current_controller->get_message_manager
          RECEIVING
            message_manager = l_message_manager.
      report message
        CALL METHOD l_message_manager->report_t100_message
          EXPORTING
            msgid = msgid
            msgno = msgnr
            msgty = msgty.
      ENDIF.
    endmethod.
    Edited by: suryajoshi on Jan 13, 2011 5:04 PM

    Thanks for your reply.
    I have defined DATAS attribute  as XSTRING.  You are right i am using SIOS code from WDMODIFY.
    I am getting exception at this line:  Please advice. Its seems that factory is not been recognize. I double check , factory is present in attributes Tabs of the View.
    get the IOS interface
      wd_this->factory ?= office->_method_handler.
      ASSERT ID sios_demo CONDITION wd_this->factory IS BOUND.

  • Error while installing NW7.3 ABAP for DB2 on z/OS Install DB CLI driver

    Dear Experts,
    i'm installing for the first time NW7.3 ABAP for DB2 on z/OS with AIX application server. Central Services was installed succesfull but next step Install Database on AIX stoped with error (establishConn.log):
    db2radm (release: "720", patch level: "000", version: "Jan 14 2012") begin:28.02.2012 10:54:39
    This is db2radm release: "720", patch level: "120", version: "Jan 14 2012".
    This is db2radm setting up DB2 Connect.
    Message file is /sapmnt/tmp/sapinst_instdir/NW73/INSTALL/NW73/DB2/HA/PI/DB/establishConn.log.
    db2radm called as: /usr/sap/DW8/SYS/exe/uc/rs6000_64/db2radm -m db2i -P 456 -L DW8DDF -S DW88 -H s10d1 -u SAPADM -p ******** -W primary_only -l /sapmnt/tmp/sapinst_instdir/NW73/INSTALL/NW73/DB2/HA/PI/DB/establishConn.log
    Adjusting environment
      dbs_db2_ssid=DW88
      SAPDBHOST=s10d1
      dbs_db2_user=SAPADM
      dbs_db2_schema=SAPADM
      dbs_db2_schema8=1
      dbs_db2_pw=********
    Checking environment
      DB host    = s10d1
      SSID       = DW88
      SAPSYSTEMNAME = DW8
    DB2Trc:    000000 CLI_ALLOC_ENV 1
    connect.ini file used: 'connect.ini.for.db2radm'
    Fail over connection list of this application server:
    NAME       = DW88_on_s10d1             
    USER       = SAPADM                    
    PASSWORD   = <***>                     
    SCHEMA     = SAPADM                    
    PS         = SAP0907U                  
    LOCATION   = DW8DDF                    
    SSID       = DW88                      
    HOST       = s10d1                     
    PORT       = 456                       
    RETRY_CNT  = 3                         
    SLEEP_TIME = 0                         
    DB2Trc: trace level of dbdb2cli set to 1
    COLLECTION ID used is "SAP0907U"
    DB2 Call 'SQLDriverConnectW' Warning: SQLCODE = 8007 : [IBM][CLI Driver][DB2] SQL8007W  There are "90" day(s) left in the evaluation period for the product "DB2 Connect". For evaluation license terms and conditions, refer to the License Agreement document located in the license directory in the installation path of this product. If you have licensed this product, ensure the license key is properly registered. You can register the license via the License Center or db2licm command line utility. The license key can be obtained from your licensed product CD.  SQL
    use lib_dbsl for DB2 version V9.
    Callback functions for dynamic profile parameter registered
    DbSl library successfully loaded.
    WARNING: schema with 8 bytes length allowed; shadow upgrate will not work
    dbs/db2/use_accounting != 1 -> DB2 accounting is switched off
    dbs/db2/use_drda_lob_handling != 1 -> SAP LOB handling is used
    dbs/db2/chaining = 20 -> CLI CHAIN optimization is switched on
    dbs/db2/opt2_hint = 1 -> implicit 'optimize for 1 rows' hint is switched off
    SQL DRIVER VERSION is "09.07.0003"
    DB2Connect driver identified as THIN CLIENT
    Now I'm connected to DW88_on_s10d1
    DB2 DBMS version 09.01.0005
    DB2 LOCATION name DW8DDF
    (HYB): Info: Using OLD dbsl support.
    DB2 connect shared library loaded successfully.
    09.07.0003DB2Connect driver identified as THIN CLIENT
    WARNING: schema with 8 bytes length allowed; shadow upgrate will not work
    dbs/db2/use_accounting != 1 -> DB2 accounting is switched off
    dbs/db2/use_drda_lob_handling != 1 -> SAP LOB handling is used
    dbs/db2/chaining = 20 -> CLI CHAIN optimization is switched on
    dbs/db2/opt2_hint = 1 -> implicit 'optimize for 1 rows' hint is switched off
    DBSLHA: Got Failover profile /usr/sap/DW8/SYS/global/connect.ini
    DBSLHA: Using new Failover Support
    DBSLHA: Using user(  SAPADM) and password(<pwd>) from profile.
    DBSLHA:
    DBSLHA:Connection List
    DBSLHA:
    DBSLHA:NAME      |HOST      |SSID|COLLECTION  |PLAN    |PORT             |SCHEMA  |OWNER   |LOCATION  |RETRY|SLEEP|                                                                               
    DBSLHA:--|||||||||-|---|                                                                               
    DBSLHA:DW88_on_s1|s10d1     |DW88|SAP<DB2Conne|        |                 |SAPADM  |SAPADM  |DW8DDF    |00003|00000|                                                                               
    DBSLHA:--|||||||||-|---|                                                                               
    GetHaProfile: GetHaProfile: found 1 connections in connection profile.
    GetHaProfile: found section DW88_on_s10d1, ssid DW88, port 456, location DW8DDF, host s10d1  in connection profile
    connection profile /usr/sap/DW8/SYS/global/connect.ini opened.
    >>>>>> dump of connection profile
    ADDED 20120228 103331 by DB2RADM RELEASE 720 PATHLEVEL 000
      [DEFAULT_GROUP]
      CON1=DW88_on_s10d1
      [DW88_on_s10d1]
      SSID=DW88
      HOST=s10d1
      PORT=456
      LOCATION=DW8DDF
    <<<<<< end of dump of connection profile
    ssid DW88 found in connection profile, section DW88_on_s10d1.
    >>> analyse line:  * ADDED 20120228 103331 by DB2RADM RELEASE 720 PATHLEVEL 000
    >>> analyse line:  [DEFAULT_GROUP]
    >>> analyse line:  CON1=DW88_on_s10d1
    >>> analyse line: 
    >>> analyse line:  [DW88_on_s10d1]
    section DW88_on_s10d1 found.
    >>> analyse line:  SSID=DW88
    >>> analyse line:  HOST=s10d1
    >>> analyse line:  PORT=456
    >>> analyse line:  LOCATION=DW8DDF
    >>> analyse line:  section DW88_on_s10d1 found and data matches.
    backup connection profile /usr/sap/DW8/SYS/global/connect.ini .
    switch connection profile /usr/sap/DW8/SYS/global/connect.ini .
    check for adapted connection profile.
    WARNING: schema with 8 bytes length allowed; shadow upgrate will not work
    dbs/db2/use_accounting != 1 -> DB2 accounting is switched off
    dbs/db2/use_drda_lob_handling != 1 -> SAP LOB handling is used
    dbs/db2/chaining = 20 -> CLI CHAIN optimization is switched on
    dbs/db2/opt2_hint = 1 -> implicit 'optimize for 1 rows' hint is switched off
    DBSLHA: Got Failover profile /usr/sap/DW8/SYS/global/connect.ini
    DBSLHA: Using new Failover Support
    DBSLHA: Using user(  SAPADM) and password(<pwd>) from profile.
    DBSLHA:
    DBSLHA:Connection List
    DBSLHA:
    DBSLHA:NAME      |HOST      |SSID|COLLECTION  |PLAN    |PORT             |SCHEMA  |OWNER   |LOCATION  |RETRY|SLEEP|                                                                               
    DBSLHA:--|||||||||-|---|                                                                               
    DBSLHA:DW88_on_s1|s10d1     |DW88|SAP<DB2Conne|        |                 |SAPADM  |SAPADM  |DW8DDF    |00003|00000|                                                                               
    DBSLHA:--|||||||||-|---|                                                                               
    GetHaProfile: GetHaProfile: found 1 connections in connection profile.
    GetHaProfile: found section DW88_on_s10d1, ssid DW88, port 456, location DW8DDF, host s10d1  in connection profile
    ssid DW88 found in connection profile, section DW88_on_s10d1.
    check for adapted connection profile passed.
    WARNING: schema with 8 bytes length allowed; shadow upgrate will not work
    dbs/db2/use_accounting != 1 -> DB2 accounting is switched off
    dbs/db2/use_drda_lob_handling != 1 -> SAP LOB handling is used
    dbs/db2/chaining = 20 -> CLI CHAIN optimization is switched on
    dbs/db2/opt2_hint = 1 -> implicit 'optimize for 1 rows' hint is switched off
    DBSLHA: Got Failover profile /usr/sap/DW8/SYS/global/connect.ini
    DBSLHA: Using new Failover Support
    DBSLHA: Using user(  SAPADM) and password(<pwd>) from profile.
    DBSLHA:
    DBSLHA:Connection List
    DBSLHA:
    DBSLHA:NAME      |HOST      |SSID|COLLECTION  |PLAN    |PORT             |SCHEMA  |OWNER   |LOCATION  |RETRY|SLEEP|                                                                               
    DBSLHA:--|||||||||-|---|                                                                               
    DBSLHA:DW88_on_s1|s10d1     |DW88|SAP<DB2Conne|        |                 |SAPADM  |SAPADM  |DW8DDF    |00003|00000|                                                                               
    DBSLHA:--|||||||||-|---|                                                                               
    GetHaProfile: GetHaProfile: found 1 connections in connection profile.
    GetHaProfile: found section DW88_on_s10d1, ssid DW88, port 456, location DW8DDF, host s10d1  in connection profile
    WARNING: schema with 8 bytes length allowed; shadow upgrate will not work
    dbs/db2/use_accounting != 1 -> DB2 accounting is switched off
    dbs/db2/use_drda_lob_handling != 1 -> SAP LOB handling is used
    dbs/db2/chaining = 20 -> CLI CHAIN optimization is switched on
    dbs/db2/opt2_hint = 1 -> implicit 'optimize for 1 rows' hint is switched off
    DBSLHA: Got Failover profile /usr/sap/DW8/SYS/global/connect.ini
    DBSLHA: Using new Failover Support
    DBSLHA: Using user(  SAPADM) and password(<pwd>) from profile.
    DBSLHA:
    DBSLHA:Connection List
    DBSLHA:
    DBSLHA:NAME      |HOST      |SSID|COLLECTION  |PLAN    |PORT             |SCHEMA  |OWNER   |LOCATION  |RETRY|SLEEP|                                                                               
    DBSLHA:--|||||||||-|---|                                                                               
    DBSLHA:DW88_on_s1|s10d1     |DW88|SAP<DB2Conne|        |                 |SAPADM  |SAPADM  |DW8DDF    |00003|00000|                                                                               
    DBSLHA:--|||||||||-|---|                                                                               
    SQL DRIVER VERSION is "09.07.0003"
    DB2Connect driver identified as THIN CLIENT
    DB2Trc: 00 000000 cli_get_cli_driver_bld_level 1 s101006
    SQL DRIVER NAME is "libdb2.a"
    SQL DBMS NAME is "DB2"
    SQL DBMS VERSION is "09.01.0005"
    DATABASE NAME(DB2 Connect DCS database name) is "DW8DDF"
    The bind is skipped since collection for ssid DW88 is already bound.
    To force the bind, use option "-B force".
    DB2TRC: 0000000000 00      000000   CLI_DISCONNECT
    DB2TRC: 0000000000 00      000000   CLI_FREE_DBC 1
    DB2TRC: 0000000000 00      000000   CLI_FREE_ENV 1
    DB VERSION is 09.01.0005.
    Starting Grants .
    DB2Trc:    000000 CLI_ALLOC_ENV 1
    COLLECTION ID used is "SAP0907U"
    DB2 Call 'SQLDriverConnectW' Warning: SQLCODE = 8007 : [IBM][CLI Driver][DB2] SQL8007W  There are "90" day(s) left in the evaluation period for the product "DB2 Connect". For evaluation license terms and conditions, refer to the License Agreement document located in the license directory in the installation path of this product. If you have licensed this product, ensure the license key is properly registered. You can register the license via the License Center or db2licm command line utility. The license key can be obtained from your licensed product CD.  SQL
    Connecting to <DW88_on_s10d1> on connection 0 ...
    Now I'm connected to DB2 (09.01.5)
    SQL DRIVER NAME is "libdb2.a"
    SQL DBMS NAME is "DB2"
    SQL DBMS VERSION is "09.01.0005"
    DATABASE NAME(DB2 Connect DCS database name) is "DW8DDF"
    New functions of DB2 V9 are switched on
    Profile parameter dbs/db2/cli_trace_dir is not set
    dbdb2dic.c 1709 INFO    Profile: SDB2_DEBUG=<UNSET>                                                                           
    dbdb2dic.c 1733 INFO    Envrmnt: sdb2_debug=<UNSET>                                                                           
    dbdb2dic.c 1733 INFO    Envrmnt: SDB2_DEBUG=<UNSET>                                                                           
    DB2 Call 'CLI_EXECUTE' Error: sqlcode = -204 : [IBM][CLI Driver][DB2] SQL0204N  "SAPADM.#LOBU" is an undefined name.  SQLSTATE=42704
    dbdb2dic.c 2251 INFO    rc=103,sqlcode=-204: ExeRead                                                                          
    dbdb2dic.c 1709 INFO    Profile: dbs/db2/max_retry=<UNSET>                                                                    
    dbdb2dic.c 1733 INFO    Envrmnt: DB2_MAX_RETRY=<UNSET>                                                                        
    dbdb2dic.c 1709 INFO    Profile: dbs/db2/retry_on_924=<UNSET>                                                                 
    dbdb2dic.c 1733 INFO    Envrmnt: DB2_RETRY_ON_924=<UNSET>                                                                     
    dbdb2dic.c 1709 INFO    Profile: dbs/db2/no_retry_on_10=<UNSET>                                                               
    dbdb2dic.c 1733 INFO    Envrmnt: dbs_db2_no_retry_on_10=<UNSET>                                                               
    dbdb2dic.c 1733 INFO    Envrmnt: DBS_DB2_NO_RETRY_ON_10=<UNSET>                                                               
    DB2 Call 'SQLEndTran' Error: sqlstate = 08003 : [IBM][CLI Driver] CLI0106E  Connection is closed. SQLSTATE=08003
    [dbdb2dic.c  1873:rc=99: COMMIT WORK failed]
    dbdb2dic.c 1873 ERROR   rc=99: COMMIT WORK failed                                                                             
    [dbdb2dic.c  2019:rc=99,sqlcode=268435455: ExecDDL failed (DB error)]
    dbdb2dic.c 2019 ERROR   rc=99,sqlcode=268435455: ExecDDL failed (DB error)                                                    
    DB2 Call 'SQLEndTran' Error: SQLCODE = -99999 : [IBM][CLI Driver] CLI0106E  Connection is closed. SQLSTATE=08003
    ROLLBACK failed with SQL error '-99999'
    ERROR: couldn't connect to DB
    rc = 99
    error message returned by DbSl:
    rc=99,sqlcode=268435455: ExecDDL failed (DB error)
    DB2RADM EXITCODE: 12
    db2radm finished (0012)
    db2radm stop:28.02.2012 10:54:39
    i've patched db2radm and sapinst to the latest version.
    May be i should manually create "SAPADM.#LOBU"?
    Please help to solve these issue.
    Best regards,
    Alexander V

    Hi ,
    Please check if Note 1581637 - Installing a System with DB2CODEPAGE other than the default is useful.
    Award points if useful.
    Thanks,
    Ravi

  • Runtime error while opeinig window in Web Dynport- ABAP

    Hello,
    We are having a strange scenario in abap web Dynpro. we are using POWL and users are getting run time error while opening a pop up window for enter some information with the message "nstance of the view W_POP_UP already exists in component". The issue is, this run time error is giving for only users. We tried to debug the issue in their system as well but it is giving run time error with "Debugging_impossible". We alredy tried by clearing the widow instance, but o luck
    Could you please help me out in this situation, its really critical and also I did browse before posting this thread, but no use.
    Appreciate your <priority normalized by moderator> response......
    Regards,
    Kumar
    Edited by: Vinod Kumar on Jul 25, 2011 12:11 PM

    Hi Lakshman,
    From the above, I think you are creating an instance of a view. But this instance is already available.
    Check your code where this error is occurring while calling lo_window_manager->create_window( ) method?
    if so check for the initialness of the view 'W_POP_UP' before this method.
    if W_POP_UP is not bound.
        W_POP_UP = lo_window_manager->create_window( ).
    endif.
    Regards,
    Ravi

  • Issue regarding access of ABAP related services from portal

    Dear All,
    We need your input in the following issue:
    Scenerio:
    we have implemented ess 1.2 on ep7.0
    here we have gone for "Enhanced Package 2" for TRAVEL for client requirements so Travel Services are ABAP WEBDYNPRO instead of Standard JAVA WEBDYNPRO and we have 2 transaction iviews on portal.
    Now when an end user clicks on travel services, the request is forwaded to ABAP WAS. So, we need to maintain two entries in DNS: 1. Portal url, 2. ABAP WAS
    Now the client doesnot want to maintain ABAP WAS entry in their dns. BUT if they do not maintain this than end users are not able to access ABAP related services...
    Can you please suggest any possible solution for this issue.
    Thanks & Regards,
    JJ

    Hi,
    Per SAP Note 1040325, it says "It is not possible if there is another component between the browser and the message server (for example, a portal)." In your case a firewall between the portal and WAS. So a direct connection between the client and the WAS system is required which is a security risk. The section below gives more detail on why this is the case/
    The following is a excerpt from the Portal "Network and Communication Security" guide:-
    Please note that the requirement for direct access between the client and the backend is well flagged in the documentation. For instance, please refer to the Portal Security Guide, specifically the section "Network and Communication Security" (http://help.sap.com/saphelp_nw04s/helpdata/en/b9/c892f1ffc34156883ddd24aec01253/frameset.htm):
    'Neither the portal nor the AS Java provides a proxy function. [...] If you have set up a network architecture with one or more firewalls, and your portal integrates iViews that initiate client-backend communication, you must set up access for the client through the firewalls to the application server in the back end.'
    So the only secure solution is to install a webdispatcher in your DMZ and forward the requests from the (5) Portal to the (6) webdispatcher as in the graphic below :-
    ........................................./-> (3) Webdisp -\....................../-> (5) Portal
    (1) Client (IE) -> (2) Firewall |.........................|-> (4) Firewall |
    .........................................\-> (6) Webdisp -/......................\-> (7) WAS
    The original requests bound for the (5) Portal are relayed via the (3) webdisp1 as you can only have one webdisp connecting to one backend SAP system (Portal OR WAS).
    Hope this helps.
    Michael

  • "Implicit" Binding in ABAP OO?: the ALV method grid- check_changed_data

    In this thread here:
    Where/how would you add the actual DB update to BCALV_EDIT_03?
    Uwe Schieferstein was kind enough to show that anyone can see the effect or outcome of the ALV check_changed_data method if they just add this code to the PAI of the SAP demo program BCALV_EDIT_03:
    MODULE pai INPUT.
      TRANSLATE ok_code TO UPPER CASE.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN 'SAVE'.
          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
            EXPORTING
              I_STRUCTURE_NAME                  = 'SFLIGHT'
              I_GRID_TITLE                      =
                  'Before CHECK_DATA_CHANGED -> changes not yet retrieved'
            TABLES
              t_outtab                          = gt_outtab
            EXCEPTIONS
              OTHERS                            = 99.
          g_grid->check_changed_data( ).
          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
            EXPORTING
              I_STRUCTURE_NAME                  = 'SFLIGHT'
              I_GRID_TITLE                      =
                  'After CHECK_DATA_CHANGED -> changes retrieved'
            TABLES
              t_outtab                          = gt_outtab
            EXCEPTIONS
              OTHERS                            = 99.
          PERFORM save_data.
        WHEN OTHERS.
    *     do nothing
      ENDCASE.
    ENDMODULE.                    "pai INPUT
    When looking at this code, the following question occurred to me:
    <b>Question: How does check_changed_data know the itab to bring the changed back to, since it is called in the PAI with no arguments.</b>
    The only answer I can see is that when the grid is first loaded in the PBO of BCALV_EDIT_03 in the usual way:
      if g_custom_container is initial.
        perform create_and_init_alv changing gt_outtab
                                             gt_fieldcat
                                             gs_layout.
      endif.
    the ABAP OO engine implicitly "binds" the back-end table gt_outtab to the ALV contol (i.e. the instance of CL_GUI_ALV_GRID that the program creates.)
    So, if you answer this question, please do one of two things:
    a) confirm that check_changed_data "knows" the correct itab to bring the data back to because the ABAP OO engine has, in fact, implicitly "bound" the control to the itab gt_outtab;
    or
    b) if this is not true, explain how check_changed_data knows what itab to bring the data back to.
    Thanks very much in advance for whatever time anyone can afford to spend on this question.
    djh

    Hello David
    I have modified my previous sample report again to +demonstrate +that the
    grid instance knows exactly which itab is displayed. Unfortunately it is already a few years ago when I attended the excellent SAP course BC412 (Dialog Programming using EnjoyControls, held by a chinese SAP employee with a beautiful Palatine dialect). Thus, I +cannot explain +the technical details (which are somehow related to the automation queue and the control framework). 
    Here are the new modifications:
    (1) Inbetween the data definitions and the local class definition I have added two parameters:
    DATA: gt_outtab TYPE TABLE OF sflight.
    PARAMETERS:
      p_byref    RADIOBUTTON GROUP rad1,  " pass itab by reference
      p_byval    RADIOBUTTON GROUP rad1.  " pass itab by value
    * LOCAL CLASS Definition
    (2) The parameters are evaluated in PBO module PBO:
    *       MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF g_custom_container IS INITIAL.
        IF ( p_byval = 'X' ).
          PERFORM create_and_init_alv_byval
                               CHANGING gt_outtab
                                        gt_fieldcat
                                        gs_layout.
        ELSE.  " ( p_byref = 'X' ).
          PERFORM create_and_init_alv CHANGING gt_outtab
                                               gt_fieldcat
                                               gs_layout.
        ENDIF.
      ENDIF.
    ENDMODULE.                    "pbo OUTPUT
    (3) And here is the difference between the two routines:
    *&      Form  create_and_init_alv_byval
    *       text
    *      <--P_GT_OUTTAB  text
    *      <--P_GT_FIELDCAT  text
    *      <--P_GS_LAYOUT  text
    FORM create_and_init_alv_byval
                      CHANGING
                            value(pt_outtab)  LIKE gt_outtab[]  " by value
                            pt_fieldcat TYPE lvc_t_fcat
                            ps_layout TYPE lvc_s_layo.
      PERFORM create_and_init_alv CHANGING pt_outtab
                                           pt_fieldcat
                                           ps_layout.
    ENDFORM.                    " create_and_init_alv_byval
    *&      Form  CREATE_AND_INIT_ALV
    *       text
    *      <--P_GT_OUTTAB  text
    *      <--P_GT_FIELDCAT  text
    *      <--P_GS_LAYOUT  text
    FORM create_and_init_alv
                      CHANGING
                            pt_outtab  LIKE gt_outtab[]  " by reference
                            pt_fieldcat TYPE lvc_t_fcat
                            ps_layout TYPE lvc_s_layo.
      DATA: lt_exclude TYPE ui_functions.
    Now the crucial point is that the globally visible itab gt_outtab is passed
    (a) by value to method g_grid->set_table_for_first_display (routine CREATE_AND_INIT_ALV_BYVAL)
    (b) by reference to method g_grid->set_table_for_first_display (routine CREATE_AND_INIT_ALV_BYVAL)
    If you run the report with the default (p_byref = 'X') then the report behave exactly like the original sample report.
    However, if you choose p_byval = 'X' then the reports dumps as soon as you try to change the values of the ALV list (e.g. change a planetype and hit ENTER or even sorting is sufficient).
    Why? The itab passed by value to the grid instance is not the same like gt_outtab!
    Conclusion: Do not try to fool the grid instance...
    Regards
      Uwe
    PS: The entire coding of the adjusted sample reports is shown below:
    report ZUS_SDN_BCALV_EDIT_03_SAVE_1.
    **PROGRAM bcalv_edit_03.
    * Purpose:
    * ~~~~~~~~
    * In this example the user may change values of fields
    * SEATSOCC (occupied seats) and/or PLANETYPE. The report checks
    * the input value(s) semantically and provides protocol
    * messages in case of error.
    * To check program behavior
    * ~~~~~~~~~~~~~~~~~~~~~~~~~
    * Change values of the column "occupied seats" or "Planetype" or
    * both (in the same line). Try to provocate errors.
    * Click on the check symbol or press return to initiate checking.
    * (ALV also checks input before any functions like sorting,
    * filtering or doubleclick are processed. These functions are
    * only active if the input does not contain any errors).
    * The ALV Grid Control first checks if the input is correct
    * according to DDIC-Information (Type, lenght). Then semantic
    * checks are made by the application using event handler method
    * HANDLE_DATA_CHANGED.
    * Essential steps (search for '§')
    * ~~~~~~~~~~~~~~~
    * 1.Set status of columns PLANETYPE and SEATSOCC to editable.
    * 2.Optionally restrict generic functions to 'change only'.
    *   (The user shall not be able to add new lines).
    * 3.Optionally register ENTER to raise event DATA_CHANGED.
    *   (Per default the user may check data by using the check icon).
    * 4.Define and implement event handler to handle event DATA_CHANGED.
    * 5.Loop over table MT_GOOD_CELLS to check all values that are
    *   valid due to checks according to information of the DDIC.
    * 6.Within a check cycle:
    * 6a.Get new cell value to check it using method GET_CELL_VALUE.
    *    (In this case SEATSOCC).
    * 6b.If the value is valid you may want to change values of
    *    other cells.
    * 6c.If the value is not valid create an protocol entry in
    *    the application log.
    * 6d.To access old values (which where not changed in this check cycle)
    *    use your output table GT_OUTTAB.
    * 7.Display application log if an error has occured.
    DATA: ok_code LIKE sy-ucomm,
          save_ok LIKE sy-ucomm,
          g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
          g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          gs_layout TYPE lvc_s_layo,
          g_max TYPE i VALUE 100.
    * local class to handle semantic checks
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    DATA: g_event_receiver TYPE REF TO lcl_event_receiver.
    DATA: gt_outtab TYPE TABLE OF sflight.
    PARAMETERS:
      p_byref    RADIOBUTTON GROUP rad1,  " pass itab by reference
      p_byval    RADIOBUTTON GROUP rad1.  " pass itab by value
    * LOCAL CLASS Definition
    *§4.Define and implement event handler to handle event DATA_CHANGED.
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
    * This flag is set if any error occured in one of the
    * following methods:
        DATA: error_in_data TYPE c  READ-ONLY.
        METHODS:
          handle_data_changed
             FOR EVENT data_changed OF cl_gui_alv_grid
                 IMPORTING er_data_changed.
      PRIVATE SECTION.
    *** This flag is set if any error occured in one of the
    *** following methods:
    **    DATA: error_in_data TYPE c.
    * Methods to modularize event handler method HANDLE_DATA_CHANGED:
        METHODS: check_planetype
         IMPORTING
            ps_good_planetype TYPE lvc_s_modi
            pr_data_changed TYPE REF TO cl_alv_changed_data_protocol.
        METHODS: ch_new_plane_v_new_seatsocc
               IMPORTING
                  psg_plane TYPE lvc_s_modi
                  psg_socc TYPE lvc_s_modi
                  ps_saplane TYPE saplane
                  pr_data_changed TYPE REF TO cl_alv_changed_data_protocol.
        METHODS: ch_new_plane_v_old_seatsocc
               IMPORTING
                  psg_plane TYPE lvc_s_modi
                  ps_saplane TYPE saplane
                  pr_data_changed TYPE REF TO cl_alv_changed_data_protocol.
        METHODS: check_seatsocc
               IMPORTING
                  ps_good TYPE lvc_s_modi
                  pr_data_changed TYPE REF TO cl_alv_changed_data_protocol.
    * This is a suggestion how you could comment your checks in each method:
    * CHECK: fieldname(old/new value) !<comp> fieldname(old/new value)
    * IF NOT: (What to tell the user is wrong about the input)
    * Remarks:
    *  fieldname:       fieldname of table for the corresponding column
    *  (old/new value): ckeck with value of GT_OUTTAB or MT_GOOD_CELLS.
    *  !<comp>        : the value is valid if the condition <comp> holds.
    * Example:
    *  CHECK seatsocc(new) !>= seatsmax(old)
    *  IF NOT: There are not enough number of seats according to this
    *          planetype.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_data_changed.
        DATA: ls_good TYPE lvc_s_modi.
        error_in_data = space.
    * semantic checks
    * Identify columns which were changed and check input
    * against output table gt_outtab or other new input values of one row.
    * Table er_data_changed->mt_good_cells holds all cells that
    * are valid according to checks against their DDIC data.
    * No matter in which order the input was made this table is
    * ordered by rows (row_id). For each row, the entries are
    * sorted by columns according to their order in the fieldcatalog
    * (not the defined order using field COL_POS but the order
    * given by the position of the record in the fieldcatalog).
    * The order is relevant if new inputs in several columns of
    * the same row are dependent. In this example,
    * method 'ch_new_plane_v_new_seatsocc' needs only to be called
    * once since we know that the corresponding check is already done
    * when checking column PLANETYPE (see also method 'check_seatsocc').
    *§5.Loop over table MT_GOOD_CELLS to check all values that are
    *   valid due to checks according to information of the DDIC.
        LOOP AT er_data_changed->mt_good_cells INTO ls_good.
          CASE ls_good-fieldname.
    * check if column PLANETYPE of this row was changed
            WHEN 'PLANETYPE'.
              CALL METHOD check_planetype
                EXPORTING
                  ps_good_planetype = ls_good
                  pr_data_changed   = er_data_changed.
    * check if column SEATSOCC of this row was changed
            WHEN 'SEATSOCC'.
              CALL METHOD check_seatsocc
                EXPORTING
                  ps_good         = ls_good
                  pr_data_changed = er_data_changed.
          ENDCASE.
        ENDLOOP.
    *§7.Display application log if an error has occured.
        IF error_in_data EQ 'X'.
          CALL METHOD er_data_changed->display_protocol.
        ENDIF.
      ENDMETHOD.                    "handle_data_changed
      METHOD check_planetype.
    * Overview of checks according to field PLANETYPE
    * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    * a) Does the Planetype exists? (check against check table SAPLANE)
    * b) Are the number of seats (SEATSMAX) of the new planetype
    *    sufficient to fullfill requested bookings (SEATSOCC)?
    *    b1) SEATSOCC (occupied seats) also changed within
    *        this check cycle.
    *    b2) SEATSOCC has not changed within this cycle.
        DATA: l_planetype TYPE s_planetye,
              ls_saplane TYPE saplane,
              ls_good_seatsocc TYPE lvc_s_modi.
    * Get new cell value to check it.
    * (In this case: PLANETYPE).
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING
            i_row_id    = ps_good_planetype-row_id
            i_fieldname = ps_good_planetype-fieldname
          IMPORTING
            e_value     = l_planetype.
    * existence check: Does the plane exists?
        SELECT SINGLE * FROM saplane INTO ls_saplane WHERE
                                         planetype = l_planetype.
        IF sy-subrc NE 0.
    * In case of error, create a protocol entry in the application log.
    * Possible values for message type ('i_msgty'):
    *    'A': Abort (Stop sign)
    *    'E': Error (red LED)
    *    'W': Warning (yellow LED)
    *    'I': Information (green LED)
          CALL METHOD pr_data_changed->add_protocol_entry
            EXPORTING
              i_msgid     = '0K'
              i_msgno     = '000'
              i_msgty     = 'E'
              i_msgv1     = text-m03           "Flugzeugtyp
              i_msgv2     = l_planetype
              i_msgv3     = text-m05           "exitstiert nicht
              i_fieldname = ps_good_planetype-fieldname
              i_row_id    = ps_good_planetype-row_id.
          error_in_data = 'X'.
          EXIT. "plane does not exit, so we're finished here!
        ENDIF.
    * Check if other relevant fields of this row have been changed, too.
        READ TABLE pr_data_changed->mt_good_cells INTO ls_good_seatsocc
                           WITH KEY row_id    = ps_good_planetype-row_id
                                    fieldname = 'SEATSOCC'.
        IF sy-subrc = 0.
          CALL METHOD ch_new_plane_v_new_seatsocc
            EXPORTING
              psg_plane       = ps_good_planetype
              psg_socc        = ls_good_seatsocc
              ps_saplane      = ls_saplane
              pr_data_changed = pr_data_changed.
        ELSE.
          CALL METHOD ch_new_plane_v_old_seatsocc
            EXPORTING
              psg_plane       = ps_good_planetype
              ps_saplane      = ls_saplane
              pr_data_changed = pr_data_changed.
        ENDIF.
      ENDMETHOD.                           " CHECK_PLANETYPE
      METHOD ch_new_plane_v_new_seatsocc.
        DATA: l_seatsocc TYPE s_seatsocc.
    *§5a.Get new cell value to check it using method GET_CELL_VALUE.
    * (In this case SEATSOCC).
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING
            i_row_id    = psg_socc-row_id
            i_fieldname = psg_socc-fieldname
          IMPORTING
            e_value     = l_seatsocc.
    * CHECK:  SEATSMAX(of new planetype) !>= SEATSOCC(new value)
    * IF NOT: Message for wrong planetype
        IF ps_saplane-seatsmax GE l_seatsocc.
    *§5b.If the value is valid you may want to change values of
    *    other cells.
          CALL METHOD pr_data_changed->modify_cell
            EXPORTING
              i_row_id    = psg_plane-row_id
              i_fieldname = 'SEATSMAX'
              i_value     = ps_saplane-seatsmax.
        ELSE.
    *§5c.If the value is not valid create an protocol entry in
    *    the application log.
    * Possible values for message type ('i_msgty'):
    *    'A': Abort (Stop sign)
    *    'E': Error (red LED)
    *    'W': Warning (yellow LED)
    *    'I': Information (green LED)
          CALL METHOD pr_data_changed->add_protocol_entry
            EXPORTING
              i_msgid     = '0K'
              i_msgno     = '000'
              i_msgty     = 'E'
              i_msgv1     = text-m03               "Flugzeugtyp
              i_msgv2     = ps_saplane-planetype
              i_msgv3     = text-m04             "hat nicht genug Sitzplätze
              i_fieldname = psg_plane-fieldname
              i_row_id    = psg_plane-row_id.
          error_in_data = 'X'.
        ENDIF.
      ENDMETHOD.                    "ch_new_plane_v_new_seatsocc
      METHOD ch_new_plane_v_old_seatsocc.
        DATA: l_old_seatsocc TYPE s_seatsocc,
              ls_outtab TYPE sflight.
    *§5d.To access old values (which where not changed in this check cycle)
    *    use your output table GT_OUTTAB.
        READ TABLE gt_outtab INTO ls_outtab INDEX psg_plane-row_id.
        l_old_seatsocc = ls_outtab-seatsocc.
    * CHECK:  SEATSMAX(of new planetype) !>= SEATSOCC(old value)
    * IF NOT: Message for wrong planetype
        IF ps_saplane-seatsmax GE l_old_seatsocc.
    * ok->field seatsmax can be changed
          CALL METHOD pr_data_changed->modify_cell
            EXPORTING
              i_row_id    = psg_plane-row_id
              i_fieldname = 'SEATSMAX'
              i_value     = ps_saplane-seatsmax.
        ELSE.
          CALL METHOD pr_data_changed->add_protocol_entry
            EXPORTING
              i_msgid     = '0K'
              i_msgno     = '000'
              i_msgty     = 'E'
              i_msgv1     = text-m03                "Flugzeugtyp
              i_msgv2     = ps_saplane-planetype
              i_msgv3     = text-m04             "hat nicht genug Sitzplätze
              i_fieldname = psg_plane-fieldname
              i_row_id    = psg_plane-row_id.
          error_in_data = 'X'.
        ENDIF.
      ENDMETHOD.                    "ch_new_plane_v_old_seatsocc
    *&      Form  CHECK_SEATSOCC
    *       text
    *      -->P_LS_GOOD  text
    *      -->P_ER_DATA_CHANGED  text
      METHOD check_seatsocc.
        DATA: l_seatsocc TYPE s_seatsocc,
              l_old_seatsmax TYPE s_seatsmax,
              ls_outtab TYPE sflight,
              ls_good TYPE lvc_s_modi.
    * Check if the planetype has changed, too.
        READ TABLE pr_data_changed->mt_good_cells INTO ls_good
                           WITH KEY row_id    = ps_good-row_id
                                    fieldname = 'PLANETYPE'.
        IF sy-subrc EQ 0.
    * remark: the check
    *   seatsocc (new value) <= seatsmax (new value)
    * was already handled by form 'ch_new_plane_v_new_seatsocc'.
    * so we are finished here.
          EXIT.
        ENDIF.
    * CHECK: seatsocc (new value) <= seatsmax (old value)
    * IF NOT: Message that SEATSOCC is to high.
    * get new cell value of SEATSOCC.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING
            i_row_id    = ps_good-row_id
            i_fieldname = ps_good-fieldname
          IMPORTING
            e_value     = l_seatsocc.
    * get old cell value of SEATSMAX
        READ TABLE gt_outtab INTO ls_outtab INDEX ps_good-row_id.
        l_old_seatsmax = ls_outtab-seatsmax.
        IF l_seatsocc > l_old_seatsmax.
          CALL METHOD pr_data_changed->add_protocol_entry
            EXPORTING
              i_msgid     = '0K'
              i_msgno     = '000'
              i_msgty     = 'E'
              i_msgv1     = text-m01  "Die Anzahl der belegten Plätze
              i_msgv2     = text-m02 "übersteigt die Kapazität des Flugzeugs
              i_msgv3     = ls_outtab-planetype
              i_fieldname = ps_good-fieldname
              i_row_id    = ps_good-row_id.
          error_in_data = 'X'.
        ENDIF.
      ENDMETHOD.                           " CHECK_SEATSOCC
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    *       MAIN                                                          *
    END-OF-SELECTION.
      CALL SCREEN 100.
    *       MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF g_custom_container IS INITIAL.
        IF ( p_byval = 'X' ).
          PERFORM create_and_init_alv_byval
                               CHANGING gt_outtab
                                        gt_fieldcat
                                        gs_layout.
        ELSE.  " ( p_byref = 'X' ).
          PERFORM create_and_init_alv CHANGING gt_outtab
                                               gt_fieldcat
                                               gs_layout.
        ENDIF.
      ENDIF.
    ENDMODULE.                    "pbo OUTPUT
    *       MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      TRANSLATE ok_code TO UPPER CASE.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN 'SAVE'.
          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
            EXPORTING
              i_structure_name                  = 'SFLIGHT'
              i_grid_title                      =
                  'Before CHECK_DATA_CHANGED -> changes not yet retrieved'
            TABLES
              t_outtab                          = gt_outtab
            EXCEPTIONS
              OTHERS                            = 99.
          g_grid->check_changed_data( ).
          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
            EXPORTING
              i_structure_name                  = 'SFLIGHT'
              i_grid_title                      =
                  'After CHECK_DATA_CHANGED -> changes retrieved'
            TABLES
              t_outtab                          = gt_outtab
            EXCEPTIONS
              OTHERS                            = 99.
          PERFORM save_data.
        WHEN OTHERS.
    *     do nothing
      ENDCASE.
    ENDMODULE.                    "pai INPUT
    *&      Form  SAVE_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM save_data .
      IF ( g_event_receiver->error_in_data = 'X' ).
        MESSAGE 'Error in data -> saving not possible' TYPE 'S'.
      ELSE.
        MESSAGE 'Data saved' TYPE 'S'.  " simulates DB update
      ENDIF.
    ENDFORM.                    " SAVE_DATA
    *       FORM EXIT_PROGRAM                                             *
    FORM exit_program.
      LEAVE PROGRAM.
    ENDFORM.                    "exit_program
    *&      Form  BUILD_FIELDCAT
    *       text
    *      <--P_GT_FIELDCAT  text
    FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'SFLIGHT'
        CHANGING
          ct_fieldcat      = pt_fieldcat.
      LOOP AT pt_fieldcat INTO ls_fcat.
        IF    ls_fcat-fieldname EQ 'PLANETYPE'
           OR ls_fcat-fieldname EQ 'SEATSOCC'.
    *§1.Set status of columns PLANETYPE and SEATSOCC to editable.
          ls_fcat-edit = 'X'.
    * Field 'checktable' is set to avoid shortdumps that are caused
    * by inconsistend data in check tables. You may comment this out
    * when the test data of the flight model is consistent in your system.
          ls_fcat-checktable = '!'.  "do not check foreign keys
          MODIFY pt_fieldcat FROM ls_fcat.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  create_and_init_alv_byval
    *       text
    *      <--P_GT_OUTTAB  text
    *      <--P_GT_FIELDCAT  text
    *      <--P_GS_LAYOUT  text
    FORM create_and_init_alv_byval
                      CHANGING
                            value(pt_outtab)  LIKE gt_outtab[]  " by value
                            pt_fieldcat TYPE lvc_t_fcat
                            ps_layout TYPE lvc_s_layo.
      PERFORM create_and_init_alv CHANGING pt_outtab
                                           pt_fieldcat
                                           ps_layout.
    ENDFORM.                    " create_and_init_alv_byval
    *&      Form  CREATE_AND_INIT_ALV
    *       text
    *      <--P_GT_OUTTAB  text
    *      <--P_GT_FIELDCAT  text
    *      <--P_GS_LAYOUT  text
    FORM create_and_init_alv
                      CHANGING
                            pt_outtab  LIKE gt_outtab[]  " by reference
                            pt_fieldcat TYPE lvc_t_fcat
                            ps_layout TYPE lvc_s_layo.
      DATA: lt_exclude TYPE ui_functions.
      CREATE OBJECT g_custom_container
             EXPORTING container_name = g_container.
      CREATE OBJECT g_grid
             EXPORTING i_parent = g_custom_container.
    * Build fieldcat and set columns PLANETYPE and SEATSOCC
    * edit enabled.
      PERFORM build_fieldcat CHANGING pt_fieldcat.
    *§2.Optionally restrict generic functions to 'change only'.
    *   (The user shall not be able to add new lines).
      PERFORM exclude_tb_functions CHANGING lt_exclude.
      SELECT * FROM sflight INTO TABLE pt_outtab UP TO g_max ROWS.
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          is_layout            = ps_layout
          it_toolbar_excluding = lt_exclude
        CHANGING
          it_fieldcatalog      = pt_fieldcat
          it_outtab            = pt_outtab.
    * set editable cells to ready for input
      CALL METHOD g_grid->set_ready_for_input
        EXPORTING
          i_ready_for_input = 1.
    *§3.Optionally register ENTER to raise event DATA_CHANGED.
    *   (Per default the user may check data by using the check icon).
      CALL METHOD g_grid->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_enter.
      CREATE OBJECT g_event_receiver.
      SET HANDLER g_event_receiver->handle_data_changed FOR g_grid.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
    *       text
    *      <--P_LT_EXCLUDE  text
    FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
    * Only allow to change data not to create new entries (exclude
    * generic functions).
      DATA ls_exclude TYPE ui_func.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
      APPEND ls_exclude TO pt_exclude.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS

  • How to create a long text in webdynpro for abap?

    Hi Experts,
                      I am new to Web Dynpro for ABAP, I have a requirement for Grievance workflow. For this we have developed a Webdynpro application which appears in portal. Here my issue is user wants to enter a long text on the screen and I have to save this text as standard text. Is it possible to create a text box which we can insert number of lines?
    If so can anybody please suggest me how to resolve this issue.
    Thank You.
    Ranganadh.

    hi ,
    u can use the TEXT EDIT UI element , procced like this :
    1 Right click on Root Element UI container , insert elemnt TEXT EDIT
    2 create a context attribute of type string or string_table
    3 bind value property of ur UI to this attribute
    4 u can get the values entered in the text UI by user , by get_attribute method
    press CNTRL + F7  , select the radio button read context node/attribute , select the corresponding attribute
    The attribute to be bound can be of type STRING or STRING_TABLE. With STRING_TABLE rows from TextEdit are stored as table rows. A line break is always stored as a line feed in a STRING (CL_ABAP_CHAR_UTILITIES=>NEWLINE, ASCII decimal 10). The Web Dynpro framework carries out the conversion for the client platform.
    Note that a string to be displayed in TextEdit, must only use a line feed as a line break.
    refer this online help :
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/06/45ee412e5e6324e10000000a1550b0/content.htm
    regards,
    amit

  • ALV Operations In Webdynpro for ABAP

    Hello Experts,
                          I have a requirement in ALV table in which I want To make one column as link. On clicking of that link a textedit UI element should be created on the same page on top of ALV Table. Please Suggest me how to display textedit on the same page above the ALV table and also how to create link of the column.
    Thanks,
    Pratibha

    Hi,
    To create all the cells of a column as a link follow this thread:
    Re: Creating hyperlink in column based on data, in ALV Web Dynpro ABAP
    You have to set the cell editor as linktoaction. The corresponding click you can capture in event ON_CLICK ( define your own event handler for this ALV event ).
    You can create a textedit box whose visiblity is bound to a context attribut of type wdy_boolean, on the event handler of click you can just change this attribute property and set it to true and bind it back.
    Regards
    Manas Dua

  • Problem in web dynpro ABAP program

    There are 2 input fields on first view carrid, connid and one "GO" Button
    1) "FLIGHTINFO" is the node under context of first view
    2) " FLIGHTTAB "  is a node under context of component controller having cardinality " 0..n " ,Dictionary structure "SFLIGHT" (i have selected only these many attributes " carrid, connid, fldate, planetype, seatsmax and seatsocc " )
    3) I have created  Method "FLIGHTTAB_FILL" in component controller to fill context node FLIGHTTAB
    Insert the source code for doing the following:
    -     Navigate to context node FLIGHTINFO
    -     Get element at lead selection for context node FLIGHTINFO
    -     Get CARRID and CONNID 
    -     Fill an internal table with all datasets from database table SFLIGHT, who meet the constraints for CARRID and CONNID.
    -     Navigate to context node FLIGHTTAB
    -     Bind the internal table(having all standard fields of sflight ) to the context node FLIGHTTAB ( having those 6 attributs).
    4) On action GO ->Implement the invocation of Method " FLIGHTTAB_FILL".
    5) I have mapped node FLIGHTTAB to context of OUTPUTVIEW.  Display table on view OUTPUT_VIEW (for this i hav used code wizard).
    Problem: after entering values of connid & carrid I m getting proper entries in internal table. but output view is not at all trigger (although i have created plugs). Is it necessary that while binding internal table with context node FLIGHTTAB  should have same no of fields (i.e. in this case 6 )?
    I am a fresher, My concept of bindings and cardinality are not so clear so can anybody help me out? 
    Thanx in advance for replying.

    Hi johnright ,
        No i dont think it is necessary that while binding internal table with context node should have same no of fields as the internal table . You might get some improper values in the corresponding fiels but it will not lead to any error.
      In your OUTPUTVIEW once you created the table UI element in layout and you bind it to FLIGHTTAB node you dont have to use any code wizard method to display the values. If the node contains values it will display automatically. (in your case you are filling it in step #).
    Check :-
    1. In your On action GO after filling the table you are firing the out bound plug :-
        WD_THIS->FIRE_INITIAL_OUT_PLG(
    2.All outbound plug and inbound plug are link properly and every thing is ACTIVATED.
    If still unable to find the error try to debug method wise and find where the error occurs and reply to us.
    Binding:-
    In web dynpro ABAP you will not able to get any value of any variable outside of any method. Here we use context node which is referrence that we create reference to any particular structure we required. Now to hold the values you need to bind
    the values of your internal table to the context node.
    If the node is in view then its values are visible to all the local method of the view.
    If the node is in component controller then  the you bind a value to the node from one view and you can get it in another view.
    Remember binding and mapping are not same.
    Mapping is done between node like inthe second scenario i have explained you need to create a node in view controller and then you need to map it to the corresponding view of component controller to send values across view.
    cardinality:-
    Each node contains data fields that represent one of the following:
        An individual instance of an object type
        A table of instances.
    This property of a node is known as its cardinality of table of instances.
    If you need table instance :- 0..n or 1...n
       In case of 1...n one default value is created. generally we use this as mainly we need to work with table.
    In case you need a individual instance of a object or like you want value like a structure only :-  0...1 or 1....1.
    Thanks & Regards,
    Monishankar C

  • How to implement Strategy pattern in ABAP Objects?

    Hello,
    I have a problem where I need to implement different algorithms, depending on the type of input. Example: I have to calculate a Present Value, sometimes with payments in advance, sometimes payment in arrear.
    From documentation and to enhance my ABAP Objects skills, I would like to implement the strategy pattern. It sounds the right solution for the problem.
    Hence I need some help in implementing this pattern in OO. I have some basic OO skills, but still learning.
    Has somebody already implemented this pattern in ABAP OO and can give me some input. Or is there any documentation how to implement it?
    Thanks and regards,
    Tapio

    Keshav has already outlined required logic, so let me fulfill his answer with a snippet
    An Interface
    INTERFACE lif_payment.
      METHODS pay CHANGING c_val TYPE p.
    ENDINTERFACE.
    Payment implementations
    CLASS lcl_payment_1 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                 
    CLASS lcl_payment_2 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                   
    CLASS lcl_payment_1 IMPLEMENTATION.
      METHOD pay.
        "do something with c_val i.e.
        c_val = c_val - 10.
      ENDMETHOD.                   
    ENDCLASS.                  
    CLASS lcl_payment_2 IMPLEMENTATION.
      METHOD pay.
        "do something else with c_val i.e.
        c_val = c_val + 10.
      ENDMETHOD.  
    Main class which uses strategy pattern
    CLASS lcl_main DEFINITION.
      PUBLIC SECTION.
        "during main object creation you pass which payment you want to use for this object
        METHODS constructor IMPORTING ir_payment TYPE REF TO lif_payment.
        "later on you can change this dynamicaly
        METHODS set_payment IMPORTING ir_payment TYPE REF TO lif_payment.
        METHODS show_payment_val.
        METHODS pay.
      PRIVATE SECTION.
        DATA payment_value TYPE p.
        "reference to your interface whcih you will be working with
        "polimorphically
        DATA mr_payment TYPE REF TO lif_payment.
    ENDCLASS.                  
    CLASS lcl_main IMPLEMENTATION.
      METHOD constructor.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD set_payment.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD show_payment_val.
        WRITE /: 'Payment value is now ', me->payment_value.
      ENDMETHOD.                  
      "hide fact that you are using composition to access pay method
      METHOD pay.
        mr_payment->pay( CHANGING c_val = payment_value ).
      ENDMETHOD.                   ENDCLASS.                  
    Client application
    PARAMETERS pa_pay TYPE c. "1 - first payment, 2 - second
    DATA gr_main TYPE REF TO lcl_main.
    DATA gr_payment TYPE REF TO lif_payment.
    START-OF-SELECTION.
      "client application (which uses stategy pattern)
      CASE pa_pay.
        WHEN 1.
          "create first type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_1.
        WHEN 2.
          "create second type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_2.
      ENDCASE.
      "pass payment type to main object
      CREATE OBJECT gr_main
        EXPORTING
          ir_payment = gr_payment.
      gr_main->show_payment_val( ).
      "now client doesn't know which object it is working with
      gr_main->pay( ).
      gr_main->show_payment_val( ).
      "you can also use set_payment method to set payment type dynamically
      "client would see no change
      if pa_pay = 1.
        "now create different payment to set it dynamically
        CREATE OBJECT gr_payment TYPE lcl_payment_2.
        gr_main->set_payment( gr_payment ).
        gr_main->pay( ).
        gr_main->show_payment_val( ).
      endif.
    Regads
    Marcin

  • Handling C# events in ABAP

    Hi,
        I am having a very bad time trying to make a C# custom control and an ABAP class talk to each other...
        The control have many properties and methods, all of them perfectly accessible using a proxy class derived from cl_gui_control in ABAP. I can instantiate, show the control in   the screen, call its methods, get its properties, but there is nothing in the earth that makes the ABAP understand a single event raised by the component.
        In fact, the component runs ok - I tested it outside SAP, using IExplorer, and the event was good. But when I embed it on SAP, nothing happens.
        What I did:
        1) The component has an event declared this way:
    // C# code, simplified
    public interface IEventInfterface
       [DispID(10)]
       event Selected();
    [ComSourceInterfaces(typeof(ISapControlEvents))]
    public class mycontrol
       public delegate void SelectedHND();
       public event SelectedHND Selected;
       public void OnSelected()
          if (Selected != null)  // Attention here!
             Selected();
       This means that my component have a "Selected" event, its DispatchID is "10".
      2) In SAP, after making all the necessary implementations to use a class (constructor, dispatch, etc), my ABAP code contains this (consider obj_csharp an already instantiated and functional object):
    DATA: evt_table    TYPE cntl_simple_events,
               evt_line       TYPE cntl_simple_event.
          evt_line-eventid = 10.   " This is my DispID to the Selected event
          evt_line-appl_event = 'X'.
          APPEND evt_line to evt_table.
          call METHOD obj_csharp->set_registered_events
            EXPORTING
              events = evt_table.
        Now, the problem is: everything works perfect, including the registration routine (the event is registrered in the obj_csharp object), but when it need to be fired, <b>VisualStudio says that the object "Selected" is null</b> in that verification (where I wrote "Attention here", remember?) and do not raise the event.
        Am I missing anything?
       Thanks !!!
    Arnaldo.

    The ap Object is declared inside my OpenWord - Method.
    The class itself is bound to a GUI button as a command.
    public class OfficeCommand : ICommand
        public void Execute(object parameter)
              OpenWord(info, ReadWrite);
        private void OpenWord(DocumentInfo info, bool readwrite)
                Word.Application ap = new Word.Application();
                Microsoft.Office.Interop.Word.Document document
                             = ap.Documents.Open(path,
    ConfirmConversions:false,
    ReadOnly:!readwrite,
                    AddToRecentFiles:false);
                WordDocumentEventHandler WordCloseEventHandler = GlobalModel.createNew(info);
                ap.DocumentBeforeSave += WordCloseEventHandler.DocumentBeforeSaveEvent;
                ap.Visible = true;
                ap.Activate();

  • Doubt in ABAP proxy

    Hi friends,
    I am working on ABAP Proxies in XI(Client Proxy)
    After creating the Message interface in Integration Repository ,
    I went to the ABAP proxy generation,using SPROXY.
    And went to he Message Interface (Outbound) .There its displaying
    "Proxy_intfc_OB" (this is  the message interface defined in IR)
    But when Right click on the out bound interface and press " create" .Its asking me
    "Specifications for Objects to be generated"
    under it
    Package :
    Prefix :
    whats these two and what I have to give here ....
    pls help me...

    Hello,
    When I right click  on the message Interface (OB) in SPROXY.
    I created a Package and prefix and entered.
    It showing a pop up window
    with title : Add Developer.
    Message : You are not registered as a developer .Please register in the online service system(OSS) in the OSS you will recieve an access key .
    Key
    User Name : sap1user2     
    Access key :
    Installation :  "Installation number "

Maybe you are looking for

  • Font Smoothing CE 6.0 Thin Clients

    We need to handle Font Smoothing on HP Thin Clients. This is supported on newer Thin Clients with RDP7 and Font Smoothing settings. Older Win CE 6.0 do not appear to support Font Smoothing. Is there a way to set up Font Smoothothing or can these thin

  • Adobe Acrobat Pro instalation

    Greetings, I have the creative cloud membership, does it include Adobe Acrobat Pro? The downer will not allow me to use the serial number provided by Adobe. Any suggestions?

  • 5508 design - best practice

    So thanks to Nicolas, I have our 5508 wireless controller up and running in the lab with 2 AP's. Right now I have 2 WLANS defined, 1 for internal users and 1 for guests. They are on seperate vlans which allows me to ACL the guest connections to inter

  • Dynamically update swf file in sharepoint using xml data

    Hi, I need some help/enlightenment on how to auto-update the swf file in sharepoint using xml data. I am encountering an error "Cannot access External Data" and pointing to adobe's Cross-domain policy file extension. My questions is: 1. Where should

  • How to Access Database Table Column Data within Javascript in ApEx

    Hi, I have a column in a database table that contains several urls and I was wondering what is the best way to get these urls from the database table into a javascript function. Example code of how to approach this would be much appreciated. Thanks.