All values in internal table are not displaing in the script print program

Hi,
I am calling the script program.In main window all values in the internal table are not displaying. I wrote
write-form statement in loop. But not all the values are getting displayed. Only thel ast values getting dispalyed. 
*& Report  ZSCRIPT_116719
REPORT  ZSCRIPT_116719.
************Table decleration***************
TABLES: mara, mbew, makt.
loop at i_makt into wa_makt.
  endloop.
loop at i_MARA into wa_mara.
  endloop.
LOOP AT I_MBEW INTO WA_MBEW.
  ENDLOOP.
lv_price = 0.
********************Total Price******************
  LOOP AT i_mbew INTO wa_mbew.
    lv_price = lv_price + wa_mbew-stprs.
  ENDLOOP.
end-of-selection.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
  APPLICATION                       = 'TX'
  ARCHIVE_INDEX                     =
  ARCHIVE_PARAMS                    =
  DEVICE                            = 'PRINTER'
  DIALOG                            = 'X'
   FORM                              = 'ZSCRIPT_719'
   LANGUAGE                          = SY-LANGU
  OPTIONS                           =
  MAIL_SENDER                       =
  MAIL_RECIPIENT                    =
  MAIL_APPL_OBJECT                  =
  RAW_DATA_INTERFACE                = '*'
  SPONUMIV                          =
IMPORTING
  LANGUAGE                          =
  NEW_ARCHIVE_PARAMS                =
  RESULT                            =
EXCEPTIONS
   CANCELED                          = 1
   DEVICE                            = 2
   FORM                              = 3
   OPTIONS                           = 4
   UNCLOSED                          = 5
   MAIL_OPTIONS                      = 6
   ARCHIVE_ERROR                     = 7
   INVALID_FAX_NUMBER                = 8
   MORE_PARAMS_NEEDED_IN_BATCH       = 9
   SPOOL_ERROR                       = 10
   CODEPAGE                          = 11
   OTHERS                            = 12
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'START_FORM'
EXPORTING
  ARCHIVE_INDEX          =
   FORM                   = 'ZSCRIPT_719'
   LANGUAGE               = SY-LANGU
  STARTPAGE              = ' '
   PROGRAM                = 'ZSCRIPT_116719'
  MAIL_APPL_OBJECT       =
IMPORTING
  LANGUAGE               =
EXCEPTIONS
  FORM                   = 1
  FORMAT                 = 2
  UNENDED                = 3
  UNOPENED               = 4
  UNUSED                 = 5
  SPOOL_ERROR            = 6
  CODEPAGE               = 7
  OTHERS                 = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*LOOP AT I_MBEW INTO WA_MBEW.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
   ELEMENT                        = 'DATA'
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'MAIN'
IMPORTING
  PENDING_LINES                  =
EXCEPTIONS
   ELEMENT                        = 1
   FUNCTION                       = 2
   TYPE                           = 3
   UNOPENED                       = 4
   UNSTARTED                      = 5
   WINDOW                         = 6
   BAD_PAGEFORMAT_FOR_PRINT       = 7
   SPOOL_ERROR                    = 8
   CODEPAGE                       = 9
   OTHERS                         = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*ENDLOOP.
If I give only one value it is showing the output. When I am fetching the data for range of values it i sshowing start_form is not there.
Plz let me know how to get the aa  internal table values  to be displayed

hi
I shortened your program a bit. So we can go to essentials of your question.
You said you put in it in a loop.
What i see in your prog is:
REPORT zscript_116719.
************table decleration***************
TABLES: mara, mbew, makt.
LOOP AT i_makt INTO wa_makt.
ENDLOOP.
LOOP AT i_mara INTO wa_mara.
ENDLOOP.
LOOP AT i_mbew INTO wa_mbew.
ENDLOOP.
lv_price = 0.
********************total price******************
LOOP AT i_mbew INTO wa_mbew.
  lv_price = lv_price + wa_mbew-stprs.
ENDLOOP.
END-OF-SELECTION.
  CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      form     = 'ZSCRIPT_719'
      language = sy-langu.
  CALL FUNCTION 'START_FORM'
    EXPORTING
      form     = 'ZSCRIPT_719'
      language = sy-langu
      program  = 'ZSCRIPT_116719'.
*LOOP AT I_MBEW INTO WA_MBEW.
  CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      element  = 'DATA'
      function = 'SET'
      type     = 'BODY'
      window   = 'MAIN'.
*endloop.
1. Your loop is not a loop with this '*' in front of it.
2. Are you printing &wa_mbew-???& variables in your sap-script
3. is itab I_MBEW properly filled
Let me know.
Gr. Frank

