Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Subroutine - Internal table without header line.

Former Member
0 Likes
1,188

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.

1 ACCEPTED SOLUTION
Read only

venkata_ramisetti
Active Contributor
0 Likes
947

Hi

modify your code like below...

----


  • Form display

----


FORM display TABLES P_ITAB STRUCTURE ITAB.

ENDFORM. " display

9 REPLIES 9
Read only

venkata_ramisetti
Active Contributor
0 Likes
948

Hi

modify your code like below...

----


  • Form display

----


FORM display TABLES P_ITAB STRUCTURE ITAB.

ENDFORM. " display

Read only

0 Likes
947

Pl use

FORM display TABLES P_ITAB LIKE ITAB.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
947
FORM display TABLES P_ITAB STRUCTURE <b>ITAB</b>.

ENDFORM. " display

regards

vijay

Read only

0 Likes
947

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.

Read only

Former Member
0 Likes
947

Hi Varun,

Declare your perform as below.

<b>FORM display TABLES P_ITAB.</b>

ENDFORM. " display

Read only

Former Member
0 Likes
947

Hi varun,

if the problem still persists you can just use..

perform display changing itab .
  modify itab.
 FORM display changing P_ITAB .

 ENDFORM. " display

regards

satesh

Read only

0 Likes
947

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

Read only

0 Likes
947

Hi Varun,

to assign points just click on the radio button the left of each post..

regards

satesh

Read only

Former Member
0 Likes
947

hi

In the form definition you need to paas the table name after structure(instead of the type -line)

Regards,

Richa