‎2009 Jul 15 6:56 AM
Hi,
In SAPScript...
/: DEFINE &UNAME& = ''
/: PERFORM GETNAME IN PROGRAM ZNAME
/: CHANGING &UNAME&
/: ENDPERFORM
In program ZNAME
REPORT ZNAME.
FORM GETNAME TABLES OUT_TAB STRUCTURE ITCSY.
READ TABLE OUT_TAB WITH KEY NAME = 'UNAME'.
MOVE SY-UNAME TO OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX SY-TABIX.
ENDFORM.
Now, when i run my SAPScript printing test, its giving dump.
The dump message is....
ShrtText Too many parameters specified with PERFORM. What happened? In a subroutine call, there were more parameters than in the routine definition. Error in ABAP application program. The current ABAP program "SAPLSTXC" had to be terminated because one of the statements could not be executed. This is probably due to an error in the ABAP program. Error analysis An exception occurred. This exception is dealt with in more detail below . The exception, which is assigned to the class 'CX_SY_DYN_CALL_PARAM_NOT_FOUND', was neither caught nor passed along using a RAISING clause, in the procedure "CO_ENDPERFORM" "(FORM)" . Since the caller of the procedure could not have expected this exception to occur, the running program was terminated. The reason for the exception is: A PERFORM was used to call the routine "GETNAME" of the program "ZNAME". This routine contains 2 formal parameters, but the current call contains 4 actual parameters. parameters.
Here i am passing only one parameter in perform, but its showing like 4 actual parameters are passing. What i understand from this dump its taking that IN PROGRAM ZNAME also as parameters.
Any ideas plz......
Regards,
Shree.
‎2009 Jul 15 7:07 AM
Hi,
while calling the perform stmt.. the actual parameters are not same in formal parameters.
like
form SUB using p1 p2 p3.
perform SUB using p1 p2. ..try to check the paramters declaration.
regads,
Rama reddy
‎2009 Jul 15 7:13 AM
Hi,
Here i am doing in SAPScript.
I am passing only one parameter. that to CHANGING <p1> from sapscript.
And in my program i did...
FORM GETNAME TABLES OUT_TAB STRUCTURE ITCSY.
READ TABLE OUT_TAB WITH KEY = 'UNAME'.
MOVE SY-UNAME TO OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX 1.
ENDFORM.here, FORM TABLES OUT_TAB STRUCTURE ITCSY is the syntax for SAPScript perform statements handling in program.
‎2009 Jul 15 7:16 AM
Please format ur first POST...
Its difficult to undrstand....
‎2009 Jul 15 7:20 AM
Hi,
In SAPScript
/: DEFINE &UNAME& = ''
/: PERFORM GETNAME IN PROGRAM ZNAME
/: CHANGING &UNAME&
/: ENDPERFORM
* NAME : &UNAME
In Program
REPORT ZSH_NAME.
FORM GETNAME TABLES OUT_TAB STRUCTURE ITCSY.
READ TABLE OUT_TAB WITH KEY NAME = 'UNAME'.
MOVE SY-UNAME TO OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX 1.
ENDFORM.When i did printing test this SAPScript form its giving dump
A PERFORM was used to call the routine "GETNAME" of the program "ZSH_NAME".
This routine contains 2 formal parameters, but the current call
contains 4 actual parameters.
‎2009 Jul 15 7:13 AM
FORM GETNAME --- for this form, u dont have parameters...
But while calling using PERFORM u r passing parameter &UNAME& as CHANGING....
Is this syntax correct??
‎2009 Jul 15 7:15 AM
HI,
in your program use
FORM GET_SLNO TABLES ITAB STRUCTURE ITCSY
OTAB STRUCTURE ITCSY.
instead of
FORM GETNAME TABLES OUT_TAB STRUCTURE ITCSY.
also
READ TABLE OTAB INDEX 1.
in place of
READ TABLE OUT_TAB WITH KEY NAME = 'UNAME'.
and then try.
Regds,
Anil
‎2009 Jul 15 7:23 AM
You must have two parameters in your subroutine-
FORM GETNAME TABLES INTAB STRUCTURE ITCSY
OUTTAB STRUCTURE ITCSY.
READ TABLE INTAB WITH KEY NAME = 'UNAME'.
IF SY-SUBRC EQ 0.
OUTTAB-NAME = 'UNAME'.
modify the value here then append to OUTTAB
ENDIF.
ENDFORM.
Then in your SAPSCRIPT, do it like this-
/: PERFORM GETNAME IN PROGRAM ZNAME
/: USING &UNAME&
/: CHANGING *UNAME&
/: ENDPERFORM
This will work.
‎2009 Jul 15 7:25 AM
Hi,
I already tried in this way, but no result, same dump its giving...
‎2009 Jul 15 7:31 AM
‎2009 Aug 12 4:09 PM
I have the same problem and can't understand why it says there are 4 parameters needed.
You solved you problem. Can you tell us how? Thanks
Marty