on 01-23-2008 5:36 PM
hi all,
i m new to ABAP learning SF.
can anybody tell me step by step procedure to design a table in smartfom builder using table painter.
my version is 4.6c.
plz it's urgent?
also how to create the main area in a table?
i got header and footer but i didn't get main area??
Nani,
Here is a demo example to display Table in Smartform
Just follow this exercise. You will be fine.
Display a contents of a table on SmartForm with LOOP
There's a DDIC Table called "Ugyfel" containing 5 rows. I'd like simply to display all the rows on a SF's Main window.
Please follow this process to display the value from your table "Ugyfel"
1. Go with a transaction code : smartforms
2. Enter the form name like : ysmart_forms1
3. Create
4. Enter the Description for the form
5. From the left side window there will be a form interface to provide table .....
6. Go for tables option
7. ugyfel like ugyfel(ref.type)
8. Pages and window-> page1-> main window
9. Go to the form painter adjust the main window.
10. Select main window and right click --> go for create loop
11. Name: loop1, desc: display loop.
12. Internal table ktab into ktab.
13. select loop right click -> create a text
14. name : text1, desc: display text.
15. Go to change editor.
16. Write the mater what ever you want and if you want to display data from the table write the table fields as follows:
&ktab-<field1>& &ktab-<field2>&
save & activate then execute ,, scripts will generate a function module like : '/ibcdw/sf0000031' copy this function module and call in executable program...
For that
1. go with abap editor se38.
2. table: ugyfel.
3. parameters: test like ugyfel-<field1>.
4. data itab like ugyfel occurs 0 with header line.
5. select * from ugyfel into table itab where field1 = test1.
6. call function '/ibcdw/sf0000031'
7. tables
ktab = itab.
Save and activate the program ( ^f 3).
Now run the program ( f 😎
Hope this helps
Vinodh Balakrishnan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nani,
Here is a sample program in which used two internal tables:
REPORT YPRINTPRG_SMARTFORM1 .
DATA : ITKNA1 LIKE KNA1,
ITVBAK LIKE VBAK OCCURS 0 WITH HEADER LINE.
PARAMETERS : PKUNNR LIKE KNA1-KUNNR.
SELECT * FROM KNA1 INTO ITKNA1
WHERE KUNNR = PKUNNR.
ENDSELECT.
SELECT * FROM VBAK
INTO TABLE ITVBAK
WHERE KUNNR = PKUNNR.
CALL FUNCTION '/1BCDWB/SF00000011' THIS FUNCTION MODULE CALLS THE
SMART FORM WE WILL GET THIS AT MENU ENVIRONEMENT
EXPORTING
ITKNA1 = ITKNA1
TABLES
ITVBAK = ITVBAK.
IN SMART FORM
FORM INERFACE----
IMPORT (TAB)
Parameter name Type assignment Reference type Default value
ITKNA1 LIKE KNA1
FORM INERFACE----
TABLES (TAB)
ITVBAK LIKE VBAK
PAGES & WINDOWS--- MAIN WINDOW-LOOP 1--DATA(TAB)
ITVBAK INTO ITVBAK
PAGES & WINDOWS-----MAIN WINDOW--LOOP 1---TEXT 3(EDITOR)
&ITVBAK-VBELN& &ITVBAK-ERDAT& &ITVBAK-ERNAM& &ITVBAK-NETWR&
PAGES & WINDOWS-----HEADER WINDOW---TEXT 2(EDITOR)
Customer No. &itkna1-kunnr& CustomerName :&itkna1-name1&
Hope this helps
Vinodh Balakrishnan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
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.