DropdownByKey inside ALV Table - Problem with Value set

Hi,
I have Component A which has a custom controller that uses the interface controller of the ALV Component.
Custom controller has node ITAB.. that has certain attributes...
I want DropdownByKey inside the ALV Table column. I am populating the corresponding attribute of ITAB node with the value set that I want the drop down to have.
However when I execute the application..I get error
" Key XXX not present in Value Set and is not initial"
XXX is present in the Value Set table of the attribute.
<b>Following is my code in the methods of CUSTOM CONTROLLER</b>
<u>Generate Value Set</u>
nodeinfo_context = wd_context->get_node_info( ).
nodeinfo_ITAB= nodeinfo_context->get_child_node( wd_this->wdctx_ITAB ).
<u> Populate the Value Set</u>
data ls_valueset type wdy_key_value.
data it_valueset type wdy_key_value_table.
ls_valueset-key = 'FRA'.
ls_valueset-value = 'FRANCE'.
Append ls_valueset to it_valueset.
ls_valueset-key = 'SFO'.
ls_valueset-value = 'SAN FRANCISCO'.
Append ls_valueset to it_valueset.
<u>Set the Value Set for the Attribute</u>
call method nodeinfo_ITAB->SET_ATTRIBUTE_VALUE_SET
              EXPORTING
                 NAME = <b>'ATTR1'</b>
                 VALUE_SET = it_valueset.
<u>Changing ALV Column</u>
Get the ALV Configuration Model
  ifc_alv2 = wd_this->wd_cpifc_alv2( ).
  itab_alv2_config = ifc_alv2->get_model( ).
  itab_alv2_config->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_false ).
<u>Get the Column reference for ATTR1</u> 
ref_alv2_colset = itab_alv2_config->if_salv_wd_column_settings~get_column( <b>'ATTR1'</b> ).
<u>Create the DropDownByKey Object</u>
CREATE OBJECT ref_dropdownkey
          exporting SELECTED_KEY_FIELDNAME = ref_alv2_colset->id.
  ref_dropdownkey->SET_SELECTED_KEY_FIELDNAME( <b>ref_alv2_colset->id</b> ).
  ref_alv2_colset->SET_CELL_EDITOR( <b>ref_dropdownkey</b> ).
<u>Check the value set</u>
  ref_attr_info = nodeinfo_flight_details2->get_attribute( ref_alv2_colset->id ).
I do get back the value set if I see ref_attr_info->value_set.
SO the Value Set is getting set for attribute ATTR1, but still I get Error
<b>"The value selectedKey = "SFO" in DropDownByKey "_8C" does not exist in the value list and is not initial either "</b><u></u>
SAP  User

You have forgotten to set a cell variant. I had the same with setting a ProgressIndicator cell-editor to a table column as default editor. This causes the column to be hidden on the table while it did show up in the settings dialog. I removed the set_editor( lr_progressindicator) and created a cell variant instead with this lr_progressindicator. You then need to add this cell variant to your column. By default it will select the standard viewtext-cell-editor (which can only be textview and inputfield, like when you create a table yourself in a view), but if you use a cell variant, it will display the required cell editor if you set it (last line of the code).
<b>In your case, replace lr_progressindicator by your ref_dropdownkey.</b>
  DATA: lr_column_settings    TYPE REF TO if_salv_wd_column_settings,
        lr_column             TYPE REF TO cl_salv_wd_column,
        lr_column_header      TYPE REF TO cl_salv_wd_column_header,
        lr_cellvar            TYPE REF TO cl_salv_wd_cv_standard,
        l_cellvar             TYPE string,
        lr_progress_indicator TYPE REF TO cl_salv_wd_uie_progr_indicator.
  lr_column_settings ?= wd_this->mr_table.
  lr_column = lr_column_settings->get_column( 'STATUSBAR' ).
  lr_column_header = lr_column->get_header( ).
  lr_column_header->set_text( 'Completed' ).
CREATE OBJECT lr_cellvar.
  l_cellvar = 'CV_SB'.
  lr_cellvar->set_key( l_cellvar ).
  CREATE OBJECT lr_progress_indicator.
  lr_progress_indicator->set_percent_value_fieldname( 'STATUSBAR' ).
  lr_progress_indicator->set_tooltip( 'completed' ).
  lr_cellvar->set_editor( lr_progress_indicator ).
  lr_column->add_cell_variant( lr_cellvar ).
  lr_column->set_selected_cell_variant( l_cellvar ).
I hope this will solve your issues.

