on 01-11-2007 11:37 PM
Hi all
I am working on smart form for the first time?
I have copied the existing standard smart form in sap and working on it?
How can i change the values infact the fields in a smartform. How should i fetch the information from the database tables as i see only structures in smartform?
Anyhelp is highly appreciated.
Thanks in Advance
Sonali
Hi,
Try to develope a SMARTFORM with Following steps.
1. GO TO Global Definitions and define
IT_MARA LIKE TABLE OF MARA
WA_MARA LIKE MARA.
GO to Main window. RIght click and Inster PRogram line. Inside program lines write followin code
SELECT * FROM MARA INTO TABLE IT_MARA UP TO 10 ROWS.
Note: make sure to write IT_MARA in the OUTPUT PARAMETERS. of General Attributes of Program Lines.
2. Go to Main window and instert Table there. In table create 2 columns. Then go to Main Area in table ---> Righ click and insert line --> select line type as line1.
3. In cell one --> Right click and instert a text...
4. Clieck the button next to Form Painter in Top of the menubar.
5. You will see a menu with field name in left down corner.
6. Select Global Data and then wa_mara from there. Click and drag MATNR field in to the text1.
7. Similarly click and drag field to text2. in the table.
Now you can test this smart form by running directly from the SMARTFORM TCODE. No need to write any program for this.
Award Points If you feel this helpful.
Darshan Patel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
U can write u'r programming logic in the smartform. define u'r structures in the types tab in the global definitions node and then use it in the global data. Try it .
Regards,
Aravind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
If you want to change the values in the Structures you have... you can write the code in General attributes-->initialization..(here you can modify the value of your variables and you can write the swelect statement) same as in SE38 editor..
Note:!! when ever you want to modfy the data in structures or internal tables.. in the initiallization don't forget to enter those nvariable names in ht INPUTPARAMETERS AND OUTPARAMENTERS in the Initialization tab.
Please Close this thread.. when u r problem ise solved
Reward if Helpful
Regards
Naresh Reddy K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Print program should exist for each smartform to trigger it.From there,mostly the values should be passed.You should write a print program for your smartform and pass the necessary values (mentioned in form interface) from print program.
For finding the print program of a smartform,TNAPR is the table name.
Ex:
PGNAM:SAPFM06P
SFORM:LB_BIL_INVOICE
TNAPR table Processing programs for output
Useful for output types.
You will get SD and MM related forms in TNAPR table FI related forms will be there in T001F table
TTFXP -Selection list of print programs will also be used for finding print program
Check this link.It will help you to learn about smartform.I am explaining about Table,Template,Loop in smartform here.
Kindly reward points by clicking the star on the left of reply,if it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Smartforms has Code Lines in it. You can add the code/program lines anywhere and write your own ABAP stmts in it.
But remember, it requires some input parameters and output parameters. You can pass the values throu' the input parameters and store the result in output parameters to use in rest of the Form.
You have to declare all the internal table types or work areas in the general definition part of the form to be reused in the form.
Search for some more info on the net or go through some standard SAP smatforms for initial start.
Regards
Subramanian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sonali,
here is a link which will teach you step by step creation of smartform
and also check these links.
How to use table,template,loop and command in smartform
How to use sub-routine in smartforms
Table,Template,Loop and command https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...
Regards,
Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.