Uploaded by j.umabalan

continuosformprint

advertisement
*&---------------------------------------------------------------------*
*& Report ZSDEXPIN2_MBA
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT
ZSDEXPIN2_MPED.
include ZSDEXPIN2_MPED_top.
include ZSDEXPIN2_MPED_ss.
START-OF-SELECTION.
if flag ne 'X'.
SELECT SINGLE * FROM LIPS
into wa_lips
WHERE MANDT
AND
VBELN
CLIENT SPECIFIED
= SY-MANDT
= P_vbeln.
SELECT SINGLE * FROM LIKP CLIENT SPECIFIED
into wa_likp
WHERE MANDT = SY-MANDT
AND
VBELN = wa_LIPS-VBELN.
IF wa_LIKP-TRATY IS INITIAL.
WRK_VTEXT = 'By Air'.
ELSE.
SELECT SINGLE * FROM TVTYT CLIENT SPECIFIED
into wa_TVTYT
WHERE MANDT = SY-MANDT
AND
SPRAS = SY-LANGU
AND
TRATY = wa_likp-TRATY.
WRK_VTEXT = wa_TVTYT-VTEXT.
ENDIF.
LV_FORM = 'ZEXPORT_INVOICE_MPED2'.
*
* * *** get smart form?
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME
= LV_FORM
*
VARIANT
= ' '
*
DIRECT_CALL
= ' '
IMPORTING
FM_NAME
= fm_name
EXCEPTIONS
NO_FORM
= 1
NO_FUNCTION_MODULE = 2
OTHERS
= 3.
IF SY-SUBRC <> 0.
MESSAGE I000(38) WITH 'Error in calling smart form'(006).
LEAVE LIST-PROCESSING.
ENDIF.
*** Calling The Smart Form
*** Fill Output (Print) Options
WA_OUTPUTOPT-TDFINAL
= ' '.
WA_OUTPUTOPT-TDIMMED
= 'X'.
WA_OUTPUTOPT-TDDELETE
= 'X'.
WA_OUTPUTOPT-TDDEST
= 'LOCL'.
WA_OUTPUTOPT-TDCOVTITLE = 'Invoice Print'.
WA_OUTPUTOPT-TDTITLE
= ' '.
WA_CTRLPAR-NO_DIALOG = SPACE.
WA_CTRLPAR-PREVIEW
= 'X'.
CALL FUNCTION fm_name
EXPORTING
CONTROL_PARAMETERS = WA_CTRLPAR
OUTPUT_OPTIONS
= WA_OUTPUTOPT
USER_SETTINGS
= 'X'
lv_vbeln = P_vbeln
wrk_vtext = wrk_vtext.
*
ENDIF.
endif.