Create ABAP Report  for  Infoprovider

Could anyone tell me Function module to fetch Infoprovider(s) for creating ABAP report on.
The report should provide:
Input:
- Infoprovider(s)
- Date-range: default: last 6 months
Output:
- data which is shown in the requests tab as described before, preceeded with the name of the infoprovider and having the possibility to download to Excel.
Thanks

Hi,
you can easily use it as a template to create your own program. The program just shows what to do and how you need to populate the tables in order to pass selection parameters to the fm to get the required data back.
Here a little demo I created to do it a bit flexible from different cubes:
DATA: ref_data_tab TYPE REF TO data,
      ref_data_line TYPE REF TO data,
      it_sfc TYPE rsdri_th_sfc,
      l_sfc TYPE rsdri_s_sfc,
      it_sfc2 TYPE rsdd_th_sfc,
      l_sfc2 TYPE rrsfc01,
      it_sfk TYPE rsdri_th_sfk,
      l_sfk TYPE rsdri_s_sfk,
      it_sfk2 TYPE rsdd_th_sfk,
      l_sfk2 TYPE rrsfk01,
      l_first_call TYPE rs_bool,
      l_end_of_data TYPE rs_bool,
      l_tabname(30) TYPE c,
      l_cube(30) TYPE c,
      it_cobpro TYPE rsd_t_cob_pro,
      l_cobpro TYPE rsd_s_cob_pro.
FIELD-SYMBOLS: <e_t_data> TYPE table,
               <l_data> TYPE ANY,
               <fs_field>.
PARAMETERS: pa_cube TYPE rsinfoprov OBLIGATORY DEFAULT '/NBAG/CML_C05',
            pa_debug AS CHECKBOX.
IF pa_cube(1) = '0'.
  CONCATENATE '/BI0/V' pa_cube '2' INTO l_tabname.
ELSE.
  CONCATENATE '/BIC/V' pa_cube '2' INTO l_tabname.
ENDIF.
CREATE DATA ref_data_tab TYPE TABLE OF (l_tabname).
CREATE DATA ref_data_line TYPE (l_tabname).
ASSIGN ref_data_tab->* TO <e_t_data>.
ASSIGN ref_data_line->* TO <l_data>.
IF pa_debug = 'X'.
  BREAK-POINT.
ENDIF.
CALL FUNCTION 'RSD_COB_PRO_ALL_GET'
  EXPORTING
    i_infocube                      = pa_cube
  I_WITH_ATR_NAV                  = RS_C_FALSE
  I_WITH_META_IOBJ                = RS_C_FALSE
  I_OBJVERS                       = RS_C_OBJVERS-ACTIVE
  I_BYPASS_BUFFER                 = RS_C_FALSE
IMPORTING
   e_t_cob_pro                     = it_cobpro
  E_T_IOBJ_CMP                    =
  E_T_ATR                         =
  E_TLOGO                         =
EXCEPTIONS
   infocube_not_found              = 1
   error_reading_infocatalog       = 2
   illegal_input                   = 3
   OTHERS                          = 4.
IF sy-subrc <> 0.
  WRITE: / sy-subrc, sy-msgno, sy-msgid, sy-msgv1, sy-msgv2, sy-msgv3.
ENDIF.
CLEAR: it_sfk[], it_sfc[].
LOOP AT it_cobpro INTO l_cobpro.
  IF l_cobpro-iobjtp = 'KYF'.
    IF l_cobpro-ncumfl IS INITIAL.
      l_sfk-kyfnm = l_cobpro-iobjnm.
      l_sfk-kyfalias = l_cobpro-iobjnm.
      l_sfk-aggr = l_cobpro-aggrgen.
      INSERT l_sfk INTO TABLE it_sfk.
      MOVE-CORRESPONDING l_cobpro TO l_sfk2.
      INSERT l_sfk2 INTO TABLE it_sfk2.
    ENDIF.
  ELSE.
    IF l_cobpro-dimension NP '*P'.
      l_sfc-chanm = l_cobpro-iobjnm.
      l_sfc-chaalias = l_cobpro-iobjnm.
      l_sfc-orderby = 0.
      INSERT l_sfc INTO TABLE it_sfc.
      MOVE-CORRESPONDING l_cobpro TO l_sfc2.
      INSERT l_sfc2 INTO TABLE it_sfc2.
    ENDIF.
  ENDIF.
