on 05-12-2009 3:16 PM
Hi ABAPERS,
I have been trying to call a subroutine in a SAPScript form but I keep getting a shprt dump saying the above and A PERFORM was used to call the routine "GET_AGEING_ZAP13" of the program
"ZOPEN_AGEING".
The current call contains 4 actual parameter(s),
but the routine "GET_AGEING_ZAP13" expects 5 parameters.
Here are details of the interface:
In the SAPScript:
PERFORM GET_AGEING_ZAP13 IN PROGRAM ZOPEN_AGEING
USING &BSID-KUNNR&
USING &KNA1-KTOKD&
USING &BSID-BUKRS&
USING &RF140-DATU1&
USING &BSID-WAERS&
In program ZOPEN_AGEING I have:
form get_ageing_zap13 using cust type kna1-kunnr
acctgrp type kna1-ktokd
ccode like bapi3007_1-comp_code
keydate like rf140-datu1
curr LIKE bapi3007_2-currency.
Please assist,
Thanx in advance
Moderator message - Moved to the correct forum
Total Posts: 68
Total Questions: 32 (19 unresolved)
You might want to consider closing your old posts as well
Edited by: Rob Burbank on May 12, 2009 1:53 PM
HI,
In program ZOPEN_AGEING you need to have form implementation as below..
for more help check link:
FORM get_ageing_zap13 TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
ENDFORM.
Check this link...http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure you have "/:" in the first column of all of the USINGs in the SAPScript.
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
The way u use to call the perform is SAPscript:
PERFORM GET_AGEING_ZAP13 IN PROGRAM ZOPEN_AGEING
USING &BSID-KUNNR&
USING &KNA1-KTOKD&
USING &BSID-BUKRS&
USING &RF140-DATU1&
USING &BSID-WAERS&
CHANGING &BSID-BUDAT&
is right.
But it's wrong the interface of the form GET_AGEING_ZAP13, the form to be called in a sapscript has to have always the same interface, two table one for input and one for output based on structure ITCSY, like this:
FORM GET_AGEING_ZAP13 TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
ENDFORM.
In IN_TAB thera are the USING parameters, in OUT_TAB there are the CHANGING parameters.
A code u can use in your form could be:
FORM GET_AGEING_ZAP13 TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
DATA: KUNNR TYPE BSID-KUNNR,
KTOKD TYPE KNA1-KTOKD,
BUKRS TYPE BSID-BUKRS,
DATU1 TYPE RF140-DATU1,
WAERS TYPE BSID-WAERS.
READ TABLE IN_TAB WITH KEY NAME = 'BSID-KUNNR'.
IF SY-SUBRC = 0.
MOVE IN_TAB-VALUE TO KUNNR.
ENDIF.
READ TABLE IN_TAB WITH KEY NAME = 'KNA1-KTOKD'.
IF SY-SUBRC = 0.
MOVE IN_TAB-VALUE TO KTOKD.
ENDIF.
READ TABLE IN_TAB WITH KEY NAME = 'BSID-BUKRS'.
IF SY-SUBRC = 0.
MOVE IN_TAB-VALUE TO BUKRS.
ENDIF.
............................
READ TABLE OUT_TAB WITH KEY NAME = 'BSID-BUDAT'.
IF SY-SUBRC = 0.
IF KUNNR = ..... OR BUKRS = .....
WRITE SY-DATUM TO OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX SY-TABIX.
ENDIF.
ENDIF.
ENDFORM.
Max
Why are you using the & to enclose the variables? Have you tried without them?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.