‎2007 May 13 11:46 PM
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
‎2007 May 13 11:55 PM
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
‎2007 May 14 12:07 AM
Can you please send me some sample code if you ahve one
Thanks in advance
‎2007 May 14 12:24 AM
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
‎2007 May 16 4:37 PM
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
‎2007 May 16 4:49 PM
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.
‎2007 May 16 4:41 PM
Hi,
Try this..
perform xxx in (program) TABLES itab
And in form
form xxx TABLES itab
Endform.
Thanks,
Naren