Skip to main content

Code page error replacement

Old Code:

*      TRANSLATE it_ziqmel-text
*                FROM CODE PAGE cpage_ibm
*                TO CODE PAGE cpage_sap.


*****************************************************
Replacement Code:

DATA: codepage TYPE REF TO cl_abap_conv_obj.
DATA: v_output TYPE string.
DATA: v_oldcode TYPE tcp00-cpcodepage VALUE 1103.


CREATE OBJECT codepage
  EXPORTING
    incode           = v_oldcode
    outcode          = cpage_sap
*    miss             = '.'
*    broken           = '.'
*    fill             = ' '
*    filter           = ' '
*    use_f1           = 'X'
*    ctrlcode         = 't'
*    sapownch         = 't'
*    substc           = '00035'
*    drop             = 'm'
  EXCEPTIONS
    invalid_codepage = 1
    internal_error   = 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.

CALL METHOD codepage->convert
  EXPORTING
    inbuff             = it_ziqmel-text
    inbufflg           = 0
    outbufflg          = 0
  IMPORTING
    outbuff            = v_output
*    inused             =
*    outused            =
*    substed            =
*    input_ends_in_char =
*    outbuff_too_short  =
*  EXCEPTIONS
*    internal_error     = 1
*    others             = 2
        .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
 it_ziqmel-text = v_output.
ENDIF.


Comments

Popular posts from this blog

Replacement of obsolete F.M. POPUP_TO_CONFIRM_STEP

The obsolete Function Module :     CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'        EXPORTING *          DEFAULTOPTION  = 'Y'             textline1      = text-003 *          TEXTLINE2      = ' '                titel          = 'Mengenbereitstellung' *          START_COLUMN   = 25 *          START_ROW      = 6             cancel_display = ' '        IMPORTING          ...

SPDD and SPAU in Upgrade projects

In upgradiation project SPDD and SPAU Aare the main transactions. Upgradiation project are like 1.Technical Upgrade 2.Functional Upgrade In technical project process steps like 1.System preparation and stack level patch upgrade – Basis Team 2.SPDD Phase – ABAP and Functionals 3.Up gradation of the system – Basis Team 4.SPAU Phase – ABAP and Functionals 5.DBACOCKPIT for indexing – ABAP TEAM 6.Issue resolution and error tracking – ABAP and Functionals 7.Zprograms corrections – obsolete function modules and objects In SPDD Phase This transaction code SPDD is the core step in an upgrade project. The system compares all the dictionary objects – data elements, database tables and structures of the latest system (say ECC) with the previous or the old system (Say 4.6c). These all elements are present under two nodes – with modification assistant and without modification assistant. Objects present under with modification assistant have the mo...