Quantcast
Channel: SCN: Message List - ABAP Connectivity
Viewing all articles
Browse latest Browse all 3125

While converting spool to PDF marathi character shown as symbolic in PDF

$
0
0

Hi guys,

 

I have requirement to send payslip via mail.i have developed program everything working well.get payslip,create spool and convert spool to pdf is working well.But issue is while converting spool into PDF then marathi character display like special symbols in PDF (in payslip emp.name , emp location,designation,department are in Marathi).


code as follow,


CALL FUNCTION 'GET_PAYSLIP'

         EXPORTING

           EMPLOYEE_NUMBER = WA-PERNR

           SEQUENCE_NUMBER = WA_PC261-SEQNR

           PAYSLIP_VARIANT = FORMULAR                        " 'ZN01'

         IMPORTING

           RETURN          = RETURN

           P_INFO          = PINFO

         TABLES

           P_FORM          = PFORM.

 

       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

        EXPORTING

            FORMNAME                 = 'ZHR_ESS_PAYSLIP_TO_PDF'

*          VARIANT                  = ' '

*          DIRECT_CALL              = ' '

       IMPORTING

            FM_NAME                  = FNAME.

*     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.

 

       SF_CONTROL_PARAMETERS-DEVICE = 'PRINTER'.

       SF_CONTROL_PARAMETERS-NO_DIALOG = 'X'.

       SF_OUTPUT_OPTIONS-TDNEWID       = 'X'.

       SF_CONTROL_PARAMETERS-LANGU     = SY-LANGU.

       SF_OUTPUT_OPTIONS-TDDEST  = 'LP01'.

*      SF_OUTPUT_OPTIONS-tdprinter = 'PDFUC'.

 

 

 

       CALL FUNCTION FNAME "'/1BCDWB/SF00000499'

         EXPORTING

*     ARCHIVE_INDEX              =

*    ARCHIVE_INDEX_TAB          =

*   ARCHIVE_PARAMETERS         =

     CONTROL_PARAMETERS         = SF_CONTROL_PARAMETERS

*    MAIL_APPL_OBJ              =

*    MAIL_RECIPIENT             =

*    MAIL_SENDER                =

     OUTPUT_OPTIONS             = SF_OUTPUT_OPTIONS

     USER_SETTINGS              = ''

           PINFO                      = PINFO

           PFORM                      = PFORM

        IMPORTING

*    DOCUMENT_OUTPUT_INFO       =

           JOB_OUTPUT_INFO            = JOB_OUTPUT_INFO

*    JOB_OUTPUT_OPTIONS         =

        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.

       IF JOB_OUTPUT_INFO-SPOOLIDS IS NOT INITIAL.

         LOOP AT JOB_OUTPUT_INFO-SPOOLIDS INTO LV_SPOOL.

           EXIT.

         ENDLOOP.

         REFRESH IT_TY_TAB_PDF.

         CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'

           EXPORTING

             SRC_SPOOLID              = LV_SPOOL

             NO_DIALOG                = ' '

           TABLES

             PDF                      = IT_TY_TAB_PDF

           EXCEPTIONS

             ERR_NO_OTF_SPOOLJOB      = 1

             ERR_NO_SPOOLJOB          = 2

             ERR_NO_PERMISSION        = 3

             ERR_CONV_NOT_POSSIBLE    = 4

             ERR_BAD_DSTDEVICE        = 5

             USER_CANCELLED           = 6

             ERR_SPOOLERROR           = 7

             ERR_TEMSEERROR           = 8

             ERR_BTCJOB_OPEN_FAILED   = 9

             ERR_BTCJOB_SUBMIT_FAILED = 10

             ERR_BTCJOB_CLOSE_FAILED  = 11

             OTHERS                   = 12.

         IF SY-SUBRC <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

         ENDIF.

         APPEND LINES OF IT_TY_TAB_PDF TO IT_TY_TAB_PDF1..

 

Please guys help on this issue.its urgent.


Viewing all articles
Browse latest Browse all 3125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>