Similar Messages

  • Problem with subform set

    Hi all ,
    I am facing a problem with subform set. When i use two subform sets with same set of conditions in a form, only the first subform set works while the second one does nothing. Did any of you faced the same problem ? If so Please let me know the solution you came up with. Thanks.
    SrPrabhu

    Hi scott,
    The problem is with subform set and not subform. In subform set, we can give conditions to make only one subform visible at a time that satisfies the condition. First create a subform set having more than one subform. Now apply the conditions to that subform set. Check if it works. I m sure it wil work. Now just make a duplicate copy of the same subform set. Place it in the same form so that now two subform sets are available. Now preview the form. U wil fine only one subform set working and the other one doesnt.
    We can use any number of subform set within a form. If different conditions are applied to each subform set , it works fine.
    i wonder now wat wud u do in case if we are in need of two subformset having the same condition in a form ?
    Thanks,
    Sr Prabhu

  • Weird Problem with FSB setting

    Hi all,
    I've just come across a weird problem with FSB setting.
    If I set FSB to 229 my machine runs @ 1.6Ghz only.
    When I set to 230 it runs @ 3.2Ghz (as it should).
    Any ideas what could be causing this?
    Thanks
    Mick

    If FSB @ =
      Strange thing.. What a magical 1MHz  

  • ALV GRID Problem with reading contents

    Hi there! I'm quite new with ABAP and I have some problems with the syntax of it. Maybe I should first describe my aim and then I'll show you my code.
    1. I read contents from two database tables, called 'zbc_dan_registry' and 'zbc_dan_category'.
    'zbc_dan_registry' has 2 columns: name, value.
    zbc_dan_category' has 1 column: category.
    Now I want to have an ALV Grid, that displays the contents of 'zbc_dan_registry' and one additional column with dropdown fields, where the user can select a category for each row. This is, what my code already does.
    Now I want to save the contents of the whole table in a new table 'zbc_dan_registrz' (you see: 'registrz', not 'registry'!) with 3 columns:
    name, category, value.
    My problem is, how can I read the contents of the ALV Grid, with the user selected category for each row, and save them in an internal table? I've tried to adapt the code of "BCALV_EDIT_04", but I don't get it running.
    Some detailled help would be great, you know, I'm really working hard to understand ABAP, but it's really hard for me. Thanks for your support and help!!
    Here's my code so far:
    *& Report  ZBC400_DAN_TESTNO4
    REPORT  ZBC400_DAN_TESTNO4.
    DATA: lt_registrz TYPE TABLE OF zbc_dan_regstrz WITH HEADER LINE,
          lt_category TYPE TABLE OF zbc_dan_category WITH HEADER LINE,
          ls_category TYPE zbc_dan_category, "Struktur Kategorie
          ok_code LIKE sy-ucomm,
          container_r TYPE REF TO cl_gui_custom_container,
          grid_r TYPE REF TO cl_gui_alv_grid,
          gc_custom_control_name TYPE scrfname VALUE 'CONTAINER_REG',
          fieldcat_r TYPE lvc_t_fcat,
          layout_r TYPE lvc_s_layo,
          lt_ddval TYPE lvc_t_drop,
          ls_ddval TYPE lvc_s_drop,
          c TYPE i.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
      DATA g_verifier TYPE REF TO lcl_event_receiver.
      DATA: BEGIN OF gt_outtab OCCURS 0.
        INCLUDE STRUCTURE zbc_dan_regstrz.
        DATA: celltab TYPE lvc_t_styl.
      DATA: END OF gt_outtab.
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
      TYPES: BEGIN OF lt_registrz_key.         "Struktur mit den Schlüsseln der Tabelle 'Registry'
        TYPES:  name TYPE zbc_dan_name,
                value TYPE zbc_dan_value,
                category TYPE zbc_dan_cat.
      TYPES: END OF lt_registrz_key.
      TYPES:  ls_registrz_keys TYPE STANDARD TABLE OF lt_registrz_key,
              ls_registrz_table TYPE STANDARD TABLE OF zbc_dan_regstrz.
      METHODS: get_inserted_rows EXPORTING inserted_rows TYPE ls_registrz_keys.
      METHODS: refresh_delta_tables.
      METHODS: handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING er_data_changed.
    *  METHODS: get_inserted_rows EXPORTING inserted_rows TYPE registrz_keys.
    *  METHODS: refresh_delta_tables.
      PRIVATE SECTION.
      DATA: inserted_rows TYPE ls_registrz_keys.
      DATA: error_in_data TYPE c.
      METHODS: get_cell_values IMPORTING row_id TYPE int4 pr_data_changed TYPE REF TO cl_alv_changed_data_protocol EXPORTING key TYPE lt_registrz_key.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_data_changed.
        DATA: ls_good TYPE lvc_s_modi,
              ls_new TYPE lvc_s_moce.
        error_in_data = space.
        IF error_in_data = 'X'.
          CALL METHOD er_data_changed->display_protocol.
        ENDIF.
      ENDMETHOD.
      METHOD get_cell_values.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING i_row_id = row_id i_fieldname = 'NAME'
            IMPORTING e_value = key-name.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING i_row_id = row_id i_fieldname = 'VALUE'
            IMPORTING e_value = key-value.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING i_row_id = row_id i_fieldname = 'CATEGORY'
            IMPORTING e_value = key-category.
      ENDMETHOD.
      METHOD get_inserted_rows.
        inserted_rows = me->inserted_rows.
      ENDMETHOD.
      METHOD refresh_delta_tables.
        clear me->inserted_rows[].
      ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
        SELECT client name value
          INTO CORRESPONDING FIELDS OF TABLE lt_registrz FROM zbc_dan_regstry.
        SELECT category INTO CORRESPONDING FIELDS OF TABLE lt_category FROM zbc_dan_category.
    CALL SCREEN 0100.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'BACK'.
          SET SCREEN 0.
          MESSAGE ID 'BC400' TYPE 'S' NUMBER '057'.
        WHEN 'SAVE'.
          PERFORM save_data.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'DYNPRO100'.
      SET TITLEBAR 'D0100'.
    ENDMODULE.
    MODULE display_alv OUTPUT.
      PERFORM display_alv.
    ENDMODULE.
    FORM display_alv.
    IF grid_r IS INITIAL.
    *----Creating custom container instance
      CREATE OBJECT container_r
      EXPORTING
        container_name = gc_custom_control_name
      EXCEPTIONS
        cntl_error = 1
        cntl_system_error = 2
        create_error = 3
        lifetime_error = 4
        lifetime_dynpro_dynpro_link = 5
        others = 6.
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Creating ALV Grid instance
        CREATE OBJECT grid_r
        EXPORTING
          i_parent = container_r
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init = 2
          error_cntl_link = 3
          error_dp_create = 4
          others = 5.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          CREATE OBJECT g_verifier.
          SET HANDLER g_verifier->handle_data_changed FOR grid_r.
    *----Preparing field catalog.
          PERFORM prepare_field_catalog CHANGING fieldcat_r.
    *----Preparing layout structure
          PERFORM prepare_layout CHANGING layout_r.
    *----Here will be additional preparations
    *--e.g. initial sorting criteria, initial filtering criteria, excluding
    *--functions
          CALL METHOD grid_r->set_table_for_first_display
          EXPORTING
    * I_BUFFER_ACTIVE =
    * I_CONSISTENCY_CHECK =
    * I_STRUCTURE_NAME =
    * IS_VARIANT =
    * I_SAVE =
    * I_DEFAULT = 'X'
            is_layout = layout_r
    * IS_PRINT =
    * IT_SPECIAL_GROUPS =
    * IT_TOOLBAR_EXCLUDING =
    * IT_HYPERLINK =
          CHANGING
            it_outtab = lt_registrz[]
            it_fieldcatalog = fieldcat_r
    * IT_SORT =
    * IT_FILTER =
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error = 2
            too_many_lines = 3
            OTHERS = 4.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          ELSE.
            CALL METHOD grid_r->refresh_table_display
    * EXPORTING
    * IS_STABLE =
    * I_SOFT_REFRESH =
          EXCEPTIONS
            finished = 1
            OTHERS = 2.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
        ENDIF.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    ENDFORM.
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
        i_structure_name = 'ZBC_DAN_REGSTR2'
      CHANGING
        ct_fieldcat = pt_fieldcat[]
      EXCEPTIONS
        inconsistent_interface = 1
        program_error = 2
        OTHERS = 3.
      IF sy-subrc <> 0.
    *--Exception handling
      ENDIF.
      LOOP AT pt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'NAME'.
            ls_fcat-coltext = 'Name'.
            ls_fcat-outputlen = '40'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'VALUE'.
            ls_fcat-coltext = 'Wert'.
            ls_fcat-outputlen = '30'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'CATEGORY'.
              LOOP AT lt_category into ls_category.
                ls_ddval-handle = 1.
                ls_ddval-value = ls_category-category.
    *            ls_ddval-style = cl_gui_alv_grid=>mc_style_enabled.
                APPEND ls_ddval TO lt_ddval.
             ENDLOOP.
             CALL METHOD grid_r->set_drop_down_table
                EXPORTING it_drop_down = lt_ddval.
            ls_fcat-edit = 'X'.
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-coltext = 'Kategorie'.
            MODIFY pt_fieldcat FROM ls_fcat.
        ENDCASE.
      ENDLOOP.
    ENDFORM.
    FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
      ps_layout-zebra = 'X'.
      ps_layout-grid_title = 'Kategorie zur Registry hinzufügen'.
      ps_layout-smalltitle = 'X'.
    ENDFORM.
    FORM save_data.
      DATA: ls_ins_keys TYPE g_verifier->ls_registrz_keys,
            ls_ins_key TYPE g_verifier->lt_registrz_key,
            ls_registrz TYPE zbc_dan_regstrz,
            ls_outtab LIKE LINE OF gt_outtab,
            lt_instab TYPE TABLE OF zbc_dan_regstrz.
      CALL METHOD g_verifier->get_inserted_rows IMPORTING inserted_rows = ls_ins_keys.
      LOOP AT ls_ins_keys INTO ls_ins_key.
        READ TABLE gt_outtab INTO ls_outtab
        WITH KEY  name = ls_ins_key-name
                  value = ls_ins_key-value
                  category = ls_ins_key-category.
        IF sy-subrc = 0.
          MOVE-CORRESPONDING ls_outtab TO ls_registrz.
          APPEND ls_registrz TO lt_instab.
        ENDIF.
      ENDLOOP.
      INSERT zbc_dan_regstrz FROM TABLE lt_instab.
      CALL METHOD g_verifier->refresh_delta_tables.
      ENDFORM.

    Hi Hans,
    You raised the Question in the Webdynpro ABAP forum. Here its very diffcult to get the answer from this forum. Please close it here and raise the same question in ABAP General Forum there you will get faster and so many anwsers.
    Please close the question here.
    Warm Regards,
    Vijay

  • Unable to handle event --Select-Options as Dropdown filled with Value Set

    Hi all,
    I seem to be having no luck with this problem. I have searched enough, and not come across any relevant documentation either.
    I am using a select options field made as a dropdown and am populating the dropdown values using the Value Set where i can provide a table of key values versus descriptions. Additionaly, I have hidden the standard buttons -- CANCEL, CHECK, RESET, EXECUTE.
    This appears exactly like a dropdown, just as desired.
    However, no event seems to be triggered whenever I select any value from this dropdown field.
    The interface controller of the select-options component offers 5 events and I have tried creating event handlers for all of these; with no success. With no event to track, I am frozen.
    I know I may be able to create such a dropdown list without using select-options either; but the point is if this functionality is provided by select-options, there should be a way of using it.
    I have browsed through the helper class as well as the interface controller, but am not getting a clue.
    The bottomline is, with my current situation, how can i track the on-click or on-change kind of event?
    Could anybody melt the ice?
    Thanks.

    I went to the source code of the select-options class (CL_WDR_SELECT_OPTIONS) and found the method where the UI elements are rendered (RENDER_SELECTION_SCREEN_ITEM).  In the spot where the DDLB is rendered, there is simply no code to register any events for the DDLB.  So it doesn't appear that there is any intention to allow you to handle such events from the DDLB.
    => add the dropdown as dropdownbykey
            prefix_id mc_dropdown_id i_field-m_id id.
            concatenate i_field-m_id '.VALUE' into path.
            lr_dropdown = cl_wd_dropdown_by_key=>new_dropdown_by_key(
                            id                = id
                            bind_selected_key = path
                            read_only         = i_field-m_read_only
                            state             = state
                            explanation       = i_field-m_explanation
                            tooltip           = i_field-m_tooltip
                            view              = lr_cur_container->view ).
            lr_label_low->set_label_for( id ).
            lr_matrix_data = cl_wd_matrix_data=>new_matrix_data( element = lr_dropdown width = '1%' ).
            lr_dropdown->set_layout_data( lr_matrix_data ).
            lr_cur_container->add_child( lr_dropdown ).

  • Delete_header in ALV causes PROBLEMS with export to MS Excel

    hello:)
    Displaying the ALV table I deleted the headers with
    ->delete_header( ).
    function. Why? I misuse the lines as headers, so I can have a table with many headers in the middle of my alv.
    Than, in the explorer/firefox I wanted to export the avl to excel and I got this:
    ==========================================================
    Note
    The following error text was processed in the system X12 : <b><i>Access via 'NULL' object reference not possible.</i> </b>
    The error occurred on the application server bisata53_X12_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_SALV_WD_EXPORT_XML~COLLECT_COLUMN of program CL_SALV_WD_XML_20=============CP
    Method: IF_SALV_WD_EXPORT_XML~COLLECT_COLUMNS of program CL_SALV_WD_XML_20=============CP
    Method: IF_SALV_WD_EXPORT_XML~EXECUTE of program CL_SALV_WD_XML_20=============CP
    Method: IF_SALV_BS_XML~EXECUTE of program CL_SALV_WD_XML_20=============CP
    Method: EXECUTE of program CL_SALV_BS_A_EXPORT_BASE_XML==CP
    Method: EXECUTE of program CL_SALV_WD_EXPORT_C8R=========CP
    Method: IF_SALV_WD_COMP_TABLE_EVENTS~ON_EXPORT_EXCEL of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_EVENTS~ON_EXPORT of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_EVENTS~ON_SERVICE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_EVENTS~DO_FUNCTION_STD of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    ==========================================================
    My questions are:
    1) Is it a general NO NO, to deleting the headers when desiring to export to excel?? I have not found any documentation saying so, but who knows. Or is it simply a bug?
    2) If not, what the problem might be? Did anyone have sth like this before?
    best regards
    simon:)<b></b>

    I guess, if it there hasn't been answeren for such a long time, and setting headers resolved my problem(but didn't answered my question) I will mark it as answered.
    regards
    simon:)

  • Problem with Character set

    Hi,
    I am facing some problems with Oracle character sets.
    I have set the database character set as UTF8.
    I have set the environment variable NLS_CHAR to Portuguese_Portugal.UTF8.
    I insert a Portuguese text for varchar and clob columns in a table.
    However when I select the text from that table, I get some junk values for the clob.
    Any help is appriciated. Thanx in advance.
    Yash
    null

    Hi Yash,
    Can u tell me how to insert values in a nchar/nvarchar column in
    Indian language scripts?
    I have set database characterset to 'IN8ISCII'? But while
    inserting values in the table I am getting error as characterset
    mismatch'
    I have tried it using UTF8 chracterset also??
    As fa as your problem is concerened, I think u have to set the
    nls_ characterset value$ in props$ table
    and same for nls_nchar_characterset column also..
    Thanks in advance
    Manoj mehta

  • How can I directly update a SAP screen table control with values?

    I have a need to update a table control on a standard SAP screen with values. Here's the scenario: The user will come into a standard SAP transaction (IQS2-change notification) and click on an action button which calls a function module. That function module will determine what needs to be added to the SAP screen table control (add additional task rows). When the function module returns with the row data to be added to table control, I would like to set those values as if  the user input directly. The table control is located on it's separate tab (TASKS) in the transaction. I cannot find any user exists or BADI's for this transaction to allow me to affect the TASKS tab table control for this GUI. I'm trying to prevent from having to make a custom modification. If anyone has any ideas, please let me know.  Thanks.

    Hi,
    Check these enhancements:
    IWOC0002      PM/SM notification: Check whether status change is allowed
    QQMA0001      QM/PM/SM: User Subscreen for Notification Header         
    QQMA0008      QM/PM/SM: User Subscreen for Additional Data on Notif. Ite
    QQMA0011      QM/PM/SM: User Subscreen for Additional Data on Task     
    QQMA0013      QM: Default Values when Creating a Task                  
    QQMA0014      QM/PM/SM: Checks before saving a notification            
    QQMA0015      QM/PM/SM: User-Exit before Call-Up of F4 Help on Catalogs
    QQMA0016      QM/PM/SM: "User data" Function "Goto" --> "Task" Menu    
    IWO10026            User check on setting status 'Do not perform'                   
    IWO10027            User exit: Generate user-defined settlement rule                
    IWOC0001            Create PM/SM notification: Determine reference object           
    IWOC0002            PM/SM notification: Check whether status change is allowed      
    IWOC0003            PM/SM authorization check of ref. object and planner group      
    IWOC0004            Change single-level list editing PM/QM/SM ALV settings          
    Regards
    Appana

  • Bdc upload file data into internal table problem with gui_upload fm

    Hello experts,
    my coding is like this ..
    data : begin of itab occurs 0 .
    field1 like mara-matnr,
    field2......
    etc,
    end of itab.
    data: file1 type string.
    parameter :file like rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    static = 'X'
    mask = space
    field_name = 'FILE'
    CHANGING
    file_name = file.
    START-OF-SELECTION.
    FILE1 = FILE . "HERE I AM PASSING INTO STRING
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = FILE1
    FILETYPE = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = itab. " here the data is not populating from the file , it is giving the error like speified table not found.
    HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.
    file structure is same as the internal table.
    I stored the file as .txt( ie in notepad).
    my file is like this..
    10000 200 323 sunndarrr.......
    i had a problem with this bdc , i am getting like "specified table name not recgonised" in the fm gui_upload while debugging.
    when i am using the ws_upload it is working fine.
    please guide me where i have done the mistake.
    thank you so much for all the replies.

    Hi,
    Have a look on the following code.
    TABLES: kna1.
    DATA: BEGIN OF itab1 OCCURS 0,
          str(255),
          END OF itab1.
    DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                = 'D:\ABAP EVE\ffile1.txt'
        filetype                = 'ASC'
      TABLES
        data_tab                = itab1
      EXCEPTIONS
        conversion_error        = 1
        file_open_error         = 2
        file_read_error         = 3
        invalid_type            = 4
        no_batch                = 5
        unknown_error           = 6
        invalid_table_width     = 7
        gui_refuse_filetransfer = 8
        customer_error          = 9
        no_authority            = 10
        OTHERS                  = 11.
    IF sy-subrc <> 0.
      WRITE:/ 'sorry'.
    ELSE.
      LOOP AT itab1.
        SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
        APPEND itab2.
      ENDLOOP.
      IF sy-subrc = 0.
        LOOP AT itab2.
          WRITE:/ itab2-kunnr,itab2-name1.
          INSERT INTO kna1 VALUES itab2.
        ENDLOOP.
        IF sy-subrc = 0.
          WRITE:/ 'inserted'.
        ELSE.
          WRITE:/ 'not inserted'.
        ENDIF.
      ELSE.
        WRITE:/ 'fail'.
      ENDIF.
    ENDIF.
    Flat file:
    10001,Sadney
    10003,Yogesh
    20005,Madan
    1.U need to define internal table with one field of max size
    2.upload the flat file data into that internal table
    3.split that internal table data into another internal table(having fields)
    <REMOVED BY MODERATOR>
    thanks,
    Chandu
    Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:17 PM

  • Problems with values changed from timeout to event

    Hi all
    i've this question.
    I'm talking with an instrument (oscilloscope) asking it some values and i can see them into my labview panel (refreshing them every timeout loop).
    I can set different values into labview panel and the scope changes its settings so in the next loop my panel reads the new value from the scope.
    I obtain this with some events and all is working perfectly.
    My problem is this: when i click on an element (click generates an event) labview must finish timeout loop and only then executes the event, so the new value set by the user will be ignored.
    What can i do to execute the event "instantly" with new user values?
    tnx to all
    http://www.sd-studio.it - web design agency

    As per your description, the user input should be delayed, not ignored, because LV will execute the event at last.
    Anyway, to shorten the delay, you may simply set a 0 ms (or a very short, e.g. 10 ms) timeout for the event structure and manage a timeout "by hand". For example, you store in a shift register the last time you executed the refreshing code; when the timeout event executes, you subtract the last time value from the current time; if the difference is more than a given threshold, you actually execute the refreshing code.
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

  • Problem with value in object element declared as NUMBER(26,3)

    We have an object OBJ_NAME_1 created like below and total element in the object are around 100 with in which only one element is of data type VARCHAR2(4000). Other are with small size as below
    create or replace TYPE OBJ_NAME_1 AS OBJECT
    ( v_col1 VARCHAR2(4),
    v_col2 VARCHAR2(4),
    d_date DATE,
    amount_1 NUMBER(26,3) . . . . . . . . . . .)
    And we are creating an VARRY of above object as below:
    create or replace TYPE ARRAY_NAME_1 AS VARRAY(1000) OF OBJ_NAME_1
    Now we have one procedure with IN parameter of type ARRAY_NAME_1 as below and we are calling this procedure from java.
    create or replace PROCEDURE SP_PROC_1 (
    P_ARR_1 IN ARRAY_NAME_1,
    P_FILE IN VARCHAR2,
    E_MESS OUT VARCHAR2,
    E_CODE OUT NUMBER) . . . . . . . .
    My problem is with value of element amount_1 of array ARRAY_NAME_1 in the procedure. Actually data type of this element is NUMBER(26,3) in object. But from java we are able to pass value like 1234.12345 (with 5 decimal).
    The declare section of the procedure are like below :
    l_OBJ_NAME_1 OBJ_NAME_1;
    m_amount_1     table_1.amount_1%type; /* amount_1 in table_1 declared as NUMBER(26,3)*/
    n_amount_1     NUMBER(26,3);
    In the begin section we are assigning variable like below:
    IF (P_ARR_1 .COUNT>0) THEN
    FOR i IN P_ARR_1.FIRST .. P_ARR_1.LAST LOOP
    l_OBJ_NAME_1 := P_ARR_1(i);
    m_amount_1 := P_ARR_1(i).amount_1;
    n_amount_1 := P_ARR_1(i).amount_1;
    END LOOP;
    The value of variables are below after above assignment:
    l_OBJ_NAME_1 . Amount_1 → 234.12345 (without round off)
    m_amount_1 → 234.12345 (without round off)
    n_amount_1 → 234.123 (with round off)
    Actually all the above 3 variable/element has been declared as NUMBER(26,3), then the value in these variables should be with rounded up to 3 decimal place. Then why it is not happening with variable
    l_OBJ_NAME_1 . Amount_1 and m_amount_1?
    Please help.
    Edited by: SANT007 on Aug 12, 2011 9:45 AM

    Okay, thanks Patrick. I commented that out so now I can see the full error message. Actually, now the page just returns an "OK" (nothing else), and I click on that to return back to the page where I see:
    Checksum error for Hidden and Protected item ID (26968176992578859), value ([object]), posted checksum (326873D5A54A4AF425EC4D500B9B4D02), expected checksum (********************************), index_i (10), index_j (2), index_m (2);
    Okay, so that's evidently a new option in 3.1, it should have just been a 'Hidden' item, not 'Hidden and Protected'. So, I change this back to just 'Hidden', refressh the page, the re-execute it and try to select from the popup again. This time, instead of the more-or-less blank page with only "OK" on it, I also get "ORA-01722: invalid number" above the "OK". When I click the "OK", then I am returned back to the last good 'runnable' page I executed (since the search page is no longer 'runnable' (the javascript evidently is still returning an object instead of a number).
    On a previous run of trying to track the problem down, I made the :P3_SEQ as a regular text field so I could try to see what was going on, and it briefly displayed "[object]" before the search executed and returned the error.
    So thanks for helping me get past the first stage so I could see a better version of what the error is. Now I just need to figure out why an object is being returned instead of number. This worked fine in 3.0, and the only thing I can think of is that something, somewhere in 3.1's javascript is slightly different now, but I really don't know.
    Bill Ferguson

  • Problem with layer sets opening

    Hi,
    I have a problem open layer sets. In my script I get layers index and then iterate throught this layers.
    Here is the script:
    function getAllLayersByIndex(){
           function getNumberLayers(){
           var ref = new ActionReference();
           ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID("NmbL") )
           ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
           return executeActionGet(ref).getInteger(charIDToTypeID("NmbL"));
           function hasBackground() {
               var ref = new ActionReference();
               ref.putProperty( charIDToTypeID("Prpr"), charIDToTypeID( "Bckg" ));
               ref.putEnumerated(charIDToTypeID( "Lyr " ),charIDToTypeID( "Ordn" ),charIDToTypeID( "Back" ))//bottom Layer/background
               var desc =  executeActionGet(ref);
               var res = desc.getBoolean(charIDToTypeID( "Bckg" ));
               return res  
           function getLayerType(idx,prop) {      
               var ref = new ActionReference();
               ref.putIndex(charIDToTypeID( "Lyr " ), idx);
               var desc =  executeActionGet(ref);
               var type = desc.getEnumerationValue(prop);
               var res = typeIDToStringID(type);
               return res  
           function getLayerVisibilityByIndex( idx ) {
               var ref = new ActionReference();
               ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "Vsbl" ));
               ref.putIndex( charIDToTypeID( "Lyr " ), idx );
               return executeActionGet(ref).getBoolean(charIDToTypeID( "Vsbl" ));;
           var cnt = getNumberLayers()+1;
           var res = new Array();
           if(hasBackground()){
        var i = 0;
              }else{
        var i = 1;
           var prop =  stringIDToTypeID("layerSection");
           for(i;i<cnt;i++){
              var temp = getLayerType(i,prop);
              if(temp != "layerSectionEnds") res.push(i);
           return res;
           function getLayerVisibilityByIndex( idx ) {
               var ref = new ActionReference();
               ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "Vsbl" ));
               ref.putIndex( charIDToTypeID( "Lyr " ), idx );
               return executeActionGet(ref).getBoolean(charIDToTypeID( "Vsbl" ));
    function makeActiveByIndex( idx, visible ){
        var desc = new ActionDescriptor();
          var ref = new ActionReference();
          ref.putIndex(charIDToTypeID( "Lyr " ), idx)
          desc.putReference( charIDToTypeID( "null" ), ref );     
          desc.putBoolean( charIDToTypeID( "MkVs" ), visible );
       executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
    var groups = getAllLayersByIndex();
        for(var i = groups.length-1; i >= 0 ; i--) {
          makeActiveByIndex( groups[i], true );
          ....working with layers....
    I think, my problem is in function makeActiveByIndex, because it doesn't make active a folder and doesn't open it.
    You can see it on this picture. Active layer set is "Skupina 1" and it is in layer set "hlavicka". But "hlavicka" is not open. WHY??
    Can you help me fix this problem??
    Thank you Domaneni

    Hi, for the past days I've worked on a script to toogle opening and closing layeSets, I've taken the code that TeddyBear posted here: http://ps-scripts.com/bb/viewtopic.php?p=14773 and adjusted it a little bit, and that's what I came up with, I hope it will help you:
    <javascriptresource>
      <name>BCM> ToogleOpen_CloseGroup...</name>
      <category>BCM</category>
    </javascriptresource>
    //For code readability
    // http://ps-scripts.com/bb/viewtopic.php?f=9&t=3235
    function getActiveLayerIndex() {
        var ref = new ActionReference();
        ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "ItmI" ));
        ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        return executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ));
    function cTID(s){return charIDToTypeID(s)}
    function sTID(s){return stringIDToTypeID(s)}
    // =============================
    // The main function
    function closeGroup(layerSet) {
       var m_Name = layerSet.name;
       var m_Opacity = layerSet.opacity;
       var m_BlendMode = layerSet.blendMode;
       var m_LinkedLayers = layerSet.linkedLayers;
      var currINDEX = getActiveLayerIndex();
       var m_bHasMask = hasLayerMask();
       if(m_bHasMask) loadSelectionOfMask();
       if(layerSet.layers.length <= 1) {
          addTempLayerSetIn(currSetIDX-1);
          makeActiveByIndex(currSetIDX+2, false);
          ungroup();
          groupSelected(m_Name);
          deleteTempLayerSetbyIdx(currSetIDX+1);
       } else {
           makeActiveByIndex(currSetIDX, false);
          ungroup();
          groupSelected(m_Name);
       var m_Closed = activeDocument.activeLayer;
       m_Closed.opacity = m_Opacity;
       m_Closed.blendMode = m_BlendMode;
       for(x in m_LinkedLayers) {
          if(m_LinkedLayers[x].typename == "LayerSet")
             activeDocument.activeLayer.link(m_LinkedLayers[x]);
       if(m_bHasMask) maskFromSelection();
       return m_Closed;
    // =============================
    // Below are all necessary subroutines for the main function to work
    function ungroup() {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated( cTID( "Lyr " ), cTID( "Ordn" ), cTID( "Trgt" ) );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       try {
          executeAction( sTID( "ungroupLayersEvent" ), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function addLayer() {
       var m_ActiveLayer          =    activeDocument.activeLayer;
       var m_NewLayer             =    activeDocument.layerSets.add();
       m_NewLayer.move(m_ActiveLayer, ElementPlacement.PLACEBEFORE);
       return m_NewLayer;
    function hasLayerMask() {
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated( sTID( "layer" ), cTID( "Ordn" ), cTID( "Trgt" ));
       var m_Dsc01= executeActionGet( m_Ref01 );
       return m_Dsc01.hasKey(cTID('Usrs'));
    function activateLayerMask() {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated( cTID( "Chnl" ), cTID( "Chnl" ), cTID( "Msk " ) );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       try {
          executeAction( cTID( "slct" ), m_Dsc01, DialogModes.NO );
       } catch(e) {
          var m_TmpAlpha = new TemporaryAlpha();
          maskFromSelection();
          activateLayerMask();
          m_TmpAlpha.consume();
    function deleteMask(makeSelection) {
       if(makeSelection) {
          loadSelectionOfMask();
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated( cTID( "Chnl" ), cTID( "Ordn" ), cTID( "Trgt" ) );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       try {
          executeAction( cTID( "Dlt " ), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function selectLayerMask() {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated(cTID("Chnl"), cTID("Chnl"), cTID("Msk "));
       m_Dsc01.putReference(cTID("null"), m_Ref01);
       m_Dsc01.putBoolean(cTID("MkVs"), false );
       try {
          executeAction(cTID("slct"), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function loadSelectionOfMask() {
       selectLayerMask();
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putProperty( cTID( "Chnl" ), cTID( "fsel" ) );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       var m_Ref02 = new ActionReference();
       m_Ref02.putEnumerated( cTID( "Chnl" ), cTID( "Ordn" ), cTID( "Trgt" ) );
       m_Dsc01.putReference( cTID( "T   " ), m_Ref02 );
       try {
          executeAction( cTID( "setd" ), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function maskFromSelection() {
       if(!hasLayerMask()) {
          var m_Dsc01 = new ActionDescriptor();
          m_Dsc01.putClass( cTID( "Nw  " ), cTID( "Chnl" ) );
          var m_Ref01 = new ActionReference();
          m_Ref01.putEnumerated( cTID( "Chnl" ), cTID( "Chnl" ), cTID( "Msk " ) );
          m_Dsc01.putReference( cTID( "At  " ), m_Ref01 );
          m_Dsc01.putEnumerated( cTID( "Usng" ), cTID( "UsrM" ), cTID( "RvlS" ) );
          try {
             executeAction( cTID( "Mk  " ), m_Dsc01, DialogModes.NO );
          } catch(e) {
             activeDocument.selection.selectAll();
             maskFromSelection();
       } else {
          if(confirm("Delete existing mask?", true, "Warning")) {
             activateLayerMask();
             deleteMask();
    function groupSelected(name) {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putClass( sTID( "layerSection" ) );
       m_Dsc01.putReference(  cTID( "null" ), m_Ref01 );
       var m_Ref02 = new ActionReference();
       m_Ref02.putEnumerated( cTID( "Lyr " ), cTID( "Ordn" ), cTID( "Trgt" ) );
       m_Dsc01.putReference( cTID( "From" ), m_Ref02 );
       var m_Dsc02 = new ActionDescriptor();
       m_Dsc02.putString( cTID( "Nm  " ), name);
       m_Dsc01.putObject( cTID( "Usng" ), sTID( "layerSection" ), m_Dsc02 );
       executeAction( cTID( "Mk  " ), m_Dsc01, DialogModes.NO );
       return activeDocument.activeLayer;
    function addToSelection(layerName) {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putName( cTID( "Lyr " ), layerName );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       m_Dsc01.putEnumerated( sTID( "selectionModifier" ), sTID( "selectionModifierType" ), sTID( "addToSelection" ) );
       m_Dsc01.putBoolean( cTID( "MkVs" ), false );
       try {
          executeAction( cTID( "slct" ), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function TemporaryAlpha() {
       activeDocument.selection.store((this.alpha = activeDocument.channels.add()));
       activeDocument.selection.deselect();
       this.consume = function() {
          activeDocument.selection.load(this.alpha);
          this.alpha.remove();
    function makeActiveByIndex( idx, visible ){
         if( idx.constructor != Array ) idx = [ idx ];
         for( var i = 0; i < idx.length; i++ ){
              var desc = new ActionDescriptor();
              var ref = new ActionReference();
              ref.putIndex(charIDToTypeID( 'Lyr ' ), idx[i])
              desc.putReference( charIDToTypeID( 'null' ), ref );
              if( i > 0 ) {
                   var idselectionModifier = stringIDToTypeID( 'selectionModifier' );
                   var idselectionModifierType = stringIDToTypeID( 'selectionModifierType' );
                   var idaddToSelection = stringIDToTypeID( 'addToSelection' );
                   desc.putEnumerated( idselectionModifier, idselectionModifierType, idaddToSelection );
              desc.putBoolean( charIDToTypeID( 'MkVs' ), visible );
              executeAction( charIDToTypeID( 'slct' ), desc, DialogModes.NO );
    function deleteActiveLayer(){
       // =======================================================
       var idDlt = charIDToTypeID( "Dlt " );
           var desc752 = new ActionDescriptor();
           var idnull = charIDToTypeID( "null" );
               var ref529 = new ActionReference();
               var idLyr = charIDToTypeID( "Lyr " );
               var idOrdn = charIDToTypeID( "Ordn" );
               var idTrgt = charIDToTypeID( "Trgt" );
               ref529.putEnumerated( idLyr, idOrdn, idTrgt );
           desc752.putReference( idnull, ref529 );
       executeAction( idDlt, desc752, DialogModes.NO );
    function isLayerSet( idx ) {
         var propName = stringIDToTypeID( 'layerSection' );
         var ref = new ActionReference();
         ref.putProperty( charIDToTypeID( "Prpr" ) , propName);
         ref.putIndex( charIDToTypeID ( "Lyr " ), idx );
         var desc =  executeActionGet( ref );
         var type = desc.getEnumerationValue( propName );
         var res = typeIDToStringID( type );
         // alert(res);
         return res == 'layerSectionStart' ? true:false;
    function openGroup1(theGroup) {
       currSetIDX= getActiveLayerIndex();
       if(isLayerSet( currSetIDX ))
        getNamesPlusIDsOfLayerSet();
      makeActiveByIndex(currSetIDX, false);
    function getNamesPlusIDsOfLayerSet(){
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('Cnt '));
      var parId = executeActionGet(ref).getInteger(stringIDToTypeID( 'layerID' ));
       var Names=[];
       var x = 0;
       var y = 0;
       var r = 0;
       currINDEX = getActiveLayerIndex();
        var i = currINDEX;
       for(i; i > 0 ; i--){
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
            ls = typeIDToStringID(ls);
            // alert(layerName+": _ :"+ls);
            if(ls == "layerSectionStart"){x++};
            if(layerName.match(/^<\/Layer group/) )
              y ++;
              r = x - y;
              if(r == 0 && ls == "layerSectionEnd"){break};
              continue
            if(ls == "layerSectionContent"){makeActiveByIndex(i,false);break};
            var layerType = typeIDToStringID(desc.getEnumerationValue( stringIDToTypeID( 'layerSection' )));
            var isLayerSet =( layerType == 'layerSectionContent') ? false:true;
    Names.push([[Id],[layerName],[isLayerSet]]);
    return Names;
    function getLayersNb()//function to find out if the number of layers in the document
        var ref = new ActionReference();
        ref.putProperty( charIDToTypeID( 'Prpr' ), stringIDToTypeID('numberOfLayers') );
        ref.putEnumerated( charIDToTypeID( "Dcmn" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        var desc = executeActionGet(ref);
        var numberOfLayers = desc.getInteger(stringIDToTypeID('numberOfLayers'));
        return numberOfLayers;
    function toogleOpenCloseSet(){
      myALayerIDX = getActiveLayerIndex();
      myGroupP = app.activeDocument.activeLayer;
      if(!isLayerSet(myALayerIDX)){
          myGroupP = app.activeDocument.activeLayer.parent;
          if(myGroupP.typename != "Document"){
            if(isSetOpened1(myGroupP)){closeGroup(myGroupP)}else{openGroup1(myGroupP)};
      }else{
        if(isSetOpened1(myGroupP)){closeGroup(myGroupP)}else{openGroup1(myGroupP)};
    function getFristLayerSetChildVisible(){
      xx = false;
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('Cnt '));
      var parId = executeActionGet(ref).getInteger(stringIDToTypeID( 'layerID' ));
       var Names=[];
        var x = 0;
        var y = 0;
        var r = 0;
       currINDEX = getActiveLayerIndex();
        var i = currINDEX;
       for(i; i > 0 ; i--){
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
            ls = typeIDToStringID(ls);
            var vis = desc.getInteger(stringIDToTypeID( 'visible' ));
            // alert(layerName+": _ :"+vis);
    /*        if(desc.hasKey(stringIDToTypeID("visible")))
              alert(desc.getType(stringIDToTypeID("visible")));
            if(ls == "layerSectionStart"){x++};
            if(vis == 1 && Id!=parId && r!=0){
              var theOBj = {id:Id, lname:layerName, idx:i};
              xx =true;
              Names.push(theOBj);
              break;
            if(layerName.match(/^<\/Layer group/) )
              y ++;
              r = x - y;
              if(r == 0 && ls == "layerSectionEnd"){break};
              continue
        return Names;
    function getLastChildIdx(){
      xx = false;
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('Cnt '));
      var parId = executeActionGet(ref).getInteger(stringIDToTypeID( 'layerID' ));
       currINDEX = getActiveLayerIndex();
        var i = currINDEX;
        var x = 0;
        var y = 0;
        var r = 0;
        var lastChIdx = 0;
       for(i; i > 0 ; i--){
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
            ls = typeIDToStringID(ls);
            var vis = desc.getInteger(stringIDToTypeID( 'visible' ));
            if(ls == "layerSectionStart"){x++};
            if(layerName.match(/^<\/Layer group/) )
              y ++;
              r = x - y;
              if(r == 0 && ls == "layerSectionEnd")
                lastChIdx = i;
                break;
            // alert(x+" _ "+y+" _ "+r+" _ "+layerName);
        return lastChIdx;
    function getNbOfChilds(){
      xx = false;
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('Cnt '));
      var parId = executeActionGet(ref).getInteger(stringIDToTypeID( 'layerID' ));
       currINDEX = getActiveLayerIndex();
        var i = currINDEX;
        var nb = 0;
        var x = 0;
        var y = 0;
        var r = 0;
       for(i; i > 0 ; i--){
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
            ls = typeIDToStringID(ls);
            var vis = desc.getInteger(stringIDToTypeID( 'visible' ));
            if(ls == "layerSectionStart"){x++};
            if(layerName.match(/^<\/Layer group/) )
              y ++;
              r = x - y;
              if(r == 0 && ls == "layerSectionEnd")
                break
              continue
            nb++;
        return nb;
    function isSetOpened1( group ){
      app.activeDocument.activeLayer = group;
      xx = true;
      currSetIDX = getActiveLayerIndex();
      addTempLayerSetIn(currSetIDX-1);
      var fIdx = getActiveLayerIndex();
      makeActiveByIndex(currSetIDX+2, false);
      if(fIdx == getActiveLayerIndex())
        xx = false;
      deleteTempLayerSetbyIdx(currSetIDX+1);
      return xx;
    function addTempLayerSetIn(idxx){
        // =======================================================
        var idMk = charIDToTypeID( "Mk  " );
            var desc58 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref63 = new ActionReference();
                var idlayerSection = stringIDToTypeID( "layerSection" );
                ref63.putClass( idlayerSection );
            desc58.putReference( idnull, ref63 );
        executeAction( idMk, desc58, DialogModes.NO );
        // =======================================================rename
        var idsetd = charIDToTypeID( "setd" );
            var desc202 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref209 = new ActionReference();
                var idLyr = charIDToTypeID( "Lyr " );
                var idOrdn = charIDToTypeID( "Ordn" );
                var idTrgt = charIDToTypeID( "Trgt" );
                ref209.putEnumerated( idLyr, idOrdn, idTrgt );
            desc202.putReference( idnull, ref209 );
            var idT = charIDToTypeID( "T   " );
                var desc203 = new ActionDescriptor();
                var idNm = charIDToTypeID( "Nm  " );
                desc203.putString( idNm, "mb-dummy tempTestLayerSetOpen_Closed" );
            var idLyr = charIDToTypeID( "Lyr " );
            desc202.putObject( idT, idLyr, desc203 );
        executeAction( idsetd, desc202, DialogModes.NO );
        // =======================================================move
        var idmove = charIDToTypeID( "move" );
            var desc59 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref64 = new ActionReference();
                var idLyr = charIDToTypeID( "Lyr " );
                var idOrdn = charIDToTypeID( "Ordn" );
                var idTrgt = charIDToTypeID( "Trgt" );
                ref64.putEnumerated( idLyr, idOrdn, idTrgt );
            desc59.putReference( idnull, ref64 );
            var idT = charIDToTypeID( "T   " );
                var ref65 = new ActionReference();
                var idLyr = charIDToTypeID( "Lyr " );
                ref65.putIndex( idLyr, idxx );
            desc59.putReference( idT, ref65 );
            var idAdjs = charIDToTypeID( "Adjs" );
            desc59.putBoolean( idAdjs, false );
            var idVrsn = charIDToTypeID( "Vrsn" );
            desc59.putInteger( idVrsn, 5 );
        executeAction( idmove, desc59, DialogModes.NO );
    function deleteTempLayerSetbyIdx(idxx){
      // =======================================================
      var idDlt = charIDToTypeID( "Dlt " );
          var desc = new ActionDescriptor();
              var ref = new ActionReference();
              ref.putIndex(charIDToTypeID( 'Lyr ' ), idxx);
              // ref.putIdentifier(charIDToTypeID( 'Lyr ' ), idxx);
              desc.putReference( charIDToTypeID( 'null' ), ref );
      executeAction( idDlt, desc, DialogModes.NO );
    toogleOpenCloseSet();

  • Problem with fingerprint setting

    Hey, i bought an iphone 5s yesterday. I set up the fingerprint yesterday and it worked fine. But after that i faced some problem with the system so i reset the wholephone and edit and deleted my original fingerprint. but after that, my phone cant reenter the fingerprint. it can't read any fingerprint and the name is changed to touch id. what should i do with it?

    Hello annteoeena,
    Congratulations on your iPhone 5s, and thank you for the details of the issue you are experiencing when using Touch ID.  I recommend following the steps below for an issue like the one you described:
    Troubleshooting Touch ID
    Verify that you are using the latest version of iOS.
    Ensure that your fingers and the Home button are clean and dry.*
    Note: Cover the Home button completely. Don't tap too quickly, don't press down hard, and don't move your finger while Touch ID is scanning.
    Tap Settings > General > Passcode & Fingerprint > Fingerprints and verify:
    Passcode Unlock or iTunes & App Store is enabled.
    One or more fingerprints have been enrolled.
    If one finger isn't working, tap Edit in Settings > General > Passcode & Fingerprint > Fingerprints > Edit to delete and then reenroll the finger.
    If that finger still isn't working, try enrolling a different finger.
    If you are unable to enroll any of your fingers, take your iPhone 5s to an Apple Retail Store, Apple Authorized Service Provider, or contact AppleCare for further assistance.
    Find the full article here:
    iPhone 5s: Using Touch ID
    http://support.apple.com/kb/HT5883
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Problems with version sets

    I have PSE 6. When I open a JPG from the Organizer using Full Edit and then try to save, I do not get the option to save the image in a version set (even though I do have the Organizer option checked). However, I noticed that invoking Full Edit also prompts the Organizer to say there is a new file in the watched folders. This "new" file is the very same file in the very same location. If I accept to add the file to the Organizer I get two thumbnails in the Organizer, both pointing to the same file on disk. If I do this then the "Edit In Progress" banner appears on the "new" thumbnail and the editor does allow me to add the image to the version set. I am sure that I did not have to do this before, I would expect Full Edit to just open the image, mark it in the Organizer as being edited, not try to add it back to the catalog and allow me to save the edit in a version set. What might be causing this behaviour?
    I also have similar and I think related problems with RAW images too, but I am hoping that resolving the above will resolve the RAW issue too.

    I should have said that I did try that but it still prevented me from creating a new version in a version set when saving. It is as if the editor needs to start on a copy of the Organizer's entry to allow version sets, as if the original is somehow "locked". Could that be possible?

  • ALV view : Problem with user defined views

    Dear Experts,
    We are facing a problem pertaining to user defined views for a ALV table that we have in SAP eRecruiting application in webdynpro ABAP. The problem is as follows.
    There is a candidate application ABC & only ONE person can edit this at a time.In this application ABC there is a ALV table.
    If the user clicks on this application & navigates to the ALV,this ABC application is in normal/edit mode(no one else has opened this ). So, the user can make changes in ABC. In the ALV, he can click on the 'settings 'button and save the STANDARD view as his own user defined view(by adding or removing columns).
    If the user opens the application ABC in display mode(implying that someone else has alraedy opened ABC for editing), when i navigate to the same ALV,the user CANNOT see the views which were saved in the edit mode.Only the standard view is displayed. The user however has the option to again freshly save a view.
    The views created by a user for this ALV should be seen irrespective of the application being opened in normal or display mode.
    To add to the confusion, this problem is occuring only in some systems & not in others. There is atleast one system where the views are displayed correctly to the user.
    On debugging, the table wdy_conf_user has config ids as different where the user views are stored separately for display & edit mode.
    In systems where the user views are displayed correctly, the config id is one & the same ensuring that the user can see all his views irrespective of the mode of the application.
    Any thoughts on how we can rectify this?
    sorry for the long & tedious explanation
    Thanks in advance,
    Sowmya

    See
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        return {$inputtype}
                     local:test_function("1","2")' returning content) o from dual
    Error at line 5
    ORA-19114: error during parsing the XQuery expression:
    LPX-00801: XQuery syntax error at '{'
    3                       return {$inputtype}
    -                              ^
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        $inputtype
                     local:test_function("1","2")' returning content) o from dual
    O   
    2   
    1 row selected.

Maybe you are looking for