Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass select options variable .... ?

Former Member
0 Kudos

Hi,

How to pass a select options variable to a perform statement? asl how to receive it in form .... endform subroutine?

thanks,

surya.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Just pass as TABLES parameter.



report zrich_0001 .

select-options: s_datum for sy-datum.

perform check_datum tables s_datum.


*&---------------------------------------------------------------------*
*&      Form  check_datum
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form check_datum tables r_datum.

if r_datum is initial.
  message i001(00) with 'Datum checked'.
endif.

endform.                    " check_datum

Regards,

Rich Heilman

4 REPLIES 4

Former Member
0 Kudos

Hi,

Check this example..

SELECT-OPTIONS SO_MATNR FOR MARA-MATNR.

PERFORM FORM1 USING SO_MATNR[].

FORM FORM1 USING LT_MATNR LIKE SO_MATNR[].

ENDFORM..

Thanks,

Naren

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Just pass as TABLES parameter.



report zrich_0001 .

select-options: s_datum for sy-datum.

perform check_datum tables s_datum.


*&---------------------------------------------------------------------*
*&      Form  check_datum
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form check_datum tables r_datum.

if r_datum is initial.
  message i001(00) with 'Datum checked'.
endif.

endform.                    " check_datum

Regards,

Rich Heilman

former_member181962
Active Contributor
0 Kudos

tables: mara.

select-options: s_matnr for mara-matnr.

perform test tables s_matnr.

&----


*& Form test

&----


  • text

----


  • -->P_S_MATNR text

----


FORM test TABLES P_S_MATNR structure s_matnr.

ENDFORM. " test

Regards,

ravi

Former Member
0 Kudos

FORM form_name USING LT_MATNR TYPE RANGES.

ENDFORM.

Try the above one as RANGES is same as SELECT-OPTIONS.

Regards,

Ravi

Note : Please mark all the helpful answers