Skip to Content
avatar image
Former Member

How to declare the work area and internal table in smartforms

Hai Friend

I am new of the smartforms, i dont know the how to declare the workarea and internal table in smartforms, already i declared the structure in types, how to call this structure to smartform global defination area , for example

types: begin of t_mara,

matnr type matnr,

meins type meins,

ersda type ersda,

end of t_mara.

already i declared this structure in global defination-> global data-> wa_mara type t_mara, and again i called this wa_mara in global setting->intilization -> i_mara like standard table of wa_mara

in intilization it shows the error.

can u plese send the screen shots for declaration of workarea and internal table declarations.

thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Oct 16, 2008 at 06:10 AM

    Hi

    Please see below example

    In Types tab

    types: begin of ty_kna1,

    kunnr type kunnr,

    name1 type name1,

    land1 type land1,

    end of ty_kna1.

    Types:ty_t_kna1 type standard table of ty_kna1.

    In Global data tab

    ***Internal table declaration

    data:i_kna1 type ty_t_kna1.

    ***Work area declaration

    data:wa_kna1 type ty_kna1.

    Regards,

    Vishwa.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      thank u viswa

      i have one more doubts, now i want to print particular data in smartform, thats mean it shows the output what ever given input between ranges,(select-options) type

  • avatar image
    Former Member
    Oct 16, 2008 at 06:16 AM

    Hi Vijendra,

    You need to declatre the workarea and internal tables in global declaration, in the begining of the smart form. You can find this label on the left hand side column of the smart form.

    There you need to write:

    ********type declaration

    BEGIN OF ty_marc,

    matnr TYPE matnr, " Material

    werks TYPE werks_d, "Plan

    END OF ty_marc.

    • ---------------------------------------------------------------------*

    • Internal Table declarations *

    • ---------------------------------------------------------------------*

    DATA :

    it_marc TYPE STANDARD TABLE OF ty_marc.

    • ---------------------------------------------------------------------*

    • Work area definitions *

    • ---------------------------------------------------------------------*

    wa_marc type ty_marc.

    regards,

    Nikita

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 07:21 AM

    Hi

    In Global defintion --> global data -->

    Just include these within the global data itself

    fs_mara type t_mara,

    t_tab type table of t_mara.

    Regards,

    Sravanthi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 08:43 AM

    thanks

    i have one more doubts, now i want to print particular data in smartform, thats mean it shows the output what ever given input between ranges,(select-options) ty

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kumar,

      u pass what ever given input between ranges,(select-options) to the SSF_Function_Module.

      And in smartform in form attributes tab define the same.. ur data will get transferred from program to Smartform.

      Pranil.

  • avatar image
    Former Member
    Oct 20, 2008 at 10:15 AM

    Hi,

    You can declare the internal table in driver program and delcare that internal table as structure in Form interface(SMARTFORMS)

    or decalre internal table in Global->Initialization

    Add comment
    10|10000 characters needed characters exceeded