Go on link..

link us with ...

Tuesday, December 21, 2010

RLE PRINT FORMS Report

*----------------------------------------------------------------------*
* INCLUDE RLE_PRINT_FORMS *
*----------------------------------------------------------------------*

*---------------------------------------------------------------------*
* FORM PROTOCOL_UPDATE *
*---------------------------------------------------------------------*
* The messages are collected for the processing protocol. *
*---------------------------------------------------------------------*

FORM PROTOCOL_UPDATE.

CHECK XSCREEN = SPACE.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = SYST-MSGID
MSG_NR = SYST-MSGNO
MSG_TY = SYST-MSGTY
MSG_V1 = SYST-MSGV1
MSG_V2 = SYST-MSGV2
MSG_V3 = SYST-MSGV3
MSG_V4 = SYST-MSGV4
EXCEPTIONS
OTHERS = 1.

ENDFORM.

*&---------------------------------------------------------------------*
*& Form ADD_SMFRM_PROT
*&---------------------------------------------------------------------*
FORM ADD_SMFRM_PROT.

DATA: LT_ERRORTAB TYPE TSFERROR.
* DATA: LF_MSGNR TYPE SY-MSGNO. "DEL_HP_335958
FIELD-SYMBOLS: TYPE LINE OF TSFERROR.

* get smart form protocoll
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
ERRORTAB = LT_ERRORTAB.

* add smartform protocoll to nast protocoll
LOOP AT LT_ERRORTAB ASSIGNING .
* CLEAR LF_MSGNR. "DEL_HP_335958
* LF_MSGNR = -ERRNUMBER. "DEL_HP_335958
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = -MSGID
* MSG_NR = LF_MSGNR "DEL_HP_335958
MSG_NR = -MSGNO "INS_HP_335958
MSG_TY = -MSGTY
MSG_V1 = -MSGV1
MSG_V2 = -MSGV2
MSG_V3 = -MSGV3
MSG_V4 = -MSGV4
EXCEPTIONS
OTHERS = 1.
ENDLOOP.

ENDFORM. " ADD_SMFRM_PROT

*&---------------------------------------------------------------------*
*& Form SET_PRINT_PARAM
*&---------------------------------------------------------------------*
FORM SET_PRINT_PARAM CHANGING CS_CONTROL_PARAM TYPE SSFCTRLOP
CS_COMPOSER_PARAM TYPE SSFCOMPOP
CS_RECIPIENT TYPE SWOTOBJID
CS_SENDER TYPE SWOTOBJID
CF_RETCODE TYPE SY-SUBRC.

DATA: LS_ITCPO TYPE ITCPO.
DATA: LF_REPID TYPE SY-REPID.
DATA: LF_DEVICE TYPE TDDEVICE.
DATA: LS_RECIPIENT TYPE SWOTOBJID.
DATA: LS_SENDER TYPE SWOTOBJID.

LF_REPID = SY-REPID.

CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
PI_NAST = NAST
PI_REPID = LF_REPID
IMPORTING
PE_RETURNCODE = CF_RETCODE
PE_ITCPO = LS_ITCPO
PE_DEVICE = LF_DEVICE
PE_RECIPIENT = CS_RECIPIENT
PE_SENDER = CS_SENDER.

IF CF_RETCODE = 0.
MOVE-CORRESPONDING LS_ITCPO TO CS_COMPOSER_PARAM.
CS_CONTROL_PARAM-DEVICE = LF_DEVICE.
CS_CONTROL_PARAM-NO_DIALOG = ' '.
* CS_CONTROL_PARAM-PREVIEW = XSCREEN.
CS_CONTROL_PARAM-GETOTF = LS_ITCPO-TDGETOTF.
CS_CONTROL_PARAM-LANGU = NAST-SPRAS.
ENDIF.
ENDFORM. " SET_PRINT_PARAM

No comments:

link us...

For Visitors

if you want to publish or Add something on ERP, SAP , SAP FUNCTIONAL, SAP ABAP then mail us along with your email-id. contain must be yours

email-id :- avinashkr_raj@yahoo.com(any email)

email-id :- avinaskr_raj.abap@blogger.com ( use only gmail)