Skip to Content
author's profile photo
Former Member

Calling SAPScript from a FM

Hi,

I have a FM module which should call a SAPScript. It works fine with

static information on the SAPScript, but it does not work with dynamic

elements. For example, I have certain fields in my FM which content I

would like to print, but those variables are always empty. I copied my

FM to a regular ABAP report and it works fine. When I debug it, I can

see the contents of the fields in the FM, but they get cleared in the SAPScript.

By the way, I execute the FM with Single Test, because there is not ABAP

which will execute it later on. It will be executed via RFC.

Does anyone had this problem before and found a solution?

Thanks in advance!!!

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Posted on Oct 20, 2003 at 01:43 PM

    How are the variables you are attempting to pass to your SAPScript defined? If they are local variables to the FM I do not believe that they will be available to your form (as you are calling that via another function group using the START_FORM, WRITE_FORM FMs).

    However, if they are export / tables parameters in your FM then I am still not clear on why they are not being passed across. If this is the case, it may be useful for you to post some of your code and definitions in order that a more helpful response can be forthcoming.

    Kind Regards

    Rosie Brent

    Analyst/Programmer

    TKA Tallent Chassis Ltd.

    Add comment
    10|10000 characters needed characters exceeded

    • A further point occured to me after posting my original response.

      Since you know when submitted using an ABAP report your SAPScript and driver program code work as expected, why not create your RFC FM as a 'wrapper' doing nothing but SUBMITting your ABAP report and RETURNing to the RFC a success / failure in production of your SAPScript output?

      It may be the most simple solution to your problem.

      Kind Regards

      Rosie Brent

      Analyst/Programmer

      TKA Tallent Chassis Ltd.

  • author's profile photo
    Former Member
    Posted on Oct 23, 2003 at 09:36 AM

    Hi there

    The variables you want to print in the SAPScript must be declared in the TOP include

    of the function group to be available to the SAPScript

    Regards

    Anthony

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      In addition to Anthony's point.

      Do check whether you have declared the interface as a global interface.

      Hope this solves your problem.

      Regards,

      Francis Gabriel