Populating data in AVL
Hi Friends,
I am having data in the final internal table and displaying in the table control, user wants to print the data available in the table control, I tried for the print option cannot get it. I am planning to use the ALV for printing purpose. when I am trying to send my final internal table data to the function
'REUSE_ALV_FIELDCATALOG_MERGE' it is not populating can any one send me the sample code for this function module. I am using table types in declaration.
Thanx in advance,
Line
Refer the following code:
report z_test_palv .
tables : mara.
select-options: s_matnr for mara-matnr.
type-pools: slis.
data: begin of itab occurs 0,
matnr like mara-matnr,
ernam like mara-ernam,
ersda like mara-ersda,
labor like mara-labor,
end of itab.
data: i_fieldcat type slis_t_fieldcat_alv,
xevents type slis_t_event,
ls_event type slis_alv_event,
slis_ev_top type slis_formname value 'TOP_OF_PAGE'.
data: v_repid like sy-repid.
start-of-selection.
v_repid = sy-repid.
select matnr ernam ersda labor
into table itab
from mara
where matnr in s_matnr.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = xevents
exceptions
list_type_wrong = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
read table xevents with key name = slis_ev_top
into ls_event.
if sy-subrc = 0.
move slis_ev_top to ls_event-form.
append ls_event to xevents.
endif.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = v_repid
i_internal_tabname = 'ITAB'
* I_STRUCTURE_NAME =
* I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = v_repid
i_bypassing_buffer = 'X'
i_buffer_active = ' '
changing
ct_fieldcat = i_fieldcat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
* I_INTERFACE_CHECK = ' '
i_bypassing_buffer = 'X'
i_buffer_active = ' '
i_callback_program = v_repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_STRUCTURE_NAME =
* IS_LAYOUT =
it_fieldcat = i_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
* IS_VARIANT =
it_events = xevents
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = itab
exceptions
program_error = 1
others = 2
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
*& Form top_of_page
* text
form top_of_page.
write:/ 'Top of page event triggered.
WRITE:/ This report gives the material details'.
endform. "top_of_page
Similar Messages
-
Need help in Populating data in to new fields using BDT
Hi all,
in BDT,
i have created a VIEW and attached it to a subscreen,
i am able to see the the fields and have problem in populating data into the fields,
In the BEFORE OUTPUT FM, i am populating data into the screens, but its not available in the screen,
Please help me in this.
Thanks and regards,
Sumanth.Hi,
Use managedBean scope as pageFlowScope and try
See
http://tanveeroracle.blogspot.com/2011/02/pageflowscope-variables.html -
F4 help for custom table field - to be used when populating data thru SM30
Hi,
I have a custom table with 5 fields - say A, B, C, D and E. While populating data to the table through SM30, I need to create a F4 help for the field C. A custom function module needs to be used.
I have created a module for the same in the event PROCESS ON VALUE-REQUEST of the function group of the table.
But the F4 for field C depends on the values put in fields A and B.
I am not able to get the values of fields A and B from within the module PROCESS ON VALUE-REQUEST.
Please help me to create the F4 help.hii,
This is the piece of code i have used in one of my SM30 to get f4. mopdify according to ur need and use.
revert back for further help.
w_dynpread-fieldname = 'ZSITEDCDATA-SITE'.
APPEND w_dynpread TO i_dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = 'SAPLZSITEDCDATA'
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = i_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE i_dynpread INTO w_dynpread INDEX 1.
IF sy-subrc IS INITIAL.
SELECT land1 FROM t001w
INTO TABLE i_site
WHERE werks EQ w_dynpread-fieldvalue.
IF i_site[] IS NOT INITIAL.
DATA: lv_line TYPE i.
CLEAR lv_line.
DESCRIBE TABLE i_site LINES lv_line.
IF lv_line GT 1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZSITEDCDATA-SITE_COUNTRY'
dynpprog = 'SAPLZSITEDCDATA'
dynpnr = sy-dynnr
window_title = 'Site Country'
value_org = 'S'
TABLES
value_tab = i_site[]
return_tab = i_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
READ TABLE i_return INTO w_return INDEX 1.
IF sy-subrc IS INITIAL.
zsitedcdata-site_country = w_return-fieldval.
ENDIF.
ENDIF.
Thanks ,
Gaurav -
Restricted key figure not populating data
Hi Guru's,
I am facing problem with restricted keyfigure. I have restricted amount with cal year which is not populating data.
This key figure is having data in provider.
Could you let me know how to overcome this .
Thanks in advance.
Thanks,
Vijay.Hi,
The quesry is on Multiprovider? or infoset? it matters first..... or directly on cube? check it and apply relevent infoprovider properties for logic check.
Check the global filters are there any infoprovider restrications etc...
And also while checking the datafor the KF in infoprovide " use ALL the restrictions that are in query and impact the data"
also try removing the restiction and look for data...
Hope this helps.' -
Urgent--error in populating data in segments of Idoc-DELVRY03
Hi experts,
I am populating data in segments of DELVRY03 where I am using process code DELV with Message Type SHPORD.
For this I am using EXIT_SAPLV56K_002.
As I have to populate many segments I am giving case statement. But IDOC_DATA-SEGNAM is empty.
Please help me with this issue as I am running out of time.
Waiting for replies.
ThanksHi,
Loop at IDOC_DATA.
thanks -
Want JTree e.g. of populating data from database.
I want ur JTree example of populating data from database, can u plz give me that eg.?
Awaiting 4 ur reply.Hi,
AFAIK, there is no direct approach to populate a JTree directly from a resultset. However, JTree can use a DOM tree as its model by using the adapter pattern. The procedure to do this is well-documented in the SUN website and the link is provided below. The code to convert a resultset to XML is provided below:
protected void resultSetToXML(OutputStream out,
ResultSet rs,
String stylesheet)
throws IOException, ServletException {
// Create reader and source objects
SqlXMLReader sxreader = new SqlXMLReader();
SqlInputSource sis = new SqlInputSource(rs);
// Create SAX source and StreamResult for transform
SAXSource source = new SAXSource(sxreader, sis);
StreamResult result = new StreamResult(out);
// Perform XSLT transform to get results. If "stylesheet"
// is NULL, then use identity transform. Otherwise, parse
// stylesheet and build transformer for it.
try {
// Create XSLT transformer
TransformerFactory tf = TransformerFactory.newInstance();
Transformer t;
if (stylesheet == null) {
t = tf.newTransformer();
} else {
// Read XSL stylesheet from app archive and wrap it as
// a StreamSource. Then use it to construct a transformer.
InputStream xslstream = _config.getServletContext().
getResourceAsStream(stylesheet);
StreamSource xslsource = new StreamSource(xslstream);
t = tf.newTransformer(xslsource);
// Do transform
t.transform(source, result);
} catch (TransformerException tx) {
throw new ServletException(tx);
The classes SQLXMLReader and other classes used in this example are available in the following java packages.
import java.sql.*;
import javax.sql.DataSource;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.sax.*;
import javax.xml.transform.stream.*;
import org.w3c.dom.*;
import org.xml.sax.*;
import org.xml.sax.helpers.AttributesImpl;
The following is the link that explains how to load a JTree from DOM.
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM6.html
Cheers,
vidyut -
Categories tab in app store is not populating data
Dears,
I have a problem in my Iphone OS 3.1.3 as the Categories tab in app store is not populating data and coming blank.
it was working fine before and suddenly stopped, although I restore to original setting 2 times and still not working.
Appreciate your help.Hi, it seems like this but let's wait reply from apple in order to know when will it work again
-
How to delete the populated data in the control screen of XK02 transaction
In the vendor master ( XK01/2/3) "Control screen " we have some user defined fields with data already populated into those fields. Now, the user is asking to delete the data which is already populated for a particular purchaging Organization. How to do that.
Ur help wil be highly appreciated.Hello,
If the data is like after every C5* or C6* there is an underscroll sign (_), then below code will work in start routine:
Data: wa_source_package like line of source_package,
itab_sp type standard table of tys_SC_1,
a(6) type c,
b(10) type c.
loop at source_package into wa_source_package.
split wa_source_package at '_' into a and b.
if strlen( a ) = 7.
append wa_source_package to itab_sp.
endif.
endloop.
refresh source_package.
source_package = itab_sp.
Regards,
Shashank -
Need help in populating data in advanced table in oaf
Dear All,
I have a requirement as below:
I have a custom OAF page, from that i am invoking a popup page and from the popup page i am selecting some rows and populating in my base page advanced table region.
that is fine so next time when i am calling again the popup page and selecting some data and pressing button this time it is again populating properly in base page my requirement is i need to populate the old data that selected as well as new data wht selected, so every time the table refreshed with the data selected rather than keeping old data wht selected, can it be posibel please help me out.
ThnaksHi Vishnu,
in all sapscript for standard sap transaction cases, you can always find the original sap solution abd/or sap sample routines. Start from there and then look at your custom programming.
I can't explain in more detail because you do not give more detail.
Another frequent issue is that the sapscript form is not configure and activated correctly.
Anyway, follow this guide and find the solution ist possible.
Regards,
Clemensl -
How to check which Table & Field is populating Data source
Hi,
My requirment is to check from which Table and Which field the data is extracted in the data source
Data Source : 0MAT_PLANT_ATTR
Field in Data Source : MINBE
Now i want to check from where (Table/Field) in R/3 is populating the Field MINBE in Data source 0MAT_PLANT_ATTR
How can i do thatHi,
Since you have the extract structure and the extractor, you can try Extractor Checker RSA3.Execute ST05 (activating SQL Trace), switch on the trace and execute the extractor checker. Once the extractor checker presents the results
switch off trace. The clcik on Display trace and you will see all the tables that were hit by the extractor checker to retrieve data and present it to you.
Note: Set the break point in the Extractor Function module.
View the ST05 Extended Trace list. The Object name shows the Tables accessed.
Hope this helps.
Thanks,
JituK -
BOM and Routing import is not populating data in base table.
BOM AND ROUTING INTERFACE Import Prog is not populating base table with interface data.Even the Interface table data is not processed.I am passing process flag as 1 and transaction_type as INSERT,still the ROUTING INTERFACE TABLES are not getting processed.
passing the below details.
INSERT INTO bom.bom_op_routings_interface
(organization_code, assembly_item_id, completion_subinventory, routing_sequence_id, organization_id,
routing_type, common_routing_sequence_id, last_update_date, last_updated_by, creation_date,
created_by, last_update_login, alternate_routing_designator, assembly_item_number, process_flag,
transaction_type) ;
INSERT INTO bom.bom_op_sequences_interface
(operation_seq_num, department_id, department_code, option_dependent_flag, operation_lead_time_percent,
implementation_date, effectivity_date, disable_date, count_point_type, backflush_flag, minimum_transfer_quantity,
operation_sequence_id, routing_sequence_id, organization_code, assembly_item_number, last_update_date,
last_updated_by, creation_date, created_by, include_in_rollup, alternate_routing_designator, process_flag,
transaction_type);
INSERT INTO bom.bom_op_resources_interface
(resource_seq_num, resource_code, resource_id, basis_type, usage_rate_or_amount, usage_rate_or_amount_inverse,
assigned_units, schedule_flag, resource_offset_percent, activity, standard_rate_flag, autocharge_type, organization_code, assembly_item_number,
operation_seq_num, effectivity_date, last_update_date, last_updated_by, creation_date, created_by, alternate_routing_designator,
operation_sequence_id, routing_sequence_id, process_flag, transaction_type);
Where am I making a mistake.
Thanks in Advance.
Sambit PradhanHi,
Try following
step 1. Insert routing header (bom_op_routings_interface) : Run Interface
step 2. Insert routing lines (bom_op_sequences_interface) with correct reference to routing_sequence_id: Run Interface
step 3. Insert all resource lines (bom_op_resources_interface) with correct reference to operation_sequence_id, routing_sequence_id , Run Interface.
Thanks,
Hrishi -
Problem populating date dimension with correct values
Hi all,
I have a 'simple' problem, but can't get it solved! The YTD calculations in the cube don't 'reset' at the right moment in time (they should 'reset' on the FISCAL year, but it actually seems to happen on the normal calendar year).
Our dimensions and cubes are MOLAP. There is a relational table, containing columns with values for both a CALendar hierarchy as well as for a FISCAL year hierarchy. This table populates the date dimension (only the fiscal hierarchy as in MOLAP we only have a fiscal hierarchy). The result looks correct in the data viewer.
The cube is populated from relational sources as well. One view provides the measure values and the CODE (business identifiers) values for each dimension involved. In case of the date dimension, it provides the code value for the involved level at which we load the cube (month).
I made a very simple testcase with only 1 dimension (date) and 1 small cube. The cube uses only the date dimesion (to load cube on the fiscal hierarchy at month level) and has 1 base measure that is loaded with a simple number and 1 calculated measure that calculates the YTD value for this base measure. The calculated measure is added in the OWB cube designer using button "Generate Calculated Measures" and choosing the "Year to Date" function.
When populating the cube and using the data viewer to check the results, the YTD measure values don't 'reset' at the fiscal year end. They seem to reset at the normal CALendar year end!?
After some testing, I have concluded it has to do with the values I supply to populate the date dimension, but I can't figure out what the modification should be and I can't find any examples anywhere.
Does anyone out there have a working YTD calculation in MOLAP?
Any help much appreciated.
Regards,
EdSorry David, I am not sure I've got this right yet. I am looking at using the cumsum function, but I am not sure how to apply this. That is, I can see examples (cumsum(measure, total_dim, reset_dim)), but I think I cannot put such formula directly into the expression editor for a cube measure in OWB?
Until now I have been using the standard available calculated measures in the OWB measure editor and I think they insert an xml template? I'll get the Excel Calculation Tool from OTN, to see if I can create the correct formula and paste that in OWB in the expression editor for the measure. (Does that tool need a ROLAP workspace or does it need / can it work with a MOLAP workspace?)
Thanks and regards,
Ed
Edited by: EdSp on Jan 13, 2009 1:57 PM
I have downloaded the Excel sheet and can see how it works, but it seems to "insert" the calculated measures straight into the AW. However we deploy the AW from OWB so I will be looking at getting something to enter/paste in the expression editor of OWB... -
Problem in Matrix while Populating Data
Hello All,
I am facing a problem in matrix column in SAP 8.8
I am filling a matrix with data from a table ITT1.
Matrix1 = oChlSelc.Items.Item("3").Specific
oChlSelc.DataSources.DataTables.Add("Approval")
oChlSelc.DataSources.DataTables.Item("Approval").Clear()
Dim Str_Query As String = "Select Father,Code,Quantity From ITT1"
oChlSelc.DataSources.DataTables.Item("Approval").ExecuteQuery(Str_Query)
Matrix1.Columns.Item("col_1").DataBind.Bind("Approval", ",Code")
Matrix1.Columns.Item("col_2").DataBind.Bind("Approval", "Quantity")
matrix1.LoadFromDatasource
The problem is that the data is getting populated in the matrix without any problem but the Quantity field is not showing the
exact Value means its showing the RoundOff Value i.e. 1.45 = 1
If Quantity is 1.45 in matrix column its showing 1 .
That what i am facing .
Thanks
AmitHi Amit
Its working fine in my system
and also im getting the quantity value as 1.00 by using this code
Dim matrix1 As SAPbouiCOM.Matrix
Dim oform As SAPbouiCOM.Form
oForm = SBO_Application.Forms.Item("frm_test")
matrix1 = oForm.Items.Item("1").Specific
oForm.DataSources.DataTables.Add("Approval")
oForm.DataSources.DataTables.Item("Approval").Clear()
Dim Str_Query As String = "Select Father,Code,Quantity From ITT1"
oForm.DataSources.DataTables.Item("Approval").ExecuteQuery(Str_Query)
matrix1.Columns.Item("V_0").DataBind.Bind("Approval", "Code")
matrix1.Columns.Item("V_1").DataBind.Bind("Approval", "Quantity")
matrix1.LoadFromDatasource()
Thanks
Shafi -
Populating Date field when Date = 00000000
Hi Friends, Please help me with this , I have a requirement where user is not populating the date field "0objvalto" I want to populate that to 12/12/2020
Abap code i put in transformation in BI but it is throwing error that 20.12.2008 format not correct
Please help me correct the code or let me know what should i code to populate
IF SOURCE_FIELDS-REOBJVALTO = '00000000 '.
RESULT = '20.12.2020'.
ENDIF.
Thanks
SoniyaHi Soniya,
Dates are internally stored as YYYYMMDD - so you must input them this way when you are doing in directly using ABAP.
IF SOURCE_FIELDS-REOBJVALTO is INITIAL.
RESULT = '20201220'.
ENDIF -
Populating data from model to table
This is the code i have written for populating.
Please verify this code.
Let me know if anything more to be done.
code of main:-
public class main {
Collection plist = new ArrayList();
Connection conn = null;
Statement st;
public void get_details()
try
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
conn = DriverManager.getConnection( "jdbc:microsoft:sqlserver://10.10.30.25:1433;databaseName=TrackingSystem","sa","sa" ) ;
st = conn.createStatement();
String str = "select * from Project Table";
ResultSet rs = st.executeQuery(str);
String a = rs.getString(1);
String b = rs.getString(2);
String c = rs.getString(3);
while(rs.next())
pdetails rec = new pdetails();
rec.setEname(a);
rec.setRname(b);
rec.setDid(c);
plist.add(rec);
catch(Exception e)
public Collection getPlist() {
return plist;
public void setPlist(Collection collection) {
plist = collection;
code of pdetails
public class pdetails {
private String Ename;
private String Rname;
private String Did;
public pdetails()
Ename = new String();
Rname = new String();
Did = new String();
public pdetails(String Ename,String Rname,String Did)
this.Ename = Ename;
this.Rname = Rname;
this.Did = Did;
public String getDid() {
return Did;
public String getEname() {
return Ename;
public String getRname() {
return Rname;
public void setDid(String string) {
Did = string;
public void setEname(String string) {
Ename = string;
public void setRname(String string) {
Rname = string;
I have created a jar file for this classes And imported as a model in my web Dynpro Application.
And mapped it to component controller.
And from there to view controller.
I had a view with a table .
I created the table by using template of table.
And Binded it to the context of the view.
And the code i have written in the WDDOINIT() method is:-
IWDMessageManager msg = wdComponentAPI.getMessageManager();
try
Collection c;
c= new ArrayList();
main m = new main();
m.get_details();
c = m.getPlist();
for(int i = 0; i<c.size();i++)
pdetails pd = new pdetails();
String a = pd.getDid();
String b = pd.getEname();
String f = pd.getRname(); IPrivateProjectDetails.IPdetailsElement proj = wdContext.nodePdetails().createPdetailsElement(pd);
proj.setDid(a);
proj.setEname(b);
proj.setRname(f);
wdContext.nodePdetails().addElement(proj);
catch (Exception e) {
// TODO: handle exception
msg.reportWarning("Exception Caught");Hi,
Can you put
msg.reportSucces(´bla´);
somewhere inside this loop:
for(int i = 0; i<c.size();i++)
to verify that you actually get data from the backend?
Please let us know if you actually see the messages in your screen.
Good luck, Roelof
Maybe you are looking for
-
Steps to create your own self signed certificate with java plugin working
You need two tools that comes with your jdk which are keytool and jarsigner. Steps explain below in detail. Don't use netscape signtool, it will NEVER work! * keytool -genkey -keyalg rsa -alias tstkey -keypass 2br2h2m -dname "cn=Test Object Signing C
-
We are Mountain Lion using Time Machine to backup to Time Capsule. When the backup tries to run, an error appears after a couple of minutes saying "The disk you inserted was not readable by this computer." Then an error shows up saying "Time Machine
-
Converted entries not in unique XLS cells
When converting a PDF to an XLS some entries are grouped together in a single cell making it difficult to perform calculations. Can this be avoided?
-
Resizing a particular column in a table
Well, I know that my topic may seem stupid, but I can't find a way to resize the first column of my TreeTable. Here is what I've tried : treetable.getColumnModel().getColumn(0).setWidth(100); and it doesn't work at all !! please, ... delph :)
-
Gl_interface help oracle 11.5.5
I need to get GL data to oracle financials 11.5.5 from an billing system AR the data is the GURFEED table. Can any one help advice how to get that data to the gl_interface table use a adaptor or write a pl/sql program I have not done this. Thanks in