Sap Technology‎ > ‎ABAP DEVELOPMENT‎ > ‎

Smartform : Good Issue Note Form

posted Nov 7, 2013, 12:09 AM by Sen Long   [ updated Nov 7, 2013, 12:10 AM ]
This sample smartform print good issue delivery note base on Material Document.
Good Issue Note

Code to call form:

*-----------------------------------------------------------------------
* Program Name : ZMRGISL
* Description  : This program is used to:
*              :   - print document related to goods issue transaction
*-----------------------------------------------------------------------
* Change History Log
*-----------------------------------------------------------------------
* Date        | Changed by        | <<CR#-DEVK#
*             | Change Requestor  | => Description
*-----------------------------------------------------------------------
* Date Aug 18 2011
* Change by htkhoa
* Add form for HCM
*-----------------------------------------------------------------------

REPORT  ZMRGISL MESSAGE-ID zmsg.
INCLUDE ZMRGISLFORM.
PERFORM show_form.
form show_form.
  data: OUTPUT_OPTIONS type SSFCOMPOP,
        control type SSFCTRLOP.
TABLES :
         USR01.
SELECT SINGLE FROM USR01 WHERE BNAME = SY-UNAME.
"control-device = 'PRINTER'.
"control-device = 'LP01'.
"OUTPUT_OPTIONS-TDNOPRINT = 'X'.
"OUTPUT_OPTIONS-TDIMMED  = 'X'.
OUTPUT_OPTIONS-TDDEST = USR01-SPLD.
OUTPUT_OPTIONS-TDNEWID = 'X'.
"control-no_dialog = 'X'.

Data : version type tdsfname.
If HN = 'X' .
  version = 'ZSD_DLVNOTE' .
ELSEIF NA 'X'.
  version = 'ZSD_DLVNOTE_NA' .
Else.
  version = 'ZSD_DLVNOTE_HCM' .
ENDIF.

 data:    form_name TYPE rs38l_fnam.
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
  formname = version
IMPORTING
  fm_name = form_name
EXCEPTIONS
  no_form = 1
  no_function_module = 2
  OTHERS 3.


CALL FUNCTION form_name
EXPORTING
    output_options = output_options
    control_parameters = control
    user_settings = ' '
    p_mblnr = p_mblnr
    p_mjahr = p_mjahr
TABLES
  it_mkpf = it_mkpf
.
IF sy-subrc <> 0.
ENDIF.

ENDFORM.


ċ
zsd_dlvnote_hcm.xml
(66k)
Sen Long,
Nov 7, 2013, 12:09 AM
ċ
ztask.html
(294k)
Sen Long,
Nov 7, 2013, 12:13 AM
Comments