‎2006 Mar 07 4:10 PM
Hi all,
Can anyone explain me how do we pass an internal table without header line to subroutine ?
*********************************************************
REPORT Z_PERFORM_VALUE.
tables : sflight.
types : begin of line,
carrid like sflight-carrid,
connid like sflight-connid,
fldate like sflight-fldate,
end of line.
data : itab type standard table of line with default key.
data : wa type line.
wa-carrid = 'AA'.
wa-connid = '17'.
wa-fldate = sy-datum.
append wa to itab.
clear wa.
wa-carrid = 'AB'.
wa-connid = '18'.
wa-fldate = sy-datum + 1.
append wa to itab.
clear wa.
wa-carrid = 'AC'.
wa-connid = '19'.
wa-fldate = sy-datum + 2.
append wa to itab.
clear wa.
perform display tables itab .
----
Form display
----
FORM display TABLES P_ITAB STRUCTURE line.
ENDFORM. " display
*********************************************************
This is the program I am trying to develop. When I check for syntax this is error I get.
<b>Program Z_PERFORM_VALUE
In PERFORM or CALL FUNCTION "DISPLAY", the the actual parameter "ITAB"
is too short for the formal parameter "P_ITAB".</b>
Can anyone explain me what this error meant ?
Regards,
Varun.
‎2006 Mar 07 4:14 PM
Hi
modify your code like below...
----
Form display
----
FORM display TABLES P_ITAB STRUCTURE ITAB.
ENDFORM. " display
‎2006 Mar 07 4:14 PM
Hi
modify your code like below...
----
Form display
----
FORM display TABLES P_ITAB STRUCTURE ITAB.
ENDFORM. " display
‎2006 Mar 07 4:16 PM
Pl use
FORM display TABLES P_ITAB LIKE ITAB.
Regards,
Suresh Datti
‎2006 Mar 07 4:17 PM
FORM display TABLES P_ITAB STRUCTURE <b>ITAB</b>.
ENDFORM. " displayregards
vijay
‎2006 Mar 07 4:20 PM
Hi all,
Sorry all guys. All of you have mentioned the same answer but it still gives an error :
<b>Program Z_PERFORM_VALUE
Parameter "P_ITAB" STRUCTURE "ITAB" - field "ITAB" is not a structure.</b>
It came right when I give wa there in the place of itab.
Regards,
Varun.
‎2006 Mar 07 4:20 PM
Hi Varun,
Declare your perform as below.
<b>FORM display TABLES P_ITAB.</b>
ENDFORM. " display
‎2006 Mar 07 4:20 PM
Hi varun,
if the problem still persists you can just use..
perform display changing itab .
modify itab.
FORM display changing P_ITAB .
ENDFORM. " displayregards
satesh
‎2006 Mar 07 4:25 PM
Hi all,
By chance all of you gave the same answer. But it still gives you an error if you give it as itab.
<b>Error Details :
Program Z_PERFORM_VALUE
Parameter "P_ITAB" STRUCTURE "ITAB" - field "ITAB" is not a structure.</b>
It would be correct if you give wa in th place of itab.It worked for me.
Thank you all my friends for sparing time and helping me solve my problem.How do I assign points now ?
Sorry for the duplicate post. There's a problem with my internet connection. Please forgive me.
Regards,
Varun.
Message was edited by: varun sonu
‎2006 Mar 07 4:31 PM
Hi Varun,
to assign points just click on the radio button the left of each post..
regards
satesh
‎2006 Mar 07 4:30 PM
hi
In the form definition you need to paas the table name after structure(instead of the type -line)
Regards,
Richa