on 04-16-2008 11:47 AM
Hi,
I have creted a simple sapscript example which contains 3 windows: main, data and header. Data window displays current date, header some information like address,etc and in main I have declared an element called MAIN_ELEMENT and 4 lines:
- &USR02-BNAME&
- &USR02-ANAME&
- &USR02-ERDAT&
- &USR02-LOCNT&
I want to output that columns (BNAME,ANAME,ERDAT,LOCNT) from USR02 table. How to do that??
Please someone help me.
Thank you!
hi,
after creating the layout, u create a driver program in se38.
1.create an internal table with those 4 fields.
2.write a select statement to fetch the data into the internal table.
3. call open_form function module. for this pass the form name i.e, ur script name. also pass the language as 'en'.
4.call write_form function module. for this pass the window name i.e, main. n also pass the text element name i.e element parameter, give ur text element name (main_element),
5.call the close_form function module. no need to pass any parameters for thid.
write all in upper case while passing to function module.
hope this help u.
reward if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do the following :
1. Create a driver program. Inside it assign values to
- &USR02-BNAME&
- &USR02-ANAME&
- &USR02-ERDAT&
- &USR02-LOCNT&
based on the number of records. Run a loop if there are more than 1 records and fill the table USR02. Now call open_form function module and then write_form function module. pass the parameters in write_form :
Window - name of the window where u want to display these records, in your case main window.
Text Element - name of your text element MAIN_ELEMENT
now call close_form.
2. Get the configuration done between your script and the program, depending on the module u r working in. It may be done in NACE or SPRO or may be some other transaction.
Reply if this info is useful for you..
All the best!
Navita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1.write a driver program for those values.
2.Call this layout in that.
3.OR write form routine and call it in layout using ITCSY.
4.But, In this situation you need to write the driver program with selecting all fields ,which u are mentioned from usr02.
just see this:
for SAPscripts
For follg., refer http://www.henrikfrank.dk/abapuk.html
Regards,
Kumar(Reward if helpful).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.