on 2007 Jul 11 2:17 PM
can i use select-options and parameter in same select statement.
ex:-
PARAMETERS : S_BUKRS LIKE AUFK-BUKRS,
S_GSBER LIKE AUFK-GSBER.
SELECT-OPTIONS : S_AUFNR FOR AUFK-AUFNR.
SELECT AUFNR BUKRS GSBER KTEXT USER4
FROM AUFK INTO TABLE IT_AUFK
WHERE AUFNR IN S_AUFNR
AND BUKRS = S_BUKRS
AND GSBER = S_GSBER.
YES THERE IS NO PROBLEM WITH THAT ,
JUST YOUR DEFINING THAT FEILDS AS DIFFERENT OPTIONS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes you can....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also
SELECT ...
FROM
WHERE ... <b>IN</b> Select-options
.... <b>=</b> Parameter
This is because a parameter is a single value, select-options are a range of values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
tables aufk.
PARAMETERS : S_BUKRS LIKE AUFK-BUKRS,
S_GSBER LIKE AUFK-GSBER.
SELECT-OPTIONS : S_AUFNR FOR AUFK-AUFNR.
data : it_aufk type table of aufk ."occurs 0 with header line.
SELECT AUFNR BUKRS GSBER KTEXT USER4
FROM AUFK INTO TABLE IT_AUFK
WHERE AUFNR IN S_AUFNR
AND BUKRS = S_BUKRS
AND GSBER = S_GSBER.
it will work..
reward if useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Yes, you have to give the parameter name in that particular field where class(=) and same as select options (but use IN).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Pratik,
You can definitely use both in the same select statement.
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We can write , but it is advisable to change the naming convention to P_... for parameters to be clear
PARAMETERS : P_BUKRS LIKE AUFK-BUKRS,
P_GSBER LIKE AUFK-GSBER.
SELECT-OPTIONS : S_AUFNR FOR AUFK-AUFNR.
SELECT AUFNR BUKRS GSBER KTEXT USER4
FROM AUFK INTO TABLE IT_AUFK
WHERE AUFNR IN S_AUFNR
AND BUKRS = P_BUKRS
AND GSBER = P_GSBER.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Yes, U can use as u Wrote.
Regards,
Deepu.K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes.......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sorry for earlier>>
U will have to use(written in bold):
PARAMETERS : P_BUKRS LIKE AUFK-BUKRS,
P_GSBER LIKE AUFK-GSBER.
SELECT-OPTIONS : S_AUFNR FOR AUFK-AUFNR.
SELECT AUFNR BUKRS GSBER KTEXT USER4
FROM AUFK INTO TABLE IT_AUFK
WHERE AUFNR IN S_AUFNR<b>-low</b>
AND BUKRS = P_BUKRS
AND GSBER = P_GSBER.
Regards,
Shashank.
User | Count |
---|---|
106 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.