Skip to Content
avatar image
Former Member

Perform in sap script

Hello

I am getting a dump with PERFORM_TOO_MANY_PARAMETERS when testing the sap script.

The code is as follows,

In the script

/: PERFORM INCLUDE_DOLLAR IN PROGRAM Y_DOLLAR_SYMBOL

/: CHANGING &REGUD-SWNES&

/: ENDPERFORM.

= &REGUD-SWNES&

The program Y_DOLLAR_SYMBOL (To include a dollar symbol offset)

FORM include_dollar TABLES outtab STRUCTURE itcsy.

DATA:

in_amt TYPE regud-swnes,

lv_num(10) TYPE C VALUE '0123456789',

lv_count type I,

lv_loop type I value 18.

CLEAR lv_count.

Do lv_loop TIMES.

IF NOT IN_AMT+lv_count(1) CO lv_num.

lv_count = lv_count + 1.

ELSE.

lv_count = lv_count - 1.

REPLACE SECTION OFFSET lv_count LENGTH 1 of in_amt WITH '$'.

Read TABLE outtab INDEX 1.

outtab-value = in_amt.

MODIFY outtab index sy-tabix.

EXIT.

ENDIF.

ENDDO.

ENDFORM.

Does someone help me figure out what am I doing wrong?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 03, 2009 at 09:47 AM

    hi,

    your form should be:

    FORM include_dollar TABLES 
                                         intab STRUCTURE itcsy
                                        outtab STRUCTURE itcsy.
    

    regards,darek

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 03, 2009 at 09:49 AM

    Hi,

    Your subroutine definition shoud be as follows;

    FORM include_dolllar TABLES IN_PAR STUCTURE ITCSY

    OUT_PAR STRUCTURE ITCSY.

    Check the SAP help for the full details.

    Regards,

    Nick

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 03, 2009 at 09:53 AM

    Hi,

    In your script, you are using only CHANGING variable, you should use USING also. and in Z program u should declare like this.

    Form <formname> TABLES in_tab STRUCTURE ITCSY

    out_tab STRUCTURE ITCSY.

    Add comment
    10|10000 characters needed characters exceeded