Currency display problem in Report using WBS Element

Hi Experts,
PCS report displying different values aginest same WBS elements, in different currency.
Report painter tool has been used.
Requirement is  to display entered currency in the report.
i.e the currency which is entered in selection screen.
Regards,
Oamkar

Hi Experts,
PCS report displying different values aginest same WBS elements, in different currency.
Report painter tool has been used.
Requirement is  to display entered currency in the report.
i.e the currency which is entered in selection screen.
Regards,
Oamkar

Similar Messages

  • Reports of WBS Elements plz reply

    Hi
    we have one SAP standard reports for WBS elements ( plan/actual/variance) and one whichis customized project management report in Projects systems but both the reports are showing different balance.
    is there any particular reason for showing different balance for both actual and budget colum?
    plz reply asap
    thanks
    manish

    hi
    please try to use Co Object Name field with sub total

  • Vendor Payments Report with WBS Elements

    Dear Expert,
    I am looking a report for Vendor outgoing payment against WBS Elements.
    Is there any Vendor Payments report with WBS Elements in SAP? I have seen FBL1N but WBS Elements field is blank.
    Thanks
    Samiee.

    Hi,
    You mentioned WBS Element is blank; so please check in any one sample payment documnet whetehr WBS is maintained and if yes find which field it is populated. For eg; sometimes people populate this information in the text or assignment field. If that is the case then change the layout accordingly in FBL1N.
    Regards
    Sreekanth

  • Urgent: Issue while displaying the PDF Reports Using XDO Common region

    Hi all,
    In our product code we are trying to display the PDF Reports, using the xdo common region.
    Previously we were writing the pdf reports direclty onto the response direclty.
    This displays the report onto the browser but if navigate throw browser back button, it doesn't displays the report as the response stream is empty while navigating through back button.
    So to solve this issue, i tried to write the report using the OAHTMLWebBean and xdo common region. Here is the code:
    ByteArrayOutputStream xdoOutput = new ByteArrayOutputStream();
    XDOUtility.retrieveReport(xdoOutput,
    parameters,
    prop,
    appMod
    BlobDomain bxdoOutput = new BlobDomain();
    bxdoOutput.setBytes(xdoOutput.toByteArray());
    String redirectURL = DocumentHelper.getOutputURL(pageContext,
    bxdoOutput,
    "Report",
    "PDF");
    OAHTMLWebBean outRegion = (OAHTMLWebBean)createWebBean (pageContext, OAWebBeanConstants.HTML_WEB_BEAN, null, "IFRAME");
    outRegion.setHTMLAttributeValue("src", redirectURL);
    outRegion.setHTMLAttributeValue("width", "100%");
    outRegion.setHTMLAttributeValue("height", "100%");
    outRegion.setHTMLAttributeValue("title","Report");
    outRegion.setHTMLAttributeValue("name","Report");
    pageContext.getPageLayoutBean().addIndexedChild(outRegion);
    This successfully displays the report in the XDO Common region. But now the issue is that there are hyperlinks in the Report displayed where from where the user can navigate to other detail pages.
    When we click on these links, a new session starts in the xdo common region.
    Is it possible that when the user click the links in the report displayed, instead of starting a new session in the xdo region, the detail pages is displayed with in the older session.
    Regards
    Sandeep

    Hi all,
    In our product code we are trying to display the PDF Reports, using the xdo common region.
    Previously we were writing the pdf reports direclty onto the response direclty.
    This displays the report onto the browser but if navigate throw browser back button, it doesn't displays the report as the response stream is empty while navigating through back button.
    So to solve this issue, i tried to write the report using the OAHTMLWebBean and xdo common region. Here is the code:
    ByteArrayOutputStream xdoOutput = new ByteArrayOutputStream();
    XDOUtility.retrieveReport(xdoOutput,
    parameters,
    prop,
    appMod
    BlobDomain bxdoOutput = new BlobDomain();
    bxdoOutput.setBytes(xdoOutput.toByteArray());
    String redirectURL = DocumentHelper.getOutputURL(pageContext,
    bxdoOutput,
    "Report",
    "PDF");
    OAHTMLWebBean outRegion = (OAHTMLWebBean)createWebBean (pageContext, OAWebBeanConstants.HTML_WEB_BEAN, null, "IFRAME");
    outRegion.setHTMLAttributeValue("src", redirectURL);
    outRegion.setHTMLAttributeValue("width", "100%");
    outRegion.setHTMLAttributeValue("height", "100%");
    outRegion.setHTMLAttributeValue("title","Report");
    outRegion.setHTMLAttributeValue("name","Report");
    pageContext.getPageLayoutBean().addIndexedChild(outRegion);
    This successfully displays the report in the XDO Common region. But now the issue is that there are hyperlinks in the Report displayed where from where the user can navigate to other detail pages.
    When we click on these links, a new session starts in the xdo common region.
    Is it possible that when the user click the links in the report displayed, instead of starting a new session in the xdo region, the detail pages is displayed with in the older session.
    Regards
    Sandeep

  • Display problems in IE, using Netlace Designs approach

    Display problems in IE, using Netlace Designs approach
    Could someone please look at
    www.tudo.co.uk/testing/magnification/
    I am trying to adjust some css code taken from Netlace
    Design's website
    for my purposes. The purpose is to enlarge an image on
    'hover' and to
    enlarge some text on 'hover'.
    What I have done works all right in Mozilla/Seamonkey.
    However, in IE,
    the 'text enlargement' does not work at all
    and when I am enlarging the image there is ***in IE*** a
    large grey
    surplus area at the bottom, which looks like a background
    area which has
    turned out to have too much height. I want to get rid of that
    superfluous grey area.
    How can I make sure it works in BOTH Mozilla and in IE?
    Thanks for your help.
    Adrian

    Hi ijmari,
    I checked out that page and don't see any Spry menubar in it.
    I'm assuming you've reverted back or removed it.
    If you still need/want help, please post the URL to the page
    that uses the menubar and demonstates the problem.
    --== Kin ==--

  • Step By step Procedure to control Pm orders Budget by using Wbs element

    HI,
    we need step by step procedure to control PM orders Budget By using WBS  Element, step by step means
    1. how to create wbs element
    2 how to assign budget to wbs element
    3 how to control this budget through orders
    Regards
    Ganesh

    Hi,
    Please verify this link:
    http://www.sap-img.com/ps006.htm
    Regards
    Keerthi

  • Problem in Display the Crystal report using Crystal report Viewer 2008

    Hi All,
    I have developed crystal web project with crystal report using Eclipse IDE. when I deploy this web application using Tomcat server 6.0 in Windows xp, Windows Vista.. It is working fine..
    But When I deploy it into Windows 2000 server ,  I am not able to see Last 2 columns of the report page in the Viewer.
    But When I tried to Export as Excel, I got all the datas in the Report and also when I preview the report in Eclispe IDE using crystal viewer plugin it is working fine in Windows 2000 server also..
    Thanks in Advance for your help..
    Regards,
    SathiyaMBPS

    Windows 2000 is not supported in current versions of CR. Check the platforms PDF file.

  • TREE Report for WBS Element

    hi gurus,
             can any one tell me how to generate the hierarchical (tree ) report for a purticular project.
    I should genarate a hierarchical report for all WBS (From top level to lower level WBS ).
    With Regards,
    Raj.

    Hi raj,
    check BCALV_TREE_02 for ALV TREE DISPLAY ( for more clarification debug it )
    * my final table structure
            BEGIN OF gty_fin ,
             posid TYPE ps_posid,
             pspnr TYPE ps_intnr,
             post1 TYPE ps_post1,
             ebeln TYPE ebeln,
             ebelp TYPE ebelp ,
             name1 TYPE name1,
             belnr TYPE mblnr ,
             cplan TYPE wtgxxx ,
             netpr TYPE ekpo-netpr ,
             dmbtr TYPE dmbtr ,
             obligo TYPE dmbtr,
             vefugt TYPE dmbtr,
             verfugbar TYPE dmbtr,
            END OF gty_fin ,
    * Coding starts here in ur PBO
    *do modification accordingly
    MODULE status_0100 OUTPUT.
        PERFORM init_tree.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    FORM init_tree .
    * create container for alv-tree
      DATA: l_tree_container_name(30) TYPE c.
      l_tree_container_name = 'CCONTAINER1'.
      CREATE OBJECT g_custom_container
        EXPORTING
          container_name              = l_tree_container_name
    * create tree control
      CREATE OBJECT g_alv_tree
        EXPORTING
          parent                      = g_custom_container
          node_selection_mode         = cl_gui_column_tree=>node_sel_mode_single
          item_selection              = ' '
          no_html_header              = 'X'.
      DATA l_hierarchy_header TYPE treev_hhdr.
      PERFORM build_hierarchy_header CHANGING l_hierarchy_header.
    * Hide columns and sum up values initially using the fieldcatalog
      PERFORM build_fieldcatalog.
      CALL METHOD g_alv_tree->set_table_for_first_display
        EXPORTING
          is_hierarchy_header = l_hierarchy_header
        CHANGING
          it_fieldcatalog     = git_fieldcatalog
          it_outtab           = git_edit. "table must be empty !
      PERFORM create_hierarchy.
      PERFORM register_events.
      CALL METHOD g_alv_tree->update_calculations.
    * Send data to frontend.
      CALL METHOD g_alv_tree->frontend_update.
    ENDFORM.                    "init_tree
    " INIT_TREE
    *&      Form  BUILD_HIERARCHY_HEADER
    FORM build_hierarchy_header  CHANGING
                                     p_hierarchy_header TYPE treev_hhdr.
      p_hierarchy_header-heading = 'Project Definition'(002).
      p_hierarchy_header-tooltip = 'Project Definition'(002).
      p_hierarchy_header-width = 35.
      p_hierarchy_header-width_pix = ''.
    ENDFORM.                    " BUILD_HIERARCHY_HEADER
    *&      Form  exit_program
    *       free object and leave program
    FORM exit_program.
      CALL METHOD g_custom_container->free.
      LEAVE PROGRAM.
    ENDFORM.                    "exit_program
    *&      Form  build_fieldcatalog
    FORM build_fieldcatalog.
      DATA: lwa_fieldcatalog TYPE lvc_s_fcat.
    * The following function module generates a fieldcatalog according
    * to a given structure.
      REFRESH git_fieldcatalog.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'ZDRK'       "  i created a structure same as final itab.
        CHANGING
          ct_fieldcat      = git_fieldcatalog.
      LOOP AT git_fieldcatalog INTO lwa_fieldcatalog.
        CASE lwa_fieldcatalog-fieldname.
    * hide columns which are already displayed in our tree
          WHEN 'POSID' OR 'PSPNR' OR 'EBELN' OR 'EBELP' OR 'POST1'.
            lwa_fieldcatalog-no_out = 'X'.
    ** Do some initial calculations:
    ** ALV Tree uses the field 'do_sum' to declare that a function
    ** for the corresponding column shall be calculated.
    ** Use 'h_ftype' to set the function type (MAX, MIN, SUM, AVG).
          WHEN 'DMBTR' OR 'OBLIGO'  OR 'VEFUGT' OR 'VERFUGBAR'. " 'CPLAN' OR
            lwa_fieldcatalog-do_sum = 'X'.
            lwa_fieldcatalog-h_ftype = 'SUM'.
          WHEN 'BELNR'.
            lwa_fieldcatalog-hotspot = 'X'.
            lwa_fieldcatalog-tooltip = 'Invoice Document Number'(003).
        ENDCASE.
        MODIFY git_fieldcatalog FROM lwa_fieldcatalog.
      ENDLOOP.
    ENDFORM.                               " build_fieldcatalog
    *&      Form  create_hierarchy
    FORM create_hierarchy.
      DATA: ls_fin TYPE gty_fin,
          lt_fin TYPE TABLE OF gty_fin,
          lv_posid1_last TYPE ps_posid,
          lv_ebeln TYPE ebeln,
          lv_post1 TYPE ps_post1,
          lv_ebeln_last TYPE ebeln,
          lv_ebelp TYPE ebelp.
      DATA: lv_ebeln_key TYPE lvc_nkey,
            lv_ebelp_key TYPE lvc_nkey,
            lv_last_key TYPE lvc_nkey,
            lv_top_key TYPE lvc_nkey,
            lv_node_text TYPE lvc_value,
            lv_text_psp TYPE char10 .
      lv_text_psp = 'Project'(004).
    * all my data is in final itab git_fin
      lt_fin[] = git_fin .
      lv_node_text = gv_proj.
      CALL METHOD g_alv_tree->add_node
        EXPORTING
          i_relat_node_key = ''
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = lv_node_text
        IMPORTING
          e_new_node_key   = lv_top_key.
      LOOP AT lt_fin INTO ls_fin.
        lv_posid1 = ls_fin-posid.
        lv_post1  = ls_fin-post1.
        lv_ebeln  = ls_fin-ebeln.
        lv_ebelp  = ls_fin-ebelp.
        IF lv_posid1 <> lv_posid1_last.     " on change of posid
          lv_posid1_last = lv_posid1.
    * PO- ebeln nodes
          PERFORM add_ebeln USING  lv_posid1
                                   lv_post1
                                   lv_top_key
                            CHANGING lv_ebeln_key.
        ENDIF.
        IF lv_ebeln <> lv_ebeln_last.  " On change of lv_ebeln
          lv_ebeln_last = lv_ebeln .
          PERFORM add_ebelp USING ls_fin
                                  lv_ebeln_key
                                  lv_ebeln
                        CHANGING  lv_ebelp_key .
        ENDIF.
    * Leaf:
        PERFORM add_complete_line USING  ls_fin
                                         lv_ebelp_key
                                         lv_ebelp
                              CHANGING   lv_last_key .
      ENDLOOP.
    * expand first node initially
      CALL METHOD g_alv_tree->expand_node
        EXPORTING
          i_node_key = lv_top_key.
    ENDFORM.                               " create_hierarchy
    *&      Form  ADD_EBELN
    FORM add_ebeln  USING    p_lv_posid1 TYPE ps_posid
                             p_lv_post1 TYPE  ps_post1
                             p_lv_top_key TYPE lvc_nkey
                    CHANGING p_lv_ebeln_key TYPE lvc_nkey.
      DATA : ls_fin TYPE gty_fin,
             lv_node_text TYPE lvc_value ,
             lv_text_psp TYPE char11.
      lv_text_psp =  'WBS Element'(005).
      lv_node_text =  p_lv_posid1.
      CONCATENATE p_lv_post1 lv_node_text
             INTO lv_node_text
        SEPARATED BY space.
    * add node
      CALL METHOD g_alv_tree->add_node
        EXPORTING
          i_relat_node_key = p_lv_top_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = lv_node_text  " 'WBS Element'
          is_outtab_line   = ls_fin
        IMPORTING
          e_new_node_key   = p_lv_ebeln_key.
    ENDFORM.                    " ADD_EBELN
    *&      Form  ADD_EBELP
    FORM add_ebelp  USING    p_ls_fin TYPE gty_fin
                             p_lv_ebeln_key TYPE lvc_nkey
                             p_lv_ebeln TYPE ebeln
                    CHANGING p_lv_ebelp_key TYPE lvc_nkey.
      DATA : ls_fin TYPE gty_fin ,
            lv_node_text TYPE lvc_value,
            lv_text_order TYPE char10 .
      lv_text_order = 'ORDER  '(006).
      lv_node_text = p_lv_ebeln  .
      CONCATENATE lv_text_order lv_node_text
             INTO lv_node_text
        SEPARATED BY space.
      CALL METHOD g_alv_tree->add_node
        EXPORTING
          i_relat_node_key = p_lv_ebeln_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = lv_node_text " 'EBELN
          is_outtab_line   = ls_fin
        IMPORTING
          e_new_node_key   = p_lv_ebelp_key.
    ENDFORM.                    " ADD_EBELP
    *&      Form  ADD_COMPLETE_LINE
    *       text
    *      -->P_LS_FIN  text
    *      -->P_LV_EBELP_KEY  text
    *      <--P_LV_LAST_KEY  text
    FORM add_complete_line  USING    p_ls_fin TYPE gty_fin
                                     p_lv_ebelp_key TYPE lvc_nkey
                                     p_lv_ebelp TYPE ebelp
                            CHANGING p_lv_last_key TYPE lvc_nkey.
      DATA :  lv_text_pos TYPE char10,
              lv_node_text TYPE lvc_value,
              lv_node_layn TYPE lvc_s_layn.
      lv_text_pos = 'Position '(007).
      lv_node_text = p_lv_ebelp  .
      IF p_lv_ebelp IS INITIAL .
        lv_node_text = 'PLAN'(008) .
        lv_node_layn-hidden = 'X'.
      ELSE.
        CONCATENATE lv_text_pos lv_node_text
               INTO lv_node_text
          SEPARATED BY space.
      ENDIF.
      CALL METHOD g_alv_tree->add_node
        EXPORTING
          i_relat_node_key = p_lv_ebelp_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          is_outtab_line   = p_ls_fin
          is_node_layout   = lv_node_layn
          i_node_text      = lv_node_text " Position of item
        IMPORTING
          e_new_node_key   = p_lv_last_key.
        CLEAR : lv_node_layn .
    ENDFORM.                    " ADD_COMPLETE_LINE
    Regards,
    Aby
    hope this might be useful.

  • Report on WBS element

    Hi,
    We have a requirement wherein we want to pull the account balances in the following format:
    Co Cd
        GL A/C
             WBS ELEMENT
             WBS ELEMENT
             WBS ELEMENT
        GL A/C
             WBS ELEMENT
             WBS ELEMENT
             WBS ELEMENT
    Does anyone have any idea on report that we can use to pull this info? Also, is there a way to show summation over more than 1 selection. Like here in this case it would be WBS Element, GL Account and COCD.
    Its very urgent so any help in this regard would be appreciated
    Thanks,
    N
    All answers will be rewarded points!

    Try the following report.
    INFO Systems->Fixed Assets->Day-toDay-Activites->International
    S_ALR_87012060 - List of Origins by Cost Elements.

  • Image not displaying in pdf report using XSL-FO and using Oracle 11g databa

    Good Afternoon,
    I have created over 15 reports using XSL-fo, with the following syntax to display an image on the pdf:
    fo:block margin-left="0.24cm" margin-right="0.27cm" margin-top="0.0cm" ><fo:external-graphic content-width="scale-to-fit" content-height="scale-to-fit" width="1.73cm" height="1.57cm" >
    <xsl:attribute name="src">'url("http://readiness:7780/i/marforcom_symbol_rpts.gif")'</xsl:attribute></fo:external-graphic>
    </fo:block>
    This syntax works fine when using Oracle 10g, now my database has been upgraded to 11g and my image no longer displays in the reports. I have already upload the image into the database as a workspace image.
    I have tried to point the image @ the image by using url(#WORKSPACE_IMAGE#marforcom_symbol_rpts.gif)
    or <img src ="#IMAGE_PREFIX#marforcom_symbol_rpts.gif")
    and it still doesn't work.
    I have searched this forum trying to come up with a solution that will fix my problem and am unable to.
    Current config: Oracle 11g, using pl/sql gateway.
    I need to know how to point the xsl-fo file to the database, where the image now resides.
    Thanks,
    Mary
    Edited by: MaryM on Jul 25, 2012 3:15 PM
    Edited by: MaryM on Jul 25, 2012 3:51 PM

    Hi,
    I think you need load images to database XDB virtual directory /i/ and then use #IMAGE_PREFIX# substitution.
    This might help to access /i/
    http://www.apex-blog.com/oracle-apex/accessing-i-using-ftp-170.html
    Or use this to load images
    http://oracleinsights.blogspot.fi/2012/05/loading-images-into-oracle-xdb.html
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Report: Statistical WBS elements with assets assigned to them - actual cost

    Hi all,
    I would like to run a report that gave me this info:
    WBS Element (all statistical)
    Assets assigned to each WBS
    Actual costs
    It would be perfect CJI3 but it doesn't show assets. In AM I haven't see either any report that shows WBS elements...
    any ideas???

    Hi
    There is not a standard report which can cater to your requirements. You need to develop one.
    You can take the refernece from CNS41 report for development. Some of the fields you need are PRPS-XSTAT for statistical WBS and will have to use tables ANLA and ANLC to fetch asset master data.
    Regards

  • New GL FAGLB03 Abends when Using WBS Element as Additioanl Characteristic

    Hello All:
    I have added WBS Element as a Total Field to my ledger in FAGLFLEXT and it appears to be working.
    I have also configured it as an Additional Characteristic for displaying line items from New GL Balance Display transaction FAGLB03 however, when trying to drill down to the balance by characterisitc  WBS element, FAGLB03 abends saying that wildcard "*" (the default selection for Additional Characterisitcs on FAGBL03) is not numeric.
    When using tranaction FAGLL03 instead the system works fine and allows me to select by WBS using Dynamic Selection.
    I believe this may be a bug with FAGLB03 but would like to hear from others if they have experienced this or similar issue and/or if they know how I might solve it.
    Thanks!
    Gary

    Hi Amit Agarwal,
    I have a situation now, very similar as yours.
    We wish to get the postings from IVA to Original Cost Objects at JVA.
    Now the system brings just one Cost Object for IVA and all the other lines are without cost object splliting.
    We really need the split and we are with New GL.
    Could you help us?
    Thanks a lot for your help.
    Dante Souza

  • Table Report showing WBS element, asset no & Equiment no

    Hi,
    This is regarding cost project. We require single report mentioning the WBS element, asset no & Equiment no.
    Please give the Tcode for such report.
    Thanks & regards,
    Pradip
    TCS,Hyderabad

    hi
    u can get by creating sap query using Logical data base PSJ, where u need to select the wbs, equipment and asset no. as selection criteria and o/p field can be sap per u r requirements.
    For creating sap query use t.code sq03, sq02 and sq01 .
    Regards
    Suresh

  • Column Heading are not displayed in ALV Report using CL_SALV_DISPLAY?

    Hi,
       I am using CL_SALV_DISPLAY class to display data. I Created an Internal Table Dynamically based fieldcatalog which was prepared based data at run time. When i displayed data using CL_SALC_DISPALY data is display in output but column headings are not displayed.
    can anyone suggest me how to display heading in ALV using CL_SALV_DISPLAY class, My code is
          CLASS lcl_report DEFINITION
    CLASS lcl_report DEFINITION.
      PUBLIC SECTION.
        METHODS:
          display  IMPORTING l_table  TYPE string
                             l_fcat   TYPE string.
    ENDCLASS.                    "lcl_report DEFINITION
          CLASS lcl_report IMPLEMENTATION
    CLASS lcl_report IMPLEMENTATION.
      METHOD display.
        DATA: gr_table   TYPE REF TO cl_salv_table.
        DATA: gr_columns TYPE REF TO cl_salv_columns_table,
              gr_column  TYPE REF TO cl_salv_column_table,
              ls_fcat    TYPE slis_fieldcat_alv.
        DATA: gr_display TYPE REF TO cl_salv_display_settings.
        DATA: l_o_functions TYPE REF TO cl_salv_functions_list,
              l_field    TYPE string.
        FIELD-SYMBOLS : <fs_table>    TYPE STANDARD TABLE,
                        <ft_fcat>     TYPE STANDARD TABLE.
    Get the ALV object refering to the output table
        ASSIGN (l_table) TO <fs_table>.
        ASSIGN (l_fcat)  TO <ft_fcat>.
        TRY.
            cl_salv_table=>factory(
              IMPORTING
                r_salv_table = gr_table
              CHANGING
                t_table      = <fs_table> ).
          CATCH cx_salv_msg.                                "#EC NO_HANDLER
        ENDTRY.
    Add basic default functionality in the ALV report
    Functions
        l_o_functions = gr_table->get_functions( ).
        l_o_functions->set_all( abap_true ).
        gr_columns = gr_table->get_columns( ).
        gr_columns->set_headers_visible( abap_true ).
    Display the list
        gr_table->display( ).
      ENDMETHOD.                    "extract
    ENDCLASS.                    "lcl_report IMPLEMENTATION
    *& start-of-selection declaration
    START-OF-SELECTION.
      PERFORM :
      get store codes
        get_storecodes    USING      p_stfile
                          CHANGING   it_t001w,
      fetching mard data
        read_mard_data,
      preparing fieldcatalog for Final Data
        create_filedcat   USING      it_t001w
                                     it_site
                          CHANGING   it_fieldcat,
      preparing structure & internal table for Final Data
        create_final_table_structure  USING  it_fieldcat,
      prepare output data
        prepare_final_data.
    *& end-of-selection declaration
    END-OF-SELECTION.
      PERFORM :
      display data
        display_data    USING l_table
                              l_fcat.
    *&      Form  get_storecodes
    FORM get_storecodes  USING    p_p_stfile
                         CHANGING p_it_t001w  LIKE it_t001w[].
      DATA  :
    internal table for RAW
      lt_raw    TYPE truxs_t_text_data,
      rs_site   LIKE LINE OF rt_site,
      l_index   LIKE sy-tabix.
      FIELD-SYMBOLS :
    field symbol for it_t001w
      <fs_t001w>   LIKE LINE OF p_it_t001w.
    calling function module to get Stores Data from File
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_line_header        = 'X'
          i_tab_raw_data       = lt_raw
          i_filename           = p_p_stfile
        TABLES
          i_tab_converted_data = p_it_t001w[]
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      SORT p_it_t001w BY werks.
      CLEAR rs_site.
      rs_site-sign   = 'I'.
      rs_site-option = 'EQ'.
      rs_site-low    = p_dccode.
      APPEND rs_site TO rt_site.
      IF it_t001w[] IS NOT INITIAL.
        LOOP AT p_it_t001w ASSIGNING <fs_t001w>.
          l_index   = sy-tabix.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = <fs_t001w>-werks
            IMPORTING
              output = <fs_t001w>-werks.
          MODIFY p_it_t001w FROM <fs_t001w> INDEX l_index.
          IF <fs_t001w>-werks GE s_site-low AND <fs_t001w>-werks LE s_site-high.
          append site to ranges
            CLEAR rs_site.
            rs_site-sign   = 'I'.
            rs_site-option = 'EQ'.
            rs_site-low    = <fs_t001w>-werks.
            APPEND rs_site TO rt_site.
            CONTINUE.
          ENDIF.
        ENDLOOP.
        SORT p_it_t001w BY werks.
        SORT rt_site.
      ENDIF.
    ENDFORM.                    " get_storecodes
    *&      Form  create_final_table_structure
    FORM create_filedcat   USING    p_it_t001w      LIKE it_t001w[]
                                    p_it_site       LIKE it_site[]
                           CHANGING p_it_fieldcat   LIKE it_fieldcat[].
      FIELD-SYMBOLS :
    field symbol for p_it_t001w
      <fs_t001w>     LIKE LINE OF p_it_t001w,
    field symbol for p_it_site
      <fs_site>      LIKE LINE OF p_it_site.
      DATA :
    fieldname
      l_fieldname    TYPE slis_fieldname,
    workarea for site ranges
      rs_site        LIKE LINE OF rt_site.
      CLEAR : l_fieldname, rs_site.
      l_fieldname    = p_dccode.
      PERFORM
    prepare fieldcatalog
      build_fieldcatalog USING :   'MTART'      'CHAR'        '5'  ,
                                   'MTBEZ'      'CHAR'        '25' ,
                                   'MATKL'      'CHAR'        '6'  ,
                                   'WGBEZ'      'CHAR'        '20' ,
                                   'MATNR'      'CHAR'        '18' ,
                                   'MAKTX'      'CHAR'        '30' ,
                                    l_fieldname 'CHAR'        '17' .
    create header for excel
      PERFORM create_excel_header USING  : 'Division',
                                           'Divsion Description',
                                           'MC Code',
                                           'MC Description',
                                           'Article',
                                           'Article Description',
                                            l_fieldname.
    loop for creating fieldcatalog
      LOOP AT it_site ASSIGNING <fs_site>.
        READ TABLE it_t001w ASSIGNING <fs_t001w> WITH KEY werks = <fs_site>-werks
                                                                  BINARY SEARCH.
        IF sy-subrc = 0           AND <fs_t001w> IS ASSIGNED AND
           <fs_site> IS ASSIGNED  AND <fs_site>-stock GT 0.
          CLEAR : l_fieldname, rs_site.
          l_fieldname    = <fs_site>-werks.
        prepare fieldcatalog
          PERFORM build_fieldcatalog USING : l_fieldname    'CHAR'   '17'.
        create header for excel
          PERFORM create_excel_header USING  l_fieldname  .
          CONTINUE.
        ENDIF.
      ENDLOOP.
      l_fcat  = 'it_fieldcat[]'.
    ENDFORM.                    " create_final_table_structure
    *&      Form  build_fieldcatalog
    FORM build_fieldcatalog  USING    p_fieldname      TYPE slis_fieldname
                                      p_datatype       TYPE datatype_d
                                      p_length         TYPE intlen.
      DATA : ls_fieldcat    LIKE LINE OF it_fieldcat.
      CLEAR  : ls_fieldcat.
      ls_fieldcat-fieldname   = p_fieldname.
      ls_fieldcat-datatype    = p_datatype.
      ls_fieldcat-intlen      = p_length.
      APPEND ls_fieldcat TO it_fieldcat.
    ENDFORM.                    " build_fieldcatalog
    *&      Form  create_final_table_structure
    FORM create_final_table_structure  USING    p_it_fieldcat.
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fieldcat
        IMPORTING
          ep_table        = t_table.
      ASSIGN t_table->*  TO <ft_final>.
    ENDFORM.                    " create_final_table_structure
    *&      Form  create_excel_header
    FORM create_excel_header  USING    p_p_fieldname.
      DATA : ls_header  LIKE LINE OF it_header.
      CLEAR ls_header.
      ls_header-col_name  = p_p_fieldname.
      APPEND ls_header TO it_header.
    ENDFORM.                    " create_excel_header
    *&      Form  prepare_final_data
    FORM prepare_final_data .
      DATA          : l_matnr       LIKE g_matnr,
                      l_werks       LIKE g_werks,
                      l_index       LIKE sy-tabix.
      FIELD-SYMBOLS : <fs_mard>     LIKE LINE OF it_mard.
    Getting No. of Lines in IT_MARD internal table
      DESCRIBE TABLE it_mard LINES g_lines.
      LOOP AT it_mard ASSIGNING <fs_mard>.
        l_index    = sy-tabix.
        IF l_matnr IS INITIAL.
          l_matnr  = <fs_mard>-matnr.
          CLEAR : l_werks.
          l_werks    = <fs_mard>-werks.
          UNASSIGN : <fs_value>, <fs_final>.
        Create dynamic work area and assign to FS
          CREATE DATA t_line LIKE LINE OF <ft_final>.
          ASSIGN t_line->*   TO <fs_final>.
          ASSIGN COMPONENT 'MATNR'  OF STRUCTURE <fs_final> TO <fs_value>.
          <fs_value>        = <fs_mard>-matnr.
          ASSIGN COMPONENT l_werks  OF STRUCTURE <fs_final> TO <fs_value>.
          <fs_value>        = <fs_value> + <fs_mard>-labst.
        getting Article Type,MC & its Descriptions
          PERFORM get_other_data    USING     l_matnr
                                              l_werks.
        ELSEIF l_matnr <> <fs_mard>-matnr.
          APPEND <fs_final> TO <ft_final>.
          CLEAR l_matnr.
          l_matnr  = <fs_mard>-matnr.
          CLEAR : l_werks.
          l_werks    = <fs_mard>-werks.
          UNASSIGN : <fs_value>, <fs_final>.
        Create dynamic work area and assign to FS
          CREATE DATA t_line LIKE LINE OF <ft_final>.
          ASSIGN t_line->*   TO <fs_final>.
          ASSIGN COMPONENT 'MATNR'  OF STRUCTURE <fs_final> TO <fs_value>.
          <fs_value>        = <fs_mard>-matnr.
          ASSIGN COMPONENT l_werks  OF STRUCTURE <fs_final> TO <fs_value>.
          <fs_value>        = <fs_value> + <fs_mard>-labst.
        getting Article Type,MC & its Descriptions
          PERFORM get_other_data    USING     l_matnr
                                             l_werks.
        ELSE.
          CLEAR : l_werks.
          l_werks    = <fs_mard>-werks.
          ASSIGN COMPONENT l_werks  OF STRUCTURE <fs_final> TO <fs_value>.
          <fs_value>        = <fs_value> + <fs_mard>-labst.
        ENDIF.
        IF l_index = g_lines.
          APPEND <fs_final> TO <ft_final>.
        ENDIF.
      ENDLOOP.
      l_table  = '<ft_final>[]'.
    ENDFORM.                    " prepare_final_data
    *&      Form  get_other_data
    FORM get_other_data  USING    p_l_matnr
                                  p_l_werks.
      FIELD-SYMBOLS : <fs_mara>     LIKE LINE OF it_mara,
                      <fs_t023t>    LIKE LINE OF it_t023t,
                      <fs_t134t>    LIKE LINE OF it_t134t,
                      <fs_makt>     LIKE LINE OF it_makt.
      READ TABLE it_mara ASSIGNING <fs_mara> WITH KEY matnr = p_l_matnr.   " BINARY SEARCH.
      IF sy-subrc = 0 AND <fs_mara> IS ASSIGNED.
        ASSIGN COMPONENT 'MTART'  OF STRUCTURE <fs_final> TO <fs_value>.
        <fs_value>        = <fs_mara>-mtart.
        ASSIGN COMPONENT 'MATKL'  OF STRUCTURE <fs_final> TO <fs_value>.
        <fs_value>        = <fs_mara>-matkl.
        READ TABLE it_makt  ASSIGNING <fs_makt>  WITH KEY matnr =  <fs_mara>-matnr   BINARY SEARCH.
        IF sy-subrc = 0 AND <fs_makt> IS ASSIGNED.
          ASSIGN COMPONENT 'MAKTX'  OF STRUCTURE <fs_final> TO <fs_value>.
          <fs_value>        = <fs_makt>-maktx.
        ENDIF.
        READ TABLE it_t023t ASSIGNING <fs_t023t> WITH KEY matkl = <fs_mara>-matkl  BINARY SEARCH.
        IF sy-subrc = 0 AND <fs_t023t> IS ASSIGNED.
          ASSIGN COMPONENT 'WGBEZ'  OF STRUCTURE <fs_final> TO <fs_value>.
          <fs_value>      = <fs_t023t>-wgbez.
        ENDIF.
        READ TABLE it_t134t ASSIGNING <fs_t134t> WITH KEY mtart = <fs_mara>-mtart  BINARY SEARCH.
        IF sy-subrc = 0 AND <fs_t134t> IS ASSIGNED.
          ASSIGN COMPONENT 'MTBEZ'  OF STRUCTURE <fs_final> TO <fs_value>.
          <fs_value>      = <fs_t134t>-mtbez.
        ENDIF.
      ENDIF.
    ENDFORM.                    " get_other_data
    *&      Form  display_data
          text
    FORM display_data  USING    p_l_table
                                p_l_fcat.
      DATA:
    Variable for Object Creation
      o_report TYPE REF TO lcl_report.
      CREATE OBJECT o_report.
      o_report->display( EXPORTING l_table = p_l_table
                                   l_fcat  = p_l_fcat ).
    ENDFORM.                    " display_data

    I don't know how to read the code you pasted or I would have checked this myself.
    Do your fields in the internal table reference dictionary objects or elementary types? If not using dictionary types, the column names will be blank by default. If you can't change your fields to be dictionary types, you can try this to change the column names:
    I made a method inside my local class to add the names:
            call method set_colname
              EXPORTING iv_tab = alv_tab
                        iv_colid = 'xxxx'  "fieldname from the table
                        iv_stxt = text-t54
                        iv_mtxt = text-t55
                        iv_ltxt = text-t55.
    METHOD set_colname .
      data:
              alv_cols type REF TO cl_salv_columns_table,
              alv_col type REF TO cl_salv_column.
      TRY .
    *... Change fieldnames
            call METHOD iv_tab->get_columns RECEIVING value = alv_cols.
            call method alv_cols->get_column EXPORTING columnname = iv_colid RECEIVING value = alv_col.
            IF iv_stxt <> ''.
              CALL METHOD alv_col->set_short_text EXPORTING value = iv_stxt.
            ENDIF.
            IF iv_mtxt <> ''.
              CALL METHOD alv_col->set_medium_text EXPORTING value = iv_mtxt.
            ENDIF.
            IF iv_ltxt <> ''.
              CALL METHOD alv_col->set_long_text EXPORTING value = iv_ltxt.
            ENDIF.
       CATCH cx_salv_not_found.
      ENDTRY.
    ENDMETHOD. "set_colname

  • Getting Billing Element in Purchase Order Using WBS element.

    Hi,
    What is the process and logic to get the billing element and the corresponding Sales order details using the WBS element or network of the account assignment category in the Purchase order line item.Please suggest the tables to be used to fetch the Sales order details using this procedure.
    Thanks
    Anand

    Project PO can be generated in following methods.
    1.When a Material attached to Activity in the Project, PR can be generated with A/C assignement Q. System wil copy the WBS element to which activity is assigned in the account assignment tab of PR. When PO is created with reference to PR, system wil automatically copy the  WBS from the PR in to PO account assignment tab.
    2. U can directly create PO with account assignment Q and assign WBS in account assignment tab.

Maybe you are looking for

  • Automate flat IDOC to XML IDOC using one interface

    Hello all, We are currently going through a migration process where XI will be replacing a legacy system.  As part of our testing procedure, we are using historical data pairings from the legacy system and using an automated tool to compare if the in

  • Why can't I Click and Drag?

    Yesterday I was clicking and dragging items on my desktop, but today I can't. I can select them but I can't move them. How do I fix this? I have a Macbook Pro, 10.5.8

  • Wireless crap shoot, why it has worked for years and now doesn't

    wireless dropped off last week. Did nothing, changed nothing to my knowledge. Now, have a cable modem from charter, so ethernet direct to my airport extreme. set up is good. but when I go to the internet, not connected. Assistant/diagnostics goes thr

  • UCCX 7 - Agent Routing question

    /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in

  • Using Audio sources to stress VOIP QOS

    I'm looking for a way to supply/inject either test tones, voice or music as a source to inject into a voice/data stream in order to qualify and/or quantify the voice portion stats. We want to see if we can collect benchmarks or standards of performan