Code completion user commands helplink

Hello
I am currently working on code completion for user commands in version 2012.  I have an XML file in which I have the descriptions for all the hover text and associated help links.  Everything is working correctly except for the help links.  They seem to be always looking to go to the diadem.chm help file.  I was wondering if there was any way to redirect where they point or am I missing something?  Thanks. 
Ben

Hi Carmen
Actually I'm really not using an external program per se.  I guess I need to clarify what I am doing better.  Sorry about that.    
Look at the help file for ScriptCmdRegister here for an example.  A shorter version without an example is spelled out below if you wish.  
I am creating a VBS user command script containing classes of objects that I add using scriptcmdadd.  I am then registering the TLB file using scriptcmdregister resulting from compiling an ODL file.  After compilation, the ODL file is no longer needed.  I have a third/fourth file to go along with these which is an XML file that I got from a coworker.  The XML file contains the descriptions, helplinks, and datatypes that appear when code completion comes up, just as there is in DIAdem when you type View.ActiveSheet.etc.  
However, you notice in DIAdem that there is a help link, which is what I cannot get working because when I insert anything into the xml file where the help link would go, it throws an error because it is trying to point to the DIAdem.chm help file no matter what.  This is what I wish to redirect so it can go to my own chm/html help file, if it is possible or supported that is.  Thanks
Ben

