Skip to Content
avatar image
Former Member

internal tables in smartforms

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    May 01, 2009 at 05:36 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    May 01, 2009 at 06:37 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 01, 2009 at 07:08 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 01, 2009 at 05:05 AM

    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'.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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