on 03-21-2007 4:34 PM
Hi, I´m beginner with smartforms.
I have this internal table
BEGIN OF i_factura OCCURS 0,
vbeln LIKE zfactc-vbeln,
kunag LIKE zfactc-kunag,
name1 LIKE zclientes-name1,
fkart LIKE zfactc-fkart,
fkdat LIKE zfactc-fkdat,
posnr LIKE zfactd-posnr,
matnr LIKE zfactd-matnr,
maktx LIKE ztextomaterial-maktx,
netwr LIKE zfactd-netwr,
ntgew LIKE zfactd-ntgew,
waerk like zfactd-waerk,
gewei like zfactd-gewei.
END OF i_factura.
This is a test smartform, and i had only three windows in a page.
The client window
Client Number Client Name
The main window
The format of this window is
Material number Description Weight(ntgew) Netwr
The subtotal window
Subtotal = netwr
IVA = netwr * 0.15
Total = Subtotal + IVA.
When i try to write the netwr field in the main window i have the reference field XXX-NETWR UNKNOWN IN FORM ( what is the cause of this error?).
If i have a loop to an internal table in a table control in the main window, how i can pass
the values of client number and client name to the corresponding fields in the client window.
A step by step procedure, please.
Hi Jos,
Normal Procedure is as follows.
Create on Structure in SE11 for display of materials which u will be looping inside the table in smartform let it be t_final
Create one Structure for Single values to be displayed( means the one that wont get repeated) like Sub Total , IVA, Total etc let it be wa_sum.
create a PRINT PROGRAM in Se 38 and populate the final internal table let it be t_final and also create a workarea for subtotal and populate that work area with Sub Total IVA and Total
Pass the table and Workarea into Smartform as given below...
DATA: c_fmname TYPE tdsfname VALUE <Smart form name>,
<u>*This Function Returns the name of generated Function Module.</u> CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_fmname
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
IF sy-subrc NE 0.
EXIT.
ENDIF.
<u>*To call the generated Function Module in the above step.</u>
CALL FUNCTION w_fmname
EXPORTING
w_sum = w_sum.
TABLES
t_final = t_final
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4.
<b>In the Smartform:-</b>
in FORMINTERFACE declare the workarea that U are passing from Print program
w_sum TYPE <sum structure>
in TABLES tab of FormInterface declare t_final LIKE <final Structurename>
in GLOBAL definintions declare w_final type <final Structurename>
Then create 3 windows including main window which is used for displaying ur materail details
cerate one table in main window .loop at t_final into w_final
click on the button left to "form painter"
Grag and drop the required values into the corresponding table fields and text elements
for client no and client name see "System fields " below
Hope this will be helpful
regards
Avi....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
in the smartforms for the quatitity and currency fields u will get this error when u r printing the value..
to avoide this create program line and move the value into a character type field then print character field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.