Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reg Using , Changing and Tables

Former Member
0 Likes
646

hi all,

I am using select-options for matnr.

i am using an internal table with matnr, mbrsh , mtart fields .

i want to use subroutine with using matnr and changing it_mara.

So in the FORM and ENDFORM block how to declare the variables in the FORM stmt.

If i use LIKE its working. but i want to use TYPE stmt. Please help in solving the problem. If possible please provide any small example

Sample code is as follows:

perform get_data using s_matnr

changing it_mara.

FORM get_data USING P_S_MATNR type XXXXXXXXX

CHANGING P_IT_MARA type XXXXXXXX

select .....from mara into p_it_mara where matnr in p_s_matnr.

ENDFORM.

<REMOVED BY MODERATOR>

Thanks in advance.

Thanks and Regards.

Edited by: Alvaro Tejada Galindo on Apr 21, 2008 3:06 PM

hi all,

I am using select-options for matnr.

i am using an internal table with matnr, mbrsh , mtart fields .

i want to use subroutine with using matnr and changing it_mara.

So in the FORM and ENDFORM block how to declare the variables in the FORM stmt.

If i use LIKE its working. but i want to use TYPE stmt. Please help in solving the problem. If possible please provide any small example

Sample code is as follows:

perform get_data using s_matnr

changing it_mara.

FORM get_data USING P_S_MATNR type XXXXXXXXX

CHANGING P_IT_MARA type XXXXXXXX

select .....from mara into p_it_mara where matnr in p_s_matnr.

ENDFORM.

<REMOVED BY MODERATOR>

Thanks in advance.

Thanks and Regards.

Edited by: Alvaro Tejada Galindo on Apr 21, 2008 3:06 PM

4 REPLIES 4
Read only

Former Member
0 Likes
619

NO need for using parameter in your case. as you are using select options simply use changing parameters alone.

perform get_data changing it_mara.

FORM get_data CHANGING P_IT_MARA type XXXXXXXX

select .....from mara into p_it_mara where matnr in s_matnr.

ENDFORM.

Read only

Former Member
0 Likes
619

Hi,

You need to use type ANY in that case.

FORM get_data CHANGING P_IT_MARA type <ANY>

ENDFORM.

Read only

Former Member
0 Likes
619

Hi friends,

Thanks for your answers.

I need to pass the select-options as parameter.

TYPE ANY and TYPE STANDARD TABLE are not to be used as per my requirement.

Please help in this regard.

Thanks and Regards.

Read only

0 Likes
619

Hi,

Whats that???

Can you explain wrt your code below

FORM get_data USING P_S_MATNR type XXXXXXXXX

CHANGING P_IT_MARA type XXXXXXXX

you mean you declared p_it_mara type s_option.

thanks

Dan