Table is not Unicode Convertible

hello,
i am getting error the type of tha database table or work area or internal table are not unicode convertible. please help me.
REPORT ZEXCISE_INVOICE_RTNS
LINE-COUNT 100
MESSAGE-ID 8I.
*INCLUDES
INCLUDE RVADTABL.
*TABLES
TABLES : T001, "Company Codes
T005, "Countries
LFA1, "Vendor Master (General Section)
EKKO, "Purchasing Document Header
EKPO, "Purchasing Document Item
MKPF. "Header: Material Document
*Excise Tables
TABLES : J_1IEXCHDR, "Excise invoice header detail
J_1IEXCDTL, "Excise invoice line item details
J_1IEXCDEF, "Tax default informations
J_1IMOVEND. "Vendor Master Excise Additional Data
*INTERNAL TABLES AND STRUCTURES
DATA : BEGIN OF TJ_1IEXCDTL OCCURS 0.
INCLUDE STRUCTURE ZJ1IEXCDTL.
DATA : END OF TJ_1IEXCDTL.
DATA : i_mseg like mseg occurs 0 with header line.
DATA : TJ_1IEXCDTL_Temp like TJ_1IEXCDTL occurs 0 with header line.
DATA : begin of it_ekpo occurs 0,
ebeln like ekko-ebeln, "PO Number
ebelp like ekpo-ebelp, "Line item number
meins like ekpo-meins, "Unit of measurement
mwskz like ekpo-mwskz, "Tax on Sales/Purchases Code
netpr like ekpo-netpr, "unit price
end of it_ekpo.
DATA : begin of it_a003 occurs 0,
knumh like a003-knumh, "Condition record number
kappl like a003-kappl, "Application
kschl like a003-kschl, "Condition type
mwskz like a003-mwskz, "Tax on Sales/Purchases Code
end of it_a003.
DATA : begin of it_konp occurs 0,
knumh like konp-knumh, "Condition record number
kappl like konp-kappl, "Application
kschl like konp-kschl, "Condition type
mwsk1 like konp-mwsk1, "Tax on Sales/Purchases Code
kbetr like konp-kbetr, "Rate/unit
end of it_konp.
DATA : begin of it_konv occurs 0,
knumv like konv-knumv, "Number of the document condition
kposn like konv-kposn, "Condition item number
kschl like konv-kschl, "Condition type
krech like konv-krech, "Calculation type for condition
kbetr like konv-kbetr, "Rate (condition amount or percentage)
kwert like konv-kwert, "Condition value
end of it_konv.
*VARIABLES
DATA: RETCODE LIKE SY-SUBRC. "Returncode
DATA: REPEAT(1) TYPE C.
DATA: XSCREEN(1) TYPE C. "Output on printer or screen
DATA: G_FM_NAME TYPE RS38L_FNAM,
V_SUBTOTAL LIKE J_1IEXCDTL-EXBAS.
DATA : V_CHID(45) TYPE C,
V_DESC1(30) TYPE C,
V_DESC2(30) TYPE C,
V_DESC3(30) TYPE C.
DATA : v_document(15) TYPE C.
SELECTION SCREEN
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_mblnr like mkpf-mblnr OBLIGATORY,
P_time like SY-UZEIT.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION
start-of-selection.
PERFORM GET_DATA.
CHECK RETCODE = 0.
Get the form name
PERFORM GET_FORM_NAME.
Call the form
PERFORM CALL_FORM.
End-Of-Selection
end-of-selection.
*FORM GET DATA
FORM GET_DATA.
SELECT single * from mkpf where mblnr = P_MBLNR.
IF sy-subrc <> 0.
RETCODE = 4.
message i078(8I).
exit.
ELSE.
PERFORM GET_EXCISE_INVOICE.
if retcode <> 0.
MESSAGE i301(8I).
else.
PERFORM GET_EXCISE_DETAILS.
endif.
ENDIF.
ENDFORM. "GET_DATA
*FORM GET EXCISE DETAILS
FORM GET_EXCISE_DETAILS.
DATA: KAWRT LIKE KOMV-KAWRT. "Excise Duty - Base Amount
SELECT * FROM J_1IEXCDTL INTO TABLE TJ_1IEXCDTL
WHERE TRNTYP = J_1IEXCHDR-TRNTYP
AND DOCYR = J_1IEXCHDR-DOCYR
AND DOCNO = J_1IEXCHDR-DOCNO.

The structures do NOT have to be the same for a CORRESPONDING FIELDS. This works in a test program I have:
==================
DATA: itab TYPE STANDARD TABLE OF istruct.
SELECT *
FROM ztab
INTO CORRESPONDING FIELDS OF TABLE itab
WHERE vkorg = 'XYZ'
AND zyear = '2007'
AND werks = '00A'.
===================
where "istruct" is the same as the DB table definition plus two additional columns and minus MANDT.
However, in another program I get the "not Unicode compatible" error when I try to activate it.
Why does it work in one case and not the other? Is it some program setting?

