Fct codes for PRINT , FIND ,FIND next

hi,
my requriement is I have to exclude PRINT,FIND and FFIND NEXT from my screen.
for that I need set pf-status excluding itab.
I have to take an internal table with these function codes.
help me its urgent

Hi sudha ,
List Events in an ABAP Program
After a user interaction on a list, the ABAP runtime environment checks whether it should process the function code itself (for example, %EX or %PC), or whether it should trigger the relevant event. Unlike normal screens, in which the PAI event is triggered, the runtime environment triggers three special events when list events occur. You can use the corresponding event blocks in your ABAP program to react to the user action. From within the program, you can use the SY-UCOMM system field to access the function code. There is no OK_CODE field that is filled.
Event Blocks for Function Codes PF<nn> (Obsolete)
When the user chooses a function code PF<nn> (<nn> can be between 01 and 24), the system always triggers the AT PF<nn> event. In the standard list status, the function keys F<nn> that are not reserved for predefined system functions all have the function code PF<nn> as long as a corresponding event block is defined in the program.
AT PF<nn>.
<statements>.
These event blocks are executed when the user chooses the corresponding function key. The position of the cursor in the list is irrelevant.
If you use these event blocks at all, it should only be for temporary test versions. In production programs, you should only use AT USER-COMMAND with a dialog status of your own to assign function codes to function keys. When you use your own interfaces, the system displays a function text explaining what the function does. This does not happen when you use AT PF<nn> event blocks.
Event Block for Function Code PICK
When the user triggers the function code PICK, AT LINE-SELECTION is always triggered if the cursor is positioned on a list line. The function code PICK is, by default, always linked with function key F2 and hence with the mouse double-click. Consequently, if you have a simple program that does not react to any further user actions, you only need to write this event block.
AT LINE-SELECTION.
<statements>.
As described in the section Dialog Status for Lists, the function code PICK is always added to the standard list status when you have an AT LINE-SELECTION event in your program.
If you assign PICK to other function keys or menu entries, AT LINE-SELECTION is also triggered when the user chooses then. You should avoid this for the sake of the semantics.
Conversely, if you have a more extensive program that does not react to line selection, you should not use the function code PICK. Instead you should assign a different function code to F2 , to ensure that as many events as possible trigger the AT USER-COMMAND event.
Event Block for User-Defined Function Codes
If the user chooses a function code during list processing that is neither processed by the system, or PICK or PF<nn>, 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 tell the function codes apart. 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 PF<nn> trigger the AT LINE-SELECTION and AT PF<nn> events, 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.
Examples
Example for AT LINE-SELECTION.
REPORT demo_list_at_line_selection.
START-OF-SELECTION.
WRITE 'Basic List'.
AT LINE-SELECTION.
WRITE: 'Secondary List by Line-Selection',
/ 'SY-UCOMM =', sy-ucomm.
When you run the program, the basic list appears with the standard list status. The detail list shows that SY-UCOMM has the value PICK.
Example for AT PF<nn>.
REPORT demo_list_at_pf.
START-OF-SELECTION.
WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
AT pf5.
PERFORM out.
AT pf6.
PERFORM out.
AT pf7.
PERFORM out.
AT pf8.
PERFORM out.
FORM out.
WRITE: 'Secondary List by PF-Key Selection',
/ 'SY-LSIND =', sy-lsind,
/ 'SY-UCOMM =', sy-ucomm.
ENDFORM.
After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
Secondary List by PF-Key Selection
SY-LSIND = 14
SY-UCOMM = PF06
Example for 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.
When you run the program, the system displays the following basic list with a the page header defined in the program:
You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
Example for SET 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'.
This program creates one basic list and three detail lists. When the program starts, the third detail list is displayed immediately, along with a dialog box for searching in the list. The dialog box is displayed by setting the predefined function code %SC. To view the other lists, the user chooses Back.
Note that in the event AT PF05, the SET CURSOR statement is used to position the cursor on a list line in order to support the function code PICK.
I think this will solve u r problem.
Reward points if useful..
Regards
Nilesh

