cancel
Showing results for 
Search instead for 
Did you mean: 

internal tables in smartforms

Former Member
0 Kudos

hi all,

i am using a itab in my printing prog the struct of itab is

DATA : BEGIN OF IT_FTAB , "occurs 0 with header line,

MANDT LIKE SY-MANDT,

PRUEFLOS TYPE QALS-PRUEFLOS, "Inspection Lot Number

MATNR LIKE QALS-MATNR, "Material Number

WERK LIKE QALS-WERK, "Plant

HERKUNFT LIKE QALS-HERKUNFT, "Inspection Lot Origin

CHARG LIKE QALS-CHARG, "Batch Number

"MITTELWERT like QAMR-MITTELWERT,

"MITTELWERT like P DECIMALS 3, "Arithmetic Mean of Valid Measured Values

MITTELWERT(7) TYPE C , "Arithmetic Mean of Valid Measured Values

MERKNR LIKE QAMR-MERKNR, "Inspection Characteristic Number

VORGLFNR LIKE QAMR-VORGLFNR, "Current Node Number from Order Counter APLZL

KURZTEXT LIKE QAMV-KURZTEXT, "Short Text for the Inspection Characteristic

MKVERSION LIKE QAMV-MKVERSION, "Version Number of the Master Inspection Characteristic

VERWMERKM LIKE QAMV-VERWMERKM, "Master Inspection Characteristics

"TOLERANZUN like QPMK-TOLERANZUN,

" TOLERANZOB like QPMK-TOLERANZOB,

TOLERANZUN TYPE P DECIMALS 3, "Lower Tolerance Limit

TOLERANZOB TYPE P DECIMALS 3, "Upper Specification Limit

ZUNZOB TYPE STRING, "combination of UTL and LSL

END OF IT_FTAB.

how should i pass same struct in smartforms.

2. can i declare itab in smartforms with same struct. ( i am tying to do in global defination but it gives error).

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

Create the Table Type for the ITAB using SE11 tcode and use in import Tab of the Form Interface in Smartform.

or

Create the itab as s Structue in SE11 and use in Tables Tab of the Form Interface in Smartform.

Former Member
0 Kudos

Hi avinash,

Still giving same error....

thanks.

Former Member
0 Kudos

Use technical characteristics of those fields to define strucutre in SE11.

Eg.- Matnr type char18

or use their data elements

Edited by: mujib tirandaz on May 1, 2009 7:59 AM

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Flat structures contain only fields of the elementary types C, N, D, T, F, I, P, and X, or structures containing these types.

Flat structures contain only elementary data types with a fixed length (no internal tables, reference types, or strings).

In a flat structure, every field either refers to a data element or is directly assigned a data type, length and possibly decimal places.

Try to change ur field type in your structure.

Regards,

Himanshu

Former Member
0 Kudos

Hello Bhupi

First go in se11 create structure like your internal table you want to pass to smartforms ,

pass that internal table to smartforms , defined that internal table in your smartforms in form -interface tab , then you can use that internal table in your smartforms with all data in internal table.

Hope this will help you.

Regards

Shrikant

Former Member
0 Kudos

Create a structure in SE11--->data type.

Enter all ur required fields in that structure.

Declare the internal table required in smartform with this structure using 'LIKE'.

Former Member
0 Kudos

hi,

i tried also like this but it gives error ( Zstruct_mtr must be a flat structure. you can not use internal table, string, references or structure as a componenet.)

thanks