Similar Messages

  • The type of the database table and work area are not Unicode convertible

    ***Data declaration
    TYPES : BEGIN OF t_zle_lagerplanung,
                       SEl, "stores which row user has selected
                       kdauf TYPE zle_lagerplanung-kdauf,
                       kdpos TYPE zle_lagerplanung-kdpos,
                       etenr TYPE zle_lagerplanung-etenr,
                       papiermaschine TYPE zle_lagerplanung-papiermaschine,
                       runnr TYPE zle_lagerplanung-runnr,
                       prio TYPE zle_lagerplanung-prio,
                       werk TYPE zle_lagerplanung-werk,
                       durchmesser TYPE zle_lagerplanung-durchmesser,
                       breite TYPE zle_lagerplanung-breite,
                       anzle TYPE zle_lagerplanung-anzle,
                       lgpla TYPE zle_lagerplanung-lgpla,
                       lgtyp TYPE zle_lagerplanung-lgtyp,
                       art TYPE zle_lagerplanung-art,
                       anzhoehe TYPE zle_lagerplanung-anzle,
                       fa TYPE zle_lagerplanung-fa,
    END OF t_zle_lagerplanung.
    DATA : it_zle_lagerplanung TYPE STANDARD TABLE OF t_zle_lagerplanung INITIAL SIZE 0,
                wa_zle_lagerplanung TYPE t_zle_lagerplanung.
    Here I am getting the data in internal table by using thiis select statement.
    SELECT kdauf kdpos etenr papiermaschine runnr prio werk durchmesser breite
                  anzle lgpla lgtyp art anzhoehe fa
    FROM    zle_lagerplanung INTO CORRESPONDING FIELDS OF TABLE it_zle_lagerplanung
    WHERE  kdauf IN s_kdauf
    AND       KDPOS IN s_kdpos
    AND      werk = p_werks.
    But while updating the particular field in zle_lagerplanung using this statement
    UPDATE zle_lagerplanung from table it_zle_lagerplanung.
    it is giving syntax error
    "The type of the database table and work area (or internal table)
    "IT_ZLE_LAGERPLANUNG" are not Unicode convertible. "
    Could any one help me out how to resolve this problem....
    Thanks in advance

    Dear Shayamal,
    XXX....are not Unicode convertible
    This  error comes while inserting or updating database and the fields are not matching between  data base table and structure .
    Check you fields of data base table and  "zle_lagerplanung" and struture "it_zle_lagerplanung" . There fields must match.
    thanks and regrds,
    Anup Banerjee

  • Not unicode convertible

    HI,
    INSERT ZBALTAB FROM TABLE ITAB_HYP.
    I get an error for the above line.
    ITAB_HYP are not unicode convertible.
    regards
    Bala

    The structures do NOT have to be the same for a CORRESPONDING FIELDS.  This works in a test program I have: 
    ==================
    DATA: itab  TYPE STANDARD TABLE OF istruct.
    SELECT *
      FROM ztab
      INTO CORRESPONDING FIELDS OF TABLE itab
      WHERE vkorg = 'XYZ'
        AND zyear = '2007'
        AND werks = '00A'.
    ===================
    where "istruct" is the same as the DB table definition but with two additional columns and without MANDT. 
    However, in another program I get the "not Unicode compatible" error when I try to activate it. 
    Why does it work in one case and not the other?  Is it some program setting?

  • What means "IT_AUXPOS are not unicode-convertible??

    Hi,
    I have to copy some information in a Ztable. I have declared an internal table but
    I have an strange error.
    The type of the database table and work area (or internal table) "IT_AUXPOS" are not Unicode-convertible...
    my table is:
    TYPES: BEGIN OF S_AUXPOS, "ZPEDIDOSPOS
           MANDT1 TYPE MANDT,
           PEDIDO1(8) TYPE C,
           POSICION(6) TYPE N,
           CODIGO_MATERIAL TYPE MARA-MATNR,
           DESCRIPCION TYPE MARAV-MAKTX,
           CANTIDAD(19) TYPE C,
           UNIDAD TYPE UNIT,
           END OF S_AUXPOS.
    data: IT_AUXPOS TYPE STANDARD TABLE OF S_AUXPOS,
          WA_AUXPOS LIKE LINE OF IT_AUXPOS.
    LOOP AT IT_FICHERO INTO WA_FICHERO.
    WA_AUXPOS-PEDIDO1 = WA_FICHERO-NUM_PED. "Num pedido
      WA_AUXPOS-POSICION = POSICION.         "Posicion del pedido
      WA_AUXPOS-DESCRIPCION = WA_FICHERO-MAKTX. "Descripcion
      WA_AUXPOS-CANTIDAD = WA_FICHERO-CANTIDAD. "Cantidad
      WA_AUXPOS-UNIDAD = WA_FICHERO-UNIDAD.   "Unidades de medida
      INSERT WA_AUXPOS INTO TABLE IT_AUXPOS.
    ENDLOOP.
    INSERT ZTABLE FROM TABLE IT_AUXPOS.
    THANKS A LOT

    THE STRUCTURE OF IT_AUXPOS AND YOUR ZTABLE IS NOT MATCHING....
    ELSE PASS THE VALUE FOR MANDT1 FIELD ALSO IN THE STRUCTURE....
    TYPES: BEGIN OF S_AUXPOS, "ZPEDIDOSPOS
           MANDT1 TYPE MANDT,
           PEDIDO1(8) TYPE C,
           POSICION(6) TYPE N,
           CODIGO_MATERIAL TYPE MARA-MATNR,
           DESCRIPCION TYPE MARAV-MAKTX,
           CANTIDAD(19) TYPE C,
           UNIDAD TYPE UNIT,
           END OF S_AUXPOS.
    data: IT_AUXPOS TYPE STANDARD TABLE OF S_AUXPOS,
          WA_AUXPOS LIKE LINE OF IT_AUXPOS.
    LOOP AT IT_FICHERO INTO WA_FICHERO.
    WA_AUXPOS-MANDT1 = '001'.
    WA_AUXPOS-PEDIDO1 = WA_FICHERO-NUM_PED. "Num pedido
      WA_AUXPOS-POSICION = POSICION.         "Posicion del pedido
      WA_AUXPOS-DESCRIPCION = WA_FICHERO-MAKTX. "Descripcion
      WA_AUXPOS-CANTIDAD = WA_FICHERO-CANTIDAD. "Cantidad
      WA_AUXPOS-UNIDAD = WA_FICHERO-UNIDAD.   "Unidades de medida
      INSERT WA_AUXPOS INTO TABLE IT_AUXPOS.
    ENDLOOP.
    INSERT ZTABLE FROM TABLE IT_AUXPOS
    Message was edited by:
            Muthurajan Ramkumar

  • "DUMMY" are not Unicode convertible. ..

    hi experts,
    data dummy(2256).
    select single * into dummy  from tvsd where stgku in in_wldrg.
    while we executing i am getting this error as
    error : "DUMMY" are not Unicode convertible. ..
    how to rectify this.
    regards,
    praveen

    Hi,
    DATA : stvsd TYPE tvsd.
    DATA : dummy(2256).
    SELECT SINGLE * INTO stvsd FROM tvsd where stgku in in_wldrg.
    dummy = stvsd.
    Try like.
    Thanks,
    Durai.V

  • Field catalog & internal table are not mutually convertible

    Hi friends,
              please help me for this problem, actually i m trying to display three alv reports from the three buttond i have given on my first basic report. its working fine till first & getting the data into the internal table for the second also. but when coming to the field catalog for the second report its giving syntax error as my "field catalog and internal table are not mutually convertible'".i have tried by giving different fieldcatalog also but its giving the same problem.please help for this & try to give an example if u can. Thanks a lot.
    Regards
    Pankaj

    This is my code :
    TABLES: PLAF,
            MARA,
            MAKT,
            AFPO,
            T023T,
            VSAUFK,
            T006A,
            MBEW,
            ZCDR_D.
    Type Pools for ALV *************************
    TYPE-POOLS: SLIS,
                ABAP.
               KKBLO.
    DATA DECLARATION.  ****************************
    DATA: FLAG TYPE I,
          FLAG1 TYPE I,
          FLAG2 TYPE I,
          FLAG3 TYPE I,
          FLAG4 TYPE I,
          FLAG5 TYPE I.
    ********Declaration for field catalog
    DATA: LAYOUT TYPE SLIS_LAYOUT_ALV,
          IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
        IT_SORT TYPE SLIS_T_SORTINFO_ALV,
        WA_SORT TYPE SLIS_SORTINFO_ALV,
        WA_SUBT LIKE SLIS_EV_SUBTOTAL_TEXT,
        IT_EVENTS TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
         WITH HEADER LINE INITIAL SIZE 0,
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
          LAYOUT1 TYPE SLIS_LAYOUT_ALV,
          IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
        IT_SORT TYPE SLIS_T_SORTINFO_ALV,
        WA_SORT TYPE SLIS_SORTINFO_ALV,
        WA_SUBT LIKE SLIS_EV_SUBTOTAL_TEXT,
        IT_EVENTS TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
         WITH HEADER LINE INITIAL SIZE 0,
          WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV,
          LAYOUT2 TYPE SLIS_LAYOUT_ALV,
          IT_FIELDCAT2 TYPE SLIS_T_FIELDCAT_ALV,
        IT_SORT TYPE SLIS_T_SORTINFO_ALV,
        WA_SORT TYPE SLIS_SORTINFO_ALV,
        WA_SUBT LIKE SLIS_EV_SUBTOTAL_TEXT,
        IT_EVENTS TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
         WITH HEADER LINE INITIAL SIZE 0,
          WA_FIELDCAT2 TYPE SLIS_FIELDCAT_ALV,
          LAYOUT3 TYPE SLIS_LAYOUT_ALV,
          IT_FIELDCAT3 TYPE SLIS_T_FIELDCAT_ALV,
        IT_SORT TYPE SLIS_T_SORTINFO_ALV,
        WA_SORT TYPE SLIS_SORTINFO_ALV,
        WA_SUBT LIKE SLIS_EV_SUBTOTAL_TEXT,
        IT_EVENTS TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
         WITH HEADER LINE INITIAL SIZE 0,
          WA_FIELDCAT3 TYPE SLIS_FIELDCAT_ALV.
    TYPES DECLARATION.  ****************************
    TYPES: BEGIN OF TY_MARA,
           MATNR LIKE MARA-MATNR,                  " Material Number
           MATKL LIKE MARA-MATKL,                  " Material Group
           END OF TY_MARA.
    TYPES: BEGIN OF TY_PLAF,
           PERTR LIKE PLAF-PERTR,                  " Date
           PLNUM LIKE PLAF-PLNUM,                  " Planned Order Number
           MATNR LIKE PLAF-MATNR,                  " Material number
           PLWRK LIKE PLAF-PLWRK,                  " Plant
           KDAUF LIKE PLAF-KDAUF,                  " Sales Order Number
           KDPOS LIKE PLAF-KDPOS,                  " SO Line Item
           END OF TY_PLAF.
    TYPES: BEGIN OF TY_MAKT,
           MATNR LIKE PLAF-MATNR,                  " Material Number
           MAKTX LIKE MAKT-MAKTX,                  " Material Description
           END OF TY_MAKT.
    TYPES: BEGIN OF TY_AFPO,
           PLNUM LIKE AFPO-PLNUM,                  " Planned Order Number
           MATNR LIKE AFPO-MATNR,                  " Material Number
           KDAUF LIKE AFPO-KDAUF,                  " Sales Order Number
           KDPOS LIKE AFPO-KDPOS,                  " SO Line Item
           AUFNR LIKE AFPO-AUFNR,                  " Production Order
           STRMP LIKE AFPO-STRMP,
           DWERK LIKE AFPO-DWERK,
           END OF TY_AFPO.
    TYPES: BEGIN OF TY_ZCDR_D,
           MANDT LIKE ZCDR_D-MANDT,                " Client
           CBNO LIKE ZCDR_D-CBNO,                  " Customs Book Number
           PLNUM LIKE ZCDR_D-PLNUM,                " Planned Order Number
           MATNR LIKE ZCDR_D-MATNR,                " Material Number
           MAKTX LIKE ZCDR_D-MAKTX,                " Material Description
           KDAUF like ZCDR_D-KDAUF,                " Sales Order Number
           KDPOS like ZCDR_D-KDPOS,                " SO Line Item
           AUFNR LIKE ZCDR_D-AUFNR,                " Production Order
           END OF TY_ZCDR_D.
    TYPES: BEGIN OF TY_VSAUFK,
           INACT LIKE VSAUFK-INACT,                " Status Indicator
           END OF TY_VSAUFK.
    TYPES: BEGIN OF TY_PLAF_MAKT,
           CBNO LIKE ZCDR_D-CBNO,                  " Customs Book Number
           PLNUM LIKE PLAF-PLNUM,                  " Planned Order Number
           CHK TYPE C,                             " Check Box
           MATNR LIKE PLAF-MATNR,                  " Material Number
           MAKTX LIKE MAKT-MAKTX,                  " Material Description
           KDAUF LIKE PLAF-KDAUF,                  " Sales Order Number
           KDPOS LIKE PLAF-KDPOS,                  " SO Line Item
           AUFNR LIKE AFPO-AUFNR,                  " Production Order
           END OF TY_PLAF_MAKT.
    TYPES: BEGIN OF TY_HELP_ITEM,
           CBNO TYPE ZCDR_D-CBNO,                  " Customs Book Number
           PLNUM LIKE ZCDR_D-PLNUM,                " Planned Order Number
           MATNR LIKE ZCDR_D-MATNR,                " Material Number
           MAKTX LIKE ZCDR_D-MAKTX,                " Material Description
           KDAUF LIKE ZCDR_D-KDAUF,                " Sales Order Number
           KDPOS LIKE ZCDR_D-KDPOS,                " SO Line Item
           AUFNR LIKE ZCDR_D-AUFNR,                " Production Order
           END OF TY_HELP_ITEM.
    WORK AREA ******************************
    DATA: WA_MARA TYPE TY_MARA,
          WA_PLAF TYPE TY_PLAF,
          WA_MAKT TYPE TY_MAKT,
          WA_AFPO TYPE TY_AFPO,
          WA_ZCDR_D TYPE TY_ZCDR_D,
          WA_VSAUFK TYPE TY_VSAUFK,
          WA_PLAF_MAKT TYPE TY_PLAF_MAKT,
          WA_HELP_ITEM TYPE TY_HELP_ITEM.
    INTERNAL TABLES ****************************
    DATA: IT_MARA TYPE TABLE OF TY_MARA,
          IT_PLAF TYPE TABLE OF TY_PLAF,
          IT_MAKT TYPE TABLE OF TY_MAKT,
          IT_AFPO TYPE TABLE OF TY_AFPO,
          IT_ZCDR_D TYPE TABLE OF TY_ZCDR_D,
          IT_VSAUFK TYPE TABLE OF TY_VSAUFK,
          IT_PLAF_MAKT TYPE TABLE OF TY_PLAF_MAKT,
          IT_HELP_ITEM TYPE TABLE OF TY_HELP_ITEM.
    *it_events TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
    *WITH HEADER LINE INITIAL SIZE 0.
    TYPES: BEGIN OF TY_BOM,
              MATMK LIKE STPOX-MATMK,
              MTNRV LIKE ZCDR_D-MATNR,
              IDNRK LIKE STPOX-IDNRK,
              MNGLG LIKE STPOX-MNGLG,
              MMEIN LIKE STPOX-MMEIN,
             VPRSV LIKE STPOX-VPRSV,
              UPRICE LIKE MBEW-STPRS,
              TPRICE LIKE MBEW-STPRS,
            END OF TY_BOM,
            BEGIN OF TY_QUAN,
              MATMK LIKE STPOX-MATMK,
              MTNRV LIKE ZCDR_D-MATNR,
              IDNRK LIKE STPOX-IDNRK,
              MNGLG LIKE STPOX-MNGLG,
              MMEIN LIKE STPOX-MMEIN,
              UPRICE LIKE MBEW-STPRS,
              TPRICE LIKE MBEW-STPRS,
            END OF TY_QUAN,
            BEGIN OF TY_T023T,
              MATKL LIKE T023T-MATKL,
              WGBEZ LIKE T023T-WGBEZ,
            END OF TY_T023T,
            BEGIN OF TY_T006A,
              MMEIN LIKE T006A-MSEHI,
              MSEHT LIKE T006A-MSEHT,
            END OF TY_T006A,
            BEGIN OF TY_IMP_FINAL,
              SNO TYPE SY-INDEX,
              HSCODE LIKE ZHSCODE-HSCODE,
              WGBEZ TYPE T023T-WGBEZ,
              SPEC(20) TYPE C,
              MNGLG LIKE STPOX-MNGLG,
              MSEHT LIKE T006A-MSEHT,
              CNTRY(13) TYPE C,
              UPRICE TYPE P LENGTH 16 DECIMALS 2,
              TPRICE TYPE P LENGTH 16 DECIMALS 2,
              CURRCODE TYPE C LENGTH 5,
            END OF TY_IMP_FINAL,
            BEGIN OF TY_MBEW,
              MATNR LIKE MBEW-MATNR,
              VPRSV LIKE MBEW-VPRSV,
              STPRS LIKE MBEW-STPRS,
              VERPR LIKE MBEW-VERPR,
            END OF TY_MBEW.
      DATA: WA_BOM TYPE TY_BOM,
            WA_QUAN TYPE TY_QUAN,
            WA_IMP_FINAL TYPE TY_IMP_FINAL,
            WA_T023T TYPE TY_T023T,
            WA_T006A TYPE TY_T006A,
            WA_MBEW TYPE TY_MBEW.
      DATA: IT_BOM TYPE TABLE OF TY_BOM,
            IT_QUAN TYPE TABLE OF TY_QUAN,
            IT_IMP_FINAL TYPE TABLE OF TY_IMP_FINAL,
            IT_MBEW TYPE TABLE OF TY_MBEW.
    SELECTION-SCREEN **************************
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : PR_CBNO LIKE ZCDR_D-CBNO OBLIGATORY.      "Customs Book number
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION  **************************
    INITIALIZATION.
    **PERFORM CLEAR_DATA.
    **CLEAR: wa_layout.
    *PERFORM set_events USING it_events[].
    SELECT OPTION ****************************************
    SELECTION-SCREEN : BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-002.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS:
            SO_PERTR for PLAF-PERTR,              "----
    Date
            SO_MATNR for MARA-MATNR,              "----
    Material
            SO_MATKL for MARA-MATKL,              "----
    Material Group
            SO_PLWRK for PLAF-PLWRK OBLIGATORY,   "----
    Plant
            SO_KDAUF for PLAF-KDAUF.              "----
    Sales Order
    SELECTION-SCREEN : END OF BLOCK BLK.
    SELECTION SCREEN F4 HELP  *********************
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PR_CBNO.
    DATA: DYNFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
          DYNFIELDS-FIELDNAME = PR_CBNO.
          APPEND DYNFIELDS.
         CALL FUNCTION 'DYNP_VALUES_READ'
              EXPORTING
                    DYNAME                               = SY-CPROG
                    DYNUMB                               = SY-DYNNR
                    TRANSLATE_TO_UPPER                   = 'X'
                  REQUEST                              = ' '
                  PERFORM_CONVERSION_EXITS             = ' '
                  PERFORM_INPUT_CONVERSION             = ' '
                  DETERMINE_LOOP_INDEX                 = ' '
                  START_SEARCH_IN_CURRENT_SCREEN       = ' '
                  START_SEARCH_IN_MAIN_SCREEN          = ' '
                  START_SEARCH_IN_STACKED_SCREEN       = ' '
                  START_SEARCH_ON_SCR_STACKPOS         = ' '
                  SEARCH_OWN_SUBSCREENS_FIRST          = ' '
                  SEARCHPATH_OF_SUBSCREEN_AREAS        = ' '
              TABLES
                    DYNPFIELDS                           = DYNFIELDS
              EXCEPTIONS
                    INVALID_ABAPWORKAREA                 = 1
                    INVALID_DYNPROFIELD                  = 2
                    INVALID_DYNPRONAME                   = 3
                    INVALID_DYNPRONUMMER                 = 4
                    INVALID_REQUEST                      = 5
                    NO_FIELDDESCRIPTION                  = 6
                    INVALID_PARAMETER                    = 7
                    UNDEFIND_ERROR                       = 8
                    DOUBLE_CONVERSION                    = 9
                    STEPL_NOT_FOUND                      = 10
                     OTHERS                               = 11
            IF SY-SUBRC <> 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              ENDIF.
         READ TABLE DYNFIELDS WITH KEY FIELDNAME = 'CBNO'.
            PR_CBNO = DYNFIELDS-FIELDVALUE.
            SELECT
                CBNO
                PLNUM
                MATNR
                MAKTX
                KDAUF
                KDPOS
                AUFNR
                FROM ZCDR_D
                INTO TABLE IT_HELP_ITEM .
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
        DDIC_STRUCTURE         = ' '
          RETFIELD               = 'CBNO'
        PVALKEY                = ' '
         DYNPPROG               = SY-CPROG
         DYNPNR                 = SY-DYNNR
         DYNPROFIELD            = 'PR_CBNO'
        STEPL                  = 0
        WINDOW_TITLE           =
        VALUE                  = ' '
         VALUE_ORG              = 'S'
        MULTIPLE_CHOICE        = ' '
        DISPLAY                = ' '
        CALLBACK_PROGRAM       = ' '
        CALLBACK_FORM          = ' '
        MARK_TAB               =
      IMPORTING
        USER_RESET             =
        TABLES
          VALUE_TAB              = IT_HELP_ITEM
        FIELD_TAB              =
        RETURN_TAB             =
        DYNPFLD_MAPPING        =
      EXCEPTIONS
        PARAMETER_ERROR        = 1
        NO_VALUES_FOUND        = 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.
    ***********************SELECTION SCREEN VALIDATION.*******************
    AT SELECTION-SCREEN ON PR_CBNO.
      SELECT SINGLE *
      FROM ZCDR_D
      WHERE CBNO = PR_CBNO.
      IF SY-SUBRC EQ 0.
        MESSAGE E000(ZCBR) WITH PR_CBNO.
      ENDIF.
    AT SELECTION-SCREEN ON SO_PERTR.
      IF SO_PERTR IS NOT INITIAL.
        SELECT SINGLE *
        FROM PLAF
        WHERE PERTR IN SO_PERTR.
        IF SY-SUBRC NE 0.
          MESSAGE W001(ZCBR) WITH SO_PERTR-LOW.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON SO_MATNR.
      IF SO_MATNR IS NOT INITIAL.
        SELECT SINGLE *
          FROM MARA
          WHERE MATNR IN SO_MATNR.
        IF SY-SUBRC NE 0.
          MESSAGE W002(ZCBR) WITH SO_MATNR-LOW.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON SO_MATKL.
      IF SO_MATKL IS NOT INITIAL.
        SELECT SINGLE *
          FROM MARA
          WHERE MATKL IN SO_MATKL.
        IF SY-SUBRC NE 0.
          MESSAGE W003(ZCBR) WITH SO_MATKL-LOW.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON SO_PLWRK.
      IF SO_PLWRK IS NOT INITIAL.
        SELECT SINGLE * FROM PLAF
          WHERE PLWRK IN SO_PLWRK.
        IF SY-SUBRC NE 0.
          MESSAGE W004(ZCBR) WITH SO_PLWRK-LOW.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON SO_KDAUF.
      IF SO_KDAUF IS NOT INITIAL.
        SELECT SINGLE * FROM PLAF
        WHERE KDAUF IN SO_KDAUF.
        IF SY-SUBRC NE 0.
          MESSAGE W005(ZCBR) WITH SO_KDAUF-LOW.
        ENDIF.
      ENDIF.
    *********************START-OF-SELECTION.*****************************
    START-OF-SELECTION.
      IF so_pertr IS NOT INITIAL.
        FLAG = 1.
      ENDIF.
      IF SO_MATNR IS NOT INITIAL.
        FLAG1 = 1.
      ENDIF.
      IF so_matkl IS NOT INITIAL.
        FLAG2 = 1.
      ENDIF.
      IF so_plwrk IS NOT INITIAL.
        FLAG3 = 1.
      ENDIF.
      IF so_kdauf IS NOT INITIAL.
        FLAG4 = 1.
      ENDIF.
       Select data into its internal table from different database tables
      SELECT
        MATNR
        MATKL
       MTART
        INTO CORRESPONDING FIELDS OF TABLE IT_MARA
        FROM MARA
        WHERE MTART = 'ZFGS'.
      IF FLAG2 NE 0.
        DELETE IT_MARA WHERE
        NOT ( MATKL IN SO_MATKL )
      ENDIF.
      IF FLAG1 NE 0.
        DELETE IT_MARA WHERE
        NOT ( MATNR IN SO_MATNR )
      ENDIF.
      SELECT
         PERTR
         PLNUM
         MATNR
         PLWRK
         KDAUF
         KDPOS
         FROM PLAF
         INTO CORRESPONDING FIELDS OF TABLE IT_PLAF
         FOR ALL ENTRIES IN IT_MARA
         WHERE PLWRK IN SO_PLWRK
         AND MATNR = IT_MARA-MATNR.
        SELECT
          MATNR
          PLNUM
          AUFNR
          KDAUF
          KDPOS
          STRMP
          DWERK
        INACT
          FROM AFPO
          INTO CORRESPONDING FIELDS OF TABLE IT_AFPO
          FOR ALL ENTRIES IN IT_MARA
          WHERE DWERK IN SO_PLWRK
          AND MATNR = IT_MARA-MATNR.
         WHERE MATNR = IT_MARA-MATNR
         AND STRMP = IT_PLAF-PERTR
         AND KDAUF = IT_PLAF-KDAUF
         AND DWERK = IT_PLAF-PLWRK.
        End of Data selection
       Keep only those records which the user wants from his selection screen
      IF FLAG NE 0.
        DELETE IT_PLAF WHERE
        NOT ( PERTR IN SO_PERTR )
        DELETE IT_AFPO WHERE
        NOT ( STRMP IN SO_PERTR )
      ENDIF.
      IF FLAG3 NE 0.
        DELETE IT_PLAF WHERE
        NOT ( PLWRK IN SO_PLWRK )
        DELETE IT_AFPO WHERE
        NOT ( DWERK IN SO_PLWRK )
      ENDIF.
      IF FLAG4 NE 0.
        DELETE IT_PLAF WHERE
        NOT ( KDAUF IN SO_KDAUF )
        DELETE IT_AFPO WHERE
        NOT ( KDAUF IN SO_KDAUF )
      ENDIF.
        SELECT
         MATNR
         MAKTX
         FROM MAKT
         INTO CORRESPONDING FIELDS OF TABLE IT_MAKT
         FOR ALL ENTRIES IN IT_PLAF
         WHERE MATNR = IT_PLAF-MATNR
         AND SPRAS = 'EN'.
      SELECT
        FROM ZCDR_D
        INTO TABLE IT_ZCDR_D.
              Put data into final internal table from different internal tables
    LOOP AT IT_MARA INTO WA_MARA.
      LOOP AT IT_PLAF INTO WA_PLAF WHERE MATNR = WA_MARA-MATNR.
        READ TABLE IT_ZCDR_D
        INTO WA_ZCDR_D
        WITH KEY PLNUM = WA_PLAF-PLNUM.
        IF SY-SUBRC <> 0.
          MOVE WA_PLAF-PLNUM TO WA_PLAF_MAKT-PLNUM.
          MOVE WA_PLAF-MATNR TO WA_PLAF_MAKT-MATNR.
          MOVE WA_PLAF-KDAUF TO WA_PLAF_MAKT-KDAUF.
          MOVE WA_PLAF-KDPOS TO WA_PLAF_MAKT-KDPOS.
          READ TABLE IT_AFPO INTO WA_AFPO WITH KEY PLNUM = WA_PLAF-PLNUM.
              MOVE WA_AFPO-AUFNR TO WA_PLAF_MAKT-AUFNR.
           SELECT
             SINGLE * FROM VSAUFK
             INTO TABLE IT_VSAUFK
             WHERE AUFNR = WA_AFPO-AUFNR
             AND STAT = 'I0012'.
           IF SY-SUBRC <> 0.
             MOVE WA_AFPO-AUFNR TO IT_PLAF_MAKT-AUFNR.
           ELSE.
             CHECK IT_VSAUFK-INACT = 'X'.
             MOVE WA_AFPO-AUFNR TO IT_PLAF_MAKT-AUFNR.
           ENDIF.
        ENDLOOP.
             READ TABLE IT_MAKT
                INTO WA_MAKT
                WITH KEY MATNR = WA_MARA-MATNR.
                MOVE WA_MAKT-MAKTX TO WA_PLAF_MAKT-MAKTX.
                APPEND WA_PLAF_MAKT TO IT_PLAF_MAKT.
                CLEAR WA_PLAF_MAKT.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
    LOOP AT IT_PLAF_MAKT .
    LOOP AT IT_MARA INTO WA_MARA.
    LOOP AT IT_PLAF INTO WA_PLAF WHERE MATNR = WA_MARA-MATNR.
       LOOP AT IT_AFPO INTO WA_AFPO WHERE MATNR = WA_MARA-MATNR.
        READ TABLE IT_ZCDR_D
        INTO WA_ZCDR_D
        WITH KEY PLNUM = WA_AFPO-PLNUM.
        IF SY-SUBRC <> 0.
           LOOP AT IT_AFPO INTO WA_AFPO.
             WHERE MATNR IN SO_MATNR
             AND STRMP = SO_PERTR
             AND PLNUM IN SO_PLNUM
             AND KDAUF IN SO_-KDAUF
             AND MATKL IN SO_MATKL.
            SELECT
              SINGLE INACT FROM VSAUFK
              INTO WA_VSAUFK
              WHERE AUFNR = WA_AFPO-AUFNR
              AND STAT = 'I0012'.
            IF SY-SUBRC <> 0.
              WA_PLAF_MAKT-PLNUM = WA_AFPO-PLNUM.
              WA_PLAF_MAKT-KDAUF = WA_AFPO-KDAUF.
              WA_PLAF_MAKT-KDPOS = WA_AFPO-KDPOS.
              WA_PLAF_MAKT-MATNR = WA_AFPO-MATNR.
              WA_PLAF_MAKT-AUFNR = WA_AFPO-AUFNR.
              READ TABLE IT_MAKT INTO WA_MAKT WITH KEY MATNR = WA_AFPO-MATNR.
              WA_PLAF_MAKT-MAKTX = WA_MAKT-MAKTX.
              APPEND WA_PLAF_MAKT TO IT_PLAF_MAKT .
             APPEND WA_AFPO TO IT_PLAF_MAKT.
             MOVE WA_AFPO-AUFNR TO IT_PLAF_MAKT-AUFNR.
            ELSE.
              CHECK WA_VSAUFK-INACT = 'X'.
              WA_PLAF_MAKT-PLNUM = WA_AFPO-PLNUM.
              WA_PLAF_MAKT-KDAUF = WA_AFPO-KDAUF.
              WA_PLAF_MAKT-KDPOS = WA_AFPO-KDPOS.
              WA_PLAF_MAKT-MATNR = WA_AFPO-MATNR.
              WA_PLAF_MAKT-AUFNR = WA_AFPO-AUFNR.
              READ TABLE IT_MAKT INTO WA_MAKT WITH KEY MATNR = WA_AFPO-MATNR.
              WA_PLAF_MAKT-MAKTX = WA_MAKT-MAKTX.
              APPEND WA_PLAF_MAKT TO IT_PLAF_MAKT .
             APPEND WA_AFPO TO IT_PLAF_MAKT.
             MOVE WA_AFPO-AUFNR TO IT_PLAF_MAKT-AUFNR.
            ENDIF.
            ENDIF.
        ENDLOOP.
         EXIT.
       ENDIF.
      ENDLOOP.
    ENDLOOP.
      LOOP AT IT_PLAF_MAKT INTO WA_PLAF_MAKT.
        WA_PLAF_MAKT-CBNO = PR_CBNO.
        MODIFY IT_PLAF_MAKT FROM WA_PLAF_MAKT TRANSPORTING CBNO.
      ENDLOOP.
    ENDLOOP.
      PERFORM CHANGE_CATALOG.
      PERFORM ALV_DISPLAY.
    *&      Form  CHANGE_CATALOG
          text
    FORM CHANGE_CATALOG.
       LAYOUT-ZEBRA = 'X'.
      DATA: L_POS TYPE I.
      L_POS = L_POS + 1.
      WA_FIELDCAT-col_pos   = L_POS.
      WA_FIELDCAT-SELTEXT_M = 'Planned Order Nos.'.
      WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
      WA_FIELDCAT-FIELDNAME = 'PLNUM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      L_POS = L_POS + 1.
      WA_FIELDCAT-COL_POS   = L_POS.
      WA_FIELDCAT-INPUT = 'X'.
      WA_FIELDCAT-SELTEXT_M = 'Check Box'.
      WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
      WA_FIELDCAT-CHECKBOX  = 'X'.
      WA_FIELDCAT-EDIT = abap_true.
      WA_FIELDCAT-FIELDNAME = 'CHK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      L_POS = L_POS + 1.
      WA_FIELDCAT-COL_POS   = L_POS.
      WA_FIELDCAT-OUTPUTLEN = '12'.
      WA_FIELDCAT-SELTEXT_M = 'Material'.
      WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      L_POS = L_POS + 1.
      WA_FIELDCAT-COL_POS   = L_POS.
      WA_FIELDCAT-OUTPUTLEN = '35'.
      WA_FIELDCAT-SELTEXT_M = 'Material Description'.
      WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
      WA_FIELDCAT-FIELDNAME = 'MAKTX'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      L_POS = L_POS + 1.
      WA_FIELDCAT-COL_POS   = L_POS.
      WA_FIELDCAT-SELTEXT_M = 'Sales Order Number'.
      WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
      WA_FIELDCAT-FIELDNAME = 'KDAUF'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      L_POS = L_POS + 1.
      WA_FIELDCAT-COL_POS   = L_POS.
      WA_FIELDCAT-SELTEXT_M = 'S O Line Item'.
      WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
      WA_FIELDCAT-FIELDNAME = 'KDPOS'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      L_POS = L_POS + 1.
      WA_FIELDCAT-COL_POS   = L_POS.
      WA_FIELDCAT-OUTPUTLEN = '13'.
      WA_FIELDCAT-SELTEXT_M = 'Production Order'.
      WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
      WA_FIELDCAT-FIELDNAME = 'AUFNR'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    *GS_LAYOUT-TOTALS_BEFORE_ITEMS = 'X'.
    *data : text like slis_ev_subtotal_text value 'total'.
    *gs_layout-subtotals_text = text.
    *gs_layout-totals_only = 'X'.
    gs_layout-subtotals_text = 'total'.
    endform. "  CHANGE_CATALOG
    *********************event*************************************
    *&      Form  ALV_DISPLAY
          text
    FORM ALV_DISPLAY.
    *data: LC_GLAY TYPE LVC_S_GLAY.
       LC_GLAY-EDT_CLL_CB = 'X'.
       gs_layout-colwidth_optimize = 'X'.
       gs_layout-zebra = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
                       I_INTERFACE_CHECK                 = ' '
                       I_BYPASSING_BUFFER                = ' '
                       I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = SY-REPID
         I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
                       I_CALLBACK_TOP_OF_PAGE            = ' '
                       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
                       I_CALLBACK_HTML_END_OF_LIST       = ' '
                       I_STRUCTURE_NAME                  =
                       I_BACKGROUND_ID                   = ' '
         I_GRID_TITLE                      = 'PLANNED ORDERS'
                       I_GRID_SETTINGS                   = LC_GLAY
        IS_LAYOUT                         = LAYOUT
         IT_FIELDCAT                       = IT_FIELDCAT[]
                       IT_EXCLUDING                      =
                       IT_SPECIAL_GROUPS                 =
                       IT_SORT                           =
                       IT_FILTER                         =
                       IS_SEL_HIDE                       =
                       I_DEFAULT                         = 'X'
        I_SAVE                            = 'X'
                       IS_VARIANT                        =
                       IT_EVENTS                         = IT_EVENTS[]
                       IT_EVENT_EXIT                     =
                       IS_PRINT                          =
                       IS_REPREP_ID                      =
                       I_SCREEN_START_COLUMN             = 0
                       I_SCREEN_START_LINE               = 0
                       I_SCREEN_END_COLUMN               = 0
                       I_SCREEN_END_LINE                 = 0
                       I_HTML_HEIGHT_TOP                 = 0
                       I_HTML_HEIGHT_END                 = 0
                       IT_ALV_GRAPHICS                   =
                       IT_HYPERLINK                      =
                       IT_ADD_IT_FIELDCAT                   =
                       IT_EXCEPT_QINFO                   =
                       IR_SALV_FULLSCREEN_ADAPTER        =
                     IMPORTING
                       E_EXIT_CAUSED_BY_CALLER           =
                       ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_PLAF_MAKT
                     EXCEPTIONS
                       PROGRAM_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.
      ENDIF.
    REFRESH IT_FIELDCAT[].
    ENDFORM.                    "ALV_DISPLAY
    *&      Form  USER_COMMAND
          text
         -->UCOMM      text
         -->SELFIELD   text
    FORM USER_COMMAND
      USING UCOMM LIKE SY-UCOMM
      SELFIELD TYPE SLIS_SELFIELD.
      Data: REF1 TYPE REF TO CL_GUI_ALV_GRID.
    DATA WA LIKE LINE OF IT_PLAF_MAKT.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          E_GRID = REF1.
      CALL METHOD REF1->CHECK_CHANGED_DATA.
      CASE UCOMM.
        WHEN '&BACK'.
          LEAVE TO SCREEN 0.
        WHEN  '&EXIT'.
          LEAVE TO SCREEN 0.
        WHEN '&CANC'.
          LEAVE TO SCREEN 0.
        WHEN '&SAVE'.
          CLEAR IT_ZCDR_D[].
          LOOP AT IT_PLAF_MAKT INTO WA_PLAF_MAKT WHERE CHK = 'X'.
            CLEAR WA_ZCDR_D.
            WA_ZCDR_D-MANDT = SY-MANDT.
            WA_ZCDR_D-CBNO = WA_PLAF_MAKT-CBNO.
            WA_ZCDR_D-plnum = WA_PLAF_MAKT-PLNUM.
            WA_ZCDR_D-MATNR = WA_PLAF_MAKT-MATNR.
            WA_ZCDR_D-MAKTX = WA_PLAF_MAKT-MAKTX.
            WA_ZCDR_D-KDAUF = WA_PLAF_MAKT-KDAUF.
            WA_ZCDR_D-KDPOS = WA_PLAF_MAKT-KDPOS.
            WA_ZCDR_D-AUFNR = WA_PLAF_MAKT-AUFNR.
            APPEND WA_ZCDR_D to IT_ZCDR_D.
          ENDLOOP.
          LOOP AT IT_ZCDR_D INTO WA_ZCDR_D.
            INSERT ZCDR_D FROM WA_ZCDR_D.
            CLEAR WA_ZCDR_D.
          ENDLOOP.
          IF SY-SUBRC EQ 0.
            MESSAGE S021(ZCBR) WITH PR_CBNO.
          ENDIF.
          IF IT_ZCDR_D IS INITIAL.
            MESSAGE 'Select Atleast one Check Box' TYPE 'E' .
          ENDIF.
        WHEN 'IMPORT_INF'.
          PERFORM IMPORT_REPORT.
       WHEN 'EXPORT_INF'.
         PERFORM EXPORT_REPORT.
       WHEN 'UNIT_CONSU'.
         PERFORM UNIT_CONSUMPTION.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    FORM set_events USING it_events TYPE slis_t_event.
    DATA: x_event TYPE slis_alv_event.
    clear x_event.
    x_event-name = 'USER_COMMAND'.
    x_event-form = 'USER_COMMAND'.
    append x_event to it_events.
    CLEAR x_event.
    call function 'REUSE_ALV_EVENTS_GET'
      EXPORTING
        I_LIST_TYPE           = 0
      IMPORTING
        ET_EVENTS             = IT_EVENTS
      EXCEPTIONS
        LIST_TYPE_WRONG       = 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.
    endif.
    read table it_events into x_event with key name = slis_ev_user_command.
          if sy-subrc = 0.
          x_event-form = 'USER_COMMAND'.
          modify it_events from x_event index sy-tabix transporting form .
          endif.
    ENDFORM.
    *&      Form  set_pf_status
          text
         -->RT_EXTAB   text
    FORM SET_PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'Z_PFSTAT'.
    ENDFORM.            " set_pf_status
    FORM IMPORT_REPORT.
    TYPES: BEGIN OF TY_BOM,
             MATMK LIKE STPOX-MATMK,
             MTNRV LIKE ZCDR_D-MATNR,
             IDNRK LIKE STPOX-IDNRK,
             MNGLG LIKE STPOX-MNGLG,
             MMEIN LIKE STPOX-MMEIN,
             VPRSV LIKE STPOX-VPRSV,
             UPRICE LIKE MBEW-STPRS,
             TPRICE LIKE MBEW-STPRS,
           END OF TY_BOM,
           BEGIN OF TY_QUAN,
             MATMK LIKE STPOX-MATMK,
             MTNRV LIKE ZCDR_D-MATNR,
             IDNRK LIKE STPOX-IDNRK,
             MNGLG LIKE STPOX-MNGLG,
             MMEIN LIKE STPOX-MMEIN,
             UPRICE LIKE MBEW-STPRS,
             TPRICE LIKE MBEW-STPRS,
           END OF TY_QUAN,
           BEGIN OF TY_T023T,
             MATKL LIKE T023T-MATKL,
             WGBEZ LIKE T023T-WGBEZ,
           END OF TY_T023T,
           BEGIN OF TY_T006A,
             MMEIN LIKE T006A-MSEHI,
             MSEHT LIKE T006A-MSEHT,
           END OF TY_T006A,
           BEGIN OF TY_IMP_FINAL,
             SNO TYPE SY-INDEX,
             HSCODE LIKE ZHSCODE-HSCODE,
             WGBEZ TYPE T023T-WGBEZ,
             SPEC(20) TYPE C,
             MNGLG LIKE STPOX-MNGLG,
             MSEHT LIKE T006A-MSEHT,
             CNTRY(13) TYPE C,
             UPRICE TYPE P LENGTH 16 DECIMALS 2,
             TPRICE TYPE P LENGTH 16 DECIMALS 2,
             CURRCODE TYPE C LENGTH 5,
           END OF TY_IMP_FINAL,
           BEGIN OF TY_MBEW,
             MATNR LIKE MBEW-MATNR,
             VPRSV LIKE MBEW-VPRSV,
             STPRS LIKE MBEW-STPRS,
             VERPR LIKE MBEW-VERPR,
           END OF TY_MBEW.
    DATA: WA_BOM TYPE TY_BOM,
           WA_QUAN TYPE TY_QUAN,
           WA_IMP_FINAL TYPE TY_IMP_FINAL,
           WA_T023T TYPE TY_T023T,
           WA_T006A TYPE TY_T006A,
           WA_MBEW TYPE TY_MBEW.
    DATA: IT_BOM TYPE TABLE OF TY_BOM,
           IT_QUAN TYPE TABLE OF TY_QUAN,
           IT_IMP_FINAL TYPE TABLE OF TY_IMP_FINAL,
           IT_MBEW TYPE TABLE OF TY_MBEW.
      DATA:  IT_STPO TYPE STANDARD TABLE OF STPOX,
             WA_STPO TYPE STPOX.
          SELECT
              MATNR
              VPRSV
              STPRS
              VERPR
               FROM MBEW
                INTO CORRESPONDING FIELDS OF TABLE IT_MBEW.
                    WHERE MATNR EQ IT_MARA-MATNR.    "MBEW
    *I_STPO2 TYPE STANDARD TABLE OF STPOX.
    LOOP AT IT_PLAF_MAKT INTO WA_PLAF_MAKT WHERE CHK = 'X'.
      LOOP AT IT_ZCDR_D INTO WA_ZCDR_D .
          CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

  • Re: Unicode Convertible

    Hi All,
    While inserting a the datas from an internal table to a customized Table we are getting a
    Syntax error:  "<b>The type of the database table and work area (or internal table)are not Unicode convertible. Unicode convertible</b>".          
    Is there anyway to overcome this.
    Help and Suggestions will be much apprieciated.
    Regards.
    Ramesh.

    USE "<b>CORRESPONDING FIELDS</b>" IN YOUR OPEN SQL STATEMENT.
    SAMPLE CODE :-
    TABLES : MARA.
    TYPES : BEGIN OF LINE1,
             ERSDA  TYPE MARA-ERSDA,
             LAEDA  TYPE MARA-LAEDA,
             GROES  TYPE MARA-GROES,
             EKWSL  TYPE MARA-EKWSL,
             TRAGR TYPE MARA-TRAGR,
             RBNRM  TYPE MARA-RBNRM,
            END OF LINE1.
    DATA : ITAB1 TYPE STANDARD TABLE OF  LINE1 WITH HEADER LINE.
    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF  TABLE ITAB1.

  • Unicode convertible, what does it mean?

    TYPES: BEGIN OF zbficheentry_list2,
    FICHENO type zbficheentry-ficheno,
    LOGISTICSCENTER type zbficheentry-logisticscenter,
    KANTARNO type zbficheentry-kantarno,
    TRDATE type zbficheentry-trdate,
    TRHOUR type zbficheentry-trhour,  line_color(4) type c,
    END OF zbficheentry_list2.
    DATA: zbficheentry_list TYPE STANDARD TABLE OF zbficheentry_list2 WITH HEADER LINE,
          wa_ficheentry TYPE zbficheentry_list2.
    The program triggers the error:
    The type of the database table and work area (or internal table)          
    "WA_FICHEENTRY" are not Unicode-convertible . . . . . . . . . .          
    What does this mean?
    Please help.
    Thanks.

    Hello,
    U have to use like this :
    DATA: zbficheentry_list TYPE STANDARD TABLE OF zbficheentry_list2 WITH HEADER LINE,
    wa_ficheentry TYPE line of zbficheentry_list2.
    <b>WHAT is UNICODE ?</b>
    About brief idea about unicode
    In the past, SAP developers used various codes to encode characters of different alphabets, for example, ASCII, EBCDI, or double-byte code pages.
    ASCII (American Standard Code for Information Interchange) encodes each character using 1 byte = 8 bit. This makes it possible to represent a maximum of 28 = 256 characters to which the combinations [00000000, 11111111] are assigned. Common code pages are, for example, ISO88591 for West European or ISO88595 for Cyrillic fonts.
    EBCDI (Extended Binary Coded Decimal Interchange) also uses 1 byte to encode each character, which again makes it possible to represent 256 characters. EBCDIC 0697/0500 is an old IBM format that is used on AS/400 machines for West European fonts, for example.
    Double-byte code pages require 1 or 2 bytes for each character. This allows you to form 216 = 65536 combinations where usually only 10,000 - 15,000 characters are used. Double-byte code pages are, for example, SJIS for Japanese and BIG5 for traditional Chinese.
    Using these character sets, you can account for each language relevant to the SAP System. However, problems occur if you want to merge texts from different incompatible character sets in a central system. Equally, exchanging data between systems with incompatible character sets can result in unprecedented situations.
    One solution to this problem is to use a code comprising all characters used on earth. This code is called Unicode (ISO/IEC 10646) and consists of at least 16 bit = 2 bytes, alternatively of 32 bit = 4 bytes per character. Although the conversion effort for the R/3 kernel and applications is considerable, the migration to Unicode provides great benefits in the long run:
    The Internet and consequently also mySAP.com are entirely based on Unicode, which thus is a basic requirement for international competitiveness.
    Unicode allows all R/3 users to install a central R/3 System that covers all business processes worldwide.
    Companies using different distributed systems frequently want to aggregate their worldwide corporate data. Without Unicode, they would be able to do this only to a limited degree.
    With Unicode, you can use multiple languages simultaneously at a single frontend computer.
    Unicode is required for cross-application data exchange without loss of data due to incompatible character sets. One way to present documents in the World Wide Web (www) is XML, for example.
    ABAP programs must be modified wherever an explicit or implicit assumption is made with regard to the internal length of a character. As a result, a new level of abstraction is reached which makes it possible to run one and the same program both in conventional and in Unicode systems. In addition, if new characters are added to the Unicode character set, SAP can decide whether to represent these characters internally using 2 or 4 bytes.
    A Unicode-enabled ABAP program (UP) is a program in which all Unicode checks are effective. Such a program returns the same results in a non-Unicode system (NUS) as in a Unicode system (US). In order to perform the relevant syntax checks, you must activate the Unicode flag in the screens of the program and class attributes.
    In a US, you can only execute programs for which the Unicode flag is set. In future, the Unicode flag must be set for all SAP programs to enable them to run on a US. If the Unicode flag is set for a program, the syntax is checked and the program executed according to the rules described in this document, regardless of whether the system is a US or an NUS. From now on, the Unicode flag must be set for all new programs and classes that are created.
    If the Unicode flag is not set, a program can only be executed in an NUS. The syntactical and semantic changes described below do not apply to such programs. However, you can use all language extensions that have been introduced in the process of the conversion to Unicode.
    As a result of the modifications and restrictions associated with the Unicode flag, programs are executed in both Unicode and non-Unicode systems with the same semantics to a large degree. In rare cases, however, differences may occur. Programs that are designed to run on both systems therefore need to be tested on both platforms.
    You can also check out these official SAP locations on the SAP Service Marketplace:
    http://service.sap.com/unicode
    http://service.sap.com/unicode@SAP
    http://service.sap.com/i18n
    Regards,
    Deepu.K

  • RDDPURI4 not unicode compatible

    Hi guys!
    I am facing an upgrade and i have this error with the standard report RDDPURI4
    The type of the database table and work area (or internal table)
    "GT_PKTAB" are not Unicode convertible.
    The point is that, it is a standard object! I haven't found any oss note related to this object...
    any idea?
    thanks in advance,
    Aaron

    HI aaron,
    Jorge is right , You may find any substitute for the include.It would be a good idea to consult the objects where it has been used.
    Cheers.!

  • Error -not mutually convertible in a Unicode program

    Hi all,
              I have declare my internal table and workarea as below ...     
    TYPES: BEGIN OF t_mara,
            matnr type mara-matnr,
           END OF t_mara.
    DATA : it_mara TYPE t_mara OCCURS 0 WITH HEADER LINE.
    DATA :wa_mara like  mara-matnr.
    when iam loopimg my internal table into work area(like loop at it_mara into wa_mara ......) .. iam getting below error
    A line of "IT_mara" and "wa_mara" are not mutually convertible in a Unicode program. Unicode program.          
    Can any one let me know what is the exact problem ?..
    Thanks
    MAHA

    Hi Maha,
    pls see the declaration as below..it is working..
    TYPES: BEGIN OF t_mara,
    matnr type mara-matnr,
    END OF t_mara.
    DATA : it_mara TYPE t_mara OCCURS 0 WITH HEADER LINE.
    DATA :wa_mara like line of it_mara.
    Keerthi.

  • Are not mutually convertible in a Unicode program

    Hi guys,
    I'm getting error: "LS_EDIDD-SDATA and LS_STRUCTURE are not mutually convertible in Unicode Program"
    I have PRKST which is Amount field in LS_STRUCTURE, which causes this problem.
    But if I change type of PRKST to CHAR15, then it doesn't give error.
    But i want to use this field with type PRKST( CURR 11, decimal places 2).
    Please help. Its urgent.
    Thanks,
    Mehul Lad
    Moderator message - "Urgency" is not allowed in the forums. Read the RoE.
    Message was edited by: Suhas Saha

    Hi,
    LCHR field is not a standalone field. It is always preceded by a field of type INT2 which has the length of the data stored in LCHR field.
    So, in structure LS_EDIDD there should be a INT2 type field just before the field SDATA which tells the length of the actual value in SDATA. Suppose the field name is LEN.
    So,
    assign the value like this :
    LS_STRUCTURE = LS_EDIDD-SDATA(LS_EDIDD-LEN).
    Regards,
    Ashish

  • Not mutually convertible

    Hello experts,
    When I import the following paragraph of code from non-unicode system to unicode system, I met a problem related to 'not mutually convertible'.
         L_T_TEST[] = T_INDX[].
          LOOP AT L_T_TEST ASSIGNING <F_TEST>.
            <F_TEST>-ZUNAME = SY-UNAME.
            <F_TEST>-ZDATUM  = SY-DATUM.
            <F_TEST>-ZTIMLO    = SY-TIMLO.
          ENDLOOP.
          T_INDX[] = L_T_TEST[].
    T_INDX STRUCTURE  INDX.
    L_T_TEST like other structure(structure A).
    <F_TEST> refer to the same structure as L_T_TEST.
    Structure A is totally different from table INDX, so in unicode system this paragraph of code is not allowed.
    Notes: Field CLUSTD in table INDX is quite especial.
    Could anyone help me?
    Thanks & Best regards,
    Christina

    Hi,
    as the structures L_T_TEST and T_INDX are different u cannot move directly...in the new SAP version...in order to achieve ur functionality u have to move field by field to it..try like this
    Assuming field1 ,field2 and field3 are thre in both the tables.
    LOOP AT L_T_TEST .
    move :L_T_TEST -field1 to t_indx-field1,
              L_T_TEST -field2 to t_indx-field2,
              L_T_TEST -field3 to t_indx-field3.
    append t_indx.
    endloop.
    Regards,
    Nagaraj

  • Unicode convertible

    Hi friends,
    While executing the Modile pool prog. Im gettting the below error
    "The type of database table and work area(or internal table) e_sflight are not UNICODE CONVERTIBALE
    Can anyone hlep what may be issue
    Thank  you
    Regards,
    Sandy

    >
    Suraj Nair wrote:
    > See if your declarations are without heder lines.
    > Suraj
    Header lines are for sure unicode compatible. There are a lot of reasons not to use them, but unicode is not.

  • UCCHECK error in upgrade: Data type and structure not mutually convertible.

    Hi ABAPers,
    We have upgraded our system from 4.6c to ECC 6.0. We are at the unicode check stage. I am getting an error " 'V_LEV' and 'T_RES_TOTALS' are not mutually convertible in a Unicode program."
    The structure of T_RES_TOTALS is like this:
    BEGIN OF T_RES_TOTALS OCCURS 0,
        FLD1TEXT    LIKE ZTQ_REPVAL-VTEXT,
        FLD1        LIKE ZTQ_VBKA-ZZREP_FLD1,
        FLD2TEXT    LIKE ZTQ_REPVAL-VTEXT,
        FLD2        LIKE ZTQ_VBKA-ZZREP_FLD2,
        FLD3TEXT    LIKE ZTQ_REPVAL-VTEXT,
        FLD3        LIKE ZTQ_VBKA-ZZREP_FLD3,
        FLD4TEXT    LIKE ZTQ_REPVAL-VTEXT,
        FLD4        LIKE ZTQ_VBKA-ZZREP_FLD4,
        FLD5TEXT    LIKE ZTQ_REPVAL-VTEXT,
        FLD5        LIKE ZTQ_VBKA-ZZREP_FLD5,
        FLD6TEXT    LIKE ZTQ_REPVAL-VTEXT,
        FLD6        LIKE ZTQ_VBKA-ZZREP_FLD6,
        VTEXT    LIKE ZTQ_SRCET-TXT,
        SOURCE    LIKE ZTQ_SRCET-SOURCE,
        NAME1    LIKE KNA1-NAME1,
        RAREA     LIKE KNA1-KUNNR,
        TOTAL     TYPE I,
        LEV(2)      TYPE N,
      END OF T_RES_TOTALS,
    V_LEV is declared as this:
    V_LEV(2)      TYPE N,
    Below is the code and the line (marked in bold) which gives the error:
    LOOP AT T_RES_TOTALS.
        *V_LEV = T_RES_TOTALS.*
        AT NEW FLD1.      PERFORM FLD1_START.    ENDAT.
        AT NEW FLD2.      PERFORM FLD2_START.    ENDAT.
        AT NEW FLD3.      PERFORM FLD3_START.    ENDAT.
        AT NEW FLD4.      PERFORM FLD4_START.    ENDAT.
        AT NEW FLD5.      PERFORM FLD5_START.    ENDAT.
        AT NEW FLD6.      PERFORM FLD6_START.    ENDAT.
        AT NEW SOURCE.    PERFORM SOURCE_HEADER. ENDAT.
        AT END OF RAREA.  PERFORM RES_AREA_LINE. ENDAT.
        AT END OF SOURCE. PERFORM SOURCE_TOTAL.  ENDAT.
        AT END OF FLD6.   PERFORM FLD6_END.      ENDAT.
        AT END OF FLD5.   PERFORM FLD5_END.      ENDAT.
        AT END OF FLD4.   PERFORM FLD4_END.      ENDAT.
        AT END OF FLD3.   PERFORM FLD3_END.      ENDAT.
        AT END OF FLD2.   PERFORM FLD2_END.      ENDAT.
        AT END OF FLD1.   PERFORM FLD1_END.      ENDAT.
      ENDLOOP.

    write as below ...
    LOOP AT T_RES_TOTALS.
        V_LEV = T_RES_TOTALS-LEV.  <----
      AT NEW FLD1.      PERFORM FLD1_START.    ENDAT.
        AT NEW FLD2.      PERFORM FLD2_START.    ENDAT.
        AT NEW FLD3.      PERFORM FLD3_START.    ENDAT.
        AT NEW FLD4.      PERFORM FLD4_START.    ENDAT.
        AT NEW FLD5.      PERFORM FLD5_START.    ENDAT.
        AT NEW FLD6.      PERFORM FLD6_START.    ENDAT.
        AT NEW SOURCE.    PERFORM SOURCE_HEADER. ENDAT.
        AT END OF RAREA.  PERFORM RES_AREA_LINE. ENDAT.
        AT END OF SOURCE. PERFORM SOURCE_TOTAL.  ENDAT.
        AT END OF FLD6.   PERFORM FLD6_END.      ENDAT.
        AT END OF FLD5.   PERFORM FLD5_END.      ENDAT.
        AT END OF FLD4.   PERFORM FLD4_END.      ENDAT.
        AT END OF FLD3.   PERFORM FLD3_END.      ENDAT.
        AT END OF FLD2.   PERFORM FLD2_END.      ENDAT.
        AT END OF FLD1.   PERFORM FLD1_END.      ENDAT.
      ENDLOOP.

  • Short dump 'Table does not exist in database'

    Hello All,
    When a report is executing it is going to short dump by saying 'Table does not exist in database'. As per the short dump analysis this issue is happening because of the following   Native SQL statement statement :
    Program :  %_T050N0 (This is a dynamic  program generating by SAP )
    Form Name :  DYN_LIC_SEL_TOT
    exec sql performing LOOP_MOVE_WRITE_ISAP.
    select single_plate, itm_num, ctry_code, model_lot,
    lic_hold_flg, qty into :dcat-lplate, :dcat-matnr,
    :dcat-werks, :dcat-charg, :dcat-holdflag,
    :dcat-qty from ZLICENSE_R2 where itm_num   = :p_matnr and
                    model_lot = :p_charg
    endexec.
    As per the customer this issue occurring since they migrated the SAP  back-end data base from Oralce to DB6. Here I felt that ZLICENSE_R2 is not migrated from the  Oracle to DB6. But as per the BASIS Team, even this table was not maintained in Oracle also. If the table was not maintained in the Oracle, this issue should have been there even before migration also.
    Following is the short dump details:
    Short text
        Table does not exist in database.
    What happened?
        The table or view name used does not
        exist in the database.
        The error occurred in the current database connection "DEFAULT".
    What can you do?
        Check the spelling of the table names in your report.
        Note down which actions and inputs caused the error.
        To process the problem further, contact you SAP system
        administrator.
        Using Transaction ST22 for ABAP Dump Analysis, you can look
        at and manage termination messages, and you can also
        keep them for a long time.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_NATIVE_SQL_ERROR', was not
         caught in
       procedure "DYN_LIC_SEL_TOT" "(FORM)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    Triggering SQL statement: "select single_plate, itm_num, ctry_code, model_lot,
    lic_hold_flg, qty from ZLICENSE_R2 where itm_num = ? and model_lot = ? "
    Database error code: "-204"
    Could you please  let me know what might be the reason for this issue.
    Many Thanks in Advance.

    Transaction SE11, input ZLICENSE_R2 for table name, and display the table. Did the table display? If not, that is the main problem.
    If the table displays, go to menu item Utilities -> Database Object -> Database Utility
    In the resulting screen, under the "Status" fields, you should see text "Exists in the database." If you don't, then the table exists in the dictionary, but doesn't exist in the database system. Click the "Create database table" button and then you should be able to run the program.
    You may need basis team's help to carryout some of these actions.

