Creating Context Menus for reports

Hi All,
I have a classic report with some fields. Whenever I right click on any of the values in the report column, a context menu should appear with the options I define.
Any idea abt how to do this?
Regards,
Sushma.

Hi,
<u><b>Context Menus for Lists</b></u>
As with normal screens, the system creates a standard context menu when you use a dialog status in a list. You can call this standard context menu using the right-hand mouse button (Shift + F10). It displays all of the functions assigned to function keys.
You can define context menus for list lines in the same way as for screen elements. To do this, you must assign a special function code to the function key Shift+F10 in the dialog status of the list. To define context menus for a list, you must first have defined a dialog status for the list and set it using SET PF-STATUS.
In this dialog status, which you will normally create using the List status template, the List with context menu option must be selected in the function key setting attributes. To do this, place the cursor on a function key setting in the Menu Painter and choose Attributes or Goto   Attributes   F key setting. The function code %CTX is assigned to function key ShiftF10. Since the introduction of context menus on lists, it is no longer possible to assign ShiftF10 freely to any
function in the Menu Painter. In any existing dialog status where a function code was assigned to ShiftF10, it has been reassigned to ShiftCtrl+0. You must activate the function code %CTX manually before it has any effect in the dialog status.
As on screens, context menus on lists are generated dynamically in ABAP programs as objects of the class CL_CTMENU.
For context menus on lists, you must program a callback routine in the ABAP program:
FORM on_ctmenu_request USING <l_menu> TYPE REF TO cl_ctmenu.
ENDFORM.
In this subroutine, you can define a context menu using the object reference <l_menu> as described in the Context Menus [Page 639] section. To define a specific context menu, for example, you could get the cursor position on the list using GET CURSOR. If required, you may need to find out the current list level from the corresponding system fields (for example, SYLISTI).
When you right-click a list line (or choose Shift+F10), the callback routine is executed, and the context menu defined in it is displayed. If the user chooses a menu item, the system carries on processing according to the function code assigned to it. The function is either executed by the runtime environment, or the corresponding event is triggered (in which case, the function code is placed in the system field SY-UCOMM).
If you right-click outside a list line, the system displays the standard context menu.
Ex.
REPORT demo_list_context_menu .
DATA: wa_spfli TYPE spfli,
wa_sflight TYPE sflight.
START-OF-SELECTION.
SET PF-STATUS 'BASIC'.
SELECT * FROM spfli INTO wa_spfli.
WRITE: / wa_spfli-carrid,
wa_spfli-connid,
wa_spfli-cityfrom,
wa_spfli-cityto.
HIDE: wa_spfli-carrid, wa_spfli-connid.
ENDSELECT.
CLEAR wa_spfli.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'DETAIL'.
CHECK NOT wa_spfli IS INITIAL.
WRITE sy-lisel COLOR COL_HEADING.
SELECT * FROM sflight INTO wa_sflight
WHERE carrid = wa_spfli-carrid
AND connid = wa_spfli-connid.
WRITE / wa_sflight-fldate.
ENDSELECT.
ENDCASE.
FORM on_ctmenu_request USING l_menu TYPE REF TO cl_ctmenu.
DATA lin TYPE i.
IF sy-listi = 0.
GET CURSOR LINE lin.
IF lin > 2.
CALL METHOD l_menu->add_function
EXPORTING fcode = 'DETAIL'
text = text-001.
ENDIF.
CALL METHOD l_menu->add_function
EXPORTING fcode = 'BACK'
text = text-002.
ENDIF.
ENDFORM.
In the dialog status BASIC for the basic list, %CTX is assigned to Shift+F10. In the
callback routine, a context menu is defined. The definition depends on the cursor
position and the list currently displayed.
If the user right-clicks the two-line default page header on the basic list, the system displays a single-line context menu. The Back function is executed by the runtime environment. If you right-click a list line, a two-line context menu is displayed. The Detail function triggers the event AT USER-COMMAND.
Regards,
Bhaskar

