Skip to Content
author's profile photo
Former Member

REPORTS

TABLES :KNA1,VBAK,MARA,SSCRFIELDS.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS:CUSTOMER RADIOBUTTON GROUP RG1,

SALES RADIOBUTTON GROUP RG1,

MATERIALS RADIOBUTTON GROUP RG1.

SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN FUNCTXT-01 = 'REPORT'.

SELECTION-SCREEN FUNCTXT-02 = 'EXIT'.

AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOM='FC01'

SSCRFIELDS-UCOM = 'ONLI'

ELSEIF SSCRFIELDS-UCOMM = 'FC02'

LEAVE.

ENDIF.

START-OF-SELECTION.

IF CUSTOMER = 'X'

SELECT * FROM KNA1.

WRITE:/KNA1-KUNNR,KNA1-LAND1,KNA1-NAME1

ENDSELECT.

ELSE

IF SALES = 'X'

SELECT * FROM VBAK.

WRITE :/VBAK-VBELN,VBAK-ERDAT,VBAK-NETWR.

ENDSELECT.

ELSE

SELECT * FROM MARA.

WRITE :/MARA-MATNR,MARA-MEINS.

ENDSELECT.

IWOULD BE VERY HAPPY IF ANY BODY OF YOU CAN RECTIFY THE ERROR THE ERROR IS SELECTION SCREEN OBJECTS CAN ONLY BE USED BETWEEN SELECTION SCREEN BEGIN AND SELECTION SCREEN END

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Oct 04, 2005 at 07:06 AM

    Hi

    You didnt provide the logic for appln toolbar.

    TABLES :KNA1,VBAK,MARA,SSCRFIELDS.

    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

    PARAMETERS:CUSTOMER RADIOBUTTON GROUP RG1,

    SALES RADIOBUTTON GROUP RG1,

    MATERIALS RADIOBUTTON GROUP RG1.

    SELECTION-SCREEN END OF BLOCK B1.

    *----


    selection-screen function key1.

    selection-screen function key2.

    Initialization.

    SELECTION-SCREEN FUNCTION-01 = 'REPORT'.

    SELECTION-SCREEN FUNCTION-02 = 'EXIT'.

    *----


    AT SELECTION-SCREEN.

    IF SSCRFIELDS-UCOM='FC01'

    SSCRFIELDS-UCOM = 'ONLI'

    ELSEIF SSCRFIELDS-UCOMM = 'FC02'

    LEAVE.

    ENDIF.

    START-OF-SELECTION.

    IF CUSTOMER = 'X'

    SELECT * FROM KNA1.

    WRITE:/KNA1-KUNNR,KNA1-LAND1,KNA1-NAME1

    ENDSELECT.

    ELSE

    IF SALES = 'X'

    SELECT * FROM VBAK.

    WRITE :/VBAK-VBELN,VBAK-ERDAT,VBAK-NETWR.

    ENDSELECT.

    ELSE

    SELECT * FROM MARA.

    WRITE :/MARA-MATNR,MARA-MEINS.

    ENDSELECT.

    check with this code.I hope this helps

    regards

    chandu

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 04, 2005 at 07:34 AM

    Try this code this will work.

    U have to specify the key values between 1 to 5. No character fields are allowd.

    DO a F1 help on the SELECTION-SCREEN U can get samples.

    TABLES :kna1,vbak,mara,sscrfields.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:customer RADIOBUTTON GROUP rg1,
    sales RADIOBUTTON GROUP rg1,
    matnr RADIOBUTTON GROUP rg1.
    SELECTION-SCREEN END OF BLOCK b1.
    <b>SELECTION-SCREEN FUNCTION KEY 1.
    SELECTION-SCREEN FUNCTION KEY 2.</b>
    
    AT SELECTION-SCREEN.
      IF sscrfields-ucomm = 'FC01'.
      sscrfields-ucomm = 'ONLI'.
      elseif sscrfields-ucomm = 'FC02'.
      leave.
      ENDIF.
    
    
    START-OF-SELECTION.
      IF customer = 'X'.
      SELECT * from kna1.
        WRITE:/ kna1-kunnr,kna1-land1,kna1-name1.
        endselect.
    
      elseif sales = 'X'.
      select * from vbak.
        WRITE :/ vbak-vbeln,vbak-erdat,vbak-netwr.
      ENDSELECT.
    else.
    select * from mara.
      WRITE :/ mara-matnr, mara-meins.
    ENDSELECT.
    
    ENDIF.
    

    Hope this helps.

    Kindly reward points and close the thread.

    Add comment
    10|10000 characters needed characters exceeded