2006 Jun 16 6:40 AM
hi gurus,
thnks for earlier inputs. plz let me know(path) how to reward u points as i'm new to ABAP.
extremely sorry for not rewarding for ur earlier inputs.
my question is how to pass data from driver/print program to smartform. where should i declare internal tables in smartform in form interface(import, export, tables n exceptions).
i've declared 3 internal tables in print program how to pass them when i call the function module of smartform.
one more query i wanna display the quotation number in the form which will b inputted at selection screen of driver program. plz help me with code ASAP.
kind regards,
vinay.
2006 Jun 16 6:46 AM
Hi Vinay,
You have to pass the internal tables in the form interface(IMPORT)in the smartforms.In 'TABLES' pass the table if any you are using.When you are posting the query there will be three points on the left of your query panel.Click on one of the point.In that way you can reward us.
Pass the quotation number to the FM(SMARTFORM) itself and declare it in the global definition in the smartforms and use it at the place you need it.
2006 Jun 16 6:46 AM
Hi Vinay,
You have to pass the internal tables in the form interface(IMPORT)in the smartforms.In 'TABLES' pass the table if any you are using.When you are posting the query there will be three points on the left of your query panel.Click on one of the point.In that way you can reward us.
Pass the quotation number to the FM(SMARTFORM) itself and declare it in the global definition in the smartforms and use it at the place you need it.
2006 Jun 16 6:51 AM
Vinay,
1. In the SMART Forms, in the INTERFACE variables section you can declare you import / export variables or tables. The tables should have a corresponding strcuture in the data dictionary.
2. Quotation No., you just pass that to SMART Form and display the same using a text element and it should be of the format you want.
Regards,
Ravi
2006 Jun 16 6:52 AM
check the code for passing internal tables from print program to smartform.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'FORM_NAME'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CALL FUNCTION fm_name
TABLES
itab_post = itab_post
exp_obj44 = exp_obj44
exp_obj66 = exp_obj66
copy_fund = copy_fund
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
you have to check on radio buttons for rewarding points.
Regards,
Wasim Ahmed
2006 Jun 16 6:53 AM
Hai
I have sent you some documents.
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Also Check the following Links
http://www.sapgenie.com/abap/smartforms_described.htm
http://www.sapgenie.com/abap/smartforms_detail.htm
http://www.sapgenie.com/abap/smartforms_sapscript.htm
Thanks & regards
Sreenivasulu P
2006 Jun 16 7:51 AM
Hi Vinay,
<b>1</b>.
So u have created 3 itabs in driver program,If u want to pass those 3 to Smartform ,those 3 table should be used there in smartform as well with same structure .
<b>2</b>.
Go to SE11 T.code .
<b>3</b>.
Create Structure ZSITAB under Data type (fields are which fields ur internal table has )
<b>4</b>.
Create table type ZTITAB under Data type (Assigne line type as ZSITAB ).
<b>5</b>.
That is global Internal table .Y u r creating here is u cant create Internal table with ur own fields in Smartform
<b>6</b>.
Now create Interface Internal table in Global Settings .
like this .
Global Settings->Form Interface->Tables Tab.
i_ccode like ZTITAB.
<b>7</b>.
And also create Work area
Global Settings->Global Definitions->Global Data
w_ccode like ZSITAB.
<b>8</b>.
Create Table Node .
Right click on Mainwindow->Create->Table
<b>9</b>.
Under main Area .Loop ur internal table and display .
<b>10</b>.
Once you activate ur Smartform and Execute u will get Smartform Function module like this <b>/1BCDWB/SF00000058</b>.
<b>11</b>.
Take that FM and call in ur Driver program .Then pass ur internal tables .Samething applies for Variables as well.
Ex:Quotation number.
<b>12</b>.
Once u change Smartform and activate every time new Function module is generated .To get the latest one
We use the below FM
CALL FUNCTION <b>'SSF_FUNCTION_MODULE_NAME'</b>
EXPORTING
formname = c_form
IMPORTING
fm_name = g_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
CLEAR g_fm_name.
ENDIF.
<b>CALL FUNCTION g_fm_name</b>
EXPORTING
control_parameters = gs_control_parameters
output_options = gs_output_options
user_settings = g_user_settings
s_doc_processing = s_doc_processing
s_header_display = s_header_display
s_header_texts = s_header_texts
s_header_status = s_header_status
i_header_appraiser = i_header_appraiser
i_header_appraisee = i_header_appraisee
i_header_part_appraiser = i_header_part_appraiser
i_header_other = i_header_others
i_header_dates = s_header_dates
i_header_add_data = i_header_add_data
i_body_columns = i_body_columns
i_body_elements = i_body_elements
i_body_cells = i_body_cells
i_body_cell_notes = i_body_cell_notes
i_body_element_descr = i_body_element_descr
i_body_cell_val_values = i_body_cell_val_values
i_body_cell_val_ranges = i_body_cell_val_ranges
i_body_cell_val_c_like = i_body_cell_val_c_like
i_body_cell_val_descr = i_body_cell_val_descr
g_pernr = i_final-pernr
g_dprtt = i_final-dprtt
g_trfgr = i_final-trfgr
g_stext = i_final-job_name
g_supervisor = i_final-supervisor
g_ename = i_final-ename
g_appraisal_id = w_document_id-appraisal_id
g_element_id = g_element_id
IMPORTING
job_output_info = gs_output_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
EXIT.
ENDIF. "SUBRC: smartforms function module call ?
I hope that this may help u little bit.
<b>Thanks,
Venkat.O</b>
2006 Jun 16 9:49 AM
hi venkaiah O,
thaks for ur valuable tips. i m sending u my clear problem.
i created a 3 internal tables namely i_vbpa, i_adrc n i_kna1 with required fields in the driver program.
i getting the relevant data while debugging. but im unable to pass it to the smartform. the prog is executed without data in the print preview.
plz tell how to create the same internal tables in the smartform builder(form interface). plz tell me where to declare them.
can i use the master table instead of creating structure in se11.
plz send me ur email id. so that i can ssend the layout to u.
i need ur help.
kindly send me the code ASAP.
kind regards,
vinay
2006 Jun 16 9:55 AM
Hi vinay,
If you are planning to send i_vbpa, i_adrc, i_kna1 these internal tables, you must have to define them in the layout.
So, go to Layout, Form Interface , Tables section.
Under tables, give it as below.
IS_VBPA TYPE VBPA
IS_ADRC TYPE ADRC
IS_KNA1 TYPE KNA1
Create work areas in the Global Fields.
WA_VBPA TYPE vbpa
WA_ADRC TYPE ADRC
WA_KNA1 TYPE KNA1
Then you can use those internal tables and work areas in the Windows as you like.
if you have any problesm you can email me on
subba.reddy@rs-components.com
regards,
ram
Pls reward points if it is helpfull
2006 Jun 16 10:09 AM
Hi Vinay,
<b>1</b>.
U can create ur ITABS referring master table
Global settings->Form Interface->Tables
i_vbpa Like vbpa
i_adrc like adrc
i_kna1 like kna1
<b>2</b>.
My mail Id :venkataiah.oray@philips.com
<b>3</b>.
U can debug Smartform like this.
Execute SMARTform ->U will see Function module name->Go to menu->Main Program >Click on thitd include ->Search for Loop at urtable name.
Check here whether u r getting values in the smartform or not.
<b>Thanks,
Venkat.O</b>
Thanks,
Venkat.O