Skip to Content
author's profile photo Former Member
Former Member

Problems with tha sapscript-command 'perform'

Hello,

I want to call a subprogram in a modulpool from a textelement in SAPScript with the command 'perform'. The subprogram has one parameter. But I get a dump, which says that I "give 4 actual parameters to a subprogram with only 1 formal parameter". I don't know why this problem arises, because I overgive only 1 actual parameter. Thanks.

Regards, Lars.

-


SAPScript:

/: DEFINE &CHECK1& = ' '

/: PERFORM TESTDRUCK IN PROGRAM ZSD_TESTDRUCK_POOL

/: CHANGING &CHECK1&

/: ENDPERFORM

/: IF &CHECK1& NE 'x'

/: INCLUDE ZTESTBITMAP OBJECT GRAPHICS ID BCOL LANGUAGE DE

/:ENDIF

-


ABAP:

REPORT ZSD_TESTDRUCK_POOL .

TABLES: ZQM_TESTDRUCK.

FORM TESTDRUCK CHANGING check TYPE c.

  • DATA check(1) TYPE c.

check = ' '.

SELECT * FROM ZQM_TESTDRUCK.

IF sy-sysid = ZQM_TESTDRUCK-SAPSYSTEM.

check = 'x'.

ENDIF.

ENDSELECT.

ENDFORM.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2005 at 04:37 PM

    Hello,

    I found a good article in the sap-help. Link:

    http://help.sap.com/saphelp_webas630/helpdata/en/d1/803279454211d189710000e8322d00/content.htm

    Regards, Lars.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2005 at 04:39 PM

    Hi Lars,

    The problem is with the way subroutine is define. It can be defined in on particular way only. Please see following link for details -

    http://help.sap.com/search/highlightContent.jsp

    Cheers,

    Sanjeev

    Add a comment
    10|10000 characters needed characters exceeded

    • When doing PERFORM inside of a sapscript form, you need to handle the FORM a certain way. In your case, it would look something like this.

      
      
      form  layout_form1 tables co_sym_using   structure itcsy
                                co_set_symbols structure itcsy.
      
      * DATA check(1) TYPE c.
        check = ' '.
      
        select * from zqm_testdruck.
      
          if sy-sysid = zqm_testdruck-sapsystem.
            check = 'x'.
            read table co_set_symbols index 1.
            co_set_symbols-value = check.
            modify co_set_symbols index 1.
      
          endif.
      
        endselect.
      
      
      endform.
      
      

      The values are passed in internal tables, you can manuipulate this tables to get the desired functionality.

      Regards,

      Rich Heilman

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.