Displaying a report in matrix format

Hi,
  I want to display my report in the below given format, i have tried many ways but i didnt get the correct output. Please help.
I will one Change Request and some Transport Requests will be assigned to it and some objects which belong to that transport requests will be displayed below.
Now I have put 'X' mark to the objects which belong to the transport requests. There can be one or more objects for a particular transport request.
The data should be displayed like this.
  SNO                                TR1                        TR2                       TR3
Obj1                                    X                                                         X
Obj2                                    X
Obj3                                                                  X                           X
Obj4                                   X                             X                           X
Obj5                                                                 X
TR above means Transport Request.
Objects can be either programs, tables, function modules etc.,
I have given just an example, the data should be displayed in the above manner, could anyone please help.
Thanks & Regards
Haritha.

Hi
U should have an internal table like this:
.DATA: BEGIN OF ITAB OCCURS 0,
        OBJECT_NAME TYPE TADIR-OBJ_NAME,
        TR1 TYPE FLAG,
        TR2 TYPE FLAG,
        TR3 TYPE FLAG,
        TR4 TYPE FLAG,
        TR5 TYPE FLAG,
        TRN TYPE FLAG,
      END   OF ITAB.
The first field is the abap object name, the others are the flag for the requets: the header of every TR* field will be the number of the request.
Now the problem is to understand how many transport u want to need to manage in your report: because if you need to manage N requests, your internal table ITAB will be a "statical" internal table with N fields type TR, else u need to use the dynamic internal table.
Max
Edited by: max bianchi on Nov 17, 2008 4:42 PM
Edited by: max bianchi on Nov 17, 2008 4:55 PM

