Application Development 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: 

smart forms for standard tables

Former Member
0 Kudos

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

6 REPLIES 6

amit_khare
Active Contributor
0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

hi swathi,

In general

type -- refer to data type (may be user defined using types)

like -- refer to database fields.

refer the below links also

Regards,

Naveen