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 pool program for field validations

Former Member
0 Likes
855

I have to create programs to upload data frome excel sheets to ztables.

Here for every zprogram, i have to perform some validations on fields of itab (uploaded from excel sheet).

For ztab1 i have validations A,B

For ztab2 i have validations C,D

For ztab3 i have validations A

Here i plan to write all the validations in sub-routine pool program.

How do i call the particular validation from the main program

Any help regarding this would be appreciated

6 REPLIES 6
Read only

Former Member
0 Likes
740

Hi,

You can create a Subroutine pool program and in your main program check which table updates has to be performed. Based on this, call the subroutine from the subroutine pool program dynamically in your main program.

PERFOM VALIDATE_ZTAB1 in PROGRAM ( ZSUBPOOL ) IF EXISTS.

Cheers

VJ

Read only

0 Likes
740

Can you please send me some sample code if you ahve one

Thanks in advance

Read only

0 Likes
740

Hi,

You can check the SAP sample programs given in help.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm

The syntax is pretty simple.

Cheers

VJ

Read only

0 Likes
740

Can any one please help me.

I am getting error

I have written perform xxx in (program) using itab

and in form

form using itab

but it says internal table not defined or tables have to be defined.

routine name not specified

Read only

0 Likes
740

Hi,

Though, we pass parameters to the subroutine, they will not have any values.

You make use of memory id statements <b>Export </b>internal table from first program and

<b>Import </b> internal table in subroutine pool.

Regards

Sailaja.

Read only

Former Member
0 Likes
740

Hi,

Try this..

perform xxx in (program) TABLES itab

And in form

form xxx TABLES itab

Endform.

Thanks,

Naren