2015 Jan 30 7:25 AM
Hi,
I want to pass select options and internal table to a procedure at the same time. How can we do that?
I know we can pass select options to Calculation View but in that case also AFAIK we cannot pass internal tables to the Calc View.
Here is the code for example:
SELECT * INTO CORRESPONDING FIELDS OF TABLE pct_vbreveav
FROM vbreve
FOR ALL ENTRIES IN lvt_control
WHERE vbeln = lvt_control-vbeln AND
posnr = lvt_control-posnr AND
bdjpoper IN lvt_bdjpoper AND
vbeln_n IN s_vbeln_n.
I want to pass Select Option 'S_VBELN_N' and internal table 'LVT_CONTROL' at the same time.
Thanks,
Gaurav
Hi,
I want to pass select options and internal table to a procedure at the same time. How can we do that?
I know we can pass select options to Calculation View but in that case also AFAIK we cannot pass internal tables to the Calc View.
Here is the code for example:
SELECT * INTO CORRESPONDING FIELDS OF TABLE pct_vbreveav
FROM vbreve
FOR ALL ENTRIES IN lvt_control
WHERE vbeln = lvt_control-vbeln AND
posnr = lvt_control-posnr AND
bdjpoper IN lvt_bdjpoper AND
vbeln_n IN s_vbeln_n.
I want to pass Select Option 'S_VBELN_N' and internal table 'LVT_CONTROL' at the same time.
Thanks,
Gaurav
2015 Jan 30 7:35 AM
Hi Gaurav,
U could filter the internal table data based on select option & then perform for all entries.
Regards,
Dhananjay
2015 Jan 30 9:55 AM
That's fine but still i need to filter the data from standard table(the table on which i am finally putting the SELECT FROM) as well on the basis of select options.
Thanks,
Gaurav
2015 Feb 01 6:40 AM
want to pass select options and internal table to a procedure at the same time ==>
select option is a range variable. So, create a line type in the same format of range variable and use the same to create an internal table(corresponding to range). copy the select option to the internal table and the same you can use as importing parameter in AMDP(or procedure proxy). Same way, nothing is stopping you to pass internal table also. Follow the same way. You can not use range variable with IN clause in select statement(it is not open sql ). You have to try alternatives .
Sree
2015 Feb 02 7:32 AM
Hi Sreehari,
Thanks . I can create table types for Select Options but like you also said that i won' t be able to use them with my Select Query inside Procedure as we can't use IN there.
Could you please let me know if you have any alternatives.
Thanks,
Gaurav