Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

insetion of a empty record to internal table

Former Member
0 Kudos

Hi All,

I have a requirement where we have to display the field names in the output and upon clicking a push button we have to display an empty record in the same screen below for input.

How can i achieve this how can i design the layout.

Thanks in Advance,

Badri

7 REPLIES 7

Former Member
0 Kudos

HI,

for appending initial lines you can write

Append wa initial lines to itab.

hope it will work.

regards,

Lokesh

Former Member
0 Kudos

Hi...

First assign any default value if you want to show in blank record like 0 etc to all the fields of work area....

then append that work area to you internal table..

hope this will helpful.

Regards,

Chintan.

Former Member
0 Kudos

Hi,

Use table control with wizard in module pool programming. It will have all the functionalities what you are expecting.

Thanks and regards,

Venkat

sridhar_meesala
Active Contributor
0 Kudos

Hi,

In order to append an empty record to internal table you can use

Append initial line to <itab>.

Hope this helps you.

Thanks,

Sri...

Former Member
0 Kudos

Hello Friends ,

Thanks for the answers,

Actually i have the requiremnet in webdynpro application ,where in my layout i have a table whose rows are been invisble now i have the table with only header.

Now if i press a push button in the layout an empty row has to be added to the table.This is my req.

Can anybody help me.

Thanks,

BADRI.

0 Kudos

Hi Badri,

You can proceed as follows.

Your TABLE UI element will be bound to a context say List.

Now assign a method add_empty_row to the button BTN_ADD.

Implement the add_empty_row method as follows:

method add_empty_row.

DATA: LR_ND_LIST TYPE REF TO IF_WD_CONTEXT_NODE.

DATA: LR_EL_LIST TYPE REF TO IF_WD_CONTEXT_ELEMENT.

DATA: LT_LIST TYPE WD_THIS->ELEMENTS_LIST.

DATA: LS_LIST TYPE WD_THIS->ELEMENT_LIST.

DATA: LT_EL_LIST TYPE WDR_CONTEXT_ELEMENT_SET.

LR_ND_LIST = WD_CONTEXT->GET_CHILD_NODE( name = wd_this->wdctx_list ).

LT_EL_LIST = LR_ND_LIST->GET_ELEMENTS( ).

LOOP AT LT_EL_LIST INTO LR_EL_LIST.

LR_EL_LIST->GET_STATIC_ATTRIBUTES(

IMPORTING

STATIC_ATTRIBUTES = LS_LIST ).

APPEND LS_LIST TO LT_LIST.

ENDLOOP.

CLEAR LS_LIST.

APPEND LS_LIST TO LT_LIST.

LR_ND_LIST->BIND_TABLE( LT_LIST ).

endmethod.

Thanks,

Abhishek

Former Member
0 Kudos

thanks very much