cancel
Showing results for 
Search instead for 
Did you mean: 

Passing select option parameter to a procedure

Former Member
0 Kudos

Hello, i need to know pass a select option parameter to a procedure. I tried the following

For eg if i have a select option called so_belnr & i call the procedure using the following

PERFORM VALIDATE_DOCUMENT TABLES SO_BELNR USING GJAHR BUKRS , i still cannot use the

select option paramter in the called procedure.

Pls help.

Accepted Solutions (1)

Accepted Solutions (1)

kesavadas_thekkillath
Active Contributor
0 Kudos

TABLES:mkpf.
SELECT-OPTIONS:so_mblnr FOR mkpf-mblnr.

START-OF-SELECTION.

  PERFORM write TABLES so_mblnr .

FORM write TABLES p_mblnr LIKE so_mblnr[].

  LOOP AT p_mblnr.
    WRITE p_mblnr-low.
  ENDLOOP.
ENDFORM.           
Former Member
0 Kudos

Thankyou

Answers (4)

Answers (4)

robert_altenstraer
Active Participant
0 Kudos

Hi,

in topinclude...

data: lr_belnr type RNG_BELNR.

at start-of-sel.....

  • move so to range..

refresh: lr_belnr.

lr_belnr[] = so_belnr[].

PERFORM VALIDATE_DOCUMENT TABLES lr_belnr USING GJAHR BUKRS .

in form:

... tables lr_belnr like structure of RNG_BELNR.

reason(my definietion): perfom doesn´t know if the select-options is availible.....

bestreg

Robert

Former Member
0 Kudos

Upto my knowledge if you are using select-otions this will be visible everywhere so instead of passing as aparameter you can access this object directly in routine.

Or what Mr. Keshav said might work

OR declare a TYPES AND DATA STATEMENT WITH object type range of XXXX

OR do Dynamic program like pass the nam eof object and create object with that reference

OR THEREis structure for ranges please find out

vallamuthu_madheswaran2
Active Contributor
0 Kudos

Hi Try the following,

PERFORM VALIDATE_DOCUMENT USING so_belnr-low so_belnr-high GJAHR BUKRS .

Thanks & Regards,

Vallamuthu.M

rainer_hbenthal
Active Contributor
0 Kudos

select options are range tables. try to specify the parameter with using/changing and use type RANGES