How to create a table in smart form.
Hi Folks,
I need to create a table in smart form with the following fields:-
vbrp-arktx,vbrp-fkimg,komv-kbetr,komv-kwert.
Please let me know how to create a table and how to name the columns,size,and the select query for the same.
All answers will be duly rewarded.
K.Kiran.
Hi,
Following Links gives Details of Smartforms and how to create tables -
smartforms - very useful link
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
FAQ
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
Siddhi
Similar Messages
-
How to creat 2nd page in smart forms
hi
in smart forms iam facing problem i'e if i gave 10 material's it was comming fine if i give 30 materials it was going to 2nd page in that again from starting it was comming like Header delivery adress.
what i want is if materials increase than main window should increase size & rest of thing(footer )should comes in 2nd window
regards
A K reddyHi,
For the header details not to print on the second page:
-> Go to Conditions tab of the window in which u r printing Header delivery address and check the condition 'Only on first Page'
This will solve ur problem.
thanks,
Anon -
How to create custom structure in smart forms & use them in interface
hi experts....
can anyone tell me how to use custom structure in
form interface (parameters) without creating any structure
in the dictionary.Hi Shrama,
If you want to use the structure in interface. You have to create structure in dictionary.
if you create in form or in report ..they won't recongnize the local structures.
Thanks,
Sunil -
How to create internal table in Adobe form - SFP transaction?
How shd i create an internal table under Global data ???
Regards,
Gurmukh singhyou can create the inernal table using the table types.
assume you want to create the Inernal table of type SFLIGHT, then you can create in this way...under the global Defintions.
VARiABLE NAME Type Assignment Type name
IT_SFLIGHT TYPE SFLIGHT_TAB1
IT_VBAP TYPE VBAP_TT
you can populate these tables using the Initialization->Code Initialization.
for more details Check here..
https://www.sdn.sap.com/irj/sdn/adobe -
Create multiple tables in adobe form
hi,
Is there anyone can tell me how to create multiple tables in Adobe Form using SAP Netweaver Developer Studio. Are there any steps i can follow?Hi,
Define the tables in subforms and then wrap them into another subform and make it the subform as type flowed.
Regards,
Raju. -
How to add empty rows in table in smart form
how to add empty rows in table in smart form?
plz help me regarding this
send me ur queries to [email protected]You will need to add some extra rows to the internal table that your table is displaying. Use a program node to append additional rows with a key but no argument.
Alternaively a template may me more suitable for your requirement than a table.
Finally, please do not include you e-mail address in your question. Your question and the answers provided to it are for the benefit of everyone in the Community.
Regards,
Nick -
How to use loop inside table in smart form
Hi All
i have to use page break at the end of each pernr. i got table in smart form and print cells on event on sort begin. it is working ok . i have an other itab in as well .which i want to the same page with respect to the pernr no.
but the problem is as i loop the 2nd itab. it prints all the record what it has.
e.g i have two pernr 54 and 55.
the records of itab1 prints on page1 and page 2 properly. now i loop at itab2 it also have relevent records of above said pernrs. but i m unable to control those pernrs and loop print all the records on both pages.
if u get some thing out of it kindly help me
Regards
ammadhi,
Place the second loop ie. itab2 inside the first loop of itab1. And in the conditions tab of looping itab2 give the condition for checking the pernr.
try to implement this logic.
loop itab
at new pernr
new-page
endat.
loop at itab2 where pernr eq itab-pernr.
endloop.
endloop.
revert back for further queries.
regards
Rajitha. -
Dear,
I just want to pass dynamic internal table to smart form which i have created in print program.How it is possible and i am also using border for field in layout.
Anuj ModiHi Anuj Modi,
Smart forms are not really dynamic (except if you are talking about the number of lines), could you please explain what rendering you want to achieve exactly?
Sandra -
How to display TEXT vertically in SMART FORM
Hai,
I need to display the column name of a table vertically (readable from bottom to top) in smart form.
Could any one please tell me how to do this?
Thanks & Best Regards,
Maniyam Bhaskar.Hi,
Go through these threads for the discussions happened on similar issue... hope it helps you..
how to print text vertically in smart forms
vertical and horizontal printing in same page with smartforms or sapscript
Good luck
Narin -
How to create a table in SAPscript
Hello,
I am quite new at SAPscript, and cannot figure out how to create a table in my main window.
I have read this forum post : Script: tabs, boxes, tables but am having problems with the way to fill in tabs, so if someone could help me understand better I would be very grateful.
i need to create the following scenario:
|ITEM |MATERIAL |QTY |PRICE |CURRENCY | <-Headr
| xxxx |xxxxx |xxxx |xxxx |xxxx | <-Item
| xxxx |xxxxx |xxxx |xxxx |xxxx | .
| xxxx |xxxxx |xxxx |xxxx |xxxx | .
| xxxx |xxxxx |xxxx |xxxx |xxxx | .
| xxxx |xxxxx |xxxx |xxxx |xxxx | <-Item
Total Amount xxxx
I have created a paragraph format PF with all the necessary tabs.
1) How do I create the table and the dividing lines ?
In the line editor I typed
<b>/E</b> TABLE
<b>PF</b> Item,,Material,,Quantity,,Price,,Currency
(will these be translated when I translate the form with the SE63 transaction? Or should I put the technical name for them, for example: &BKPF-BELNR&,,&BKPF-UZEGF&,,etc ?)
what is the use of the <b>/E</b> TABLE ? All it does is print "/E TABLE" in my print preview... is this normal or did I forget to do something ?
2) now in the Items, how do I input the different elements ?
If I just type
<b>PF</b> &BSEG-BSHL&,,&BSEG-BSGY&,,etc will I get as many lines as I have items ?
I read on a forum that I need to type itab, but how do I syntax it so that it works with the technical info of a field?
&itab-BSEG-BSHL& doesn't work, I get an error message saying "unknow symbol itab-BSEG-BSHL"
Thank you in advanceHi Micol,
Create a window for the below ( Header window )
|ITEM |MATERIAL |QTY |PRICE |CURRENCY | <-Headr
<b>In text elements of this window write this
PH ,,ITEM,,MATERIAL,,QTY,,PRICE,,CURRENCY
Here PH is a paragraph format give appropriate tabs.</b>
| xxxx |xxxxx |xxxx |xxxx |xxxx | <-Item
| xxxx |xxxxx |xxxx |xxxx |xxxx | .
| xxxx |xxxxx |xxxx |xxxx |xxxx | .
| xxxx |xxxxx |xxxx |xxxx |xxxx | .
| xxxx |xxxxx |xxxx |xxxx |xxxx | <-Item
Assume the fields are
Item - itab-item
material - itab-material
quantity - itab-qty
price - itab-price
currency - itab-currency
<b>In text elements of main window write
/E TABLE
PI ,,&ITAB-ITEM&,,&ITAB-MATNR&,,&ITAB-QTY&
,,&ITAB-PRICE&,,&ITAB-CURRENCY&
</b>
In u r driver program
loop at itab
Call function 'WRITE_FORM'.
under element take 'TABLE'
window 'MAIN'
endloop -
How to create a table in the file using java code.?
HI,
I should export the data from the view objects to a word document. I have done that but I should
display the data in the form of a table.
Kindly come up with the necessary information on how to create a table in the file using java.
Thanks,
PhaniHi, Thank you for responding to my query.
The below are the details of my code.
DCBindingContainer dcBindings =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding StudentDetailsContent =
(DCIteratorBinding)dcBindings.get("StudentView1Iterator");
OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
Row currentRow =
StudentDetailsContent.getRowSetIterator().first();
Object a[]= currentRow.getAttributeValues();
int i;
for(i=0 ;i<=a.length;i++){
w.write(a.toString());
w.write(" ");
w.flush();
I am usning this coding to achieve the task of exporting data to file.
I need to display this information in the table that is where I need help from you people.
Thanks, -
How to create hashed table in runtime
hi experts
how to create hashed table in runtime, please give me the coading style.
please help me.
regards
subhasisHi,
Have alook at the code, and pls reward points.
Use Hashed Tables to Improve Performance :
report zuseofhashedtables.
Program: ZUseOfHashedTables **
Author: XXXXXXXXXXXXXXXXXX **
Versions: 4.6b - 4.6c **
Notes: **
this program shows how we can use hashed tables to improve **
the responce time. **
It shows, **
1. how to declare hashed tables **
2. a cache-like technique to improve access to master data **
3. how to collect data using hashed tables **
4. how to avoid deletions of unwanted data **
Results: the test we run read about 31000 rows from mkpf, 150000 **
rows from mseg, 500 rows from makt and 400 from lfa1. **
it filled ht_lst with 24500 rows and displayed them in **
alv grid format. **
It needed about 65 seconds to perform this task (with **
all the db buffers empty) **
The same program with standard tables needed 140 seconds **
to run with the same recordset and with buffers filled in **
Objetive: show a list that consists of all the material movements **
'101' - '901' for a certain range of dates in mkpf-budat. **
the columns to be displayed are: **
mkpf-budat, **
mkpf-mblnr, **
mseg-lifnr, **
lfa1-name1, **
mkpf-xblnr, **
mseg-zeile **
mseg-charg, **
mseg-matnr, **
makt-maktx, **
mseg-erfmg, **
mseg-erfme. **
or show a sumary list by matnr - menge **
You'll have to create a pf-status called vista - **
See form set_pf_status for details **
tables used -
tables: mkpf,
mseg,
lfa1,
makt.
global hashed tables used
data: begin of wa_mkpf, "header
mblnr like mkpf-mblnr,
mjahr like mkpf-mjahr,
budat like mkpf-budat,
xblnr like mkpf-xblnr,
end of wa_mkpf.
data: ht_mkpf like hashed table of wa_mkpf
with unique key mblnr mjahr
with header line.
data: begin of wa_mseg, " line items
mblnr like mseg-mblnr,
mjahr like mseg-mjahr,
zeile like mseg-zeile,
bwart like mseg-bwart,
charg like mseg-charg,
matnr like mseg-matnr,
lifnr like mseg-lifnr,
erfmg like mseg-erfmg,
erfme like mseg-erfme,
end of wa_mseg.
data ht_mseg like hashed table of wa_mseg
with unique key mblnr mjahr zeile
with header line.
cache structure for lfa1 records
data: begin of wa_lfa1,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
end of wa_lfa1.
data ht_lfa1 like hashed table of wa_lfa1
with unique key lifnr
with header line.
cache structure for material related data
data: begin of wa_material,
matnr like makt-matnr,
maktx like makt-maktx,
end of wa_material.
data: ht_material like hashed table of wa_material
with unique key matnr
with header line.
result table
data: begin of wa_lst, "
budat like mkpf-budat,
mblnr like mseg-mblnr,
lifnr like mseg-lifnr,
name1 like lfa1-name1,
xblnr like mkpf-xblnr,
zeile like mseg-zeile,
charg like mseg-charg,
matnr like mseg-matnr,
maktx like makt-maktx,
erfmg like mseg-erfmg,
erfme like mseg-erfme,
mjahr like mseg-mjahr,
end of wa_lst.
data: ht_lst like hashed table of wa_lst
with unique key mblnr mjahr zeile
with header line.
data: begin of wa_lst1, " sumary by material
matnr like mseg-matnr,
maktx like makt-maktx,
erfmg like mseg-erfmg,
erfme like mseg-erfme,
end of wa_lst1.
data: ht_lst1 like hashed table of wa_lst1
with unique key matnr
with header line.
structures for alv grid display.
itabs
type-pools: slis.
data: it_lst like standard table of wa_lst with header line,
it_fieldcat_lst type slis_t_fieldcat_alv with header line,
it_sort_lst type slis_t_sortinfo_alv,
it_lst1 like standard table of wa_lst1 with header line,
it_fieldcat_lst1 type slis_t_fieldcat_alv with header line,
it_sort_lst1 type slis_t_sortinfo_alv.
structures
data: wa_sort type slis_sortinfo_alv,
ls_layout type slis_layout_alv.
global varialbes
data: g_lines type i.
data: g_repid like sy-repid,
ok_code like sy-ucomm.
selection-screen
"text: Dates:
select-options: so_budat for mkpf-budat default sy-datum.
"text: Material numbers.
select-options: so_matnr for mseg-matnr.
selection-screen uline.
selection-screen skip 1.
"Text: show summary by material.
parameters: gp_bymat as checkbox default ''.
start-of-selection.
perform get_data.
perform show_data.
end-of-selection.
FORM get_data *
form get_data.
select mblnr mjahr budat xblnr
into table ht_mkpf
from mkpf
where budat in so_budat. " make use of std index.
have we retrieved data from mkpf?
describe table ht_mkpf lines g_lines.
if g_lines > 0.
if true then retrieve all related records from mseg.
Doing this way we make sure that the access is by primary key
of mseg.
The reason is that is faster to filter them in memory
than to allow the db server to do it.
select mblnr mjahr zeile bwart charg
matnr lifnr erfmg erfme
into table ht_mseg
from mseg
for all entries in ht_mkpf
where mblnr = ht_mkpf-mblnr
and mjahr = ht_mkpf-mjahr.
endif.
fill t_lst or t_lst1 according to user's choice.
if gp_bymat = ' '.
perform fill_ht_lst.
else.
perform fill_ht_lst1.
endif.
endform.
form fill_ht_lst.
refresh ht_lst.
Example: how to discard unwanted data in an efficient way.
loop at ht_mseg.
filter unwanted data
check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.
check ht_mseg-matnr in so_matnr.
read header line.
read table ht_mkpf with table key mblnr = ht_mseg-mblnr
mjahr = ht_mseg-mjahr.
clear ht_lst.
* note : this may be faster if you specify field by field.
move-corresponding ht_mkpf to ht_lst.
move-corresponding ht_mseg to ht_lst.
perform read_lfa1 using ht_mseg-lifnr changing ht_lst-name1.
perform read_material using ht_mseg-matnr changing ht_lst-maktx.
insert table ht_lst.
endloop.
endform.
form fill_ht_lst1.
refresh ht_lst1.
Example: how to discard unwanted data in an efficient way.
hot to simulate a collect in a faster way
loop at ht_mseg.
filter unwanted data
check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.
check ht_mseg-matnr in so_matnr.
* note : this may be faster if you specify field by field.
read table ht_lst1 with table key matnr = ht_mseg-matnr
transporting erfmg.
if sy-subrc <> 0. " if matnr doesn't exist in sumary table
" insert a new record
ht_lst1-matnr = ht_mseg-matnr.
perform read_material using ht_mseg-matnr changing ht_lst1-maktx.
ht_lst1-erfmg = ht_mseg-erfmg.
ht_lst1-erfme = ht_mseg-erfme.
insert table ht_lst1.
else." a record was found.
" collect erfmg. To do so, fill in the unique key and add
" the numeric fields.
ht_lst1-matnr = ht_mseg-matnr.
add ht_mseg-erfmg to ht_lst1-erfmg.
modify table ht_lst1 transporting erfmg.
endif.
endloop.
endform.
implementation of cache for lfa1.
form read_lfa1 using p_lifnr changing p_name1.
read table ht_lfa1 with table key lifnr = p_lifnr
transporting name1.
if sy-subrc <> 0.
clear ht_lfa1.
ht_lfa1-lifnr = p_lifnr.
select single name1
into ht_lfa1-name1
from lfa1
where lifnr = p_lifnr.
if sy-subrc <> 0. ht_lfa1-name1 = 'n/a in lfa1'. endif.
insert table ht_lfa1.
endif.
p_name1 = ht_lfa1-name1.
endform.
implementation of cache for material data
form read_material using p_matnr changing p_maktx.
read table ht_material with table key matnr = p_matnr
transporting maktx.
if sy-subrc <> 0.
ht_material-matnr = p_matnr.
select single maktx into ht_material-maktx
from makt
where spras = sy-langu
and matnr = p_matnr.
if sy-subrc <> 0. ht_material-maktx = 'n/a in makt'. endif.
insert table ht_material.
endif.
p_maktx = ht_material-maktx.
endform.
form show_data.
if gp_bymat = ' '.
perform show_ht_lst.
else.
perform show_ht_lst1.
endif.
endform.
form show_ht_lst.
"needed because the FM can't use a hashed table.
it_lst[] = ht_lst[].
perform fill_layout using 'full display'
changing ls_layout.
perform fill_columns_lst.
perform sort_lst.
g_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
is_layout = ls_layout
it_fieldcat = it_fieldcat_lst[]
it_sort = it_sort_lst
tables
t_outtab = it_lst
exceptions
program_error = 1
others = 2.
endform.
form show_ht_lst1.
"needed because the FM can't use a hashed table.
it_lst1[] = ht_lst1[].
perform fill_layout using 'Sumary by matnr'
changing ls_layout.
perform fill_columns_lst1.
perform sort_lst.
g_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
is_layout = ls_layout
it_fieldcat = it_fieldcat_lst1[]
it_sort = it_sort_lst
tables
t_outtab = it_lst1
exceptions
program_error = 1
others = 2.
endform.
form fill_layout using p_window_titlebar
changing cs_layo type slis_layout_alv.
clear cs_layo.
cs_layo-window_titlebar = p_window_titlebar.
cs_layo-edit = 'X'.
cs_layo-edit_mode = space.
endform. " armar_layout_stock
form set_pf_status using rt_extab type slis_t_extab.
create a new status
and then select extras -> adjust template -> listviewer
set pf-status 'VISTA'.
endform. "set_pf_status
define add_lst.
clear it_fieldcat_lst.
it_fieldcat_lst-fieldname = &1.
it_fieldcat_lst-outputlen = &2.
it_fieldcat_lst-ddictxt = 'L'.
it_fieldcat_lst-seltext_l = &1.
it_fieldcat_lst-seltext_m = &1.
it_fieldcat_lst-seltext_m = &1.
if &1 = 'MATNR'.
it_fieldcat_lst-emphasize = 'C111'.
endif.
append it_fieldcat_lst.
end-of-definition.
define add_lst1.
clear it_fieldcat_lst.
it_fieldcat_lst1-fieldname = &1.
it_fieldcat_lst1-outputlen = &2.
it_fieldcat_lst1-ddictxt = 'L'.
it_fieldcat_lst1-seltext_l = &1.
it_fieldcat_lst1-seltext_m = &1.
it_fieldcat_lst1-seltext_m = &1.
append it_fieldcat_lst1.
end-of-definition.
form fill_columns_lst.
set columns for output.
refresh it_fieldcat_lst.
add_lst 'BUDAT' 10.
add_lst 'MBLNR' 10.
add_lst 'LIFNR' 10.
add_lst 'NAME1' 35.
add_lst 'XBLNR' 15.
add_lst 'ZEILE' 5.
add_lst 'CHARG' 10.
add_lst 'MATNR' 18.
add_lst 'MAKTX' 30.
add_lst 'ERFMG' 17.
add_lst 'ERFME' 5.
add_lst 'MJAHR' 4.
endform.
form fill_columns_lst1.
set columns for output.
refresh it_fieldcat_lst1.
add_lst1 'MATNR' 18.
add_lst1 'MAKTX' 30.
add_lst1 'ERFMG' 17.
add_lst1 'ERFME' 5..
endform.
Regards,
Ameet -
hi abapers
i have one small doubts
is it necessary to maintain an internal table in data tab of tables(in smart forms). it doesnot give error in activation but give dump while running.
pls clarify
madhuhi,
the Table Node is provided in the smartfrom to print thadata in the Internal table. without tabel it is no use to create a table node.. as in the above post while the activation may be u won't get the error..
if you want a loop without a table in ur layout then go for LOOP node.
Please Close this thread.. when u r problem is solved
Reward if Helpful
Regards
Naresh Reddy K -
How to create a table using subform if lifecycle designer 7.1 not availabl
hi,
plis tell me how to create a table because i am using adobe lifecycle 6.1 and in the library
there is no object for table..
also tell me that if i have adobe lifecycle designer then which is better option and why?
use table from library directly or create a table using subform...Hi Sweta,
Create the interface attributes of type string and xtring type.
Create node in the context of type graphics. bind the interface fields to the graphic node context element properties -
Graphic content, field of xzstring type and mimetype to be string/any char data type of suitable length.
In layout drag and drop the image field and bind it to the graphic element.
In yoour report programme-
do the code as berlow to pass the graphic data -
<i>CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = '<mime type graphic name>'
p_id = 'BMAP'
p_btype = 'BCOL' "BMON if monochrome
RECEIVING
p_bmp = w_binary
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.</i>
in the call <form function module>
pass the inerface values for
xstring (graphic field) to be w_binary (import parameter of the previous method)
and mime type to be 'image/bmp'.
This would work.
Hope fully you may be able to see a tutorial on this soon ;).
- anto. -
Can I create a table in my form?
Our need our teachers to fill out a field trip form using a table format?
Can I create a table in my form?
and if yes, how?
thank you
Need it to look like this:
DATE
TIME
To start/finish
Name of Program
TEACHER’S
NAME
TEACHER’S EMAIL
# OF
STUDENTS
Setup in
Room #
02-07-14
9:20-10:35
Soil Rocks
Juday
20
118
02-07-14
10:50-12:05
Soil Rocks
Guild
20
118
02-07-14
12:45-2:00
Soil Rocks
Neptune
20
118
02-07-14
2:15-3:30
Soil Rocks
Webb
20
118Yes and yes.
If you have questions about creating the PDF form, you can use the Acrobat Forms forum: http://forums.adobe.com/community/acrobat/forms?view=discussions
Maybe you are looking for
-
Is there a way to comment on specific Document Version?
I have high hopes for document versioning. However, I can't find much information on the details. I'd like to understand how it works a little bit better. I have lots of questions. But the first thing that came to my attention is that to be really
-
I want to copy my iphoto library from my iMac to my new Macbook Pro.
I am having a lot of difficulty copying my existing iphoto library from our imac to our new macbook pro. We have the two computers set up through Time Machine. I tried using dropbox and though I was successful until I tried to click on the thumbnai
-
Replace DVI cable for 20in Cinema Display
Need to replace the DVI portion on the power/connector coming from the back of the display. It was ripped out when someone attempted to steal. Is this possible or do I have to buy another monitor?
-
Global Settings - 'HTTP 404 - File not found'
Hello I have some problems with the services-portlet in portal. When I click on the link to 'Global Settings' of the services-portlet a 'HTTP 404 - File not found' exception is displayed. Additionally I have some problems on accessing the portal with
-
Website not completely visible in safari
Website not completely visible in Safari. How to solve this?