Maybe you are looking for

  • Video doesn't work on some Android devices

    Hello, I wrote a small app for Android and I'm trying to show a movie from the net. Everything works on the AIR simulator, the problem starts when I try to run it on my device. I have a Galaxy S4 with Android 4.2.2 and I'm using AIR 3.8 (captive with

  • Installed 10.6.3. Fine at first, now crashes when launching any application

    Hi. Not sure that's the best subject for this thread, but its a long story. was running 10.5.6 for ages. no problem upgraded to 10.6.3 two weeks ago. everything went well. all my apps worked. I got latest drivers for my audio interfaces and everythin

  • Add and remove option in DataGrid in flex

    Dear Friends,                 I have a datagrid which we can add a row and remove the row.In this DataGrid when i clicked to add new row im getting check Box at first,which i dont want to need at first.Pls help me regarding this.Please find the scree

  • Infragistics gridview control sorts in Google Chrome and Firefox but not in IE11

    I have an Infragistics webdatagrid control on my website homepage that displays few information in form of rows. The code is as follows <asp:Panel ID="Panel" runat="server"> <ig:WebDataGrid ID="UltraWebGrid" runat="server" oninitializerow="UltraWebGr

  • Tag Work center to Materials in Production Order

    hey everyone, I need to tag the correct work center to the prod order. One Production order has say 5 materials and they have different movements on it. We need to fetch the correct work center for each material movement. I am able to find work cente