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

Surpress GET PERNR?

How do I suppress the GET PERNR event? I have a report where I do a table dump of T710 or output PA0008 based upon TAB selection. However, I want to prevent performance problem when I just want to dump T710 table. The GET PERNR event seems to output regardless of what TAB is selected. Here is a sample code:

START-OF-SELECTION.

  CASE P_TABSEL.
    WHEN 'T510'.
      P_IT08CHECK = ''.
      PERFORM 100.
    WHEN 'T710'.
      P_IT08CHECK = ''.
      PERFORM 110.
    WHEN 'IT08'.
      P_IT08CHECK = 'X'.
        GET PERNR.
    WHEN 'T510U'.
      P_IT08CHECK = ''.
      PERFORM 130.
  ENDCASE.

This doesn't work because I can't encapsulate the "GET PERNR" in an IF statement of in the FORM statement. Any idea how to ONLY activate the GET PERNR event when I have a particular tab selected?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Feb 24, 2005 at 07:37 PM

    Could you possibily use the REJECT keyword. I don't know, I've never worked with logical databases. Do F1 help on the keyword REJECT.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      The REJECT keyword says 'I do not want to continue processing with the data row you have returned to me'. By that time, the database has already been read and a row returned to your program. If there were more tables hierarchically hanging off the REJECTed row, they would not be processed further and therefore the read of those tables would be avoided.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2005 at 08:49 PM

    Check the selection screen of the LDB. If it is blank then GET PERNR should not get activated but if you/system selects somebody then it will be called. So it means you cannot use PNP LDB variables to process in your T710 processor.

    One option would be to CLEAR out all your PNP variables in your START-OF-SELECTION part.

    HTH

    Swapan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2005 at 09:13 PM

    I just stort of tweak it and did this. Seems to work so far

    CASE P_TABSEL.
        WHEN 'T510'.
          P_IT08CHECK = ''.
          PERFORM 100.
          STOP.
        WHEN 'T710'.
          P_IT08CHECK = ''.
          PERFORM 110.
          STOP.
        WHEN 'IT08'.
          P_IT08CHECK = 'X'.
        WHEN 'T510U'.
          P_IT08CHECK = ''.
          PERFORM 130.
          STOP.
      ENDCASE.
    
    GET PERNR. 
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 24, 2005 at 10:08 PM

    Some clarification on the meaning of GET might help you out in the future. It is a commonly misunderstood ABAP statement. GET looks like a verb, sort of like MOVE, but it is really the name of an SAP event, just like other events like AT SELECTION-SCREEN and START-OF-SELECTION.

    Whenever I teach new ABAPers about GET, I tell them to think of this as a noun rather than a verb. So instead of thinking GET, think of WHEN.

    So GET PERNR is really an event called WHEN PERNR and means that when the LDB has a PERNR row available, invoke the code you have attached to event GET PERNR. Trying to bury the statement GET PERNR inside other executable ABAP statements like IF and FORM is not supported because your code does not decide when to do this, it is decided by the LDB. In fact if you code the following:

    IF condition.
      GET PERNR.
    ENDIF.

    What the compiler sees is an event called GET PERNR. The start of an event, ends the previous event. If you never specified an event then the default event is START-OF-SELECTION.

    So the previous event is ended, but we have an IF without an ENDIF. If the compiler could get past that error, the next error would be an ENDIF without an IF.

    As an aside, if you have ever wondered where the ABAP events START-OF-SELECTION and END-OF-SELECTION got their names, START-OF-SELECTION represents the start of selection by the LDB before any data is returned to your program. Likewise, END-OF-SELECTION represents the fact that the LDB has finished returning data to your program.

    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.