Skip to Content
author's profile photo Former Member
Former Member

report

Difference Between ATPF and AT user command?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 09:43 AM

    Hi

    AT PF is used in interactive reports For predefined function keys...

    AT NEW is used within Internal table

    this is mainly used to do Totals/sum for the Qty and Amount fields based on a key field in that internal table

    DATA: sflight_tab TYPE SORTED TABLE OF sflight

    WITH UNIQUE KEY carrid connid fldate,

    sflight_wa LIKE LINE OF sflight_tab.

    SELECT *

    FROM sflight

    INTO TABLE sflight_tab.

    LOOP AT sflight_tab INTO sflight_wa.

    AT NEW connid.

    WRITE: / sflight_wa-carrid,

    sflight_wa-connid.

    ULINE.

    ENDAT.

    WRITE: / sflight_wa-fldate,

    sflight_wa-seatsocc.

    AT END OF connid.

    SUM.

    ULINE.

    WRITE: / 'Sum',

    sflight_wa-seatsocc UNDER sflight_wa-seatsocc.

    SKIP.

    ENDAT.

    AT END OF carrid.

    SUM.

    ULINE.

    WRITE: / 'Carrier Sum',

    sflight_wa-seatsocc UNDER sflight_wa-seatsocc.

    NEW-PAGE.

    ENDAT.

    AT LAST.

    SUM.

    WRITE: / 'Overall Sum',

    sflight_wa-seatsocc UNDER sflight_wa-seatsocc.

    ENDAT.

    ENDLOOP.

    Reward points if useful

    Regards

    Anji

    Message was edited by:

    Anji Reddy Vangala

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 09:44 AM

    hi,

    ATPF when u execute keyboard key.

    AT usercommand when u execute buttons on screens

    Reward with points if helpful.

    Message was edited by:

    Vinutha YV

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 09:42 AM

    At PF: When you execute a keyboard key the line will execute.

    At user command: when you execute a button in the screen, the line will execute.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      At PF example:

      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.

      At user command example:

      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.

  • Posted on May 29, 2007 at 09:43 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 29, 2007 at 09:43 AM

    Hi

    both are used to handle the user actions in the module pool programming, differance is

    AT user-command will raise when user performance and action and depends on the value of sy-ucomm we need to process.

    AT PF is used to process the process codes attached to the pf-status of the program.

    Thanks

    Srini

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.