JCo using class cl_gui_frontend_services

Hello!
I have a problem with using JCo. For my purposes, I need transfer files from computer, where SAP GUI is working. But no one could argue that when I use JCO on the server, I don't have any SAP GUI. How can I find files on this computer? Using FM like WS_UPLOAD is not appropriate for me. Any advices will be appreciated.

hi,
try to use RFC function: EPS_WRITE_BLOCK...
regards, darek

Similar Messages

  • Can I use the CL_GUI_FRONTEND_SERVICES class in background jobs

    can i use the class CL_GUI_FRONTEND_SERVICES and its methods for the background job purposes...
    Thankyou
    Bhaskar

    Hi Bhaskar,
    normaly it doesn't work in background,
    But there is one solution shown by Srilatha Thirukkovalluri.
    Here the link:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2
    Hope it helps.
    Regards, Dieter

  • How to download a text file using classes

    Hi Guys
    I want to download a text file using classes.
    Any idea how to do it ?
    Thanks
    Sameer

    HI sameer,
       It is no different from using a Function module.
    example:
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                  = w_fpath
        append                    = SPACE
          write_field_separator     = 'X'
        CHANGING
          data_tab                  = it_download
        EXCEPTIONS
          file_write_error          = 1
          no_batch                  = 2
          gui_refuse_filetransfer   = 3
          invalid_type              = 4
          no_authority              = 5
          unknown_error             = 6
          header_not_allowed        = 7
          separator_not_allowed     = 8
          filesize_not_allowed      = 9
          header_too_long           = 10
          dp_error_create           = 11
          dp_error_send             = 12
          dp_error_write            = 13
          unknown_dp_error          = 14
          access_denied             = 15
          dp_out_of_memory          = 16
          disk_full                 = 17
          dp_timeout                = 18
          file_not_found            = 19
          dataprovider_exception    = 20
          control_flush_error       = 21
          not_supported_by_gui      = 22
          error_no_gui              = 23
          OTHERS                    = 24
    Regards,
    ravi

  • Can I use classes and methods for a maintenance view events?

    Hello experts,
    Instead of perform/form, can I instead use classes and methods, etc for a given maintenance view event, lets say for example I want to use event '01' which is before saving records in the database. Help would be greatly appreciated. Thanks a lot guys!

    Hi viraylab,
    1. The architecture provided by maintenance view
       for using EVENTS and our own code inside it -
       It is provided using FORM/PERFORM
       concept only.
    2. At this stage,we cannot use classes.
    3. However, inside the FORM routine,
       we can write what ever we want.
       We can aswell use any abap code, including
       classes and methods.
      (But this classes and methods won't have any
       effect on the EVENT provided by maintenance view)
    regards,
    amit m.

  • How to place header and footer  in OO-ALV program using class

    How to place header and footer  in OO-ALV program using class tell me wat r the class we shold use and their attributes as well

    Hi Venkatesh,
    Take a look at this how to [ABAP Objects - ALV Model - Using Header and Footer|https://wiki.sdn.sap.com/wiki/x/xdw]
    it's explaining how to define the classes and use it for display an ALV with Header and Footer.
    Regards,
    Marcelo Ramos

  • Questions on using classes inside BSP pages

    Hi Group,
    I have a few questions on how to use classes,interfaces,parameters in classes,
    and etc., relating to OOPs concepts that can be implemented in BSPs.
    Pls send me some link wherein I can explore things and use it in BSPs.
    Thanks & Regards,
    Vishnu.

    Hi Raja,
    I am facing issues like this:
    1) When I use the code in my BSP as under:
    <%
    class ZCL_MODEL_03 definition load.
    data ref1 type ref to ZCL_MODEL_03.
    data cust_id type c value "1000".
    data c_id type c.
    create object ref1.
    c_id = cust_id.
    call method ref1->CHECK_CUSTOMER changing cid = cust_id.
    %>
    Cannot we define variables in the Scriptlet?? or we need to do only in the attributes sections only?? or in both??
    2)I am not able to use both exporting & importing things in my method call.
    eg.,call method ref1->GET_CUSTOMER
                      exporting cid = cust_id
                      importing c_id = eid.
    In the method definition, I am only using simply logic like, I was trying to send a value into the "cid" defined in the method and putting that value into "eid" which was defined exporting, but, still I could not get the value into "c_id" that I have defined in the BSP page.
    Note: in both the things(in BSP and class definition as well, I am using the same
            type for defining the attributes.
    3)When can we define a "Returning" option in the Class method's parameter    
       Definition? and how can I use it with an example?
    Thanks in advance.
    Regards,
    Vishnu.

  • Error  while  calling badi using class cl_exithandler with getInstance

    hi experts...we are using SAP ECC 6.0  version
    I have created  BADI Def   and  Implementation using  se18   and se19 with some interface methods..
    Problem:
    I'm writing  a report to call  that using  class CL_EXITHANDLER but it shows an  Exception..
    " Exception condition "DATA_INCONS_IN_EXIT_MANAGEM" raised."
    Report example:
    DATA: CL_EXIT  TYPE REF TO CL_EXITHANDLER,
          IF_USER_INSTANCE TYPE REF TO ZIF_EX_USER_MAILID1.
    CALL METHOD cl_exithandler=>get_instance
      EXPORTING
       EXIT_NAME                       = 'ZBADI_USERMAIL_DEF'
    *    NULL_INSTANCE_ACCEPTED        = SEEX_FALSE
    *  IMPORTING
    *    ACT_IMP_EXISTING              =
      CHANGING
        instance                       = IF_USER_INSTANCE
    *  EXCEPTIONS
    *    NO_REFERENCE                  = 1
    *    NO_INTERFACE_REFERENCE        = 2
    *    NO_EXIT_INTERFACE             = 3
    *    CLASS_NOT_IMPLEMENT_INTERFACE = 4
    *    SINGLE_EXIT_MULTIPLY_ACTIVE   = 5
    *    CAST_ERROR                    = 6
    *    EXIT_NOT_EXISTING             = 7
    *    DATA_INCONS_IN_EXIT_MANAGEM   = 8
    *    others                        = 9
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    so i found that all  EXITs  are in the Table " SXS_ATTR" 
    but  what i have created BADI  has not exist  in that Table so that  it gets  an  Exception(while i'm debugging found this)
    so kindly tel me whats problem my BADI "ZBADI_USERMAIL_DEF"  not maintained that  Database table
    but  in Implentation class  its working fine..

    yes i have created  badi  in  Enhancement spot so  regarding what u told i'm using  GET BADI  and CALL BADI
    DATA:W_HANDLE TYPE REF TO ZBADI_USERMAIL_DEF.
    GET BADI W_HANDLE.
    CALL BADI w_handle->get_user_mailid
      EXPORTING
        uname  = UNAME
      changing
        mailid = W_EMAIL
    WRITE: / 'UNAME:',UNAME.
    WRITE: / 'EMAIL ID',W_EMAIL.
    CALL BADI w_handle->get_user_address_data
      EXPORTING
        uname    = UNAME
      changing
        addrdata = W_ADDRDATA
    IF W_ADDRDATA IS NOT INITIAL.
      WRITE: / W_ADDRDATA-BNAME,W_ADDRDATA-NAME1,W_ADDRDATA-NAME2,W_ADDRDATA-TELPR,W_ADDRDATA-TELNR,W_ADDRDATA-TEL01.
    ENDIF.
    but  here  BADI  are not  called 
    Interface implementation class methods  not  executed  so kindly tel me whats problem here.
    Thanks in Advance
    sivakumar

  • Issue  while sending mails using classes

    Hi Experts ,
    i have one issue when i try to send mails using classes cl_document_bcs,cl_cam_address_bcs,cl_bcs etc
    ISSUE :
    i put some data in selection screen and i get some output ( say i got 5 records), i select 3 records and press some button to trigger mail and mail is send, and now again the OUTPUT screen is  shown with  sended records but we can not send these records again ............ now i selcect remaining two records  and press button to trigger mail and THIS TIME MAIL IS NOT SEND.
    amd my code is :
    CREATE OBJECT l_document.
      CREATE OBJECT l_recipient.
      TRY.
          cl_bcs_convert=>string_to_solix(
          EXPORTING
          iv_string = fp_wa_output
          iv_codepage = fp_v_code_page
          iv_add_bom = 'X'
          IMPORTING
          et_solix = l_wa_output_binary
          ev_size = l_v_size ).
          l_send_request = cl_bcs=>create_persistent( ).
    *-->Creating Document
          l_document = cl_document_bcs=>create_document(
          i_type = 'RAW'
          i_text = fp_it_content[]
          i_subject = fp_text_48 ) .
    *-->Adding Attachment*
          CALL METHOD l_document->add_attachment
            EXPORTING
              i_attachment_type    = fp_text_049
              i_attachment_size    = l_v_size
              i_attachment_subject = fp_v_file
              i_att_content_hex    = l_wa_output_binary.
    *-->Add document to send request*
          CALL METHOD l_send_request->set_document( l_document ).
    *    do send delivery info for successful mails
          CALL METHOD l_send_request->set_status_attributes
            EXPORTING
              i_requested_status = 'E'
              i_status_mail      = 'A'.
    *-->Get Sender Object
          l_uname = sy-uname.
          l_sender = cl_sapuser_bcs=>create( l_uname ).
          CALL METHOD l_send_request->set_sender
            EXPORTING
              i_sender = l_sender.
          LOOP AT fp_s_mail INTO l_wa_mail.
            l_v_objid = l_wa_mail-low.
            l_v_mail = l_v_smtpadr.
            TRANSLATE l_v_mail TO LOWER CASE.
            l_recipient = cl_cam_address_bcs=>create_internet_address( l_v_mail ).
            CALL METHOD l_send_request->add_recipient
              EXPORTING
                i_recipient  = l_recipient
                i_express    = 'X' .
    *            i_copy       = ' '
    *            i_blind_copy = ' '
    *            i_no_forward = ' '.
          ENDLOOP.
    **-->Trigger E-Mail immediately*
    *      IF fp_send_all EQ 'X'.
    *        l_send_request->set_send_immediately( 'X' ).
    *      ENDIF.
          CALL METHOD l_send_request->send(
          EXPORTING
          i_with_error_screen = 'X'
            RECEIVING result = l_v_sent_to_all ).
          BREAK TARK.
          IF l_v_sent_to_all = 'X'.
            MESSAGE i000 .
          ENDIF.
        COMMIT WORK.
        CATCH cx_document_bcs INTO l_bcs_exception.
        CATCH cx_send_req_bcs INTO l_send_exception.
        CATCH cx_address_bcs INTO l_addr_exception.
        CATCH cx_bcs INTO l_exp.
      ENDTRY.
    thanks in advance
    rahul

    Every time when i choose other network or dongle to send those mails it gets sent.
    As per the description, seems it's an issue related to this specific network. Probably, they've adjusted their security policy, like blocked some port numbers, etc.
    You might need to contact the support of your ISP to confirm what SMTP settings you need. Check port number, and security settings.
    By the way, this is the forum to discuss questions and feedback for Windows-based Microsoft Office client. Since your query is directly related to
    Office for mac, I would suggest you to post in the forum of
    Office for Mac, where you can get more experienced responses:
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011?tab=Threads
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Run time error while using Class gcl_error

    Hi All,
    I am getting run time error while using class gcl_error
                                          type REF to zsreport_error_handling:
    '' Attempt to access a component using 'NULL' object reference (points to nothing).
    An object reference must point to an object ( an instance of a class) before you can use it to access components ( variable : ''GCL_ERROR'').
    Either the reference point has not yet been set or it has been reset to 'NULL' by a clear statement."
    Can you please suggest any solution for this ?
    Thanks in advance.

    Dear All
    Its Resolved Thanks For your Valuable time Support
    INCLUDE LV03VFB4 inside below code trigger error.
    PERFORM VVBBD_AUFBAUEN USING WA_AVBBD
                                        WA_AVBBD-APOMOBILE
                                        DA_SUBRC
                                        DA_UPDKZ
                                        DA_VVBBD_TABIX
                                        0.
    This Was the Error some how 0 was there we are removed the 0 now it is working fine
    Rgds
    Thomson

  • Changing fields color in CL_GUI_ALV_GRID using class

    Hi,
    I've written a lot of posts but still I have problem with changing color for CL_GUI_ALV_GRID.
    I have class ZKSL_CL_4_17_ALV_GRID_OO with 3 methods : SELECT, HANDLE_DBL_CLICK AND DISPLAY_ALV
    I want to change fields color every time I double click on IT.
    METHOD SELECT.
       DATA:
             lt_sflight                TYPE TABLE OF           zkslt_sflight,
             ls_layout                 TYPE                    lvc_s_layo,
             lr_custom_container       TYPE REF TO             cl_gui_custom_container,
             lr_my_class               TYPE REF TO             zksl_cl_4_17_alv_grid_oo.
       SELECT *  FROM zkslt_sflight  INTO TABLE mt_sflight
          WHERE carrid    = iv_carrid AND
              ( fldate    IN it_date  OR
                price     IN it_price OR
                planetype IN it_type )
    CALL FUNCTION 'Z_KSL_SCREEN'.
    ENDMETHOD.
    from FM z_ksl_screen i call screen 400 and from status_400 output  I call method DISPLAY_ALV
    METHOD display_alv.
       DATA:
              lr_custom_container       TYPE REF TO             cl_gui_custom_container,
              lt_sflight                TYPE TABLE OF           zkslt_sflight,
              lt_catalog                TYPE STANDARD TABLE OF  lvc_s_fcat,
              ls_catalog                LIKE LINE OF            lt_catalog,
              ls_layout                 type                    slis_layout_alv,
              lr_my_class               TYPE REF TO             zksl_cl_4_17_alv_grid_oo.
       CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
         EXPORTING
           i_structure_name = 'ZKSLT_SFLIGHT'
         CHANGING
           ct_fieldcat      = lt_catalog[].
    ************BULID LAYOUT
       ls_layout-no_input = 'X'.
       ls_layout-colwidth_optimize = 'X'.
       ls_layout-totals_text       = 'Totals(201)'.
       ls_layout-info_fieldname    = 'LINE_COLOR'.
       IF mr_gui_alv_grid IS INITIAL.  "-----------------------------------if----------------------&
         CREATE OBJECT: lr_custom_container
           EXPORTING
             container_name = 'DISPLAY',
             lr_my_class.
         CREATE OBJECT mr_gui_alv_grid
           EXPORTING
             i_parent = lr_custom_container.
         SET HANDLER lr_my_class->handle_dbl_click FOR mr_gui_alv_grid.
         CALL METHOD mr_gui_alv_grid->set_table_for_first_display
           EXPORTING
             i_structure_name = 'ZKSLT_SFLIGHT'
            is_layout        =   ls_layout
             i_save           = 'A'
           CHANGING
             it_outtab        = Mt_sflight
             it_fieldcatalog  = lt_catalog.
       ELSE.     "-------------------------------------------------ELSE---------------------&
         mr_gui_alv_grid->refresh_table_display( ) .
       ENDIF.
    ENDMETHOD.
    In handler i am trying to change fields color and call method display sending new out_table
    CALL METHOD me->display_alv
         CHANGING
           ct_fieldcat = lt_fieldcat.
    Please give me some easy advice how to do that.
    thank you in advice.

    Thank you Klaus for your reply,
    The problem is that I need to make this using classes.
    I tried to make my structure data with LVC_T_SCOL as you wrote,
    a field of table type LVC_T_SCOL in the structure of your output table
    DATA BEGIN OF lt_data. 
           INCLUDE STRUCTURE sflight.
           DATA cellcolors  TYPE lvc_t_scol .
       DATA END OF lt_data.
    TYPES: BEGIN OF mtt_tab.
    *         INCLUDE STRUCTURE ZKLST_sflight.  " I get error that I cannot use ref to abap dic
               INCLUDE TYPE ZKSLT_SFLIGHT.
               TYPES: cellcolors  TYPE lvc_t_scol ,
                 END OF mtt_tab.
    After making type mtt_tab
    i declare data   lt_tab                    TYPE STANDARD TABLE OF  mtt_tab.
    and when I try to copy table mt_sflight (it is atribut of calss) like below
    LOOP AT mt_sflight INTO ls_mt .
    *   READ TABLE lt_tab INDEX sy-tabix ASSIGNING <ls_tab>.
    *   MOVE-CORRESPONDING <ls_mt> TO <ls_tab>.
    *    UPDATE lt_tab FROM TABLE mt_sflight.
         MOVE-CORRESPONDING ls_mt to lt_tab.
       ENDLOOP.
    I am getting error "lt_tab is not internal str or table with header"
    Can you help me with this? 

  • Control problem in trees using class

    Hi all i am creating tree structure using class method in that when i am creating only one node it is working properly but when i try to crate multiple nodes it is giving me dump my program is as follow.
    I search these on sdn and try the things but it still giving me same error.
    *& Report  ZIRPT_HR_TEST_SPLITTER_01
    report  zirpt_hr_test_splitter_01.
    tables : pa0001,t582s.
    select-options : p_pernr for pa0001-pernr no intervals.
    *       CLASS screen_init DEFINITION
    class screen_init definition create private.
      public section.
        class-methods init_screen.
        methods constructor.
      private section.
        data: splitter_h type ref to cl_gui_splitter_container,
        splitter_v type ref to cl_gui_splitter_container,
        picture type ref to cl_gui_picture,
        tree type ref to cl_gui_simple_tree,
         it_pa0001 type table of pa0001,
         it_pa0000 type table of pa0000.
        methods: fill_tree,
        fill_picture.
    endclass.                    "screen_init DEFINITION
    *       CLASS screen_handler DEFINITION
    class screen_handler definition.
      public section.
        methods: constructor importing container
        type ref to cl_gui_container,
        handle_node_double_click
        for event node_double_click
        of cl_gui_simple_tree
        importing node_key.
      private section.
        data: html_viewer type ref to cl_gui_html_viewer,
               it_pa0001 type table of pa0001,
               it_pa0000 type table of pa0000,
        list_viewer type ref to cl_gui_alv_grid.
        methods:
        fill_list importing pernr type pa0001-pernr
                           infty type t582s-infty.
    endclass.                    "screen_handler DEFINITION
    *       CLASS screen_init IMPLEMENTATION
    class screen_init implementation.
      method init_screen.
        data screen type ref to screen_init.
        create object screen.
      endmethod.                    "init_screen
      method constructor.
        data: events type cntl_simple_events,
        event like line of events,
        event_handler type ref to screen_handler,
        container_left type ref to cl_gui_container,
        container_right type ref to cl_gui_container,
        container_top type ref to cl_gui_container,
        container_bottom type ref to cl_gui_container.
        create object splitter_h
        exporting
        parent = cl_gui_container=>screen0
        rows = 1
        columns = 2.
        call method splitter_h->set_border
          exporting
            border = cl_gui_cfw=>false.
        call method splitter_h->set_column_mode
          exporting
            mode = splitter_h->mode_absolute.
        call method splitter_h->set_column_width
          exporting
            id    = 1
            width = 110.
        container_left = splitter_h->get_container( row = 1 column = 1 ).
        container_right = splitter_h->get_container( row = 1 column = 2 ).
        create object splitter_v
        exporting
        parent = container_left
        rows = 2
        columns = 1.
        call method splitter_v->set_border
          exporting
            border = cl_gui_cfw=>false.
        call method splitter_v->set_row_mode
          exporting
            mode = splitter_v->mode_absolute.
        call method splitter_v->set_row_height
          exporting
            id     = 1
            height = 160.
        container_top = splitter_v->get_container( row = 1 column = 1 ).
        container_bottom = splitter_v->get_container( row = 2 column = 1 ).
        create object picture
        exporting parent = container_top.
        create object tree
        exporting parent = container_bottom
        node_selection_mode =
        cl_gui_simple_tree=>node_sel_mode_single.
        create object event_handler
        exporting container = container_right.
        event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
        event-appl_event = ' '.
        append event to events.
        call method tree->set_registered_events
          exporting
            events = events.
        set handler event_handler->handle_node_double_click for tree.
        call method: me->fill_tree,
                     me->fill_picture.
         call method cl_gui_cfw=>flush.
      endmethod.                    "constructor
      method fill_picture.
        types pict_line(256) type c.
        data pict_tab type table of pict_line.
        data url(255) type c.
        data : file type rlgrap-filename value 'C:\Documents and Settings\sapgroup.NITCOWRL\My Documents\nitco.gif'.
        translate file to upper case.
    *CALL FUNCTION 'WS_UPLOAD'
    *EXPORTING
    *filename = file
    *filetype = 'BIN'
    *TABLES
    *data_tab = pict_tab.
        data query_table_wa type w3query.
        data query_table type table of w3query." OF like w3query occurs 1 with header line.
        data html_table type table of w3html."  like w3html occurs 1.
        data return_code type  w3param-ret_code.
        data content_type type  w3param-cont_type.
        data content_length type  w3param-cont_len.
        data pic_data type table of w3mime."  like w3mime occurs 0.
        data pic_size type i.
        refresh query_table.
        query_table_wa-name = '_OBJECT_ID'.
        query_table_wa-value = 'ENJOYSAP_LOGO'.
        append query_table_wa to query_table.
        call function 'WWW_GET_MIME_OBJECT'
          tables
            query_string        = query_table
            html                = html_table
            mime                = pic_data
          changing
            return_code         = return_code
            content_type        = content_type
            content_length      = content_length
          exceptions
            object_not_found    = 1
            parameter_not_found = 2
            others              = 3.
        if sy-subrc = 0.
          pic_size = content_length.
        endif.
        call function 'DP_CREATE_URL'
          exporting
            type     = 'image'
            subtype  = cndp_sap_tab_unknown
            size     = pic_size
            lifetime = cndp_lifetime_transaction
          tables
            data     = pic_data
          changing
            url      = url
          exceptions
            others   = 1.
    *IMPORT pict_tab = pict_tab FROM DATABASE abtree(pi) ID 'FLIGHTS'.
    *CALL FUNCTION 'DP_CREATE_URL'
    *EXPORTING
    *type = 'IMAGE'
    *subtype = 'GIF'
    *TABLES
    *data = pict_tab
    *CHANGING
    *url = url.
        call method picture->load_picture_from_url
          exporting
            url = url.
        call method picture->set_display_mode
          exporting
            display_mode = picture->display_mode_fit_center.
    *     CALL METHOD cl_gui_cfw=>flush.
      endmethod.                    "fill_picture
      method fill_tree.
        data: node_table type table of abdemonode,
        node type abdemonode.
    *data : it_pa0001 TYPE TABLE OF p0001,
        data :wa_pa0001 type pa0001,
              wa_pa0000 type pa0000,
              it_t582s type table of t582s,
              wa_t582s type t582s.
        types : begin of ttab,
                 itext type t582s-itext,
                 infty type t582s-infty,
                 pernr type p0001-pernr,
                 end of ttab.
        data : itab type table of ttab,
               wa_tab type ttab.
          field-symbols : <fs> like p_pernr.
          data : text1 type c.
        node-hidden = ' '.
        node-disabled = ' '.
        node-isfolder = 'X'.
        node-expander = ' '.
        select * from t582s
                 into corresponding fields of table it_t582s
                 where sprsl = sy-langu
                   and infty in ('0001','0000')."'0002','0006',
    *                         '0008','0015','0019').
        loop at it_t582s into wa_t582s .
          move-corresponding wa_t582s to wa_tab.
          node-node_key = wa_t582s-infty.
          clear node-relatkey.
          clear node-relatship.
          node-text = wa_t582s-itext.
          node-n_image = ' '.
          node-exp_image = ' '.
          append node to node_table.
          loop at p_pernr assigning <fs>.
            wa_tab-pernr = <fs>-low.
            append wa_tab to itab.
            clear p_pernr-low.
            node-node_key = <fs>-low.
            node-relatkey = wa_tab-infty.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
            node-text = <fs>-low.
            node-n_image = '@AV@'.
            append node to node_table.
          endloop.
    *        SELECT SINGLE * FROM pa0001 INTO wa_pa0001 WHERE pernr in p_pernr.
    *     WHEN '0000'.
    *        SELECT SINGLE * FROM pa0000 INTO wa_pa0000 WHERE pernr = p_pernr.
    *    wa_tab-pernr = wa_pa0000-pernr.
    *    endcase.
          clear : wa_tab,wa_pa0001,wa_pa0000.
        endloop.
    *node-hidden = ' '.
    *node-disabled = ' '.
    *node-isfolder = 'X'.
    *node-expander = ' '.
    *LOOP AT itab INTO wa_tab.
    *AT NEW infty.
    *node-node_key = wa_tab-infty.
    *CLEAR node-relatkey.
    *CLEAR node-relatship.
    *node-text = wa_tab-itext.
    *node-n_image = ' '.
    *node-exp_image = ' '.
    *APPEND node TO node_table.
    *ENDAT.
    *AT NEW pernr.
    * node-node_key = wa_tab-pernr.
    *node-relatkey = wa_tab-infty.
    *node-relatship = cl_gui_simple_tree=>relat_last_child.
    *node-text = wa_tab-pernr.
    *node-n_image = '@AV@'.
    *node-exp_image = '@AV@'.
    *ENDAT.
    *APPEND node TO node_table.
    *ENDLOOP.
        call method tree->add_nodes
          exporting
            table_structure_name = 'ABDEMONODE'
            node_table           = node_table.
    *    CALL METHOD cl_gui_cfw=>flush.
      endmethod.                    "fill_tree
    endclass.                    "screen_init IMPLEMENTATION
    *       CLASS screen_handler IMPLEMENTATION
    class screen_handler implementation.
      method constructor.
        create object: html_viewer exporting parent = container,
        list_viewer exporting i_parent = container.
      endmethod.                    "constructor
      method handle_node_double_click.
        data: infty type t582s-infty,
              pernr type pa0001-pernr.
        infty = node_key(4).
        pernr = node_key+4(8).
    *IF pernr IS INITIAL.
    *CALL METHOD: fill_html EXPORTING infty = infty,
    *html_viewer->set_visible EXPORTING visible = 'X',
    *list_viewer->set_visible EXPORTING visible = ' '.
    *ELSE.
        call method: fill_list exporting infty = infty
                                         pernr = pernr,
        list_viewer->set_visible exporting visible = 'X',
        html_viewer->set_visible exporting visible = ' '.
    *ENDIF.
    *    CALL METHOD cl_gui_cfw=>flush.
      endmethod.                    "handle_node_double_click
    *METHOD fill_html.
    *DATA url TYPE scarr-url.
    *SELECT SINGLE url
    *FROM scarr
    *INTO url
    *WHERE infty = infty.
    *CALL METHOD html_viewer->show_url EXPORTING url = url.
    *ENDMETHOD.
      method fill_list.
        data: flight_tab type table of demofli,
        begin of flight_title,
        carrname type scarr-carrname,
        cityfrom type spfli-cityfrom,
        cityto type spfli-cityto,
        end of flight_title,
        list_layout type lvc_s_layo.
    *DATA : it_pa0001 TYPE TABLE OF p0001.
        if infty = '0001'.
          select * from pa0001 into table it_pa0001 where pernr = pernr.
        elseif infty = '0000'.
          select * from pa0001 into table it_pa0001 where pernr = pernr.
        endif.
    *SELECT SINGLE c~carrname p~cityfrom p~cityto
    *INTO CORRESPONDING FIELDS OF flight_title
    *FROM ( scarr AS c
    *INNER JOIN spfli AS p ON c~carrid = p~carrid )
    *WHERE p~carrid = carrid AND
    *p~connid = connid.
    *SELECT fldate seatsmax seatsocc
    *INTO CORRESPONDING FIELDS OF TABLE flight_tab
    *FROM sflight
    *WHERE carrid = carrid AND connid = connid
    *  ORDER BY fldate.
    *CONCATENATE flight_title-carrname
    *connid
    *flight_title-cityfrom
    *flight_title-cityto
        list_layout-grid_title = 'TEST'.
        list_layout-smalltitle = 'X'.
        list_layout-cwidth_opt = 'X'.
        list_layout-no_toolbar = 'X'.
    *if infty = '0001'.
        call method list_viewer->set_table_for_first_display
          exporting
            i_structure_name = 'PA0001'
            is_layout        = list_layout
          changing
            it_outtab        = it_pa0001.
    * CALL METHOD cl_gui_cfw=>flush.
    *ELSEIF infty = '0001'.
    *CALL METHOD list_viewer->set_table_for_first_display
    *EXPORTING i_structure_name = 'PA0000'
    *is_layout = list_layout
    *CHANGING it_outtab = it_pa0000.
    *endif.
      endmethod.                    "fill_list
    endclass.                    "screen_handler IMPLEMENTATION
    start-of-selection.
      data : it_pa0001 type table of p0001.
      call screen 100.
    *  MODULE status_0100 OUTPUT
    module status_0100 output.
      set pf-status 'SCREEN_100'.
      set titlebar 'TIT_100'.
      call method screen_init=>init_screen.
    *   CALL METHOD cl_gui_cfw=>flush.
    endmodule.                    "status_0100 OUTPUT
    *  MODULE cancel INPUT
    module cancel input.
      set screen 0.
      leave program.
    endmodule.                    "cancel INPUT
    Plz Suggest ,
    Regards ,
    Paresh G.

    METHOD fill_tree.
        DATA: node_table TYPE TABLE OF abdemonode,
        node TYPE abdemonode.
    *data : it_pa0001 TYPE TABLE OF p0001,
        DATA :wa_pa0001 TYPE pa0001,
              wa_pa0000 TYPE pa0000,
              it_t582s TYPE TABLE OF t582s,
              wa_t582s TYPE t582s.
        TYPES : BEGIN OF ttab,
                 itext TYPE t582s-itext,
                 infty TYPE t582s-infty,
                 pernr TYPE p0001-pernr,
                 END OF ttab.
        DATA : itab TYPE TABLE OF ttab,
               wa_tab TYPE ttab.
          FIELD-SYMBOLS : <fs> LIKE p_pernr.
          DATA : text1 TYPE c.
        node-hidden = ' '.
        node-disabled = ' '.
        node-isfolder = 'X'.
        node-expander = ' '.
        SELECT * FROM t582s
                 INTO CORRESPONDING FIELDS OF TABLE it_t582s
                 WHERE sprsl = sy-langu
                   AND infty IN ('0001','0000')."'0002','0006',
                            '0008','0015','0019').
        LOOP AT it_t582s INTO wa_t582s .
          MOVE-CORRESPONDING wa_t582s TO wa_tab.
          node-node_key = wa_t582s-infty.
          CLEAR node-relatkey.
          CLEAR node-relatship.
          node-text = wa_t582s-itext.
          node-n_image = ' '.
          node-exp_image = ' '.
          APPEND node TO node_table.
          LOOP AT p_pernr ASSIGNING <fs>.
            wa_tab-pernr = <fs>-low.
            APPEND wa_tab TO itab.
            CLEAR p_pernr-low.
            node-node_key = <fs>-low.
            node-relatkey = wa_tab-infty.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
            node-text = <fs>-low.
            node-n_image = '@AV@'.
            APPEND node TO node_table.
          ENDLOOP.
    CLEAR : wa_tab,wa_pa0001,wa_pa0000.
        ENDLOOP.
    CALL METHOD tree->add_nodes
          EXPORTING
            table_structure_name = 'ABDEMONODE'
            node_table           = node_table.
       CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.                    "fill_tree

  • How to connect to R/3 via JCo using MYSAPSSO2?

    Hello!
    I'm developing a J2EE application who resides in an EP with Single Sign On. I have to retrieve some data from R/3, the way I want to connect is via JCo using MYSAPSSO.
    I have read that is possible to connect passing MYSAPSSO2 as <i>user</i> and its value as <i>password</i>. The java code in the jsp is something like this:
    javax.servlet.http.Cookie [] my_cookies = request.getCookies();
    java.util.Hashtable cks = new Hashtable();
    for(int i=0;i<my_cookies.length;i++){
         cks.put(my_cookies<i>.getName(),java.net.URLDecoder.decode(my_cookies<i>.getValue()));
    String user = "$MYSAPSSO2$";
    String pass = (String)cks.get("MYSAPSSO2");
    JCO.Client conex;
    JCO.Repository rep;
    boolean ok=true;
    conex = JCO.createClient("000",user,pass,"es","192.168.0.1","00","","");
    try{
         conex.connect();
         rep = new JCO.Repository("mirep",conex);
    } catch (Exception e){
         out.write("<br>"e"<br>");
         ok = false;
    if (ok)
         conex.disconnect();
    We are working with EP6 SP2, WAS 6.20.
    The error is:
    com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Se ha recibido un ticket SSP que no se puede interpretar
    (I translate you:)
    RFC_ERROR_LOGON_FAILURE: unable to interpret a retrieved SSP ticket
    Thank you all!!

    Ok!
    I have solve the problem. So, I was trying to connect via SSO within an user that was not registered in R/3 and I forgot it.
    Sorry for the inconvenience.

  • How to use Class "CL_GUI_CHART_ENGINE" in a abap program ?

    Hi Guys,
    I want to display data in my internal table in the form of a Graph using class "cl_gui_chart_engine".
    I had a look at sample program given by SAP - GRAPHICS_GUI_CE_DEMO but need some help to understand how can we use our own data to be displayed in the graph ? Basically what I am looking for is that where we need to do the changes in creation of XML file so that we can pass our own data ?
    ( perform create_data_demo using l_ixml_data_doc)
    Could you please help me with some sample code or pseudocode ?
    Thanks
    Ashwa

    Thanks Kai,
    I had already done the same thing and got the required output.
    Populate X-Axis ( Categories )
      LOOP AT ITAB.
    Populate Categories
        l_element = p_ixml_doc->create_simple_element(
                  name = 'C' parent = l_categories ).
        l_element->if_ixml_node~set_value( itab-value).
      ENDLOOP.
    Populate Y-Axis ( Values )
      LOOP AT VALUE_TAB.
       l_element = p_ixml_doc->create_simple_element(
                 name = 'S' parent = l_series ).
        l_element->if_ixml_node~set_value( value_tab-value).
      ENDLOOP.
    I am now trying to find the ways to change the default layout of the graph. I guess it should be done in "perform create_custom_demo using l_ixml_custom_doc." . I want that my graph should be displayed as lines instead of bar's.
    Once I achieve this I will share my findings along with sample code with the community.
    I wish I could get some documentation on class "cl_gui_chart_engine" and interfaces like "if_ixml_document".
    Thanks
    Ashwani

  • Error in field catalog in ALV grid display using classes at do_sum = "X'.

    Hi,
    I'm using classes in ALV Grid display.
    the code for the field catalog is going to dump because of the statement in the field catalog for field 'netwr',do_sum = 'X'.
    that do_sum = 'X' is not working and going to dump when executed.with out that do_sum it is working fine. the error in dump analysys is showing sap standard incude LSLVCF01.
        assign component
               <ls_fieldcat>-fieldname of structure rt_data to <g_field>.
        if sy-subrc ne 0.
          message x000(0k).
        endif.
    sy-subrc is 4 when the program is being executed.
    CODE:
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      ls_fcat-fieldname = 'VBELN1'.
      ls_fcat-ref_field = 'VBELN'.
      ls_fcat-ref_table = 'VBRK'.
      ls_fcat-coltext = 'Invoice No'.
      ls_fcat-seltext = 'Invoice No'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR ls_fcat.
      ls_fcat-fieldname = 'BUDAT'.
      ls_fcat-ref_table = 'BKPF'.
      ls_fcat-coltext = 'Invoice Date'.
      ls_fcat-seltext = 'Invoice Date'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR ls_fcat.
    ls_fcat-fieldname = 'NETWR'.
      ls_fcat-ref_field = 'NETWR'.
      ls_fcat-ref_table = 'VBRK'.
      ls_fcat-coltext = 'Value of Invoice'.
      ls_fcat-seltext = 'Value of Invoice'.
      ls_fcat-datatype = 'CURR'.
      ls_fcat-do_sum = 'X'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR ls_fcat.
    ENDFORM.
    can u please look in the code and rectify the error,
    would appeciate ur response.
    regards,
    veera.

    Hi,
    try this..
    ls_fcat-fieldname = 'NETWR'.
    ls_fcat-ref_field = 'NETWR'.
    ls_fcat-ref_table = 'VBRK'.
    ls_fcat-coltext = 'Value of Invoice'.
    ls_fcat-seltext = 'Value of Invoice'.
    ls_fcat-datatype = 'CURR'.
    ls_fcat-do_sum = 'X'.
    <b>ls_fcat-cfieldname = 'WAERS'.</b>
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    Regards
    vijay

  • Error When Using Class :(

    Hey,
    Class:
    package
        import flash.display.MovieClip;
        import flash.events.Event;
        public class Main extends MovieClip
            public var enemyA:Array = [];
            public var birdA:Array = [];
            public var rowNum:int = 2;
            private var gap:int = 100;
            private var obj_no = 2;
            public var enemy1:mychar = new mychar();
            public var TheBird:BirdChar = new BirdChar();
            public function Main()
                // constructor code
                createEnemyF();
                createBirdF();
                this.addEventListener(Event.ENTER_FRAME,loopF);
            public function createEnemyF()
                for (var i:int = 0; i < rowNum; i++)
                    for (var j:int = 0; j < obj_no; j++)
                        enemy1.x = Math.random() * stage.stageWidth - enemy1.width;
                        enemy1.y = - i * (gap + enemy1.height) - 30.65;
                        enemyA.push(enemy1);
                        addChild(enemy1);
            public function createBirdF() {
                TheBird.x = 270.95;
                TheBird.y = 350.95;
                birdA.push(TheBird);
                addChild(TheBird);
            public function loopF(event:Event) {
                updateEnemyPositionsF();
                updateBirdPositionsF();
                hitTestF();
            public function updateEnemyPositionsF() {
                enemy1.y +=  2;
            public function updateBirdPositionsF() {
                TheBird.x = mouseX;
            public function hitTestF() {
                if(TheBird.hitTestObject(enemy1))
                    gotoAndPlay(5);
                    trace('The Bird Hit Enemy 1');
    This conflicts and causes this error:
    1046: Type was not found or was not a compile-time constant: MouseEvent
    ^ ^ Code repeats to all of my event listeners
    Thanks for your time.

    Thanks, i thought it might be this because of previous problems but i seen i already had : import flash.events.Event; so i thought that would be OK!
    Second Error:
    1180: Call to an undefined method Timer.
    I think this is the same sort of thing but what to import to fix this?
    So far these are my imports:
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.events.TimerEvent;
    Thanks for helping.
    Date: Thu, 3 Nov 2011 05:36:22 -0600
    From: [email protected]
    To: [email protected]
    Subject: Error When Using Class
        Re: Error When Using Class
        created by markerline in Flash Pro - General - View the full discussion
    Looks like you imported events.Event but not events.MouseEvent (or some similar syntax) basically you must import MouseEvents separately from other Events.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4005227#4005227
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4005227#4005227. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for