Build screen menu dynamically during program flow

Hi there.
I've got such situation that I have to determine menu bar apperance according user priveleges.
So for example one user will see on the menu bar:
ITEM1
|____subitem1
|____subitem2
|____subitem3
Whilst other user would see :
ITEM1
|____subitem1
|____subitem3
Do You know some way to determine menu structure in ABAP code? Greetings. P.

hi,
while setting the menu use
excl_tab is an internal table should contain the function codes of the buttons which you want to disable for that particular user.
set pf-status 'MENU' excluding excl_tab.
see example below.
DATA fcode TYPE TABLE OF sy-ucomm.
MODULE status_0100 OUTPUT.
  APPEND 'CHANGE'  TO fcode.
  APPEND 'SAVE' TO fcode.
  SET PF-STATUS 'STATUS_0100' EXCLUDING fcode.
ENDMODULE.
rgds,
bharat.

Similar Messages

  • Change variable type during program flow

    Hi there. Please tell me is there a possibility in ABAP to change variable type during program flow? I'd be very thanful for suggestions. Greetings.

    hi,
       Make use of field symbols for that ...
    field-symbols : <fs> type any.

  • Dialog Box simulation without interrupting program flow

    I'm developing data acquisition/control software and need to give the end
    user flexibility to change the file to which the acquired data is being
    saved during operations. In the past, users have been confused with a
    simple string control that specifies the data file path, so I would prefer
    to move to the popup/dialog box standard to windows. Unfortunately, calling
    a dialog box results in the stoppage of program flow for the caller until
    the dialog box is closed (even though there may be no apparent data flow
    from the popup VI.) and stopping the program flow is not an option for this
    control system (the computer is controlling pressure, temperature, flow
    rates, etc of a very expensive and sensitive bit of hardware, so halting the
    control function for an unknown length of time is unacceptable).
    I am looking for the best way to accomplish this under LabVIEW 6i.
    Using a VI class reference through VI Server, I can essentially detach the
    popup window from the base program execution, spawning a separate
    application and passing the relevant parameters through judicious use of
    global variables. If I call the subroutine via VI server with "Wait until
    done" attribute set to false, the appropriate VI appears, functions
    correctly, and terminates as expected. Unfortunately, it remains visible on
    the screen, an inactive application. I have the VI Properties -> Window
    Appearance -> Customize -> Show Front Panel When Called and the Close
    Afterwards if Originally Closed checkboxes checked on this popup VI. It
    seems that calls through VI Server trigger the "Originally Open" flag, so
    the window does not close as I had expected.
    The way I have found to get around this problem is to use VI Server to call
    an intermediate subroutine whose front panel is not displayed and whose sole
    purpose it to call the subroutine that calls the dialog box. This does what
    I wanted, essentially. When the user wants to change directories, they
    press a button that triggers a call to VI Server to open a separate
    application. This application's front panel is never displayed and only
    calls a sub-VI that performs all the actual work and ends when it is
    completed. As this sub-VI terminates, all visible traces of the subroutines
    disappear and I'm left with just the primary program executing, continuing
    to take and send control signals through this whole process.
    This seems a rather cumbersome way to get a custom dialog box on the screen
    without stopping the program flow of the caller, however. Is there a more
    efficient way to accomplish this?
    Wade C. Eckhoff
    [email protected]

    Wouldn't it be easier to use two parallel independent while loops in the
    main vi, with one taking care of acquisition and the other of user
    interaction.
    When the UI loop is temporarily 'halted' because of the dialogue box poping
    up, the acquiring loop continues without delay.
    Regards
    Harrie Boonen
    www.novonordisk.com
    "Default User" wrote in message
    news:[email protected]...
    > I'm developing data acquisition/control software and need to give the end
    > user flexibility to change the file to which the acquired data is being
    > saved during operations. In the past, users have been confused with a
    > simple string control that specifies the data file path, so I would prefer
    > to move to the popup/dialog box standard to windows. Unfortunately,
    calling
    > a dialog box results in the stoppage of program flow for the caller until
    > the dialog box is closed (even though there may be no apparent data flow
    > from the popup VI.) and stopping the program flow is not an option for
    this
    > control system (the computer is controlling pressure, temperature, flow
    > rates, etc of a very expensive and sensitive bit of hardware, so halting
    the
    > control function for an unknown length of time is unacceptable).
    >
    > I am looking for the best way to accomplish this under LabVIEW 6i.
    >
    > Using a VI class reference through VI Server, I can essentially detach the
    > popup window from the base program execution, spawning a separate
    > application and passing the relevant parameters through judicious use of
    > global variables. If I call the subroutine via VI server with "Wait until
    > done" attribute set to false, the appropriate VI appears, functions
    > correctly, and terminates as expected. Unfortunately, it remains visible
    on
    > the screen, an inactive application. I have the VI Properties -> Window
    > Appearance -> Customize -> Show Front Panel When Called and the Close
    > Afterwards if Originally Closed checkboxes checked on this popup VI. It
    > seems that calls through VI Server trigger the "Originally Open" flag, so
    > the window does not close as I had expected.
    >
    > The way I have found to get around this problem is to use VI Server to
    call
    > an intermediate subroutine whose front panel is not displayed and whose
    sole
    > purpose it to call the subroutine that calls the dialog box. This does
    what
    > I wanted, essentially. When the user wants to change directories, they
    > press a button that triggers a call to VI Server to open a separate
    > application. This application's front panel is never displayed and only
    > calls a sub-VI that performs all the actual work and ends when it is
    > completed. As this sub-VI terminates, all visible traces of the
    subroutines
    > disappear and I'm left with just the primary program executing, continuing
    > to take and send control signals through this whole process.
    >
    > This seems a rather cumbersome way to get a custom dialog box on the
    screen
    > without stopping the program flow of the caller, however. Is there a more
    > efficient way to accomplish this?
    >
    >
    > Wade C. Eckhoff
    > [email protected]
    >
    >
    >

  • Documentation about Screen, Menu and Field Exits

    Hi all!!
    I need some documentation about Screen, Menu and Field Exits.
    I´m very interested specially on steps by steps.
    My mail is [email protected]
    Helpful posts will be rewarded.
    Thanks in advance and regards,
    Manuel.

    <b>Types of Exits </b>
    There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.
    <b>Menu Exits</b>
    Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.
    SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.
    <b>Screen Exits</b>
    Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.
    <b>Function Module Exits </b>
    Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits. 
    When you add a new menu item to a standard pull down menu, you use a function module exit to define the actions that should take place once your menu is activated. 
    Function module exits also control the data flow between standard programs and screen exit fields. SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs. 
    These calls have the following syntax: 
    CALL CUSTOMER-FUNCTION ‘001’.
    Field Exits
    Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field.  Example: The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100. 
    The field exit concept lets you create a special function module that contains this logic. 
    You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number. 
    In 4.6c, you can use "RSMODPRF" program to create field exits.
    An example of a user exits :-
    MODULE user_exit_0001 INPUT 
        CASE okcode.
            WHEN 'BACK OR EXIT'.
                CASE sy-dynnr.
                        WHEN '100'.
                             SET SCREEN 0.
                             LEAVE SCREEN.
                        WHEN '200'.
    **** Note that you can write any code that satisfy your needs.                                                     ****
    **** But in this case, this was wrote as a sample code for reference sake.                                    ****
    **** And you can test it.                                                                                ****
                             SET SCREEN 100.
                             LEAVE SCREEN.
                 ENDCASE.
          ENDCASE.
    reward  points if it is usefull..
    Girish

  • ABAP program flow.

    Hi,
    whenever i write abap program, i usually maintain following program flow.  is it right from performance tuning point of view?
    1) include statements
    2) DATABASE TABLES
    3)  VARIABLE DECLARATIONS
    4) SELECTION-SCREEN
    5) FIELD SYMBOLS
    6) INITIALIZATION
    7) AT SELECTION SCREEN
    8) TOP OF PAGE
    9) END OF PAGE
    10) START OF SELECTION
    11) END OF SELECTION
    Please advise
    Regards,
    Santosh

    Hello,
    Just to add to Kathick's explanation. ABAP is an event-driven programming language. The general flow of an ABAP program is controlled by events.
    It is a good -practice to code event processing blocks in the order in which they will be triggered during execution.  However, they do not have to be coded in a sequential order. 
    This is the first thing i learnt in ABAP basics class )
    BR,
    Suhas

  • Encore no longer behaving when building a menu.  Help!

    I have creative suite 5 for iMac.  Premiere works fine but when I want to build a menu in Encore and try to put Text into it, it announces a “General Error“ or "sorry an abnormal condition has been detected” and the screen goes “mad”.  I’d be grateful for any help!

    My guess is that you have a scope problem. By putting the button inside a movieclip you have made the buttons scope the same as that clip.
    So if you add a trace inside the release event handler, what do you get?
    trace("My current scope is: "+this);
    I'm guessing it is "_level0.mc_anim_backdrops_menu," right?
    So since you are using the global function of gotoAndPlay() it is looking for that label in the current timeline and not finding it.
    You should probably use the MovieClip method and specifiy which timeline it should look in.
    _root.gotoAndPlay("Why");
    _level0.gotoAndPlay("Why")
    _parent.gotoAndPlay("Why");
    both would probably work. I would never use the first two, other than to make sure that there wasn't something else going on...

  • I am using your software: CS^ InDesign Suite on a PC using a Windows 7 operating system.     Due to eyesight issues, I need to have the menu bars of programs in easy-to-read font and picture size.  Specifically, the menu bar

    Hi,
    I am using your software: CS6 InDesign Suiteon a PC using a Windows 7 operating system.
    Due to eyesight issues, I need to have the menu bars of programs in easy-to-read font and picture size.  Specifically, the menu bar across the top (File, Edit, View, etc.), and the menu bar on the left side with the graphic depiction of options.
    In earlier versions of Windows (e.g. XP), whenever I changed the screen resolution on my computer to a lesser resolution in order to show the link icons on my desktop in a larger, more readable size, all the software programs, including yours, appeared on my screen with the menu bars in the larger font size that I needed.
    However, in Windows 7, this is not the case.  Even though I have selected the lowest resolution, making the icons on my desktop extremely large, I cannot read the options across the top menu bar of your program, nor the pull-down menu items that they contain.  I cannot see the graphic depictions of options on the left side of the screen. They are all too small.  How can I make your program increase the size?

    CS6 is not high-DPI compatible/ enabled and that can't be changed. If you cannot6 make it work with your operating system means, then short of joining Creative Cloud and using newer versions there is nothing you can do.
    Mylenium

  • I am using CS6 InDesign suite on a PC using a Windows 7 operating system.     Due to eyesight issues, I need to have the menu bars of programs in easy-to-read font and picture size.  Specifically, the menu bar across the top (File, Edit, View, etc.), and

    I am using CS6 InDesign on a PC using a Windows 7 operating system.
    Due to eyesight issues, I need to have the menu bars of programs in easy-to-read font and picture size.  Specifically, the menu bar across the top (File, Edit, View, etc.), and the menu bar on the left side with the graphic depiction of options.
    In earlier versions of Windows (e.g. XP), whenever I changed the screen resolution on my computer to a lesser resolution in order to show the link icons on my desktop in a larger, more readable size, all the software programs, including yours, appeared on my screen with the menu bars in the larger font size that I needed.
    However, in Windows 7, this is not the case.  Even though I have selected the lowest resolution, making the icons on my desktop extremely large, I cannot read the options across the top menu bar of your program, nor the pull-down menu items that they contain.  I cannot see the graphic depictions of options on the left side of the screen. They are all too small.  How can I make your program increase the size?

    NO way.
    Mylenium

  • Selection screen in type m program

    How can we define Selection screen in type m program?
    Moderator message - please search the forum before asking. Thread locked.
    Edited by: Rob Burbank on Sep 20, 2009 2:19 PM

    Hi Anil ,
    Type M are module pool programs.
    For these you have to create you screen and then determine their flow in your program.
    These are executed by transactions.
    Search tutorials on module pool program .
    Hope its help you

  • How can i declare a selection screen in a DP program with transaction code.

    hi friends,
    How can i declare a selection screen in a DP program with transaction code. What are the events and flow logic..

    Search in SCN/Google for Module-pool programming basics.

  • Application to visualize program flow

    I'm looking for an easier way to "visualize" what is going on in the source code of a large project, in regards to function calls, method calls, and classes.
    For example, a source directory of a project will have a bunch of files, like this:
    anim.c
    character.c
    direction.c
    game.c
    input.c
    main.c
    player.c
    resources.c
    room.c
    screen.c
    If I didn't know anything about this project, if I wanted to try to understand how it works it would be difficult to start.
    Does anyone know of an application that will read source code and display a tree-like output of the program flow? For example, maybe like this:
    main() [main.c]
    -> create_game() [game.c]
    -> reset_timer() [timer.c]
    -> update_game() [game.c]
    ---> update_world() [world.c]
    ---> is_game_over() [game.c]
    ---> ...
    -> draw_game() [game.c]
    ---> draw_world() [world.c
    ---> ...
    -> destroy_game() [game.c]
    How about for classes and method calls?
    I don't care if it's GUI or CLI, or what programming language it's for. I think a program like this would be incredibly useful, especially in the FOSS community, and would be surprised if something doesn't already exist.

    cflow - For C programs. Nice and simple.
    KCacheGrind - Uses the "callgrind" application. I couldn't find callgrind in the Arch repositories or the AUR, so I gave up.
    codeviz - For C and C++ programs. I got it to produce a beautiful PNG tree of all of my function calls. I probably won't use it. A graphical tree output isn't so useful to me, and it was a bit tricky to actually setup and use. (for example, it requires a patched version of GCC)
    egypt - For C programs. Super duper simple concept, but requires some setup to use. I couldn't figure out how to configure and run it.
    gprof - Part of the GNU Binary Utilities. A little too low level for what I was looking for.
    pycallgraph - For Python programs. I didn't try it.
    doxygen - Is able to create documentation for anything in the world, including your car. I wish someone could tell me, "Type this doxygen command to create a call graph", but until that happens, I just can't seem to figure it out.
    cflow is definitely my favorite. I will do some post processing to the output to remove any functions that I didn't write.
    EDIT: Someone did a similar "review" to mine here, along with mentioning more programs to try out: http://grok2.tripod.com/code_comprehension.html
    Last edited by drcouzelis (2010-10-07 13:13:45)

  • How to find function code for Dynamic generated program

    Hi,
    I have created a dynamic program for getting different selection screens depending on inputs . I am finding a flaw that, pressing 'BACK' buttn is leading some other action which was coded by me,  instead of going back.
    SY-UCOMM is also not working as it is dynamic program.
    Help me for getting previous screen.
    Please suggest me the inputs.Thank u
    Regards
    Aditya

    Hi Klaus,
    As per ur instructions, I replaced SY-UCOMM with SSCRFIELDS.
    But no change in my problem.
    The following screen shot is a program which is coded dynamically using fieldsymbols.
    When I press BACK here for the following code selectionscreen, I am getting someother action which was coded by me. But not going back.
    Twist is, SSCRFIELDS-UCOMM or SY-UCOMM is getting captured for 'F8', but not 'BACK'.
    I hope, I have explained my issue clearly. Please let me know, if any deep clarifications needed.
    Regards,
    Aditya

  • Add selection screen field in standard program

    Hi Friends,
    I have a requirement to add a language selection screen field in standard programs (RFSUSA00, RFITEMGL, RFIDPL11, RFBELJ10_NACC, RFIDPL06, RAGITT_ALV01 , RFASLD15 , S_PL0_86000028 , RFCASH00 , RFIDPL18).
    This is such that when I select the appropriate language the output should get printed in that paticular language. Can someone help me with how to do this?
    Regards,
    Dikshitha

    Hi Dixitha,
    Use implicit enhancement option.
    Desplay the report in se38.
    In Menu, go to Edit > Enhancement Operations > Show Implicit Enhancement Options.
    The system will show you lines (in color) where you can add your enhancement.
    This function will allow you to add business rules, substitute fields, do extra calculations, and other unique, non-standard requirements.
    Reddy

  • Building Field Symbols Dynamically

    Hi All,
    Has anyone tried to build field symbols dynamically? something like this...
      DATA: field_symbol(13) TYPE c,
            v_lines          TYPE sy-tabix,
            v_count(2)       TYPE n.
      FIELD-SYMBOLS: <f2> TYPE ANY.
      DESCRIBE TABLE itab LINES v_lines.
      DO v_lines TIMES.
        v_count = v_count + 1.
        CONCATENATE '<fs_new_sf' v_count '>' INTO field_symbol.
        ASSIGN (field_symbol) TO <f2>.
        CONCATENATE '<fs_new_sf' v_count '>' INTO field_symbol.
        ASSIGN (field_symbol) TO <f2>.
        ASSIGN  COMPONENT v_sf01 OF STRUCTURE s_MARA TO <f2>.
      ENDDO.
    V_SF01 could be anything from MATNR to any field in table MARA.
    Although the above code is correct syntactically, and though there is no program termination either.
    the statement
    ASSIGN (field_symbol) TO <f2>.
    fails to assign the field symbol.
    Thanks,
    S-ray

    Hi Sudheer,
    There is a program termination because does not exist a field symbol called <fs_new_sf1> or <fs_new_sf2>... <fs_new_sfn> when you assign (field_symbol) TO <f2>.
    You should look for Dymamic Type specification, something like this:
    DATA: dref TYPE REF TO DATA.
    FIELD-SYMBOLS: <dobject> TYPE any.
    PERFORM declareData USING dref 'SFLIGHT'.
    ASSIGN dref->* to <dobject>.
    FORM declareData USING dref TYPE REF TO DATA
                           tname TYPE string.
    Create a data object of type 'tname'
    CREATE DATA dref TYPE (tname).
    ENDFORM.
    regards,
    Alejandro.

  • How to stop the program flow

    Hi all,
    i need to stop the program flow control without entering into the start-of-selection.
    i am using some manual conditions for validating some parameter fields...
    i used Leave list-processing--->but it dosint works
    call selection-screen 1000--->it works but when i click the back button the control goes inside the start-of-selection can any one help me with this....

    If you want to stop the program flow in case one condition is satisfied, you can use STOP or EXIT command. Else, if you want to stop the program and debug it just but BREAK command where ever you want to stop the program. Also, if you want to validate the program selection at the time of entering the selection before the start of selection, you need to add AT SELECTION-SCREEN event block before the start of selection.

Maybe you are looking for

  • Pension issue

    Hi, In Payroll GB, where we can set the limit for pension contribution? Any idea? Sukhram

  • No images in email

    I have to use safari to go online to check my email with my provider.  I used to get images but no longer.  We have troubleshot with the provider and they wonder if there is a setting in safari that started blocking my images.  Any ideas? Thanks Tamm

  • Jobs for EEO-4&5 Report in public sector...

    Hi Gurus!                I am working for a public sector PA impl. The client wants EEO 4&5 reports for public sector. We have a standard report for that. But since the report is based on jobs, i wanted to know if the jobs for EEO are the same jobs w

  • In FF 4.0 why does the down arrow no longer function in the vertical scroll bar?

    Prior to FF 4.0 when I positioned my cursor over the down arrow of the vertical scroll bar in Hotmail and depressed the left mouse button, the scroll bar moved downward toward the bottom of it's column limit. Now in 4.0 it turns into an adjustment cu

  • ZFS I/O read policy

    I'm trying to find out what defines the I/O read policy on ZFS is. In most volume managers, there's a setting for read policy (e.g. disksuite has roundrobin, geometric or first), but there doesn't seem to be anything for zfs that I can find. The reas