Similar Messages

  • Display of report in excel format.

    Hi,
      How to display a report in excel format?? I have the display details in an internal table.
        Is it possible for the output to come in excel format as soon as we  run the pgm other.than downloading from list or grid format..If so how to do it??Kindly help..
    Thanks..

    Hi,
    Once you have all the data in the internal table, just use function module 'Download' or 'WS_Download' and pass the parameters in function module like the below for example.
    if not i_list[] is initial.                          " i_list is an internal table  
    call function 'WS_DOWNLOAD'                          
          exporting                                       
               filename            = filename1            
               filetype            = 'DAT'                
          tables                                          
               data_tab            = i_list               
               fieldnames          = i_header     "i _header has the field names
          exceptions                                      
               file_open_error     = 1                    
               file_write_error    = 2                    
               invalid_filesize    = 3                    
               invalid_table_width = 4                    
               invalid_type        = 5                    
               no_batch            = 6                    
               unknown_error       = 7                    
               others              = 8.                   
    endif.
    Now, the excel will be created which has all the data.
    Hope this helps.
    Thanks,
    Srinivasa

  • Module Pool to Display the Values in Matrix Format

    Hi Experts,
    I have one requirement which as follows,
    In Module pool program i need to display the  Values in Matrix format i.e,
    Row = Color
    Column = Size
    Can you Please Help me out.
    Thanks n Advance.
    Logu

    create your internal table dynamically (with number of columns corresponding to number of sizes)
    this is done easily with class CL_ALV_TABLE_CREATE method CREATE_DYNAMIC_TABLE
    then use the internal table for ALV output

  • How to display a report in tree format

    hai can any one send me the code to display the report in a tree format
    if i take example of customer numbers as tree branches and if i click each customer number the tree should expand showing all sales orders for a customer
    ragrds
    afzal

    use FM HR_ALV_HIERSEQ_LIST_DISPLAY
    there are 2 internal table , one for header and one for detail
    below is code for reference
    REPORT  zinsd_quot_cont.
    TYPES : BEGIN OF ty_vbak,
             vbeln TYPE      vbeln_va,
             vkorg TYPE      vkorg,
             vtweg TYPE      vtweg,
             spart TYPE      spart,
             vkbur TYPE     vkbur,
             vkgrp TYPE     vkgrp,
             angdt  TYPE angdt_v,
             bnddt  TYPE bnddt,
             kunnr  TYPE kunnr,
             kwmeng TYPE kwmeng,
             meins  TYPE meins,
             kunwe  TYPE kunnr,
             name1  TYPE  name1_gp  ,
             name2  TYPE  name1_gp  ,
             sel(1),
             expand(1),
             salesdocument TYPE bapivbeln-vbeln,
             message TYPE bapi_msg,
            END   OF ty_vbak.
    DATA :  w_vbak TYPE ty_vbak,
            t_vbak TYPE TABLE OF ty_vbak.
    DATA :  w_update TYPE ty_vbak,
            t_update TYPE TABLE OF ty_vbak.
    TYPES : BEGIN OF ty_kna1,
             kunnr  TYPE      kunnr,
             name1  TYPE  name1_gp  ,
            END   OF ty_kna1.
    DATA :  w_kna1 TYPE ty_kna1,
            t_kna1 TYPE TABLE OF ty_kna1.
    TYPES : BEGIN OF ty_vbap,
            vbeln      TYPE vbeln_va,
            posnr      TYPE posnr_va,
            matnr      TYPE matnr,
            matkl      TYPE matkl,
            werks      TYPE werks_ext,
            kwmeng TYPE kwmeng,
            meins      TYPE meins,
            mvgr5  TYPE     mvgr5,
            maktx  TYPE     maktx,
            END   OF ty_vbap.
    DATA :  w_vbap TYPE ty_vbap,
            t_vbap TYPE TABLE OF ty_vbap.
    TYPES : BEGIN OF ty_makt,
             matnr TYPE     matnr,
             maktx TYPE     maktx,
            END   OF ty_makt.
    DATA :  w_makt TYPE ty_makt,
            t_makt TYPE TABLE OF ty_makt.
    TYPES : BEGIN OF ty_sum,
            vbeln      TYPE vbeln_va,
            kwmeng TYPE kwmeng,
            END   OF ty_sum.
    DATA :  w_sum TYPE ty_sum,
            t_sum TYPE TABLE OF ty_sum.
    TYPES : BEGIN OF ty_vbpa,
            vbeln     TYPE vbeln,
            posnr     TYPE posnr,
            parvw     TYPE parvw,
            kunnr     TYPE kunnr,
            END   OF ty_vbpa.
    DATA :  w_vbpa TYPE ty_vbpa,
            t_vbpa TYPE TABLE OF ty_vbpa.
    TYPES : BEGIN OF ty_vbup,
            vbeln      TYPE vbeln,
            posnr  TYPE posnr ,
            gbsta      TYPE gbsta  ,
            END   OF ty_vbup.
    DATA :  w_vbup TYPE ty_vbup,
            t_vbup TYPE TABLE OF ty_vbup.
    TYPE-POOLS slis.
    DATA: t_fieldcatalog  TYPE slis_t_fieldcat_alv,
          w_fieldcatalog TYPE slis_fieldcat_alv,
          w_layout    TYPE slis_layout_alv,
          gs_keyinfo  TYPE slis_keyinfo_alv.
    DATA: g_tabname_header TYPE slis_tabname,
          g_tabname_item   TYPE slis_tabname.
      data definition
          Batchinputdata of single transaction
    DATA:   bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
          messages of call transaction
    DATA:   messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    DATA : g_lines TYPE i.
    *Selection Screen
    TABLES : vbak,vbap.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS s_vkorg FOR vbak-vkorg. " Sales Org
    SELECT-OPTIONS s_vtweg FOR vbak-vtweg. " Dist Channel
    SELECT-OPTIONS s_spart FOR vbak-spart. " Division
    SELECT-OPTIONS s_vkbur FOR vbak-vkbur. " Sales Off
    SELECT-OPTIONS s_vkgrp FOR vbak-vkgrp. " Sales Grp
    SELECT-OPTIONS s_matkl FOR vbap-matkl. " Mat Grp
    SELECT-OPTIONS s_werks FOR vbap-werks. " Plant
    SELECT-OPTIONS s_period FOR vbak-angdt. " Sales Off
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      PERFORM f_getdata.
      PERFORM f_initdata.
    END-OF-SELECTION.
      PERFORM f_createalv.
      PERFORM f_dispalv.
    *&      Form  f_getdata
          text
    -->  p1        text
    <--  p2        text
    FORM f_getdata .
    *Sales Header
      SELECT
        vbeln
        vkorg
        vtweg
        spart
        vkbur
        vkgrp
        angdt     
        bnddt
        kunnr
      INTO TABLE t_vbak
      FROM vbak
      WHERE
        vkorg IN s_vkorg      " Sales Org
        AND vtweg IN s_vtweg  " Dist Channel
        AND spart IN s_spart  " Division
        AND vkbur IN s_vkbur  " Sales Off
        AND vkgrp IN s_vkgrp  " Sales Grp
        AND angdt IN s_period
        AND bnddt IN s_period
        AND auart = 'ZQMO'
        AND vbtyp = 'B'.
    *CUST NAME
      SELECT
         kunnr
         name1
      INTO TABLE t_kna1
      FROM kna1
      FOR ALL ENTRIES IN t_vbak
      WHERE
       kunnr = t_vbak-kunnr
    *Sales Item
      SELECT
        vbeln     
        posnr     
        matnr     
        matkl     
        werks     
        kwmeng
        meins
        mvgr5
      INTO TABLE t_vbap
      FROM vbap
      FOR ALL ENTRIES IN t_vbak
      WHERE
       vbeln = t_vbak-vbeln
       AND matkl IN  s_matkl  " Mat Grp
       AND werks IN  s_werks  " Plant
    *Partners
      SELECT
       vbeln     
       posnr     
       parvw     
       kunnr     
      INTO TABLE t_vbpa
      FROM vbpa
      FOR ALL ENTRIES IN t_vbak
      WHERE
        vbeln = t_vbak-vbeln.
      IF t_vbpa[] IS NOT INITIAL.
        SELECT
            kunnr
            name1
         APPENDING TABLE t_kna1
         FROM kna1
         FOR ALL ENTRIES IN t_vbpa
         WHERE
          kunnr = t_vbpa-kunnr
      ENDIF.
    *Status - Sales Doc
      SELECT
        vbeln     
        posnr
        gbsta
      INTO TABLE t_vbup
      FROM vbup
      FOR ALL ENTRIES IN t_vbap
      WHERE
       vbeln = t_vbap-vbeln
       AND posnr = t_vbap-posnr
       AND gbsta NE 'C'.
      SELECT
          matnr
          maktx
      INTO TABLE t_makt
      FROM makt
      FOR ALL ENTRIES IN t_vbap
      WHERE
       matnr = t_vbap-matnr
       AND spras = 'E'.
    ENDFORM.                    " f_getdata
    *&      Form  f_initdata
          text
    -->  p1        text
    <--  p2        text
    FORM f_initdata .
      SORT t_vbap BY vbeln DESCENDING.
    *delete all closed stat items
      LOOP AT t_vbap INTO w_vbap.
        READ TABLE t_vbup INTO w_vbup
        WITH KEY
         vbeln = w_vbap-vbeln
         posnr = w_vbap-posnr.
        IF sy-subrc <> 0.
          DELETE t_vbap.
          CONTINUE.
        ELSE.
          READ TABLE t_makt INTO w_makt
          WITH
          KEY matnr = w_vbap-matnr.
          IF sy-subrc = 0.
            w_vbap-maktx = w_makt-maktx.
            MODIFY t_vbap FROM w_vbap.
          ENDIF.
        ENDIF.
      ENDLOOP.
    *find the total quantity
      LOOP AT t_vbap INTO w_vbap.
        w_sum-vbeln = w_vbap-vbeln.
        w_sum-kwmeng = w_vbap-kwmeng.
        COLLECT w_sum INTO t_sum.
        CLEAR w_sum.
      ENDLOOP.
    *populate header
      LOOP AT t_vbak INTO w_vbak.
      Quantity - Total
        READ TABLE t_sum INTO w_sum
        WITH KEY
         vbeln = w_vbak-vbeln.
        IF sy-subrc = 0.
          w_vbak-kwmeng = w_sum-kwmeng.
        ELSE.
          CLEAR w_vbak-kwmeng.
        ENDIF.
      UoM
        READ TABLE t_vbap INTO w_vbap
        WITH KEY
         vbeln = w_vbak-vbeln.
        IF sy-subrc = 0.
          w_vbak-meins = w_vbap-meins.
        ELSE.
          CLEAR w_vbak-meins.
        ENDIF.
      Partner
        READ TABLE t_vbpa INTO w_vbpa
        WITH KEY
         vbeln = w_vbak-vbeln
         parvw = 'WE'.
        IF sy-subrc = 0.
          w_vbak-kunwe = w_vbpa-kunnr.
        ELSE.
          CLEAR w_vbak-kunwe.
        ENDIF.
      SHIP TO PARTY NAME
        READ TABLE t_kna1 INTO w_kna1
        WITH KEY
         kunnr = w_vbak-kunwe.
        IF sy-subrc = 0.
          w_vbak-name2 = w_kna1-name1.
        ENDIF.
      CUST NAM - SOLD TO PARTY
        READ TABLE t_kna1 INTO w_kna1
        WITH KEY
         kunnr = w_vbak-kunnr.
        IF sy-subrc = 0.
          w_vbak-name1 = w_kna1-name1.
        ENDIF.
        MODIFY t_vbak FROM w_vbak.
      ENDLOOP.
      DELETE t_vbak WHERE kwmeng IS INITIAL.
      SORT t_vbak BY vbeln DESCENDING.
      SORT t_vbap BY vbeln  DESCENDING posnr ASCENDING.
    ENDFORM.                    " f_initdata
    *&      Form  f_createalv
          Create Field Cat.
    -->  p1        text
    <--  p2        text
    FORM f_createalv .
      g_tabname_header = 't_vbak'.
      g_tabname_item   = 't_vbap' .
      CLEAR gs_keyinfo.
      gs_keyinfo-header01 = 'VBELN'.
      gs_keyinfo-item01   = 'VBELN'.
    *VBAK
      w_fieldcatalog-fieldname = 'VBELN'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Sales Document'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'VKORG'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Sales Org'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'VTWEG'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Dist Channel'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'SPART'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Division'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'VKBUR'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Sales Office'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'VKGRP'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Sales GRP'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'KUNNR'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Sold to Party'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'NAME1'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-outputlen    = 35.
      w_fieldcatalog-seltext_l = 'Sold to Party Code - Name'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'KUNWE'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Ship to Party'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'NAME2'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Ship Party Code - Name'.
      w_fieldcatalog-outputlen    = 35.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'KWMENG'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Quantity'.
      w_fieldcatalog-outputlen    = 25.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'MEINS'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'UoM'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'SALESDOCUMENT'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Document'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'MESSAGE'.
      w_fieldcatalog-tabname   = 't_vbak'.
      w_fieldcatalog-seltext_l = 'Log'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
    *VBAP
      w_fieldcatalog-fieldname = 'POSNR'.
      w_fieldcatalog-tabname   = 't_vbap'.
      w_fieldcatalog-seltext_l = 'POS'.
      w_fieldcatalog-outputlen    = 6.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'MATNR'.
      w_fieldcatalog-tabname   = 't_vbap'.
      w_fieldcatalog-seltext_l = 'Material'.
      w_fieldcatalog-outputlen    = 18.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'MAKTX'.
      w_fieldcatalog-tabname   = 't_vbap'.
      w_fieldcatalog-seltext_l = 'Material Desc'.
      w_fieldcatalog-outputlen    = 40.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'MATKL'.
      w_fieldcatalog-tabname   = 't_vbap'.
      w_fieldcatalog-seltext_l = 'Material Grp'.
      w_fieldcatalog-outputlen    = 9.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'MVGR5'.
      w_fieldcatalog-tabname   = 't_vbap'.
      w_fieldcatalog-seltext_l = 'MCNO'.
      w_fieldcatalog-outputlen    = 4.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'WERKS'.
      w_fieldcatalog-tabname   = 't_vbap'.
      w_fieldcatalog-seltext_l = 'Plant'.
      w_fieldcatalog-outputlen    = 91.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'KWMENG'.
      w_fieldcatalog-tabname   = 't_vbap'.
      w_fieldcatalog-seltext_l = 'Quantity'.
      w_fieldcatalog-outputlen    = 25.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
      w_fieldcatalog-fieldname = 'MEINS'.
      w_fieldcatalog-tabname   = 't_vbap'.
      w_fieldcatalog-seltext_l = 'UoM'.
      APPEND w_fieldcatalog TO t_fieldcatalog.
      CLEAR: w_fieldcatalog.
    LAYOUT
    w_layout-colwidth_optimize  = 'X'.
      w_layout-zebra  = 'X'.
      w_layout-expand_fieldname = 'EXPAND'.
      w_layout-box_fieldname  = 'SEL'.
      w_layout-box_tabname  = 't_vbak'.
    ENDFORM.                    " f_createalv
    *&      Form  f_dispalv
          Call ALV
    -->  p1        text
    <--  p2        text
    FORM f_dispalv .
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
         EXPORTING
          i_callback_program             = sy-repid
          i_callback_pf_status_set       = 'SET_PF_STATUS'
          i_callback_user_command        = 'USER_COMMAND'
          is_layout                      = w_layout
          it_fieldcat                    = t_fieldcatalog
        IT_EXCLUDING                   =
        IT_SPECIAL_GROUPS              =
        IT_SORT                        =
        IT_FILTER                      =
        IS_SEL_HIDE                    =
        I_SCREEN_START_COLUMN          = 0
        I_SCREEN_START_LINE            = 0
        I_SCREEN_END_COLUMN            = 0
        I_SCREEN_END_LINE              = 0
        I_DEFAULT                      = 'X'
        I_SAVE                         = ' '
        IS_VARIANT                     =
        IT_EVENTS                      =
        IT_EVENT_EXIT                  =
           i_tabname_header               = g_tabname_header
           i_tabname_item                 = g_tabname_item
           is_keyinfo                     = gs_keyinfo
         TABLES
           t_outtab_header                = t_vbak
           t_outtab_item                  = t_vbap
        EXCEPTIONS
          program_error                  = 1
          OTHERS                         = 2
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " f_dispalv
    *&      Form  set_pf_status
          PF stat
         -->RT_EXTAB   text
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZINSD_QUOT_CONT_ST'.
    ENDFORM.                    "set_pf_status
    *&      Form  user_command
          Process List UCOMM
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.
      REFRESH t_update.
      IF r_ucomm = 'EXIT'.
        LEAVE PROGRAM.
      ENDIF.
      IF r_ucomm = 'EXECUTE'.
        LOOP AT t_vbak INTO w_update
        WHERE
         sel = 'X'
         AND salesdocument = ' '.
          APPEND w_update TO t_update.
        ENDLOOP.
        IF t_update[] IS NOT INITIAL.
          LOOP AT t_update INTO w_update.
           PERFORM f_bapi_contract_createfromdata USING w_update.
            PERFORM f_bdc_contract_from_quotation.
            MODIFY t_update FROM w_update.
          ENDLOOP.
        ELSE.
        ENDIF.
        PERFORM f_dispalv.
      ENDIF.
      IF r_ucomm  = '&IC1'.
        IF rs_selfield-sel_tab_field = 't_vbak-VBELN'.
          SET PARAMETER ID 'AGN' FIELD rs_selfield-value.
          CALL TRANSACTION 'VA23' AND SKIP FIRST SCREEN.
        ENDIF.
        IF rs_selfield-sel_tab_field = 't_vbak-SALESDOCUMENT' AND
           rs_selfield-value NE ' '.
          SET PARAMETER ID 'KTN' FIELD rs_selfield-value.
          CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDIF.
    ENDFORM.                    "user_command
    *&      Form  F_BAPI_CONTRACT_CREATEFROMDATA
          BAPI CALL
         -->P_W_UPDATE  text
    FORM f_bapi_contract_createfromdata  USING  p_w_update  STRUCTURE w_update .
      DATA : w_contract_header_in  TYPE bapisdhd1  ,
             w_contract_header_inx TYPE bapisdhd1x ,
             t_contract_items_in   TYPE TABLE OF  bapisditm   WITH HEADER LINE,
             t_contract_items_inx  TYPE TABLE OF  bapisditmx  WITH HEADER LINE,
             t_contract_partners   TYPE TABLE OF  bapiparnr   WITH HEADER LINE,
             t_return              TYPE TABLE OF  bapiret2    WITH HEADER LINE.
      CLEAR : w_contract_header_in,
              w_contract_header_inx.
      REFRESH : t_contract_items_in,
                t_contract_items_inx,
                t_contract_partners,
                t_return.
      w_contract_header_in-doc_type   = 'ZCNT'.
      w_contract_header_in-sales_org  = p_w_update-vkorg.
      w_contract_header_in-distr_chan = p_w_update-vtweg.
      w_contract_header_in-division   = p_w_update-spart.
      w_contract_header_in-ct_valid_f = p_w_update-angdt.
      w_contract_header_in-ct_valid_t = p_w_update-bnddt.
      w_contract_header_inx-doc_type  = 'X'.
      w_contract_header_inx-sales_org = 'X'.
      w_contract_header_inx-distr_chan = 'X'.
      w_contract_header_inx-division  = 'X'.
      w_contract_header_inx-ct_valid_f = 'X'.
      w_contract_header_inx-ct_valid_t = 'X'.
      LOOP AT t_vbap INTO w_vbap
      WHERE
        vbeln = p_w_update-vbeln.
        t_contract_items_in-material = w_vbap-matnr.
        t_contract_items_in-plant    = w_vbap-werks.
        t_contract_items_in-target_qty = w_vbap-kwmeng.
        t_contract_items_in-target_qu  = w_vbap-meins.
        t_contract_items_in-ref_doc    = w_vbap-vbeln.
        t_contract_items_in-ref_doc_it = w_vbap-posnr.
        t_contract_items_in-ref_doc_ca = 'B'.
        t_contract_items_in-prc_group5 = w_vbap-mvgr5.
        t_contract_items_inx-material = 'X'.
        t_contract_items_inx-plant    = 'X'.
        t_contract_items_inx-target_qty = 'X'.
        t_contract_items_inx-target_qu  = 'X'.
        t_contract_items_inx-ref_doc    = 'X'.
        t_contract_items_inx-ref_doc_it = 'X'.
        t_contract_items_inx-ref_doc_ca = 'X'.
        t_contract_items_inx-prc_group5 = 'X'.
        APPEND t_contract_items_in.
        APPEND t_contract_items_inx.
      ENDLOOP.
      LOOP AT t_vbpa INTO w_vbpa
       WHERE
        vbeln =  p_w_update-vbeln.
         AND posnr = w_vbap-posnr.
        t_contract_partners-partn_role = w_vbpa-parvw.
        t_contract_partners-partn_numb = w_vbpa-kunnr.
        t_contract_partners-itm_number = w_vbpa-posnr.
        APPEND t_contract_partners.
      ENDLOOP.
      CALL FUNCTION 'BAPI_CONTRACT_CREATEFROMDATA'
        EXPORTING
      SALESDOCUMENTIN               =
        contract_header_in            = w_contract_header_in
        contract_header_inx           = w_contract_header_inx
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       = ' '
      INT_NUMBER_ASSIGNMENT         = ' '
      BEHAVE_WHEN_ERROR             = ' '
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
    IMPORTING
        salesdocument                 = p_w_update-salesdocument
    TABLES
        return                        = t_return
        contract_items_in             = t_contract_items_in
        contract_items_inx            = t_contract_items_inx
        contract_partners             = t_contract_partners
      CONTRACT_CONDITIONS_IN        =
      CONTRACT_CONDITIONS_INX       =
      CONTRACT_CFGS_REF             =
      CONTRACT_CFGS_INST            =
      CONTRACT_CFGS_PART_OF         =
      CONTRACT_CFGS_VALUE           =
      CONTRACT_CFGS_BLOB            =
      CONTRACT_CFGS_VK              =
      CONTRACT_CFGS_REFINST         =
      CONTRACT_DATA_IN              =
      CONTRACT_DATA_INX             =
      CONTRACT_TEXT                 =
      CONTRACT_KEYS                 =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
      IF p_w_update-salesdocument NE '   ' .
        p_w_update-message = 'SUCCESS'.
      ELSE.
        READ TABLE t_return INDEX 1.
        p_w_update-message =  t_return-message.
      ENDIF.
      READ TABLE t_vbak INTO w_vbak
      WITH KEY
      vbeln  = p_w_update-vbeln.
      IF sy-subrc = 0.
        MODIFY  t_vbak INDEX sy-tabix FROM p_w_update .
      ENDIF.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    ENDFORM.                    " F_BAPI_CONTRACT_CREATEFROMDATA
    *&      Form  f_bdc_contract_from_Quotation
          BAPI CALL
         -->P_W_UPDATE  text
    FORM f_bdc_contract_from_quotation.
      DATA : l_date TYPE char10.
      REFRESH : messtab, bdcdata.
      CLEAR : messtab, bdcdata.
      PERFORM bdc_dynpro      USING 'SAPMV45A' '0101'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=COPY'.
      PERFORM bdc_field       USING 'VBAK-AUART'
                                   'ZCNT'.
      PERFORM bdc_dynpro      USING 'SAPLV45C' '0100'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=RANG'.
      PERFORM bdc_dynpro      USING 'SAPLV45C' '0100'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=UEBR'.
      PERFORM bdc_field       USING 'LV45C-VBELN'
                                     w_update-vbeln.
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4001'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=SICH'.
      IF NOT w_update-angdt IS INITIAL.
        CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
          EXPORTING
            date_internal            = w_update-angdt
          IMPORTING
            date_external            = l_date
          EXCEPTIONS
            date_internal_is_invalid = 1
            OTHERS                   = 2.
        PERFORM bdc_field       USING 'VBAK-GUEBG'
                                       l_date.
      ENDIF.
      IF NOT w_update-bnddt IS INITIAL.
        CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
          EXPORTING
            date_internal            = w_update-bnddt
          IMPORTING
            date_external            = l_date
          EXCEPTIONS
            date_internal_is_invalid = 1
            OTHERS                   = 2.
        PERFORM bdc_field       USING 'VBAK-GUEEN'
                                       l_date.
      ENDIF.
      CALL TRANSACTION 'VA41' USING bdcdata
                       MODE   'E'
                       UPDATE 'S'
                       MESSAGES INTO messtab.
      break abap.
      READ TABLE messtab WITH KEY msgid = 'V1'
                                  msgnr = '311'.
      IF sy-subrc EQ 0.
        w_update-message = 'SUCCESS'.
        w_update-salesdocument = messtab-msgv2.
      ELSE.
        READ TABLE messtab WITH KEY msgtyp = 'E'.
        IF sy-subrc EQ 0.
          DATA : l_info TYPE einfo.
          CLEAR l_info.
          l_info-msgid = messtab-msgid.
          l_info-msgty = messtab-msgtyp.
          l_info-msgno = messtab-msgnr.
          l_info-msgv1 = messtab-msgv1.
          l_info-msgv2 = messtab-msgv2.
          l_info-msgv3 = messtab-msgv3.
          l_info-msgv4 = messtab-msgv4.
          CALL FUNCTION 'MESSAGE_GET_TEXT'
            EXPORTING
              ieinfo        = l_info
              ilangu        = sy-langu
            IMPORTING
              etext         = w_update-message
            EXCEPTIONS
              no_t100_found = 1
              OTHERS        = 2.
        ENDIF.
      ENDIF.
      READ TABLE t_vbak INTO w_vbak WITH KEY vbeln  = w_update-vbeln.
      IF sy-subrc = 0.
        MODIFY  t_vbak INDEX sy-tabix FROM w_update transporting message
                                                                 salesdocument.
      ENDIF.
    ENDFORM.                    " f_bdc_contract_from_Quotation
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "bdc_dynpro
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "bdc_field

  • Display problem - report /w break formatting

    Hi everyone,
    I'm having a display problem in a standard report with break formatting on first column and repeat headings on break. Whenever I start a new page and a new group of data starts, the heading for the break is displayed 2 times. If the new page doesn't start with a new group, there's no problem.
    I've made an exemple there : http://apex.oracle.com/pls/apex/f?p=25160:9
    You can see the group #1 on the first page, no problem there.
    On the second page, the group #2 begins and the header is repeated.
    On the last page, the header for group #3 is not repeated because it was started on the previous page.
    Why is the header for group #2 repeated ? How can I correct this ?
    Thanks,
    Patrick

    Hi all,
    I think it is a BUG, that was not fixed in 4.2.
    Is it possible to workaround it????
    Probably dynamic action with something like this javascript $("#my_table_id").find("tbody tr:(:eq(0))").remove(); With "On-Change" Event on the Region?
    But this javascript should be execute only on the pages greather than 1. How can I check in javascript which page of report is actually shown???
    Ideas, please!

  • Report in Matrix format

    Hi,
    I need to write a report in Materix format i.e. A particular row and coloumn will need to have a value for that combination. Is that possible in SAP? If so please send me some sample code.
    Thanks in advance,
    Valuable help will be appriciated.
    Rajesh.

    How about an ALV Grid?  Do search on this site for the same, there are plenty of examples.
    Regards,
    Rich Heilman

  • CALL FUNCTION SEND ERROR when displaying attendance report in PDF format.

    We implemented SSO/webgui.  The users did not have any issues with printing reports from SAPGUI.  In webgui, however, we had to define a Local PDF1 printer, per SAP Note  771683.  When users prints this report, it is generating 1-5 CALL_FUNCTION_SEND_ERROR.  We have Central Instance and 5 additional instances on 3 app servers.  Sometimes it generates 1 dumps, sometimes 2, etc.  The dump do not occurred on the instances you are logged into. The dump contains the following:
    ShrtText                                                      
        " " (I/O error)                                           
    What happened?                                                
        "CPIC-CALL: 'ThCMSEND'#connection closed#"                                                                               
    An error occurred when executing a Remote Function Call.    
    Error analysis                                                           
        An error occurred when executing a Remote Function Call.                                                                               
    "CPIC-CALL: 'ThCMSEND'#connection closed#"                                                                               
    Status of connection.... "CODE=CM_DEALLOCATED_NORMAL CM_SEND_RECEIVED
         CM_COMPLETE_DATA_RECEIVED SAPCODE=0 CONV=04892091"                  
        Internal error code.... "RFC_IO5"                                                                               
    There is an error in the communication system. To clarify            
        and resolve the error, contact your system administrator.                                                                               
    Transaktion......... " "                                                    
      Programm............ "SAPLSICM"                                             
      Dynpro.............. "SAPMSSY1 3004"                                        
      Dynprozeile......... 2                                                                               
    Informationen zum Aufrufer des Remote Function Calls (RFC):                 
      System.............. "HRP"                                                  
      Datenbank-Release... 640                                                    
      Kernel-Release...... 640                                                    
      Verbindungstyp...... 3 (2 = R/2, 3 = R/3, E = Extern, R = Reg. Extern)      
      Aufrufsart.......... "asynchron with reply (imode 0)" (S = Synchron, a/A =  
       Asynchron, T = Transakt. )                                                 
      Mandant............. 600                                                    
      Benutzer............ "CG1981"                                               
      Transaktion......... " (Program: SAPLSICM)"                                 
      Funktionsbaustein... "ICM_CACHE_UPLOAD"     
    Information on where terminated                                                                  
        The termination occurred in the ABAP program "SAPLSICM" in "ICM_CACHE_UPLOAD".               
        The main program was "SAPMSSY1 ".                                                                               
    The termination occurred in line 18 of the source code of the (Include)                      
         program "LSICMV11"                                                                               
    of the source code of program "LSICMV11" (when calling the editor 180).                      
    Source Code Extract                                                                               
    Line  SourceCde                                                                               
    1 *******************************************************************                        
        2 *   THIS FILE IS GENERATED BY THE FUNCTION LIBRARY               **                        
        3 *   NEVER CHANGE IT MANUALLY, PLEASE!                            **                        
        4 *******************************************************************                        
        5 FORM ICM_CACHE_UPLOAD %_RFC.                                                               
        6 * Parameter declaration                                                                    
        7 DATA URL TYPE                                                                               
    8 ICMURL                                                                               
    9 .                                                                               
    10 DATA DATA TYPE                                                                               
    11 ICMDATA                                                                               
    12 .                                                                               
    13 DATA GLOBAL LIKE                                                                               
    14 SY-INDEX                                                                               
    15 .                                                                               
    16 * Assign default values                                                                    
       17 * Call remote function                                                                     
    >>>>>   CALL FUNCTION 'ICM_CACHE_UPLOAD' %_RFC                                                   
       19      EXPORTING 
      20        URL = URL      
      21        DATA = DATA    
      22        GLOBAL = GLOBAL
      23   .                   
      24 ENDFORM.                                                                               
    We are on ERP 2004, kernel level 156, and Basis SP18.  I have Adobe Reader 8.
    Our CI Service Port is 8009.
    I have not seen any posting if there is a PDF limitation, e.g., width limitation, report contains rows highlighted in various colors.

    Dear Elaine,
    check notes
    <a href="https://service.sap.com/sap/support/notes/764734">764734</a>
    <a href="https://service.sap.com/sap/support/notes/688372">688372</a>
    or you might want to try to comment out line 118 of the function module
    ICM_CACHE_UPLOAD which reads like this
    PERFORMING RECEIVE_DATA_UPLOAD ON END OF TASK
    If this does not solve the problem, give a detailed description on how to reproduce the dump and put that into an error message with SAP. It should go to BC-CST-IC.
    Best Regards,
    Tim

  • HR report in particlar format

    Personal      Training     consultancy management HR
    sub area
    IT     5     4     5     4
    java     44     5     5     5
    asp     12     2     2     2
    microsoft     55     55     55     8
    When I will give a company code and date, I want to display the report in above format.
    when we give company code , it will display subarea and  releated and no of employee working in it.
    Please can anyone provide the code of this.

    post ur HR related ?'s in
    HR(ECM)

  • Display Report output in Matrix format

    Hi
      I want to display normal report output in somewhat this manner.
    I will have one change requrest number and many transport requests will be assigned to that change request number, and to the transport requests many objects will be assigned.
    I have to display the output in this format:
    Change Request 1  |   Tr No.1 |  Tr No.2 |  Tr No.1 | and so on....
    Obj1
    Obj2
    Obj3
    Change Request 1  |   Tr No.1 |  Tr No.2 |  Tr No.1 | and so on....
    Obj1
    Obj2
    Obj3
    Like this it should go on.
    I have done the coding part, how to display the data in the above format i am not getting any idea, please help me out if you have any ideas.
    Thanks & Regards
    Haritha.

    Hi Vijay,
      First of all thank you for the response.
    I am retrieving the data from different tables and putting all the data in one internal table called i_final. Below is the declaration of that internal table and how i have populated the data to that. I am using control break statements to display the data but the data is coming in the next line.
    Please see the final internal table:
    1. Declaration:
    Data:Begin of i_final occurs 0,
           ccsnr like ysts-ccsnr,
           trkorr like ysts-trkorr,
           obj_name like e071-obj_name,
           check_box(1),
           status LIKE YSCS-STATUS,
          End of i_final.
    2. Populating different internal tables data to this table:
      loop at i_ccno.
        i_final-ccsnr = i_ccno-ccsnr.
        i_final-trkorr = i_ccno-trkorr.
        read table i_status with key trkorr = i_ccno-trkorr.
        if sy-subrc = 0.
          i_final-status = i_status-status.
        endif.
        read table i_obj_name with key trkorr = i_ccno-trkorr.
        if sy-subrc = 0.
          i_final-obj_name = i_obj_name-obj_name.
        endif.
        append i_final.
        clear i_final.
      endloop.
    3. Using Control break statements to display the data.
      sort i_final by ccsnr.
      loop at i_final.
         at new ccsnr.
           write:/2 i_final-ccsnr.
         endat.
           write:20 i_final-trkorr.
           uline.
      endloop.
    But the output is coming like this:
    CHG0003785  HSDK933109
                          HSDK933111
                          HSDK933113
                          HSDK933143
                          HSDK933268
    But i want the output like this:
    CHG0003785 | HSDK933109  |  HSDK933111  |   HSDK933113
    Thanks & Regards
    Haritha.

  • Module Pool for displaying the Grid values in Matrix format

    Hi Experts,
    I have one requirement which as follows,
    In Module pool program i need to display the Grid Values in Matrix format i.e,
    Row = Color
    Column = Size
    Like what we can see in Sales order or Purchase Order if you click Grid Entries Button.
    Can you Please Help me out.
    Thanks n Advance.
    Logu

    Hi
    the sources ate the function groups WMMB and WMMA.
    In a new release you should find the function module MGW_UTILITIES_MATRIX_SHELL_RA
    the report RWRFMATCHARVAL is a good example
    Regards
    Björn

  • Display output fields in Hierarchy format in ALV report

    Hi,
    I have a requirement to display the output fileds in ALV report, the output format is like this . The output field should be in ALV format, under each purchase order its corresponding line item should appear.
    Pruchase Order  4700000581  
    company code        item
            9001                     10
            9001                     20.
            9001                     30.
    Pruchase Order  4700000174  
            9001                     10
            9001                     20.
    Can any one please help me how to do this in ALV report.

    Hi
    This can be achieved using the Heirarchial ALV list
    see the sample and do it
    REPORT ZALV5_OBJECTS.
    TABLES : EKKO.
    TYPE-POOLS : SLIS.
    TYPES : BEGIN OF TY_EKKO,
    EBELN TYPE EKPO-EBELN,
    EBELP TYPE EKPO-EBELP,
    STATU TYPE EKPO-STATU,
    AEDAT TYPE EKPO-AEDAT,
    MATNR TYPE EKPO-MATNR,
    MENGE TYPE EKPO-MENGE,
    MEINS TYPE EKPO-MEINS,
    NETPR TYPE EKPO-NETPR,
    PEINH TYPE EKPO-PEINH,
    END OF TY_EKKO.
    DATA: IT_EKKO TYPE STANDARD TABLE OF TY_EKKO INITIAL SIZE 0,
    IT_EKPO TYPE STANDARD TABLE OF TY_EKKO INITIAL SIZE 0,
    IT_EMPTYTAB TYPE STANDARD TABLE OF TY_EKKO INITIAL SIZE 0,
    WA_EKKO TYPE TY_EKKO,
    WA_EKPO TYPE TY_EKKO.
    DATA: OK_CODE LIKE SY-UCOMM, "OK-Code
    SAVE_OK LIKE SY-UCOMM.
    *ALV data declarations
    DATA: FIELDCATALOG TYPE LVC_T_FCAT WITH HEADER LINE.
    DATA: GD_FIELDCAT TYPE LVC_T_FCAT,
    GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,
    GD_LAYOUT TYPE SLIS_LAYOUT_ALV.
    *ALVtree data declarations
    CLASS CL_GUI_COLUMN_TREE DEFINITION LOAD.
    CLASS CL_GUI_CFW DEFINITION LOAD.
    DATA: GD_TREE TYPE REF TO CL_GUI_ALV_TREE,
    GD_HIERARCHY_HEADER TYPE TREEV_HHDR,
    GD_REPORT_TITLE TYPE SLIS_T_LISTHEADER,
    GD_LOGO TYPE SDYDO_VALUE,
    GD_VARIANT TYPE DISVARIANT.
    *Create container for alv-tree
    DATA: GD_TREE_CONTAINER_NAME(30) TYPE C,
    GD_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    *Includes
    *INCLUDE ZDEMO_ALVTREEO01. "Screen PBO Modules
    *INCLUDE ZDEMO_ALVTREEI01. "Screen PAI Modules
    *INCLUDE ZDEMO_ALVTREEF01. "ABAP Subroutines(FORMS)
    *Start-of-selection.
    START-OF-SELECTION.
    ALVtree setup data
    PERFORM DATA_RETRIEVAL.
    PERFORM BUILD_FIELDCATALOG.
    PERFORM BUILD_LAYOUT.
    PERFORM BUILD_HIERARCHY_HEADER CHANGING GD_HIERARCHY_HEADER.
    PERFORM BUILD_REPORT_TITLE USING GD_REPORT_TITLE GD_LOGO.
    PERFORM BUILD_VARIANT.
    Display ALVtree report
    CALL SCREEN 100.
    *& Form data_retrieval
    text
    --> p1 text
    <-- p2 text
    FORM DATA_RETRIEVAL .
    SELECT EBELN
    UP TO 10 ROWS
    FROM EKKO
    INTO CORRESPONDING FIELDS OF TABLE IT_EKKO.
    LOOP AT IT_EKKO INTO WA_EKKO.
    SELECT EBELN EBELP STATU AEDAT MATNR MENGE MEINS NETPR PEINH
    FROM EKPO
    APPENDING TABLE IT_EKPO
    WHERE EBELN EQ WA_EKKO-EBELN.
    ENDLOOP.
    ENDFORM. " data_retrieval
    *& Form build_fieldcatalog
    text
    --> p1 text
    <-- p2 text
    FORM BUILD_FIELDCATALOG .
    Please not there are a number of differences between the structure of
    ALVtree fieldcatalogs and ALVgrid fieldcatalogs.
    For example the field seltext_m is replace by scrtext_m in ALVtree.
    FIELDCATALOG-FIELDNAME = 'EBELN'. "Field name in itab
    FIELDCATALOG-SCRTEXT_M = 'Purchase Order'. "Column text
    FIELDCATALOG-COL_POS = 0. "Column position
    FIELDCATALOG-OUTPUTLEN = 15. "Column width
    FIELDCATALOG-EMPHASIZE = 'X'. "Emphasize (X or SPACE)
    FIELDCATALOG-KEY = 'X'. "Key Field? (X or SPACE)
    fieldcatalog-do_sum = 'X'. "Sum Column?
    fieldcatalog-no_zero = 'X'. "Don't display if zero
    APPEND FIELDCATALOG TO GD_FIELDCAT.
    CLEAR FIELDCATALOG.
    FIELDCATALOG-FIELDNAME = 'EBELP'.
    FIELDCATALOG-SCRTEXT_M = 'PO Iten'.
    FIELDCATALOG-OUTPUTLEN = 15.
    FIELDCATALOG-COL_POS = 1.
    APPEND FIELDCATALOG TO GD_FIELDCAT..
    CLEAR FIELDCATALOG.
    FIELDCATALOG-FIELDNAME = 'STATU'.
    FIELDCATALOG-SCRTEXT_M = 'Status'.
    FIELDCATALOG-OUTPUTLEN = 15.
    FIELDCATALOG-COL_POS = 2.
    APPEND FIELDCATALOG TO GD_FIELDCAT..
    CLEAR FIELDCATALOG.
    FIELDCATALOG-FIELDNAME = 'AEDAT'.
    FIELDCATALOG-SCRTEXT_M = 'Item change date'.
    FIELDCATALOG-OUTPUTLEN = 15.
    FIELDCATALOG-COL_POS = 3.
    APPEND FIELDCATALOG TO GD_FIELDCAT..
    CLEAR FIELDCATALOG.
    FIELDCATALOG-FIELDNAME = 'MATNR'.
    FIELDCATALOG-SCRTEXT_M = 'Material Number'.
    FIELDCATALOG-OUTPUTLEN = 15.
    FIELDCATALOG-COL_POS = 4.
    APPEND FIELDCATALOG TO GD_FIELDCAT..
    CLEAR FIELDCATALOG.
    FIELDCATALOG-FIELDNAME = 'MENGE'.
    FIELDCATALOG-SCRTEXT_M = 'PO quantity'.
    FIELDCATALOG-OUTPUTLEN = 15.
    FIELDCATALOG-COL_POS = 5.
    APPEND FIELDCATALOG TO GD_FIELDCAT..
    CLEAR FIELDCATALOG.
    FIELDCATALOG-FIELDNAME = 'MEINS'.
    FIELDCATALOG-SCRTEXT_M = 'Order Unit'.
    FIELDCATALOG-OUTPUTLEN = 15.
    FIELDCATALOG-COL_POS = 6.
    APPEND FIELDCATALOG TO GD_FIELDCAT..
    CLEAR FIELDCATALOG.
    FIELDCATALOG-FIELDNAME = 'NETPR'.
    FIELDCATALOG-SCRTEXT_M = 'Net Price'.
    FIELDCATALOG-OUTPUTLEN = 15.
    FIELDCATALOG-COL_POS = 7.
    FIELDCATALOG-DATATYPE = 'CURR'.
    APPEND FIELDCATALOG TO GD_FIELDCAT..
    CLEAR FIELDCATALOG.
    FIELDCATALOG-FIELDNAME = 'PEINH'.
    FIELDCATALOG-SCRTEXT_M = 'Price Unit'.
    FIELDCATALOG-OUTPUTLEN = 15.
    FIELDCATALOG-COL_POS = 8.
    APPEND FIELDCATALOG TO GD_FIELDCAT..
    CLEAR FIELDCATALOG.
    ENDFORM. " build_fieldcatalog
    *& Form build_layout
    text
    --> p1 text
    <-- p2 text
    FORM BUILD_LAYOUT .
    GD_LAYOUT-NO_INPUT = 'X'.
    GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    GD_LAYOUT-TOTALS_TEXT = 'Totals'(201).
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'
    ENDFORM. " build_layout
    *& Form build_hierarchy_header
    text
    <--P_GD_HIERARCHY_HEADER text
    FORM BUILD_HIERARCHY_HEADER CHANGING
    P_HIERARCHY_HEADER TYPE TREEV_HHDR.
    P_HIERARCHY_HEADER-HEADING = 'Hierarchy Header'(013).
    P_HIERARCHY_HEADER-TOOLTIP = 'This is the Hierarchy Header !'(014).
    P_HIERARCHY_HEADER-WIDTH = 30.
    P_HIERARCHY_HEADER-WIDTH_PIX = ''.
    ENDFORM. " build_hierarchy_header
    *& Form build_report_title
    text
    -->P_GD_REPORT_TITLE text
    -->P_GD_LOGO text
    FORM BUILD_REPORT_TITLE USING PT_REPORT_TITLE TYPE SLIS_T_LISTHEADER
    P_GD_LOGO TYPE SDYDO_VALUE.
    DATA: LS_LINE TYPE SLIS_LISTHEADER,
    LD_DATE(10) TYPE C.
    List Heading Line(TYPE H)
    CLEAR LS_LINE.
    LS_LINE-TYP = 'H'.
    ls_line-key "Not Used For This Type(H)
    LS_LINE-INFO = 'PO ALVTree Display'.
    APPEND LS_LINE TO PT_REPORT_TITLE.
    Status Line(TYPE S)
    LD_DATE(2) = SY-DATUM+6(2).
    LD_DATE+2(1) = '/'.
    LD_DATE3(2) = SY-DATUM4(2).
    LD_DATE+5(1) = '/'.
    LD_DATE+6(4) = SY-DATUM(4).
    LS_LINE-TYP = 'S'.
    LS_LINE-KEY = 'Date'.
    LS_LINE-INFO = LD_DATE.
    APPEND LS_LINE TO PT_REPORT_TITLE.
    Action Line(TYPE A)
    CLEAR LS_LINE.
    LS_LINE-TYP = 'A'.
    CONCATENATE 'Report: ' SY-REPID INTO LS_LINE-INFO SEPARATED BY SPACE.
    APPEND LS_LINE TO PT_REPORT_TITLE.
    ENDFORM. " build_report_title
    *& Form build_variant
    text
    --> p1 text
    <-- p2 text
    FORM BUILD_VARIANT .
    Set repid for storing variants
    GD_VARIANT-REPORT = SY-REPID.
    ENDFORM. " build_variant
    Reward points for useful Answers
    Regards
    Anji

  • Generate XML report then display like HTML with specified formate

    Hello,friends
    I want to generate XML report then use XSL to parse it,report will display like HTML with specified formate like attachment,any ideas?
    Thank you
    Alb

    Hi Ray,
    I don't why I can not upload any format picture,so I listed the display as below:
    Test Result                                                                                                  Company Logo
    SN                   1111                                                                                     User                          Operator
    Status              Fail                                                                                       Factory                     SE
    Product            xxx                                                                                       Tester                        xxx
    Start time         xxx                                                                                        Line                          xxx 
    Test time          xxx
    NAME                               STATUS           VALUE                          LOW               HIGH                   RULE
    1.0 Pass/Fail     Test           Passed             True                             True                                             EQ 
    2.0 Less than    Test            Failed               15                                10                                                LT
    3.0 String Value Test           Passed          A string from the limit file   A string
                                                           End of Report
    Could you give me some suggestions?
    Thanks a lot
    Alb

  • How can i display page number in this format in xml publisher report (1-1)

    in this format
    1-1
    1-2
    1-3
    2-1
    2-2
    2-3
    can i display page nos in this format in xml publisher please help me on this

    Hi,
    Use the SET COUNTRY..
    SET COUNTRY 'US'.
    write: / sy-datum.
    SET COUNTRY 'IN'.
    write: / sy-datum.
    Thanks,
    Naren

  • Report in RTF format not displaying

    We are trying to produce a 9iAS Rel2 9.0.2.x report in RTF format. Trying to bring this report up in IE produces the following popup box:
    Internet Explorer cannot download rwservlet?config=test from host.domain.com
    IE was not able to open this internet site. The requested site is either unavailable or cannot be found.
    Using other formats (HTML, PDF) for this report work fine.
    Windows has .RTF mapped to be opened in Word.
    The config entry includes:
    destype = cache
    desformat = RTF
    mimetype = application/rtf
    Any ideas as to what is wrong?

    Hi alka,
    To invoke Word automatically, use command
    line options DESTYPE=CACHE,
    DESFORMAT=RTF and MIMETYPE=application/msword.
    This is an example URL: http://webserver:80/cg-bin/rwcgi60.exe?module
    =test.rdf&userid=scott/tiger@mydb&
    destype=cache&desformat=rtf&mimetype=application/msword&server=myrepserver
    1. Check the appropriate mimetype setting for Word by Starting Windows Explorer,
    choose View -> Options from the menu, go to the File Type tab, find Microsoft
    Word Document in this list, click Edit, and get the value for Content Type
    (MIME). This is the value that needs to be used in the MIMETYPE command line
    option, and it will typically be application/msword, but may differ on
    different machines.
    null

  • Oracle Reports..(Matrix Format)

    I created a oracle reports thru report wizard(matrxi format)...the data is comming correctly.
    But iam unable to draw the line for each record....
    i want in a grid form...
    it is urgent ...plz any one help in this issuse..
    Regards
    Mohan

    Hi,
    Thank u for ur Valuable suggestion...
    iam getting output like this
    empid yr1 yr2 yr3
    150 23 12 23
    Iam getting output in a individual boxes...instead of
    table format....
    I want the ouput in a table format....
    can i gave multiple selection in selection box?(i.e in papare paramter form)
    Mohan

Maybe you are looking for

  • Data not loading to cube

    I am loading a cube from a cube.  There is data which meets my info package selection criteria in the source cube but I get 0 records transferred, added to the cube.  There is no delete in start routines. Just before loading I have selectively delete

  • 3.2 download

    I am trying to download from apex.oracle.com the 3.2 version. I click the download link on the page, accept the license agreement, and download the Oracle Application Express 3.2.1 zip file. All that is downloaded is a 0 byte file. Any ideas why this

  • Saving PDF Silently

    Hello, I am developing air application in which one of the usecase deals with communication between a LC process and AIR application LC process will return a document (of type com.adobe.idp.Document), in AIR app i have DocumentReference object which

  • Babel parser character buffer overflow?

    Hi all... I'm having a slight problem getting my Webservices to run properly. The Error i'm getting is thrown by the weblogic.xml.babel Parser classes (Full stacktrace below...) <b>Error at line:1 col:4453 Got character[0] expected a valid XML charac

  • Exit or BADI in FB01

    HI All, I have one requirement in which I want to change the item text  ( SGTEXT ) in FB01 while posting the document. I am not able to find the correct exit Or BADI. Please suggest the correct BADI or Exit. Thanks, Amit