Skip to Content
author's profile photo Former Member
Former Member

work area

i have declaerd an internalo table

what is the syntax to declare work area

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

11 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 06:46 AM

    Hi,

    data: itab like mara occurs 0 with header line,"internal table

    wa_mara like itab. "work area

    Regards

    Edited by: K.P.N on Jan 9, 2008 7:46 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 06:48 AM

    Hi,

    data workarea type <the structure you used to declare itab>

    With regards

    Madhu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 06:53 AM

    Hi,

    Please find sample code for reference

    1.

    Types:

    BEGIN OF ty_header,

    fname type char15,

    lname type char15,

    END OF ty_header.

    DATA: lt_header type STANDARD TABLE OF ty_header, "Table Declaration

    ls_header TYPE ty_header. "Work Area Declaration

    2.

    If you are using table directly instead of creating a structure then use below declaration

    DATA: ls_header TYPE <TABLE_NAME>.

    Regards,

    Farheen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 06:53 AM

    Hi,

    Data : wa like itab.

    Don't use Occurs 0 or with header line statements while defining wa.

    Thanks,

    Sriram Ponna.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 06:54 AM

    Hi Das,

    Here is a sample code 4 u check in once..

    data: begin of itab occurs 0,

    vbeln like vbak-vbeln,

    erdat like vbak-erdat,

    end of itab.

    data: wa like itab.

    OR

    data: wa like line of itab.

    Award points if helpful.

    Kiran Kumar.G

    Have a Nice Day..

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 06:56 AM

    Hi,

    data: itab type table of SPFLI.

    wa like line of itab.

    data: itab type table of SPFLI.

    wa type SPFLI.

    data: wa type SPFLI.

    itab like table of SPFLI.

    regards,

    vasavi.reward if helpful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 06:56 AM

    HI

    so u have internal table then with simple syntax u can declare work area

    i.e.

    data:

    fs_wa like line of it_tab.

    then it will automatically declares a work area for the internal table that u have

    plzz reward if u found it is usefull to u...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 07:15 AM

    Hi,

    this is an internal table

    BEGIN OF t_vsart OCCURS 0,

    vsart TYPE vttk-vsart,

    END OF t_vsart,

    BEGIN OF t_vbuk OCCURS 0,

    vbeln TYPE vbuk-vbeln,

    trsta TYPE vbuk-trsta,

    END OF t_vbuk,

    if u wanna declare a work area for this table.. use this

    w_vsart like line of t_vsart.

    Instead line of u can use someother relevant keyword based on ur needs.

    Regards,

    Ari

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 09:35 AM

    Hi dear,

    If u declare the internal table as it_Sample

    For tht declare the workarea as follows:

    • Before creating an internal table u hav 2 write

    structure(x_Sample) or u hav 2 use table ok

    Data: it_Sample type standard table of x_Sample (or)

    table name initial size 0. //For internal table

    wa_Sample type x_Sample(or)table name.

    Regards

    AshokChowdhary

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 11:14 AM

    Hi,

    Structure:

    types: Begin of t_tab,

    lifnr type lifnr,

    land1 type land1,

    name1 type name1,

    End of t_tab.

    Internal table:

    Data: it_tab type standard table of t_tab.

    Workarea:

    Data: wa_tab type t_tab.

    Rgds

    Kumar..

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.