cancel
Showing results for 
Search instead for 
Did you mean: 

Perform call in SAP script

Former Member
0 Kudos

Hi All ,

I am using a perform call in my SAP script.

The following is the call.

PERFORM FETCH_ADDRRESS IN PROGRAM ZCREDIT_MEMO

USING T001-BUKRS

ENDPERFORM

and the program ZCREDIT_MEMO is like this.

REPORT ZCREDIT_MEMO.

DATA : IT_T001 LIKE TABLE OF T001." OCCURS 0.

FORM FETCH_ADDRRESS USING COMAPNY_CODE .

Select * from T001 into corresponding fields of table it_t001 where BUKRS = COMAPNY_CODE.

DATA : CODE_TEMP LIKE SY-TABIX.

CODE_TEMP = 4.

ENDFORM.

When I am using this through F.62 the short dump is created and the error is due to parameters mismatch.

The more parameters are passed this error is thrown. Please sugggest the error in the code.

Thank You,

Regards,

Anuj Saraswat

<MOVED BY MODERATOR TO THE CORRECT FORUM>

Edited by: Alvaro Tejada Galindo on Aug 25, 2008 3:24 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184551
Contributor
0 Kudos

Hi Anuj

When you write subroutines in scripts you ve to adhere to certain standards.

You can use Perform Statment and send that to the driver program.

In script

/ : PERFORM send_pageno IN PROGRAM <prog>
/: USING &PAGE&
 
/: ENDPERFORM.

In driver program <prog> define the FORM as shown below..

DATA:
   Pageno type i.
 
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
 
READ TABLE IN_TAB WITH KEY u2018PAGEu2019
CHECK SY-SUBRC = 0.
pageno = in_tab-value.
 
ENDFORM.

Check this link for HELP on PERFORM if necessary

http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm

Hope this would solve your issue.

Good luck

Sameer

Former Member
0 Kudos

This is a Duplicate of your Thread: