ALV List not populating data statistics output in ECC6.0

Hi,
I am working in an upgrade upgrade project from 4.6c to ECC6.0.
4.6c is non-unicode system. ECC6 is Unicode system.
I am facing one problem in ALV list output in the background job. In 4.6c the data statistics output is displayed as per the screen
Data statistics
Number of
Records passed
584
but this output is not displayed in ECC 6.0.
I given below the code which we are using in programe 4.6c and ECC6.0
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
              i_callback_program = 'ZNHNZLLVL0'
             i_grid_title       = l_title
              is_layout          = alv_layout
              it_fieldcat        = alv_fieldcat
              i_save             = 'A'
             is_variant         = stru_disvar
         TABLES
              t_outtab           = list_table
         EXCEPTIONS
              program_error      = 1
              OTHERS             = 2.
Give your input to solve this issue .
- Anandakumar.K

Hi Ganesh,
       this problem is mainly printer problem issue, to resovle this isues you have to do small changes in the print setting.
Step1) Execute the report in background -> you will get a popup .....where you will give the output device for ex : LOCL
fruther in the same popup you can see Properties .......click that you can see COVERSHEETs > select coversheets and
then click SPECIFICATIONS buttons > select int he Fied name A) ALVSELECTIONS B) ALVSTATISTICS one bye bone
and then change the  Field Default value to YES.... for both the options . Now finally click COPY Settings ...........
now you again shedule the report again in background ........you can see the result you are expecting.......
Cheers
Divya.

Similar Messages

  • Need class name to display ALV list (not Grid) in objects..

    hi,
    i need to display ALV list ( not ALV Grid ) in objects.. i dont the class name for tat.. so plz can anyone help me out for the same..
    thanks in advance..

    With cl_salv_table you can have both grid or list, depending what you want.
          cl_salv_table=>factory(
             EXPORTING
               list_display   = 'X'  "when space then GRID, when 'X' then LIST
             IMPORTING
               r_salv_table  = ref_table
             CHANGING
               t_table       = gt_sflight ).
    Regards
    Marcin

  • Restricted key figure not populating data

    Hi Guru's,
    I am facing problem with restricted keyfigure. I have restricted amount with cal year which is not populating data.
    This key figure is having data in provider.
    Could you let me know how to overcome this .
    Thanks in advance.
    Thanks,
    Vijay.

    Hi,
    The quesry is on Multiprovider? or infoset? it matters first..... or directly on cube? check it and apply relevent infoprovider properties for logic check.
    Check the global filters are there any infoprovider  restrications etc...
    And also while checking the datafor the KF in infoprovide " use ALL the restrictions that are in query and impact the data"
    also try removing the restiction and look for data...
    Hope this helps.'

  • Categories tab in app store is not populating data

    Dears,
    I have a problem in my Iphone OS 3.1.3 as the Categories tab in app store is not populating data and coming blank.
    it was working fine before and suddenly stopped, although I restore to original setting 2 times and still not working.
    Appreciate your help.

    Hi, it seems like this but let's wait reply from apple in order to know when will it work again

  • Alv list contains no data

    I am working with a custom table zscs_record.
    data is being fetched in the perform upload_workarea.
    but the list contains no data.
    there might be any problem with the display_log.
    if anybody plz can find where is the mistake full points will be rewarded.
    just copy the program and execute it.
    REPORT yreport1 LINE-SIZE 260
    NO STANDARD PAGE HEADING
    MESSAGE-ID zsc_supply_chain.
              T Y P E -  P O O L S                           *
    TYPE-POOLS: SLIS.
          C o n s t a n t    V A R I A B L E S                  *
    CONSTANTS: c_e                TYPE  char1        VALUE  'E',
               c_a                TYPE  char1        VALUE  'A',
               c_s                TYPE  char1        VALUE  'S',
               c_x                TYPE  char1        VALUE  'X',
               c_dynpro_0201(4)   TYPE  c            VALUE  '0201',
               c_prognam(12)      TYPE  c            VALUE  'SAPRCKM_MR22',
               c_dynpro_1000(4)   TYPE  c            VALUE  '1000',
               c_dynpro_0120(4)   TYPE  c            VALUE  '0120',
               c_okcode(10)       TYPE  c            VALUE  'BDC_OKCODE',
               c_entr(5)          TYPE  c            VALUE  '=ENTR',
               c_dummy(6)         TYPE  c            VALUE  '=DUMMY',
               c_down(5)          TYPE  c            VALUE  '=DOWN',
               c_save(5)          TYPE  c            VALUE  '=SAVE',
               c_back(5)          TYPE  c            VALUE  '=BACK',
               c_onli(5)          TYPE  c            VALUE  '=ONLI',
               c_ee(3)            TYPE  c            VALUE  '/EE',
               c_one              TYPE  ckml_kongr   VALUE  '1'   ,
               c_bkpf(4)          TYPE  c            VALUE  'BKPF',
               c_wfp              TYPE  bukrs        VALUE  'WFP',
               c_sa               TYPE  blart        VALUE  'SA',
               c_ags              TYPE  ktosl        VALUE  'AGS',
               c_usd              TYPE  waers_iso    VALUE  'USD',
               c_budat(14)        TYPE  c            VALUE  'MR21HEAD-BUDAT',
               c_bukrs(14)        TYPE  c            VALUE  'MR21HEAD-BUKRS',
               c_werks(14)        TYPE  c            VALUE  'MR21HEAD-WERKS',
               c_xblnr(14)        TYPE  c            VALUE  'MR21HEAD-XBLNR',
               c_kongr(14)        TYPE  c            VALUE  'CKMLKONT-KONGR',
               c_bktxt(14)        TYPE  c            VALUE  'MR21HEAD-BKTXT',
               c_mr22             TYPE  tstc-tcode   VALUE  'MR22',
               c_f13              TYPE  tstc-tcode   VALUE  'F.13',
               c_n(1)             TYPE  c            VALUE  'N',
               c_bag              TYPE  char9        VALUE  '%Bagging%',
               c_ltsh             TYPE  char12       VALUE  '%LTSH%Clear%',
               c_trnsf            TYPE  char30       VALUE  '%Transformation%Clear%',
               c_ste              TYPE  char20       VALUE  '%Stevedoring%Clear%',
               c_mat              TYPE  char30       VALUE  '%Material%Revaluation',
               c_mat1             TYPE  char8        VALUE  'MATERIAL',
               c_rev              TYPE  char10       VALUE  'REVOLUTION',
               c_tabname          TYPE  tabname      VALUE  'ZSCT_RECORD',
               c_prognam3(7)      TYPE  c            VALUE  'SAPF124',
               c_prognam4(8)      TYPE  c            VALUE  'SAPMSSY0',
               c_cursor(10)       TYPE  c            VALUE  'BDC_CURSOR',
               c_konts_low(9)     TYPE  c            VALUE  'KONTS-LOW',
               c_bukrx_low(9)     TYPE  c            VALUE  'BUKRX-LOW',
               c_saknr(7)         TYPE  c            VALUE  'X_SAKNR',
               c_augdt(5)         TYPE  c            VALUE  'AUGDT',
               c_testl(5)         TYPE  c            VALUE  'TESTL',
               c_xausbel(7)       TYPE  c            VALUE  'XAUSBEL',
               c_xnausbel(8)      TYPE  c            VALUE  'XNAUSBEL',
               c_fehler(8)        TYPE  c            VALUE  'X_FEHLER',
               c_mr21(23)         TYPE  c            VALUE  'MR21HEAD-SCREEN_VARIANT',
               c_lagmat(18)       TYPE  c            VALUE  'LAGERMATERIAL_0250',
               c_psp(30)          TYPE  c            VALUE  'PSP-ELEMENT - OHNE BWKEY_0250',
               c_ckmatnr(20)      TYPE  c            VALUE  'CKI_MR22_0250-MATNR(',
               c_ckzuumb(20)      TYPE  c            VALUE  'CKI_MR22_0250-ZUUMB(',
               c_ckpspnr(20)      TYPE  c            VALUE  'CKI_MR22_0250-PSPNR(',
               c_ckbwkey(20)      TYPE  c            VALUE  'CKI_MR22_0250-BWKEY(',
               c_sp(1)            TYPE  c            VALUE  ')',
               c_shkzg1           TYPE  shkzg        VALUE 'H',
               c_shkzg2           TYPE  shkzg        VALUE 'S',
    *For ALV column positions
            c_col_pos1            TYPE            sycucol             VALUE '01',
            c_col_pos2            TYPE            sycucol             VALUE '02',
            c_col_pos3            TYPE            sycucol             VALUE '03',
            c_col_pos4            TYPE            sycucol             VALUE '04',
            c_col_pos5            TYPE            sycucol             VALUE '05',
            c_col_pos6            TYPE            sycucol             VALUE '06',
            c_col_pos7            TYPE            sycucol             VALUE '07',
            c_col_pos8            TYPE            sycucol             VALUE '08',
            c_col_pos9            TYPE            sycucol             VALUE '09',
            c_col_pos10           TYPE            sycucol             VALUE '10',
            c_col_pos11           TYPE            sycucol             VALUE '11',
            c_col_pos12           TYPE            sycucol             VALUE '12',
            c_col_pos13           TYPE            sycucol             VALUE '13',
            c_col_pos14           TYPE            sycucol             VALUE '14',
            c_col_pos15           TYPE            sycucol             VALUE '15',
    *For ALV Field Names of final Table
            c_fld_recid           TYPE            slis_fieldname      VALUE  'RECID',          "Record ID number
            c_fld_kongr           TYPE            slis_fieldname      VALUE  'KONGR',          "Reason code
            c_fld_hkont           TYPE            slis_fieldname      VALUE  'HKONT',          "GL Account
            c_fld_projk           TYPE            slis_fieldname      VALUE  'PROJK',          "Project code
            c_fld_werks           TYPE            slis_fieldname      VALUE  'WERKS',          "Plant
            c_fld_matnr           TYPE            slis_fieldname      VALUE  'MATNR',          "Commodity
            c_fld_zcptp           TYPE            slis_fieldname      VALUE  'ZCPTP',          "Cose portion to be posted
            c_fld_zerrf           TYPE            slis_fieldname      VALUE  'ZERRF',          "Success flag
            c_fld_zerrc           TYPE            slis_fieldname      VALUE  'ZERRC',          "Error code
            c_fld_zertx           TYPE            slis_fieldname      VALUE  'ZERTX',          "Error txt
            c_fld_hkont1          TYPE            slis_fieldname      VALUE  'HKONT',
            c_fld_opbal           TYPE            slis_fieldname      VALUE  'OPBAL',
            c_fld_exp             TYPE            slis_fieldname      VALUE  'EXP',
            c_fld_cap             TYPE            slis_fieldname      VALUE  'CAP',
            c_fld_err             TYPE            slis_fieldname      VALUE  'ERR',
            c_table               TYPE            slis_tabname        VALUE  'i_log_disp'.
    *T Y P E S                                                            *
    *Structure for uploading the data for further processing
    TYPES: BEGIN OF t_zscs_record ,
               recid      TYPE zderecid,                       "Record id number
               zerrf      TYPE zdeerrf,                        "Processed \ not processed flag - FLAG X Success Blank
               cpudt      TYPE cpudt,                          "Day On Which Accounting Document Was Entered
               kongr      TYPE ckml_kongr,                     "Account Assignment Reason
               hkont      TYPE hkont,                          "General Ledger Account
               projk      TYPE char30,                          "WBS Element
               werks      TYPE werks_d,                        "Plant
               matnr      TYPE matnr,                          "Material Number
               zcptp      TYPE zdecptp,                        "cost portion to be posted
               belnr      TYPE belnr_d,                        "Accounting Document Number
               zerrc      TYPE zdeerrc,                        "Error code
               zertx      TYPE zdeertx,                        "Error text
               set        TYPE numc2,
           END OF t_zscs_record ,
    *Structre for modified WBS element
           BEGIN OF t_zscs_record_m ,
               recid      TYPE zderecid,                       "Record id number
               zerrf      TYPE zdeerrf,                        "Processed \ not processed flag - FLAG X Success Blank
               cpudt      TYPE cpudt,                          "Day On Which Accounting Document Was Entered
               kongr      TYPE ckml_kongr,                     "Account Assignment Reason
               hkont      TYPE hkont,                          "General Ledger Account
               projk      TYPE char24,
               werks      TYPE werks_d,                        "Plant
               matnr      TYPE matnr,                          "Material Number
               zcptp      TYPE zdecptp,                        "cost portion to be posted
               belnr      TYPE belnr_d,                        "Accounting Document Number
               zerrc      TYPE zdeerrc,                        "Error code
               zertx      TYPE zdeertx,                        "Error text
               set        TYPE numc2,
           END OF t_zscs_record_m,
    *Structure for retrieving data from custom table ZSCT_AUTOINV
           BEGIN OF t_zsct_autoinv,
               saknr      TYPE saknr,                          "G/L Account Number
               fipos      TYPE fm_fipex,                       "Commitment Item
               geber      TYPE bp_geber,                       "Fund
               saknr_off  TYPE saknr,                          "G/L Account Number
               fipos_off  TYPE fm_fipex,                       "Commitment Item
           END OF t_zsct_autoinv,
    *Structure for retrieving data from database table FMBDT
           BEGIN OF t_fmbdt,
               rldnr      TYPE rldnr,                          "Ledger
               rrcty      TYPE rrcty,                          "Record Type
               rvers      TYPE versn,                          "Version
               ryear      TYPE gjahr,                          "Fiscal Year
               robjnr     TYPE gobjnr_r,                       "Object number for objects (account assignment elements)
               cobjnr     TYPE gobjnr_c,                       "Object number for transaction attributes
               sobjnr     TYPE gobjnr_s,                       "Object number for partner objects (accnt assignmnt elements)
               rtcur      TYPE rtcur,                          "Currency Key
               drcrk      TYPE shkzg,                          "Debit/Credit Indicator
               rpmax      TYPE rpmax,                          "period
               rfund      TYPE fm_fund,                        "Fund
               rfundsctr  TYPE fistl,                          "Funds Center
               rmeasure   TYPE fm_measure,                     "Funded Program
           END OF t_fmbdt,
    *Structure for retrieveing data from table SKAT
           BEGIN OF t_skat,
               spras      TYPE spras,                          "Language Key
               ktopl      TYPE ktopl,                          "Chart of Accounts
               saknr      TYPE saknr,                          "G/L Account Number
               txt50      TYPE txt50_skat,                     "G/L Account Long Text
           END OF  t_skat,
    *Structure for tracking the errors occured during document posting
    *through standard BAPI
           BEGIN OF t_error_bapi,
               number     TYPE symsgno,
               message    TYPE bapi_msg,
               recid      TYPE zderecid,
               set        TYPE numc2,
           END OF t_error_bapi,
    *Structure for tracking the success occured during document posting
    *through standard BAPI
           BEGIN OF t_suc_bapi,
               belnr      TYPE belnr_d,
               message    TYPE bapi_msg,
               recid      TYPE zderecid,
               set        TYPE numc2,
           END OF t_suc_bapi,
    *Structure for tracking the errors occured during document posting
    *through MR22 transaction code
            BEGIN OF t_error_bdc,
               recid      TYPE zderecid,                       "Record id number
               number     TYPE symsgno,
               message    TYPE bapi_msg,
               set        TYPE numc2,
           END OF t_error_bdc,
    *Structure for tracking the document no. occured during successful posting
    *through MR22 transaction code
             BEGIN OF t_suc_bdc,
               recid      TYPE zderecid,                       "Record id number
               var        TYPE sy-msgv1,
               message    TYPE bapi_msg,
               set        TYPE numc2,
             END OF t_suc_bdc,
             BEGIN OF t_log_disp,
             recid      TYPE  zderecid,                       "Record id number
             kongr      TYPE  ckml_kongr,                     "Account Assignment Reason
             hkont      TYPE  hkont,                          "General Ledger Account
             projk      TYPE  char30,                         "WBS Element
             werks      TYPE  werks_d,                        "Plant
             matnr      TYPE  matnr,                          "Material Number
             zcptp      TYPE  zdecptp,                        "cost portion to be posted
             zerrf      TYPE  zdeerrf,                        "Processed \ not processed flag - FLAG X Success Blank
             zerrc      TYPE  zdeerrc,                        "Error code
             zertx      TYPE  zdeertx,                        "Error text
             hkont1     TYPE  hkont,
             opbal      TYPE  dmbtr,
             exp        TYPE  dmbtr,
             cap        TYPE  dmbtr,
             err        TYPE  dmbtr,
             END OF  t_log_disp.
    *Field symbols declared for BAPIRET2
    FIELD-SYMBOLS: <fs_return> TYPE bapiret2.
          G l o b a l   W O R K A R E A S                                     *
    DATA: w_zscs_record     TYPE t_zscs_record,
          w_zscs_record_mod TYPE t_zscs_record,
          w_fmbdt           TYPE t_fmbdt,
          w_bapi            TYPE t_zscs_record,
          w_bdc             TYPE t_zscs_record,
          w_temp            TYPE t_zscs_record,                 "#EC NEEDED
          w_bapiheader      TYPE bapiache09,
          w_return          TYPE bapiret2,
          w_accoutgl        TYPE bapiacgl09,
          w_currency        TYPE bapiaccr09,
          w_bdcdata         TYPE bdcdata,
          w_messtab         TYPE bdcmsgcoll,
          w_error_bapi      TYPE t_error_bapi,
          w_suc_bapi        TYPE t_suc_bapi,
          w_error_bdc       TYPE t_error_bdc,
          w_suc_bdc         TYPE t_suc_bdc,
          w_fieldcatalog    TYPE slis_fieldcat_alv,           "Workarea for populating fieldcatalog
          w_log_disp        TYPE t_log_disp.
            I n t e r n a l   T a b l e s                                     *
    DATA: i_zscs_record     TYPE  STANDARD TABLE OF t_zscs_record,
          i_zscs_record1    TYPE  STANDARD TABLE OF t_zscs_record,
          i_bapi            TYPE  STANDARD TABLE OF t_zscs_record,
          i_bdc             TYPE  STANDARD TABLE OF t_zscs_record,
          i_fmbdt           TYPE  STANDARD TABLE OF t_fmbdt,
          i_accoutgl        TYPE  STANDARD TABLE OF bapiacgl09,
          i_currency        TYPE  STANDARD TABLE OF bapiaccr09,
          i_return          TYPE  STANDARD TABLE OF bapiret2,
          i_bdcdata         TYPE  STANDARD TABLE OF bdcdata INITIAL SIZE 0,
          i_messtab         TYPE  STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0,
          i_bdcdata1        TYPE  STANDARD TABLE OF bdcdata INITIAL SIZE 0,
          i_messtab1        TYPE  STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0,"#EC NEEDED
          i_autoinv         TYPE  STANDARD TABLE OF t_zsct_autoinv,
          i_autoinv1        TYPE  STANDARD TABLE OF t_zsct_autoinv,
          i_error_bapi      TYPE  STANDARD TABLE OF t_error_bapi,
          i_suc_bapi        TYPE  STANDARD TABLE OF t_suc_bapi,
          i_error_bdc       TYPE  STANDARD TABLE OF t_error_bdc,
          i_suc_bdc         TYPE  STANDARD TABLE OF t_suc_bdc,
          i_fieldcatalog    TYPE  slis_t_fieldcat_alv,
          i_log_disp        TYPE STANDARD TABLE OF t_log_disp.              "internal table for final log display
          G l o b a l   V A R I A B L E S                                     *
    DATA: v_rec          TYPE      string,
          v_rec1         TYPE      string,
          v_count        TYPE      numc2    VALUE 1,
          v_flag         TYPE      char1,                                "#EC NEEDED
          v_subrc        TYPE      sysubrc,
          v_objkey       TYPE      awkey,
          v_amt          TYPE      zdecptp,
          v_txt50        TYPE      txt50_skat,
          v_pspid        TYPE      ps_pspid,                             "#EC NEEDED
          v_totexppe     TYPE      zdecptp,
          v_totcapit     TYPE      zdecptp,
          v_toterror     TYPE      zdecptp,
          v_todmbtr      TYPE      dmbtr,
          v_repid        TYPE      sy-repid.
          S E L E C T I O N - S C R E E N   D E F I N I T I O N          *
                     S E L E C T I O N - S C R E E N                     *
    *Begin of inv selection block
    SELECTION-SCREEN BEGIN OF BLOCK inv WITH FRAME TITLE text-001.
    PARAMETERS: p_pstdat  TYPE budat DEFAULT sy-datum,                               "Posting Date
                p_rtmode AS CHECKBOX DEFAULT c_x,                                    "Run in test mode
                p_prsall RADIOBUTTON GROUP rad DEFAULT 'X' USER-COMMAND com,         "Process All
                p_cstcpt RADIOBUTTON GROUP rad,                                      "Process cost to be capitalized
                p_cstexp RADIOBUTTON GROUP rad,                                      "Process cost to be expensed
                p_exauto AS CHECKBOX.                                                "Execute Automatic Clearing
    SELECTION-SCREEN END OF BLOCK inv.
    *End of inv selection block
           I N I T I A L I Z A T I O N                                        *
    INITIALIZATION.
    Subroutine for clearing the memory space
      PERFORM clear_memory.                                                          "To clear the memory space.
           A T   S E L E C T I O N - S C R E E N  O U T P U T                 *
    AT SELECTION-SCREEN OUTPUT.
    For checking the Clearing program through transaction code F.13 only
    when user selects the radio button Process All
      IF p_prsall = c_x.                                           "Process All
        p_exauto = c_x.                                            "Execute Automatic Clearing
      ELSE.
        p_exauto = ' '.                                            "Execute Automatic Clearing
      ENDIF.
      MODIFY SCREEN.
                              START OF SELECTION              *
    START-OF-SELECTION.
    Subroutine for uploading data from custom database table
    ZSCT_RECORD based on the condition selected by user
      PERFORM upload_workarea.
                              END OF SELECTION                 *
    END-OF-SELECTION.
    Subroutine for populating the respective internal tables
    for posting the documents either through standard BAPI or MR22 transaction code
      PERFORM populate_bapi_bdc.
      IF NOT i_bapi[] IS INITIAL.
    Subroutine for posting documents through standard BAPI
        PERFORM post_bapi.
      ENDIF.
    IF NOT i_bdc[] IS INITIAL.
    Subroutine for posting documents through MR22 transaction code
        PERFORM call_transaction_mr22.
      ENDIF.
    Subroutine for automatic clearing
      IF p_exauto = c_x.
        PERFORM clear_f13.
      ENDIF.
    IF ( ( i_error_bapi IS NOT INITIAL ) OR ( i_error_bdc IS NOT INITIAL ) ).
    Subroutine for displaying the log file
      PERFORM display_log.
    ENDIF.
      PERFORM FINAL_list.
    *&      Form  CLEAR_MEMORY
          text
    form CLEAR_MEMORY.
    Refreshing the global internal tables
      REFRESH: i_zscs_record,
               i_zscs_record1,
               i_bapi,
               i_bdc,
               i_fmbdt,
               i_accoutgl,
               i_currency,
               i_return,
               i_bdcdata,
               i_messtab,
               i_bdcdata1,
               i_messtab1,
               i_autoinv,
               i_error_bapi,
               i_suc_bapi,
               i_error_bdc,
               i_suc_bdc.
    Clearing the global work areas
      CLEAR:   w_zscs_record,
               w_zscs_record_mod,
               w_fmbdt,
               w_bapi,
               w_bdc,
               w_temp,
               w_bapiheader,
               w_return,
               w_accoutgl,
               w_currency,
               w_bdcdata,
               w_messtab,
               w_error_bapi,
               w_suc_bapi,
               w_error_bdc,
               w_suc_bdc,
    *Clearing the global variables
               v_rec,
               v_rec1,
               v_flag,
               v_subrc,
               v_objkey,
               v_amt,
               v_pspid.
    endform.                    " CLEAR_MEMORY
    *&      Form  UPLOAD_WORKAREA
       Subroutine for uploading data from custom database table          *
          ZSCT_RECORD based on the condition selected by user            *
    form UPLOAD_WORKAREA .
      IF p_prsall = c_x.
    Selecting the non processed data from table ZSCT_RECORD
        SELECT  recid                                       "#EC CI_NOFIRST         "Record id number
                zerrf                                                               "Processed\not processed flag
                cpudt                                                               "Day On Which Accounting Document Was Entered
                kongr                                                               "Account Assignment Reason
                hkont                                                               "General Ledger Account
                projk                                                               "WBS Element
                werks                                                               "Plant
                matnr                                                               "Material Number
                zcptp                                                               "cost portion to be posted
                belnr                                                               "Accounting Document Number
                zerrc                                                               "Error code
                zertx                                                               "Error text
        FROM zsct_record
        INTO TABLE i_zscs_record
        WHERE zerrf NE space
        AND cpudt = '20081022'.
        IF sy-subrc NE 0.
          MESSAGE  text-021 TYPE 'I'.
          LEAVE LIST-PROCESSING.
        ENDIF.
      ELSEIF p_cstcpt = c_x.
    Selecting the non processed data from table ZSCT_RECORD
        SELECT  recid                                       "#EC CI_NOFIRST
                zerrf
                cpudt
                kongr
                hkont
                projk
                werks
                matnr
                zcptp
                belnr
                zerrc
                zertx
        FROM zsct_record
        INTO TABLE i_zscs_record
        WHERE zerrf NE space
        AND   kongr <> c_e.
        IF sy-subrc NE 0.
          MESSAGE  text-021 TYPE 'I'.
          LEAVE LIST-PROCESSING.
        ENDIF.
      ELSEIF p_cstexp = c_x.
    Selecting the non processed data from table ZSCT_RECORD
        SELECT  recid                                        "#EC CI_NOFIRST
                zerrf
                cpudt
                kongr
                hkont
                projk
                werks
                matnr
                zcptp
                belnr
                zerrc
                zertx
        FROM zsct_record
        INTO TABLE i_zscs_record
        WHERE zerrf NE space
        AND   kongr EQ c_e.
        IF sy-subrc NE 0.
          MESSAGE  text-021 TYPE 'I'.
          LEAVE LIST-PROCESSING.
        ENDIF.
      ENDIF.
      IF sy-subrc = 0.
    Sort the internal table by record id
        SORT i_zscs_record BY recid.
      ENDIF.
    endform.                    " UPLOAD_WORKAREA
    *&      Form  POPULATE_BAPI_BDC                   *
    Subroutine for posting documents through standard BAPI   *
    FORM populate_bapi_bdc.
      DATA: v_tabix TYPE sy-tabix.
    Sort the data retrieved from ZSCT_RECORD by KONGR,HKONT & PROJK
      SORT i_zscs_record BY kongr hkont projk.
      IF NOT i_zscs_record IS INITIAL.
        LOOP AT i_zscs_record INTO w_zscs_record_mod.
          v_tabix = sy-tabix.
      Check if the record id is initial
          IF NOT w_zscs_record_mod-recid IS INITIAL.
            CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
              EXPORTING
                input  = w_zscs_record_mod-recid
              IMPORTING
                output = w_zscs_record-recid.
          ENDIF.
      Check if the reason code is initial
          IF NOT w_zscs_record_mod-kongr IS INITIAL.
            CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
              EXPORTING
                input  = w_zscs_record_mod-kongr
              IMPORTING
                output = w_zscs_record-kongr.
          ENDIF.
      Assign the values
          w_zscs_record-hkont = w_zscs_record_mod-hkont.
          CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
            EXPORTING
              input  = w_zscs_record_mod-projk
            IMPORTING
              output = w_zscs_record-projk.
          w_zscs_record-werks = w_zscs_record_mod-werks.
          w_zscs_record-matnr = w_zscs_record_mod-matnr.
          w_zscs_record-zcptp = w_zscs_record_mod-zcptp.
          w_zscs_record-cpudt = w_zscs_record_mod-cpudt.
      Concatenate  KONGR,HKONT & PROJK value to make an unique combination to populate the separete
      internal table relevant for posting through BAPI and MR22 transaction
          CONCATENATE w_zscs_record-kongr w_zscs_record-hkont w_zscs_record-projk INTO v_rec.
          IF v_tabix NE 1.
            IF v_rec1 = v_rec.
              v_count = v_count.                                "#EC NEEDED
            ELSE.
              v_count = v_count + 1.
            ENDIF.
          ENDIF.
      Populate the set number into the two different internal table
      relevant for posting through BAPI and MR22 transaction
          w_zscs_record-set = v_count.
      If the KONGR (Reason code) value is equal to 'E' then the
      posting will be occur through standard BAPI
          IF w_zscs_record-kongr = c_e.
            APPEND w_zscs_record TO i_bapi.
      If the KONGR (Reason code) value is not equal to 'E' then the
      posting will be occur through MR22 transaction code
          ELSEIF w_zscs_record-kongr NE c_e.
            APPEND w_zscs_record TO i_bdc.
          ENDIF.
          v_rec1 = v_rec.
      Clear the memory
          CLEAR: w_zscs_record,
                 v_rec.
        ENDLOOP.
      ENDIF.
    endform.                    " POPULATE_BAPI_BDC
    *&      Form  POST_BAPI
          text
    form POST_BAPI .
    Local structre declaration
      TYPES:
          Structre for populating record id
            BEGIN OF lt_recid,
              recid TYPE zderecid,
             END OF   lt_recid,
           Structre for table PRPS
             BEGIN OF lt_prps,
              pspnr      TYPE ps_intnr,           "WBS Element
              posid      TYPE ps_posid,           "Work Breakdown Structure Element (WBS Element)
              pgsbr      TYPE ps_pgsbr,           "Business area for WBS element
              func_area  TYPE fkber,              "Functional Area
             END OF lt_prps .
    Local data declaration
      DATA: lw_bapi    TYPE t_zscs_record,
            lw_bapi1   TYPE t_zscs_record,
            lw_recid   TYPE lt_recid,
            li_recid   TYPE STANDARD TABLE OF lt_recid,         "#EC NEEDED
            li_prps    TYPE STANDARD TABLE OF lt_prps,
            lw_prps    TYPE lt_prps,
            li_temp    TYPE STANDARD TABLE OF t_zscs_record,
            li_temp1   TYPE STANDARD TABLE OF t_zscs_record,
            li_bapi    TYPE STANDARD TABLE OF t_zscs_record,
            li_bapi_m  TYPE STANDARD TABLE OF t_zscs_record_m,
            lw_bapi_m  TYPE t_zscs_record_m,
            li_skat    TYPE STANDARD TABLE OF t_skat,
            li_skat1   TYPE STANDARD TABLE OF t_skat,
            li_skat2   TYPE STANDARD TABLE OF t_skat,
            lw_temp    TYPE t_zscs_record,
            li_autoinv TYPE STANDARD TABLE OF t_zsct_autoinv,
            lw_autoinv TYPE t_zsct_autoinv,
            lv_count   TYPE numc10,
            lw_skat    TYPE t_skat,
            lw_skat1   TYPE t_skat,                             "#EC NEEDED
            lw_skat2   TYPE t_skat,                             "#EC NEEDED
            lv_count1  TYPE numc10,
            lw_index   TYPE sy-index.
    Assigning the I_BAPI data to a local internal table
      li_temp[] = i_bapi[].
      li_bapi[] = i_bapi[].
      li_temp1[] = i_bapi[].
    Sort the internal table by SET
      SORT i_bapi BY set.
    Sort the internal table LI_TEMP by SET
      SORT li_temp BY set.
    Delete adjacent duplicates from LI_TEMP compring SET
      DELETE ADJACENT DUPLICATES FROM li_temp COMPARING set.
    Sort the internal table LI_TEMP1 by PROJK
      SORT li_temp1 BY projk.
    Delete adjacent duplicates from LI_TEMP1 compring PROJK
      DELETE ADJACENT DUPLICATES FROM li_temp1 COMPARING projk.
    Sort the internal table LI_BAPI by HKONT
      SORT li_bapi BY hkont.
    Delete adjacent duplicates from LI_BAPI compring HKONT
      DELETE ADJACENT DUPLICATES FROM li_bapi COMPARING hkont.
    Check if the li_bapi is initial or not
      IF NOT li_bapi[] IS INITIAL.
    Retrieve the text information from database table SKAT
    for all the G/L Account relevant to LTSH Overland Clearing Account/
    Transformation Clearing / Stevedoring Clearing Account / Bagging Clearing Account
        SELECT  spras                                     "#EC CI_SGLSELECT
                ktopl
                saknr
                txt50
          FROM skat
          INTO TABLE li_skat
          FOR ALL ENTRIES IN li_bapi
          WHERE spras = c_e
          AND   saknr = li_bapi-hkont
           AND ( txt50 LIKE c_bag
             OR  txt50 LIKE c_ltsh
             OR  txt50 LIKE c_trnsf
             OR  txt50 LIKE c_ste
             OR  txt50 LIKE c_mat ).
        IF sy-subrc EQ 0.
          SORT li_skat1 BY saknr.
        ENDIF.
    Spiliting the internal table with respect to the TXT50
        LOOP AT li_skat INTO lw_skat.
          v_txt50 = lw_skat-txt50.
          TRANSLATE v_txt50 TO UPPER CASE.                    "#EC SYNTCHAR
          IF v_txt50 CS c_mat1 AND
             v_txt50 CS c_rev.
         Internal table regaring all the G/L Account relevant to Material revolution Account
            APPEND lw_skat TO li_skat2.
          ELSE.
         Internal table regaring all the G/L Account relevant to LTSH Overland Clearing Account/
         Transformation Clearing / Stevedoring Clearing Account / Bagging Clearing Account
            APPEND lw_skat TO li_skat1.
          ENDIF.
          CLEAR: lw_skat,
                 v_txt50.
        ENDLOOP.
        REFRESH: li_skat.
      Retrieve required data from custom table ZSCT_AUTOINV
        SELECT saknr
               fipos
               geber
               saknr_off
               fipos_off
          FROM zsct_autoinv
          INTO TABLE li_autoinv
           FOR ALL ENTRIES IN li_bapi
           WHERE saknr = li_bapi-hkont.
        IF sy-subrc = 0.
      Sort li_autoinv by GEBER
          i_autoinv1 = li_autoinv.
          SORT li_autoinv BY geber.
      Delete adjacent duplicates from li_autoinv comparing GEBER
          DELETE ADJACENT DUPLICATES FROM li_autoinv COMPARING geber.
        ENDIF.
        IF NOT li_autoinv[] IS INITIAL.
      Retrieve required data from database table FMBDT
          SELECT  rldnr
                  rrcty
                  rvers
                  ryear
                  robjnr
                  cobjnr
                  sobjnr
                  rtcur
                  drcrk
                  rpmax
                  rfund
                  rfundsctr
                  rmeasure
            FROM fmbdt                                      "#EC CI_NOFIRST
          INTO TABLE i_fmbdt
          FOR ALL ENTRIES IN li_autoinv
          WHERE ryear = p_pstdat+0(4)
          AND   rfund = li_autoinv-geber.
        ENDIF.
        IF sy-subrc = 0.
          SORT i_fmbdt BY rfund.
        ENDIF.
      ENDIF.
    Populate the internal table with the modified WBS element
    value for further processing
      LOOP AT i_bapi INTO w_bapi.
        lw_bapi_m-recid = w_bapi-recid.
        lw_bapi_m-zerrf = w_bapi-zerrf.
        lw_bapi_m-cpudt = w_bapi-cpudt.
        lw_bapi_m-kongr = w_bapi-kongr.
        lw_bapi_m-hkont = w_bapi-hkont.
        lw_bapi_m-projk = w_bapi-projk.
        lw_bapi_m-werks = w_bapi-werks.
        lw_bapi_m-matnr = w_bapi-matnr.
        lw_bapi_m-zcptp = w_bapi-zcptp.
        lw_bapi_m-belnr = w_bapi-belnr.
        lw_bapi_m-zerrc = w_bapi-zerrc.
        lw_bapi_m-zertx = w_bapi-zertx.
        lw_bapi_m-set   = w_bapi-set.
        APPEND lw_bapi_m TO li_bapi_m.
        CLEAR: lw_bapi_m.
      ENDLOOP.
    Sort LI_BAPI_M by WBS element
      SORT li_bapi_m BY projk.
    Delete adjacent duplicates from LI_BAPI_M comparing WBS element
      DELETE ADJACENT DUPLICATES FROM li_bapi_m COMPARING projk.
    Check if LI_BAPI_M is initial
      IF NOT li_bapi_m[] IS INITIAL.
    Retrieve the required data from table PRPS for all the
    WBS element
        SELECT  pspnr
                posid
                pgsbr
                func_area
           FROM prps
           INTO TABLE li_prps
           FOR ALL ENTRIES IN li_bapi_m
           WHERE posid = li_bapi_m-projk.
        IF sy-subrc = 0.
          SORT li_prps BY posid.
        ENDIF.
      ENDIF.
      lw_index = 1.
      LOOP AT li_temp INTO lw_temp.
        w_temp = lw_temp.
      clearing workares
        CLEAR: w_bapiheader,
               lv_count,
               v_amt.
    ****Populating the BAPIHEADER*******
      Reference Transaction
        w_bapiheader-bus_act    = c_bkpf.
      User Name
        w_bapiheader-username   = sy-uname.
      Document Header Text
        w_bapiheader-header_txt = text-020.
      Company Code
        w_bapiheader-comp_code  = c_wfp.
      Document Date in the Document
        w_bapiheader-doc_date   = p_pstdat.
      Posting Date in the Document
        w_bapiheader-pstng_date = p_pstdat.
      Fiscal Year
        w_bapiheader-fisc_year  = p_pstdat+0(4).
      Fiscal Period
        w_bapiheader-fis_period = p_pstdat+4(2).
      Document Type
        w_bapiheader-doc_type   = c_sa.
      Reference Document Number
        w_bapiheader-ref_doc_no = sy-datum.
      Initialize the counter
        lv_count = 1.
        lv_count1 = 1.
        LOOP AT i_bapi INTO lw_bapi FROM lw_index.
          IF lw_temp-set NE lw_bapi-set.
            lw_index = sy-tabix.
            EXIT.
          ELSE.
            lw_bapi1 = lw_bapi.
            CLEAR: v_pspid.
            READ TABLE li_prps INTO lw_prps WITH KEY posid = lw_bapi-projk BINARY SEARCH.
            IF sy-subrc = 0.
              w_accoutgl-bus_area    = lw_prps-pgsbr.
              w_accoutgl-func_area   = lw_prps-func_area.
            ENDIF.
    *****Populating the internal table regarding G/L account item***********
            w_accoutgl-itemno_acc  = lv_count.
            w_accoutgl-acct_key    = c_ags.
            w_accoutgl-acct_type   = c_s.
            w_accoutgl-grant_nbr   = text-019.
            w_accoutgl-wbs_element = lw_bapi-projk.
            READ TABLE i_autoinv1  INTO lw_autoinv WITH KEY saknr = lw_bapi-hkont.
            IF sy-subrc = 0.
          Get the information for the G/L accounts relevant for LTSH OVERland Clearing account or
          Transformation Clearing Account Stevedoring Clearing Account or Bagging Clearing Account
              READ TABLE li_skat1 INTO lw_skat1 WITH KEY saknr = lw_autoinv-saknr BINARY SEARCH.
              IF sy-subrc = 0.
                w_accoutgl-gl_account  = lw_bapi-hkont.
                IF NOT lw_autoinv-fipos EQ space.
                  CALL FUNCTION 'CONVERSION_EXIT_FMCIS_INPUT'
                    EXPORTING
                      input  = lw_autoinv-fipos
                    IMPORTING
                      output = w_accoutgl-cmmt_item.
                ELSE.
                  w_accoutgl-cmmt_item   = lw_autoinv-saknr.
                ENDIF.
                w_currency-amt_doccur   =  lw_bapi-zcptp * ( -1 ).
              ENDIF.

    Debug. and find the problem . since you are not using the standadrd tables , they are custom tables. so try to find the reason using debugging. may be you don't have data which satisfies the selection criteria.

  • ALV list with empty data - What could have gone wrong?

    Dear experts,
    I'm currently working on some codes to display data (the tables involved really do contain data), but when the codes are executed, the ALV list does not contain any data in it (only the column headers are fine).
    What could have gone wrong? I've been staring at the codes for hours now. Please help. Appreciate any help at all. 
    Displaying ALV data with REUSE_ALV_LIST_DISPLAY:
    form display_alv_data .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
    *     I_INTERFACE_CHECK              = ' '
    *     I_BYPASSING_BUFFER             =
    *     I_BUFFER_ACTIVE                = ' '
          I_CALLBACK_PROGRAM             = w_prog
    *     I_CALLBACK_PF_STATUS_SET       = ' '
    *     I_CALLBACK_USER_COMMAND        = ' '
    *     I_STRUCTURE_NAME               =
    *     IS_LAYOUT                      =
          IT_FIELDCAT                    = gt_field_cat[]
    *     IT_EXCLUDING                   =
    *     IT_SPECIAL_GROUPS              =
    *     IT_SORT                        =
    *     IT_FILTER                      =
    *     IS_SEL_HIDE                    =
    *     I_DEFAULT                      = 'X'
    *     I_SAVE                         = ' '
    *     IS_VARIANT                     =
    *     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
    *     IR_SALV_LIST_ADAPTER           =
    *     IT_EXCEPT_QINFO                =
    *     I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER        =
    *     ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = gt_final
        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.
    endform.                    " display_alv_data
    Retrieving data from the database tables into the internal table:
    form retrieve_data .
      " For internal table 1
      SELECT ekbe~ebeln
             mseg~mblnr
             ekbe~belnr
             ekbe~ebelp
             ekbe~matnr
             ekbe~menge
             ekbe~dmbtr
             ekbe~werks
             mseg~lgort
             mseg~lifnr
             lfa1~name1
      FROM ekbe INNER JOIN mseg ON ekbe~ebeln = mseg~ebeln
                INNER JOIN lfa1 ON mseg~lifnr = lfa1~lifnr
      INTO CORRESPONDING FIELDS OF TABLE gt_1
      WHERE mseg~bwart = '101' AND      " Movement type: Goods Receipt
            ekbe~vgabe = '2' AND        " Transaction / event type for Invoice Verification Number
            ekbe~matnr IN s_m_num AND
            mseg~lifnr IN s_v_num.
      " For internal table 2
      SELECT ekbe~ebeln
             makt~maktx
             eket~eindt                 
      FROM ekbe INNER JOIN makt ON ekbe~matnr = makt~matnr
                INNER JOIN eket ON ekbe~ebeln = eket~ebeln
      INTO CORRESPONDING FIELDS OF TABLE gt_2
      WHERE eket~eindt IN s_d_date.
      " For internal table 3
      SELECT ekbe~ebeln
             ekko~bedat
             ekko~ekorg
             ekko~ekgrp
             ekko~bukrs
      FROM ekbe INNER JOIN ekko ON ekbe~ebeln = ekko~ebeln
      INTO CORRESPONDING FIELDS OF TABLE gt_3
      WHERE ekko~bedat IN s_p_date AND
            ekko~ekorg IN s_p_org AND
            ekko~ekgrp IN s_p_grp.
      " For the final internal table
      SORT: gt_1, gt_2, gt_3.
      LOOP AT gt_1.
        MOVE-CORRESPONDING gt_1 TO gt_final.
        READ TABLE gt_2 WITH KEY gfs_ebeln = gt_1-gfs_ebeln BINARY SEARCH.
        MOVE-CORRESPONDING gt_2 TO gt_final.
        READ TABLE gt_3 WITH KEY gfs_ebeln = gt_1-gfs_ebeln BINARY SEARCH.
        MOVE-CORRESPONDING gt_3 TO gt_final.
        APPEND gt_final.
      ENDLOOP.
    endform.                    " retrieve_data

    Dear forumers,
    I apologize for the rather late reply. The SAP server that I've been working on was down since Thursday evening and I wasn't able to debug much into the codes. Nevertheless, I really do appreciate all of your inputs and help here.
    Rob,
    I've just debugged my codes again and found out that in the first place, there is no data contained in the internal table gt_1 at all. My rough guess is because I've misused the INNER JOIN wrongly here (see code comments below):-
      SELECT ekbe~ebeln
             mseg~mblnr
             ekbe~belnr
             ekbe~ebelp
             ekbe~matnr
             ekbe~menge
             ekbe~dmbtr
             ekbe~werks
             mseg~lgort
             mseg~lifnr
             lfa1~name1  " this line should probably be commented out
      FROM ekbe INNER JOIN mseg ON mseg~ebeln = ekbe~ebeln
                        INNER JOIN lfa1 ON lfa1~lifnr = mseg~lifnr   " this line should probably be commented out - the table join here is not based on table ekbe at all
      INTO CORRESPONDING FIELDS OF TABLE gt_1
      WHERE mseg~bwart = '101' AND     
            ekbe~vgabe = '2' AND 
            ekbe~matnr IN s_m_num AND
            mseg~lifnr IN s_v_num.
    Next, I commented out certain lines further and found that there is still no data contained in the internal table gt_1 again, as follows:-
      SELECT ekbe~ebeln
             mseg~mblnr
             ekbe~belnr
             ekbe~ebelp
             ekbe~matnr
             ekbe~menge
             ekbe~dmbtr
             ekbe~werks
             mseg~lgort
             mseg~lifnr
             " lfa1~name1
      FROM ekbe INNER JOIN mseg ON mseg~ebeln = ekbe~ebeln
                        " INNER JOIN lfa1 ON lfa1~lifnr = mseg~lifnr
      INTO CORRESPONDING FIELDS OF TABLE gt_1.
      " WHERE mseg~bwart = '101' AND     
            " ekbe~vgabe = '2' AND 
            " ekbe~matnr IN s_m_num AND
            " mseg~lifnr IN s_v_num.
    There should be data contained in table ekbe here. What could have really gone wrong now?

  • BOM and Routing import is not populating data in base table.

    BOM AND ROUTING INTERFACE Import Prog is not populating base table with interface data.Even the Interface table data is not processed.I am passing process flag as 1 and transaction_type as INSERT,still the ROUTING INTERFACE TABLES  are not getting processed.
    passing the below details.
    INSERT INTO bom.bom_op_routings_interface
            (organization_code,          assembly_item_id,          completion_subinventory,         routing_sequence_id,          organization_id,
             routing_type,          common_routing_sequence_id,          last_update_date,          last_updated_by,          creation_date,
             created_by,         last_update_login,         alternate_routing_designator,          assembly_item_number,         process_flag,
             transaction_type) ;
    INSERT INTO bom.bom_op_sequences_interface
            (operation_seq_num,         department_id,         department_code,         option_dependent_flag,         operation_lead_time_percent,
             implementation_date,         effectivity_date,         disable_date,         count_point_type,         backflush_flag,         minimum_transfer_quantity,
             operation_sequence_id,         routing_sequence_id,         organization_code,         assembly_item_number,         last_update_date,
             last_updated_by,         creation_date,         created_by,         include_in_rollup,         alternate_routing_designator,         process_flag,
             transaction_type);
    INSERT INTO bom.bom_op_resources_interface
            (resource_seq_num,         resource_code,         resource_id,         basis_type,         usage_rate_or_amount,         usage_rate_or_amount_inverse,
             assigned_units,         schedule_flag,         resource_offset_percent,         activity,         standard_rate_flag,         autocharge_type,         organization_code,         assembly_item_number,
             operation_seq_num,         effectivity_date,         last_update_date,         last_updated_by,         creation_date,         created_by,         alternate_routing_designator,
             operation_sequence_id,         routing_sequence_id,         process_flag,         transaction_type);
    Where am I making a mistake.
    Thanks in Advance.
    Sambit Pradhan

    Hi,
    Try following
    step 1. Insert routing header (bom_op_routings_interface) : Run Interface
    step 2. Insert routing lines (bom_op_sequences_interface) with correct reference to routing_sequence_id: Run Interface
    step 3. Insert all resource lines (bom_op_resources_interface) with correct reference to operation_sequence_id, routing_sequence_id , Run Interface.
    Thanks,
    Hrishi

  • Multi ALV lists/grid report in one output/screen

    Hi,
    I need to develop a ALV report, where in the output/ALV/List/Grid should look like below (all lists/grids should be fit in only one screen, if there are too many entires in the sub reports user will scroll down each), here am giving the details (MATNR, KUNNR, LIFNR) of the output just for example purpose
                                                 _My_Report_
    Sub_report_1
    MATNR-----Description
    Sub_report_2
    KUNNR-----Name
    Sub_report_3
    LIFNR-----Name
    Sub_report_4
    BANK-----Name
    Its okay to have any kind of ALV either grid or List, when user press F8 on the selection screen all should come in one screen, if there are too many entries then user will scroll down
    Thank you

    Hello,
    You can use blocked alv to achieve this.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          i_callback_program = l_repid.
    *Adding First Block to the List
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                  = w_layo
          it_fieldcat                = it_fcat
          i_tabname                  = text-064
          it_events                  = it_events
          it_sort                    = it_sort
        TABLES
          t_outtab                   = it_mainalv
        EXCEPTIONS
          program_error              = 1
          maximum_of_appends_reached = 2
          OTHERS                     = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                  = w_layo
          it_fieldcat                = it_fcat1
          i_tabname                  = text-094
          it_events                  = it_events1
          it_sort                    = it_sort1
        TABLES
          t_outtab                   = it_field_change
        EXCEPTIONS
          program_error              = 1
          maximum_of_appends_reached = 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.
    Displaying the list
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
        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.
    Thanks.
    ramya.

  • Problem with ALV Grid Not Displaying Data

    Hi Gurus,
    I have a report program, when i run it I display an output summary on ALV Grid, and when i click on each of the row in the output summary, I'm suppose to see the item detail of each record.
    This item detail is showing for some record and is not showing for some other records (when i use different selections). I debugged it and observed that the table populating the ALV grid actually has records in it. The ALV grid is not just displaying the records.
    I debugged the 2 examples (one showing record and the other not showing), I found out that nothing is different in the way they run till they populate the final internal record to passed to the ALV Grid.
    Please any suggestions on this:
    This is the function code for the ALV grid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = g_program_id
          i_callback_pf_status_set = c_detail_status
          i_callback_user_command  = c_detail_user_comm
          i_grid_title             = lv_grid_title
          is_layout                = w_detail_layout
          it_fieldcat              = i_detail_fieldcat
          it_sort                  = i_detail_sort
        TABLES
          t_outtab                 = i_faglflexa[]   "NEM - detail
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE e064
          WITH sy-subrc.
    Function REUSE_ALV_GRID_DISPLAY failed on detail view SY-SUBRC = &
      ENDIF.

    This is the full code:
    ***INCLUDE ZFIGL_HYPERION_F01.
    *&      Form  open_files
    Open files used by the program.
    FORM open_files.
      OPEN DATASET p_fileot FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
        MESSAGE g_message.
      IF sy-subrc <> 0.
        MESSAGE e056
          WITH g_message.
    Unable to open output file &
      ENDIF.
    ENDFORM.                    " open_files
    *&      Form  close_files
    Close files used by the program.
    FORM close_files.
      CLOSE DATASET p_fileot.
    ENDFORM.                    " close_files
    *&      Form  extract_data
    Extract data from database needed to generate output file and report.
    FORM extract_data.
    Get the required general ledger totals records.
      PERFORM get_faglflext_data.
    Derive any other necessary fields for I_FAGLFLEXT.
      PERFORM derive_add_fields_faglflext.
    Split records by fiscal period.
      PERFORM split_records_by_period.
    Summarize the detail records to allow for creation of the file and
    reporting.
      PERFORM summarize_records_by_period.
    Get the required general ledger actual line items records.
      PERFORM get_faglflexa_data.
    Derive any other necessary fields for I_FAGLFLEXA.
      PERFORM derive_add_fields_faglflexa.
    Sort the detail and summary output tables into key sequence.
      PERFORM sort_output_tables.
    ENDFORM.                    " extract_data
    *&      Form  process_data
    Create the requested file and report.
    FORM process_data.
    Create the local file if requested by the user or the month-end file
    at month-end.
      IF cb_test = c_not_selected.
        PERFORM create_pc_file.
      ELSEIF sy-uname = c_user_batch_admin.
        PERFORM create_output_file.
      ENDIF.
    Create the necessary tables for summary ALV report.
      PERFORM build_summary_layout.
      PERFORM build_summary_field_catalog.
      PERFORM build_summary_sort_table.
    Check to see that there is data in the summary output table.  If yes,
    generate report, if not, then give a message to the user.
      READ TABLE i_output_summary INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        MESSAGE s062.
        STOP.
    No data extracted for selection criteria entered
      ENDIF.
    Generate the summary ALV report view.
      PERFORM generate_summary_alv_report.
    ENDFORM.                    " process_data
    *&      Form  verify_user_selections
    Verify data input by the user.
    FORM verify_user_selections.
      IF NOT p_ryear IS INITIAL.
        IF p_ryear < 2006 OR
           p_ryear > 2100.
          MESSAGE e057.
    Fiscal year is invalid
        ENDIF.
      ENDIF.
    If program is being run in a non-test mode and the user has left the
    fiscal year selection blank, display a error message.
      IF cb_test IS INITIAL AND
         p_ryear IS INITIAL.
        MESSAGE e058.
    A fiscal year must be entered when generating the file
      ENDIF.
    If program is being run in a non-test mode and the user has left the
    period selection blank, display a error message.
      IF cb_test IS INITIAL AND
         s_rpmax IS INITIAL.
        MESSAGE e132.
    A period must be entered when generating the file
      ENDIF.
      IF cb_test IS INITIAL AND
         p_lfile IS INITIAL.
        MESSAGE e071.
    Local filename is required when generating the file
      ENDIF.
    ****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
      IF s_rhype IS NOT INITIAL.
        LOOP AT s_rhype.
          CLEAR r_hyper.
          r_hyper-sign = 'I'.
          r_hyper-option = 'CP'.
          CONCATENATE '' s_rhype-low '' INTO r_hyper-low.
          APPEND r_hyper.
        ENDLOOP.
        SELECT bukrs saknr hyper
               FROM zall_gl_hype INTO TABLE i_zall_gl
               WHERE hyper IN r_hyper.
        LOOP AT i_zall_gl INTO w_zall_gl.
          w_zall_gl1-saknr = w_zall_gl-saknr.
          w_zall_gl2-bukrs = w_zall_gl-bukrs.
          APPEND w_zall_gl1-saknr TO i_zall_gl1.
          APPEND w_zall_gl2-bukrs TO i_zall_gl2.
          CLEAR: w_zall_gl, w_zall_gl1, w_zall_gl2.
        ENDLOOP.
        SORT i_zall_gl1 BY saknr.
        SORT i_zall_gl2 BY bukrs.
        DELETE ADJACENT DUPLICATES FROM i_zall_gl1 COMPARING saknr.
        DELETE ADJACENT DUPLICATES FROM i_zall_gl2 COMPARING bukrs.
        IF s_racct IS INITIAL.
          LOOP AT i_zall_gl1 INTO w_zall_gl1.
            r_saknr-sign = 'I'.
            r_saknr-option = 'EQ'.
            r_saknr-low = w_zall_gl1.
            APPEND r_saknr.
            CLEAR r_saknr.
            CLEAR w_zall_gl1.
          ENDLOOP.
        ELSE.
          r_saknr[] = s_racct[].
        ENDIF.
        IF s_rbukrs IS INITIAL.
          LOOP AT i_zall_gl2 INTO w_zall_gl2.
            r_bukrs-sign = 'I'.
            r_bukrs-option = 'EQ'.
            r_bukrs-low = w_zall_gl2-bukrs.
            APPEND r_bukrs.
            CLEAR r_bukrs.
            CLEAR w_zall_gl2.
          ENDLOOP.
        ELSE.
          r_bukrs[] = s_rbukrs[].
        ENDIF.
      ELSE.
        r_saknr[] = s_racct[].
        r_bukrs[] = s_rbukrs[].
        SELECT bukrs saknr hyper
               FROM zall_gl_hype INTO TABLE i_zall_gl.
      ENDIF.
    ****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
    ENDFORM.                    " verify_user_selections
    *&      Form  get_faglflext_data
    Get FAGLFLEXT (General Ledger: Totals) data from the database.
    FORM get_faglflext_data .
    Use the fiscal year for the selection, if it was populated by the
    user.
      IF NOT p_ryear IS INITIAL.
        SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
               zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
               hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
               hslvt
          INTO TABLE i_faglflext
          FROM faglflext
          WHERE rldnr = c_run_ledger    AND
                rbukrs IN r_bukrs       AND
                racct  IN r_saknr       AND
                rfarea IN s_rfarea      AND
                prctr  IN s_prctr       AND
                ryear  =  p_ryear       AND
                rvers  = c_run_version.
      ELSE.
        SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
             zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
             hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
             hslvt
        INTO TABLE i_faglflext
        FROM faglflext
        WHERE rldnr = c_run_ledger    AND
              rbukrs IN r_bukrs       AND
              racct  IN r_saknr       AND
              rfarea IN s_rfarea      AND
              prctr  IN s_prctr       AND
              rvers  = c_run_version.
      ENDIF.
    ENDFORM.                    " get_faglflext_data
    *&      Form  derive_add_fields_faglflext
    Derive additional fields needed for the I_FAGLFLEXT.
    FORM derive_add_fields_faglflext.
    Get needed company code and profit center data from the database.
      PERFORM get_t001_data.
      PERFORM get_t880_data.
      READ TABLE i_faglflext INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc = 0.
        PERFORM get_cepc_data.
      ENDIF.
      SORT i_zall_gl BY bukrs saknr.
      LOOP AT i_faglflext INTO w_faglflext.
    Get necessary company code data.
        READ TABLE i_t001 INTO w_t001
          WITH KEY bukrs = w_faglflext-rbukrs
                   BINARY SEARCH.
        IF sy-subrc <> 0.
          MESSAGE e059
            WITH w_faglflext-rbukrs.
    Company code & not found on table T001
        ENDIF.
    Determine the entity.
        PERFORM derive_entity USING w_t001-rcomp
                           CHANGING w_faglflext-entity.
    Determine the strategic segment.
        PERFORM derive_strategic_segment USING w_faglflext-rassc
                                               w_faglflext-prctr
                                      CHANGING w_faglflext-strat_seg
                                               w_faglflext-zzsareaim
                                               w_faglflext-zzsarea.
    Determine the strategic segment channel.
        PERFORM derive_strat_seg_chnl USING w_faglflext-rassc
                                            w_faglflext-prctr
                                   CHANGING w_faglflext-strat_seg_chnl.
    Determine the all item ID and all products.
        PERFORM derive_all_item_id USING w_t001-waers
                                CHANGING w_faglflext-all_item_id
                                         w_faglflext-all_products.
    Determine the all customers and all customers channel.
       PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
    *w_faglflext-strat_seg_chnl
                                        CHANGING w_faglflext-all_cust
    *w_faglflext-all_cust_chnl.
    Determine the sub account using the company ID of the trading partner.
       PERFORM derive_sub_account USING w_faglflext-rassc
                               CHANGING w_faglflext-sub_acct.
        PERFORM derive_sub_account USING w_t001-rcomp
                                         w_faglflext-rassc
                           CHANGING w_faglflext-sub_acct.
    ****Begin Basil changes to include hyperion acct in selection (10/03/2007).
        READ TABLE i_zall_gl INTO w_zall_gl
                     WITH KEY bukrs = w_faglflext-rbukrs
                              saknr = w_faglflext-racct
                          BINARY SEARCH.
        IF sy-subrc = 0.
    ****End Basil changes to include hyperion acct in selection (10/03/2007).
    Determine the Hyperion account number from G/L account long text.
          PERFORM derive_hyperion_account USING w_faglflext-racct
                                                w_faglflext-rfarea
                                                "KMK5/22/06 ITR: 20592
                                                w_faglflext-sub_acct
                                                w_faglflext-rassc
                                                w_faglflext-prctr
                         CHANGING w_faglflext-hyperion_acct
                                  w_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
                                  w_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
                                  w_faglflext-zzsarea
                                  w_faglflext-zzsareaim
                                  w_faglflext-strat_seg.
        ENDIF.
    Determine the all customers and all customers channel.
        PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
                                                  w_faglflext-strat_seg_chnl
                                         CHANGING w_faglflext-all_cust
                                                  w_faglflext-all_cust_chnl.
    Update i_FAGLFLEXT with the newly derive fields.
        MODIFY i_faglflext FROM w_faglflext
          TRANSPORTING entity
                       strat_seg
                       strat_seg_chnl
                       all_item_id
                       all_products
                       all_cust
                       all_cust_chnl
                       hyperion_acct
                       sub_acct
                       fiscal_period
                       zzsarea
                       zzsareaim
                       reverse_sign        "NEM8/21/06 ITR: 24286
                       balance_sheet.      "NEM8/21/06 ITR: 24286
      ENDLOOP.
      CHECK s_rhype IS NOT INITIAL.
      SORT s_rhype BY low.
      LOOP AT i_faglflext INTO w_faglflext.
        READ TABLE s_rhype WITH KEY low = w_faglflext-hyperion_acct.
        IF sy-subrc NE 0.
          CLEAR w_faglflext-hyperion_acct.
          MODIFY i_faglflext FROM w_faglflext.
        ENDIF.
      ENDLOOP.
      DELETE i_faglflext WHERE hyperion_acct IS INITIAL.
    ENDFORM.                    " derive_add_fields_faglflext
    *&      Form  derive_entity
    Derive the entity using the company code.
         -->RCOMP  - Company code.
         <--ENTITY - Entity
    FORM derive_entity USING rcomp  TYPE t_t001-rcomp
                    CHANGING entity TYPE t_faglflext-entity.
      CLEAR:
        entity.
    Get necessary global company code data.
      READ TABLE i_t880 INTO w_t880
        WITH KEY rcomp = rcomp
                 BINARY SEARCH.
      IF sy-subrc = 0.
        entity  = w_t880-name2+0(3).
        TRANSLATE entity TO UPPER CASE.
      ELSE.
        MESSAGE e060
          WITH w_t001-rcomp.
    Company code & not found on table T880
      ENDIF.
    ENDFORM.                    " derive_entity
    *&      Form  get_t001_data
    Get T001 (Company Codes) data from the database.
    FORM get_t001_data.
      SELECT bukrs waers rcomp
        INTO TABLE i_t001
        FROM t001
        CLIENT SPECIFIED
        WHERE mandt = sy-mandt.
      SORT i_t001 BY bukrs.
    ENDFORM.                    " get_t001_data
    *&      Form  get_t880_data
    Get T880 (Global Company Data (for KONS Ledger)) data from the
    database.
    FORM get_t880_data.
      SELECT rcomp name2
        INTO TABLE i_t880
        FROM t880
        CLIENT SPECIFIED
        WHERE mandt = sy-mandt.
      SORT i_t880 BY rcomp.
    ENDFORM.                    " get_t880_data
    *&      Form  derive_all_item_id
    Derive the all item ID from the company code currency key.
         -->WAERS       - Currency key.
         <--ALL_ITEM_ID - All item ID.
         <--ALL_ITEM_ID - All item ID.
    FORM derive_all_item_id USING waers        TYPE t_t001-waers
                         CHANGING all_item_id  TYPE t_faglflext-all_item_id
                                  all_products TYPE t_faglflext-all_products
      CLEAR:
        all_item_id.
    Populate all item ID.
      all_item_id = c_all_item_id.
      IF waers = c_us_dollars.
        REPLACE '*' WITH c_united_states INTO all_item_id.
      ELSE.
        REPLACE '*' WITH c_local         INTO all_item_id.
      ENDIF.
    Populate all products.
      all_products   = c_all_products.
      TRANSLATE all_products TO UPPER CASE.
    ENDFORM.                    " derive_all_item_id
    *&      Form  derive_all_customers_fields
    Derive the all customers and all customer channel fields from
    the strategic segment and strategic segment channel respectively.
         -->STRAT_SEG      - Strategic segment.
         -->STRAT_SEG_CHNL - Strategic segment channel.
         <--ALL_CUST       - All customers.
         <--ALL_CUST_CHNL  - All customers channel.
    FORM derive_all_customers_fields USING strat_seg      TYPE
    t_faglflext-strat_seg
                                           strat_seg_chnl TYPE
                                           t_faglflext-strat_seg_chnl
                                  CHANGING all_cust       TYPE
                                  t_faglflext-all_cust
                                           all_cust_chnl  TYPE
                                           t_faglflext-all_cust_chnl.
      CLEAR:
        all_cust,
        all_cust_chnl.
      all_cust        = strat_seg.
      all_cust+2(1)   = c_all_customers.
      TRANSLATE all_cust TO UPPER CASE.
      all_cust_chnl   = strat_seg_chnl.
      TRANSLATE all_cust_chnl TO UPPER CASE.
    ENDFORM.                    " derive_all_customers_fields
    *&      Form  derive_hyperion_account
    Read G/L account long text to get the Hyperion account number.
         -->RACCT         - SAP G/L account number.
         <--HYPERION_ACCT - Hyperion account number.
    FORM derive_hyperion_account USING racct         TYPE t_faglflext-racct
                                       farea         TYPE t_faglflext-rfarea
                                       "KMK5/22/06 ITR 20592
                                       sub_account   TYPE
                                       t_faglflext-sub_acct
                                       rassc         TYPE t_faglflext-rassc
                                       prctr         TYPE t_faglflext-prctr
                          CHANGING hyperion_acct TYPE t_faglflext-hyperion_acct
                                   reverse_sign  TYPE t_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
                                   balance_sheet TYPE t_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
                                   zzsarea       TYPE t_faglflext-zzsarea
                                   zzsareaim     TYPE t_faglflext-zzsareaim
                                   strat_seg     TYPE t_faglflext-strat_seg.
      DATA:
        lv_text_name          TYPE thead-tdname,
        l_strl                TYPE i VALUE 0,
        l_hyperion_acct(10),                       "KMK5/20/06 ITR 20527
        l_farea(10)           VALUE '0000000000',  "KMK5/22/06 ITR 20592
        l_balance_sheet(1),                        "NEM8/17/06 ITR 25792
        l_string              TYPE tline-tdline.   "NEM8/17/06 ITR 25792
      DATA: l_hyp_account_1 TYPE tline-tdline,
            l_hyp_account_2 TYPE tline-tdline,
            l_hyp_account_3 TYPE tline-tdline.
      reverse_sign = '1'.
      SELECT SINGLE bilkt xbilk
        FROM ska1
        INTO (l_hyperion_acct,l_balance_sheet)
        WHERE ktopl = c_global_tcoa
          AND   saknr = racct.
      balance_sheet = l_balance_sheet.
      l_string = w_zall_gl-hyper.
      SEARCH l_string FOR '-'.
      IF sy-subrc = '0'.
        reverse_sign = -1.
      ELSE.
        reverse_sign = 1.
      ENDIF.
      CHECK w_zall_gl-hyper IS NOT INITIAL.
      CLEAR: l_hyp_account_1, l_hyp_account_2, l_hyp_account_3.
      SPLIT w_zall_gl-hyper
        AT ';'
        INTO l_hyp_account_1 l_hyp_account_2 l_hyp_account_3.
      IF l_hyp_account_2 IS INITIAL.      " Only one hyperion account
        hyperion_acct = l_hyp_account_1+0(7).
        l_strl = STRLEN( hyperion_acct ) - 1.
        IF hyperion_acct+l_strl(1) EQ '1'.
          CLEAR sub_account.
          PERFORM repopulate_strategic_segment
            USING rassc prctr
            CHANGING strat_seg.
          zzsareaim = g_hold_sales_type.
          zzsarea = g_hold_sales_area.
        ENDIF.
      ELSE.                                " Two or more hyperion accounts
        IF sub_account > ''.
          hyperion_acct = l_hyp_account_2+0(7).
        ELSE.
          hyperion_acct = l_hyp_account_1+0(7).
        ENDIF.
      ENDIF.
      CLEAR: w_hyperion.
      w_hyperion-racct           = racct.
      w_hyperion-hyperion_acct   = hyperion_acct.
      w_hyperion-reverse_sign    = reverse_sign.
    ENDFORM.                    " derive_hyperion_account
    *&      Form  derive_sub_account
    Determine the sub account based on the company ID of the trading
    partner.
         -->RASSC    - Company ID of trading partner.
         <--SUB_ACCT - Sub account.
    *FORM derive_sub_account USING rassc    TYPE t_faglflext-rassc
                        CHANGING sub_acct TYPE t_faglflext-sub_acct.
    IF rassc IS INITIAL.
       CLEAR: sub_acct.
    ELSE.
       sub_acct  = rassc.
       TRANSLATE sub_acct TO UPPER CASE.
    ENDIF.
    *ENDFORM.                    " derive_sub_account
    FORM derive_sub_account USING rcomp  TYPE t_t001-rcomp
                                  rassc  TYPE t_faglflext-rassc
                    CHANGING sub_acct TYPE t_faglflext-sub_acct.
      IF rassc IS INITIAL.
        CLEAR: sub_acct.
      ELSE.
        READ TABLE i_t880 INTO w_t880
          WITH KEY rcomp = rassc
                   BINARY SEARCH.
        IF sy-subrc = 0.
          sub_acct  = w_t880-name2.
          TRANSLATE sub_acct TO UPPER CASE.
        ELSE.
       MESSAGE e060
         WITH w_t001-rcomp.
    Company code & not found on table T880
        ENDIF.
      ENDIF.
    ENDFORM.                    " derive_sub_account
    *&      Form  repopulate_strategic_segment
    Derive the strategic segment based on the company ID of the trading
    partner or the profit center.
         -->RASSC     - Company ID of trading partner.
         -->PRCTR     - Profit center.
         <--STRAT_SEG - Strategic segment.
    FORM repopulate_strategic_segment USING rassc     TYPE t_faglflext-rassc
                                        prctr     TYPE t_faglflext-prctr
                               CHANGING strat_seg TYPE t_faglflext-strat_seg
      DATA:
        lv_segment              TYPE cepc-segment.
      CLEAR:
        strat_seg.
    Find the valid profit center record.
      LOOP AT i_cepc INTO w_cepc
        WHERE prctr =  prctr    AND
              datab <= sy-datum AND
              datbi >= sy-datum.
    Pad segment with leading zeros if necessary.
        lv_segment      = w_cepc-segment.
        SHIFT lv_segment RIGHT DELETING TRAILING ' '.
        TRANSLATE lv_segment USING ' 0'.
    Get the segment name from FAGL_SEGMT (Master Data for Segments).
        SELECT SINGLE *
          FROM fagl_segmt
          WHERE langu   = sy-langu AND
                segment = lv_segment.
        IF sy-subrc = 0.
          strat_seg      = fagl_segmt-name+0(3).
          TRANSLATE strat_seg TO UPPER CASE.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "repopulate_strategic_segment
    " repopulate_strategic_segment&----
    *&      Form  derive_strategic_segment
    Derive the strategic segment based on the company ID of the trading
    partner or the profit center.
         -->RASSC     - Company ID of trading partner.
         -->PRCTR     - Profit center.
         <--STRAT_SEG - Strategic segment.
    FORM derive_strategic_segment USING rassc     TYPE t_faglflext-rassc
                                        prctr     TYPE t_faglflext-prctr
                               CHANGING strat_seg TYPE t_faglflext-strat_seg
                                        sales_type TYPE t_faglflext-zzsareaim
                                        sales_area TYPE t_faglflext-zzsarea.
      DATA:
        lv_segment              TYPE cepc-segment.
      CLEAR:
        strat_seg.
    *Hold values in Sales Type and Sales area before setting to default
    *values
    In case need to use them later
      g_hold_sales_type = sales_type.
      g_hold_sales_area = sales_area.
    If the company ID of the trading partner is populated, then set the
    strategic segment to a default value.
    And set Sales Type and Sales area to default values     **NEM 07/13/06
      IF NOT rassc IS INITIAL.
        strat_seg   = c_def_strat_seg.
        sales_type  = c_sales_type.
        sales_area  = c_sales_area.
        TRANSLATE strat_seg TO UPPER CASE.
        TRANSLATE sales_type TO UPPER CASE.
        TRANSLATE sales_area TO UPPER CASE.
        EXIT.
      ENDIF.
    Find the valid profit center record.
      LOOP AT i_cepc INTO w_cepc
        WHERE prctr =  prctr    AND
              datab <= sy-datum AND
              datbi >= sy-datum.
    Pad segment with leading zeros if necessary.
        lv_segment      = w_cepc-segment.
        SHIFT lv_segment RIGHT DELETING TRAILING ' '.
        TRANSLATE lv_segment USING ' 0'.
    Get the segment name from FAGL_SEGMT (Master Data for Segments).
        SELECT SINGLE *
          FROM fagl_segmt
          WHERE langu   = sy-langu AND
                segment = lv_segment.
        IF sy-subrc = 0.
          strat_seg      = fagl_segmt-name+0(3).
          TRANSLATE strat_seg TO UPPER CASE.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " derive_strategic_segment
    *&      Form  get_cepc_data
    Get CEPC (Profit Center Master Data Table) data from the database.
    FORM get_cepc_data.
      SELECT prctr datbi kokrs datab khinr segment
        INTO TABLE i_cepc
        FROM cepc
        FOR ALL ENTRIES IN i_faglflext
        WHERE prctr = i_faglflext-prctr.
      SORT i_cepc BY prctr datab.
    ENDFORM.                    " get_cepc_data
    *&      Form  derive_strat_seg_chnl
    Derive the strategic segment channel based on the company ID of the
    trading partner or the profit center area.
         -->RASSC          - Company ID of trading partner.
         -->PRCTR          - Profit center.
         <--STRAT_SEG_CHNL - Strategic segment channel.
    FORM derive_strat_seg_chnl USING rassc          TYPE t_faglflext-rassc
                                     prctr          TYPE t_faglflext-prctr
                            CHANGING strat_seg_chnl TYPE
                            t_faglflext-strat_seg_chnl.
      CLEAR:
        g_setclass,
        g_subclass,
        g_setname,
        strat_seg_chnl.
    If the company ID of the trading partner is populated, then set the
    strategic segment to a default value.
      IF NOT rassc IS INITIAL.
        strat_seg_chnl  = c_def_strat_seg_chnl.
        TRANSLATE strat_seg_chnl TO UPPER CASE.
        EXIT.
      ENDIF.
    Check for SETNAME = 2*** in setleaf table.
      PERFORM get_setleaf_data USING c_prctr_group
                                       prctr
                              CHANGING g_subrc.
      IF g_subrc NE c_no_record.
        PERFORM find_setleaf_record CHANGING g_subrc.
        SELECT SINGLE *
        FROM setheadert
        WHERE  setclass = g_setclass AND
               subclass = g_subclass AND
               setname  = g_setname  AND
               langu    = sy-langu.
        IF sy-subrc = 0.
          strat_seg_chnl    = setheadert-descript+0(2).
          TRANSLATE strat_seg_chnl TO UPPER CASE.
        ENDIF.
      ELSE.
    Find the valid profit center record.
        LOOP AT i_cepc INTO w_cepc
          WHERE prctr =  prctr    AND
                datab <= sy-datum AND
                datbi >= sy-datum.
    Get the correct SETNODE (Lower-level sets in sets) record.
          PERFORM get_setnode_data USING c_prctr_group
                                         w_cepc-khinr
                                CHANGING g_subrc.
          PERFORM find_setnode_record CHANGING g_subrc.
          IF g_subrc = c_no_record.
            EXIT.
          ENDIF.
    If an appropriate SETNODE record still has not been found, then
    keep looking.
          IF g_subrc = c_wrong_record.
            DO.
              PERFORM get_setnode_data USING c_prctr_group
                                             w_setnode-setname
                                    CHANGING g_subrc.
              PERFORM find_setnode_record CHANGING g_subrc.
              IF g_subrc = c_no_record OR
                 g_subrc = c_correct_record.
                EXIT.
              ENDIF.
            ENDDO.
          ENDIF.
    In the end, there was no SETNODE record to find.
          IF g_subrc = c_no_record.
            EXIT.
          ENDIF.
          SELECT SINGLE *
            FROM setheadert
            WHERE  setclass = g_setclass AND
                   subclass = g_subclass AND
                   setname  = g_setname  AND
                   langu    = sy-langu.
          IF sy-subrc = 0.
            strat_seg_chnl    = setheadert-descript+0(2).
            TRANSLATE strat_seg_chnl TO UPPER CASE.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " derive_strat_seg_chnl
    *&      Form  get_setnode_data
    Get SETNODE (Lower-level sets in sets) data from the database.
         -->SETCLASS   - Set class.
         -->SUBSETNAME - Subordinate set ID.
         <--SUBRC      - Return code.
    FORM get_setnode_data USING setclass   TYPE c
                                subsetname TYPE c
                       CHANGING subrc      TYPE sy-subrc.
      SELECT setclass subclass setname
        INTO TABLE i_setnode
        FROM setnode
        WHERE setclass   = c_prctr_group AND
              subsetname = subsetname.
      subrc  = sy-subrc.
    ENDFORM.                    " get_setnode_data
    *&      Form  get_setleaf_data
    Get SETLEAF (Values in Sets) data from the database.
         -->SETCLASS   - Set class.
         -->VALFROM    - Subordinate set ID.
         <--SUBRC      - Return code.
    FORM get_setleaf_data USING setclass   TYPE c
                                valfrom    TYPE c
                       CHANGING subrc      TYPE sy-subrc.
      subrc = c_correct_record.
      SELECT setclass setname valfrom subclass
        INTO TABLE i_setleaf
        FROM setleaf
        WHERE setclass   = c_prctr_group AND
              valfrom = valfrom AND
              setname GE '2000' AND
              setname LE '2999'.
      IF sy-subrc <> 0.
        subrc  = c_no_record.
        EXIT.
      ENDIF.
    ENDFORM.                    " get_setleaf_data
    *&      Form  find_setleaf_record
    Find the appropriate SETLEAF record.
         <--SUBRC      - Return code.
    FORM find_setleaf_record CHANGING subrc TYPE sy-subrc.
      subrc  = c_wrong_record.
    If no records were found during selection, then exit the routine.
      READ TABLE i_setleaf INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        subrc  = c_no_record.
        EXIT.
      ENDIF.
    Check to see if one of the records has a setname in the 2000 series of
    numbers.
      LOOP AT i_setleaf INTO w_setleaf.
        g_setclass = w_setleaf-setclass.
        g_subclass = w_setleaf-subclass.
        g_setname  = w_setleaf-setname.
        subrc  = c_correct_record.
      ENDLOOP.
    ENDFORM.                    " find_setleaf_record
    *&      Form  find_setnode_record
    Find the appropriate SETNODE record.
         <--SUBRC      - Return code.
    FORM find_setnode_record CHANGING subrc TYPE sy-subrc.
      subrc  = c_wrong_record.
    If no records were found during selection, then exit the routine.
      READ TABLE i_setnode INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        subrc  = c_no_record.
        EXIT.
      ENDIF.
    Check to see if one of the records has a setname in the 2000 series of
    numbers.
      LOOP AT i_setnode INTO w_setnode.
        IF w_setnode-setname+0(1) = c_valid_number.
          g_setclass = w_setnode-setclass.
          g_subclass = w_setnode-subclass.
          g_setname  = w_setnode-setname.
          subrc  = c_correct_record.
          EXIT.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " find_setnode_record
    *&      Form  split_records_by_period
    Split the i_FAGLFLEXT records by fiscal period.  This is necessary
    because all (16) fiscal periods are on one record.
    FORM split_records_by_period .
      REFRESH:
        i_output_detail.
      LOOP AT i_faglflext INTO w_faglflext.
    START OF CHANGES BY BAYAPV on 07/07/2007**********************
    *SELECT SINGLE BUKRS
          SAKNR
          XOPVW
          into w_skb1
          from skb1
          FOR ALL ENTRIES IN I_FAGLFLEXT
          where bukrs = w_faglflext-rbukrs
            and SAKNR = w_faglflext-racct.
    *IF w_skb1-XOPVW = 'X'.
    *SELECT BUKRS
          HKONT

  • ALV grid - not saving data withoutpressing 'Enter'.

    hi,
    I have an ALV grid (OO). I have written the code to update the final internal table in the method handle_data_changed.
    So If the user presses SAVE without hitting 'Enter' key, it is not saving the data .
    How can I handle this.
    Regards,
    Beena.

    hi,
    u can refresh it using method refresh_table_display.
    regards,
    janakiram.

  • Popup datagrid not populating data from xml

    hey guys,
    im having trouble creating a datagrid within a popup. i
    created the datagrid on a normal panel and everything worked fine.
    then i tried to recreate it within a popup and now im having
    trouble getting the xml data onto the datagrid. i think the problem
    is that the xml is not a variable within the function but ive tried
    multiple methods and i have not gotten it to work.
    whenever it runs it just says TypeError: Error #1009: Cannot
    access a property or method of a null object reference. yet when i
    remove the dg.dataProvider = list.michigan.venue; line the datagrid
    works but there is no data obviously... how do i define the xml
    dataprovider within the function??? also, i need the name of the
    state to be dynamic... how could i make it so that the datagrid
    uses the selected state within the xml file? i imagine i would be
    passing a variable through the function that would be called when i
    select the path within the xml. THX GUYS!
    <venuelist>
    <michigan>
    <venue>
    <name>Location Name</name>
    <address>This is the address</address>
    <city>Detroit</city>
    <state>MI</state>
    <zip>48209</zip>
    <phone>(313)555-5555</phone>
    </venue>
    </michigan>
    <illinois>
    <venue>
    <name>Location Name</name>
    <address>This is the address</address>
    <city>Detroit</city>
    <state>MI</state>
    <zip>48209</zip>
    <phone>(313)555-5555</phone>
    </venue>
    </illinois>
    </venuelist>
    here is the code im using to get the xml file...
    <mx:XML id="list"/>
    <mx:HTTPService id="getXML" url="VenueList/list.xml"
    resultFormat="e4x" result="list = XML(event.result);"/>
    here is the code for the popup
    <mx:Script>
    <![CDATA[
    import mx.controls.dataGridClasses.DataGridColumn;
    import mx.collections.ArrayCollection;
    import mx.containers.Panel;
    import mx.controls.Button;
    import mx.controls.DataGrid;
    import mx.controls.dataGridClasses.DataGridColumn
    import mx.managers.PopUpManager;
    private var panel:Panel;
    private function init():void {
    var dg:DataGrid = new DataGrid();
    var dgc:Array = dg.columns;
    var d1:DataGridColumn = new DataGridColumn;
    var d2:DataGridColumn = new DataGridColumn;
    var d3:DataGridColumn = new DataGridColumn;
    var d4:DataGridColumn = new DataGridColumn;
    var d5:DataGridColumn = new DataGridColumn;
    var d6:DataGridColumn = new DataGridColumn;
    dg.width = 638
    dg.height = 163
    dg.dataProvider = list.michigan.venue;
    d1.width = 150;
    d1.headerText = "Venue Name";
    d1.dataField = "list.michigan.venue.name";
    d2.width = 150;
    d2.headerText = "Address";
    d2.dataField = "address";
    d3.width = 100;
    d3.headerText = "City";
    d3.dataField = "city";
    d4.width = 50;
    d4.headerText = "State";
    d4.dataField = "state";
    d5.width = 50;
    d5.headerText = "Zip";
    d5.dataField = "zip";
    d6.width = 100;
    d6.headerText = "Phone";
    d6.dataField = "phone";
    dgc.push(d1);
    dgc.push(d2);
    dgc.push(d3);
    dgc.push(d4);
    dgc.push(d5);
    dgc.push(d6);
    dg.columns = dgc;
    panel = new Panel();
    panel.title = "Here are our venues:";
    panel.width = 658;
    panel.height = 203;
    panel.addChild(dg);
    private function closePopUp(evt:MouseEvent):void {
    PopUpManager.removePopUp(panel);
    private function createPopUp():void {
    PopUpManager.addPopUp(panel, this, true);
    PopUpManager.centerPopUp(panel);

    hey guys,
    im having trouble creating a datagrid within a popup. i
    created the datagrid on a normal panel and everything worked fine.
    then i tried to recreate it within a popup and now im having
    trouble getting the xml data onto the datagrid. i think the problem
    is that the xml is not a variable within the function but ive tried
    multiple methods and i have not gotten it to work.
    whenever it runs it just says TypeError: Error #1009: Cannot
    access a property or method of a null object reference. yet when i
    remove the dg.dataProvider = list.michigan.venue; line the datagrid
    works but there is no data obviously... how do i define the xml
    dataprovider within the function??? also, i need the name of the
    state to be dynamic... how could i make it so that the datagrid
    uses the selected state within the xml file? i imagine i would be
    passing a variable through the function that would be called when i
    select the path within the xml. THX GUYS!
    <venuelist>
    <michigan>
    <venue>
    <name>Location Name</name>
    <address>This is the address</address>
    <city>Detroit</city>
    <state>MI</state>
    <zip>48209</zip>
    <phone>(313)555-5555</phone>
    </venue>
    </michigan>
    <illinois>
    <venue>
    <name>Location Name</name>
    <address>This is the address</address>
    <city>Detroit</city>
    <state>MI</state>
    <zip>48209</zip>
    <phone>(313)555-5555</phone>
    </venue>
    </illinois>
    </venuelist>
    here is the code im using to get the xml file...
    <mx:XML id="list"/>
    <mx:HTTPService id="getXML" url="VenueList/list.xml"
    resultFormat="e4x" result="list = XML(event.result);"/>
    here is the code for the popup
    <mx:Script>
    <![CDATA[
    import mx.controls.dataGridClasses.DataGridColumn;
    import mx.collections.ArrayCollection;
    import mx.containers.Panel;
    import mx.controls.Button;
    import mx.controls.DataGrid;
    import mx.controls.dataGridClasses.DataGridColumn
    import mx.managers.PopUpManager;
    private var panel:Panel;
    private function init():void {
    var dg:DataGrid = new DataGrid();
    var dgc:Array = dg.columns;
    var d1:DataGridColumn = new DataGridColumn;
    var d2:DataGridColumn = new DataGridColumn;
    var d3:DataGridColumn = new DataGridColumn;
    var d4:DataGridColumn = new DataGridColumn;
    var d5:DataGridColumn = new DataGridColumn;
    var d6:DataGridColumn = new DataGridColumn;
    dg.width = 638
    dg.height = 163
    dg.dataProvider = list.michigan.venue;
    d1.width = 150;
    d1.headerText = "Venue Name";
    d1.dataField = "list.michigan.venue.name";
    d2.width = 150;
    d2.headerText = "Address";
    d2.dataField = "address";
    d3.width = 100;
    d3.headerText = "City";
    d3.dataField = "city";
    d4.width = 50;
    d4.headerText = "State";
    d4.dataField = "state";
    d5.width = 50;
    d5.headerText = "Zip";
    d5.dataField = "zip";
    d6.width = 100;
    d6.headerText = "Phone";
    d6.dataField = "phone";
    dgc.push(d1);
    dgc.push(d2);
    dgc.push(d3);
    dgc.push(d4);
    dgc.push(d5);
    dgc.push(d6);
    dg.columns = dgc;
    panel = new Panel();
    panel.title = "Here are our venues:";
    panel.width = 658;
    panel.height = 203;
    panel.addChild(dg);
    private function closePopUp(evt:MouseEvent):void {
    PopUpManager.removePopUp(panel);
    private function createPopUp():void {
    PopUpManager.addPopUp(panel, this, true);
    PopUpManager.centerPopUp(panel);

  • Flash 10.1.53.64 on OS 10.6.4 not populating data

    I am using Flash 10.1.53.64 on Mac OS 10.6.4 in the latest versions of Firefox, Safari and Chrome.  Any Flash-based web page will not populate any data.  For example, Adobe's own store woulld not let me purchase the latest version of Llightroom 3 becuase half the data was not on the page.  mlb.com's Gameday app will not populate the player's stats or any live score information, but it does show the animation of each pitch.  Oddly, when I created a test user login on the same computer and tried it, it works fine.  But on my normal login account, it does not work.  How can I troubleshoot this? Obviously there is an "extension"  conflict with something in that particular login.

    My apologies.  I was directed to this forum directly by the Adobe support website, so I assumed that it was the official
    Adobe-sanctioned support forum monitored by Adobe employees. I guess Adobe has no online tech support beyond the unhelpful FAQ pages.
    I am not going to ever pay $39 for technical support for a supposedly free product.  Adobe makes more than enough money from all the CS products I have to buy every year that they can afford to provide REAL, direct and free technical support.

  • Master/Details Relationship using View Links is not not population data

    Hi,
    I have problem in generating proper data in master/detail relationship using view links passing three parameters between two custom tables can guide me the steps and process how i will able to generate and acheive this requirement.
    very urgent
    Please suggest me

    Without further details, I'd suggest reviewing the following Section of the Fusion Developers Guide:
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/web_masterdetail.htm#ADFFD758
    I've done this many times without issue.

  • Flight Tracker widget lists not populated on new Macbook

    Do I need to load this information somehow? It opens up no problem and all my other widgets are working fine, internet connection is good, etc. I'm a new Mac user so I feel like I could've missed something!

    I have the same problem. Flight Tracker is working on my old computer: a PowerBook with OSX 10.4 installed, but not on this one an iMac running Leopard.
    You shouldn't have to load any information, just select the airline, departure and arrival city.

  • Not populating data in Discoverer base table eul5_objs

    Hi,
    I am discoverer administrator. I am running the report where I found out that there is no data in column eul5_objs.obj_ba_id which is resulting in no results. Kindly suggest what changes needs to be done which will help to populate data in column eul5_objs.obj_ba_id.

    Hi,
    Try following
    step 1. Insert routing header (bom_op_routings_interface) : Run Interface
    step 2. Insert routing lines (bom_op_sequences_interface) with correct reference to routing_sequence_id: Run Interface
    step 3. Insert all resource lines (bom_op_resources_interface) with correct reference to operation_sequence_id, routing_sequence_id , Run Interface.
    Thanks,
    Hrishi

Maybe you are looking for

  • Firewire hubs recommendations please...

    I have 2 x LaCie Mini 250G firewire drives which I have been using with my Mini G4 by daily chaining them. I occasionally get I/O errors when the drives are under high load. I then need to do a hard reset to get the machine responding again. I have t

  • How to view purchase order output

    Hi all,, am an ABAPer.. i have an issue with the purchase order... But before that, how to view the output of the purchase order.. from transaction me23n.. please let me know the procedure.. thanks in adv..

  • Help two sql queries toload target table

    create table table1     (code varchar2(10)      ,mod_time date);      insert into table1 values('2533',to_date('31-JUL-2012', 'DD-MON-YY'));      insert into table1 values('2534',to_date('31-JUL-2012', 'DD-MON-YY'));       insert into table1 values('

  • Changing  _db_block_hash_buckets

    I have a lot of Cache-buffers chain latches and I need to change dbblock_hash_buckets. How could I do that with no problem and hassle? What are the downsides? How I can calculate how much to push them up? Thanks, MJ

  • WIfi adapter issue

    Hi,About a month ago I faced an issue regarding wifi adapter. The problem is solved after contacting hp techinician. They replaced my wifi adapter with a new one. When I bought the laptop I have ralink adapter(not sure with model number) after compla