on 09-06-2007 9:00 AM
Dear gurus:
in my abap program i process require data, and saved in a internal table.
how can l print the data in smartforms.?
who can give me a code sample is better:)
reward all helpful advise.
Try this....
1) Tcode --> SmartForms
2) Form name --> Z_SF_TEST Create
3) Under Global settings
a) Form Interface
Table Tab
ITAB LIKE EKPO
b) GLOBAL Definitions
WA_NETPR LIKE EKPO-NETPR
In smart forms if we want to display quantity and currency fields. We can't directly display currency field and quantity fields
For that we have to create an extra variable in global definitions
Ex: netpr FIELD of EKPO
CREATE program lines and specify WA_NETWR = itab-netpr.
4) RT CLick on main Window
CREATE --> TABLE
Click Table painter
DEFAULT %LTYPE will be Created
a) If you want more like Header footer etc add by rt click on %LTYPE1
Table (Tab)
%LTYPE Radio(SELECT) 5 CM 5 CM 6 CM
CLICK on DATA (Tab)
INTERNAL TABLE ITAB LIKE ITAB
5)RT click on table control and create --> program lines
General attribute (Tab)
INPUT PARAMETER OUTPUT PARAMETER
itab WA_NETPR
Code Area
WA_NETWR = ITAB-NETPR.
6) RT CLcick on table ctl and create 3 text to display the fields
a) % text1 +button(insert field)
FIELD name &itab-ebeln&
Output options (tab)
Check New line LINETYPE %Ltype1
check new cell
b) % text2
& itab-ebelp&
output options
check new cell
c) % text2
& wa_netpr&
output options
check new cell
<b>Report ac
Tables ekpo.
Data: itab1 like ekpo occurs 0 with header line.
select * into table itab1 from ekpo.
Call function module --> smart form function module and pass your internal table</b>
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HOw can the smart form know the structure of your internal table, if you have such internal table declared by you.. it is better to declare inside smartform under GLobal definition, instead of passing it to the Smartform through function module..
This is the reason smartform has program line, where you can program/ retrive data to your internal table and loop it inside the smartform... I guess approch you are doing is not advisable and possible....
I guess the concept is clear...
Regards,
Sairam
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.