SAP-HON
CASE STUDY:
CREATION OF SMART FORM
PROCESS:
STEP-1:create a logo
->open painter and create a logo AND SAVE IT.
->OPEN GUI OPEN TCODE "SE78" SELECT bitmap image and
then import select the path of the logo and save it.
->tcode "SMARTFORMS" then select create form .
->within the pages and windows create a new window.
->go to form painter and then adjust the logo window.
->create a new graphic in that window and import the logo into it.
->save it, activate it and run it.
STEP-2: Adding tables
-> create a structure and the create table type for it.
->goto smart forms click on form interface and then mention
internal table.
->goto global definition create a work area.
->create a table in main window, select draw rows and create a
rows.
->click on header, create table line, for each cell create text area,
and give proper content.
-> click on window, create table line, for each cell create text area,
and give proper content.
->now create a driver code "se38".
STEP-3: Adding styles
->Goto smartforms, click on style and then create a style.
->Goto characterformate, then create a node "TH".[TABLE
HEADER].
->click on paragraph format create a node "NP".
->Open smartform and for text fields under header add <TH>.
STEP-4: SSF Function usage
->with in the driver code import
" SSF_FUNCTION_MODULE_NAME ".
DRIVER CODE:
*&---------------------------------------------------------------------*
*& Report ZHON_SF_RSS
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZHON_SF_RSS.
TABLES vbap.
SELECT-OPTIONS so_vbeln FOR vbap-vbeln.
DATA: ls_vbap TYPE ZEXP_SF1_RSS,
lt_vbap TYPE ZEXP_SF1_TT_RSS,
v_formname TYPE TDSFNAME,
v_fmname TYPE RS38L_FNAM.
v_formname = 'ZPRATICE_SF_RSS'.
PERFORM get_name.
START-OF-SELECTION.
SELECT vbeln,
posnr,
matnr,
pstyv,
meins
FROM vbap INTO TABLE @lt_vbap
WHERE vbeln IN @so_vbeln.
SORT lt_vbap BY vbeln ASCENDING.
PERFORM display_data.
*&---------------------------------------------------------------------*
*& Form get_name
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM get_name .
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = v_formname
IMPORTING
FM_NAME = v_fmname .
ENDFORM.
*&---------------------------------------------------------------------*
*& Form display_data
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM display_data .
CALL FUNCTION v_fmname
EXPORTING
im_vbap = ls_vbap
it_vbap = lt_vbap
.
ENDFORM.
RESULT: