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

subroutine

Former Member
0 Likes
727

Hello all,

Can u tell me how to pass multiple internal table to subroutine.

I want to pass one by one itab to subroutine . subroutine will process 1 itab will store result into result table , then process next itab..... etc...........

can u help me?

Thanks a lot.

regards.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
701

hi check this..

FORM fill_table USING wa TYPE any

CHANGING ptab TYPE INDEX TABLE.

APPEND wa TO ptab.

ENDFORM.

regards,

venkat

5 REPLIES 5
Read only

Former Member
0 Likes
701

Check the sample demo program:

demo_mod_tech_example_5

Regards,

Ravi

Read only

Former Member
0 Likes
701

Hye rani,

Declare the internal tables globally in your report. Then use just form and perform.

EG.

Report ZRANI.

DATA: itab type standard table of ZData,

itab1 type standard table of ZBase.

PERFORM rani.

-


FORM rani.

Here u can do any manupulations on itab and itab1. The changes are seen globally..

ENDFORM.

Reward if helpful.

Thanks,

Imran.

Read only

Former Member
0 Likes
702

hi check this..

FORM fill_table USING wa TYPE any

CHANGING ptab TYPE INDEX TABLE.

APPEND wa TO ptab.

ENDFORM.

regards,

venkat

Read only

0 Likes
701

wrote this

perform process CHANGING itab.

form CHANGING f_tab like itab.

loop at f_tab.

endloop.

endform.

but it is giving error that f_tab is not table.

can u tell me why?

thanks for reply.

Read only

0 Likes
701

write as :

perform process tables itab.

.

.

.

form process tables p_itab structure itab.

loop at p_itab.

endloop.

endform. " process