ENDLOOP.
CLEAR l_end_of_data.
l_first_call = 'X'.
WHILE l_end_of_data = space.
  CALL FUNCTION 'RSDRI_INFOPROV_READ'
    EXPORTING
      i_infoprov                   = pa_cube
      i_th_sfc                     = it_sfc
      i_th_sfk                     = it_sfk
  I_T_RANGE                    =
  I_TH_TABLESEL                =
  I_T_RTIME                    =
   i_reference_date             = sy-datum
  I_T_REQUID                   =
  I_SAVE_IN_TABLE              = ' '
  I_TABLENAME                  =
  i_save_in_file               = 'X'
  i_filename           = 'C:\test.csv'
   i_packagesize                = 1000
  I_MAXROWS                    = 0
     i_authority_check            = ' '
  I_CURRENCY_CONVERSION        = RS_C_TRUE
   i_use_db_aggregation         = ' '
   i_use_aggregates             = ' '
   i_rollup_only                = ' '
  I_READ_ODS_DELTA             = RS_C_FALSE
  I_CALLER                     = RSDRS_C_CALLER-RSDRI
  I_DEBUG                      = RS_C_FALSE
   IMPORTING
     e_t_data                     = <e_t_data>
     e_end_of_data                = l_end_of_data
  E_AGGREGATE                  =
  E_SPLIT_OCCURRED             =
    CHANGING
      c_first_call                 = l_first_call
   EXCEPTIONS
     illegal_input                = 1
     illegal_input_sfc            = 2
     illegal_input_sfk            = 3
     illegal_input_range          = 4
     illegal_input_tablesel       = 5
     no_authorization             = 6
     ncum_not_supported           = 7
     illegal_download             = 8
     illegal_tablename            = 9
     trans_no_write_mode          = 10
     inherited_error              = 11
     x_message                    = 12
     OTHERS                       = 13.
  IF sy-subrc <> 0.
    WRITE: / sy-subrc, sy-msgno, sy-msgid, sy-msgv1, sy-msgv2, sy-msgv3.
    EXIT.
  ELSE.
    LOOP AT <e_t_data> INTO <l_data>.
      WRITE: / sy-tabix, ':'.
      LOOP AT it_cobpro INTO l_cobpro.
        IF l_cobpro-ncumfl IS INITIAL.
          ASSIGN COMPONENT l_cobpro-iobjnm OF STRUCTURE <l_data>
              TO <fs_field>.
          IF sy-subrc = 0.
            WRITE: <fs_field>.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
  ENDIF.
  CLEAR: l_first_call, <e_t_data>[].
  IF l_end_of_data <> space.
    EXIT.
  ENDIF.
ENDWHILE
Hope this helps a bit
regards
Siggi