Similar Messages

  • Need help to write code for 'Print" button......!

    Hi all,
    I am working in oracle forms 6i.I am creating forms for ordering product/quantity(Entering quantity/product details). In my form i have "Print button" to print the quantity details which is in multi-record block(database item).Please help me of how to write code for print button. If u had any source code please post it.
    Please help asap......!
    Thanks
    regards,
    jame

    You haven't got an answer or a reply because this question is asked so many times.
    Why don't you search the forum to find them?

  • In menu bar for print, find, and find next

    Hi Everyone,
    In the menu bar apart from back cancel, i have these icons also print, find and find next.
    To implement these to perform their respective functions, is there any stantards functions or forms to invoke or else how could it be achieved.
    Any help on this will be of great use to me.
    Thanks in advance,
    Prabs.

    Hi Everyone,
    See in the standard toolbar of my screen i have these icons which are assigned to standard function codes, but when i execute my pgm and press the buttons it says
    This function is not possible, so my question is do i have to code something in the program for these to work.
    Any help will be great use to me.
    Thanks,
    Prabs.

  • TRIED THis CODE for TO FIND THE FIBONACCI USING THREAD ,BUT SHOWING ERROR FOR FOLLOWING CODE  fib = fib(k+1);

    showing following error in line 34
    error: cannot find symbol
    fib = fib(k+1);
           ^
      symbol:   method fib(int)
      location: class FibN
    1 error
    import java.util.*;
    class AsynchFunctionTest
    public static void main(String[]args)
    Scanner in = new Scanner(System.in);
    System.out.print("enter value for n");
    int n = in.nextInt();
    FibN t = new FibN(n);
    t.start();
    try
      t.join();
    catch(InterruptedException e){}
    System.out.println("Fib("+n+") = "+ t.getResult());
    class FibN extends Thread
    private int n;
      private long result;
    public FibN(int nn)
      n = nn;
      public void run()
    long fib = 1;
    int k = 0;
    while(k < n){
    fib = fib(k+1);
    k++;
    result = fib;
    public long getResult()
    return result;

    rinojoseph wrote:
    sorry for that this is the error i getting for that code
    error: cannot find symbol   line 34
    fib = fib(k+1);
           ^
      symbol:   method fib(int)
      location: class FibN
    1 error
    Process completed.
    sorry
    Hmm - well you declared 'fib' like this:
    >
    long fib = 1;
    >
    So how do you expect to call a 'long' as if it were a function?

  • Code for printing swf

    I am looking for code to print the several frames of an swf
    with one button click. Does anyone have any code for this? If I
    have labels and use #p on a label layer will it mess up calling my
    other labels?
    Many thanks in advance!

    if you're using Flash 7 or higher, have a look at the
    PrintJob class and the examples in the help. This class avoids
    requiring labels on frames you want printed. it also can send
    several pages at once to the printer, meaning the printer's
    dialogue box only appears once.

  • Indesign CC preset codes for printing

    with the update for Indesign CC, it is not holding my preset codes used for printing different documents. Any clues on this?

    Another way of looking at it: you can work out effective ppi by counting pixels and using a ruler.
    Use the ruler to see the size on the FINAL printed page. Perhaps your picture measures 2 inches high by 3 inches wide  on the paper. That's the effective size of the picture. Of course you don't need a ruler, but you need to understand that is what you are measuring.
    Now, an image is so many pixels wide (and high, but let's just talk wide). Perhaps your image is 600 pixels wide.
    So we have two figures
    width in pixels = 600
    effective width in inches = 3
    What do we do with this? Divide the first figure by the second to get pixels per inch.
    pixels per inch = width in pixels / effective width in inches = 600 / 3 = 200.
    You can do the same for height; ideally you get the same answer but you won't always; use the lowest number.

  • Code for PRINTING

    I have created a form with a button that runs a javascript to print the document (ACROFORM) and added the code to the button's Javascript Mouse Up :
    this.print(false, this.pageNum, this.pageNum);
    this.print({bUI: false, bSilent: true, bShrinkToFit: true});
    When I press the button, a "SAVE AS" window opens and says "Save the PDF file as..." Note : The console Debugging is empty (no error messages) and the default printer on Windows Print Parameters is my printer Canon.
    This other code also yields no results :
    var pp = this.getPrintParams();
    pp.interactive = pp.constants.interactionLevel.silent;
    pp.colorOverride = pp.constants.colorOverrides.mono;
    pp.firstPage = 0;
    pp.lastPage = 0;
    this.print(pp);
    Again, the same message and the same problem = DOES NOT PRINT.
    What is wrong?? Any clues?
    Thank you,
    Maleck

    is there a way to alter this so that it could automatically print a 'variable' that would be in the filename? For instance a file named "4 6 ee-235-912", only pages 4 and 6 would get printed (so page, ..., page, name space delimited)?
    And then I would like a way to make some sort of bat file or something, just a simple script that would do this function automatically (so is there a way to access the custom function/macro via the commandline? ie "acrobat.exe filename.pdf -o optionRunMyMacro"

  • Pass code for printer

    Is it possible to set a passcode for printers at SAP level?

    That is not a SAP standard funtionality, that can be easily done from the printer side if your printer support it.
    Regards
    Juan

  • HOW TO FIND T-CODES FOR SCRIPT FORMS?

    HI EVERY BODY,
    "ME9F" IS THE T-CODE FOR PRINTING "MEDRUCK" FORM ALONG WITH THE DATA FROM PRINT PROGRAM.
    LIKE WISE WHAT ARE ALL THE OTHER T-CODES FOR SAP PROVIDED FORMS. PLEASE LET ME KNOW HOW TO FIND THESE T-CODES?
    THANKS IN ADVANCE,
    REGARDS,
    MOUNIKA.

    Hi Mounika,
    Please check this transaction as well.
    ME9A  - Message Output: RFQs                 
    ME9E  - Message Output: Sch. Agmt. Schedules 
    ME9F  - Message Output: Purchase Orders      
    ME9K  - Message Output: Contracts            
    ME9L  - Message Output: Sched. Agreements    
    PJNA  - Message Output                       
    WLN14 - Message Output Agency Documents      
    WLN15 - Message Output for List Documents   
    Hope this will help.
    Regards,
    Ferry Lianto

  • Need code for PR and me49

    hi all
    i need the z program code for printing pr that is ME51n and also the code for the z prorgram for price comparision list me49

    Hi
    i need source code of  program to print th e pr generated via me51n . In standard sap this is not possible to take out the print of the PR as it is an internal document now pepole say  that try to convince the Client .............but i need that code if somebody can please share that here

  • Pb for printing elements values

    This modified sample code for printing elements values doesn't seems to work ?
    an idea ? VALUE is always empty !
    -- prints elements in a document
    procedure printElements(doc xmldom.DOMDocument) is
    nl xmldom.DOMNodeList;
    len number;
    n xmldom.DOMNode;
    begin
    -- get all elements
    nl := xmldom.getElementsByTagName(doc, '*');
    len := xmldom.getLength(nl);
    -- loop through elements
    for i in 0..len-1 loop
    n := xmldom.item(nl, i);
    dbms_output.put_line('TAG ' &#0124; &#0124; xmldom.getNodeName(n));
    dbms_output.put_line('VALUE ' &#0124; &#0124; xmldom.getNodeValue(n)); -- Added line
    end loop;
    dbms_output.put_line('');
    end printElements;
    null

    getNodeValue() for elements will always be null since elements do not have a node value.
    Attribute nodes have a value <foo attr="yes"/>
    Text nodes have a value.
    Comment nodes have a value.
    PI nodes have a value.
    So, where you are asking for the
    value of an element, you likely
    intend to be getting the
    value of the Text node child
    of that element as in:
    <foo>Some Value</foo>
    The <foo> element has no value, but
    it has a Text-Node child with
    a value of "Some Value"

  • Possible to code a Find/Find Next feature for use inside a Table Control

    Hello,
    I have a Table Control that displays many lines.  Is it possible to code a Find/Find Next feature that would allow the user to enter a 'keyword' then search each line of the Table Control for existing matches?
    I have provided the user with various Selection Criteria that will filter the table control results, but there are still too many lines to visually scan for the desired result.
    I am guessing that I would place an input box and a 'Find' button onto my layout screen. Then in user command, I have to scroll through each line of the table control and check every value to see if the string contains 'keyword' When found, stop  and display table control assigning current line as Top line?
    Am I on the right track or is there a better solution already?
    Kind Regards,
    MPersson

    I've done that. It works pretty well. You might want to allow the user to search only in selected column(s) as well.
    Rob

  • How do I print a configuration page to find the printer code for my laserjet printer to eprint?

    How do I print the configuration page to find the printer code for my laserjet p1102W?

    Guide here:
    http://h30434.www3.hp.com/t5/ePrint-Print-Apps-Mobile/Add-your-printer-to-your-ePC-account-Print-Web...
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • PageComposer Error - Cannot find the module necessary for printing C5051

    Hi
    Having some problems trying to setup a Windows 2008 R2 print server with shared Canon iR C5051 printer
    I've created the printer, installed the 64 bit driver Canon iR-ADV C5045/5051 PCL6 v 20.90 and works fine for 64 bit Windows 7 clients, installed the 32 bit driver by selecting printer properties, sharing tab, additional drivers and selecting x86 and pointing to the 32 bit PCL driver. Driver installs fine on the print server without any errors.
    Goto 32 bit client, add printer, select the shared printer from the printserver, printer installs Ok. When the user however tries to print, get the error:-
    Canon PageComposer
    Cannot find the module necessary for printing
    Re-install the printer driver
    I've done this countless times, any idea's on how to fix ?
    Thanks

    Where is the code you posted? Running in a separate project, I assume? Does that project have a dependency on the project containing the app module specified?
    And just to check (although by default, JDev should do this for you)--the app module project has been compiled since adding the configuration, right? You need to check to make sure the config exists not only under Project/src, but under Project/classes.
    Edited by: Avrom Roy-Faderman on Oct 6, 2008 2:02 PM
    Oh, and BTW--I assume this is not a typical ADF application, right? In a standard ADF application, you would very rarely need to instantiate an application module in code like this; you could just let the data binding facility do it for you. The technique like the one you're using is most appropriate for purely programmatic, no-UI cases. (e.g., once I tried to implement an SMTP server backed by business components. That was an appropriate case for ditching databindings and doing the sort of thing you're doing, because it had no view layer (because it had no UI to render).

  • Where do I find my PUK Code for my PAYG T-mobile Samsung Galaxy S5

    Cannot find where my online PUK Code for T-Mobile is - the explanation on EE's page is next to useless!  As I can't currently use the phone - I'm in a jam!!!

    Look in your online a/c under Manage Device.

Maybe you are looking for