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:
Too many parameters specified with Perform
"... This routine contains 2 formal parameters, but the current call contains 4 actual parameters."
The report that I've created is this:
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.
And here is how I call the from from the SAP Script:
PERFORM GET_TEXT_0014 IN PROGRAM Z_SAPSCRIPT_FORMS
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 ?