Similar Messages

  • Abap report for calling abap proxy?

    why do we need  to write abap report for calling abap proxy? i mean what's the use of abap report and what are the things inside the report ...please give me details about abap report.

    Hi,
    In SPROXY for your outbound interface you generate the proxy class.
    The ABAP report is used to fill the data from the ABAP tables and then trigger the call to XI using this class.
    Look into the code in this blog and check what is done,. The data is filled in the report and then the call is made to XI using an object of the class created in SPROXY using the EXECUTE_ASYNCHRONOUS method.
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    Regards
    Bhavesh

  • Abap report for PO details including the person releasing the PO last.

    Hi gurus,
    I need to create a abap report for the purchase order details. I am finding difficulty in getting the last person who released the PO. Can anyone tell me how can I get the person who released the PO last ??
    From which table I can get this detail ??

    Hey hi ,
    thanks for your reply,
    Actually , I already went through the tables before, but here, there is one scenario listed below which is creating the problem :
    1. There are two person related with the release of PO and either of the two can release the PO ( in other's absense ). Now, how to check who released the PO among the two. Here link with the PO is necessary as the person released this PO might not release the next PO.
    Thats why i feel the link of the PO must be existing based on release code too. As suppose the organization assign another manager to release the PO, it should not affect previous PO's released by the Old manager.
    thanks
    Edited by: kanak bhandari on Feb 6, 2008 1:19 PM

  • For R/3 to CRM Scenario ,creating ABAP Proxy for CRM which is in Target

    In R/3 to CRM scenario it is ok creating ABAP Proxy for CRM which is Target system.if it is possible it is Client Proxy.it is correct or not

    Hi,
    Client Proxy. When you need to create Proxy for your Sender system then the proxy is generated on the client side and the Class created in Proxy generation is called in a report/FM etc.
    Server proxy. The server proxy is created when you are sending the data from SAP XI to the receiving system.
    The generation of proxy in both the cases happens on the sender or the receiver system.
    Regards
    Vijaya

  • How to create a report for open sales orde documents which are not invoiced

    Hi Experts this is urgent,
    +pls give the Logic for document flow+
    My requirement is create a report for sales orders which are not invoiced  using the following table.
    VBAK : sales order header
    VBAP : sales order item
    VBFA : sales document flow
    VBUK for processing status
    KOMV for duties value and sales order value
    LIKP : delivery not header
    LIPS :delivery note item
    For information : In the header level the processing Status is indicated in the table VBUK field LFSTK for one sales order number. A,B , C are the possible entries.
    Case A : When a sales order is invoiced we can display information on the header status :
    Overall status : Completed  and display a invoice number in the document flow. When the items of the sales orders are invoiced the process status is the following :  Overall status       Completed            
    Delivery status      Fully delivered      
    Case B : An open sales order not delivered and not invoiced will have overall status : Open on the header and item level and will not have subsequent documents.
    Case C :
    When the items for the sales order are delivered but not invoiced the status will be u201Cfully deliveredu201D
    And the subsequent documents will be delivery notes and good issue if the delivery note is issued.
    With regards
    ravi
    Edited by: ravik ravik on Jun 25, 2008 3:29 PM

    Hello Ravi,
    U neednot develop any report..
    there is std report with txn V.02
    or copy this and make necessary changes.
    Reward, if helpful.
    Rgds,
    Raghu.

  • How To Create ABAP Code For HR Context Sensitive Structural Authorization

    Hello,
    We have created a HR Custom Program which IS NOT built off the PCH or PNP Logical Database. As a result, we need to manually create ABAP code for HR Context Sensitive Structural Authorization Check in our custom HR program. Via HR Context Sensitive Structural Authorizations, we are restricting access to personnel numbers and the underlying HRP* tables.
    Any assistance would be greatly appreciated with the identification of the SAP standard function modules (Ex. RH_STRU_AUTHORITY_CHECK, HR_CHECK_AUTHORITY_INFTY, HR_CHECK_AUTHORITY_INFTY , etc) used in HR Context Sensitive Structural Authorization Check, how they are used to control HR Structural authorization (P_ORGINCON), and some sample code.
    Thank you in advance for all your assistance,
    Ken Bowers

    Hello Ken
    You can use the interface methods IF_EX_HRPAD00AUTH_CHECK to get the same structural authorization as you can see in PA20/PA30. You need to use the methods set_org_assignment and check_authorization for this purpose. For more information you can refer to include FP50PE21 from line 237 onwards till 270.
    Regards
    Ranganath

  • How to create ABAP Query for vendor open items

    HI,
    My client has requested me to create ABAP Query for vendor open items . So that it will be usefull for the users . Could anyone help me with this. I will assign you points.Thanks in advance.

    Hello,
    Use Table BSIK <Open Items of AP > & BSAK <AP Cleared items>......
    For Query you can use SQ01.
    USE BSID & BSAD for AR open/clear items...
    LFA1, LFB1 are vendor master data tables
    This is FYI
    Hope this helps.
    Rgds
    Rajendra

  • ABAP report for caluculating the average days between invoice day  &posting

    Hi All,
    i have a requirement where in  i should create a report for caluculating average days between the invoice days and posting days.  By counting the total day in a month for which invoice were generated and counting the days on which payements were recived,i should difference those days and take a average for a month. anybody who is having any idea either interms of code or interms of links please help me.

    Hello,
    See this thread [Calculation Of Days|Calculation Of Days;
    Thanks
    Chandran

  • Pls help out me to create a report for entry tax

    hi all,
                  pls help out me to create a report for entry tax.
                    and give some logic how i can do this.
    thanks and regards
      vikas

    SELECT < Columns>
    from pay_payroll_actions ppa,
    pay_all_payrolls_f papf,
    per_time_periods ptp
    where papf.payroll_id = ppa.payroll_id
    and ppa.effective_date between papf.effective_start_date and papf.effective_end_date
    and ppa.action_type IN ('Q','R')
    and ptp.payroll_id = papf.payroll_id
    and papf.payroll_name = :pPayrollName
    and ppa.date_earned BETWEEN ptp.start_date AND ptp.end_date
    and :pDate BETWEEN ptp.start_date AND ptp.end_date
    Pass Any Date and Payroll Name. The query should list down all payroll runs in the period in which the date falls.

  • Is it possib to create inline report for a cube if wedon't have any measure

    Hi,
    Is it Possible to create an Inline report based on an application Rowsource even when we do not have any measure associated to that Rowsource in the current cube?
    Please help...

    We have a case where for any specific dates in fiscal dimension or any particular product, user want to list whether its a special event or not.
    To handle this we have created an uploadable report where user enter for which date there is a special event.We created a custom rowsource having columns for given dimension in cube and did the cube mapping.We also created inline report for the same. But not able to see data in that report.

  • How to Created custom report for Ship not Billed (SD/FI)?

    Hi all,
    I am anticipating  to write some abap reports..Here is one of them..
    Anyone can help  me with writing a Report , how to do 'Custom Report for shipped not Billed(SD/FI)' ..But since I am new to Abap , if you wish to reply, please use a little more detail and simple explanation, step by step so I can understand what is the idea, how it can be acheived...what kind of report should be used , techniques, tables etc...:)
    Appreciate your help!
    Regards,
    Boby

    Hi Boby,
    You need to create custom transaction to achive these results.
    you will have selection-screen ,it would be :
    Date : Here date would be mandatory  - Ranges Option
    Customer  - Optional field - Ranges
    Order #  Sales Order (Optional) Ranges
    Invoice #  - Invoice # (Optional) Ranges
    You will get the data based on ur selection-screen criteria ...
    First you will have customer order details from diffrent table
    VBAK,
    VBAP,
    LIKP
    LIPS
    VBRK,
    VBRP
    KNA1,
    VBFA Tables ( See the my sample program )
    Output would be :
    Customer #   Custome Name    Order #   Delivery #   Invoice #   Netpr, Netquantity ,
    Check the condition  whether invoice table has VBRK-RFBSK  = ''.
    See the my sample program : This is sales report by monthly..
    REPORT ZFDSALES_REPORT no standard page heading
                           message-id zwave.
    Data Declaration Part
    TYPE-POOLS
    type-pools : slis.
    Tables
    tables : VBAK,
             VBAP.
    Internal table for VBAK Table
    data : begin of i_vbak occurs 0,
           vbeln like vbak-vbeln,
           bstnk like vbak-bstnk,
           vdatu like vbak-vdatu,
           end of i_vbak.
    Internal table for VBAP and MATNR
    data : begin of i_vbap occurs 0,
           vbeln like vbap-vbeln,
           matnr like vbap-matnr,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr like vbap-netpr,
           maktx like makt-maktx,
           end of i_vbap.
    Internal tables
    data : begin of i_sales occurs 0,
           vdatu like vbak-vdatu,
           bstnk like vbak-bstnk,
           matnr like vbap-matnr,
           maktx like makt-maktx,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr  like vbap-netpr,
           end of i_sales.
    Variable for ALV
    data : v_repid like sy-repid,
           gt_fieldcat    type slis_t_fieldcat_alv.
    Selection-screen
    selection-screen : begin of block blk with frame title text-001.
    select-options : s_vbeln for vbak-vbeln,
                     s_erdat for vbak-erdat,
                     s_ernam for vbak-ernam,
                     s_vdatu for vbak-vdatu obligatory,
                     s_BSTNK for vbak-BSTNK,
                     s_KUNNR for vbak-kunnr,
                     s_matnr for vbap-matnr,
                     s_KDMAT for vbap-KDMAT.
    selection-screen : end of block blk.
    Initilization
    initialization.
      v_repid = sy-repid.
    S T A R T  -  O F  -  S E L E C T I O N ****************
    start-of-selection.
    Get the data from VBAK and VBAP Tables
      perform get_vbak_vbap.
    E N D  -  O F  -  S E L E C T I O N *****************
    end-of-selection.
    Display the data
      perform dispolay_data.
    *&      Form  get_vbak_vbap
          Get the data from VBAK and VBAP Table
    FORM get_vbak_vbap.
    Get the data from VBAK Table
      select vbeln bstnk vdatu from vbak into table i_vbak
                         where vbeln in s_vbeln
                         and   bstnk in s_bstnk
                         and   vdatu in s_vdatu
                         and   kunnr in s_kunnr
                         and   erdat in s_erdat
                         and   ernam in s_ernam.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
    Get the data from VBAP Table
      select avbeln amatnr akdmat akwmeng a~netpr
             b~maktx into table i_vbap
             from vbap as a inner join makt as b on bmatnr = amatnr
             for all entries in i_vbak
             where a~vbeln in s_vbeln
             and   a~kdmat in s_kdmat
             and   a~abgru = space
             and   a~matnr in s_matnr
             and   a~matnr ne '000000000000009999'
             and   a~matnr ne '000000000000004444'
             and   a~matnr ne '000000000000008888'
             and   a~matnr ne '000000000000001111'
             and   a~werks = '1000'
             and   b~spras = 'E'
             and   a~vbeln = i_vbak-vbeln.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
      sort i_vbak by vbeln.
      sort i_vbap by vbeln matnr.
      loop at i_vbap.
        read table i_vbak with key vbeln = i_vbap-vbeln
                                binary search.
        if sy-subrc eq 0.
          i_sales-bstnk = i_vbak-bstnk.
          i_sales-vdatu = i_vbak-vdatu.
          i_sales-matnr = i_vbap-matnr.
          i_sales-kdmat = i_vbap-kdmat.
          i_sales-maktx = i_vbap-maktx.
          i_sales-netpr = i_vbap-netpr.
          i_sales-kwmeng = i_vbap-kwmeng.
          append i_sales.
        else.
          continue.
        endif.
        clear : i_sales,
                i_vbap,
                i_vbak.
      endloop.
      sort i_sales by vdatu bstnk matnr.
      refresh : i_vbap,
                i_vbak.
    ENDFORM.                    " get_vbak_vbap
    *&      Form  dispolay_data
          Display the data
    FORM dispolay_data.
    Fill the Fiedlcat
      PERFORM fieldcat_init  using gt_fieldcat[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
          IT_FIELDCAT                       = gt_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_sales
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    ENDFORM.                    " dispolay_data
    *&      Form  fieldcat_init
          text
         -->P_GT_FIELDCAT[]  text
    FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Delivery Date
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'VDATU'.
      LS_FIELDCAT-OUTPUTLEN    = 12.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Delivery Date'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Purchase Order #Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'BSTNK'.
      LS_FIELDCAT-OUTPUTLEN    = 25.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Purchase Order #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-REF_FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-REF_TABNAME    = 'MARA'.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material #'.
      ls_fieldcat-seltext_M = 'Material #'.
      ls_fieldcat-seltext_S = 'Material #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MAKTX'.
      LS_FIELDCAT-OUTPUTLEN    = 40.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material Description'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Customer Material #
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KDMAT'.
      LS_FIELDCAT-OUTPUTLEN    = 35.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Customer material no.'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Quantity
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KWMENG'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Quantity'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Net Price
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'NETPR'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Net Price'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    ENDFORM.                    " fieldcat_init
    Reward Points if it is helpful
    Thanks
    Seshu

  • Why can't I create a report for standard price by material

    Any ideas? All reporting I have tried in SQO1 and even in SE16 returns 0 value for standard prices?
    Firstly why is this? and secondly is there another way I can pull a report by material showing standard price?
    Points awarded, many thanks

    hi,
    In MM60, u can get report for  materials having standard & moving average price based on ur input in selection screen like material,plant,material type,material group & created by only. As of my knowledge,
    there is no option to get list of materials with standard price in std.SAP.
    There are two options to generate report for materials with standard price.
    1. It is better go for customization . selection screen must contains price control field. if u enter price control like 'S' or 'V' in intial screen , report is generated.
    2. create a ABAP query for this.
    I hope this info is helpful to u.

  • Can using query create aging report for GL Account

    Hi all expert,
    I have a challenge scenario which customer request print out aging report for the following GL Account.
    This is not a business partner account. However, customer want display like aging report.
    30 days aging report for the following GL accounts by projects:-
         i)     WIP (Work In Progress) account
         ii)     Accrued Revenue account
         iii)     Accrued Cost account
    Examples:
                            Current Balance       30 day   60 day  90 day   120 day
    Account  WIP         10000               2000        3000      5000     0
    Any idea or example given? If yes, can you provide a query here?
    Regards,
    Eric Tan

    Hi Eric
    In standard SAP Business One this is difficult as the reports are 2 dimensional. To achieve this you will need to write multiple select statements into a temporary table and then select the final result from the temp table. Here is a sample for you to test:
    USE [*DATABASE_NAME*]
    GO
    /****** Object:  StoredProcedure [dbo].[REPORT_NAME]    Script Date: 04/24/2009 13:17:21 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE proc [dbo].[*REPORT_NAME*]
    as
    set nocount on
    begin
    DECLARE @Day_no varchar(2)
    DECLARE @Month_no varchar(2)
    DECLARE @Year_no varchar(4)
    DECLARE @Start_Date Datetime
    SET @Day_no = DAY(GetDate())
    SET @Month_no = MONTH(GetDate())
    SET @Year_no = YEAR(GetDate())
    SET @Start_Date = @Year_No + '/' + @Month_no + '/' + @Day_no --  + '/' + @Year_No
    IF OBJECT_ID(N'tempdb..#CRDAGEING', N'U') IS NOT NULL
    drop table #CRDAGEING
    SELECT T0.[CardCode] AS [CardCode], T0.[CardName] AS [CardName], -T0.[Balance] AS [Balance], CAST(0 AS MONEY) AS [Current], CAST(0 AS MONEY) AS [1Week], CAST(0 AS MONEY) AS [2Weeks], CAST(0 AS MONEY) AS [3Weeks], CAST(0 AS MONEY) AS [4Weeks], CAST(0 AS MONEY) AS [5Weeks], CAST(0 AS MONEY) AS [6Weeks], CAST(0 AS MONEY) AS [Over6Weeks], CAST(0 AS MONEY) AS [Avg3Months], CAST (0 AS MONEY) AS [Onhand] INTO #CRDAGEING FROM OCRD T0 WHERE T0.[CardType] = 'S' -- and T0.[CardCode] <> '' --and T0.[DocDate] >= @FromDate AND T0.[DocDate] <= @ToDate
    INSERT dbo.#CRDAGEING SELECT T1.[ShortName], NULL, 0, -SUM(T1.[BalDueDeb] - T1.[BalDueCred]), 0, 0, 0, 0, 0, 0, 0, 0, 0 FROM JDT1 T1, OCRD T2 WHERE T2.[CardType] = 'S' and T2.[CardCode] = T1.[ShortName] and T1.[DueDate] <= @Start_Date GROUP BY T1.[ShortName]
    INSERT dbo.#CRDAGEING SELECT T1.[ShortName], NULL, 0, 0, -SUM(T1.[BalDueDeb] - T1.[BalDueCred]), 0, 0, 0, 0, 0, 0, 0, 0 FROM JDT1 T1, OCRD T2 WHERE T2.[CardType] = 'S' and T2.[CardCode] = T1.[ShortName] and T1.[DueDate] >= DATEADD(DAY,1,@Start_Date) and T1.[DueDate] <= DATEADD(DAY,8,@Start_Date) GROUP BY T1.[ShortName]
    INSERT dbo.#CRDAGEING SELECT T1.[ShortName], NULL, 0, 0, 0, -SUM(T1.[BalDueDeb] - T1.[BalDueCred]), 0, 0, 0, 0, 0, 0, 0 FROM JDT1 T1, OCRD T2 WHERE T2.[CardType] = 'S' and T2.[CardCode] = T1.[ShortName] and T1.[DueDate] > DATEADD(DAY,8,@Start_Date) and T1.[DueDate] <= DATEADD(DAY,15,@Start_Date) GROUP BY T1.[ShortName]
    INSERT dbo.#CRDAGEING SELECT T1.[ShortName], NULL, 0, 0, 0, 0, -SUM(T1.[BalDueDeb] - T1.[BalDueCred]), 0, 0, 0, 0, 0, 0 FROM JDT1 T1, OCRD T2 WHERE T2.[CardType] = 'S' and T2.[CardCode] = T1.[ShortName] and T1.[DueDate] > DATEADD(DAY,15,@Start_Date) and T1.[DueDate] <= DATEADD(DAY,22,@Start_Date) GROUP BY T1.[ShortName]
    INSERT dbo.#CRDAGEING SELECT T1.[ShortName], NULL, 0, 0, 0, 0, 0, -SUM(T1.[BalDueDeb] - T1.[BalDueCred]), 0, 0, 0, 0, 0 FROM JDT1 T1, OCRD T2 WHERE T2.[CardType] = 'S' and T2.[CardCode] = T1.[ShortName] and T1.[DueDate] > DATEADD(DAY,22,@Start_Date) and T1.[DueDate] <= DATEADD(DAY,29,@Start_Date) GROUP BY T1.[ShortName]
    INSERT dbo.#CRDAGEING SELECT T1.[ShortName], NULL, 0, 0, 0, 0, 0, 0, -SUM(T1.[BalDueDeb] - T1.[BalDueCred]), 0, 0, 0, 0 FROM JDT1 T1, OCRD T2 WHERE T2.[CardType] = 'S' and T2.[CardCode] = T1.[ShortName] and T1.[DueDate] > DATEADD(DAY,29,@Start_Date) and T1.[DueDate] <= DATEADD(DAY,36,@Start_Date) GROUP BY T1.[ShortName]
    INSERT dbo.#CRDAGEING SELECT T1.[ShortName], NULL, 0, 0, 0, 0, 0, 0, 0, -SUM(T1.[BalDueDeb] - T1.[BalDueCred]), 0, 0, 0 FROM JDT1 T1, OCRD T2 WHERE T2.[CardType] = 'S' and T2.[CardCode] = T1.[ShortName] and T1.[DueDate] > DATEADD(DAY,36,@Start_Date) and T1.[DueDate] <= DATEADD(DAY,43,@Start_Date) GROUP BY T1.[ShortName]
    INSERT dbo.#CRDAGEING SELECT T1.[ShortName], NULL, 0, 0, 0, 0, 0, 0, 0, 0, -SUM(T1.[BalDueDeb] - T1.[BalDueCred]), 0, 0 FROM JDT1 T1, OCRD T2 WHERE T2.[CardType] = 'S' and T2.[CardCode] = T1.[ShortName] and T1.[DueDate] > DATEADD(DAY,43,@Start_Date)  GROUP BY T1.[ShortName]
    SELECT SR.[CardCode], MAX(SR.[CardName]), SUM(SR.[Balance]) AS [BalanceOwing], SUM(SR.[Current]) AS [Current], SUM(SR.[1Week]) AS [1Week], SUM(SR.[2Weeks]) AS [2Weeks], SUM(SR.[3Weeks]) AS [3Weeks], SUM(SR.[4Weeks]) AS [4Weeks], SUM(SR.[5Weeks]) AS [5Weeks], SUM(SR.[6Weeks]) AS [6Weeks], SUM(SR.[Over6Weeks]) AS [Over6Weeks] FROM dbo.#CRDAGEING SR GROUP BY SR.[CardCode] ORDER BY SR.[CardCode]
    END
    Go to Microsoft SQL Studio manager and select your company database. Then expand the list and select Programmability > Stored Procedures. Right click on Stored Procedures and select New Stored Procedure. Copy the above code over the code in the edit window and change the database name as well as report name. Then select Execute to create the stored procedure. If you make changes, remember to change the word CREATE to ALTER (with other words CREATE for the first execute, and ALTER thereafter). Then in SAP Business One create a new query and leave everything blank. Click on execute and select the pencil to change to edit mode. Remove the words SELECT and type in EXEC REPORT_NAME (change the REPORT_NAME to the name you used in SQL). Then execute again and the results will be displayed in SAP Business One.
    Let me know if you get stuck. Remember the above is an example and will need to be changed to use your tables and fields as required. The basic idea is to move across by one column with each select statement. So for example the first select statement does the CURRENT column, the second one the 30DAYS column, and so on.
    Kind regards
    Peter Juby

  • How to create crystal report for fixed assets

    Hi,
    I am beginner to SAP B1. I have to create crystal report on fixed assets. for the following fields I have to get data.
    Fixed Asset,
    Cost of Fixed asset,
    Disposal of fixed asset
    Scrap of fixed asset
    Additional cost on fixed asset
    Fixed asset cost after additional cost
    Rate of fixed asset –Depreciation item cost - Percentage
    Depreciation of fixed asset on item cost
    write-up cost on fixed asset –write-up
    Rate of fixed asset-Depreciation on write-up cost --percentage
    Depreciation of fixed asset on  write -up cost
    Net Book value of fixed asset.
    your help here is appreciated.
    Thanks,
    Challa

    Hi,
    Actually they are not going to standard reports as Revaluation amount we are creating User defined fields and that needs to be fetched to the report. As well they want original cost, depreciation original cost, Revaluation amount and depreciation on revaluation separately..
    As per my understand system will provide one cost and the depreciation on that.
    So, can somebody help me in guiding me..
    Thanks in advance.
    Thanks,
    Challa

  • Abap report for budget/actual/commitment

    Hi Guru..
    Please help me.
    Im in urgent
    I wanna write an abap program for budget/actual/commitment.
    I try to trace prgram s_alr_87013019, but only one table found.
    Please let me know which table is using for budget/actual/commitment
    report..
    Please guru..

    Hello Mohd,
    The actual,budget and commitment values are stored in the one table COSP.
    The values differentiate with field <b>VRGNG</b> - "CO Business Transaction".
    If the record has in this field text '<b>COIN</b>' it means that values are "actual".
    For example:
    OBJNR     PR00000101
    GJAHR     2005
    KSTAR   101101
    VRGNG     <b>COIN</b>
    TWEAR   USD
    WTG001     100,00
    WTG002  200,00
    It means that the element PR0000101 has the '<b>actual'</b> operations refering
    the cost element 101101, with values: 100,00 USD in january 2005 and
    200,00 USD in february 2005.
    The next row in the table COSP, clould look like this:
    OBJNR     PR00000101
    GJAHR     2005
    KSTAR   101101
    VRGNG     <b>RMBA</b>
    TWEAR   USD
    WTG001     100,00
    WTG002  0,00
    This means that there was a <b>'Purchase requisition'</b> in january 2005
    with decretation on object PR0000101.
    And the next row, could be:
    OBJNR     PR00000101
    GJAHR     2005
    KSTAR   101101
    VRGNG     <b>RMBE</b>
    TWEAR   USD
    WTG001     0,00
    WTG002  150,00
    And that means that in february 2005 there was a <b>'Purchase order'</b>
    with value 150,00 USD decretated on this object.
    I hope, that my explanation is now clear and accurate.
    - Marta

Maybe you are looking for