04-19-2008 11:28 AM
Hi Experts
I am a BW guy and i am new to ABAP and i need your help to solve my problem.
I have created a table for master data(zemp_data) in R/3 se11..which has fields like zempid,zempname,zmgrid,zdeptid,zdeptname and i have created the respective fields in screen painter too but my problem is i dont know how to link this fields in the screen painter to the fields in table .to be more clear i want the flow logic or module pool code to link this table when i give an entry in the screen painter for the respective fields..i will really appreciate your answers and award the maximum points for the usefull answer ..as i dont know ABAP much if it is a step by step approach ..that would be helpfull
Regards,
RK.
04-19-2008 11:53 AM
In flow logic uncomment the statements(4 lines).
In PAI event double click usercommand.It will go to program.
use case.
case sy-ucomm.
when 'save'.(function code given for push button)
tablename-fieldname = name of text field in screen painter.
(similarly for other fields)
Insert tablename.
It will get updated in the database.
Check it out.
reward points if useful
04-19-2008 12:10 PM
Hi,
have a look at this:
http://www.sapmaterial.com/files/intro_to_dialog_prg.pdf
and this:
http://www.saptechnical.com/Tutorials/ABAP/ScreenPainter/Page1.htm
http://www.saptechnical.com/Tutorials/ABAP/ScreenPainter/Page2.htm
there are many samples available if you look for them in any browser.
Best regards.
Edited by: pablo casamayor on Apr 20, 2008 11:54 PM
04-19-2008 12:54 PM
Hi Karthik,
Please consider the following
In the screen...the fields must be from the database table in Se11..(in screen painter -> use.."get from Dictionary" -> enter the table name -> select the fields -> drag and drop on the screen) or must have the same name in the database table..This will be a link but unless you code to fetch values from database or update values to database there will be no action taking place
Usually in the PBO(process befor output) we write the code to display values before we accept data from the user ie,set default values on the screen if required and prepare the screen for user input
in the PAI of the screen painter we can do data processing ie, data validations,checks and saving based on what the user wants
So imagine you have buttons placed on the screen and there are buttons from standard application bar like BACK,SAVE, set using PFstatus..all the user actions will be linked to a function cod..ie whenever user presses a button we can uniquely idntify what was pressed by assigning a function code to each button in the menu painter or PF status and do the action accordingly
Assume that you have created a push button on the screen painter and assigned it a function code "PUSH"
so whenever you press the button in the variable sy-ucomm "PUSH" will be captured..this you can check in PAI for the screen like
Case sy-ucomm.
when 'PUSH'.
do the needful coding
when 'SAVE'
Modify database table
endcase.
you can check the standard demo programs in SE38 -> program name-> display for basic ABAP coding you have asked for
(1)demo_dynpro_input_output .
(2)demo_dynpro_dictionary
(3)demo_dynpro_push_button
Pls let us know if you need more help on the same
Reward if helpful
Regards
Byju
04-19-2008 5:58 PM
Hi
Thanks for your reply.. here my problem i dont have any data in my database table ..i want to fill the data base table for the fields i mentioned that is empid,name ,managerid,dept id etc...using screen painter..
ie in the screen painter if i give the values in the i/o field it should fill the respective field of the db table ...can you be more precise in how to do this?with one example code to fill one field value ?
regards,
Rk