This website is not affiliated with, sponsored by, or approved by SAP AG.

how to declare a internal table in smartform...

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

how to declare a internal table in smartform...

Postby pali » Tue Oct 22, 2002 9:01 am

hi..
in the application program i m using a internal table like

DATA : begin of wa_table ,
ersda LIKE mara-ersda,
ernam LIKE mara-ernam,
end of wa_table.
DATA : i_table LIKE TABLE OF wa_table.


Can you help me that how to declare this internal table in smartforms 'FORM INTERFACE' and what should be the reference type for that.

Thanks
Pali
pali
 

internal tables in smartforms

Postby deepak » Tue Oct 22, 2002 9:55 am

Dear pali,

type the following code:

types:begin of itab,
name1 like table-name1,
name2 like table-name2,
....
end of itab.

types: i_tab type standard table of itab.


regards
deepak manjunath
deepak
 

Postby pploo » Tue Oct 22, 2002 10:12 am

2 Alternatives:
:wink:
1) as deepak's method:
Declare a table type in Tab - 'Types'. Declare an internal table in Tab - 'Data' using that type.

2) Define a table type in data dictionary then use it.
pploo
 
Posts: 152
Joined: Mon Oct 21, 2002 12:35 am
Location: Shanghai, China

Internal table in Smartforms

Postby Prakash » Wed Oct 23, 2002 11:13 pm

Dear Deepak
What is the next step after declaring the type in Glabal definitions? How does one declare the internal table in the Form interface? Creating a structure in the data dictionary is an easy way out. Can you offer further explanation please?
Thanks
Prakash
 
Posts: 29
Joined: Wed Oct 23, 2002 10:57 pm
Location: Bangalore

Postby Guest » Mon Oct 28, 2002 10:17 am

haha

the biggest mistake - bug of smartforms: no itabs (unless you define them in the data dictionary) are to be uploaded in sap if they are not data-dictionary alike.

you can't define an internal table (by types) in the form interface.

you have to do this in the global definitions (and then you've already passed the upload/download from/to the printprogram).

it's quite an anoying bug.

Select data in printprgram

sent data (as an itab with the same structure as a data dictionary table) to the form, define your itab in global definitions through the types statement,

insert program lines to fill your itab and display it.


good luck


funny how the smart sap-guys didn't think of that problem...
Guest
 


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 3 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.