on 06-17-2008 1:17 PM
can anyone post me how to do smart forms with some example plzzzzzzzzz urgent
dear friend
i am sending you a
driver progrme that is for the PO.
collect the data that is in final table and post that
final table in the smartforms.
rewards are expecting .
vivek
&----
*& Report Y_PO_SSF_SPARES
*&
&----
*&
*&
&----
REPORT y_po_ssf_spares.
TABLES : ekko, ekpo, eket, konv.
TYPES : BEGIN OF i_final ,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
menge TYPE ekpo-menge,
netpr TYPE ekpo-netpr,
txz01 TYPE ekpo-txz01,
matnr TYPE ekpo-matnr,
meins TYPE ekpo-meins,
bednr TYPE ekpo-bednr,
kbetr TYPE konv-kbetr,
kwert TYPE konv-kwert,
no TYPE char3,
END OF i_final.
TYPES : BEGIN OF i_ekko,
ebeln TYPE ekko-ebeln,
knumv TYPE ekko-knumv,
waers TYPE ekko-waers ,
lifnr TYPE ekko-lifnr,
END OF i_ekko.
TYPES : BEGIN OF i_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
menge TYPE ekpo-menge,
netpr TYPE ekpo-netpr,
txz01 TYPE ekpo-txz01,
matnr TYPE ekpo-matnr,
meins TYPE ekpo-meins,
bednr TYPE ekpo-bednr,
waers TYPE ekko-waers ,
knumv TYPE ekko-knumv,
lifnr TYPE ekko-lifnr,
END OF i_ekpo.
TYPES : BEGIN OF i_konv,
knumv TYPE konv-knumv,
kposn TYPE konv-kposn,
kbetr TYPE konv-kbetr,
kwert TYPE konv-kwert,
kschl TYPE konv-kschl,
waers TYPE konv-waers,
END OF i_konv.
DATA : it_final TYPE TABLE OF i_final,
w_final TYPE i_final,
it_ekpo TYPE TABLE OF i_ekpo,
w_ekpo TYPE i_ekpo,
it_ekko TYPE TABLE OF i_ekko,
w_ekko TYPE i_ekko,
it_konv TYPE TABLE OF i_konv,
w_konv TYPE i_konv,
num_days1 TYPE i,
num_days2 TYPE i,
num_daysr TYPE i,
value TYPE p DECIMALS 3 ,
val TYPE p ,
flag.
DATA: prog TYPE sy-repid,
dynnr TYPE sy-dynnr,
fnam TYPE rs38l_fnam,
v_pono TYPE ekko-ebeln,
v_knumv TYPE ekko-knumv,
v_knumv1 TYPE ekko-knumv,
v_ebeln TYPE ekko-ebeln,
v_lifnr TYPE ekko-lifnr,
idx TYPE i,
cnt TYPE i,
v_amount TYPE konv-kwert,
v_amount1 TYPE konv-kwert,
v_amount2 TYPE konv-kwert,
v_waers TYPE konv-waers.
************************************************************************
DATA: it_otf TYPE STANDARD TABLE OF itcoo,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline,
st_job_output_info TYPE ssfcrescl,
st_document_output_info TYPE ssfcrespd,
st_job_output_options TYPE ssfcresop,
st_output_options TYPE ssfcompop,
st_control_parameters TYPE ssfctrlop,
v_len_in TYPE so_obj_len,
v_language TYPE sflangu VALUE 'E',
v_e_devtype TYPE rspoptype,
v_bin_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_guiobj TYPE REF TO cl_gui_frontend_services,
v_filename TYPE string.
DATA : BEGIN OF is_ekko OCCURS 0,
ebeln TYPE ekko-ebeln,
END OF is_ekko.
**********************************************************************
******USER INTERACTION OPTION FOR THE INVOICE NO
**********************************************************************
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE r.
PARAMETERS: ponum LIKE ekko-ebeln OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK b1.
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE rt.
*SELECTION-SCREEN COMMENT /1(30) comm1.
PARAMETERS: r1 RADIOBUTTON GROUP rad1,
r2 RADIOBUTTON GROUP rad1.
*SELECTION-SCREEN COMMENT /1(30) comm2.
SELECTION-SCREEN COMMENT /1(30) comm12.
SELECTION-SCREEN : END OF BLOCK b2.
SELECTION-SCREEN : BEGIN OF BLOCK b4 WITH FRAME TITLE t4 .
SELECTION-SCREEN COMMENT /5(75) comm11.
SELECTION-SCREEN COMMENT /5(75) comm21.
SELECTION-SCREEN : END OF BLOCK b4.
*-> At selection screen Output.
AT SELECTION-SCREEN OUTPUT.
Rt = 'Yet To Receive'.
t4 = 'Note'.
comm2 = 'Rport For Receive'.
comm3 = 'Rport For Under Collection'.
comm12 = ' '.
comm11 = '1)Select this option when line items is of one page'.
comm21 = '2)Select this option when line items are more then one page'.
*********************************************************************
*********************************************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ponum.
REFRESH is_ekko.
SELECT ebeln FROM ekko INTO TABLE is_ekko.
IF sy-subrc IS INITIAL.
prog = sy-repid.
dynnr = sy-dynnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'ebeln'
dynpprog = prog
dynpnr = dynnr
dynprofield = 'ponum'
value_org = 'S'
TABLES
value_tab = is_ekko.
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
exceptions
parameter_error = 1
no_values_found = 2
others = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
************************************************************************
*
AT SELECTION-SCREEN ON ponum.
IF ponum IS NOT INITIAL.
CLEAR v_pono.
SELECT SINGLE ebeln FROM ekko INTO v_pono WHERE ebeln = ponum
AND bsart IN ('NB', 'NBS')
AND ekgrp = 'CLS'.
IF sy-subrc IS NOT INITIAL.
MESSAGE 'Enter a Valid SPARES PO Num' TYPE 'E'.
ENDIF.
ENDIF.
************************************************************************
*
START-OF-SELECTION.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
percentage = '99'
text = 'Processing ....'.
IF r1 = 'X'.
PERFORM get_data.
PERFORM process_data.
ENDIF.
IF r2 = 'X'.
PERFORM get_data.
PERFORM process_data1.
ENDIF.
&----
*& Form get_data
&----
text
----
--> p1 text
<-- p2 text
----
FORM get_data .
SELECT a~ebeln
b~ebelp
b~menge
b~netpr
b~txz01
b~matnr
b~meins
b~bednr
a~waers
a~knumv
a~lifnr
FROM ekko AS a INNER JOIN ekpo AS b
ON aebeln = bebeln
INTO TABLE it_ekpo
WHERE a~ebeln = ponum .
break sildev01.
LOOP AT it_ekpo INTO w_ekpo .
w_final-no = sy-tabix.
w_final-ebeln = w_ekpo-ebeln.
w_final-ebelp = w_ekpo-ebelp.
w_final-menge = w_ekpo-menge.
w_final-netpr = w_ekpo-netpr.
w_final-txz01 = w_ekpo-txz01.
w_final-matnr = w_ekpo-matnr.
w_final-meins = w_ekpo-meins.
w_final-bednr = w_ekpo-bednr.
APPEND w_final TO it_final.
CLEAR w_final.
ENDLOOP.
ENDFORM. "get_data
&----
*& Form process_data
&----
text
----
--> p1 text
<-- p2 text
----
FORM process_data .
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Y_QC_SSF_PO_SPARES'
IMPORTING
fm_name = fnam
EXCEPTIONS
no_form = 1
no_function_module = 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.
IF fnam IS NOT INITIAL.
SORT it_final BY ebeln ebelp.
CALL FUNCTION fnam
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
TABLES
itab = it_final
i_ekpo = it_ekpo
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " process_dataENDFORM.
FORM process_data1.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Y_QC_SSF_PO_SPARES2'
IMPORTING
fm_name = fnam
EXCEPTIONS
no_form = 1
no_function_module = 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.
IF fnam IS NOT INITIAL.
SORT it_final BY ebeln ebelp.
CALL FUNCTION fnam
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
TABLES
itab = it_final
i_ekpo = it_ekpo
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " process_dataENDFORM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SAP help
http://help.sap.com/saphelp_47x200/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
and also u can see
SF_example_01,
SF_example_02
SF_example_03
example programs and smartforms in any sap system
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
For Smart Form example, go through the link given below :
http://saptechnical.com/Tutorials/Smartforms/SFMain.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
It will useful to you.
With Regards
Nikunj Shah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
go to SMARTFORMS transaction and give form name as SF* and press F4 u can find so many examples.
Rgds.,
subash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
pls check the below links
Smartforms
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
happy learning,
thanks
shankar
reward me if usefull
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer
for Smartforms material
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
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
Subtotals - Check the link...
Go through these SAP Standard programs also,
sf_example_01
sf_example_02
sf_example_03.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
also check
Check these links.https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
Check these links also.
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
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
Reward if useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You would find a million links on smartform materials on the forum. Search for it mate...
Nayan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go through the below link.you will find examples with screen shots.
http://www.saptechnical.com/Tutorials/Smartforms/SFMain.htm
Reward if useful.
Regards,
Swetha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.