‎2007 Jun 04 5:02 PM
Hi .
i have added one parameter to perform statement like below.
PERFORM VBAP-POSNR_PRUEFEN(SAPFV45P). (this is previous statement)
PERFORM VBAP-POSNR_PRUEFEN(SAPFV45P) USING SPACE.(thsi is new
statement which i added)
(this is form)
FORM VBAP-POSNR_PRUEFEN USING US_BAPI.
DATA: DA_HIGH_POS LIKE VBAP-POSNR VALUE '900000',
VP_MINPOSNR LIKE VBAP-POSNR VALUE '999999',
VP_MAXPOSNR LIKE VBAP-POSNR.
-
-
-
-
-
ENDFORM..
when I trying to activate the fallowing error is giving. Please advise me how to do it.
Function Module Z_SD_SALES_ITEM_MAINTAIN_CRS_1
Parameter error with PERFORM VBAP-POSNR_PRUEFEN(SAPFV45P). The number
of parameters (1) is not the same as the number of parameters in the
first use of this form (0).
‎2007 Jun 04 5:18 PM
Hi,
The Perform statement syntax:
PERFORM <subr>
| <subr>(<prog>) [IF FOUND]
|(<fsubr>)[IN PROGRAM (<fprog>)][IF FOUND]
[USING ... <pi>... ]
[CHANGING... <pi>... ]
[ON COMMIT].
Calls an internal or external subroutine <subr> or the subroutine whose name occurs in the <fsubr> field. The external program is <prog> or the name contained in <fprog>. The IF FOUND addition prevents a runtime error from occurring if the subroutine does not exist. The USING and CHANGING additions fill the subroutines parameter interface. The ON COMMIT addition delays the execution of the subroutine until the next COMMIT WORK statement.
Ex:
PROGRAM DEMO.
TABLES SBOOK.
SBOOK-FLDATE = SY-DATUM.
PERFORM FORM1(MYFORMS1).
and two other programs:
PROGRAM MYFORMS1.
FORM FORM1.
PERFORM FORM2(MYFORMS2).
ENDFORM.
and
PROGRAM MYFORMS2.
FORM FORM2.
DATA NAME(20) VALUE 'SBOOK-FLDATE'.
FIELD-SYMBOLS <FS>.
ASSIGN (NAME) TO <FS>.
IF SY-SUBRC EQ 0.
WRITE / <FS>.
ENDIF.
ENDFORM.
The output is:
02.06.1998
Regards,
Bhaskar