08-08-2006 2:38 PM
Hi all,
can any tell me the difference in declarations betwwen type and like while declaring in smartforms.
I have an idea but i am little confused and do i need to declare the standard tables because i have my data retrieval in smart form it self.
like if i am retrieving data into internal table from mara,do i need to declare mara because its giving me an error if i don't declare. when i declared mara like mara in global definitions .it worked fine for me.
Thanks in advance
08-08-2006 2:44 PM
Hi,
You dont have to declare mara anywhere to use it in smartform.
you can declare like this in Global Data tab of Global Declarations.
WA_TAB_MAST TYPE MAST
Regrads,
Amit
08-08-2006 2:46 PM
I think that your problem may be that you put Mara in the input parameters of the program lines node. You don't need to do this. I'm guessing at your problem, so if I'm mistaken please disregard.
Or in your program lines, depending on how you right your select, you may need a statement like the following, at the top of your code:
Tables: Mara.
08-08-2006 3:00 PM
Hi Matt,
YEP YOU ARE RIGHT.i USED AS MARA AS INPUT IN ONE OF MY PROGRAM LINES,BECAUSE I AM WRITING A SELECT STATEMENT TO RETRIEVE DATA FROM MARA.
i gave like
input mara
output itab
select * from mara into table itab up to 30 rows.
Is some other way to do this.
As you mentioned , do i need to declare tables mara above the select statement and in that case do i need to still mention mara as input parameters only and i need not declare it in global declarations or what?
Pls let me know
08-08-2006 3:02 PM
You don't need to declare Mara as input or in global definitions, but you may have to declare it in a Tables command in the program lines node.
08-08-2006 3:12 PM
Hi,
It is not necessary to write SAP standard tables( like MARA) in the INPUT/OUTPUT PARAMETES of the program lines. We can only use the structures/variables/internal tables that are declared in the GLOBAL DATA node or those are coming from FORM INTERFACE. We mention the structures/variables/internal tables in this INPUT/OUTPUT parameters to make thse parametes VISIBLE to the newly created PROGRAM LINES node. And it is not necessary to mention standard SAP table either in this parameters or by using TABLES statement.
SAP Help Link: for further details...
http://help.sap.com/saphelp_nw2004s/helpdata/en/a3/80bae8dfd911d3b576006094192fe3/frameset.htm
Thanks and Regards,
Bharat Kumar Reddy.V
08-08-2006 3:17 PM