Where can we validate the MANDT field in a database table.

Hi All,
In any database table we will be having MANDT field.  In the program while populating the table we never populate the field MANDT. But still in the database table, it automatically takes the current clinet number.
Could any body tell me where can we validate this.  I have a requirement in my program, in which I need to populate one of the field with one constant value.
Thanks,
srinivas.

hi table T000 is for the  Clients master table ....
the client is the special field for all the master tables...
for validating the field you need to do like this..
data: v_mandt type sy-mandt .
tables:t000.
select-options:s_mandt for t000-mandt.
select mandt
         from t000
         into v_mandt
          where mandt in s_mandt.

Similar Messages

  • How can i update the REMARK field in ADRT database table

    Hi all,
    How can i update the REMARK field in ADRT database table
    By using Function modules or BAPI’s
    Please reply me fast

    Hi,
    you can try this code:
        SELECT SINGLE * FROM KNA1 WHERE KUNNR = wa_kunnr.
        IF sy-subrc = 0.
          CLEAR adrct.
          SELECT SINGLE * FROM adrct WHERE addrnumber = kna1-adrnr.
          IF sy-subrc = 0.
            adrct-remark = wa_remark.
            MODIFY adrct.
          ENDIF.
        ENDIF
    best regards,
    Thangesh

  • Where can I find the OCA drivers for 8i database?

    Where can I find the OCA drivers for 8i database?
    I don't have the developer disks...
    Please help me...

    Hi
    I think you didnt search on the Toshiba European driver page!
    Why?
    I checked the page and found the XP drivers for Sat L350D PSLE8E!!!
    Here you can find the Toshiba European driver website!
    http://eu.computers.toshiba-europe.com/ -> Support & Download -> Download Drivers
    Just one hint; before you would post an question please use the Advanced search of this forum because most questions have been already answered!!!
    Bye

  • How to find the structure fields data in database tables?

    how to find the structure fields data in database tables?

    Your question doesn't appear to be Web Dynpro ABAP related. Please only post questions in this forum if they are directly Web Dynpro ABAP related.  There are several other more general ABAP related forums.

  • How can I Insert a Text field in a DATABASE TABLE???

    Hello at all,
    i have a database Table ZTEST with 2 columns.
    MANDT     TYPE     CLNT
    TEXT         TYPE     char     (255)
    In my internal table tab, i have a text content. I want insert this content in my database table ZTEST.
    DATA: tab TYPE TABLE OF ZTEST,
               lin TYPE ZTEST.
    lin-text = 'HELLO WORLD'
    APPEND lin TO tab.
    INSERT INTO ZTEST VALUES tab.
    Commit Work.
    Is this correct???? BECAUSE it doesnt work.
    Edited by: ETN_58 on Mar 31, 2010 10:27 AM

    Hi All,
    Here table ZTEST has two fields kunnr and text where kunnr is the key field.
            REPORT  ZATEST                                  .
           tables ztest.
          DATA: itab TYPE TABLE OF ZTEST with header line.
            itab-kunnr = '67890'.
            itab-text = 'HELLO WORLD'.
            APPEND itab.
           if sy-subrc eq 0.
               INSERT  ZTEST from table itab.
            Commit Work.
          endif.
           Check with this, its working fine.
                 Regards,
                Md Ziauddin.

  • Where can I find the column declarations of table X$BH? or X$ tables?

    Hi all,
    does anyone know where can I find the column declarations for each X$ tables?
    I did some googling and with no luck.
    So, hoping that I can get some help here!
    Thanks in advance!

    PhoenixBai wrote:
    does anyone know where can I find the column declarations for each X$ tables?X$ tables are not "real" tables. They are similar to the +/proc+ file system on Linux that looks like a file system with directories and files, but is actually a view into kernel memory structures.
    X$ tables are a view of internal Oracle kernel memory structures. And you need to be careful how you use these - not just how you interpret the data in them. Some structures when touched (using a select against that X$ table), will actually reset the values in the struct. (e.g. <i>X$KSMLRU - LRU flushes from the shared pool - (7.3 - 8.1) [ID 43600.1]</i>).
    The basic question you need to ask yourself is what are you looking for using the X$ views into the internals of Oracle? Why are you not using the V$ and GV$ views instead? - these are what 99% of all dba admins and experts and tools use. The times that one need to dig into X$ views (that are mostly undocumented and can have major changes from version to version) are very rare. And requires at least some basic knowledge of how databases and operating systems work internally.

  • How to Find the Data Type of the Field In a Database Table

    Hi Experts,
    I'm currently working on a program which needs to find out the data type of the given field in a database table. In addition to accessing DD03L directly, is there any other workaround such as function module to help me achieve this? It would be helpful if a demo example could be provided.
    Thanks a lot.

    Hi,
    Use this..
    DESCRIBE FIELD dobj  TYPE typ.
    write typ.
    type will contain the data type of the object.
    and check this thread also....
    Re: How to get datatype of fields in dynamic structures
    Cheers,
    Simha.
    Reward all the helpful answers..

  • How can i validate  the field directline under personal information of ESS?

    Hi all,
    How can i validate the field directline under personal information--> communication data  of ESS?The thing is we don't have NWDI setup in our organization.Is there any possibility of doing it under SPRO trn.
    Thanks and Regards,
    sam

    Hi,
    This is probably a wrong forum that you have posted your question to.
    Regards,
    Siddhesh

  • How can i reinstall the search field of my Imac? I mean the field where one enters a web address.

    How can I reinstall the serach field of my Imac?

    Choose Show Toolbar or Customize Toolbar from the View menu and put it back.
    (90586)

  • How to Validate the Text Field in JSF

    Hi,
    I am facing a issue to validate the text field where the below code accepts (space' ',underscore'_',pipe'|') symbol as a first character and last character.Where by it can accept in the middle.
    It should not accept special characters also. Below code is working properly for special characters.
    <tr>
    <td width="30%" align="right"><b><h:outputText id="aAccrualType" value="Accrual Type" /> </b> <span style="color:red">*</span></td>
    <td width="50%">: <h:inputText id="accrualType" value="#{accrualTypeMast.accrualType}" required="true" >          
    <t:validateRegExpr pattern="^[(a-z)||(A-Z)||(0-9)||(_)||(\s)||(/)]+$" />     
    <f:validateLength minimum="1" maximum="50"/>     
    </h:inputText>
    <h:message for="accrualType" showDetail="true" style="color:red" />
    </td>
    </tr>
    The thing is i dont have much knowledge in regular expression.
    Is there any other way to do this.
    Could anyone help me in this.
    Thanks,
    Ambika&#9786;

    This has nothing to do with JSF.
    I suggest you to read the Pattern API documentation [1]. You can easily create a small Java Application and test the regexp using String#matches() as it uses the same regexp guidelines.
    public static void main(String[] args) {
        String regexp = "^[a-z]+$";
        String value = "foo";
        boolean match = value.matches(regexp);
        System.out.println(value + " matches " + regexp + ": " + match);
    }[1] http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html

  • After F4 selection ,where can i filter the product result table

    I have created  F4 help for product search in Web U for extra field
    Component:PRD01QR and view:Search Help under context node :SEARCH..
    1)After selecting the value from f4,From where can i get the selected value inside the program
    2)How can i use this value to filter the product result table
    Please-help urgent

    I tried the above methods but still cant resolve..
    Am able to get the help value and internal table result. but when i put value to my custom field using f4 help and press search it going to this query
    OPEN CURSOR WITH HOLD lv_cursor FOR
             SELECT prod~product_guid
                    prod~logsys
                    prod~product_id
                    prod~product_type
                    prod~config
                    prod~xnosearch
                    prod~object_family
                    prod~batch_dedicated
                    prod~competitor_prod
             FROM  COMM_PRODUCT as prod   INNER JOIN COMM_PR_FRG_REL  as COMM_PR_FRG_REL0  on COMM_PR_FRG_REL0product_guid = prodproduct_guid  AND CO
             CLIENT SPECIFIED
             WHERE
                 prod~client      = sy-mandt                  AND
                 batch_dedicated  IN gt_batch_dedicated_range AND
                 competitor_prod  IN gt_competitor_range      AND
                 config           IN gt_config_range          AND
                 prod~logsys      IN gt_logsys_range          AND
                 object_family    IN gt_object_family_range   AND
                 product_id       IN gt_product_id_range      AND
                 product_type     IN gt_product_type_range    AND
                 (gt_where).
    here get_where has value
    ZSECTION_SET~ZZ0010 = 'S'
    which is my field value.At this point internal table is going blank and search fails.

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • Where can I find the file Photoshop .exe in CS6/Windows 7 please?

    Where can I find the file Photoshop .exe in CS6/Windows7 ?  It is not in the usual place.

    Click on the Start button.
    Type Photoshop into the search field.
    "Adobe Photoshop CS6" will be listed, probably at the top.
    Hover your mouse over the words Adobe Photoshop CS6 - the location will be displayed.
    To open the folder containing Photoshop.exe , with your secondary mouse button, click on "Adobe Photoshop CS6" and select "Open file location".

  • Any way to validate the Mandatory field in the XML file

    Hi,
    Is there any way to validate the Mandatory field in the XML file. I created an xml type table xml_validate based on the schema and insert the XML files with statement.
    INSERT INTO xml_validate(warehouse_id,xml_file_name,warehouse_spec)
    Values (agreementid,p_filename,XMLTYPE.createXML(l_clob));
    It is validating the data types, extra tags etc but not validating the missing of the manadatory tag/value.
    Thanks in advance
    Rizly

    Hi Ants,
    Yes, I was not doing the strict validation, after searching the forum i understood that was the reason. So i did this way,
    begin
    for x in (select myColumn from myTable where WAREHOUSE_ID=41) loop
    x.myColumn .schemaValidate();
    end loop;
    end;
    The out put is:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00011: internal error: LsxvPushCandidate array overflow
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at line 3
    My i know more information about this error, especially
    LSX-00011: internal error: LsxvPushCandidate array overflow
    Thanks in advance
    Rizly

  • Where can we find the methods of the classes in OLE Interface

    Hi All,
    I am developing the code to download the file into multiple sheets of excel file.
    got many links and sample codes from this forum.
    but my doubt is where can we find the methods in applications.
    Example:
    add, cells, range etc are the methods in the object excel.application.
    I want to find all other methods in this same object.
    Please help me.
    thanks in adv.
    Eswar

    HE,
    see this demo program which is in DWDM
    *& Report  DEMOEXCELINTEGRATION                                        *
    INCLUDE rdemoexcelintegrationtop.
    DATA: control TYPE REF TO i_oi_ole_container_control.
    DATA: container TYPE REF TO cl_gui_custom_container.
    DATA: link_server TYPE REF TO i_oi_link_server.
    DATA: table_coll TYPE REF TO i_oi_table_collection.
    DATA: retcode TYPE t_oi_ret_string,
          document_type TYPE soi_document_type
                                           VALUE soi_doctype_excel_chart,
          document_format TYPE soi_document_type.
    DATA: doc_url TYPE t_url.
    DATA: usa_sales TYPE i VALUE 1000,
          europe_sales TYPE i VALUE 2000,
          japan_sales TYPE i VALUE 1000,
          asia_sales TYPE i VALUE 100,
          america_sales TYPE i VALUE 100,
          africa_sales TYPE i VALUE 100.
    DATA: total_sales TYPE i VALUE 0.
    DATA: BEGIN OF test_line, region(50), sales TYPE i, END OF test_line.
    DATA: test_table LIKE TABLE OF test_line.
    DATA: wa_test_table LIKE test_line.
          CLASS c_excel_document DEFINITION
    CLASS c_excel_document DEFINITION.
      PUBLIC SECTION.
        DATA: proxy TYPE REF TO i_oi_document_proxy.
        DATA: document_type TYPE soi_document_type.
        DATA: data_table TYPE sbdst_content,
              data_size TYPE i,
              doc_url TYPE t_url.
        METHODS: constructor
                  IMPORTING control TYPE REF TO i_oi_ole_container_control
                            document_type TYPE soi_document_type.
        METHODS: on_close_document
                  FOR EVENT on_close_document OF i_oi_document_proxy
                  IMPORTING document_proxy has_changed.
        METHODS: on_custom_event
                  FOR EVENT on_custom_event OF i_oi_document_proxy
                  IMPORTING document_proxy event_name param_count
                            param1 param2 param3.
        METHODS: create_document
                      IMPORTING open_inplace  TYPE c DEFAULT ' '
                      EXPORTING retcode TYPE t_oi_ret_string.
        METHODS: open_document
                      IMPORTING open_inplace  TYPE c DEFAULT ' '
                                open_readonly TYPE c DEFAULT ' '
                      EXPORTING retcode TYPE t_oi_ret_string.
        METHODS: open_document_url
                      IMPORTING open_inplace  TYPE c DEFAULT ' '
                                open_readonly TYPE c DEFAULT ' '
                                doc_url TYPE t_url DEFAULT ' '
                      EXPORTING retcode TYPE t_oi_ret_string.
        METHODS: retrieve_document
                     IMPORTING documents TYPE document_list
                     EXPORTING document_format TYPE soi_document_type
                               doc_url TYPE t_url.
        METHODS: close_document
                      IMPORTING do_save     TYPE c DEFAULT ' '
                      RETURNING value(retcode) TYPE t_oi_ret_string.
      PRIVATE SECTION.
        DATA: control  TYPE REF TO i_oi_ole_container_control.
    ENDCLASS.
    DATA: l_fcode LIKE fcode.
    DATA: document TYPE REF TO c_excel_document.
    DATA: bds_instance TYPE REF TO cl_bds_document_set.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'MAIN0100'.
      SET TITLEBAR '001'.
      retcode = c_oi_errors=>ret_ok.
      IF control IS INITIAL.
        DATA: b_has_activex.
        CALL FUNCTION 'GUI_HAS_ACTIVEX'
             IMPORTING
                  return = b_has_activex.
        IF b_has_activex IS INITIAL. MESSAGE e007. ENDIF.
        CALL METHOD c_oi_ole_control_creator=>get_ole_container_control
                          IMPORTING control = control
                                    retcode = retcode.
        CALL METHOD c_oi_errors=>show_message
                                      EXPORTING type = 'E'.
        CREATE OBJECT container
                  EXPORTING container_name = 'CONTAINER'.
        CALL METHOD control->init_control
                            EXPORTING r3_application_name =
                                                  'Demo' "#EC NOTEXT
                                      inplace_enabled = 'X'
                                      inplace_scroll_documents = 'X'
                                      parent = container
                                      register_on_close_event = 'X'
                                      register_on_custom_event = 'X'
                            IMPORTING retcode = retcode.
        CALL METHOD c_oi_errors=>show_message
                                      EXPORTING type = 'E'.
        CALL METHOD control->get_link_server
                           IMPORTING link_server = link_server
                                     retcode = retcode.
        CALL METHOD c_oi_errors=>show_message
                                      EXPORTING type = 'E'.
        CALL METHOD link_server->start_link_server
                          IMPORTING retcode = retcode.
        CALL METHOD c_oi_errors=>show_message
                                      EXPORTING type = 'E'.
        CALL METHOD control->get_table_collection
                        IMPORTING table_collection = table_coll
                                  retcode = retcode.
        PERFORM refresh_sales.
        CREATE OBJECT document
                  EXPORTING control = control
                            document_type = document_type.
        CALL METHOD table_coll->add_table
                        EXPORTING table_name = 'SALES_IN'
                                  table_type = table_coll->table_type_input
                        IMPORTING retcode = retcode
                        CHANGING  data_table = test_table.
      ENDIF.
      IF bds_instance IS INITIAL.
        CREATE OBJECT bds_instance.
      ENDIF.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE user_command_0100 INPUT.
      l_fcode = fcode.
      CLEAR fcode.
      CALL METHOD cl_gui_cfw=>dispatch.
      CASE l_fcode.
        WHEN 'EXIT'.                       "Zurück
          IF NOT document IS INITIAL.
            CALL METHOD document->close_document.
            FREE document.
          ENDIF.
          IF NOT link_server IS INITIAL.
            CALL METHOD link_server->stop_link_server
                                           IMPORTING retcode = retcode.
            FREE link_server.
          ENDIF.
          IF NOT table_coll IS INITIAL.
            FREE table_coll.
          ENDIF.
          IF NOT control IS INITIAL.
            CALL METHOD control->destroy_control
                                                IMPORTING retcode = retcode.
            FREE control.
          ENDIF.
          IF NOT bds_instance IS INITIAL.
            FREE bds_instance.
          ENDIF.
          LEAVE TO SCREEN 0.
        WHEN 'CREATE'.
          IF NOT control IS INITIAL.
            document->data_size = 0.
            CLEAR document->data_table.
            CALL METHOD document->create_document.
            CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
          ENDIF.
        WHEN 'SELECT'.
          IF NOT control IS INITIAL.
            DATA: documents TYPE document_list.
            DATA: descr TYPE document_descr.
            CLEAR documents.
            descr-document_name = 'Car Sales Chart'(do1).
            descr-document_id = 'DEMOEXCELCHART1'.
            APPEND descr TO documents.
            descr-document_name = 'Car Sales Chart 2'(do3).
            descr-document_id = 'DEMOEXCELCHART2'.
            APPEND descr TO documents.
            descr-document_name = 'Car Sales Sheet'(do2).
            descr-document_id = 'DEMOEXCELSHEET1'.
            APPEND descr TO documents.
            CLEAR doc_url.
            CALL METHOD document->retrieve_document
                        EXPORTING documents = documents
                        IMPORTING document_format = document_format
                                  doc_url = doc_url.
            IF NOT doc_url IS INITIAL.
              CALL METHOD document->close_document.
              CALL METHOD document->open_document_url
                                EXPORTING open_inplace = 'X'
                                          doc_url = doc_url
                                IMPORTING retcode = retcode.
              CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
            ELSE.
              MESSAGE e010.
            ENDIF.
          ENDIF.
        WHEN 'OPEN'.
          IF document->data_size NE 0.
            IF NOT control IS INITIAL.
              CALL METHOD document->open_document
                                IMPORTING retcode = retcode.
              CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
            ENDIF.
          ELSE.
            MESSAGE e005.
          ENDIF.
        WHEN 'INPLACE'.
          IF document->data_size NE 0.
            IF NOT control IS INITIAL.
              CALL METHOD document->open_document
                                EXPORTING open_inplace = 'X'
                                          open_readonly = 'X'
                                IMPORTING retcode = retcode.
              CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
            ENDIF.
          ELSE.
            MESSAGE e005.
          ENDIF.
        WHEN 'SAVEAS'.
          IF NOT document IS INITIAL AND NOT document->proxy IS INITIAL.
            CALL METHOD document->proxy->save_as
                              EXPORTING prompt_user = 'X'
                              IMPORTING retcode = retcode.
            CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
          ELSE.
            MESSAGE e000.
          ENDIF.
        WHEN 'CLOSE'.
          IF NOT document IS INITIAL.
            CALL METHOD document->close_document
                          EXPORTING do_save = 'X'.
            CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
          ELSE.
            MESSAGE e000.
          ENDIF.
        WHEN 'COPYLINK'.
          IF NOT link_server IS INITIAL.
            PERFORM refresh_sales.
            CALL METHOD link_server->execute_copy_link_dialog
                     IMPORTING retcode = retcode.
            CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
          ELSE.
            MESSAGE e004.
          ENDIF.
        WHEN 'REFRESH'.
          IF NOT link_server IS INITIAL.
            PERFORM refresh_sales.
          ELSE.
            MESSAGE e004.
          ENDIF.
          IF NOT document IS INITIAL AND NOT document->proxy IS INITIAL.
            CALL METHOD document->proxy->execute_macro
                          EXPORTING macro_string = 'R3StartupMacro'
                                    param_count = 1
                                    param1 = 10
                          IMPORTING retcode = retcode.
                         CHANGING  retvalue = usa_sales.
            CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
          ELSE.
            MESSAGE e000.
          ENDIF.
        WHEN 'PRINT'.
          IF NOT document IS INITIAL AND NOT document->proxy IS INITIAL.
            CALL METHOD document->proxy->print_document
                           EXPORTING prompt_user = 'X'
                           IMPORTING retcode = retcode.
            CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
          ELSE.
            MESSAGE e000.
          ENDIF.
      ENDCASE.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    CLASS c_excel_document IMPLEMENTATION.
    CLASS c_excel_document IMPLEMENTATION.
      METHOD: constructor.
                 IMPORTING control TYPE REF TO i_oi_ole_container_control
                           document_type TYPE soi_document_type
        me->control = control.
        me->document_type = document_type.
      ENDMETHOD.
      METHOD create_document.
                    IMPORTING open_inplace  TYPE c DEFAULT ' '
                    RETURNING value(retcode) TYPE t_oi_ret_string.
        IF NOT proxy IS INITIAL.
          CALL METHOD me->close_document.
        ENDIF.
        CALL METHOD control->get_document_proxy
                 EXPORTING document_type = document_type
                 IMPORTING document_proxy = proxy
                           retcode = retcode.
        IF retcode NE c_oi_errors=>ret_ok.
          EXIT.
        ENDIF.
        CALL METHOD proxy->create_document
                            EXPORTING create_view_data = 'X'
                                      open_inplace = open_inplace
                            IMPORTING retcode = retcode.
        IF retcode NE c_oi_errors=>ret_ok.
          EXIT.
        ENDIF.
        SET HANDLER me->on_close_document FOR proxy.
        SET HANDLER me->on_custom_event FOR proxy.
      ENDMETHOD.
      METHOD open_document.
                    IMPORTING open_inplace  TYPE c DEFAULT ' '
                              open_readonly TYPE c DEFAULT ' '
                    RETURNING value(retcode) TYPE t_oi_ret_string.
        IF NOT proxy IS INITIAL.
          CALL METHOD me->close_document.
        ENDIF.
        CALL METHOD control->get_document_proxy
                 EXPORTING document_type = document_type
                 IMPORTING document_proxy = proxy
                           retcode = retcode.
        IF retcode NE c_oi_errors=>ret_ok.
          EXIT.
        ENDIF.
        CALL METHOD proxy->open_document_from_table
                               EXPORTING document_table = data_table
                                         document_size  = data_size
                                         open_inplace = open_inplace
                                         open_readonly = open_readonly
                               IMPORTING retcode = retcode.
        IF retcode NE c_oi_errors=>ret_ok.
          EXIT.
        ENDIF.
        SET HANDLER me->on_close_document FOR proxy.
        SET HANDLER me->on_custom_event FOR proxy.
        CALL METHOD proxy->update_document_links
                               EXPORTING update_manual_links = 'X'
                               IMPORTING retcode = retcode.
      ENDMETHOD.
      METHOD close_document.
                    IMPORTING do_save TYPE c DEFAULT ' '
                    RETURNING value(retcode) TYPE t_oi_ret_string.
        DATA: is_closed TYPE i, has_changed TYPE i.
        DATA: doc_url(256).
        IF NOT proxy IS INITIAL.
          CALL METHOD proxy->is_destroyed IMPORTING ret_value = is_closed.
          IF is_closed IS INITIAL.
            CALL METHOD proxy->close_document
                         EXPORTING do_save = do_save
                         IMPORTING has_changed = has_changed
                                   retcode = retcode.
            IF retcode NE c_oi_errors=>ret_ok.
              EXIT.
            ENDIF.
          ENDIF.
          IF NOT has_changed IS INITIAL.
            CALL METHOD proxy->save_document_to_table
                          IMPORTING retcode = retcode
                          CHANGING  document_table = data_table
                                    document_size = data_size.
            IF retcode NE c_oi_errors=>ret_ok.
              EXIT.
            ENDIF.
          ENDIF.
          CALL METHOD proxy->release_document
                                       IMPORTING retcode = retcode.
          SET HANDLER me->on_close_document FOR proxy ACTIVATION ' '.
          SET HANDLER me->on_custom_event FOR proxy ACTIVATION ' '.
        ELSE.
          retcode = c_oi_errors=>ret_document_not_open.
        ENDIF.
      ENDMETHOD.
      METHOD open_document_url.
                    IMPORTING open_inplace  TYPE c DEFAULT ' '
                              open_readonly TYPE c DEFAULT ' '
                              doc_url TYPE t_url DEFAULT ' '
                    RETURNING value(retcode) TYPE t_oi_ret_string.
        IF NOT proxy IS INITIAL.
          CALL METHOD me->close_document.
        ENDIF.
        CALL METHOD control->get_document_proxy
                 EXPORTING document_type = document_type
                 IMPORTING document_proxy = proxy
                           retcode = retcode.
        IF retcode NE c_oi_errors=>ret_ok.
          EXIT.
        ENDIF.
        me->doc_url = doc_url.
        CALL METHOD proxy->open_document
                               EXPORTING document_url = doc_url
                                         open_inplace = open_inplace
                                         open_readonly = open_readonly
                               IMPORTING retcode = retcode.
        IF retcode NE c_oi_errors=>ret_ok.
          EXIT.
        ENDIF.
      Document shall also be available in ITAB for respective operations:
        CALL METHOD proxy->save_document_to_table
                          IMPORTING retcode = retcode
                          CHANGING  document_table = data_table
                                    document_size = data_size.
        IF retcode NE c_oi_errors=>ret_ok.
          EXIT.
        ENDIF.
        SET HANDLER me->on_close_document FOR proxy.
        SET HANDLER me->on_custom_event FOR proxy.
        CALL METHOD proxy->update_document_links
                               EXPORTING update_manual_links = 'X'
                               IMPORTING retcode = retcode.
      ENDMETHOD.
      METHOD retrieve_document.
                 importing documents type document_list
                 exporting document_format type soi_document_format
                           doc_url type t_url.
    *----BDS-Data-Structures:--
    Tables and WAs:
        DATA: doc_signature TYPE sbdst_signature,
              wa_doc_signature LIKE LINE OF doc_signature,
              doc_components TYPE sbdst_components,
              wa_doc_components LIKE LINE OF doc_components,
              doc_properties TYPE sbdst_properties,
              wa_doc_properties LIKE LINE OF doc_properties,
              doc_uris TYPE sbdst_uri,
              wa_doc_uris LIKE LINE OF doc_uris.
    ID's:
        DATA: doc_classname TYPE sbdst_classname VALUE 'SOFFICEINTEGRATION',
              doc_classtype TYPE sbdst_classtype VALUE 'OT',
            doc_object_key TYPE sbdst_object_key VALUE 'SOFFICEINTEGRATION',
              doc_mimetype TYPE bapicompon-mimetype.
        DATA: field_desc TYPE TABLE OF rsvbfidesc.
        DATA: wa_field_desc TYPE rsvbfidesc.
        DATA: l_nr LIKE sy-tabix.
        CLEAR: field_desc, wa_field_desc.
        wa_field_desc-fieldnum = 1.
        wa_field_desc-display = 'X'.
        APPEND wa_field_desc TO field_desc.
        l_nr = 0.
        CALL FUNCTION 'RS_VALUES_BOX'
             EXPORTING
                  left_upper_col = 5
                  left_upper_row = 5
                  pagesize       = 10
                  title          = 'Select document'(sdc)
             IMPORTING
                  linenumber     = l_nr
             TABLES
                  field_desc     = field_desc
                  value_tab      = documents
             EXCEPTIONS
                  OTHERS         = 1.
        IF sy-subrc EQ 0 AND l_nr NE 0.
          READ TABLE documents INDEX l_nr INTO descr.
          IF sy-subrc EQ 0.
            CLEAR: wa_doc_signature, wa_doc_components, wa_doc_uris.
            CLEAR: doc_signature, doc_components, doc_uris.
            wa_doc_signature-prop_name = 'DESCRIPTION'.
            wa_doc_signature-prop_value = descr-document_id.
            APPEND wa_doc_signature TO doc_signature.
            CALL METHOD bds_instance->get_info
                          EXPORTING classname = doc_classname
                                    classtype = doc_classtype
                                    object_key = doc_object_key
                          CHANGING components = doc_components
                                   signature = doc_signature
                          EXCEPTIONS nothing_found = 1
                                     error_kpro = 2
                                     internal_error = 3
                                     parameter_error = 4
                                     not_authorized = 5
                                     not_allowed = 6.
            IF sy-subrc NE 0 AND sy-subrc NE 1.
              MESSAGE e016.
            ENDIF.
            IF sy-subrc = 1.
              MESSAGE e017.
            ENDIF.
            CALL METHOD bds_instance->get_with_url
                               EXPORTING classname = doc_classname
                                         classtype = doc_classtype
                                         object_key = doc_object_key
                               CHANGING uris = doc_uris
                                        signature = doc_signature
                          EXCEPTIONS nothing_found = 1
                                     error_kpro = 2
                                     internal_error = 3
                                     parameter_error = 4
                                     not_authorized = 5
                                     not_allowed = 6.
            IF sy-subrc NE 0 AND sy-subrc NE 1.
              MESSAGE e016.
            ENDIF.
            IF sy-subrc = 1.
              MESSAGE e017.
            ENDIF.
            READ TABLE doc_components INTO wa_doc_components INDEX 1.
            READ TABLE doc_uris INTO wa_doc_uris INDEX 1.
            doc_mimetype = wa_doc_components-mimetype.
            doc_url = wa_doc_uris-uri.
            CASE doc_mimetype.
              WHEN 'application/x-rtf' OR 'text/rtf'.
                document_format = soi_docformat_rtf.
              WHEN 'application/x-oleobject'.
                document_format = soi_docformat_compound.
              WHEN 'text/plain'.
                document_format = soi_docformat_text.
              WHEN OTHERS.
                document_format = soi_docformat_native.
            ENDCASE.
          ENDIF.
        ENDIF.
      ENDMETHOD.
      METHOD on_close_document.
                 FOR EVENT on_close_document OF c_oi_ole_container_control
                 IMPORTING document_proxy has_changed.
        DATA: answer, do_save.
        IF has_changed EQ 1.
          CALL FUNCTION 'POPUP_TO_CONFIRM'
               EXPORTING
                    titlebar              = 'Office Integration Demo'(oid)
                    text_question         = 'Save Document?'(sav)
                    display_cancel_button = ' '
               IMPORTING
                    answer                = answer.
          IF answer EQ '1'.
            do_save = 'X'.
          ELSE.
            do_save = ' '.
          ENDIF.
          CALL METHOD me->close_document
                        EXPORTING do_save = do_save.
          CALL METHOD c_oi_errors=>show_message
                                      EXPORTING type = 'E'.
        ENDIF.
      ENDMETHOD.
      METHOD on_custom_event.
                 FOR EVENT on_custom_event OF i_oi_document_proxy
                 IMPORTING document_proxy event_name param_count
                           param1 param2 param3.
        IF event_name EQ 'ON_SERIES_CHANGE'.
          CALL METHOD table_coll->get_table
                        EXPORTING table_name = 'SALES_IN'
                        IMPORTING retcode = retcode
                        CHANGING  data_table = test_table.
          CALL METHOD c_oi_errors=>show_message
                                      EXPORTING type = 'E'.
          CLEAR wa_test_table.
          READ TABLE test_table INTO wa_test_table INDEX 1.
          usa_sales = wa_test_table-sales.
          CLEAR wa_test_table.
          READ TABLE test_table INTO wa_test_table INDEX 2.
          europe_sales = wa_test_table-sales.
          CLEAR wa_test_table.
          READ TABLE test_table INTO wa_test_table INDEX 3.
          japan_sales = wa_test_table-sales.
          CLEAR wa_test_table.
          READ TABLE test_table INTO wa_test_table INDEX 4.
          asia_sales = wa_test_table-sales.
          CLEAR wa_test_table.
          READ TABLE test_table INTO wa_test_table INDEX 5.
          america_sales = wa_test_table-sales.
          CLEAR wa_test_table.
          READ TABLE test_table INTO wa_test_table INDEX 6.
          africa_sales = wa_test_table-sales.
          CLEAR wa_test_table.
        ENDIF.
        CALL METHOD control->set_focus.
      ENDMETHOD.
    ENDCLASS.
    FORM refresh_sales.
    FORM refresh_sales.
      DATA: BEGIN OF item_line,
                 region(60),
                 sales TYPE i,
                 date  TYPE d,
                 time  TYPE t,
                 weight TYPE f,
                 amount TYPE p DECIMALS 3,
                 id(10) TYPE n,
            END OF item_line.
      DATA: sales_table LIKE TABLE OF item_line.
      DATA: wa_sales_table LIKE item_line.
      DATA: fields_table TYPE TABLE OF rfc_fields.
      DATA: wa_fields_table TYPE rfc_fields.
      DATA: ind TYPE i.
      CALL FUNCTION 'DP_GET_FIELDS_FROM_TABLE'
           TABLES
                data   = sales_table
                fields = fields_table.
      READ TABLE fields_table INDEX 1 INTO wa_fields_table.
      wa_fields_table-fieldname = 'Region'."#EC NOTEXT
      MODIFY fields_table FROM wa_fields_table INDEX 1.
      CLEAR wa_fields_table.
      READ TABLE fields_table INDEX 2 INTO wa_fields_table.
      wa_fields_table-fieldname = 'Sales'. "#EC NOTEXT
      MODIFY fields_table FROM wa_fields_table INDEX 2.
      CLEAR: sales_table, wa_sales_table.
      wa_sales_table-region = 'USA'(usa).
      wa_sales_table-sales = usa_sales.
      APPEND wa_sales_table TO sales_table.
      CLEAR wa_sales_table.
      wa_sales_table-region = 'Europe'(eur).
      wa_sales_table-sales = europe_sales.
      APPEND wa_sales_table TO sales_table.
      CLEAR wa_sales_table.
      wa_sales_table-region = 'Japan'(jap).
      wa_sales_table-sales = japan_sales.
      APPEND wa_sales_table TO sales_table.
      CLEAR wa_sales_table.
      wa_sales_table-region = 'Asia'(asi).
      wa_sales_table-sales = asia_sales.
      APPEND wa_sales_table TO sales_table.
      CLEAR wa_sales_table.
      wa_sales_table-region = 'America'(ame).
      wa_sales_table-sales = america_sales.
      APPEND wa_sales_table TO sales_table.
      CLEAR wa_sales_table.
      wa_sales_table-region = 'Africa'(afr).
      wa_sales_table-sales = africa_sales.
      APPEND wa_sales_table TO sales_table.
      CLEAR wa_sales_table.
      LOOP AT sales_table INTO wa_sales_table.
        ind = sy-tabix.
        wa_sales_table-date = sy-datum + ind.
        wa_sales_table-time = sy-uzeit + ind.
        wa_sales_table-weight = 100000 * ind.
        wa_sales_table-amount = 11111 * ind.
        wa_sales_table-id = ind.
        MODIFY sales_table FROM wa_sales_table INDEX ind.
      ENDLOOP.
      CALL METHOD table_coll->add_table
                        EXPORTING table_name = 'SALES_OUT'
                                  table_type = table_coll->table_type_output
                        IMPORTING retcode = retcode
                        CHANGING  data_table = sales_table
                                  fields_table = fields_table.
      CALL METHOD link_server->add_table_item2
               EXPORTING item_name = 'Sales'    "#EC NOTEXT
                         item_title = 'Car Sales Figures'(sal)
               IMPORTING retcode = retcode
               CHANGING  data_table = sales_table
                         fields_table = fields_table.
      CALL METHOD link_server->add_string_item
               EXPORTING item_name   = 'ChartTitle'
                         item_title  = 'Chart Title'(ti0)
                         item_value  = 'Car Sales by Region'(ti1)
                         no_flush    = 'X'
               IMPORTING retcode = retcode.
      CALL METHOD link_server->add_string_item
               EXPORTING item_name   = 'ColumnTitle1'
                         item_title  = 'Column Title 1'(ti2)
                         item_value  = 'Region'(ti3)
                         no_flush    = 'X'
               IMPORTING retcode = retcode.
      CALL METHOD link_server->add_string_item
               EXPORTING item_name   = 'ColumnTitle2'
                         item_title  = 'Column Title 2'(ti4)
                         item_value  = 'Sold Cars'(ti5)
                         no_flush    = ' '
               IMPORTING retcode = retcode.
    ENDFORM.

Maybe you are looking for

  • Mail application will not open after upgrading to Yosemite. HELP !!

    After upgrading to Yosemite, my mail will not open... I get the following message; The last time you opened Mail, it unexpectedly quit while reopening windows. Do you want to try to reopen its windows again? Options are Don't Reopen or Reopen....

  • Connecting wirelessly with other computers including pcs in my home network

    my home network is set up wirelessly through my linksys router with 2 pcs (vista) an ibook and an iMac. My pc recognizes the iMac but when I go to open the public folder it says "Windows cannot access...". When I run diagnostics, it says make sure yo

  • VGA adaptor

    I need a VGA adaptor to connect my ipad air to a data show or a projector How much it cost , where can I buy it

  • Generic Object Servises- Workflow overview

    Hi,   In Me53n transacrion, when I am selecting the Workflow-> workflow overview from Generic Object Services(this icon appears in the left where 'Display Purchase Req. XXXXX' appears ). I get a message saying "There are no workflows that have alread

  • Update statement shows error while compiling in forms

    i have the following query which works fine through TOAD,but in forms while compiling it gave error: "too many declarations of 'DECODE' match this call". Can any body suggest me a workaround for this query to avoid this error. UPDATE job_headers_web