2012 Dec 19 5:55 AM
Hi Experts,
SELECT (s_column_syntax)
FROM (s_dbtab_syntax)
INTO TABLE T_FINAL1
WHERE (t_criteria).
In above statement i'm getting 450 records. but i'm passing those internal tables to as below
PERFORM pull_data IN PROGRAM (w_xprog)
TABLES S_COLUMN_SYNTAX S_DBTAB_SYNTAX T_CRITERIA.
APPEND 'FORM PULL_DATA TABLES COLUMN_SYNTAX DBTAB_SYNTAX CRITERIA.' TO int_src.
APPEND 'SELECT (COLUMN_SYNTAX)' TO INT_SRC.
APPEND 'FROM (DBTAB_SYNTAX)' TO INT_SRC.
APPEND 'INTO TABLE T_OUTREC' TO INT_SRC.
APPEND 'WHERE (CRITERIA).' TO INT_SRC.
APPEND 'ENDFORM.' TO int_src.
GENERATE SUBROUTINE POOL int_src
NAME w_xprog
MESSAGE w_msg
LINE w_len
In above we can't get data to T_OUTREC.
Getting runtime error as
A dynamically specified FROM clause has an unexpected format.
Regards,
BALAJI.
2012 Dec 19 6:04 AM
I believe s_column_syntax and s_dbtab_syntax are variables and not internal tables. So, you should not be using TABLES in your subroutine call. Instead use USING.
2012 Dec 19 6:04 AM
I believe s_column_syntax and s_dbtab_syntax are variables and not internal tables. So, you should not be using TABLES in your subroutine call. Instead use USING.
2012 Dec 19 6:14 AM
Kumar,
s_column_syntax and s_dbtab_syntax and t_criteria all are same data types(abapsource).
those are tables only. Working t_criteria fine but not s_column_syntax and s_dbtab_syntax.
thanks,
BALAJI.
2012 Dec 19 6:32 AM
Kumar,
great job.
I used using instead tables, now it's working fine.
Thank you Kumar.
Regards,
BALAJI.
2012 Dec 19 7:11 AM
2012 Dec 19 6:43 AM
Hi balaji,
In the PERFORM You have tables parameters as
TABLES S_COLUMN_SYNTAX
S_DBTAB_SYNTAX
T_CRITERIA.
Now the below mentione parameters of different type what you have passed in the select statement.
I would suggest you a standard program for the same operation please have and look and do the same how they are done.
Check the below links which esxplains your problem
http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/db999535c111d1829f0000e829fbfe/content.htm
http://scn.sap.com/message/610351
http://www.sapabapcodes.com/2011/12/demo-report-on-generate-subroutine-pool.html
Hope this helps.