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

need help to choose the right type of program ??

Hi,

I am trying to enhance the screen FB12. User must be able to enter a range of values for a few fields like Company code, document number, posting date etc.

So I am trying to write a custom program say ZFB12 and want these fields to be displayed for user selection. After the user select the values, correspondence should be generated just like FB12 functionality.

It so happened that I copied the program responsible for FB12 and tried to add Selection screen fields like

SELECT-OPTIONS: so_cc FOR BKPF-BURKS,

so_doctype FOR BKPF-BLART,

so-entrydate FOR BKPF-CPUDT,

so_postingdate FOR BKPF-budat,

so_docnum FOR BKPF-BELNR,

so_fiscalyear FOR BKPF-GJAHR.

START-OF-SELECTION.

But I am getting a syntax error, which says

"SELECT-OPTIONS is only allowed between BEGIN/END OF SCREEN for programs with type other than 1"

What does it mean and what am I supposed to do ??

thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Nov 28, 2005 at 06:04 PM

    Did you copy SAPMF05M? If so, this is a module pool program, and in my system I don't think you really need. It calls a function module....

    
      SET PARAMETER ID 'BUK' FIELD RF022-BUKRS.
      CALL FUNCTION 'CORRESPONDENCE_SELECTION'
           EXPORTING  I_COMPANY = RF022-BUKRS
           EXCEPTIONS OTHERS    = 1.
    
    

    Or are you coping this function module above?

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 06:05 PM

    Select Options or Parameters will work only for the report type of programs. I think you might have selected include type of program. So, select Report type in the attributes in SE38.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      this error occur when you are trying to use a select-option or parameter in a program that is not a report.

      Try it,

      Step 1 -> Declare in your TOP.

      • Tela

      selection-screen begin of screen 9000 as subscreen.

      selection-screen begin of block bl1.

      parameters p_kunnr type kna1-kunnr.

      select-options so_kunnr for kna1-kunnr.

      selection-screen end of block bl1.

      selection-screen end os screen 9000.

      Step 2 -> On the screen, create a sub-screen.

      Step 3 -> include the called for your su-screen in your poo, where:

      v_dynpro = 9000 and

      v_repid = program name

      call subscreen "subscreen" INCLUDING v_repid v_dynpro.

      step 4 -> in PAI include. It's calling the selection-screen event,

      call subscreen "subscreen".

      Alexandre Nogueira

      Alexandre Nogueira

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

    Hi, Please check whether the copied program is a module pool program, in which case you may have to change it to executable 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.