cancel
Showing results for 
Search instead for 
Did you mean: 

perform in SAP script

Former Member
0 Kudos

how should i call a perform statement in SAP script

I have been trying to use it in sap script but it is giving me a dump

the code extract looks as follows:

iN DRIVER'S PROGRAM

FORM POP_ADD USING V_parvw like vbpa-parvw.

READ TABLE i_addr WITH KEY WF_PARVW = 'WE'.

ENDFORM.

IN SAP SCRIPT

/: DEFINE &V_PARVW& = &VBPA-PARVW&

/: PERFORM POP_ADD IN PROGRAM ZSD_SCR_INVOICE

/: USING &V_PARVW&

/: ENDPERFORM

/ &i_addr-WF_PARVW&

/

IT IS GIVING SHORT DUMP SAYING

In a subroutine call, there were more parameters than in the

routine definition.

Error in ABAP application program.

The current ABAP program "ZSD_SCR_INVOICE " had to be terminated because one of

the

statements could not be executed.

This is probably due to an error in the ABAP program.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

The PERFORM in your program should have the following syntax:


FORM POP_ADD TABLES IN_TAB  STRUCTURE ITCSY 
                    OUT_TAB STRUCTURE ITCSY.

READ TABLE in_tab WITH KEY 'V_PARVW'.
CHECK sy-subrc EQ 0.
...
ENDFORM.

Take a look at http://www.sapfans.com/forums/viewtopic.php?t=131082&highlight=perform for an example of the required syntax.

Hope this helps.

Regards

jack_graus2
Active Contributor
0 Kudos

This is perfectly explained in the SAP help:

http://help.sap.com/saphelp_470/helpdata/EN/d1/803279454211d189710000e8322d00/content.htm

In the ABAP form you need to decalre 2 TABLES parameters that tranfer your input and output parameters between the SAPscript and the ABAP:

FORM GET_BARCODE

TABLES

IN_PAR STUCTURE ITCSY

OUT_PAR STRUCTURE ITCSY.

Best regards Jack