Create a Z-table and fill it with value and transport everything

Hi
I would like to create a Z-table, fill it with values and then transport everything.
This table will not be updated in the productions system.
Delivery class = C Customizing table, maintenance only by cust., not SAP import
Data Browser/table view maint = Display/maintenance allowed
Field: MANDT, etc. etc.
Technical settings: Data class = APPL1, Size = 0, Buffering switched on, Fully buffered.
I also create the Table maintenance generator
When I fill my table with values, these will not be saved in my change request.
What I'm doing wrong?
Thanks   //  Peter B

Go to
se11>utilities>table maintenance generator-->there u fill
Fungroup group (inthe function group u give any a z name related to ur table name it create automatically)
package
maintenance screen type and screen name
After this save and activate.
Then goto
Utilities>TABLE CONTENTS>CREATE ENTERIES

Similar Messages

  • How 2 create dynamic internal table and can we pass it to gui_download FM

    HI all,
         How can we create a dynamic internal table?
    I have a requirement where  i have to create an internal table with the no. of fields depending on the selection screen values, i think tat can be possible though dynamic creation only.
             How to solve this issue..?Pointers will be very much useful..
    Thanks
    Sunny.

    hi
    Follow the code it will help you out....
    REPORT  YUSMM_TEXT2                             .
    *TABLES
    TABLES: MARA,    " General Material Data
            MAKT,    " Material Descriptions
            T002.    " Language Keys
    * GLOBAL TYPE-POOL
    TYPE-POOLS : SLIS.
    * GLOBAL TYPES
    TYPES: BEGIN OF TP_LANG ,
             SPRAS LIKE T002-SPRAS,
             LAISO LIKE T002-LAISO,
             SRNO(3) TYPE N,
           END OF TP_LANG.
    TYPES: BEGIN OF TP_MATNR,
             MATNR LIKE MARA-MATNR,
             BEGRU LIKE MARA-BEGRU,
           END OF TP_MATNR.
    * DECLARATION FOR GLOBAL INTERNAL TABLES (WITH INCLUDE STRUCTURE)
    DATA:GT_MAKT    TYPE STANDARD TABLE OF MAKT,  "Materialkurztexte,
         GT_THEAD   TYPE STANDARD TABLE OF THEAD, "SAPscript: Text-Header,
         GT_LINETAB TYPE STANDARD TABLE OF TLINE, "SAPscript: Text-Zeilen,
         GT_T002    TYPE STANDARD TABLE OF T002. "Language key
    DATA: BEGIN OF GV_TEXT_OUTPUT_LINE,
                MATNR LIKE MARA-MATNR,
                BEGRU LIKE MARA-BEGRU,
                MAKTX LIKE MAKT-MAKTX,
                LTXT40(1250) TYPE C,
                SRNO(3) TYPE N,
                SPRAS LIKE T002-SPRAS,
             END OF GV_TEXT_OUTPUT_LINE.
    DATA: GT_MATNR TYPE STANDARD TABLE OF TP_MATNR,
          WA_GT_MATNR TYPE TP_MATNR.
    DATA: GT_LANG TYPE STANDARD TABLE OF TP_LANG,
          WA_GT_LANG TYPE TP_LANG.
    DATA: GT_TEXT_OUTPUT_LINE LIKE STANDARD TABLE OF GV_TEXT_OUTPUT_LINE,
          GT_FIELDCAT         TYPE SLIS_T_FIELDCAT_ALV,
          GV_FIELDCAT         LIKE LINE OF GT_FIELDCAT,
          CT_GT_FIELDCAT_IN LIKE GV_FIELDCAT,
          GS_LAYOUT           TYPE SLIS_LAYOUT_ALV,
          GV_REPID            TYPE SY-REPID.
    DATA: BEGIN OF GV,
            FORMER_ERROR       LIKE  SY-MARKY,     " Fehlermeldung bereits
            FILE_OPEN(1),                          " Flag open file
            REC_LENGTH         TYPE  I,            " record length
            MATNR              TYPE  MARA-MATNR,   " material
            REPID              TYPE  SYST-REPID,
            RETCO              TYPE  SY-SUBRC,
          END OF GV.
    DATA: GV_MAKT             TYPE MAKT,
          GV_T002             TYPE T002,
          GV_LANGU            TYPE THEAD-TDSPRAS.
    * DECLARATION FOR FIELD-SYMBOLS
    FIELD-SYMBOLS: <FS_DATA> TYPE REF TO DATA,
                   <FS_DATA1> TYPE REF TO DATA,
                   <FS_2>    TYPE STANDARD TABLE,
                   <FS_22>   TYPE STANDARD TABLE,
                   <FS_1>,
                   <FS_11>,
                   <F>,
                   <FA>,
                   <LWA_LINE_WA>,
                   <LWA_LINE_WA1>.
    DATA: IT_FLDCAT TYPE LVC_T_FCAT.
    DATA: T_FLDCAT1   TYPE SLIS_T_FIELDCAT_ALV.
    DATA: L_LT TYPE SLIS_LAYOUT_ALV.
    DATA: WA_IT_FLDCAT TYPE LVC_S_FCAT.
    DATA: WA_IT_FLDCAT1 TYPE SLIS_FIELDCAT_ALV.
    DATA: GP_TABLE TYPE REF TO DATA.
    DATA: WA_NEWLINE TYPE REF TO DATA.
    *DECLARATION FOR CONSTANTS
    CONSTANTS:
       BEGIN OF GC,
         TDID_GRUN     TYPE THEAD-TDID     VALUE 'GRUN',
         TDOBJECT_MAT  TYPE THEAD-TDOBJECT VALUE 'MATERIAL',
         ON(01)        TYPE C              VALUE 'X',
         YES(01)       TYPE C              VALUE 'X',
         TXT(25)       TYPE C              VALUE 'MATERIAL DETAILS',
         MAT(25)       TYPE C              VALUE 'MATERIAL NUMBER',
         AUT(25)       TYPE C              VALUE 'AUTHORIZATION GROUP',
         FOUND         TYPE SY-SUBRC       VALUE '00',  " Return-Code
         RC_OK         TYPE SY-SUBRC       VALUE '00',  " Return-Code
         OFF           TYPE SY-SUBRC       VALUE '00',  " return code
         FALSE         TYPE SY-SUBRC       VALUE '00',  " boolean
         TRUE          TYPE SY-SUBRC       VALUE '01',  " boolean
      END OF GC.
    * DECLARATION FOR VARIABLES
    DATA: V(3) TYPE N,
          STR TYPE STRING,
          STR1 TYPE STRING,
          V_VAR(3) TYPE N,
          V_VAR1(3) TYPE N,
          V_FIELDNAME(15) TYPE C,
          V_CHAR(15) TYPE C,
          V_LINES(3) TYPE N,
          MAKTEXT LIKE MAKT-MAKTX,
          LT_DATA        TYPE   REF TO DATA,
          LT_DATA1        TYPE   REF TO DATA,
          LWA_LINE       TYPE   REF TO  DATA,
          LWA_LINE1 TYPE REF TO DATA.
    *SELECTION-SCREEN AND PARAMETERS
    SELECTION-SCREEN: BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS:
    S_MATNR FOR MARA-MATNR,  "MATERIAL NUMBER
    S_MTART FOR MARA-MTART,  "MATERIAL TEXT
    S_LANG FOR MAKT-SPRAS.   "LANGUAGE
    PARAMETER: GP_SIZE TYPE I DEFAULT 200. "DATA LENGTH
    SELECTION-SCREEN: END OF BLOCK A1.
    * AT SELECTION SCREEN
    AT SELECTION-SCREEN.
      IF GP_SIZE < 0.
        MESSAGE E002(00).
      ENDIF.
      IF GP_SIZE > 50000.
        MESSAGE W130(26) WITH TEXT-004.
        SET CURSOR FIELD 'gp_size'.
      ENDIF.
    * INITIALIZATION
    INITIALIZATION.
      GV-REPID = SY-REPID.
    *START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM GET_MARA_DATA
                TABLES
                  GT_TEXT_OUTPUT_LINE
                USING
                  S_MATNR[]
                  S_MTART[]
                  GP_SIZE
                CHANGING
                  GV-RETCO
      PERFORM GET_MAT_TEXT
                 TABLES
                   GT_MAKT
                   GT_TEXT_OUTPUT_LINE
                   GT_THEAD
                   GT_LINETAB
                 USING
                   GC
                   GV-RETCO
                 CHANGING
                   GV_TEXT_OUTPUT_LINE
                   GV_MAKT
      PERFORM GET_LANG.
      PERFORM DYNAMIC_TABLES.
      PERFORM POPULATE_FINAL_TABLE.
      PERFORM POPULATE_DYNAMIC_TABLE.
    * END-OF-SELECTION
    END-OF-SELECTION.
      PERFORM DATA_OUTPUT.
    *&      Form  get_mara_data
    *       Materialdaten lesen
    *      <->ct_gt_text_output_line  Ausgabetabelle
    *      -->it_s_matnr  Parameter Materialnummer
    *      -->it_s_mtart  Parameter Materialart
    *      -->if_gp_size  Parameter Anzahl Materialnummern
    FORM GET_MARA_DATA  TABLES   CT_GT_TEXT_OUTPUT_LINE STRUCTURE
                                       GV_TEXT_OUTPUT_LINE
                        USING    IT_S_MATNR LIKE S_MATNR[]
                                 IT_S_MTART LIKE S_MTART[]
                                 IF_GP_SIZE
                        CHANGING IF_GV-RETCO.                   "#EC *
    * MARA in die Übergabestruktur einlesen
      SELECT MATNR BEGRU
            FROM MARA UP TO IF_GP_SIZE ROWS
            APPENDING CORRESPONDING FIELDS OF TABLE GT_MATNR
                     WHERE MATNR IN IT_S_MATNR
                       AND MTART IN IT_S_MTART.
      IF_GV-RETCO = SY-SUBRC.
    ENDFORM.                    " get_mara_data
    *&      Form  get_mat_text
    *       Kurz- und Langtexte zum Material lesen
    *      <->ct_gt_makt              Materialkurztexte
    *      <->ct_gt_text_output_line  Ausgabetabelle
    *      <->ct_gt_thead             Kopftabelle für ALV
    *      <->ct_gt_linetab           Zeilentabelle für ALV
    *      -->if_gc                   Globale Konstanten
    *      <--cf_gv_text_output_line  Struktur Ausgabetabelle
    *      <--cf_gv_makt              Struktru Materialkurztexte
    FORM GET_MAT_TEXT  TABLES   CT_GT_MAKT             STRUCTURE MAKT
                                CT_GT_TEXT_OUTPUT_LINE STRUCTURE
                                                    GV_TEXT_OUTPUT_LINE
                                CT_GT_THEAD            STRUCTURE THEAD
                                CT_GT_LINETAB          STRUCTURE TLINE
                       USING
                                IF_GC                  LIKE GC
                                IF_GV-RETCO
                       CHANGING CF_GV_TEXT_OUTPUT_LINE LIKE
                                                       GV_TEXT_OUTPUT_LINE
                                CF_GV_MAKT             LIKE GV_MAKT
      DATA: STRG TYPE STRING,
            STRG1(1255) TYPE C.
      IF IF_GV-RETCO = IF_GC-FOUND.
    * Materialkurztexte in alles Sprachen einlesen
        SELECT * FROM MAKT APPENDING TABLE CT_GT_MAKT
                 FOR ALL ENTRIES IN GT_MATNR "ct_gt_text_output_line
                 WHERE MATNR = GT_MATNR-MATNR " ct_gt_text_output_line-matnr
    * Kurztexte in die sprachabhängigen Felder bringen
        LOOP AT GT_MATNR INTO WA_GT_MATNR.
          LOOP AT CT_GT_MAKT INTO CF_GV_MAKT
                 WHERE MATNR = WA_GT_MATNR-MATNR.
            CF_GV_TEXT_OUTPUT_LINE-MATNR = WA_GT_MATNR-MATNR.
            CF_GV_TEXT_OUTPUT_LINE-BEGRU = WA_GT_MATNR-BEGRU.
            CF_GV_TEXT_OUTPUT_LINE-MAKTX = CF_GV_MAKT-MAKTX.
            CF_GV_TEXT_OUTPUT_LINE-SPRAS = CF_GV_MAKT-SPRAS.
    * LANGTEXT
            CLEAR CT_GT_THEAD[].
            CT_GT_THEAD-TDOBJECT = IF_GC-TDOBJECT_MAT.
            CT_GT_THEAD-TDNAME   = WA_GT_MATNR-MATNR.
            CT_GT_THEAD-TDID     = IF_GC-TDID_GRUN.
            CT_GT_THEAD-TDSPRAS  = CF_GV_MAKT-SPRAS.
            CALL FUNCTION 'TEXT_READ'
              EXPORTING
                I_HEADER   = CT_GT_THEAD
                I_READONLY = IF_GC-ON
              IMPORTING
                E_HEADER   = CT_GT_THEAD
              TABLES
                T_LINES    = CT_GT_LINETAB[]
              EXCEPTIONS
                NOTFOUND   = 1.
            IF SY-SUBRC = IF_GC-FOUND.
              LOOP AT  CT_GT_LINETAB.
                STRG = CT_GT_LINETAB-TDLINE.
                IF STRG1 <> ' '.
                  CONCATENATE STRG1 ';' STRG INTO STRG1.
                ELSE.
                  STRG1 = STRG.
                ENDIF.
              ENDLOOP.
              CF_GV_TEXT_OUTPUT_LINE-LTXT40 = STRG1.
              APPEND CF_GV_TEXT_OUTPUT_LINE TO CT_GT_TEXT_OUTPUT_LINE.
              CLEAR CF_GV_TEXT_OUTPUT_LINE.
              STRG1 = ' '.
            ELSE.
              APPEND CF_GV_TEXT_OUTPUT_LINE TO CT_GT_TEXT_OUTPUT_LINE.
            ENDIF.
          ENDLOOP.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " get_mat_text
    *&      Form  data_output
    *       Daten mit ALV ausgeben
    *      <->ct_GT_FIELDCAT          Feldkatalog für ALV
    *      <->ct_gt_text_output_line  Ausgabetabelle
    *      -->P_GS_LAYOUT             Layout für ALV
    *      -->if_gc                   Globale Konstanten
    *      <--cf_GV_REPID             Zur Zeit aufgerufener Reportname
    *      <--cf_gv_fieldcat          Struktur Feldkatalog
    *      <--cf_gv                   Globale Variablen
    FORM DATA_OUTPUT.
      PERFORM FIELDCATBUILD.
      PERFORM LAYOUT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = GV-REPID
          I_CALLBACK_PF_STATUS_SET = 'EVENT_SET_STATUS_01'
          I_CALLBACK_USER_COMMAND  = 'EVENT_USER_COMMAND'
          IS_LAYOUT                = L_LT
          IT_FIELDCAT              = T_FLDCAT1[]
        TABLES
          T_OUTTAB                 = <FS_2>
        EXCEPTIONS
          PROGRAM_ERROR            = 1
          OTHERS                   = 2.
      IF SY-SUBRC <> GC-FOUND.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " data_output
    *&      Form  fieldcatbuild
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FIELDCATBUILD. " TABLES   ct_gt_fieldcat_in STRUCTURE gv_fieldcat.
      LOOP AT IT_FLDCAT INTO WA_IT_FLDCAT.
        WA_IT_FLDCAT1-FIELDNAME = WA_IT_FLDCAT-FIELDNAME.
        WA_IT_FLDCAT1-TABNAME =  WA_IT_FLDCAT-TABNAME.
        WA_IT_FLDCAT1-SELTEXT_L = WA_IT_FLDCAT-FIELDNAME.
        APPEND WA_IT_FLDCAT1 TO T_FLDCAT1.
        CLEAR : WA_IT_FLDCAT,WA_IT_FLDCAT1.
      ENDLOOP.
    ENDFORM.                    " fieldcatbuild
    * Form event_set_status_01*
    FORM EVENT_SET_STATUS_01 USING LT_EXCL TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'ABCD' .
    ENDFORM. "EVENT_SET_STATUS_01
    *& Form Name: event_user_command *
    *& Form Desc: For Handling USER_COMMAND *
    FORM EVENT_USER_COMMAND USING
    IF_UCOMM TYPE SY-UCOMM
    IS_SELFIELD TYPE SLIS_SELFIELD.
      CASE IF_UCOMM.
        WHEN 'DOWNLOAD'.
          PERFORM POPULATE_DOWNLOAD_TABLE.
          DATA: L_LENGHT TYPE I.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              FILENAME              = 'C:data.xls'
              FILETYPE              = 'ASC'
              WRITE_FIELD_SEPARATOR = 'X'
              TRUNC_TRAILING_BLANKS = 'X'
              DAT_MODE              = 'X'
            IMPORTING
              FILELENGTH            = L_LENGHT
            TABLES
              DATA_TAB              = <FS_22>.
          IF SY-SUBRC <> GC-FOUND.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          IF L_LENGHT NE GC-FOUND.
            MESSAGE S398(00) WITH 'DATA downloaded to c:data.xls'.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "event_user_command
    *&      Form  get_lang
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_LANG.
      SELECT SPRAS
               LAISO FROM T002 INTO CORRESPONDING FIELDS OF TABLE GT_LANG
                      WHERE SPRAS IN S_LANG.
      DESCRIBE TABLE GT_LANG LINES V_LINES.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        V = V + 1.
        WA_GT_LANG-SRNO = V.
        MODIFY GT_LANG FROM WA_GT_LANG TRANSPORTING SRNO.
      ENDLOOP.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        CONCATENATE 'MATEDESC-' WA_GT_LANG-LAISO INTO V_FIELDNAME.
        CLEAR WA_IT_FLDCAT.
        WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
        WA_IT_FLDCAT-SELTEXT = V_FIELDNAME.
        WA_IT_FLDCAT-DATATYPE = 'CHAR'.
        WA_IT_FLDCAT-INTLEN = 40.
        WA_IT_FLDCAT-TABNAME = '<FS_2>'.
        APPEND WA_IT_FLDCAT TO IT_FLDCAT .
        CLEAR WA_GT_LANG.
      ENDLOOP.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        CONCATENATE 'BASDAT-' WA_GT_LANG-LAISO INTO V_FIELDNAME.
        CLEAR WA_IT_FLDCAT.
        WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
        WA_IT_FLDCAT-DATATYPE = 'CHAR'.
        WA_IT_FLDCAT-INTLEN = 255.
        WA_IT_FLDCAT-SELTEXT = V_FIELDNAME.
        WA_IT_FLDCAT-TABNAME = '<FS_2>'.
        APPEND WA_IT_FLDCAT TO IT_FLDCAT .
        CLEAR WA_GT_LANG.
      ENDLOOP.
      V_FIELDNAME = 'MATNR'.
      CLEAR WA_IT_FLDCAT.
      WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
      WA_IT_FLDCAT-DATATYPE = 'CHAR'.
      WA_IT_FLDCAT-SELTEXT =  'Matnr'.
      WA_IT_FLDCAT-INTLEN = 18.
      WA_IT_FLDCAT-TABNAME = '<FS_2>'.
      INSERT WA_IT_FLDCAT INTO IT_FLDCAT INDEX 1.
      V_FIELDNAME = 'BEGRU'.
      CLEAR WA_IT_FLDCAT.
      WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
      WA_IT_FLDCAT-DATATYPE = 'CHAR'.
      WA_IT_FLDCAT-SELTEXT =  'BEGRU'.
      WA_IT_FLDCAT-INTLEN = 4.
      WA_IT_FLDCAT-TABNAME = '<FS_2>'.
      INSERT WA_IT_FLDCAT INTO IT_FLDCAT INDEX 2.
    ENDFORM.                    " get_lang
    *&      Form  dynamic_tables
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DYNAMIC_TABLES.
      ASSIGN LT_DATA TO <FS_DATA>.
    * Creating the Dynamic Internal Table
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG           = IT_FLDCAT      " Fieldcatalogue
        IMPORTING
          EP_TABLE                  = <FS_DATA>     " Dynamic Internal Table
        EXCEPTIONS
          GENERATE_SUBPOOL_DIR_FULL = 1
          OTHERS                    = 2.
    * Assign Dyn Table To Field Sumbol
      ASSIGN <FS_DATA>->* TO <FS_1>.
    * Assigning the Internal Table TYPE ANY to Standard internal Table
      ASSIGN <FS_1> TO <FS_2>.
    * Creating a Workarea
      CREATE DATA LWA_LINE LIKE LINE OF <FS_2> .
    * Assigning the Content to the workares as a Pointer
      ASSIGN LWA_LINE->* TO <LWA_LINE_WA>.
    ENDFORM.                    " dynamic_tables
    *&      Form  populate_final_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM POPULATE_FINAL_TABLE.
      LOOP AT GT_TEXT_OUTPUT_LINE INTO GV_TEXT_OUTPUT_LINE.
        READ TABLE GT_LANG INTO WA_GT_LANG
                  WITH KEY SPRAS = GV_TEXT_OUTPUT_LINE-SPRAS.
        IF SY-SUBRC EQ GC-FOUND.
          GV_TEXT_OUTPUT_LINE-SRNO = WA_GT_LANG-SRNO.
        ENDIF.
        MODIFY GT_TEXT_OUTPUT_LINE FROM GV_TEXT_OUTPUT_LINE.
      ENDLOOP.
    ENDFORM.                    " populate_final_table
    *&      Form  populate_dynamic_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM POPULATE_DYNAMIC_TABLE.
      DATA: INDX TYPE SY-TABIX.
      LOOP AT GT_TEXT_OUTPUT_LINE INTO GV_TEXT_OUTPUT_LINE.
        AT NEW MATNR.
          INDX = SY-TABIX.
          ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
          <F> = GV_TEXT_OUTPUT_LINE-MATNR.
          ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA> TO <F>.
          <F> = GV_TEXT_OUTPUT_LINE-BEGRU.
        ENDAT.
        LOOP AT GT_LANG INTO WA_GT_LANG.
          IF GV_TEXT_OUTPUT_LINE-SRNO = WA_GT_LANG-SRNO.
            V_VAR = GV_TEXT_OUTPUT_LINE-SRNO + 2.
            ASSIGN COMPONENT V_VAR OF STRUCTURE <LWA_LINE_WA> TO <F>.
            <F> = GV_TEXT_OUTPUT_LINE-MAKTX.
            V_VAR = GV_TEXT_OUTPUT_LINE-SRNO + V_LINES + 2.
            ASSIGN COMPONENT V_VAR OF STRUCTURE <LWA_LINE_WA> TO <F>.
            <F> = GV_TEXT_OUTPUT_LINE-LTXT40.
          ENDIF.
        ENDLOOP.
        AT END OF MATNR.
          APPEND <LWA_LINE_WA> TO <FS_2>.
          CLEAR <LWA_LINE_WA>.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " populate_dynamic_table
    *&      Form  LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM LAYOUT.
      CLEAR L_LT.
      L_LT-ZEBRA = GC-YES.
      L_LT-COLWIDTH_OPTIMIZE = 'X'.
      L_LT-WINDOW_TITLEBAR = GC-TXT.
    ENDFORM.                    " LAYOUT
    *&      Form  populate_download_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM POPULATE_DOWNLOAD_TABLE.
      ASSIGN LT_DATA1 TO <FS_DATA1>.
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG           = IT_FLDCAT         " Fieldcatalogue
        IMPORTING
          EP_TABLE                  = <FS_DATA1>  " Dynamic Internal table
        EXCEPTIONS
          GENERATE_SUBPOOL_DIR_FULL = 1
          OTHERS                    = 2.
    * Assign Dyn Table To Field Sumbol
      ASSIGN <FS_DATA1>->* TO <FS_11>.
    * Assigning the Internal Table TYPE ANY to Standard internal Table
      ASSIGN <FS_11> TO <FS_22>.
    * Creating a Workarea
      CREATE DATA LWA_LINE1 LIKE LINE OF <FS_22> .
    * Assigning the Content to the workares as a Pointer
      ASSIGN LWA_LINE1->* TO <LWA_LINE_WA1>.
      DATA: STRN1 TYPE STRING,
            STRN2 TYPE STRING,
            INDX TYPE SY-TABIX.
      ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
      <FA> = GC-MAT.
      ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
      <FA> = GC-AUT.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        V_VAR1 = WA_GT_LANG-SRNO + 2.
        CONCATENATE 'MATERIALDESCRIPTION-'  WA_GT_LANG-LAISO INTO STRN1.
        ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = STRN1.
        V_VAR1 = WA_GT_LANG-SRNO + V_LINES + 2.
        CONCATENATE 'BASICDATA-' WA_GT_LANG-LAISO INTO STRN2.
        ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = STRN2.
      ENDLOOP.
      APPEND <LWA_LINE_WA1> TO <FS_22>.
      CLEAR <LWA_LINE_WA1>.
      APPEND <LWA_LINE_WA1> TO <FS_22>.
      V_VAR1 = 0.
      LOOP AT GT_TEXT_OUTPUT_LINE INTO GV_TEXT_OUTPUT_LINE.
        AT NEW MATNR.
          INDX = SY-TABIX.
          ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
          <FA> = GV_TEXT_OUTPUT_LINE-MATNR.
          ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
          <FA> = GV_TEXT_OUTPUT_LINE-BEGRU.
        ENDAT.
        LOOP AT GT_LANG INTO WA_GT_LANG.
          IF GV_TEXT_OUTPUT_LINE-SRNO EQ WA_GT_LANG-SRNO.
            V_VAR1 = GV_TEXT_OUTPUT_LINE-SRNO + 2.
            ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
            <FA> = GV_TEXT_OUTPUT_LINE-MAKTX.
            V_VAR1 = GV_TEXT_OUTPUT_LINE-SRNO + V_LINES + 2.
            ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
    *        STR = GV_TEXT_OUTPUT_LINE-LTXT40.
    *        SEARCH STR FOR ';'.
    *        DO.
    *          IF SY-SUBRC = 0.
    *            SPLIT STR AT ';' INTO STR1 STR.
    *            <FA> = STR1.
    *            APPEND <LWA_LINE_WA1> TO <FS_22>.
    *            SEARCH STR FOR ';'.
    *            CLEAR <LWA_LINE_WA1>.
    *          ELSE.
    *            EXIT.
    *          ENDIF.
    *        ENDDO.
    *        <FA> = STR.
    *        APPEND <LWA_LINE_WA1> TO <FS_22>.
            <FA> = GV_TEXT_OUTPUT_LINE-LTXT40.
          ENDIF.
        ENDLOOP.
        AT END OF MATNR.
          APPEND <LWA_LINE_WA1> TO <FS_22>.
          CLEAR <LWA_LINE_WA1>.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " populate_download_table
    thanks
    Nitya

  • Creating a master table and using it to populate other tables.

    Hi everyone.
    I am a novice at using Numbers and I need some direction.
    I am looking to create a master table with information for our summer camp. This table will include vital information such as name, address, etc. along with cabin assignments, tuitions received, and more.
    We will separate this information into smaller tables that different portions of that master table for specific use. Such as: names and addresses for leaders, names and tuitions for registration, etc.
    My goal is to type the information into the master table and have it update the other tables automatically. Can someone direct me how to format the master and sub tables so that this is possible?
    I would greatly appreciate it and it will greatly reduce the record-keeping time for our camp.
    Thank You!
    Roy

    Hi Roy,
    Welcome to the Numbers discussions. You are giving us a tall order, especially when we don't know your level of experience in programming spreadsheets.
    Here are a couple of basics to start the conversation...
    In normal spreadsheet programming, we Pull data from one location into another, we don't Push it or Send it. This should help you to understand that the hard work is done in the sub tables, not the master.
    You will use LOOKUP functions to pull the data to your sub tables. Download the Numbers User Guide and the Formulas and Functions User Guide and read up on them.
    In your master table, make sure you have one column that uniquely identifies each participant so it will be easy to reference that person in your sub tables.
    Regards,
    Jerry

  • PowerPivot - Create a Lookup Table and Calculate Totals via PowerQuery

    Hi,
    I have got a question to powerpivot/powerquery.
    I have got one source file "product-sku.txt" with product data (product number, product size, product quantity etc.).
    In powerpivot I created via this text file 2 powerpivot tables:
    product-sku and
    products.
    The "products" table is a lookup table and was created via powerquery using the columns prodnumber, removing the prodsize and the prodquantity columns and then removing duplicates.
    My question: How could I show/leave a column prodquantity in the lookup table "products" which shows the total of all sizes per prodnumber?
    I need this prodquantity in the lookup table to do a banding analysis via the "products" table (e.g. products with quantity 0-100, 101-200 etc.). 
    I give you an example:
    source file columns (product-sku.txt):
    Source 
    Date
    ProdNumber
    ProdSize
    ProdQuantity
    ProdGroup
    ProdSubGroup
    ProdCostPrice
    ProdSellingPrice
    The powerpivot table "product-sku" contains all columns from the txt file above
    The lookup table "products" created via powerquery has the following columns:
    Source
    Date
    ProdNumber
    ProdQuantity (this column I would wish to add; if a prodnumber 123 had two sizes (36 and 38) with quantities of 5 and 10, the prodquantity should add up in the lookup table to 15. How could this be achieved?)
    I enclose a link to my dropbox with example files: PowerPivot-Example-Files
    Thank you for any help.
    Chiemo

    Chiemo,
    If you would like to consolidate to one table as Olaf has suggested, that would be very easy to do. I have included the modified DAX for the calculated column below. This calculated column would be created in the 'product-sku' table itself.
    You are correct in your assumption that you need an explicitly calculated column to most easily do banding analysis.
    Olaf is correct that avoiding the creation of a separate 'products' table as you have done is a good idea. I was not thinking about modeling best practices when I replied. If the only purpose of your 'products' table was to create this calculated column,
    then I do suggest deleting that table and implementing the calculated column in 'product-sku' with the DAX below.
    Edit: If you need to use 'products' as a dimension table which will have a relationship to a fact table, then it will be necessary to keep it. PowerPivot does not natively handle a many-to-many relationship. Dimension tables must have a unique key. If [ProdNumber]
    is the key, then it will be necessary to have your 'products' table. If you need to implement a many-to-many relationship, please see this
    post as a primer.
    =
    CALCULATE (
        SUM ( 'product-sku'[ProdQuantity] ),
        'product-sku'[ProdNumber] = EARLIER ( 'product-sku'[ProdNumber] )

  • [b]How to create this Custom Table on Custom Schema with foreign key [/b]

    This Custom Table is create in Custom Schema and Refers to Seeded Table in APPS schema
    1 create table test_dff (test_id number(15) primary key,
    2* invoice_id number(15) constraint ap_test_fk REFERENCES ap_invoices_all(invoice_id) ON DELETE CASCADE)
    SQL> /
    invoice_id number(15) constraint ap_test_fk REFERENCES ap_invoices_all(invoice_id) ON DELETE CASCADE
    ERROR at line 2:
    ORA-02270: no matching unique or primary key for this column-list
    How to create this Custom Table on Custom Schema
    thanks in advance

    hi prashant
    sorry for replying late, i have checked your query and it gives me no rows, but if i check for user_cons_columns it gives me no rows either in APPS Schema, but in AP schema it gives me
    SQL> SELECT * FROM user_cons_columns WHERE table_name = 'AP_INVOICES_ALL';
    OWNER CONSTRAINT_NAME TABLE_NAME
    COLUMN_NAME
    POSITION
    AP SYS_C008177 AP_INVOICES_ALL
    INVOICE_ID
    SQL> SELECT constraint_name, constraint_type FROM user_constraints WHERE table_name = 'AP_INVOICES_A
    LL';
    CONSTRAINT_NAME C
    SYS_C008177 C
    SYS_C008178 C
    SYS_C008179 C
    SYS_C008180 C
    SYS_C008181 C
    SYS_C008182 C
    SYS_C008183 C
    SYS_C008184 C
    SYS_C008185 C
    SYS_C008187 C
    SYS_C008189 C
    SYS_C008191 C
    and since this is a combination of Unique and Not Null Constraints , i am getting the same issue. do u have any solution to make the Detail table records to delete without using Alerts/DB Triggers?
    thanks for your time .
    abdul rahman

  • Customize table and transport

    hi expert,
    How can i transport a customize table that i made from Development server going to Production server? Do i need to set something to it? Pls help me....godbless
    thanks,
    nips

    Hi Nips,
    I think you have saved your customized table as a local object($tmp).
    Just enquire about the package in which this table has to be saved.
    then just open the table then click on the GOTO tab in the toolbar, then click on the object directory entry. Just change package. Then it will ask you for the transport number. CReate a trnaport number and just transport this number to production server.
    To Transport the Transport number.
    GoTo SE10.
    click on your transport number. You will see another transport number attached with it. Just click on that transport number and press F9. Then Click on the above transport number and press F9.
    Here the whole object is transported(Exported) to the destination.
    Now login to your production server and open transaction STMS. Click F5.
    you will get the next screen. click on your production server. here you will find your transport number. just click on it and press CTRL+ F11 and then CTRL+F8. refresh the screen and wait for some time.
    Regards,
    vamsi

  • How & Where to create the Target Groups and Transport Targets for Business

    Hi Experts,
               I am Transporting the scenarios from Development 500 client XI system to Development 500 client PI7.1 system. I have taken the exports of Technical system and Business System from the DEV XI system and correspondingly have imported the same in the PI7.1 system. I can see the all the business system in the Business system SLD of the PI7.1 system. I would like to assign the Business System Groups and Transport Targets for every business system that I want to transport. How can I do that ? Whether this is to be done in DEV XI system or the DEV PI system? Can somebody elaborate the step by step method to create the Groups and Target system for the every Business system so that I can import the object of the Integration Directory sucessfully................................
    Thanks & Regards
    suk4023
    Edited by: sukande on Aug 17, 2010 8:18 AM

    Hi Supriya,
               Thanks for the reply and good illustration............Still going further after defing the destination for transport in the source SLD Business system ( XI dev server) , then we should export it and subsequently import it in the SLD of the PI 7.1 ie the destination server.  Then we should transport the objects of Integration Repository and Integration Directory to the new PI7.1 server. Is this the right way to proceed.?  Hope that this will not give the error while importing the objects in Integration Directory. An typical which comes while importing the objects in the Integration Directory is as follows:-
    *Import failed because of business system transfer of object Communication Component | PCM: Obligatory transport target for business system PCM not found in System Landscape Directory*
    Pls clarify on this ......
    Thanks & Regards
    suk4023

  • How to create one master table and two detail for it

    I have one table , imagine it like mastertable( empid,deptid );
    and two different tables like employeetable(empid ) , departmenttable ( deptid )....
    I dont have any relation on database side. I need to create view link and ı need to use only one master table for two detail tables.
    How can ı manage this scenerio ?
    thanks...

    yes Shay ı really want to use two detail table in one UI as you suggest in your blog. But in that scenerio probably tables have link in database side with foreign key. My detail tables dont have any connection in database side with my master table. How can ı link them under one mastertableVO ?
    I am really sorry about my bad explanation. I am a newbie and probably ı dont know the correct words to tell my problem.
    Thanks for your time...

  • DECODE versus creating a separate table and doing a join

    Hi,
    This question is on what Oracle does internally for the decode function on a field value.
    I have two options:
    (i) use the decode function to do a quick and dirty SQL statement
    (ii) create a table that has the results what that decode will do, and do a join with that table.
    I tend to shy away from using decode in SQL, since I hate the idea of putting business information into an SQL statement, and also I thought using functions of any kind slowed SQL down, and that one should limit it as much as possible "standard" SQL.
    Is the gain from using a separate table real, illusory or is it worse than using DECODE?
    Thanks,
    Regards,
    Srini

    Thanks for all the responses. I talked with my DBA and decided to go with the table option rather than the decode option. Here are the reasons.
    1. Mixing business information in your program is never a good idea (this of course goes beyond just SQL/Oracle, applying to all programming). This is related to what you mentioned, Kevin. I don't want to restrict the names in my tables simply because I have hard-coded something into my program. Over a period of time, this would result in a minefield of decodes.
    2. I forgot to mention - the decode would be in my 'where' clause - that is why I had the question on speed. It seemed to me that if the system had to translate each field, it could obviously not take advantage of any indexing the column had, and would be slower. Cartesian products are bad enough, we don't want a computation to be tacked on to it as well, right?
    Regards,
    Srini

  • How to create solved fact table and corresponding cube

    Hello,
    I want to create cube with solved fact table. It means, i need to feed data for higher levels of dimension also from fact table instead of aggreting from base level.
    I am using star schema and AWM 10g R2 for creating cube.
    If anyone knows how to do this, i would be very benificial.
    Thanks
    Subash

    I have generated parent child script using cwm2_olap_pc_transform.create_script. After running this generated script, it has created 3 table/view.
    My Base Parent Child table is like this:-
    drop table PARENT_CHILD;
    create table PARENT_CHILD (PARENT varchar2(30), CHILD varchar2(30));
    insert into PARENT_CHILD values ('Eligible', 'Compliant');
    insert into PARENT_CHILD values ('Eligible', 'Non-Compliant');
    insert into PARENT_CHILD values ('All', 'Eligible');
    insert into PARENT_CHILD values ('All', 'Ineligible');
    insert into PARENT_CHILD values (null, 'All');
    After running generated script thru cwm2_olap_pc_transform.create_script, it has created :-
    Table - PARENT_CHILD_SOLVED
    View - PARENT_CHILD_SOLVED_view , PARENT_CHILD_view
    This script also inserted data in above table/view. (5 rec in each). Table/View structure is like this:-
    SQL> desc PARENT_CHILD_view
    Name Null? Type
    GID NUMBER
    CHILD1 VARCHAR2(30)
    CHILD2 VARCHAR2(30)
    CHILD3 VARCHAR2(30)
    Data:-
    0 All Eligible Compliant
    0 All Eligible Non-Compliant
    1 All Eligible
    1 All Ineligible
    3 All
    SQL> desc PARENT_CHILD_SOLVED
    Name Null? Type
    GID NUMBER
    CHILD1 VARCHAR2(30)
    CHILD2 VARCHAR2(30)
    CHILD3 VARCHAR2(30)
    Data:-
    0 All Eligible Compliant
    0 All Eligible Non-Compliant
    1 All Eligible
    1 All Ineligible
    3 All
    SQL> desc PARENT_CHILD_SOLVED_view
    Name Null? Type
    GID NUMBER
    SHORT_DESCRIPTION VARCHAR2(30)
    LONG_DESCRIPTION VARCHAR2(30)
    CHILD1 VARCHAR2(30)
    CHILD2 VARCHAR2(30)
    CHILD3 VARCHAR2(30)
    Data:-
    0 Compliant Compliant All Eligible Compliant
    0 Non-Compliant Non-Compliant All Eligible Non-Compliant
    1 Eligible Eligible All Eligible
    1 Ineligible Ineligible All Ineligible
    3 All All All
    I tried to create dim and cube based on this. I am not sure whether its correct or not! Though validate_dimension API call shows that it is valid.
    Script for Dim:-
    DECLARE
    -- variable to hold error message
    errtxt varchar(60);
    BEGIN
    -- To be on safer side just drop dimension before creating new one and catch exceptions
    BEGIN
    cwm2_olap_dimension.drop_dimension('APPS', 'HCP_DIM_PC');
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Dimension HCP_DIM_PC not dropped');
    END;
    cwm2_olap_dimension.create_dimension(
    'APPS',
    'HCP_DIM_PC',
    'Parent Child',
    NULL,
    'Parent Child',
    'Parent Child',
    NULL);
    cwm2_olap_dimension_attribute.create_dimension_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Short Description',
    'Short Description',
    'Short Description',
    'Short Description',
    TRUE);
    cwm2_olap_dimension_attribute.create_dimension_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Long Description',
    'Long Description',
    'Long Description',
    'Long Description',
    TRUE);
    cwm2_olap_dimension_attribute.create_dimension_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Grouping ID',
    'Grouping ID',
    'Grouping ID',
    'Grouping ID',
    TRUE);
    cwm2_olap_hierarchy.create_hierarchy(
    'APPS',
    'HCP_DIM_PC',
    'HCP_DIM_PC_HIER',
    'Standard',
    'Standard',
    'Standard Parent Child Hierarchy',
    'SOLVED LEVEL-BASED');
    cwm2_olap_dimension.SET_DEFAULT_DISPLAY_HIERARCHY ('APPS', 'HCP_DIM_PC', 'HCP_DIM_PC_HIER');
    cwm2_olap_level.create_level(
    'APPS',
    'HCP_DIM_PC',
    'ALL_PARENT_LVL',
    'All Parent Child',
    'All Parent Child',
    'All Parent Child',
    'All Parent Child Level');
    cwm2_olap_level_attribute.create_level_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Short Description',
    'ALL_PARENT_LVL',
    'Short Description',
    'Short Description',
    'Short Description',
    'Short Description',
    TRUE);
    cwm2_olap_level_attribute.create_level_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Long Description',
    'ALL_PARENT_LVL',
    'Long Description',
    'Long Description',
    'Long Description',
    'Long Description',
    TRUE);
    cwm2_olap_level_attribute.create_level_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Grouping ID',
    'ALL_PARENT_LVL',
    'Grouping ID',
    'Grouping ID',
    'Grouping ID',
    'HTB Grouping ID',
    TRUE);
    -- Add all levels one by one to dimension hierarchy. For top most level last parameter is null.
    cwm2_olap_level.add_level_to_hierarchy(
    'APPS',
    'HCP_DIM_PC',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    NULL);
    BEGIN
    cwm2_olap_table_map.removemap_dimtbl_hierlevel(
    'APPS',
    'HCP_DIM_PC',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL');
    cwm2_olap_table_map.removemap_DimTbl_HierLevelAttr(
    'APPS', 'HCP_DIM_PC', 'Short Description', 'HCP_DIM_PC_HIER', 'ALL_PARENT_LVL', 'Short Description');
    cwm2_olap_table_map.removemap_DimTbl_HierLevelAttr(
    'APPS', 'HCP_DIM_PC', 'Long Description', 'HCP_DIM_PC_HIER', 'ALL_PARENT_LVL', 'Long Description');
    cwm2_olap_table_map.removemap_DimTbl_HierLevelAttr(
    'APPS', 'HCP_DIM_PC', 'Grouping ID', 'HCP_DIM_PC_HIER', 'ALL_PARENT_LVL', 'Grouping ID');
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Level map for ALL_PARENT_LVL not removed');
    END;
    -- Map ALL_PARENT_LVL level to dimension table. Last parameter is null since it is top most level
    cwm2_olap_table_map.map_dimtbl_hierlevel(
    'APPS',
    'HCP_DIM_PC',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    'APPS',
    'PARENT_CHILD_SOLVED_VIEW',
    'GID',
    NULL);
    -- one by one map all the level attributes to respective columns in the dimension table.
    cwm2_olap_table_map.Map_DimTbl_HierLevelAttr(
    'APPS',
    'HCP_DIM_PC',
    'Short Description',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    'Short Description',
    'APPS',
    'PARENT_CHILD_SOLVED_VIEW',
    'SHORT_DESCRIPTION');
    cwm2_olap_table_map.Map_DimTbl_HierLevelAttr(
    'APPS',
    'HCP_DIM_PC',
    'Long Description',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    'Long Description',
    'APPS',
    'PARENT_CHILD_SOLVED_VIEW',
    'LONG_DESCRIPTION');
    cwm2_olap_table_map.Map_DimTbl_HierLevelAttr(
    'APPS',
    'HCP_DIM_PC',
    'Grouping ID',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    'Grouping ID',
    'APPS',
    'PARENT_CHILD_SOLVED_VIEW',
    'GID');
    -- Use cwm2_olap_validate.validate_dimension to validate the dimension
    cwm2_olap_validate.validate_dimension('APPS', 'HCP_DIM_PC');
    cwm2_olap_metadata_refresh.mr_refresh;
    -- Rollback if any exception occurs during processing this script
    EXCEPTION
    WHEN OTHERS THEN
    cwm_utility.dump_error;
    errtxt := cwm_utility.get_last_error_description;
    dbms_output.put_line('ERROR: ' || errtxt);
    ROLLBACK;
    RAISE;
    END;
    Script for Cube:-
    declare
    HCP_time_dim number;
    errtxt varchar(60);
    begin
    cwm_utility.collect_garbage;
    begin
    cwm2_olap_cube.drop_cube('APPS', 'HCP_PC_CUBE');
    exception
    when others then
    dbms_output.put_line('No HCP_PC_CUBE to drop');
    end;
    begin
    cwm2_olap_catalog.drop_catalog('HCP_PC_CAT');
    exception
    when others then
    dbms_output.put_line('No HCP_PC_CAT to drop');
    end;
    CWM2_OLAP_CUBE.Create_Cube('APPS', 'HCP_PC_CUBE', 'Parent Child Cube', 'Parent Child Cube','Parent Child Cube');
    cwm2_olap_cube.add_dimension_to_cube('APPS', 'HCP_PC_CUBE','APPS', 'HCP_DIM_PC');
    cwm2_olap_measure.create_measure('APPS', 'HCP_PC_CUBE', 'HCP_PC_MEASURE', 'PC Measure','PC Measure', 'PC Measure Fact');
    cwm2_olap_table_map.map_facttbl_levelkey('APPS','HCP_PC_CUBE','APPS','HCP_PC_FACT','ET', 'DIM:APPS.HCP_DIM_PC/HIER:HCP_DIM_PC_HIER/GID:GID/LVL:ALL_PARENT_LVL/COL:CHILD3;');
    cwm2_olap_table_map.Map_FactTbl_Measure('APPS', 'HCP_PC_CUBE','HCP_PC_MEASURE', 'APPS', 'HCP_PC_FACT', 'MEASURE_COL', 'DIM:APPS.HCP_DIM_PC/HIER:HCP_DIM_PC_HIER/GID:GID/LVL:CHILD3/COL:SHORT_DESCRIPTION;');
    cwm2_olap_catalog.create_catalog('HCP_PC_CAT', 'Parent Child Catalog');
    cwm2_olap_catalog.add_catalog_entity('HCP_PC_CAT', 'APPS', 'HCP_PC_CUBE', 'HCP_PC_MEASURE');
    cwm2_olap_validate.validate_cube('APPS', 'HCP_PC_CUBE','DEFAULT','YES');
    cwm2_olap_metadata_refresh.mr_refresh;
    exception
    when others then
    cwm_utility.dump_error;
    errtxt := cwm_utility.get_last_error_description;
    dbms_output.put_line('ERROR: ' || errtxt);
    rollback;
    raise;
    END;
    My Fact Table is :-
    DROP TABLE HCP_PC_FACT CASCADE CONSTRAINT;
    CREATE TABLE HCP_PC_FACT (
    SHORT_DESCRIPTION VARCHAR2(30) NOT NULL,
    GID NUMBER NOT NULL,
    CHILD1 VARCHAR2(30) NOT NULL,
    CHILD2 VARCHAR2(30) ,
    CHILD3 VARCHAR2(30) ,
    MEASURE_COL NUMBER NOT NULL);
    Data in Fact Table:-
    insert into HCP_PC_FACT values('Compliant',0,'All','Eligible','Compliant', 100);
    insert into HCP_PC_FACT values('Non-Compliant',0,'All','Eligible','Non-Compliant', 200);
    insert into HCP_PC_FACT values('Eligible',1,'All','Eligible',null, 300);
    insert into HCP_PC_FACT values('Ineligible',1,'All','Ineligible',null, 400);
    insert into HCP_PC_FACT values('All',3,'All',null,null, 500);
    I am not sure how to create level, level attr, dim attr for such dim.
    All CWM2 validation API shows that my all dims, cubes are valid but when I try to create presentation thru JDev it hangs after selecting Parent-Child Measure.
    Any complete working exapmle will be helpful.
    P.S. One more query I have can we have one solved and one un-solved dim in the same cube/measure?
    regds
    Prakash

  • How to create a cluster table and cluster view?

    Hi,
    Can anyone guide me in creation of cluster table in general and also creation of cluster view?

    Hi,
    check this links.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f0b7446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d0/999246b2aa11d1a5700000e82deaaa/content.htm
    Regard's
    SHAIK.

  • I am trying to create a new icloud and forgot everything about the old one, still asking me for the password of the old one

    I Want to create a new icloud account, but the one i have is causing alot of troubles. I forgot the password and the backup email becauase i facked the icloud. Mow every time i want to delete it but asks for the password

    Hi Boss alboss,
    Welcome to Apple Support Communities. 
    It sounds like you want to reset an iCloud account password. Take a look at the article linked below, it provides information and the available options for resetting the password. 
    iCloud: Change your iCloud password
    Cheers,
    -Jason 

  • Hello, having real trouble viewing the tablet and phone versions of my Muse created website on phone and tablet, everything shows the Desktop version. This is the second time Ive designed this site, after reading that redirecting links could cause trouble

    Help with using Adobe Muse CC

    There can be few reason for this, including page contents links or contents used in phone/tablet version.
    Please provide the site url , also try to publish the site as a trial site in Business Catalyst with all layouts which would help to isolate the issue.
    Thanks,
    Sanjit

  • Here's how to do ALV (OO) with dynamic fcat, int table and editable data

    Hi everybody
    Here's a more useful approach to ALV grid with OO using dynamic table, data NOT from DDIC, dynamic FCAT and how to get changed lines from the grid when ENTER key is pressed.
    It's really not too dificult but I think this is more useful than the ever present SFLIGHT methods from the demos.
    This also defines a subclass of cl_gui_alv_grid so you can access the protected attributes / methods of that class.
    You don't need to add the class via SE24 -- done fron this ABAP.
    When you run it click Edit for the first time.
    After editing data press ENTER and the break point should bring you into the relevant method.
    Code developed on NW2004S trial version but also works on rel 6.40 on a "Real" system.
    The code should work without any changes on any system >=6.40.
    All you need to do is to create a blank screen 100 via SE51  with a custom container on it called CCONTAINER1.
    The rest of the code can just be uploaded into your system using the SE38 upload facility.
    When running the program click on the EDIT button to enable the edit functionality of the grid.
    Change your data and when you press ENTER you should get the break-point where you can see the original table and changed rows.
    This program is actually quite general as it covers Dynamic tables, building a dynamic fcat where your table fields are NOT in the DDIC, intercepting the ENTER key via using an event, and accessing the protected attributes of the cl_gui_alv_grid by defining a subclass of this class in the abap.
    I've seen various questions relating to all these functions but none in my view ever answers the questions in a simple manner. I hope this simple program will answer all these and show how using OO ALV is actually quite easy and people shouldn't be scared of using OO.
    Have fun and award points if useful.
    Cheers
    Jimbo.
    <b>PROGRAM zdynfieldcat.
    Simple test of dynamic ITAB with user defined (not ddic) fields
    Build dynamic fcat
    use ALV grid to display and edit.
    *When edit mode set to 1 toolbar gives possibility of adding and
    *deleting rows.
    *Define subclass of cl_gui_alv_grid so we can use protected attributes
    *and methods.
    Add event handler to intercept user entering data and pressing the
    *ENTER key.
    When enter key is pressed get actual value of NEW table (all rows)
    rather than just the changed data.
    *use new RTTI functionality to retrieve internal table structure
    *details.
    Create a blank screen 100  with a custom container called CCONTAINER1.
    James Hawthorne
    include <icon>.
    define  any old internal structure  NOT in DDIC
    types: begin of s_elements,
           anyfield1(20) type c,
           anyfield2(20) type c,
           anyfield3(20) type c,
           anyfield4(20) type c,
           anyfield5(11) type n,
           end of s_elements.
    types:  lt_rows  type lvc_t_roid.
    Note new RTTI functionality allows field detail retrieval
    at runtime for dynamic tables.
    data:   wa_element type s_elements ,
            wa_data type s_elements,
            c_index type sy-index,
            c_dec2 type s_elements-anyfield5,
            wa_it_fldcat type lvc_s_fcat,
            it_fldcat type lvc_t_fcat,
            lr_rtti_struc TYPE REF TO cl_abap_structdescr,    "RTTI
            lt_comp TYPE cl_abap_structdescr=>component_table,"RTTI
            ls_comp LIKE LINE OF lt_comp,                     "RTTI
            zog  like line of lr_rtti_struc->components,      "RTTI
            struct_grid_lset type lvc_s_layo,
            l_valid  type c,
            new_table type ref to data.
    field-symbols: <dyn_table> type standard table,
                   <actual_tab> type standard table,
                   <fs1> type ANY,
                   <FS2> TYPE TABLE.
    data: grid_container1 type ref to cl_gui_custom_container.
    class lcl_grid_event_receiver definition deferred.
    data: g_event_receiver type ref to lcl_grid_event_receiver.
    data: ls_modcell type LVC_S_MODI,
          stab type ref to data,
          sdog type  s_elements.      .
    class lcl_grid_event_receiver definition.
      public section.
        methods:
        handle_data_changed
             for event data_changed of cl_gui_alv_grid
                 importing er_data_changed,
           toolbar for event toolbar of cl_gui_alv_grid
                     importing e_object
                               e_interactive,
          user_command for event user_command of cl_gui_alv_grid
                     importing e_ucomm.
    endclass.
    *implementation of Grid event-handler class
    class lcl_grid_event_receiver implementation.
    method handle_data_changed.
    code whatever required after data entry.
    various possibilites here as you can get back Cell(s) changed
    columns or the entire updated table.
    Data validation is also possible here.
    perform check_data using er_data_changed.
    endmethod.
    Method for handling all creation/modification calls to the toolbar
      method toolbar.
        data : ls_toolbar type stb_button.
    Define Custom Button in the toolbar
        clear ls_toolbar.
        move 0 to ls_toolbar-butn_type.
        move 'EDIT' to ls_toolbar-function.
        move space to ls_toolbar-disabled.
        move 'Edit' to ls_toolbar-text.
        move icon_change_text to ls_toolbar-icon.
        move 'Click2Edit' to ls_toolbar-quickinfo.
        append ls_toolbar to e_object->mt_toolbar.
        clear ls_toolbar.
        move 0 to ls_toolbar-butn_type.
        move 'UPDA' to ls_toolbar-function.
        move space to ls_toolbar-disabled.
        move 'Update' to ls_toolbar-text.
        move icon_system_save to ls_toolbar-icon.
        move 'Click2Update' to ls_toolbar-quickinfo.
        append ls_toolbar to e_object->mt_toolbar.
        clear ls_toolbar.
        move 0 to ls_toolbar-butn_type.
        move 'EXIT' to ls_toolbar-function.
        move space to ls_toolbar-disabled.
        move 'Exit' to ls_toolbar-text.
        move icon_system_end to ls_toolbar-icon.
        move 'Click2Exit' to ls_toolbar-quickinfo.
        append ls_toolbar to e_object->mt_toolbar.
      endmethod.
      method user_command.
        case e_ucomm .
          when 'EDIT'.          "From Tool bar
            perform set_input.
             perform init_grid.
          when 'UPDA'.          "From Tool bar
            perform refresh_disp.
            perform update_table.
          when 'EXIT'.          "From Tool bar
            leave program.
        endcase.
      endmethod.
    endclass.
    class zcltest definition inheriting from  cl_gui_alv_grid.
    define this as a subclass so we can access the protected attributes
    of the superclass cl_gui_alv_grid
    public section.
    methods: constructor, disp_tab.
    endclass.
    need this now to instantiate object
    as we are using subclass rather than the main cl_gui_alv_grid.
    class zcltest implementation.
    METHOD constructor.
    CALL METHOD super->constructor
            exporting i_appl_events = 'X'
               i_parent = grid_container1.
    endmethod.
    method disp_tab.
    FIELD-SYMBOLS: <outtab> TYPE STANDARD TABLE.
    break-point 1.
    mt_outtab is the data table held as a protected attribute
    in class cl_gui_alv_grid.
    ASSIGN me->mt_outtab->* TO <outtab>.  "Original data
    do whatever you want with <outtab>
    contains data BEFORE changes each time.
    Note that NEW (Changed) table has been obtained already by
    call to form check_data USING P_ER_DATA_CHANGED
             TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL.
    Entered data is in table defined by <fs2>
    In this method you can compare original and changed data.
    Easier than messing around with individual cells.
    do what you want with data in <fs2>  validate / update / merge etc
    endmethod.
    endclass.
    data :
        ok_code like sy-ucomm,
        save_ok like sy-ucomm,
        i4 type int4,
    Container Object [grid_container]
    now created via method constructor
    in the subclass zcltest.
    Control Object [grid]
    grid1 type ref to zcltest,
    Event-Handler Object [grid_handler]
    grid_handler type ref to lcl_grid_event_receiver.
    start-of-selection.
    call screen 100.
    module status_0100 output.
    now display it as grid
    if grid_container1 is initial.
        create object grid_container1
            exporting
              container_name = 'CCONTAINER1'.
        create object grid1.
         break-point 1.
        create object grid_handler.
        set handler:
           grid_handler->user_command for grid1,
           grid_handler->toolbar for grid1,
           grid_handler->handle_data_changed for grid1.
    perform create_dynamic_fcat.
    perform create_dynamic_itab.
    perform populate_dynamic_itab.
    perform init_grid.
    perform register_enter_event.
    set off ready for input initially
    i4 = 0.
      call method grid1->set_ready_for_input
             exporting
               i_ready_for_input = i4.
    endif.
    endmodule.
    module user_command_0100 input.
    *PAI not needed in OO ALV anymore as User Commands are handled as events
    *in method user_command.
    *we can also get control if the Data entered and the ENTER is pressed by
    *raising an event.
    Control then returns to method handle_data_changed.
    endmodule.
    form create_dynamic_fcat.
    get structure of our user table for building field catalog
    Use the RTTI functionality
    lr_rtti_struc ?= cl_abap_structdescr=>describe_by_data( wa_data ).
    Build field catalog just use basic data here
    colour specific columns as well
    loop at lr_rtti_struc->components into zog.
    c_index = c_index + 1.
    clear wa_it_fldcat.
      wa_it_fldcat-fieldname = zog-name .
      wa_it_fldcat-datatype =  zog-type_kind.
      wa_it_fldcat-inttype =   zog-type_kind.
      wa_it_fldcat-intlen =    zog-length.
      wa_it_fldcat-decimals =  zog-decimals.
      wa_it_fldcat-lowercase = 'X'.
      if c_index eq 2.
      wa_it_fldcat-emphasize = 'C411'.
         endif.
        if c_index eq 3.
      wa_it_fldcat-emphasize = 'C511'.
       endif.
      append wa_it_fldcat to it_fldcat .
    endloop.
    endform.
    form create_dynamic_itab.
    Create dynamic internal table and assign to field sysmbol.
    Use dynamic field catalog just built.
    call method cl_alv_table_create=>create_dynamic_table
                 exporting
                    it_fieldcatalog = it_fldcat
                 importing
                    ep_table        = new_table.
    assign new_table->* to <dyn_table>.
    endform.
    form populate_dynamic_itab.
    load up a line of the dynamic table
    c_dec2 = c_dec2 + 11.
    wa_element-anyfield1 = 'Tabbies'.
    wa_element-anyfield2 = 'ger.shepards'.
    wa_element-anyfield3  = 'White mice'.
    wa_element-anyfield4 =  'Any old text'.
    wa_element-anyfield5 =  c_dec2.
    append  wa_element to <dyn_table>.
    endform.
    form check_data USING P_ER_DATA_CHANGED
               TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL.
    Get altered data back
      ASSIGN   p_er_data_changed->mp_mod_rows TO <FS1>.
    stab =       p_er_data_changed->mp_mod_rows.
    ASSIGN STAB->* TO <FS2>.
    LOOP AT <FS2> INTO sdog.
    ALV grid display with altered data is now in <fs2>.
    do any extra processing you want here
    endloop.
    now display new table
    call method grid1->disp_tab.
    endform.
    form exit_program.
      call method grid_container1->free.
      call method cl_gui_cfw=>flush.
      leave program.
    endform.
    form refresh_disp.
      call method grid1->refresh_table_display.
    endform.
    form update_table.
    The dynamic table here is the changed table read from the grid
    after user has changed it
    Data can be saved to DB or whatever.
    loop at <dyn_table> into wa_element.
    do what you want with the data here
    endloop.
    switch off edit mode again for next function
    i4 = 0.
      call method grid1->set_ready_for_input
          exporting
              i_ready_for_input = i4.
    endform.
    form set_input.
    i4 = 1.
      call method grid1->set_ready_for_input
         exporting
           i_ready_for_input = i4.
    endform.
    form switch_input.
    if i4 = 1.
    i4 = 0.
    else.
    i4 = 1.
    endif.
      call method grid1->set_ready_for_input
         exporting
           i_ready_for_input = i4.
    endform.
    form init_grid.
    Enabling the grid to edit mode,
         struct_grid_lset-edit = 'X'. "To enable editing in ALV
         struct_grid_lset-grid_title  = 'Jimbos Test'.
         call method grid1->set_table_for_first_display
           exporting
             is_layout           = struct_grid_lset
           changing
             it_outtab             =  <dyn_table>
             it_fieldcatalog       =  it_fldcat.
    endform.
    form register_enter_event.
    call method grid1->register_edit_event
                   exporting
                      i_event_id = cl_gui_alv_grid=>mc_evt_enter.
    Instantiate the event or it won't work.
    create object g_event_receiver.
    set handler g_event_receiver->handle_data_changed for grid1.
    endform.</b>

    Hi there
    IE7 doesn't give me the add new page option and I get 404 error when trying to access the "How to contribute" section.
    I'll load up Firefox later (this browser usually works when IE7 doesn't always work properly).
    I'll copy the stuff to the wiki when I've got the browser sorted out.
    Cheers
    jimbp

  • To upload SH customers in Temporary table and create customers master in SAP

    Hope you are doing great ---Need you help/advice  on the below thought
    we receive  an excel file listing accounts that need to be set up as customer recipients I.E customer master in SAP system . we receive a file in the from of spread sheet and then we manually create the same in SAP system. Since this size of this indirect customers is growing day by day  business has decided to automate this process
    proposed solution-
    1.Modify the file received from external system  to format required for loading in SAP and add all the mandatory fields in the customer master
    2.Load the file into a temporary tablein SAP ( transaction code)
    3.verify the data and approve for actual customer creation in SAP ( create inbound idols  to create customer master data in SAP)
    4.check how many customers created in SAP with standard T.code
    From the step 3 above the idea is to create an an inbound idoc . Debmas and etc to create the customers in SAP system .
    Not sure how to go about this to achieve this functionality. I need to understand what all does it takes to  see this functionality work
    will be great help if any of you can forward me the technical specs or details if you have worked on the same
    Appreciate your help----
    Mohit

    Hi Mohit,
    I think you are mixing solutions. I think you don't need to create an inbound idoc, because this requirement could be achieve using a LSMW. Create a batch recording, use the Excel structure, even you could add the missing (necessary) fields to create the customer.  By standard, the LSMW will create a temporal table and will check duplicate customers, using for example the tax number (assuming this number can't be repeated).
    Another solution if you are planning to upload data directly from the source system, on this case you could use the inbound idoc.
    Regards.

Maybe you are looking for