Skip to Content

CR 2016 - SAP Function Module Input Parameter not visible

SAP Function Module has two input parameters but only one shows up when mapped to Crystal Reports. Both prompts are defined as optional and checked as 'Pass by Value' in SE37. Need help tracing why one parameter is missing from CR. FM works fine when executed from se37.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 20 at 03:31 PM

    One potential cause:

    1566129 - Not all input parameter fields are available from Crystal Reports when reporting off an ABAP function

    Symptom

    Not all parameter fields are available in Crystal Reports (CR)

    Environment

    • CR 2008
    • SAP Integration Kit for Business Objects Enterprise 3.1
    • SAP ECC 6.0

    Reproducing the Issue

    • Create an ABAP function module which contains value type SY-DATUM such as:

    VALUE(IV_DATE) TYPE SY-DATUM

    • From CR, create new report using 'SAP Table, Cluster or Functions'

    Cause

    System fields such as 'SY-*' are supported using the ‘LIKE’ clause instead of the ‘TYPE’ clause

    Resolution

    • Replace the 'TYPE' clause with the 'LIKE' clause as below:

    VALUE(IV_DATE) LIKE SY-DATUM

    • 'LIKE' should be used with system fields 'Sy-*'
    • 'TYPE' should be used with data types 'Syst-*'
    Add comment
    10|10000 characters needed characters exceeded

  • Feb 20 at 04:46 PM

    2607221 - ABAP Function import values does not appear as parameters in Crystal Reports

    Symptom

    • Missing parameters.
    • ABAP Function does not display import values as parameters.
    • How to pass values to an ABAP Function input parameters in Crystal Reports?

    Environment

    • SAP Crystal Reports 2008
    • SAP Crystal Reports 2011
    • SAP Crystal Reports 2013
    • SAP Crystal Reports 2016

    Reproducing the Issue

    1. In SAP Netweaver, create an ABAP Function like:

      FUNCTION MYTEST

      IMPORTING
      VALUE(NAME) TYPE C
      VALUE(DEPARTMENT) TYPE C

      EXPORTING
      VALUE(Years_of_service) TYPE I
      VALUE(Employee_ID) TYPE I

    2. In Crystal Reports, create a report off the ABAP Function.
    3. Notice the import values are not shown as parameter in Crystal Reports. How to pass values to the import values / input parameter?

      Like in the above example, how to pass a value to: Name, and Department?

    Cause

    • When reporting off an ABAP Function in Crystal Reports, all the input and output parameters are displayed as fields in the table. This is why Crystal Reports does not create Crystal Reports Parameter for the ABAP Function input parameters.

    Resolution

    • To pass values to input parameters, you can either:
      • Link them to another table's fields, in the Database Expert; or
      • Add them to a Record Selection Formula.
    • To pass values to the ABAP Function imput parameters using a Record Selection:
      1. In Crystal Reports, create a report off an SAP ABAP Function.
      2. Under the menu "Record", select "Selection Formula - Record..."
      3. In the "Record Selection Formula", pass the values to the ABAP Function input parameters ( import values )

        For example:

        If you have an ABAP function like:

        FUNCTION MYTEST

        IMPORTING
        VALUE(NAME) TYPE C
        VALUE(DEPARTMENT) TYPE C

        EXPORTING
        VALUE(Years_of_service) TYPE I
        VALUE(Employee_ID) TYPE I

        Then in Crystal Reports, you will see the following database fields:
        - Name
        - Department
        - Years_of_service
        - Employee_ID

        To pass values to the fields used in the IMPORTING part of the function:
        - Name
        - Department

        You need to add he fields to the Record Selection Formula like:

        {Name} = "Smith" and {Department} = "Support"

        Once this is done, then the report will return the information for Mr. Smith in Support, which is the year of service and Employee ID in this case.

        Also, note that you can manually create Crystal Reports parameters, and substitute those values in the Record Selection Formula, so every time the report is refresh, you can enter different values without having to manually modify the Record Selection Formula every time.

    • For more information on reporting off SAP ABAP Function, see the SAP BusinessObjects Integration for SAP Solutions User's Guide.

      ( Document available in the Attachments section below )

    Add comment
    10|10000 characters needed characters exceeded