Similar Messages

  • Server 2010 SP2 - New values in lookup table are not updated in the user client

    Hello,
    I added a value to a lookup table in the PWA.
    Most users see the new value in the field based on this lookup table.
    One user doesn't see the update for 2 weeks now. He did close and opened the application over these 2 weeks.
    Any Idea?
    Thanks,
    Barak

    Hi Barak,
    I am assuming the issue is with PWA? Has the user tried to access PWA from a different machine/browser?Other things you can try are:
    - Reset IE settings
    - CTRL+F5 (on the page)
    If it is MS Project that doesn't have the new value, try closing MS Project and re-open it
    Hope this helps
    Paul

  • 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'

  • In InDesign, my script timers are not activated while the script is running

    Hello I have a utilioty plugin in InDesign which is done in ActionScript. This script is launched from inside the plugin dialogbox and does a long export operation. I'm trying to have a feedback of progression in the dialog box, while doing the export operation in the script.
    The problem I have is : if I create a flash.utils Timer to refresh the display, it is not triggered while the script is running ! Only when the script gives back control to InDesign, the timer is triggered and refreshes the display. Therefore, my progressbar displays blind during work, and flashes to 100% at the end. Quite useless.
    Does anybody know a way to get this working, apart from cutting the export operation in a few sub-operations which would be chained via successive timer events ?

    I ask again though: are you really sure the system won't wake from sleep to run maintenance scripts? The time in all of the logs from Onyx, from Maintidget and from the command prompt all say that the scripts are running at 3am(ish) for the daily and weekly scripts, and 5am(ish) for the monthly script - all times that my system is in sleep mode.
    Well, that is the information from Apple - I am not about to stay up all night to check it . FWIW, if those scripts are missed, the computer will not implode - I usually prefer to shut mine down and in that case, the scripts have to be run manually. I do that about once a month (or when I remember to do it)  and have been doing that for many years without any ill effects. Mac OS does not need the maintenance other systems do.
    http://support.apple.com/kb/HT2319

  • All columns of trinidad table are not coming up on page while its running

    Hi,
    I have put two trinidad tables on my page.But while the page is run, I am unable to see all the columns of the table.Only a few columns are visible.
    Also, though there are 5 rows in teh table ,there is a lot of gap below the tablespace.So the next table comes after a very big gap.
    How to solve the above two problems? Kindly let me know your valuable suggestions.
    Regards

    Hi santosh,
    Following is my code.I am providing only one column code(similarly there are 3 more columns),along with the table code.
    <tr:table value="#{phonebeannew.inputphone}" var="row"
    rows="#{bindings.phone.rangeSize}"
    inlineStyle="height:#{phonebeannew.rownumbers + 275}px"
    id="t1" width="100%">
    <tr:column sortProperty="phonetype" sortable="false"
    headerText="phonetype"
    id="c3" width="5px">
    <tr:inputText value="#{row.phonetype}"
    simple="true">
    I gave width as 5px but it doesnt make any difference in output.
    The 'phonebeannew' is our bean and inputphone is a property of it.input phone holds the array of values for the 4 columns.
    Kindly let me know if you want any further information which I can provide
    Regards

  • Internal table is not modifying

    Hi
    my internal table is not modifying..
    the code is like this:
    SELECT matnr ebeln lifnr
                          FROM eord
                              INTO CORRESPONDING FIELDS OF
                              TABLE it_eord_lfa1_tab
                              WHERE lifnr IN s_lifnr
                              AND matnr IN s_matnr.
                            AND werks IN s_werks
      IF sy-subrc EQ 0.
        LOOP AT it_eord_lfa1_tab INTO wa_eord_lfa1_tab .
          CLEAR l_name1.
          SELECT SINGLE name1
             FROM lfa1 INTO l_name1
             WHERE lifnr = wa_eord_lfa1_tab-lifnr.
            wa_zresult_tab1-ebeln = wa_eord_lfa1_tab-ebeln.
            wa_zresult_tab1-lifnr = wa_eord_lfa1_tab-lifnr.
            wa_zresult_tab1-name1 = l_name1.
            MODIFY it_zresult_tab1 FROM wa_zresult_tab1
            transporting ebeln lifnr name1.
    it_zresult_tab1 contians already some records I would like to modify the record with tranporting values...
    Please help me..

    LOOP AT it_eord_lfa1_tab INTO wa_eord_lfa1_tab .
    CLEAR l_name1.
    SELECT SINGLE name1
    FROM lfa1 INTO l_name1
    WHERE lifnr = wa_eord_lfa1_tab-lifnr.
    if sy-subrc = 0.
    <b>these 2 below values seems to be already in the internal table, again why you are transporting ?
    wa_zresult_tab1-ebeln = wa_eord_lfa1_tab-ebeln.
    wa_zresult_tab1-lifnr = wa_eord_lfa1_tab-lifnr.</b>
    wa_zresult_tab1-name1 = l_name1.
    <b>wa_eord_lfa1_tab-name1 = L_NAME1</b>
    MODIFY it_zresult_tab1 FROM wa_eord_lfa1_tab
      INDEX SY-TABIX
    transporting ebeln lifnr name1 .
    ENDLOOP.
    here i am not getting why you are using another workarea to modify the internal table as you already have an work area <b>wa_eord_lfa1_tab</b>. and i think its no need to modify EBELN and LIFNR as they are already been in the table.
    so the best way is if SY-SUBRC = 0 for that SELECT FROM LFA1 just pass L_NAME1 to wa_eord_lfa1_tab-name1  and MODIFY the internal table only with NAME1. others not required.
    Regards
    Srikanth
    Message was edited by: Srikanth Kidambi

  • Values of Formula Variables are not determined

    I have created a Purchase Order for services where the quantities for services line items are determined on the basis of predefined formulas. Values for all the variables are provided in PO and quantity is calculated on the basis of those values. When I try to adopt the services during the creation of Service Entry sheet with reference to PO, system shows the below error message:
    Please enter a value for variable(s) NO OF PERSONS (Form.Val.1)
    Message no. SE252
    Diagnosis
    You wish to have the system determine the quantity using a formula but have not entered any values for the variables in the formula.
    Procedure
    Maintain the values of the variables.
    Example
    For example, in a formula for calculating a volume, specify the values for the variables "length", "width", and "height".
    The values of formula variables are not adopted from the PO. Please suggest the solution or possible cause of error.

    I have gone through the note you suggested. But in my case each variable is created with specific name and assigned to the formulas.
    The formulas are getting adopted in RFQ but not in service entry sheet.
    Edited by: abapuser on Dec 21, 2010 6:46 AM

  • I need to add check whether 21 fields of a internal table are empty or not.

    Hello,
    I need to add check whether 21 fields of a internal table are empty or not.How can we write a code for the same wand what would be the correct syntax for it.
    I tried entering all the fields in the IF loop with AND condition but its giving syntax error.Perhaps this is because the lenght of the IF condition would be more than the allowed one.

    Hi,
    After the select quiery.
    If not itab is initial.
    Message 'Table is not empty'    type 'I'.
    Endif.
    Regards,
    Jagadish.

  • Measure Values are not shown in the pivot tables

    Measures without aggregation (in rpd) are not shown in pivot table.
    Im trying to add multiple columns in the fact table as measures,one which is summable had has the SUM function and three which are not summable.
    The initial report will be as follows and I have been able to get the data displayed.
    Year | Month| Company Name| SUM(C1)| C2|C3
    However if I pivot the table as follows data in column C2 and C3 are not Displayed.
    Columns
         Year     
              Month     
              Company     
    Rows                    
    Measure Lablel                    
    Measures
         SUM(C1)     
                   C2     
                   C3                    
    Should we have an aggregation rule applued in C2 and C3 ?

    Yes, all the column entries must have agg rule. You can specify one such as 'first' in the pivot table.

  • In the Dreamweaver brim Bindings, the recordset and all of the fields of the table are not EXHIBITED

    In the Dreamweaver brim Bindings, the recordset and all of the fields of the table are not EXHIBITED. I don't know if an option of configuration adjustment exists in Dreamweaver that corrects the problem. It is Dreamweaver CS4 - Version 10.0 build 4117.

    I have traced the problem to a corrupted profile.  When I captured the images in question, I also used Color Cherckr to create a profile for processing.  When I apply that profile to the adjustments I make, I can no longer "Edit In".  If I use another profile, even one that I created using Color Checkr at a different point in time, I don't have the issue.  Something seems to have corrupted the new profile.  I will re-create the profile and see if the issue is resolved.

  • Hi, I am new to Mac and i managed to install and configure all the services. Now my issue is when i sending mail using the local server to internal, mail are not receiving. Mail queue showing Connection refused error. Please help me

    I am new to Mac and i managed to install and configure all the services. Now my issue is when i sending mail using the local server to internal, mails are not receiving. Mail queue showing Connection refused error. Please help me
    Thanks
    GIRI

    Try this -> http://support.apple.com/kb/TA38632?viewlocale=en_US

  • Changes  are not reflecting in the table control in 2nd time

    Hi,
        In BSP Portal Asset management page, General,cost center, allocations ..etc tabs are there.and i have maintain button also in this page
    After filling all these things, when i  click the maintain button , the mandatory fields [General,costcenter,Eval1,Eval2]are displaying in the tablecontrol popup window,
    In the tablecontrol popup whatever i selected ,it is displaying fine..
              In the popup,save buttons is there.Once if i clicked the save button, popup will vanish and datas are stored in the internal table.and again it will come to portal main page.Now if i select the different values in the allocations dropdown, old vales are displaying in the tablecontrol popup. new dropdown values are not diaplying in the popup.what can i do?
    This is my code: popupdisplay.htm
    ==============
    <%
    * DATE CHANGE.....: 20/07/2007                                         *
    * AUTHOR..........: Mohan Pitchaimani (inmpi0)                         *
    * CHANGE DESCR....: DIsplay the popup when clicking the maintainbutton *
    * R/3 RELEASE...  : 2.1                                                *
    * MODIFICATION ID : MOD-001                                            *
    * RIFE/TPR/SCR No.: FSSE698 BSP Asset Mass Creation BSP Request form   *                                                *
    * RT/TRANSPORT....: 12403 / D94K969999                                 *
    %>
    <%--********************Begin of changes mod-001 on 20/07/2007 *****************--%>
    <%@page language="abap"%>
    <%@extension name="bsp" prefix="bsp" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <%@ extension name="/DS1/mdm" prefix="mdm" %>
    <%
    data :
            lt_columns     type /DS1/MDM_tt_table_control,
            ls_column      type /DS1/MDM_ms_table_control,
            l_onload       type string,
            lr_field       type ref to  /ds1/cl_mdm_bspfield_services,
            lw_maintain    type /ds1/fss_ms_popup,
            l_editable     type char1,
            lt_drop        type /ds1/mdm_tt_dropdowns,
            ls_sc          type /DS1/MDM_MS_F4_SEARCH_CRITERA,
            ls_rmap        type /DS1/MDM_MS_F4_RESULTS_MAP,
            ls_drop        type /ds1/mdm_ms_dropdown,
            l_number       type int4.
    %>
    <%--********************Close the window **************************************** --%>
    <%  data: event TYPE REF TO CL_HTMLB_EVENT.
              event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    %>
    <%
      if event is not initial.
        CASE event->id.
      WHEN 'con'.
    %>
    <script language="javascript">
    self.close();
    </script>
    <% endcase.
       endif.
    %>
    <%--************************ Popupdisplay ***************************************** --%>
    <htmlb:content design        = "design2002+design2003"
                   rtlAutoSwitch = "true"
                   forceEncode   = "ENABLED" >
    <htmlb:page title = "Maintain fields should be different from similar assets">
    <script type="text/javascript" language="JavaScript" src="../MDM_GENERIC/Javascript/MDM_Generic.js"></script>
    <%@ include file = "asst_scripts_change.htm" %>
    <%@ include file = "../MDM_GENERIC/TableControlStyleInclude.xml" %>
    <%   delete controller->r_asset_data->T_MAINTAIN where TXT50 = space. %>
    <% if controller->r_asset_data->t_maintain is  initial.
         lw_maintain-TXT50 = controller->r_asset_data->w_generaldata-DESCRIPT.
         lw_maintain-INVNR = controller->r_asset_data->w_generaldata-INVENT_NO.
         lw_maintain-kostl = controller->r_asset_data->w_timedependantdata-costcenter.
         lw_maintain-ORD41 = controller->r_asset_data->w_allocations-EVALGROUP1.
         lw_maintain-ORD42 = controller->r_asset_data->w_allocations-EVALGROUP2.
         lw_maintain-ORD43 = controller->r_asset_data->w_allocations-EVALGROUP3.
         lw_maintain-ORD44 = controller->r_asset_data->w_allocations-EVALGROUP4.
         lw_maintain-GDLGRP = controller->r_asset_data->w_allocations-EVALGROUP5.%>
    <%--******************** Appending the maintained values *************************** --%>
    <%
            if controller->r_asset_data->G_NO_ASSETS NE space.
                clear l_number.
                DO controller->r_asset_data->G_NO_ASSETS TIMES.
                    l_number = l_number + 1.
                    lw_maintain-SERNR = l_number.
                    APPEND lw_maintain TO controller->r_asset_data->t_maintain.
                ENDDO.
            else.
                DO controller->r_asset_data->g_no_similarsubno TIMES.
                    APPEND lw_maintain TO controller->r_asset_data->t_maintain.
                ENDDO.
            endif.
            controller->G_POPUP_FLAG = 'X'.
        endif.
    %>
    <%--******************** VAlidations for the Requester and Approver screen *************************** --%>
    <% if  controller->ms_request_header-req_status = '00'.
        ls_column-columnname = 'SERNR'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
    endif. %>
    <% if  controller->ms_request_header-req_status = '05'.
        ls_column-columnname = 'SERNR'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'TXT50'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'INVNR'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'KOSTL'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
    endif. %>
    <% if  controller->ms_request_header-req_status = '06'.
         ls_column-columnname = 'SERNR'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'TXT50'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'INVNR'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'KOSTL'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'ORD41'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'ORD42'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'ORD43'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'ORD44'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
        ls_column-columnname = 'GDLGRP'.
        ls_column-no_edit = 'X'.     
        append ls_column to lt_columns.
        clear ls_column.
    endif.
    %>
    <% if  controller->ms_request_header-req_status = '00'. %>
      <html>
    <body>
      <p>
        You can Maintain/Edit details of Similar Assets/Similar Sub - Assets . Click confirm to maintain the entries
    </p>
    </body>
    </html>
    <%    elseif controller->ms_request_header-req_status <> '00'. %>
    <html>
    <body>
      <p>You can view details of of Similar Assets/Similar Sub - Assets.
    </p>
    </body>
    </html>
    <% endif.%>
    <htmlb:form id='frmMain' >
       <htmlb:group>
       <htmlb:groupBody>
       <htmlb:gridLayout columnSize ="2"
                      rowSize    ="15"
                      width      ="150%">
       <htmlb:gridLayoutCell columnIndex="2" rowIndex="1" horizontalAlignment="left" verticalAlignment="top" width="200" wrapping="false">
       <%
      ls_column-columnname     = 'TXT50'.
      ls_column-input_type     = '1'.
      ls_column-data_type      = '1'.
      APPEND ls_column TO lt_columns.
      CLEAR ls_column.
      ls_column-columnname     = 'INVNR'.
      ls_column-input_type     = '1'.
      ls_column-data_type      = '1'.
      APPEND ls_column TO lt_columns.
      CLEAR ls_column.
    * build F4 Search sceen
      ls_sc-field_name = 'KOKRS'.
      ls_sc-data_element = 'KOKRS'.
      ls_sc-f4_from_data_element = 'X'.
      ls_sc-value = 'OP01'.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'BUKRS'.
      ls_sc-data_element = 'BUKRS'.
      ls_sc-f4_values =  /DS1/CL_MDM_F4_VALUES=>GET_VALUES_FOR_COCE_COMPANY( ).
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'KOSTL'.
      ls_sc-data_element = 'KOSTL'.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'KOSAR'.
      ls_sc-data_element = 'KOSAR'.
      ls_sc-f4_from_data_element = 'X'.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'VERAK'.
      ls_sc-data_element = 'VERAK'.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'LTEXT'.
      ls_sc-data_element = 'KLTXT'.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'SPRAS'.
      ls_sc-data_element = 'SPRAS'.
      ls_sc-f4_values = /DS1/CL_MDM_F4_VALUES=>GET_VALUES_FOR_LANGU( ).
      ls_sc-value = sy-langu.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'TELX1'.
      ls_sc-data_element = 'TELX1'.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'FUNC_AREA'.
      ls_sc-data_element = 'FKBER'.
      ls_sc-f4_from_data_element = 'X'.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'PRCTR'.
      ls_sc-data_element = 'PRCTR'.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
      ls_sc-field_name = 'REGIO'.
      ls_sc-data_element = 'REGIO'.
      append ls_sc to ls_column-lookup_params-searchcriteria.
      clear: ls_sc.
    * set parameters for f4 lookup
      ls_column-lookup_params-POPUPHEIGHT = '550'.
      ls_column-lookup_params-POPUPWIDTH = '750'.
      ls_column-lookup_params-SEARCHMAXRESULTS = '500'.
      ls_column-lookup_params-SEARCHRESULTSKEY = 'KOSTL'.
      ls_column-lookup_params-SEARCHTABLE = 'CSKS'.
    * Set Column for Cost center
      ls_column-columnname     = 'KOSTL'.
      ls_column-input_type     = '4'.
      ls_column-data_type      = '1'.
      ls_column-tooltip_fom_de = 'X'.
      ls_column-scrollable     = ' '.
      ls_column-length         = '15'.
      ls_column-maxlength      = '15'.
      ls_column-halign         = 'RIGHT'.
      ls_column-valign         = 'TOP'.
      APPEND ls_column TO lt_columns.
      CLEAR ls_column.
    * Set Column for Evaluation group 1
          ls_drop-dropdown_id = 'evlg1'.
          ls_drop-values_tab = /DS1/CL_MDM_F4_VALUES=>GET_VALUES_FOR_EVALGRP1( im_group = '1'
                                      im_bukrs = controller->R_ASSET_DATA->W_KEY-COMPANYCODE ).
          append ls_drop to lt_drop.
          ls_column-columnname     = 'ORD41'.
          ls_column-input_type     = '2'.
          ls_column-DROPDOWN_ID     = 'evlg1'.
          APPEND ls_column TO lt_columns.
          CLEAR ls_column.
    * Set Column for Evaluation group 2
          ls_drop-dropdown_id = 'evlg2'.
          ls_drop-values_tab = /DS1/CL_MDM_F4_VALUES=>GET_VALUES_FOR_EVALGRP1( im_group = '2'
                                     im_bukrs = controller->R_ASSET_DATA->W_KEY-COMPANYCODE ).
          append ls_drop to lt_drop.
          ls_column-columnname     = 'ORD42'.
          ls_column-input_type     = '2'.
          ls_column-DROPDOWN_ID     = 'evlg2'.
          APPEND ls_column TO lt_columns.
          CLEAR ls_column.
    * Set Column for Evaluation group 3
      ls_drop-dropdown_id = 'evlg3'.
      ls_drop-values_tab = /DS1/CL_MDM_F4_VALUES=>GET_VALUES_FOR_EVALGRP1( im_group = '3'
                                     im_bukrs = controller->R_ASSET_DATA->W_KEY-COMPANYCODE ).
      append ls_drop to lt_drop.
      ls_column-columnname     = 'ORD43'.
      ls_column-input_type     = '2'.
      ls_column-DROPDOWN_ID     = 'evlg3'.
      APPEND ls_column TO lt_columns.
      CLEAR ls_column.
    * Set Column for Evaluation group 4
      ls_drop-dropdown_id = 'evlg4'.
      ls_drop-values_tab = /DS1/CL_MDM_F4_VALUES=>GET_VALUES_FOR_EVALGRP1( im_group = '4'
                                     im_bukrs = controller->R_ASSET_DATA->W_KEY-COMPANYCODE ).
      append ls_drop to lt_drop.
      ls_column-columnname     = 'ORD44'.
      ls_column-input_type     = '2'.
      ls_column-DROPDOWN_ID     = 'evlg4'.
      APPEND ls_column TO lt_columns.
      CLEAR ls_column.
    * Set Column for Evaluation group 5
      ls_drop-dropdown_id = 'evlg5'.
      ls_drop-values_tab = controller->GET_VALUES_FOR_EVALGRP5( im_bukrs = controller->R_ASSET_DATA->W_KEY-COMPANYCODE ) .
      append ls_drop to lt_drop.
      ls_column-columnname     = 'GDLGRP'.
      ls_column-input_type     = '2'.
      ls_column-DROPDOWN_ID     = 'evlg5'.
      APPEND ls_column TO lt_columns.
      CLEAR ls_column.
    * Input type
    *1     Text box
    *2     Drop down
    *3     Checkbox
    *4     F4 Lookup
    *5     HTML
    *6     Text just displayed
    *7     Date
    *8     Link
    *9     Time
    * Data type
    *1     String
    *2     Numeric
    *3     Date
    *4     Time
    %>
    <%---------------- TableControl display in the popupwindow --------------------------%>
       <mdm:tableControl table="<%=controller->r_asset_data->t_maintain%>"
                               id="tv1"
                               width="650"
                               no_buttons = "X"
                               height="330"
                               columns="<%=lt_columns%>"
                               dropdowns= "<%= lt_drop %>"
                               title="Maintain Asset"    >
       </mdm:tableControl>
      </htmlb:gridLayoutCell>
      </htmlb:gridLayout>
      <input type="hidden" name="renderedtv1" value= "rendered-tv1"  />
    <%---------------- Confirm Button-------------------------------- --%>
    <htmlb:button id="con"
                   design="STANDARD"
                   width="15"
                   text = "Confirm" onClick="confirm"
                   onClientClick = "self.close()"/>
    <%---------------- Cancel Button-------------------------------- --%>
    <htmlb:button id="cancel"
                   design="STANDARD"
                   width="15"
                   text = "Cancel"
                   onClientClick = "self.close()"/>
    </htmlb:groupBody>
    </htmlb:group>
    </htmlb:form>
    </htmlb:page>
    </htmlb:content>
    <%--********************End of changes mod-001 on 20/07/2007 *****************--%>
    Message was edited by:
            Durairaj Athavan Raja
        --formatting

    Hi Mohan,
    Please use the formatting options to format ur question...!!
    Thanks,
    Tatvagna.

  • OO  ALV  displaying  without  Values  despite Internal  table contains

    My   below  OO  ALV  displaying  without  Values  despite Internal  table contains  the values ...
    Help  please ...
    REPORT zsd_concession1  NO STANDARD PAGE HEADING
                            LINE-SIZE 285
                            LINE-COUNT 64
                            MESSAGE-ID zz.
    Program Description ******************************
    This report is to Calculate consession against Quotations
    complying  standards for enhanced Performance, Readability &
    Maintenance.
    Change Log *********************************
    Remedy # /       Who       When        Why / What
    Transport #
    CLASS lcl_event_handler DEFINITION DEFERRED.
    *&      Data Definitions .
    DATA: BEGIN OF vbap_wa,
                vbeln               TYPE  vbak-vbeln,           "Quotation#
                erdat               TYPE  vbak-erdat,           "Quot date
                knumv               TYPE  vbak-knumv,           "Cond Rec#
                posnr               TYPE  vbap-posnr,           "Line Item
                matnr               TYPE  vbap-matnr,           "Mat#
                zansicat            TYPE  zmarall-zansicat,     "AnsiCat#
                zansigrd            TYPE  zmarall-zansigrd,     "Grade
                zcurrvaltnarea      TYPE  zco002-zcurrvaltnarea,"Val Area
                zcurrcstusd         TYPE  zco002-zcurrcstusd,   "Cost$
                zzbrndnm            TYPE  mara-zzbrndnm,        "Brand
                zqedscgrp           TYPE  zglbprc-zqedscgrp, "QE Disc Grp
                mstav               TYPE  mara-mstav,        "Status
                kwmeng              TYPE  vbap-kwmeng,       "Qty
                lprc                TYPE  konv-kbetr,  "List Price ZBP1
                sprc                TYPE  konv-kbetr,  "Std Pric ZNAA,ZNAX
                netpr               TYPE  vbap-netpr,  "Quot price
                mrgn                TYPE  konv-kbetr,  "margin%
           END   OF vbap_wa,
           BEGIN OF konv_wa,
                knumv               TYPE  konv-knumv,  "Cond#
                kposn               TYPE  konv-kposn,  "Cond Item#
                kappl               TYPE  konv-kappl,  "Applic
                kschl               TYPE  konv-kschl,  "Cond Typ
                kbetr               TYPE  konv-kbetr,  "Price ZBP1,ZNAA,ZNAX
           END   OF  konv_wa,
           BEGIN OF vbpa_wa,
                vbeln               TYPE  vbpa-vbeln,  "Quot#
                posnr               TYPE  vbpa-posnr,  "Item#
                parvw               TYPE  vbpa-parvw,  "Prt Fn
                kunnr               TYPE  vbpa-kunnr,  "Cust#
           END   OF  vbpa_wa,
           BEGIN OF result_wa,
                posnr               TYPE  vbap-posnr,           "Line Item
                matnr               TYPE  vbap-matnr,           "Mat#
                zansicat            TYPE  zmarall-zansicat,     "AnsiCat#
                zansigrd            TYPE  zmarall-zansigrd,     "Grade
                zcurrvaltnarea      TYPE  zco002-zcurrvaltnarea,"Val Area
                zcurrcstusd         TYPE  zco002-zcurrcstusd,   "Cost$
                zzbrndnm            TYPE  mara-zzbrndnm,        "Brand
                zqedscgrp           TYPE  zglbprc-zqedscgrp, "QE Disc Grp
                mstav               TYPE  mara-mstav,        "Status
                kwmeng              TYPE  vbap-kwmeng,       "Qty
                lprc                TYPE  konv-kbetr,  "List Price ZBP1
                sprc                TYPE  konv-kbetr,  "Std Pric ZNAA,ZNAX
                netpr               TYPE  vbap-netpr,  "Quot price
                mrgn                TYPE  konv-kbetr,  "margin%
           END   OF result_wa.
    DATA: ikonv      LIKE  STANDARD TABLE OF konv_wa,
          ivbap      LIKE  STANDARD TABLE OF vbap_wa,
          ivbpa      LIKE  STANDARD TABLE OF vbpa_wa,
          iresult    LIKE  STANDARD TABLE OF result_wa.
    *Work storage
    DATA: BEGIN OF ws,
             vbeln       TYPE vbak-vbeln,
             ok_code     TYPE sy-ucomm,
             alv_save    TYPE c,   "ALV save
             alv_variant TYPE disvariant, "ALV Variant
             alv_sort    TYPE lvc_t_sort, "Sort table
          END  OF ws.
    *Data declarations for ALV Main list
    DATA : ty_lay1        TYPE        lvc_s_layo,
           it_fieldcat    TYPE        lvc_t_fcat ,
           ty_fieldcat    TYPE        lvc_s_fcat ,
           l_smenu        TYPE REF TO cl_ctmenu,
           c_alv1         TYPE REF TO cl_gui_alv_grid,
           c_cont1        TYPE REF TO cl_gui_custom_container,
           e_dclick       TYPE REF TO lcl_event_handler.
    *Data declarations for ALV Interactive list
    DATA : ty_lay2        TYPE        lvc_s_layo,
           it_fcat        TYPE        lvc_t_fcat ,
           ty_fcat        TYPE        lvc_s_fcat ,
           c_alv2         TYPE REF TO cl_gui_alv_grid,
           c_cont2        TYPE REF TO cl_gui_custom_container.
    *Field-Symbols
    FIELD-SYMBOLS:
          <konv>  LIKE   konv_wa,
          <vbap> LIKE   vbap_wa.
    *Constants
    CONSTANTS:
          c_end_row    TYPE  i  VALUE  65000.
    *CLASS lcl_event_receiver DEFINITION
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
         handle_double_click
         FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row.
    ENDCLASS. "lcl_event_handler DEFINITION
    *CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD handle_double_click.
        DATA: sec_wa LIKE LINE OF iresult.
    *Reading the selected data into a variable
        READ TABLE iresult INDEX e_row-index INTO sec_wa.
    *Select the field details of the selected table
    SELECT * FROM dd03l INTO CORRESPONDING FIELDS OF TABLE it_dd03l
    WHERE tabname EQ ls_dd02l-tabname.
    *Calling the ALV containing the field values
        CALL SCREEN 101.
      ENDMETHOD. "handle_double_click
    ENDCLASS. "lcl_event_handler IMPLEMENTATION
    *&      SELECTION-SCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE  text-001.
    SELECT-OPTIONS:
        s_vbeln  FOR  ws-vbeln DEFAULT '2002354788' OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK a.
    INITIALIZATION.
      PERFORM setup_screen_defaults.
    START-OF-SELECTION.
      PERFORM gather_report_data.
    END-OF-SELECTION.
      PERFORM create_output.
    *&      Form  initialization
    FORM setup_screen_defaults.
      CLEAR: ws, konv_wa, vbap_wa, vbpa_wa.
      REFRESH: ivbpa, ikonv, ivbap, iresult.
    ENDFORM.                    " setup_screen_defaults
    *&      Form  gather_report_data
    FORM  gather_report_data.
      SELECT  vbeln posnr parvw kunnr
               INTO TABLE ivbpa
               FROM vbpa
               WHERE vbeln IN s_vbeln
               AND ( parvw = 'SP' OR "SoldTO
                     parvw = 'WE' OR "ShipTo
                     parvw = 'ZT' ). "Top Parent
      SELECT  vkvbeln vkerdat vkknumv vpposnr vp~matnr
              z1zansicat z1zansigrd z2~zcurrvaltnarea
              z2zcurrcstusd m1zzbrndnm zg~zqedscgrp
              m1mstav  vpkwmeng  vp~netpr
        INTO CORRESPONDING FIELDS OF TABLE ivbap
        FROM  vbak  AS vk
        INNER JOIN vbap AS vp
           ON vpvbeln = vkvbeln
        INNER JOIN zmarall AS z1
           ON z1matnr = vpmatnr
        INNER JOIN zco002 AS z2
           ON z2matnr = vpmatnr
        INNER JOIN zglbprc AS zg
           ON zgmatnr = vpmatnr
        INNER JOIN mara AS m1
           ON m1matnr = vpmatnr
        WHERE  vk~vbeln IN s_vbeln
        AND    vk~auart = 'AG'."AG = Quot
      SORT ivbap BY posnr matnr.
      SELECT  kvknumv kvkposn kvkappl kvkschl kv~kbetr
              INTO TABLE ikonv
              FROM  konv AS kv
              FOR ALL ENTRIES IN ivbap
              WHERE  kv~knumv = ivbap-knumv
              AND    kv~kposn = ivbap-posnr
              AND    kv~kappl EQ 'V'
              AND    ( kv~kschl EQ 'ZBP1'
                   OR kv~kschl EQ 'ZNAX'
                   OR kv~kschl EQ 'ZNAA' ).
      SORT ikonv BY knumv kposn.
      LOOP AT  ivbap  ASSIGNING  <vbap>.
        CLEAR konv_wa.
        READ TABLE ikonv INTO  konv_wa WITH KEY
                                   knumv = <vbap>-knumv
                                   kposn = <vbap>-posnr
                                   kschl = 'ZBP1'
                                   BINARY  SEARCH.
        IF sy-subrc EQ 0.
          <vbap>-lprc = konv_wa-kbetr.
        ENDIF.
        READ TABLE ikonv INTO  konv_wa WITH KEY
                                   knumv = <vbap>-knumv
                                   kposn = <vbap>-posnr
                                   kschl = 'ZNAX'
                                   BINARY  SEARCH.
        IF sy-subrc EQ 0.
          <vbap>-sprc = konv_wa-kbetr.
        ENDIF.
        READ TABLE ikonv INTO  konv_wa WITH KEY
                                   knumv = <vbap>-knumv
                                   kposn = <vbap>-posnr
                                   kschl = 'ZNAA'
                                   BINARY  SEARCH.
        IF sy-subrc EQ 0.
          <vbap>-sprc = konv_wa-kbetr.
        ENDIF.
      ENDLOOP.
      SORT ivbap BY posnr matnr.
      LOOP AT ivbap INTO vbap_wa.
        MOVE-CORRESPONDING  vbap_wa TO result_wa.
        APPEND  result_wa TO iresult.
        CLEAR:  vbap_wa, result_wa.
      ENDLOOP.
    ENDFORM.                    " gather_report_data
    *&      Form  create_output
    FORM create_output.
      CALL SCREEN 100.
    FREE: iresult.
    ENDFORM.                    " create_output
    *&      Module  PBO_0100  OUTPUT
          text
    MODULE pbo_0100 OUTPUT.
      SET PF-STATUS '0100'.
      SET TITLEBAR '0100'.
      IF c_cont1 IS INITIAL.
    *Creating object of container
        CREATE OBJECT c_cont1
         EXPORTING
           container_name = 'CCONT1'.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *Creating object of alv
        CREATE OBJECT c_alv1
           EXPORTING
            i_parent = c_cont1.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *Alv layout
        PERFORM alv_100_layout.
        PERFORM save_alv_layout.
    *Alv field catalogue
        PERFORM alv_100_fieldcat.
    *Displaying the ALV grid
        CALL METHOD c_alv1->set_table_for_first_display
          EXPORTING
            is_layout       = ty_lay1
            i_save          = ws-alv_save
            is_variant      = ws-alv_variant
          CHANGING
            it_outtab       = iresult[]
            it_sort         = ws-alv_sort
            it_fieldcatalog = it_fieldcat[].
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *Create object of the event class
    *and setting handler for double click
        CREATE OBJECT e_dclick.
        SET HANDLER e_dclick->handle_double_click FOR c_alv1.
      ENDIF.
    ENDMODULE.                 " PBO_0100  OUTPUT
    *&      Module  PAI_0100  INPUT
          text
    MODULE pai_0100 INPUT.
      ws-ok_code = sy-ucomm.
      CASE ws-ok_code.
        WHEN 'BACK'.
          CALL  SELECTION-SCREEN  1000.
          CLEAR ws-ok_code.
        WHEN 'EXIT'.
          LEAVE TO  SCREEN  0.
          CLEAR ws-ok_code.
          EXIT.
        WHEN 'CANCEL'.
          LEAVE TO  SCREEN  0.
          CLEAR ws-ok_code.
          EXIT.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                 " PAI_0100  INPUT
    *&      Form  alv_100_layout
          text
    -->  p1        text
    <--  p2        text
    FORM alv_100_layout.
      ty_lay1-numc_total = 'X'. " Numc total line
    ty_lay1-cwidth_opt = 'X'. " Optimal column width
      ty_lay1-detailinit = 'X'. " Show values that are initial in
      ty_lay1-sel_mode = 'A'. " Column selection mode
      ty_lay1-no_merging = 'X'. " No merging while sorting columns
      ty_lay1-keyhot     = 'X'.
      ty_lay1-grid_title = 'SD Concessions'.
      ty_lay1-zebra      = 'X'.
      ty_lay1-no_toolbar = ' '.
    ENDFORM.                    " alv_100_layout
    *&      Form  alv_100_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM alv_100_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 1.
      ty_fieldcat-fieldname = 'posnr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Item#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 2.
      ty_fieldcat-fieldname = 'matnr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Mat#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 3.
      ty_fieldcat-fieldname = 'zansicat'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'AnsiCat#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 4.
      ty_fieldcat-fieldname = 'zansigrd'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Grade'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 5.
      ty_fieldcat-fieldname = 'zcurrvaltnarea'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Val Area'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 6.
      ty_fieldcat-fieldname = 'zcurrcstusd'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Cost $'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 7.
      ty_fieldcat-fieldname = 'zzbrndnm'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Brand'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 8.
      ty_fieldcat-fieldname = 'zqedscgrp'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'QE'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 9.
      ty_fieldcat-fieldname = 'mstav'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Status'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 9.
      ty_fieldcat-fieldname = 'kwmeng'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Qty'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 10.
      ty_fieldcat-fieldname = 'lprc'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'List Price'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 11.
      ty_fieldcat-fieldname = 'sprc'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Discount'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 12.
      ty_fieldcat-fieldname = 'netpr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Quot Price'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 13.
      ty_fieldcat-fieldname = 'mrgn'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Margin%'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
    ENDFORM.                    " alv_100_fieldcat
    *&      Module  PBO_0101  OUTPUT
          text
    MODULE pbo_0101 OUTPUT.
    *Check if the Custom container exists.
      IF c_cont2 IS INITIAL.
    *Creating container object
        CREATE OBJECT c_cont2
          EXPORTING
            container_name = 'CCONT2'.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *creating ALV grid for interactive list
        CREATE OBJECT c_alv2
          EXPORTING
           i_parent = c_cont2.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *ALV layout
        PERFORM alv_101_layout.
    *ALV fieldcatalogue
        PERFORM alv_101_fieldcat.
    *Sorting the output by field position
        SORT iresult BY posnr.
    *ALV for display field details
        CALL METHOD c_alv2->set_table_for_first_display
          EXPORTING
            is_layout       = ty_lay2
          CHANGING
            it_outtab       = iresult[]
            it_fieldcatalog = it_fieldcat.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " PBO_0101  OUTPUT
    *&      Module  PAI_0101  INPUT
          text
    MODULE pai_0101 INPUT.
    ENDMODULE.                 " PAI_0101  INPUT
    *&      Form  alv_101_layout
          text
    -->  p1        text
    <--  p2        text
    FORM alv_101_layout.
      ty_lay2-grid_title = 'Line Details'.
      ty_lay2-zebra = 'X'.
      ty_lay2-no_toolbar = 'X'.
    ENDFORM.                    " alv_101_layout
    *&      Form  alv_101_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM alv_101_fieldcat.
      REFRESH it_fieldcat.
    REFRESH it_fcat.
    CLEAR ty_fcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 1.
      ty_fieldcat-fieldname = 'posnr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Item#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 2.
      ty_fieldcat-fieldname = 'matnr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Mat#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 3.
      ty_fieldcat-fieldname = 'zansicat'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'AnsiCat#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 4.
      ty_fieldcat-fieldname = 'zansigrd'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Grade'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 5.
      ty_fieldcat-fieldname = 'zcurrvaltnarea'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Val Area'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
    ENDFORM.                    " alv_101_fieldcat
    *&      Form  save_alv_layout
          text
    -->  p1        text
    <--  p2        text
    form save_alv_layout.
    ws-alv_save = 'A'.
    ws-alv_variant-report = sy-repid.
    endform.                    " save_alv_layout

    Hello
    Creating fieldcatalogs manually is one of the major error sources in ALV programming.
    There is hardly any reason why NOT to use the standard-fm LVC_FIELDCATALOG_MERGE in order to create a proper fieldcatalog.
    If you need some modification of the standard fieldcatalog (e.g. renaming of columns, etc.) just do your post-processing after calling the fm.
    Regards
      Uwe

  • Populating values to internal table created dynamically

    Hi,
    I am creating an internal table(it1) dynamically and assigned it to a field symbol. now i want to upload values
    which are present in a field of another internal table being populated from a Funct Module.Could you tell me
    how to assign those values across the fields of field symbol?
    loop at itab_char.
    LS_ALV_CAT-FIELDNAME = itab_char-charact.
    append LS_ALV_CAT to I_ALV_CAT.
    endloop.
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
      EXPORTING
        IT_FIELDCATALOG = I_ALV_CAT
      IMPORTING
        EP_TABLE        = D_REF.
    ASSIGN D_REF->* TO <F_FS>.
    (Above my int tab is generated and now stored in <f_FS>)
    loop at itab into w_lifnr.
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
      EXPORTING
       CLASS                      = p_cname
       CLASSTYPE                  = w_ctype
       OBJECT                     = w_lifnr
      TABLES
        T_CLASS                    = t_class
        T_OBJECTDATA               = t_objectdata
    w-lifnr is vendor number. and here we are populating t_objectdata with that vendor related datas. now i want to pass t_objectdata-ausp1 values for each vendor across the fields in <F_FS>.
    FIELD-SYMBOLS : <F_FS> TYPE TABLE.
    Please refer me the solution to this problem.
    Thanks

    Check below code and try to add in ur code....
        IF NOT it_bom_expl[] IS INITIAL.
    The material number data varies from run to run. For this purpose
    the data is been used to build dynamic internal table which stores the
    material number data along the x-axis
          PERFORM build_matnr_table.
    The material numbers data which is stored in the temp internal table
    is been assigned to the dynamic internal table created along the
    x-axis for the materials
          PERFORM assign_matnr_val_fields.
    The component data which is stored in the internal table needs to be
    moved to the dynamic internal table
          PERFORM move_bom_data_to_matnr_table.
    *&      Form  build_matnr_table
    Using the material number data the dynamic internal tables are been
    built which holds the material number data along x-axis. Here the
    first 3 columns are always constant which are Components-List,
    Description, Count. From 4th column it depends on number of materials
    FORM build_matnr_table .
      DATA: l_val(3) TYPE n,
            lf_mat(18) TYPE c.
    Moving the Components-List details to the internal table 1st column
    which will be used for creation of dynamic internal table
      CLEAR gf_xfc.
      gf_xfc-fieldname = text-t03.
      gf_xfc-datatype = c_val_c.
      gf_xfc-inttype = c_val_c.
      gf_xfc-intlen = 18.
      gf_xfc-decimals = 0.
      APPEND gf_xfc TO gf_ifc.
      APPEND gf_xfc TO gf_ipc.
      CLEAR gf_xfc.
    Moving the Description details to the internal table 2nd column
    which will be used for creation of dynamic internal table
      gf_xfc-fieldname = text-t04.
      gf_xfc-datatype = c_val_c.
      gf_xfc-inttype = c_val_c.
      gf_xfc-intlen = 40.
      gf_xfc-decimals = 0.
      APPEND gf_xfc TO gf_ipc.
      CLEAR gf_xfc.
    Moving the Count details to the internal table 3rd column which will
    be used for creation of dynamic internal table
      gf_xfc-fieldname = text-t05.
      gf_xfc-datatype = c_val_c.
      gf_xfc-inttype = c_val_c.
      gf_xfc-intlen = 5.
      gf_xfc-decimals = 0.
      APPEND gf_xfc TO gf_ifc.
      APPEND gf_xfc TO gf_ipc.
    Moving the Material numbers are moved to the internal table from 4th
    column onwards till all the material numbers are moved to the columns
    which will be used for creation of dynamic internal table. Here
    columns will be reffered to as Material001 ..... Materialxxn
      LOOP AT it_mat.
        CLEAR gf_xfc.
        l_val = l_val + 1.
        CONCATENATE text-t06 l_val INTO lf_mat.
        gf_xfc-fieldname = lf_mat.
        gf_xfc-datatype = c_val_c.
        gf_xfc-inttype = c_val_c.
        gf_xfc-intlen = 18.
        gf_xfc-decimals = 0.
        APPEND gf_xfc TO gf_ifc.
        APPEND gf_xfc TO gf_ipc.
      ENDLOOP.
    Using the above data dynamic internal table is been created
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gf_ifc
        IMPORTING
          ep_table        = gf_table.
    The dynamic internal table which is created is been assigned to
    field-symbol which holds the data of the columns of X-axis
      ASSIGN gf_table->* TO <fs_dyn_table>.
    Dynamic work area is been created usng the reference to the
    field-symbol which has the data and the line item is been assign to
    field-symbol to hold line item data for reading purposes line by line
      CREATE DATA gf_line LIKE LINE OF <fs_dyn_table>.
      ASSIGN gf_line->* TO <fs_dyn_wa>.
    Using the above data dynamic internal table is been created
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gf_ipc
        IMPORTING
          ep_table        = gf_table1.
    The dynamic internal table which is created is been assigned to
    field-symbol which holds the data of the columns of X-axis
      ASSIGN gf_table1->* TO <fs_dyn_table1>.
    Dynamic work area is been created usng the reference to the
    field-symbol which has the data and the line item is been assign to
    field-symbol to hold line item data for reading purposes line by line
      CREATE DATA gf_line1 LIKE LINE OF <fs_dyn_table1>.
      ASSIGN gf_line1->* TO <fs_dyn_wa1>.
    Using the above data dynamic internal table is been created
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gf_ifc
        IMPORTING
          ep_table        = gf_table2.
    The dynamic internal table which is created is been assigned to
    field-symbol which holds the data of the columns of X-axis
      ASSIGN gf_table2->* TO <fs_dyn_table2>.
    Dynamic work area is been created usng the reference to the
    field-symbol which has the data and the line item is been assign to
    field-symbol to hold line item data for reading purposes line by line
      CREATE DATA gf_line2 LIKE LINE OF <fs_dyn_table2>.
      ASSIGN gf_line2->* TO <fs_dyn_wa2>.
    ENDFORM.                    " build_matnr_table
    *&      Form  assign_matnr_val_fields
    The material numbers data stored in the temp internal table needs to
    be assigned to the dynamic internal table along x-axis as the first
    record. The temp internal table is been looped and using the field
    symbol concept the data is moved to the dynamic internal table
    FORM assign_matnr_val_fields .
      DATA: l_cnt(3) TYPE n,
            l_nam(12),
            g_total(3) TYPE n.
      DESCRIBE TABLE it_mat LINES g_total.
      CLEAR l_cnt.
    Looping the temp internal table and concatenating material as
    material001 and the same is been checked against the dynamic
    internal table and the material number value is moved to the
    internal table. Finally, the data is been appened as first record.
      LOOP AT it_mat.
        l_nam = c_mat.
        l_cnt = l_cnt + 1.
        CONCATENATE l_nam l_cnt INTO l_nam.
    Material which is in form Materialxxn is been assigned to the field
    symbol which is checked against the field of dynamic internal table
    and the value of the Material Number is been passed to the dynamic
    internal table field value.
    After all materials are been assigned the record is been appended
    to the dynamic internal table.
        ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_field>.
        <fs_field> = it_mat-matnr.
        IF l_cnt = g_total.
          INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
        ENDIF.
      ENDLOOP.
    Looping the temp internal table and concatenating material as
    material001 and the same is been checked against the dynamic
    internal table and the material number value is moved to the
    internal table. Finally, the data is been appened as first record.
    This is been used for downloading of data to excel sheet as it
    contains additional field which is Description field.
      CLEAR l_cnt.
      LOOP AT it_mat.
        l_nam = c_mat.
        l_cnt = l_cnt + 1.
        CONCATENATE l_nam l_cnt INTO l_nam.
    Material which is in form Materialxxn is been assigned to the field
    symbol which is checked against the field of dynamic internal table
    and the value of the Material Number is been passed to the dynamic
    internal table field value.
    After all materials are been assigned the record is been appended
    to the dynamic internal table.
        ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa1> TO <fs_field>.
        <fs_field> = it_mat-matnr.
        IF l_cnt = g_total.
          INSERT <fs_dyn_wa1> INTO TABLE <fs_dyn_table1>.
        ENDIF.
      ENDLOOP.
    The contents of one internal table is passed on to other internal
    table for use while moving the component data for count purposes.
      <fs_dyn_table2>[] = <fs_dyn_table>[].
    ENDFORM.                    " assign_matnr_val_fields
    *&      Form  move_bom_data_to_matnr_table
    The component data is been appended to the dynamic internal table
    The component is checked against a material and if exists the corresp-
    onding level is been appended to the record
    The total count is derived as the in how many materials the component
    exists
    FORM move_bom_data_to_matnr_table .
      DATA: l_cnt(2) TYPE n,
            l_cnt1(3) TYPE n,
            l_nam(12),
            l_con(18) TYPE c,
            l_con1(18) TYPE c,
            lf_mat TYPE matnr.
      SORT it_bom_expl BY bom_comp bom_mat level.
      CLEAR: l_cnt1, <fs_dyn_wa>.
    Looping the component internal table
      LOOP AT it_bom_expl INTO gf_it_bom_expl.
        CLEAR: l_cnt1.
        AT NEW bom_comp.
          CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
          it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
          ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
          <fs_check>.
          <fs_check> = gf_it_bom_expl-bom_comp.
        ENDAT.
        AT NEW bom_mat.
          CLEAR l_con.
        ENDAT.
        lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
        LOOP AT it_mat_temp.
          l_nam = c_mat.
          l_cnt1 = l_cnt1 + 1.
          CONCATENATE l_nam l_cnt1 INTO l_nam.
          LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
          ENDLOOP.
          IF <fs_xy> = lf_mat.
            CLEAR lf_mat.
            l_con1 = l_con.
          ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
          IF <fs_xy> = gf_it_bom_expl-bom_mat.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
            CLEAR l_con.
            MOVE gf_it_bom_expl-level TO l_con.
            CONCATENATE c_val_l l_con INTO l_con.
            CONDENSE l_con NO-GAPS.
            IF l_con1 NE space.
              CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
              CLEAR l_con1.
              l_cnt = l_cnt - 1.
            ENDIF.
            <fs_check> = l_con.
            l_cnt = l_cnt + 1.
          ENDIF.
        ENDLOOP.
        AT END OF bom_comp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
          ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
          <fs_check> = l_cnt.
          INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
        ENDAT.
      ENDLOOP.
    Looping the component internal table. This is used for the additional
    Description field which is shown in the excel sheet
      LOOP AT it_bom_expl INTO gf_it_bom_expl.
        CLEAR: l_cnt1.
        AT NEW bom_comp.
          CLEAR: l_cnt, <fs_dyn_wa1>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
          it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
          ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa1> TO
          <fs_check>.
          <fs_check> = gf_it_bom_expl-bom_comp.
        ENDAT.
        AT NEW bom_mat.
          CLEAR l_con.
        ENDAT.
        lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
        LOOP AT it_mat_temp.
          l_nam = c_mat.
          l_cnt1 = l_cnt1 + 1.
          CONCATENATE l_nam l_cnt1 INTO l_nam.
          LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
          ENDLOOP.
          IF <fs_xy> = lf_mat.
            CLEAR lf_mat.
            l_con1 = l_con.
          ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
          IF <fs_xy> = gf_it_bom_expl-bom_mat.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa1> TO <fs_check>.
            CLEAR l_con.
            MOVE gf_it_bom_expl-level TO l_con.
            CONCATENATE c_val_l l_con INTO l_con.
            CONDENSE l_con NO-GAPS.
            IF l_con1 NE space.
              CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
              CLEAR l_con1.
              l_cnt = l_cnt - 1.
            ENDIF.
            <fs_check> = l_con.
            l_cnt = l_cnt + 1.
          ENDIF.
        ENDLOOP.
    The description is moved to the field symbol which is checked against
    the field of dynamic internal table and the count is been passed to
    the dynamic internal table field value.
        ASSIGN COMPONENT c_description OF STRUCTURE <fs_dyn_wa1> TO
        <fs_check>.
        <fs_check> = gf_it_bom_expl-ojtxp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
        AT END OF bom_comp.
          ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa1> TO <fs_check>.
          <fs_check> = l_cnt.
          INSERT <fs_dyn_wa1> INTO TABLE <fs_dyn_table1>.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " move_bom_data_to_matnr_table

  • How internal tables are physicaly located in memory?

    Array, chained list, or else? Plese provide any opinion or documentation.
    Sincerely yours, Long Nguyen.

    A data model is an abstraction of a part of the real world which is represented using formal structures. A relational database basically uses one formal structure known as a table.
    A table can be defined as a two-dimensional matrix made of rows and columns. It can also be described as a group of records of the same type.Records are groups of fields based on existing data types. These data types are previously defined in the datadictionary. A table is a similar concept to a conventional indexed file; the difference is that in the relational model the main index is known as the primary key, which is made of one or more fields of the record. A record is also known as tuple or simply a row. The most significant feature of the primary key is that it identifies univocally one and only one record of the table: a table does not permit records with duplicated primary keys.
    Structures. The object structure refers to the definition of a compound object that does not have any content. It's like a table or a view, but it never has entries: it's only a structure. These types of objects are used in programs for defining data structures or for defining data in the interfaces from the module pools and the screens. The basic difference between structures and tables (or views) is that the
    structure does not exist at the underlying database system level; however, both tables and views do exist in the database. Structures only exist as definitions in the dictionary. As a result, structures do not need to be activated.
    Table. As previously explained, a table is a two-dimensional data matrix. A table can contain zero or many rows, corresponding to the predefined table structure (entity type). This is, at the same time, a complex structure, which can be made up of one or several fields (attributes). Every row that makes up the database table has the same structure and properties. The fields that make up the structure of the table records, as well as its attributes, permitted value range, and so on, are set when defining the table.
    Some general recommendations for internal tables:
    •     As long as all that you need from an internal table is to append lines to it and perhaps to sort it after filling it, standard tables are still the best choice. The other table kinds are too expen-sive for these simple tasks. Keep in mind that when inserting or deleting lines in index tables containing many lines, the administration of the logical index that manages the lines of the ta-ble internally can become expensive, with regard to performance and additional memory space. Only for standard tables that are filled with APPEND only, and where no lines are de-leted except for the last line, is there no need for a logical index, and hence
    no additional costs are incurred.
    •If memory space is an issue, for very large internal tables (> 500000 lines) with a
    small line size, sorted tables might be preferable to hashed tables, since for internal administration, they need only 6 bytes per line compared to 18 bytes for hashed tables.
    •When declaring internal tables, use the addition INITIAL SIZE only for inner tables in nested tables. For outer tables, the automatic allocation of initial memory size is appropriate. For inner tables, though, it may result in saving a large amount of memory.
    •When reading internal tables with READ TABLE or LOOP AT, choose the appropriate output behavior. Writing into a work area wa with the addition INTO wa is only necessary if you want to change the work area without influencing the internal table. For pure reading purposes or for modifying the contents of the internal table, the additions ASSIGNING <fs> for assigning internal table lines to a field symbol <fs> and REFERENCE INTO dref for setting a refer-ence in a data reference variable dref to internal table lines are the better choices by far.
    •Use CLEAR instead of REFRESH for internal tables. The reason is that for internal tables with-out header lines, the general statement CLEAR does exactly the same as the special state-ment REFRESH. Since internal tables with header lines should no longer be used, the state-ment REFRESH is effectively obsolete. In order to free more memory, you can consider the use of FREE.
    •The statement COLLECT should no longer be used for standard tables — use COLLECT mainly for hashed tables. The reason is that COLLECT is based on a hash algorithm. While the hash administration of a hashed table is always available and robust, for standard tables a temporary hash administration must be created when the COLLECT statement is used. This temporary hash administration is invalidated when the table is accessed for changing. If fur-ther COLLECT statements are entered after an invalidation, a linear search of all table rows must be performed. Furthermore, COLLECT only works properly on internal tables with unique lines, while a unique table key is guaranteed for hashed tables only. Therefore, for standard tables it cannot be guaranteed that the contents will always be suitable for editing using COLLECT.
    •Don’t use APPEND SORTED BY — use SORT instead. The reason is that creating a ranked list with APPEND SORTED BY is based on several assumptions about the internal table and how it is filled. Using SORT is the general method that can be applied to all kinds of table and inde-pendent from the mode of filling.
    Chk these links for more information about internal tables
    internal tables
    Regards,
    Balaji Reddy G
    **Rewards for helpful answers

Maybe you are looking for