Similar Messages

  • How to create Context Menu for Full Screen ALV

    Dear Experts,
    Please tell me the procedure to create Context Menu for ALV Grid (full screen ALV using SLIS ).
    Regards
    Arnab

    Hi,
    Check the demo program BCALV_GRID_06

  • Create t.code for report painter in CO-PA

    Dear experts!
    Now, I'm getting some issue about creating t.code for report painter in CO-PA.
    Really, I don't know to create t.code for report painter that is created and run in t.code KE30.
    Help me to solve the issue!
    Best regards, Huy

    Dear Huy,
    To create a tcode for report created on the KE30:
    1 - Get the parameters from your Z report, on table TKEB2 (on field REPID)
    2 - On the SE93 create your tcode with option "Transaction with parameters"
    2.1 - On the field "Transaction" fill with START_REPORT
    2.2 - Choose the option "Skip inicial screen" and "Inherit GUI attibutes"
    2.3 - On "Default Values" use the follow parameters:
    D_SREPOVARI-REPORTTYPE <RE>
    D_SREPOVARI-REPORT <NULL>
    D_SREPOVARI-EXTDREPORT <APPCLASS SUBCLASS+TABNAME     REPID>
    *This information you got in table TKEB2, eg:
    KE  01CE1CPFL                       ZDREB01
    I hope the information has been useful,
    Regards,
    Melina

  • How to create print format for report

    Hi Experts,
    Can we create print format for report program. I need x_90_150 format,
    means 90 rows and 150 column. If possible then give me solution.
    Thanks,
    Ashish.

    Get with your Basis folks to set up a 90x150 printer option.
    Then you set something like this.
    REPORT zlmr_lead_account_list LINE-SIZE 150 LINE-COUNT 90.

  • Error while creating logical port for Reporting

    Hi,
    In one of the training materials for Duet Enterprise, i saw the steps for creating logical port for the consumer proxy /IWTNG/CO_PXY_RECORDS_REPOSITO.
    When i am trying to create the logical port, i am getting an error saying,
    " SRT Framework exception: Error in WSDL access: Exception occurred in communication framework:Error in HTTP Framework:500 Native SSL error
    https://<server:port>/_vti_bin/OBAFileReceiver.asmx?wsdl "
    I would like to know is it really necessary to create this logical port for "Reporting Scenario" and is it not created automaticallly using the Installation Wizard??
    And in case it has to be created, how to resolve this SRT framework exception?
    ~ Ramanath.

    Hi,
    the consumer proxy  /IWTNG/CO_PXY_RECORDS_REPOSITO was used in Duet Enterprise SP01. Now with SP02 the consume proxy /IWTNG/CO_OBAFILE_RECEIVER_SOA is created.
    However, the SSL error that you are getting looks a little strange (it does not mean that there is an error, but it is worth checking):
    So can you go to SOAMANAGER -> Service Administration -> Single Service Configuration. In here select "Consumer Proxy" from the "Search by", Search Pattern "/IWTNG/CO_OBAFILE_RECEIVER_SOA" and Field: Both.
    You should find one entry. Select it and click "Apply Selection".
    Now go to the Configurations tab. Here you should see one Logical Port with name "LOGICALPORTFORREPORTING" with Creation Type "Manually Created". In fact this logical port was created by the Wizard.
    Click on Display and scroll down again. Now in the "Additional Information" tab there is a string after HTTP Destination, e.g. 0050568E3F5A1ED096F22339C44BAF83.
    Copy this value and go to your SAP GUI -> Transaction SM59.
    Here click on Find/Search and search for this HTTP Destination. You should find one Type G RFC Destination that has the target host of your SharePoint server and the path prefix /_vti_bin/OBAFileReceiver.asmx.
    Now you can test the service. Just click on Connection Test. The result should be a HTTP Response: 200.
    If not, then something went wrong with the automatic configuration and we should take another look at it (for example maybe the SSL certificate from SharePoint that was imported by the Wizard is not valid)
    Regards,
    Holger.
    PS. Don't use the "Ping Web Service" test from SOAMANGER -- unfortunately this is not working consistently.

  • Creating T-Code for Report in Report Painter

    Hi Experts,
    I need to create a T-Code for a report Z22KST2 in transaction CJE0 under the report type 001.Please suggest.
    Thanks in advance.
    Anand patil

    Hi
    Go to SE93
    enter the TCODE you wants to create for this report painter report
    Select the PARAMETER trasaction radiobutton.
    Enter the description and transaction as START_REPORT
    enter the REPORT TYPE and REPORT in the down
    D_SREPOVARI-REPORTTYPE      = < Report Group>
    D_SREPOVARI-REPORT  =      <report>
    Check this -
    For Report Painter
    http://help.sap.com/saphelp_47x200/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/content.htm
    http://searchsap.techtarget.com/searchSAP/downloads/Teach_yourself_SAP_C20.pdf#search=%22CREATE%20REPORT%20USING%20SQVI%20%2C%20SAP%22
    Re: Interactive ALV
    Reward points if useful
    Regards
    Anji

  • Creating Context Menu for JTree Node

    Hi to all,
    I need to create Context Menu, when i right click on any Tree Node.
    Context Menu should contain selected node information.
    if you click on one tree node named as "AAAA"
    Context Menu Format is as follows
    AAAA
    Create New
    Delete
    If any one knows, please help me

    Here is something for you to start
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=538065
    Denis Krukovsky
    http://dotuseful.sourceforge.net/

  • How to create t.code for report painter report created using CJE5

    Hi All,
    I'm trying to create T.code for a report painter program created using CJE5.
    I using the D_SREPOVARI-REPORTTYPE as "RE" and
    D_SREPOVARI-EXTDREPORT as KP 01RPSCO_X <report name>
    If I provide spaces between KP 01RPSCO_X <report name>, its not allowing spaces.
    If I didn't provide the space then its saying that "report does not exists"
    Please let me know how to overcome this issue?.
    What this KP  & 01RPSCO_X stands for? Is this always constant?
    There is a similar kind of transaction in other system which Looks like this " KP 01RPSCO_X <report name>" spaces in between
    I dont understand why its not allowing spaces in this system. As its in different system i cant make a copy of this transaction and change the parameters.
    Edited by: Mr A on Feb 18, 2010 5:28 PM
    Edited by: Mr A on Feb 18, 2010 5:54 PM

    thanks for giving me the link.
    I searched for all these link in SDN before posting itself.
    my issue is how to give the value for the parameater EXTDREPORT.
    If i give spaces for the value KP  01RPSCO_X <report name>, its throwing error, T,code its self is inconsistent.
    if i didnt give spaces its i'm able to create the t.code, but when i execute it, its giving error message saying "report does not exists"
    but if i go to CJE5, that report is there.
    thanks

  • Problem creating T-Code for report(type Form-report)

    Hi all,
    Can T-Code be created for reports which are of type'form report '.
    Here is the problem in detail :-
    I have to use transaction 'CJE3' where four reports got created.These reports are  of type 'form report'.Currently I am not able to create the transaction for the reports in se93 transaction.
    Please advice on how I can create T-Code for these reports.
    Regards,
    Anirban

    Hi Dutta ,
    this report is created by Report painter for this Reports if u want to create tcode please follow the steps.
    se93 ---> take option parameter transaction .
    1.default valuse for transcation is START_REPORT
    2.skip initial Scree =  kich this one
    3.screen = 0.
    4.kich all GUI check boxes
    5.last one , u have to entry values like this
    D_SREPOVARI-REPORTTYPE =  report Type
    D_SREPOVARI-REPORT     = name of the report in the bottom scree.
    Regards
    Prabhu

  • Create T.Code for Report painter- report (GRR1)

    Hi Experts,
    I have created report in report painter( T.code - GRR1) using 1vk library, now i want to have a transaction code for my new report.
    So, How can i create a T.code for customized report in GRR1.
    Thanks
    Raj

    Dear Raj,
    Hope this link will help you.
    http://home4sap.com/Blog/2009/08/how-to-create-a-transaction-code-for-report-painter-reports/
    Thanks and regards
    Praveen.J

  • Creating motion menus for DVDSP

    Does anyone know of a good book or video (online is fine too) that really goes into the hows of creating moving menus in Motion to be used in DVDSP?

    There are a number of problems with the script.  To see them for yourself, open the script with the UCCX script editor, Select Tools>Validate.  This will show you all of the consistency errors with the script in a new windows on the bottom right-hand side of the script editor.  You can select an error for it to take you to the problem in the script.
    Here are the main problems I see:
    1. You have many "GoTo" steps pointing to the "Menu" label, but there is no "Menu" label.  You need to create specific Labels for the English and Spanish Menus, then point to those as needed.  You can label a menu step by going to the properties of the step, selecting the label tab on the left-hand side, and enter the text of the label.
    2.  There are several Call Redirect steps to the variable "Front Desk", but that variable doesn't exist.
    3.  You have many Play Prompt steps playing the "Busy" prompt.  The script is case-sensitive, and your variable is named "busy".

  • How to create context menus

    Hi Friends,
       This is  Regarding to improve knowledge in Context menus and custom control like to place image on screen
    please can anyone provide details material or steps to pass images
    Please dont say to refer previous threads i am tired of that
    Thanks in advance

    >custom control like to place image on screen
    What do you mean by custom control?  There is a UI element for images.  That's all you need to place an image on the screen.  Here is the online help for the image UI element:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9e/ef8841e3af1609e10000000a155106/frameset.htm
    Similiarly you can read about custom context menus in the online help as well:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/93d4352e8c60d6e10000000a114a6b/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/180c60c2e927d0e10000000a155369/frameset.htm
    >Please dont say to refer previous threads i am tired of that
    Perhaps the fault is not with people supplying answers.  Consider that if you receive lots of answers with links to previous threads, that you are asking a common question that can be solved by either searching the forum or the online help.

  • How  to create  authorisation object for  report

    hi
    experts..
    hw  can u  create authorisation object for  the  custom report.
    Thanks&  Regards
    Spandana

    Hi,
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Sy-SUBRC values
    4              User has no authorization in the SAP System for
                   such an action. If necessary, change the user
                   master record.
    8              Too many parameters (fields, values). Maximum
                   allowed is 10.
    12             Specified object not maintained in the user
                   master record.
    16             No profile entered in the user master record.
    24             The field names of the check call do not match
                   those of an authorization. Either the
                   authorization or the call is incorrect.
    28             Incorrect structure for user master record.
    32             Incorrect structure for user master record.
    36             Incorrect structure for user master record.
    http://www.sap.ittoolbox.com/groups/technical-functional/sap-basis/please-how-to-create-an-authorization-object-386391 - 78k -
    http://www.sap-abaprogram.blogspot.com/2007/11/what-is-use-of-
    authorization-checks-to.html - 75k -
    www.sapworld.hpg.ig.com.br/download/ab4query.pdf
    with thanks,
    Abaper.

  • How to create a URL for report ?

    Hello,
    I have created a report for which my requirement in i have to create a URL for that report so that i can excecute where ever i want.
    Thks

    Hello,
    My client is asking like to create a URL for customized reports so that he can check his company sales where ever he want.
    Can we create a URL for our reports if yes please help me to achieve this.
    Points will be rewared without fail for helpful answers.
    Thks

  • How do we create a variant for report which runs in the background?

    Hi,
    I want to create a report which will have some variants and will be running in the background?
    The main intention is to transfer the data from one database into another. Please explain the step by step process.
    Regards
    Amit

    Hi Amit,
          When you run a report program in foregorund(If you have a selction-screen), by pressing F8 button, it takes you to the screen where when you press execute button, the report is executed.
          In this screen, you can enter the requirec values which you wish to store in the variables in the selection-screen and press SAVE button, then a variant will be created. You can create the required variants for your report and then when executing the same report in background, the process goes in this way,
    Go to SE38->Program-> Execute->Background, there you can give the variant name and press EXECUTE IMMEDIATELY and your program runs in background for the given variant.
    Hope this is helpful to you. If you need further information, revert back.
    Reward all the helpful answers.
    Regards
    Nagaraj T

Maybe you are looking for