Similar Messages

  • Problem with User Command in alv report

    Hi
    I have developed a ALV grid report with drill down capability to transaction code for user command. I am having a trouble with this.
    CASE ucomm.
        WHEN '&IC1'.
          CLEAR: wa_import.
          IF selfield-fieldname EQ 'ANLN1'.
            READ TABLE t_import INTO wa_import INDEX selfield-tabindex.
            SET PARAMETER ID 'BUK' FIELD wa_import-bukrs.
            SET PARAMETER ID 'ANl' FIELD wa_import-anln1.
            CALL TRANSACTION 'AW01N'.
          ENDIF.
    here my parameter ids are showing the values but when i call the transaction i am not getting the actual asset numbers.
    Can someone help me out this
    Thanks

    Hi,
    add the AND SKIP FIRST SCREEN...addition..
    CALL TRANSACTION 'AW01N' AND SKIP FIRST SCREEN.
    Thanks
    Naren

  • AT user command in interactive list(basic) is not calling smartform

    Hi,
    I am facing a problem, which will be strange for all i think.
    in a basic list (not ALV) simple interactive report i am using
    a at user-command. my concern is to collect the checked
    box in the first output report display and store it into the
    internal table and call a smart form when user
    enter 'SHOW' command.
    the problem is when i am entering a show command and
    debugging it, it collects all the checked checkbox in the
    internal table and it even call the smartform print popup
    window, when i give print or printpreview it leave the
    program with out throughing any error.
    here is the code.
    at user-command.
      case sy-ucomm.
        when 'SHOW'.
          do mline times.
            READ LINE SY-INDEX FIELD VALUE itab_item-chkbox.
            if itab_item-chkbox eq 'X'.
    *          write:/ itab_item-banfn,30 itab_item-bnfpo.
              perform extract_final_data using itab_item-bnfpo itab_item-banfn.
            endif.
          enddo.
          refresh: itab, itab_ser.
          clear:   itab, itab_ser.
    * move all data to structure (itab) of form .
          loop at iitab_wa1.
            Move :  iitab_wa1-matnr  to itab-matnr,
                    iitab_wa1-meins  to itab-meins,
                    iitab_wa1-ebeln  to itab-ebeln,
                    iitab_wa1-ebelp  to itab-ebelp,
                    iitab_wa1-menge  to itab-ktmng,
                    iitab_wa1-lfdat  to itab-eindt,
                    iitab_wa1-typ    to itab-typ.
            append itab.
            clear  itab.
          endloop.
    * display the selected item in the report screen.
          if sy-subrc is initial.
    * sorting the table according to RFQ no and item no.
            sort itab by ebeln ebelp.
    * including sr.no in table itab
            clear icnt.
            loop at itab.
              icnt  =  icnt  +  1.
              itab-srno = icnt.
              modify itab.
              clear  itab.
            endloop.
    * Call the output form.
    * YSF_MEDRUCK_RFQ_PR_ser_SAE is in 300
    * for pr to rfq material and service in single form.
            CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
              EXPORTING
                FORMNAME = 'YSF_MEDRUCK_RFQ_PR_MAT_SAE'
              IMPORTING
                FM_NAME  = V_FM.
            CALL FUNCTION '/1BCDWB/SF00000037'
              EXPORTING
                ser_flg          = ser_flag
                material         = p_mat
                services         = p_ser
              TABLES
                itab             = itab
              EXCEPTIONS
                FORMATTING_ERROR = 1
                INTERNAL_ERROR   = 2
                SEND_ERROR       = 3
                USER_CANCELED    = 4
                OTHERS           = 5.
            IF SY-SUBRC <> 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
          else.
            write: ' Some error has occurred'.
          endif.
      endcase.
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Aug 22, 2008 6:16 PM

    hi...
    this shouldnt be happening..ne ways.u may try this..
    put the smartform calling code in a report porgram and then use submit program and return command.
    write this part of code in the report program....you will get all ur variables from stack....
    Report y_call_sf.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
             EXPORTING
                FORMNAME = 'YSF_MEDRUCK_RFQ_PR_MAT_SAE'
              IMPORTING
                FM_NAME  = V_FM.
            CALL FUNCTION v_fm
              EXPORTING
                ser_flg          = (calling_prog)ser_flag    --> declare like this fro stack access
                material         = (calling_prog)p_mat
                services         = (calling_prog)p_ser
              TABLES
                itab             = (calling_prog)itab
              EXCEPTIONS
                FORMATTING_ERROR = 1
                INTERNAL_ERROR   = 2
                SEND_ERROR       = 3
                USER_CANCELED    = 4
                OTHERS           = 5.
            IF SY-SUBRC  0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
          else.
            write: ' Some error has occurred'.
          endif.
    calling prog is program from where u r submitting.......
    so ur code will look like this....
    at user-command.
      case sy-ucomm.
        when 'SHOW'.
          do mline times.
            READ LINE SY-INDEX FIELD VALUE itab_item-chkbox.
            if itab_item-chkbox eq 'X'.
             write:/ itab_item-banfn,30 itab_item-bnfpo.
              perform extract_final_data using itab_item-bnfpo itab_item-banfn.
            endif.
          enddo.
          refresh: itab, itab_ser.
          clear:   itab, itab_ser.
    move all data to structure (itab) of form .
          loop at iitab_wa1.
            Move :  iitab_wa1-matnr  to itab-matnr,
                    iitab_wa1-meins  to itab-meins,
                    iitab_wa1-ebeln  to itab-ebeln,
                    iitab_wa1-ebelp  to itab-ebelp,
                    iitab_wa1-menge  to itab-ktmng,
                    iitab_wa1-lfdat  to itab-eindt,
                    iitab_wa1-typ    to itab-typ.
            append itab.
            clear  itab.
          endloop.
    display the selected item in the report screen.
          if sy-subrc is initial.
    sorting the table according to RFQ no and item no.
            sort itab by ebeln ebelp.
    including sr.no in table itab
            clear icnt.
            loop at itab.
              icnt  =  icnt  +  1.
              itab-srno = icnt.
              modify itab.
              clear  itab.
            endloop.
    Call the output form.
    YSF_MEDRUCK_RFQ_PR_ser_SAE is in 300
    for pr to rfq material and service in single form.
           submit y_call_sf and return. -->plz check the syntax
      endcase.

  • User command in trees?

    HI all,
    can anybody send be example code for user command in trees without using oops concept
    Regards,
    Deepa

    Hi,
    Refer the following program SE38.
    SAPSIMPLE_TREE_CONTROL_DEMO.
    <b>Reward points if it helps.</b>

  • USER COMMAND CODE for the ICON "Back"

    Hello All,
                 I wanted to know if there is any command code for the user-command icon "back" that i can use while programming.
    e.g. as for the icon "save" there is '&data_save' code which we can use.
    I have used the code "&F03" for 'back" but it does not call the routine i have written for the same.
    So if in case no other code for "Back" icon is available, what is the procedure to implement the "back" command through programming?
    as when i click the icon,the code written inside the report should be executed along with the normal "back" function.
    Thanks

    Hi..
    you do one thing..put /h. then click on back.At the bottom pART of the debugging screen u find
    Field names section..There type sy-ucomm and press enter. The value of sy-ucomm can be seen...
    Thats the value u need...Which u can use the same in case statement
    and its case sensitive.chk the same.. and  write it in quotes( ''). that is 'BACK' or 'F03'
    Edited by: Rudra Prasanna Mohapatra on Jun 21, 2008 7:48 AM

  • *when we use at user -command and give smaple code fro at user-command*

    Hi experts,
    i am new to abap can any body tell me when we use AT USER-COMMAND and give a sample code for that.
    point will be rewarded.
    thanks.

    Hi,
    AT USER-COMMAND  is a list Event.This Event is triggered when user make an action on the Application Toolber Or Menubar.
    Here is the Program.
    START-OF-SELECTION.
      SET PF-STATUS 'TEST'.
      WRITE:  'Basic list, SY-LSIND =', sy-lsind.
    AT LINE-SELECTION.
      WRITE:  'LINE-SELECTION, SY-LSIND =', sy-lsind.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'TEST'.
          WRITE:  'TEST, SY-LSIND =', sy-lsind.
      ENDCASE.
    This program uses a status TEST, defined in the Menu Painter.
    Function key F5 has the function code TEST and the text Test for demo.
    Function code TEST is entered in the List menu.
    The function codes PICK and TEST are assigned to pushbuttons.
    The user can trigger the AT USER-COMMAND event either by pressing F5 , or by choosing List -> Test for demo, or by choosing the pushbutton 'Test for demo'.The user can trigger the AT LINE-SELECTION event by selecting a line.
    Hopr This Will help You.
    Regards,
    Sujit

  • 2.1.1 Regression on Code Completion's User Friendly Usage

    Hi,
    1. Code completion Preferences options
    SQL Dev 1.5 Code Completion
         - SQL Dev has Preferences on this
         Complete Single Matching Item Automatically
    SQL Dev 2.1 Code Completion
         - The preferences option is gone, but it behaves as Complete Single Matching Item Automatically is ON
    SQL Dev 2.1.1 Code Completion
         - The preferences option is gone, but it behaves as Complete Single Matching Item Automatically is OFF
    How can I set the Complete Single Matching Item Automatically to ON in this version?
    2. Code completion cursor List Selection
    On previous version, it defaults the cursor on the first item appears on the code completion List
    Now, we have to manually press down arrow to choose the first item.
    Why does SQL Dev not place the cursor on the first item on the list?
    Do we have any setting on the Preferences for this?
    Regards,
    Buntoro

    9350634/9350612:
    Problem Description
    I used the worksheet to test some queries I was building for views.
    As I like to layout my sql with 1 clause per line, i find myself pressing <RETU
    RN>
    often, but this often resulted in code being added to the SQL I did not want fr
    om the
    code completion. It would be better if the popup list of choices had no select
    ion
    by default (ie sel index == -1), so the user has to use the mouse or down arrow
    or
    something to enter the list to make a selection.
    Steps to Reproduce
    Enter the following:
    select r.id
    from roots_events r
    As you press <return> after the table alias "r" it replaces it with the keyword
    "right"
    select r.id
    from roots_events right
    which is not what I wanted at all.
    There are many other cases, this is just one. The point is that pressing <retu
    rn>
    should not accept something if the user has not explicitly chosen it.

  • Pf status and user-command

    hi
    can any one explain me about pf-status and user-command?  what is the difference between this two and how to display icons in it.
    max reward points for good answer
    thanks
    alka

    Hi alka ritu  ,
    Check the following websites for good documentation o n pf status and user-command
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba99935c111d1829f0000e829fbfe/content.htm
    1. How to set pf-status
    set pf-status ‘ZZBILSTA’.
    2. How to set pf-status excluding/including single menu items
    You can exclude menus by using exclude :
    set pf-status ‘ZZBILSTA’ excluding ‘PST’.
    Note: Can also be used with include instead of exclude
    3. How to set pf-status excluding/including several menu items
    You have to use an internal table to store the status you wan’t to ex- or include:
    DATA:BEGIN OF I_PF_STATUS_TAB OCCURS 10,
    FCODE,
    END OF I_PF_STATUS_TAB.
    FORM SET_PF_STATUS_POSTER.
    REFRESH I_PF_STATUS_TAB. MOVE ‘PST’ TO I_PF_STATUS_TAB. APPEND I_PF_STATUS_TAB. MOVE ‘ART’ TO I_PF_STATUS_TAB. APPEND I_PF_STATUS_TAB. SET PF-STATUS ‘ZZBILSTA’ EXCLUDING I_PF_STATUS_TAB.
    ENDFORM.
    4. Setting PF status to the (SAP) system default
    set pf-status ‘BASIC’.
    5. How to check for pf-status
    AT USER-COMMAND.
    CASE SY-UCOMM. WHEN ‘ART’. PERFORM STYR_ARTSKONTI. WHEN ‘PST’. PERFORM STYR_POSTER. WHEN ‘BIL’. PERFORM VIS_BILAG. ENDCASE.
    6. Use of SY-PFKEY
    You can use the system variable sy-pfkey to retrieve the name of the current pf status
    USER-COMMAND:
    If the user chooses a function code during list processing that is neither processed by the system, or PICK or PFnn, the system triggers the event AT USER-COMMAND. For this event, you must define your own GUI status for a list. To react to your own function codes in a program, you must define the following event block:
    AT USER-COMMAND.
      statements.
    In this event block, you can use an IF or CASE structure to differentiate between the function codes. They are available in the system field sy-ucomm. There are further system fields that are filled in list events, such as sy-lsind and sy-pfkey, that allow you to make further case distinctions.
    Triggering a List Event from the Program
    You can trigger a list event from the program as follows:
    SET USER-COMMAND fc.
    This statement takes effect after the current list is completed. Before the list is displayed, the event assigned to function code fc is triggered, regardless of the dialog status you are using.
    The effect is the same as when the user chooses the function. In other words, predefined list function codes are trapped and processed by the runtime environment, the function codes PICK and PFnn trigger the AT LINE-SELECTION and AT PFnnevents, and user-defined function codes trigger the AT USER-COMMAND event block.
    Function code PICK triggers an event only if the cursor is located on a list line.
    Using this statement in conjunction with the function codes reserved for system functions, you can call the system functions from the program. For example, you can use SET USER-COMMAND '%SC' to call the Find dialog box directly, or to position the list correctly before it is displayed.
    If you use several SET USER-COMMAND statements while creating a list, the system executes only the last one.
    Example of AT USER-COMMAND.
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
      WRITE: 'Basic List',
           / 'sy-lsind:', sy-lsind.
    TOP-OF-PAGE.
      WRITE 'Top-of-Page'.
      ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE sy-pfkey.
        WHEN 'TEST'.
          WRITE 'Self-defined GUI for Function Codes'.
          ULINE.
      ENDCASE.
    AT LINE-SELECTION.
      SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
      PERFORM out.
      sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'FC1'.
          PERFORM out.
          WRITE / 'Button FUN 1 was pressed'.
        WHEN 'FC2'.
          PERFORM out.
          WRITE / 'Button FUN 2 was pressed'.
        WHEN 'FC3'.
          PERFORM out.
          WRITE / 'Button FUN 3 was pressed'.
        WHEN 'FC4'.
          PERFORM out.
          WRITE / 'Button FUN 4 was pressed'.
        WHEN 'FC5'.
          PERFORM out.
          WRITE / 'Button FUN 5 was pressed'.
      ENDCASE.
      sy-lsind = sy-lsind - 1.
    FORM out.
      WRITE: 'Secondary List',
           / 'sy-lsind:', sy-lsind,
           / 'sy-pfkey:', sy-pfkey.
    ENDFORM.
    Example of AT USER-COMMAND.
    REPORT demo_list_set_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
      SET USER-COMMAND 'MYCO'.
      WRITE 'Basic List'.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'MYCO'.
          WRITE 'Secondary List from USER-COMMAND,'.
          WRITE: 'sy-lsind', sy-lsind.
          SET USER-COMMAND 'PF05'.
      ENDCASE.
    AT pf05.
      WRITE 'Secondary List from PF05,'.
      WRITE: 'sy-lsind', sy-lsind.
      SET CURSOR LINE 1.
      SET USER-COMMAND 'PICK'.
    AT LINE-SELECTION.
      WRITE 'Secondary List from LINE-SELECTION,'.
      WRITE: 'sy-lsind', sy-lsind.
      SET USER-COMMAND '%SC'.
    http://maxdb.sap.com/currentdoc/94/90ee41c334c717e10000000a155106/content.htm
    cheers!
    gyanaraj
    ****Pls reward points if u find this helpful

  • At line-selection and user command

    hi,
    is it possible to use both at line selecion and at user command at a time.

    Hi Kiran,
      Yes, it is possible to use both at line selecion and at
      user command at a time.
    AT LINE-SELECTION.
    Event in interactive reporting
    This event is processed whenever the user chooses a valid line in the list (i.e. a line generated by statements such as WRITE,ULINE, or SKIP) with the cursor and presses the function key which has the function PICK in the interface definition. This should normally be the function key F2, because it has the same effect as double-clicking the mouse, or clicking once in the case of a hotspot.
    The processing for the event AT LINE-SELECTION usually generates further list output (the details list) which completely covers the current list display. If you want the current list display to remain visible (to aid user orientation), you can do this with the key word WINDOW.
    AT USER-COMMAND.
    Event in interactive reporting
    This event is executed whenever the user presses a function key in the list or makes an entry in the command field.
    DATA: NUMBER1 TYPE I VALUE 20,
          NUMBER2 TYPE I VALUE  5,
          RESULT  TYPE I.
    START-OF-SELECTION.
      WRITE: / NUMBER1, '?', NUMBER2.
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'ADD'.
          RESULT = NUMBER1 + NUMBER2.
        WHEN 'SUBT'.
          RESULT = NUMBER1 - NUMBER2.
        WHEN 'MULT'.
          RESULT = NUMBER1 * NUMBER2.
        WHEN 'DIVI'.
          RESULT = NUMBER1 / NUMBER2.
        WHEN OTHERS.
          WRITE 'Unknown function code'.
          EXIT.
      ENDCASE.
      WRITE: / 'Result:', RESULT.
    After entry of a function code, the appropriate processing is performed under the event AT USER-COMMAND and the result is displayed in the details list.
    Reward points if helpful,
    Rgds,
    Sumana

  • User command is not getting triggered in interactive ALV with LIST display

    Hi experts,
    I have developed an interactive ALV report with LIST display. Here, the issue is, when i double click a record in the primary ALV list, the control must go to the USER COMMAND event which i have written in my report. But the user command event is not getting triggered at all when i double click any record.
    It gives the following information instead.
    "Choose a valid function".
    (My user command name and its respective form name are same.)
    Here is my code..
    START-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'TST1'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
      ENDIF.
    FORM tst1 USING r_ucomm LIKE sy-ucomm
                    rs_selfield TYPE slis_selfield.
    * Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.
    * Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.
    * Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.
    * Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.  CASE r_ucomm.
    *   When a record is selected
        WHEN '&IC1'.
    *     Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.      IF sy-subrc = 0.
    *       Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.
    *       Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
    Please advice what is the msitake i have done here..

    Read the following code:
    pass the  i_callback_user_command = g_user_command to the ALV function module and write the FORM user_command USING ucomm    LIKE sy-ucomm
                            selfield TYPE slis_selfield.
    as shown below.
    thanx
    Data for ALV display
    DATA  : gt_fieldcat TYPE slis_t_fieldcat_alv,
            gt_events           TYPE slis_t_event,
            g_variant LIKE disvariant,
            g_user_command      TYPE slis_formname VALUE 'USER_COMMAND',
            g_status            TYPE slis_formname VALUE 'SET_PF_STATUS',
            gt_list_top_of_page TYPE slis_t_listheader,
            g_repid LIKE sy-repid,
            gf_pos TYPE i
    Data for ALV display
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
               EXPORTING
              i_callback_program      = g_repid
                 i_callback_program      = sy-repid
                 it_fieldcat             = gt_fieldcat[]
           it_events               = gt_events[]
              i_callback_user_command = g_user_command
                 i_save                  = 'A'
                 is_variant              = g_variant
               TABLES
                 t_outtab                = it_print.
    FORM user_command USING ucomm    LIKE sy-ucomm
                            selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.
          CASE selfield-sel_tab_field.
            WHEN '1-KUNNR'.
              READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
              IF sy-subrc = 0.
                SET PARAMETER ID 'BPA' FIELD wa_print-kunnr.
                CALL TRANSACTION 'BP'.
              ENDIF.
            WHEN '1-MATNR'.
              READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
              IF sy-subrc = 0.
                SET PARAMETER ID 'JP_ISS' FIELD wa_print-matnr.
                CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN..
               GET PARAMETER ID 'WRK' FIELD wa_zprint-werks.
               SET PARAMETER ID 'VKO' FIELD wa_zprint-vkorg.
               SET PARAMETER ID 'VTW' FIELD wa_zprint-vtweg.
               CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN.
              ENDIF.
    Endcase.
    Endform.

  • How to use AT LINE-SELECTION and AT USER-COMMAND in one report????

    Dear all,
    I have a problem in reports I want to use AT USER-COMMAND.and AT LINE-SELECTION.both in the one report.
    But as soon as I use SET PF-STATUS my AT LINE-SELECTION event stop workingand only AT USER-COMMAND is working.
    How can I use both of them in one report for your reference I am giving my test program below.
    REPORT ZTEST111 .
    SET PF-STATUS '100'.
    DO 10 TIMES.
    WRITE:/ SY-INDEX.
    HIDE SY-INDEX.
    ENDDO.
    START-OF-SELECTION.
    AT LINE-SELECTION.
    MESSAGE I002(SY) WITH SY-INDEX.
    AT USER-COMMAND.
    MESSAGE I002(SY) WITH 'USER COMMAND'.
    END-OF-SELECTION.
    Thanks in advance
    Sachin Gautam

    hi
    Syntax
    AT USER-COMMAND.
    Effect
    This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
    Note
    Self-defined function codes are all those that include character combinations, except for the following:
    The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
    All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
    The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
    Table 1
    Function code Function
    %CTX Call a context menu
    %EX Exit
    %PC Save to file
    %PRI Print
    %SC Search for ...
    %SC+ Find next
    %SL Search in office
    %ST Save to report tree
    Table 2
    Function code Function
    BACK Back
    P- Scroll to previous page
    P-- Scroll to first page
    P+ Scroll to next page
    P++ Scroll to last page
    PFILE name Store list lines in a text file named abap.lst in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.
    PL- Scroll to first line of the page
    PL-n Scroll n lines back
    PL+ Scroll to last line of the page
    PL+n Scroll n lines up
    PNOP No effect
    PP- Scroll back one page
    PP-n Scroll n pages back
    PP+ Scroll one page forward
    PP+n Scroll n pages forwad
    PPn Scroll to beginning of page n
    PRI, PRINT Print
    PS-- Scroll to first column
    PS++ Scroll to last column
    PS- Scroll one column to the left
    PS-n Scroll n columns to the left
    PS+ Scroll one column to the right
    PS+n Scroll n columns to the right
    PSn Scroll to column n
    PZn Scroll to line n
    RW Cancel

  • Trying to generate the spool from at user command...

    Hi Gurus,
    The spool is not getting created in the foreground, I think I am missing something here, the code is below.
    AT USER-COMMAND.
      CASE sy-ucomm .
        WHEN 'SEND'.
          PERFORM get_cust_emails.
          LOOP AT i_output.
            READ TABLE i_mail INTO wa_mail WITH KEY kunnr = i_output-rcvprn. " rcvprn  is customer number,
            IF sy-subrc IS INITIAL.
              IF wa_mail-smtp_addr IS NOT INITIAL.  if the customer has an email then create the entry in i_output_mail.
                i_output_mail = i_output.
                APPEND i_output_mail.
                CLEAR: i_output_mail.
                DELETE i_output.
                CLEAR: i_output.
              ENDIF.
            ENDIF.
          ENDLOOP.
    Setting the Print Parameter's for Portrait
          PERFORM f_print_report. " form is below
          SORT i_output_mail BY rcvprn belnr. "rcvprn is the customer number
          PERFORM f_prepare_mail. " form is below
          MESSAGE i307.
          LEAVE LIST-PROCESSING.
         WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
      ENDCASE.
    Subroutines provided below:
    FORM f_print_report .
    *Program name
      DATA : l_prog_name TYPE sy-repid,
             i_print TYPE slis_print_alv.
    Local Constants
      CONSTANTS: lc_vline TYPE c VALUE '|'.
      l_prog_name = sy-repid.
      CLEAR: i_events[], wa_events.
      wa_events-name  = c_top. "'TOP_OF_PAGE'.
      wa_events-form  = c_top.
      APPEND wa_events TO i_events.
      CONSTANTS: lc_prtr   TYPE sypdest VALUE 'LP01',
                 lc_layout TYPE sypaart VALUE 'X_90_120',
                 lc_layout1 TYPE sypaart VALUE 'X_65_255',
                 lc_lines  TYPE sylinsz VALUE '-120',
                 lc_lines1  TYPE sylinsz VALUE '-185',
                 lc_mode   TYPE sycallr VALUE 'CURRENT'.
    Get the print paramters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          authority              = space
          destination            = lc_prtr
          immediately            = space
          new_list_id            = c_x
          layout                 = lc_layout
          line_size              = lc_lines
          mode                   = lc_mode
          no_dialog              = c_x
          report                 = sy-repid
          user                   = sy-uname
          suppress_shading       = c_x
        IMPORTING
          out_parameters         = i_pr_param
          valid                  = l_valid
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      CLEAR: g_heading_completed."Indicator for print header
    ENDFORM.                    "f_print_report
    FORM f_prepare_mail .
      LOOP AT i_output_mail.
        l_flag_mail = 'X'.
        CLEAR: l_flag.
        WRITE: /08(1) c_vline, 10(09) i_output_mail-stapa1, 20(1) c_vline,21(10) i_output_mail-datum,
                31(1) c_vline, 32(10) i_output_mail-belnr,  42(1) c_vline,43(15) i_output_mail-total,
                58(1) c_vline, 59(15) i_output_mail-surcrg, 74(1) c_vline,75(05) i_output_mail-kperc,
                80(1) c_vline, 81(15) i_output_mail-betrg,  96(1) c_vline,97(19) i_output_mail-summe,
               116(1) c_vline,117(03) i_output_mail-curcy, 120(1) c_vline.
        AT END OF rcvprn.
          SUM.
          ULINE /8(113).
          WRITE:  /8(1) c_vline.
          FORMAT COLOR 3.
          WRITE: 10(09) text-064, 20(01) c_vline,             21(10)  space,
                  31(1) c_vline, 32(10) space,                42(01)  c_vline, 43(15) i_output_mail-total,
                  58(1) c_vline, 59(15) i_output_mail-surcrg, 74(1)   c_vline, 75(05) space,
                  80(1) c_vline, 81(15) i_output_mail-betrg,  96(1)   c_vline, 97(19) i_output_mail-summe,
                 116(1) c_vline,117(03) space,                120(01) c_vline.
          FORMAT COLOR OFF.
          ULINE /8(113).
          NEW-PAGE.
        ENDAT.
        AT END OF rcvprn.
          i_pr_param-linsz = 1000.
          NEW-PAGE PRINT ON PARAMETERS i_pr_param NO DIALOG.
          NEW-PAGE PRINT OFF.
        If spool number is obtained, generate PDF
          IF sy-spono IS NOT INITIAL.
            PERFORM f_generate_pdf.
    *Send the PDF as mail attachement
            PERFORM f_send_email.
          ENDIF.
        ENDAT.
      ENDLOOP.
    ENDFORM.                   " SEND_MAIL
    Please check the code and suggest some changes.
    Thanks,
    Sukumar.

    Hi,
    The data is getting printed incorrectly, I have coded as you have instructed. But the report output (not emailing) is getting printed ok. The code for that is as below.
    FORM f_list_display .
      LOOP AT i_output.
        g_flag = c_x.
        CLEAR: g_flag_mail.
        WRITE: /08(1) c_vline, 10(09) i_output-stapa1, 20(1) c_vline,21(10) i_output-datum,
                31(1) c_vline, 32(10) i_output-belnr,  42(1) c_vline,43(15) i_output-total,
                58(1) c_vline, 59(15) i_output-surcrg, 74(1) c_vline,75(05) i_output-kperc,
                80(1) c_vline, 81(15) i_output-betrg,  96(1) c_vline,97(19) i_output-summe,
               116(1) c_vline,117(03) i_output-curcy, 120(1) c_vline,121(10) i_output-rcvprn.
        AT END OF rcvprn.
          SUM.
          ULINE /8(113).
          WRITE:  /8(1) c_vline.
          FORMAT COLOR 3.
          WRITE: 10(09) text-064, 20(01) c_vline,        21(10)  space,
                  31(1) c_vline, 32(10) space,           42(01)  c_vline, 43(15) i_output-total,
                  58(1) c_vline, 59(15) i_output-surcrg, 74(1)   c_vline, 75(05) space,
                  80(1) c_vline, 81(15) i_output-betrg,  96(1)   c_vline, 97(19) i_output-summe,
                 116(1) c_vline,117(03) space,           120(01) c_vline.
          FORMAT COLOR OFF.
          ULINE /8(113).
          NEW-PAGE.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " F_LIST_DISPLAY
    The code which you gave should work as the above code. The above code is for report output and our code is for sending mails to the customers separately, thus we are creating separate spools customer-wise.
    Our code for emailing to customers seperately is below.
    FORM f_prepare_mail .
    LOOP AT i_output_mail.
    At new rcvprn.
    NEW-PAGE PRINT ON PARAMETERS i_pr_param NO DIALOG.
    endat.
    l_flag_mail = 'X'.
    CLEAR: l_flag.
    WRITE: /08(1) c_vline, 10(09) i_output_mail-stapa1, 20(1) c_vline,21(10) i_output_mail-datum,
    31(1) c_vline, 32(10) i_output_mail-belnr, 42(1) c_vline,43(15) i_output_mail-total,
    58(1) c_vline, 59(15) i_output_mail-surcrg, 74(1) c_vline,75(05) i_output_mail-kperc,
    80(1) c_vline, 81(15) i_output_mail-betrg, 96(1) c_vline,97(19) i_output_mail-summe,
    116(1) c_vline,117(03) i_output_mail-curcy, 120(1) c_vline.
    AT END OF rcvprn.
    SUM.
    ULINE /8(113).
    WRITE: /8(1) c_vline.
    FORMAT COLOR 3.
    WRITE: 10(09) text-064, 20(01) c_vline, 21(10) space,
    31(1) c_vline, 32(10) space, 42(01) c_vline, 43(15) i_output_mail-total,
    58(1) c_vline, 59(15) i_output_mail-surcrg, 74(1) c_vline, 75(05) space,
    80(1) c_vline, 81(15) i_output_mail-betrg, 96(1) c_vline, 97(19) i_output_mail-summe,
    116(1) c_vline,117(03) space, 120(01) c_vline.
    FORMAT COLOR OFF.
    ULINE /8(113).
    NEW-PAGE.
    ENDAT.
    AT END OF rcvprn.
    i_pr_param-linsz = 1000.
    NEW-PAGE PRINT OFF.
    If spool number is obtained, generate PDF
    IF sy-spono IS NOT INITIAL.
    PERFORM f_generate_pdf.
    *Send the PDF as mail attachement
    PERFORM f_send_email.
    ENDIF.
    ENDAT.
    ENDLOOP.
    ENDFORM. " SEND_MAIL
    Let me know, what could be the error in our code which generates separate spools for customers.
    Thanks in advance for the help.
    Sukumar.

  • Gui status (AT USER-COMMAND) trigger at first

    Hello all,
    I wrote a basic list  shown below.
    In it , AT USER-COMMAND and AT LINE-SELECTION events are used all.
    when i double click on line in the list, I think the at line-selection should be trigger at first. but  in fact ,the AT USER-COMMAND trigger.
    and the sy-ucomm get the first button value in the GUI-STATUS BAR(There's only one button on it).
    how can i solve it .
    any answers should be appreciated.
    START-OF-SELECTION.
      SET PF-STATUS 'ZSATMM24F1'.
      write :  \ 'aaaaaaaaaaaa'
      write :  \ 'aaaaaaaaaaaa'
      write :  \ 'aaaaaaaaaaaa'
      write :  \ 'aaaaaaaaaaaa'
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'TO_a'.
          PERFORM to_a.
      ENDCASE.
    AT LINE-SELECTION.
      write : 'test'.
    best regards,
    daniel.

    Please make sure to add the fcode PICK to the F2 function code in your gui status and try again.
    Regards,
    Rich Heilman

  • Getting error "1013009 Administrator Has Temporarily Disabled User Commands

    Hi All,
    I am getting the error"1013009 Administrator Has Temporarily Disabled User Commands" while executing a report script in Essbase 11.1.1.3
    Appreciate any help..
    Thanks
    Mahesh

    Mahesh wrote:
    Hi All,
    I am getting the error"1013009 Administrator Has Temporarily Disabled User Commands" while executing a report script in Essbase 11.1.1.3
    Appreciate any help..
    Thanks
    Mahesh
    Possible Cause
    When a database is being restructured or any application/database on the server is being copied, you can get this message.
    or
    When a cube is being restructured, commands are restricted because the integrity of the cube has to be stable and no one is allowed to access it.
    or
    Copying an application requires that the Essbase security file be in read/write mode and therefore other applications are not accessible until the process is completed.
    Possible Solution
    In Application Settings, verify that the Allow Commands or Allow Updates options are not selected.
    If not selected select those..and try
    Regards,
    Prabhas
    Edited by: P on Apr 7, 2011 3:36 PM
    Edited by: P on Apr 7, 2011 3:38 PM

  • How to restore views and procedures after drop user command?

    How to restore views and procedures after drop user command?
    We have 817 EE on NT and one developer created a lot of procedures, functions and vews. DB was not backuped and archived and export has not been done - our fault and we understand it. Sorry for this.
    Ok, now the story: another developer dropped this db user and we lost everything: procedures, functions and vews. The new user with trhe same name was created and new schema was imported in this user, but all old objects are lost. We don't have export and backup and archive log files.
    Question: may we can restore this lost stuff from some other sources. We are looking for lost codes, not data. May be we can use redo logs or shared pool or any other things. Any idea will be appreciated.
    Thanks.
    Victor
    [email protected]

    The switch has occurred after user was dropped, the data has been overwritten and there is be no way to use redo log files.
    I would like to explore another opportunity. Is possible to use Shared Pool or any Data Dictionary internal information to restore texts of the lost SQL and PL/SQL scripts executed in this DB before user was dropped? Not too many scripts are executed in this DB and the lost ones may still be in stack. I remember that Shared Pool (cash) should keep last executed scripts in order to improve performance. They probably are kept in some special format. Can we restore these scripts? Of course they also might be pushed out by Import that had been done after user was dropped.
    Thanks for your help,
    Victor

Maybe you are looking for