2008 Apr 23 12:58 PM
Hello,
I have a select options parameter in my report and then I have a function module that have to select into a database table using this SO.
How can I pass the SO to the FM?
The code must be something like that:
REPORT ZXXXX.
SELECT-OPTIONS: so_werks FOR marc-werks.
CALL FUNCTION 'ZFUNCTION'
------------------------------------------------------------------------------------------
FUNCTION ZFUNCTION
SELECT matnr FROM marc INTO TABLE it
WHERE werks IN so_werks
The select options must be a TABLES parameter? I have to create a structure type for that SO?
2008 Apr 23 1:02 PM
hi marshal,
1. In the FM (in se37), there should be one TABLES parameter
of type structure WERKS_RANG.
2. This WERKS_RANG has four fields, exactly similar to an internal table of select option.
So pass the select option as it is, using the tables parameter.
regards,
amit m.
hi marshal,
1. In the FM (in se37), there should be one TABLES parameter
of type structure WERKS_RANG.
2. This WERKS_RANG has four fields, exactly similar to an internal table of select option.
So pass the select option as it is, using the tables parameter.
regards,
amit m.
2008 Apr 23 1:00 PM
Hi Marshal,
You can pass by using Tables.
Pass the selection-option internal tables as a type of structure RSPARAMS .
Regards,
Sunil
2008 Apr 23 1:02 PM
hi marshal,
1. In the FM (in se37), there should be one TABLES parameter
of type structure WERKS_RANG.
2. This WERKS_RANG has four fields, exactly similar to an internal table of select option.
So pass the select option as it is, using the tables parameter.
regards,
amit m.
2008 Apr 23 1:04 PM
2008 Apr 23 1:05 PM
Hi,
In FM interface you can use
structure EFG_RANGES ( In Tables Parameter ) . This structure is same as select options.
Or in Importing parameters use EFG_TAB_RANGES . This is an internal table type .
In both ways you can pass your select option to FM diretcly.
Check the following link as well
https://forums.sdn.sap.com/click.jspa?searchID=11071891&messageID=4908310
Regards,
Raj.
2008 Apr 23 1:06 PM
Hi,
Its not possible to do that, since select-option is having lots of functionality, eg : single single reanges, select ranges,exclude ranges etc....
So better to use select query in program and pass the values to function module by using tables.
REWARD IF USEFUL
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |