Application Development and Automation 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: 
Read only

LOOP AT SCREEN IN WA

Former Member
0 Likes
1,644

Hi experts..
Am just a beginner in SAP ABAP.

am having a screen 1000,containing two fields (for eg. Name and Age).

finally am updating Table from screen fields.Currently am doing like this.

wa-name = zdb-name.

wa-age   = zdb-age.

where zdb-name and zdb-age are the name of screen fields.

after matching them to work area i use insert statement.

is there any other way to do without these matching??

like,

loop at screen into wa.

endloop.

(now i should get all the values in wa?)

Thanks.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,337

Don't use 1000 for a dynpro you create, this is the default value for selection-screen and can misleading.

To simplify (remove) mapping of data, the key statement is TABLES, declare your database or a structure in your top include (e.g; TABLES: zdb.) in your dynpro use name lile zdb-field to identify fields (also check the "From dict" box, there is an icon in screen painter to display list of fields "Dictionary/Program Fields Windows" and copy/paste them in the dynpro) now use the interface work area ztb in report.

Regards,

Raymond

Hi experts..
Am just a beginner in SAP ABAP.

am having a screen 1000,containing two fields (for eg. Name and Age).

finally am updating Table from screen fields.Currently am doing like this.

wa-name = zdb-name.

wa-age   = zdb-age.

where zdb-name and zdb-age are the name of screen fields.

after matching them to work area i use insert statement.

is there any other way to do without these matching??

like,

loop at screen into wa.

endloop.

(now i should get all the values in wa?)

Thanks.

10 REPLIES 10
Read only

FredericGirod
Active Contributor
0 Likes
1,337

Hi,

you make a "LOOP AT SCREEN" on a selection-screen generated by SAP ??

to populate data ??

Fred

Read only

0 Likes
1,337

NO,actually when i enter data in my screen and finally hit 'SAVE' to save it on DB table,am matching screen fields to a work area and then insert to DB table.
is there any way to do this without matching screen fields to work area,bcoz i have many screen fields.

Read only

0 Likes
1,337

Hello.

Name the screen fields as wa-name and the insert using wa structure. No need of match them and then insert.

Regards

Read only

0 Likes
1,337

No,for my purpose i have named from Dictionary(DB table),and i have to get values from screen field into wa.

Read only

0 Likes
1,337

Askar,

It is not possible to get all values into a work area from screen table.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,338

Don't use 1000 for a dynpro you create, this is the default value for selection-screen and can misleading.

To simplify (remove) mapping of data, the key statement is TABLES, declare your database or a structure in your top include (e.g; TABLES: zdb.) in your dynpro use name lile zdb-field to identify fields (also check the "From dict" box, there is an icon in screen painter to display list of fields "Dictionary/Program Fields Windows" and copy/paste them in the dynpro) now use the interface work area ztb in report.

Regards,

Raymond

Read only

0 Likes
1,337

Thanks a lot..
really informative..
i have used many screen as '1000'.i will correct it.
actually i have done the way u said.

declared tables:zdb.

and in screen field have done like this, zdb-field1,zdb-field2,zdb-field3.


now i have to get the data of screen fields into workarea,now am matching like this,

wa-field1 = zdb-field1.

is there any other way??
Thankyou.

ASKAR

Read only

0 Likes
1,337

move-corresponding zbd to wa.

Regards

Read only

0 Likes
1,337

Hi,

Declare Your Screen Fields with the same name as your DB Table...

and Simply Use Insert Statement..

Regards,

Venu...

Read only

0 Likes
1,337

Thanks it worked...!!