Skip to Content
author's profile photo
Former Member

PASSING A GLOBAL VARIABLE TO A FUNCTION

I have made a copy of the program that lists open orders.

It passes input parameters to a function named RV_Missing_Document_Data.

my user would like to select using date ranges . I have created input parameter for the field, but have no success passing the range to the function. rather than passing IBT2003010320030403 to the function, it passes IBT20030 (the field size of sy-datum).

How do I define this to pass the range information? please

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Jun 08, 2004 at 06:03 AM

    The way is to copy this FM, change the parameter's type from a date to the range of dates (tables) and tune this FM's code for the parameter's type.

    Hope it helps.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      > > In SM37 in Tables tab create a new parameter with

      > a

      > > type that refers to a structure as a

      > > Select-Option/Range:

      > > BEGIN OF ...

      > > SIGN(1),

      > > OPTION(2),

      > > LOW LIKE SY-DATUM,

      > > HIGH LIKE SY-DATUM,

      > > END OF ...

      > >

      > > or you can try a table with one field as a long

      > > string (30) should be enough:

      > > BEGIN of ...

      > > STR(30),

      > > END of ...

      > >

      > > (during assignment to a range it will move fields'

      > > values to the correct range's fields).

      > >

      > > Inside of a function declare a Range and assign

      > > passed tables entries to it:

      > > range[] = table[].

      > >

      > > And in FM change code instead of "= date" it will

      > be

      > > something like "IN range.".

      >

      > Hi Pavil:

      >

      > Thank you for your input. I am going to try your

      > suggestion. I let you know of my success.

      >

      > Linda

      Thanks, Guys, for your information and help. It is completed and It works beautifully.

      I appreciate your help.

      LInda

  • author's profile photo
    Former Member
    Jun 08, 2004 at 03:18 PM

    In SM37 in Tables tab create a new parameter with a type that refers to a structure as a Select-Option/Range:

    BEGIN OF ...

    SIGN(1),

    OPTION(2),

    LOW LIKE SY-DATUM,

    HIGH LIKE SY-DATUM,

    END OF ...

    or you can try a table with one field as a long string (30) should be enough:

    BEGIN of ...

    STR(30),

    END of ...

    (during assignment to a range it will move fields' values to the correct range's fields).

    Inside of a function declare a Range and assign passed tables entries to it:

    range[] = table[].

    And in FM change code instead of "= date" it will be something like "IN range.".

    Add comment
    10|10000 characters needed characters exceeded