2013 Feb 14 11:52 AM
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.
2013 Feb 14 12:22 PM
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.
2013 Feb 14 11:55 AM
Hi,
you make a "LOOP AT SCREEN" on a selection-screen generated by SAP ??
to populate data ??
Fred
2013 Feb 14 12:02 PM
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.
2013 Feb 14 12:23 PM
Hello.
Name the screen fields as wa-name and the insert using wa structure. No need of match them and then insert.
Regards
2013 Feb 14 1:45 PM
No,for my purpose i have named from Dictionary(DB table),and i have to get values from screen field into wa.
2013 Feb 18 4:23 PM
Askar,
It is not possible to get all values into a work area from screen table.
2013 Feb 14 12:22 PM
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
2013 Feb 14 1:40 PM
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
2013 Feb 14 2:00 PM
2013 Feb 14 5:58 PM
Hi,
Declare Your Screen Fields with the same name as your DB Table...
and Simply Use Insert Statement..
Regards,
Venu...
2013 Feb 15 5:39 AM