Skip to Content
0
Former Member
Feb 24, 2014 at 08:33 AM

Call FORM from SAP Script not working ?!

824 Views

Hi guys

I have to work on an SAP Script and I need to fill a variable with data from database table. I searched on the internet and found out that I can create a program, in it I can create an FORM and from SAP Script I can PERFORM the form. And I did this but it shows me an Error:

Short text

Too many parameters specified with Perform

Error Analysis

"... This routine contains 2 formal parameters, but the current call contains 4 actual parameters."


The report that I've created is this:

REPORT z_sapscript_forms.

FORM get_text_0014 USING l_lgart TYPE pa-lgart

CHANGING l_text TYPE t511t-lgtext.

SELECT SINGLE lgtxt FROM t511t INTO l_text WHERE lgart = l_lgart.

ENDFORM.

And here is how I call the from from the SAP Script:

PERFORM GET_TEXT_0014 IN PROGRAM Z_SAPSCRIPT_FORMS

USING &LGART0014&

CHANGING &LGTXT0014&

ENDPERFORM

What is the problem here ? I don't give in SAP script 4 parameters?? I give 2 parameters but it doesn't work ??


Can someone help me with this ?