2007 Dec 26 5:32 AM
hi all
i have a select statement
*SELECT * FROM BKPF*
INTO CORRESPONDING FIELDS OF TABLE it_bkpf1*
WHERE bukrs = p_bukrs AND gjahr = p_gjahr.*
In the above statement i have bukrs and gjahr which is selected from the parameters statement as mentione below.
PARAMETERS : P_BUKRS TYPE BKPF-BUKRS OBLIGATORY. "Company Code
PARAMETERS : P_GJAHR TYPE BKPF-GJAHR OBLIGATORY. "Fiscal Year
Now i need to create a SELECT statement which along with the bukrs and gjhar also filters the BELNR field.The problem is the belnr field is SELECT-OPTIONS statement and it has two values low and high.
SELECT-OPTIONS : s_belnr FOR bkpf-belnr. "Document number.
Please help and tell me how to use the select statement along with the belnr field.
Vijay
2007 Dec 26 5:36 AM
PARAMETERS : P_BUKRS TYPE BKPF-BUKRS OBLIGATORY. "Company Code
PARAMETERS : P_GJAHR TYPE BKPF-GJAHR OBLIGATORY. "Fiscal Year
SELECT-OPTIONS : s_belnr FOR bkpf-belnr. "Document number.
SELECT * FROM BKPF
INTO CORRESPONDING FIELDS OF TABLE it_bkpf1
WHERE belnr in s_belnr and
bukrs = p_bukrs
AND gjahr = p_gjahr.
- Selva
2007 Dec 26 5:45 AM
Hi
i got it but the real problem is when am giving entries it is giving me all the unncessary data.But if am saving the input as a variant its coming exactly right.Please help
Vijay
2007 Dec 26 6:06 AM
Put a validation for BUKRS field.
and also include all the primary key fields in the SELECT statements(Already u've given).
if possible paste ur selection screen code and the first SELECT statements.
- S
2007 Dec 26 5:51 AM