cancel
Showing results for 
Search instead for 
Did you mean: 

Perform in sap script

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

your form should be:


FORM include_dollar TABLES 
                                     intab STRUCTURE itcsy
                                    outtab STRUCTURE itcsy.

regards,darek

Former Member
0 Kudos

Thank you so much, the error disappeared! If I may continue with this thread, do any of you see any problem with outtab value not getting modified. I just ran the program and it does not seem to be changing the value of REGUD-SWNES in the printout. I am unable to debug it at this point. I shall investigate this further but if any pointers, I would be grateful.

Thanka again.

Former Member
0 Kudos

hi

to resolve problem try to put into your form code "break-point."

and start your form in print-preview mode.

regards,darek

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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