Probem to adding JCombo in HTable(UTGENT)
Hello,
i want to add jcombo in jtable.accually in my table i add column in run time & every column when i add (evry cell) want to combo.
but problem is when i add column that time last column i find every cell have combo,but previous column i lost combo.
my coding is
defaulttablemodel.addColumn("column name");
TableColumn aa= table.getColumnModel().getColumn(table.getColumnCount()-1);
aa.setCellEditor(new DefaultCellEditor(comboBox));
but i got bug in this code, so plz give me answer what i do?
I want every cell have combo in all column.
Thanks
sandeep
note to self: think before posting question -> i figured out why of to banging head in wall
Similar Messages
-
Add Jcombo in Jtable at run time
hello,
i want to add jcombo box in jtable every cell & i also add column in run time.proble is when i add new column that time last column combo is add but prievious column its remove automatic.
so give me some code & where i can get see good example for add combo in jtable.
thankshi j-rg,
It was really appreaciating to c ur reply, regarding the specific problem.Actually wht i was facing the peoblem, Am adding a colomn in the run time and in that column am adding a combo in each cells of that column.AS i was expecting am able to add a new colum in th erum time with the combo in each cells of that column,now when am adding another column in the run time am getting all the required things,but the problem is " in the previous cloumn am not getting that combo"(only the combo is been added in the last column).
What am expecting is the combo should be there in each cell of the column(all columns)
Am also sending the code wht am using, plz have a look below,
df1.addColumn(result);
TableColumn aa= tb1.getColumnModel().getColumn(tb1.getColumnCount()-1);
aa.setCellEditor(new DefaultCellEditor(comboBox));
wating for ur reply
thanks and regards
sandeep -
How can I add multi columns to a JCombo Box ?
Dear experts,
How can I add multi columns to a JCombo Box ?
Thankx in advance
UniqueWhat do you mean by adding Multiple columns? JCombobox is a component in which you can choose a value from a list(rows) of values. Could you please explain why do you want multiple columns in the JComboBox. I suppose JComboBox is not meant for that.
Thanks,
Jana -
I am having trouble adding appointments to my various calendars. No probems before ios7 update. What am I doing wrong??
iPhone 3G IOS 4.2.1 is the latest & greatest. There's no more updates for this iPhone.
You have to buy a new iPhone since most apps target IOS 6 & IOS 7. -
Not able to view the JPG image added in WebI
Hi,
Using 'Background Image' i have added a Jpg image (8 KB) to the report (in a Cell of the Horizontal table) in both Advance Java / Interctive Edit mode.
When I close the EDIT mode, i'm not able to see the Image. Its coming in PDF export though. I tried changing Preference in InfoView. But still unable to view the Image in report.
Version: XI R3.1
Regards,
AnuI would appreciate if you could read the post before posting the response.
Same I will also do, if you could replied to that post. After several posts also no reply from you but now you came with taking/using same approach and asking again.
Let's respect each other time & energy, Okay.
We are here to help us, not just simply enjoying or wasting time, keep in mind.
About your problem:
How you added that Image to Hor Table??
If you did like follows:
1. Drag HTable
2. Hide Header part
3. In column level(LOV) Not Header go to Properties
4. Background image
5. here point it.
Gracias...!!
Let's play with Aurora (BO XI 4.0) -
Tooltips for individual JCombo items
I am currently trying to extend a JCombo used for searches in a database to also contain Tooltips (fetched from Database just like the JCombo items).
if(wipbinData!=null)
for(int i=0;i<wipbinData.length;i++)
directCRcombobox.addItem(wipbinData[0]);
directCRcombobox.setToolTipText(wipbinData[i][1]); //here I need not to make tooltip work only on JCombo in general but on specific ceels.
All tips on getting tooltips on single items in the combobox would be appreciated.I tried to look at solving the extra information need with the tooltips. But as that turned out to be too tricky I instead added the extra information after the main info in the combobox. Then I fixed my query by using stringtokenizer to get only the first text for the query.
But thanks for the answer anyway -
Error while adding A/P Credit Memo!
Error while adding A/P Credit Memo..........
'G/L Accounts' (OACT) (ODBC-2028) Message - 131-183
Please advice me .....
Thanks...Hi
Check this thread this may help you.
[Re: AP Invoice - No Matching Account Error]
Regards
Balaji -
Added new field to cube but data not passed from DSO
Hope someone can help.
(BI 7.0) We added new fields into a cube. The fields already existed in the DSO. When we ran the process chain in development for the first time after making this change, we notice that the 'historical' data for these fields is populated in the cube. When we do this in our quality system only new data passed to the cube is updated. In development in the sub-chain DTP request we see all previous requests listed under selections. In quality it is only the latest request. The only difference is that the DeltaInit flag in the DTP request in development is ticked (extraction mode) - but not in quality. Does anyone know whyb this is?hi peter,
Adding fields to cube doesn't affect delta status...The delta DTP should be able to handle delta requests automatically.
I guess in you quality system, the cube already got all requests updated from ODS before you importing the change request. And in develop system none of the requests in ODS were updated before the change.
Regards,
Frank -
HI, i recently just switched to verizon and so far i have loved it. But now im running into an issue and itseems almost impossible to get ahold of anyone via phone for support so im going to try this way.
I am mid way through my month and i have ran out of data. I want to add more to my account so my phone will have internet again. How do i do this? I have added more data packages but that hasnt solved the issue, i still have no internet. I use my phone for work alot and need to have internet the remainder of the month. Can someone please tell me how to go about getting internet on my phone until my plan renews in two weeks.
THank you for any help!huss9,
I am happy to hear that you are loving the service. Welcome to the Verizon Wireless family. But let's get to work on the issue at hand today. With the iPhone can you please go into Settings, General, Scroll to the bottom and tap on Reset, then do reset network settings. This will not delete any of your personal information. All of your pictures, contacts, apps, and music will still be on the phone. Then re-try the network out. Please keep us posted.
KevinR_VZW
Please follow us on Twitter @VZWSupport -
I added my first folder of MP3s and it created a playlist, but didn't show up in the library. When adding a second folder, it didn't show up anywhere. I can do a search for them in the search window, and it finds/plays them, but I want to be able to browse them in my library. These are not MP3s downloaded from iTunes, but are personal files located on my hard drive. Can anyone help?
I have a Dell that's running Windows XP. I have found that itunes is very temperamental. this works most of the time... except on my son's computer that's running Windows Vista.
Go to your library in iTunes. Then go up to file and try one of the options (import, add folder to library, or add file to library).
Adding a folder is the least work. You can add all the files from a folder with one click... if it works. Remember that itunes is temperamental.
If that doesn't work, try adding a file. The problem with that is that you have to go through the whole process for each and every file (song, movie, etc).
Sometimes the only thing that works is to import.
I haven't gotten iTunes to work on my son's computer (Windows Vista).
I can't get support from apple in any way at all! They are good about creating electronics that appeal to us But they are lousy at support. If anyone figures out how to access support (where you can actually contact Apple) please let me know ([email protected]). I've been trying for 6 months. -
Adding New Data To Same Page - HELP
I am trying to put together a invoice on the fly, the products are added to the invoice by selecting the disired product from a drop down menu and hitting the add button. You SHOULD then be able to select more products from the same drop down menu and htting add again will include it in the invoice.... simple?? Well the problem i have is that when i hit the add button to add another item it just replaces the one i have already added.... this is very annoying... i cannot think of a way to take the product data through the form submission ready for adding too.
Any Ideas this is really bugging me, and the more time i spend on it, the worse its getting. Code Below
<%@ page buffer="32kb" %>
<%@ page import="java.sql.*, javax.servlet.ServletException, java.io.IOException, com.stock_control.*" %>
<%!
String convertResultsToSelect ( ResultSet rs, String selectName, String idCol, String descCol ) throws SQLException
StringBuffer sb = new StringBuffer ( "<select name=" + selectName +">" );
if (rs != null) {
while (rs.next()) {
sb.append ( "<option value=" );
sb.append ( rs.getString(idCol) );
sb.append ( ">" );
sb.append ( rs.getString(descCol) );
sb.append ( "</option>" );
sb.append ( "</select>" );
return sb.toString ();
%>
<html>
<head>
<title>Members Area - Stock Check</title>
</head>
<body bgcolor="#CCCCCC" topmargin="0">
<%@ include file="topConn.jsp" %>
<%
String msg = "";
String name = "";
String address1 = "";
String address2 = "";
String town ="";
String postcode = "";
String country = "";
String phone = "";
String mail = "";
String comments = "";
float total = 0;
int nextFree = 0;
String prodResults;
int numberOfItems = 0;
String shop = (String)session.getValue("SHOP");
String selectProd = "SELECT ProductID, ProductName FROM product WHERE ShopID=";
rs1 = stmt.executeQuery(selectProd+shop);
prodResults = convertResultsToSelect( rs1, "product","ProductID","ProductName");
rs = stmt.executeQuery("SELECT COUNT(*) AS stockLevel FROM product WHERE ShopID ="+shop);
while(rs.next())
numberOfItems = rs.getInt("stockLevel");
Product[] products = new Product[numberOfItems];
if (request.getParameter("add")!=null)
// get values from all text boxes....
name = request.getParameter("name");
address1 = request.getParameter("address1");
address2 = request.getParameter("address2");
town = request.getParameter("town");
postcode = request.getParameter("postcode");
country = request.getParameter("country");
phone = request.getParameter("phone");
mail = request.getParameter("mail");
comments = request.getParameter("comments");
// add data from dropdown
String newProduct = request.getParameter("product");
//connect to database and put product data into array + increment
int thenewid = 0;
String theName = "";
float thePrice = 0;
String nono = "0";
String getProd = "SELECT * FROM product WHERE ProductID=";
rs = stmt.executeQuery(getProd+newProduct);
if(rs.next())
thenewid = Integer.parseInt(newProduct);
theName = rs.getString("ProductName");
thePrice = rs.getFloat("SalePrice");
Product addProduct = new Product(thenewid, theName, thePrice, nono);
products[nextFree] = addProduct; //PROBLEM
nextFree++;
// reload page with new data in form
//for loop arround array
%>
<form method="GET">
<div align=center>
<p>
<%=prodResults%>
<input type="submit" value="Add" name="add"></p>
<TABLE width=100% height="1">
<TBODY>
<tr>
<td width="4%" height="19"> </td>
<td width="96%" height="19">
</td>
</tr>
<tr>
<td width="4%" height="198"> </td>
<td width="96%" height="198">
<div align="center"></div>
<table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
<tr>
<td width="4%"> </td>
<td width="15%"><font face="Verdana" size="2">Customer Name</font></td>
<td width="30%"><input type="text" name="name" size="30" value="<%=name%>"></td>
<td width="19%"><font face="Verdana" size="2">Customer Phone #</font></td>
<td width="26%"><input name="phone" type="text" size="30" value="<%=phone%>"></td>
<td width="6%"> </td>
</tr>
<tr>
<td> </td>
<td><font face="Verdana" size="2">Address Line 1</font></td>
<td><input type="text" name="address1" size="40" value="<%=address1%>"></td>
<td><font face="Verdana" size="2">Customer E-mail</font></td>
<td><input name="mail" type="text" size="30" value="<%=mail%>"></td>
<td> </td>
</tr>
<tr>
<td height="32"> </td>
<td><font face="Verdana" size="2">Address Line 2</font></td>
<td> </td>
<td><font face="Verdana" size="2">Comments</font></td>
<td width="26%" rowspan="5"><p>
<textarea name="comments" cols="29" rows="5"><%=comments%></textarea>
</p>
<p> </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><font size="2" face="Verdana">Town/City</font></td>
<td><input name="town" type="text" size="40" value="<%=town%>">
<input name="address2" type="text" size="40" value="<%=address2%>"></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><font size="2" face="Verdana">Post Code</font></td>
<td><input type="text" name="postcode" size="10" value="<%=postcode%>"></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><font size="2" face="Verdana">Country</font></td>
<td><input type="text" name="country" size="40" value="<%=country%>"></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="24"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="23"> </td>
<td><strong><font size="2" face="Verdana">Product Code</font></strong></td>
<td><strong><font size="2" face="Verdana">Name</font></strong></td>
<td><strong><font size="2" face="Verdana">Price</font></strong></td>
<td> </td>
<td> </td>
</tr>
<%
if (request.getParameter("add")!=null)
for(int i=0; i<nextFree; i++)
Product temp = products;
int prodID = temp.getid();
String prodName = temp.getname();
float prodPrice = temp.getprice();
total = total + prodPrice;
// work out total on the fly
%>
<tr>
<td height="23"> </td>
<td> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=prodID%> </font></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=prodName%></font></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">£<%=prodPrice%></font></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
<td> </td>
</tr>
<%
%>
<tr>
<td width="4%" height="23"> </td>
<td width="15%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
<td width="30%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
<td width="19%"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Total:</font></strong></td>
<td width="26%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=total%></font></td>
<td width="6%"> </td>
</tr>
</table>
<p align="center">
<input type="submit" value="Continue" name="continue">
</form>
</p>
</td> </tr> </TBODY></table>
<%@ include file="bottomConn.jsp" %>
</body>
</html>anyone?
-
I am adding more memory, should I replace the top two slots with the 4g memory modules, then place 2g memory modules on bottom slots. Does it even matter?
I am adding more memory, should I replace the top two slots with the 4g memory modules, then place 2g memory modules on bottom slots. Does it even matter?
-
Get All Values From NewForm.aspx using Event Receiver Item Adding
HI All,
I have conditions to check before the insertion of "Calendar Event".For this I am using Item Adding Event Receiver ,When Click on Save button I need to get all the values of Items filled in NewForm.aspx and check
the condition,If condition satisfies make them insert else show alert info as"Not Valid",Below is code and error message
public override void ItemAdding(SPItemEventProperties properties)
base.ItemAdding(properties);
string StartTime = properties.AfterProperties["Start Time"].ToString();
string EndTime = properties.AfterProperties["End Time"].ToString();
Error
Object reference not set to an instance of an object.
Use the New "Keyword to create an object instance
Can any one help me how can I do it.
Thanks,
Quality Communication Provides
Quality Work.
http://siddiq-sharepoint2010.blogspot.in/
Siddiqali Mohammad .Hi,
Have you tried with the code snippet as mentioned below
string EndDate = Convert.ToString(properties.AfterProperties["EndDate"]);
string StartDate = Convert.ToString(properties.AfterProperties["EventDate"]);
If my post is helpful - please click on the green arrow to mark it as answer -
Hi Guys,
I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out as this web-site has been payed for by my client.
AlexMany thanks.
With those symptoms, I'd try the following document:
Apple software on Windows: May see performance issues and blank iTunes Store
(If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.) -
Not Able to Generate Out of the Report by adding the new 2 fields
Hi,
I'm Very new to ABAP. I have created one report. after 2 new fields added they are EKNAM and EKGRP.
The Thing is the remaining fields are displaying in the output. The Newly added fields are not displaying the out. I was able to add this 2 fields in the head of the report. But issue is not able to get the data on these 2 fields.
Please see the below program and any one please help me out to display the data in this report for the fields eknam and ekgrp.
TABLES: eban,
lfa1,
ekko,
t024,
v_username.
DATA: BEGIN OF i_req_items OCCURS 10,
ernam LIKE eban-ernam, "Created by
lifnr LIKE eban-lifnr, "Desired vendor
ebeln LIKE eban-ebeln, "PO Number
ebelp LIKE eban-ebelp, "PO Item
eknam LIKE t024-eknam, "Pur.Grp Name
ekgrp LIKE t024-ekgrp, "Pur.Grp Number
flief LIKE eban-flief, "Fixed vendor
name1 LIKE lfa1-name1, "Vendor name
badat LIKE eban-badat, "Creation date
erdat LIKE eban-erdat, "Change date
banfn LIKE eban-banfn, "Requisition no.
bnfpo LIKE eban-bnfpo, "Req. item no.
bsart LIKE eban-bsart, "Document type
knttp LIKE eban-knttp, "Acct.assgmt category
txz01 LIKE eban-txz01, "PO item description
menge LIKE eban-menge, "Quantity
preis LIKE eban-preis, "Price
peinh LIKE eban-peinh, "Price unit
value(14) TYPE p DECIMALS 2, "Item Value
END OF i_req_items.
DATA: BEGIN OF i_reqs OCCURS 10,
ernam LIKE eban-ernam, "Created by
persn LIKE usr21-persnumber, "Person number
uname LIKE adrp-name_text, "User name
lifnr LIKE eban-lifnr, "Vendor
name1 LIKE lfa1-name1, "Vendor name
badat LIKE eban-badat, "Creation date
banfn LIKE eban-banfn, "Requisition no.
bnfpo LIKE eban-bnfpo, "Req. item no.
bsart LIKE eban-bsart, "Document type
knttp LIKE eban-knttp, "Acct.assgmt category
txz01 LIKE eban-txz01, "PO item description
eknam like t024-eknam, "Purchase Grp Name
ekgrp like t024-ekgrp, "Purchase Grp Number
value(14) TYPE p DECIMALS 2, "Item Value
END OF i_reqs.
DATA: BEGIN OF i_req_keys OCCURS 0,
ernam LIKE eban-ernam, "Created by
lifnr LIKE eban-lifnr, "Desired vendor
erdat LIKE eban-erdat, "Create or Change date
banfn LIKE eban-banfn, "Requisition no.
bnfpo LIKE eban-bnfpo, "Req. item no.
eknam like t024-eknam, "Purchase Grp Name
ekgrp like t024-ekgrp, "Purchase Grp number
END OF i_req_keys.
DATA: BEGIN OF i_req_keeper OCCURS 0,
ernam LIKE eban-ernam, "Created by
lifnr LIKE eban-lifnr, "Desired vendor
banfn LIKE eban-banfn, "Requisition no
END OF i_req_keeper.
DATA: wa_reqitems LIKE i_req_items.
DATA: BEGIN OF i_export OCCURS 10,
record(150) TYPE c,
END OF i_export.
CONSTANTS
CONSTANTS:
c_doccat LIKE eban-bstyp VALUE 'B',
c_creind LIKE eban-estkz VALUE 'R',
c_delflag LIKE eban-loekz VALUE 'L',
c_write(5) TYPE c VALUE 'WRITE',
c_slash(1) TYPE c VALUE '/',
*start ESPZC U8DK900439
c_delimiter TYPE x VALUE '09',
c_delimiter TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
*end ESPZC U8DK900439
c_sc(1) TYPE c VALUE ';',
c_x(1) TYPE c VALUE 'X',
c_usd(1) TYPE c VALUE '2',
c_export LIKE authb-filename VALUE '/BAY2/UBEM_SPLIT_REQS'.
WORKING VARIABLES
DATA: w_report_id LIKE syst-repid,
w_sttime LIKE syst-uzeit,
w_rpt_pagno LIKE syst-pagno,
w_rc LIKE sy-subrc,
w_datelow LIKE eban-badat,
w_datehigh LIKE eban-badat,
w_export LIKE c_export,
w_records TYPE i,
w_message(50) TYPE c.
TYPES number TYPE i.
SELECTION SCREEN / PARAMETERS
SELECTION-SCREEN BEGIN OF BLOCK org WITH FRAME TITLE text-001.
PARAMETERS: p_purorg LIKE eban-ekorg OBLIGATORY DEFAULT 'US02'.
SELECT-OPTIONS: s_doctyp FOR eban-bsart,
s_date FOR eban-badat.
PARAMETERS: p_timper(2) TYPE n.
SELECTION-SCREEN: COMMENT 37(37) text-002.
SELECTION-SCREEN END OF BLOCK org.
SELECTION-SCREEN BEGIN OF BLOCK outp WITH FRAME TITLE text-003.
PARAMETERS: p_onlin RADIOBUTTON GROUP outp DEFAULT 'X',
p_servr RADIOBUTTON GROUP outp.
SELECTION-SCREEN END OF BLOCK outp.
AT SELECTION SCREEN
AT SELECTION-SCREEN.
IF p_servr = c_x.
CLEAR w_rc.
PERFORM authority_check_dataset USING w_export
CHANGING w_rc.
IF w_rc <> 0.
MESSAGE e532 WITH text-006 w_export.
ENDIF.
CLEAR w_rc.
PERFORM verify_unix_path_and_file CHANGING w_rc.
IF w_rc <> 0.
MESSAGE e531 WITH w_message.
ENDIF.
ENDIF.
INITIALIZATION EVENT
INITIALIZATION.
PERFORM get_filename.
MOVE syst-uzeit TO w_sttime.
MOVE syst-repid TO w_report_id.
CLEAR: w_rpt_pagno.
START-OF-SELECTION.
PERFORM get_data.
IF p_onlin = c_x.
IF w_records GT 0.
PERFORM print_report_header.
PERFORM write_report.
ELSE.
MESSAGE i531 WITH text-007.
ENDIF.
ELSEIF p_servr = c_x.
PERFORM write_export.
ENDIF.
END-OF-SELECTION.
---- F O R M R O U T I N E S -
*& FORM get_filename
FORM get_filename.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
logical_filename = c_export
IMPORTING
file_name = w_export
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. " get_filename
FORM authority_check_dataset
FORM authority_check_dataset USING p_filename
CHANGING p_rc.
CALL FUNCTION 'AUTHORITY_CHECK_DATASET'
EXPORTING
activity = c_write
filename = p_filename
EXCEPTIONS
no_authority = 1
activity_unknown = 2
OTHERS = 3.
p_rc = sy-subrc.
ENDFORM. "authority_check_dataset
FORM verify_unix_path_and_file
FORM verify_unix_path_and_file CHANGING p_rc.
*start ESPZC U8DK900439
OPEN DATASET w_export FOR OUTPUT IN TEXT MODE
MESSAGE w_message.
OPEN DATASET w_export FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
MESSAGE w_message.
*end ESPZC U8DK900439
p_rc = sy-subrc.
ENDFORM. "verify_unix_path_and_file
FORM get_data
FORM get_data.
CLEAR w_datelow.
CLEAR w_datehigh.
w_datelow = s_date-low - p_timper.
w_datehigh = s_date-high + p_timper.
w_datehigh = s_date-high.
SELECT ernam lifnr ebeln ebelp flief badat erdat banfn bnfpo bsart
knttp menge preis peinh txz01
FROM eban
INTO CORRESPONDING FIELDS OF TABLE i_req_items
WHERE bstyp = c_doccat
AND estkz = c_creind
AND knttp <> space
AND bsart IN s_doctyp
AND loekz <> c_delflag
AND ekorg EQ p_purorg
AND ( ( badat BETWEEN w_datelow and w_datehigh ) OR
( erdat BETWEEN w_datelow AND w_datehigh ) ).
AND erdat BETWEEN w_datelow AND w_datehigh.
IF sy-subrc = 0.
LOOP AT i_req_items.
IF i_req_items-lifnr IS INITIAL.
IF NOT i_req_items-flief IS INITIAL.
MOVE i_req_items-flief TO i_req_items-lifnr.
MODIFY i_req_items.
ENDIF.
IF NOT i_req_items-ebeln IS INITIAL.
SELECT lifnr FROM ekko
INTO i_req_items-lifnr
WHERE ebeln = i_req_items-ebeln.
ENDSELECT.
MODIFY i_req_items.
ENDIF.
ENDIF.
IF i_req_items-erdat GT i_req_items-badat.
MOVE i_req_items-erdat TO i_req_items-badat.
MODIFY i_req_items.
ENDIF.
ENDLOOP.
PERFORM weed_out_unique_records.
PERFORM apply_time_period.
SORT i_req_items BY ernam lifnr banfn bnfpo.
LOOP AT i_req_items.
i_req_items-value = ( i_req_items-menge *
( i_req_items-preis / i_req_items-peinh ) ).
MODIFY i_req_items.
ENDLOOP.
Getting vendor name from table LFA1 -
CLEAR i_req_items.
LOOP AT i_req_items.
SELECT SINGLE name1 FROM lfa1
INTO i_req_items-name1
WHERE lifnr = i_req_items-lifnr.
MODIFY i_req_items.
ENDLOOP.
LOOP AT i_req_items.
MOVE-CORRESPONDING i_req_items TO i_reqs.
Getting user name from view v_username -
SELECT SINGLE name_text
FROM v_username INTO i_reqs-uname
WHERE bname = i_reqs-ernam.
APPEND i_reqs.
ENDLOOP.
ENDIF.
DESCRIBE TABLE i_reqs LINES w_records.
ENDFORM. "Get_data
FORM print_report_header
FORM print_report_header.
ADD 1 TO w_rpt_pagno.
CALL FUNCTION '/BAY2/UBEXBH_BAYER_HEADR_FUN'
EXPORTING
f_jobname = text-020
f_business_group = text-021
f_report_title = text-022
f_repid = w_report_id
f_sysid = syst-sysid
f_linsz = syst-linsz
f_pagno = w_rpt_pagno
f_mandt = syst-mandt
f_datum = syst-datum
f_uzeit = w_sttime.
FORMAT COLOR COL_HEADING.
WRITE: /1 text-010, "Created by CWID & user name
29 text-011, "Vendor #
38 text-012, "Vendor Name
69 text-013, "Req Number
79 text-014, "/Item
87 text-015, "Created On
98 text-017, "A (AcctAssgmtCat)
100(14) text-019 RIGHT-JUSTIFIED, "Item Value
116(30) text-018, "Item Description
148 text-030, "Pur.Grp Name
170 text-031. "Pur.Grp Number
FORMAT COLOR OFF.
ULINE.
ENDFORM. "print_report_header
*& Form WRITE_REPORT
FORM write_report.
LOOP AT i_reqs.
WRITE: /1 i_reqs-ernam,
9(18) i_reqs-uname,
29 i_reqs-lifnr,
38(30) i_reqs-name1,
69 i_reqs-banfn,
79 c_slash,
80 i_reqs-bnfpo,
87 i_reqs-badat,
98 i_reqs-knttp,
100(14) i_reqs-value CURRENCY c_usd,
116(30) i_reqs-txz01,
145 i_reqs-eknam,
160 i_reqs-ekgrp.
ENDLOOP.
ENDFORM. "write_report
*& Form WRITE_EXPORT
FORM write_export.
DATA: l_value(14) TYPE c,
l_bsart(100) TYPE c,
l_uname(7) TYPE c,
l_records(5) TYPE c,
l_header(150) TYPE c,
l_params(150) TYPE c,
i_char TYPE i.
LOOP AT i_reqs.
CLEAR l_value.
CLEAR l_uname.
l_value = i_reqs-value.
l_uname = sy-uname.
CONCATENATE: i_reqs-uname
i_reqs-ernam
i_reqs-lifnr
i_reqs-name1
i_reqs-banfn
i_reqs-bnfpo
i_reqs-badat
i_reqs-knttp
l_value
i_reqs-txz01 INTO i_export
SEPARATED BY c_delimiter.
APPEND i_export.
ENDLOOP.
CONCATENATE: text-008 "Created By Name
text-009 "CWID
text-011 "Vendor No
text-012 "Vendor Name
text-013 "Req Number
text-023 "Item
text-015 "Created On
text-017 "A
text-019 "Item Value
text-018 "Item Description
text-030 "Purchase Grp name
text-031 "Purchase Grp number
INTO l_header SEPARATED BY c_delimiter.
INSERT l_header INTO i_export INDEX 1.
IF sy-batch IS INITIAL.
MOVE sy-uname TO l_uname.
ELSE.
MOVE text-024 TO l_uname.
ENDIF.
PERFORM collect_bsart CHANGING l_bsart
i_char.
l_records = w_records.
CONCATENATE: sy-sysid
p_purorg
l_bsart(i_char)
s_date-low
s_date-high
p_timper
l_uname
sy-datum
l_records INTO l_params
SEPARATED BY c_delimiter.
INSERT l_params INTO i_export INDEX 1.
LOOP AT i_export.
CONDENSE i_export NO-GAPS.
TRANSFER i_export TO w_export.
ENDLOOP.
CLOSE DATASET w_export.
MESSAGE s533 WITH text-028 w_export text-029.
ENDFORM. "write_export
*& FORM collect_bsart
FORM collect_bsart CHANGING p_bsart
p_char.
CLEAR p_bsart.
LOOP AT s_doctyp.
IF sy-tabix = 1.
p_bsart = s_doctyp-low.
ELSE.
CONCATENATE: p_bsart c_sc s_doctyp-low INTO p_bsart.
ENDIF.
ENDLOOP.
CONDENSE p_bsart NO-GAPS.
p_char = strlen( p_bsart ).
ENDFORM. "collect_bsart
*& Form WEED_OUT_UNIQUE_RECORDS
FORM weed_out_unique_records.
DATA: i_l_req_items LIKE i_req_items OCCURS 0 WITH HEADER LINE.
DATA: i_l_req_final_items LIKE i_req_items OCCURS 0 WITH HEADER LINE.
DATA: l_count TYPE i,
l_sy_tabix LIKE sy-tabix,
l_banfn LIKE eban-banfn.
REFRESH i_l_req_items.
REFRESH i_l_req_final_items.
CLEAR l_banfn.
i_l_req_items[] = i_req_items[].
i_l_req_final_items[] = i_req_items[].
SORT i_req_items BY ernam lifnr.
SORT i_l_req_items BY ernam lifnr.
SORT i_l_req_final_items BY ernam lifnr.
LOOP AT i_l_req_items.
l_banfn = i_l_req_items-banfn.
CLEAR l_count.
LOOP AT i_req_items
WHERE ernam = i_l_req_items-ernam
AND lifnr = i_l_req_items-lifnr.
IF i_req_items-banfn <> l_banfn.
ADD +1 TO l_count.
ENDIF.
ENDLOOP.
IF NOT ( l_count > 0 ).
LOOP AT i_l_req_final_items
WHERE ernam = i_l_req_items-ernam
AND lifnr = i_l_req_items-lifnr.
DELETE i_l_req_final_items.
ENDLOOP.
ENDIF.
ENDLOOP.
REFRESH i_req_items.
i_req_items[] = i_l_req_final_items[].
ENDFORM. " WEED_OUT_UNIQUE_RECORDS
*& Form APPLY_TIME_PERIOD
FORM apply_time_period.
DATA: l_i_req_keys LIKE i_req_keys.
DATA: l_days_diff TYPE p,
l_no_of_key_recs TYPE i,
l_next_item LIKE sy-tabix,
l_finished_with_keys TYPE c VALUE 'N',
l_add_line TYPE c VALUE 'N',
l_count TYPE i,
l_req_ernam LIKE eban-ernam,
l_req_lifnr LIKE lfa1-lifnr,
l_req_banfn LIKE eban-banfn,
l_save_tabix like sy-tabix.
REFRESH: i_req_keys, i_req_keeper.
LOOP AT i_req_items.
MOVE-CORRESPONDING i_req_items TO
i_req_keys.
IF i_req_items-erdat IS INITIAL.
i_req_keys-erdat = i_req_items-badat.
ENDIF.
APPEND i_req_keys.
ENDLOOP.
SORT i_req_keys BY ernam lifnr erdat.
CLEAR l_no_of_key_recs.
DESCRIBE TABLE i_req_keys LINES l_no_of_key_recs.
LOOP AT i_req_keys.
IF l_add_line = 'Y'.
MOVE-CORRESPONDING i_req_keys
TO i_req_keeper.
APPEND i_req_keeper.
l_add_line = 'N'.
ENDIF.
IF l_finished_with_keys = 'Y'.
EXIT.
ENDIF.
CLEAR l_next_item.
l_save_tabix = sy-tabix.
COMPUTE l_next_item = sy-tabix + 1.
IF l_next_item = l_no_of_key_recs.
l_finished_with_keys = 'Y'.
ENDIF.
clear: l_i_req_keys.
READ TABLE i_req_keys INDEX l_next_item
INTO l_i_req_keys.
sy-tabix = l_save_tabix.
CLEAR l_days_diff.
l_days_diff = l_i_req_keys-erdat -
i_req_keys-erdat.
IF l_i_req_keys-ernam =
i_req_keys-ernam AND
l_i_req_keys-lifnr =
i_req_keys-lifnr AND
l_i_req_keys-banfn <>
i_req_keys-banfn AND
l_days_diff <= p_timper.
MOVE-CORRESPONDING i_req_keys
TO i_req_keeper.
APPEND i_req_keeper.
l_add_line = 'Y'.
ENDIF.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM i_req_keeper
COMPARING ALL FIELDS.
SORT i_req_keeper BY ernam lifnr banfn.
LOOP AT i_req_items.
CLEAR l_count.
CLEAR: l_req_ernam,
l_req_lifnr,
l_req_banfn.
l_req_ernam = i_req_items-ernam.
l_req_lifnr = i_req_items-lifnr.
l_req_banfn = i_req_items-banfn.
LOOP AT i_req_keeper
WHERE ernam = i_req_items-ernam
AND lifnr = i_req_items-lifnr
AND banfn = i_req_items-banfn.
ADD +1 TO l_count.
ENDLOOP.
IF NOT ( l_count > 0 ).
LOOP AT i_req_items
WHERE ernam = l_req_ernam
AND lifnr = l_req_lifnr
AND banfn = l_req_banfn.
DELETE i_req_items.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDFORM. " APPLY_TIME_PERIODRajesh,
Put a breakpoint and try to debug the report step by step.
You will findout the reason very easily.
Whenever you have a select and are trying to append into an internal table, keep checking your internal table if it is been populated with the correct records.
This way, you will findout the cause and can correct is accordingly.
Thanks,
Suresh Ganti
Maybe you are looking for
-
How can I get the output of graphical mapping as an input to java mapping?
Hi Experts, I am using graphical mapping in my scenario to get an xml at the end, now after this i want to use java mapping and then do encryption on this input. I am using both the mappings in the same interface Here the thing is, the input to the j
-
LMS 3.2 integration with ACS 5.1
Hi Is it /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5
-
Hi all, I have a requirement of splitting the output report depending upon the number of rows in the source. If the number of records in the source xml is greater than 1000 i need to split the report and save to a target location. Please let me know
-
Do I need to reinstall Logic to get my loops back?
OK, so I don't know how I did it, but apparently I deleted all my Apple Loops. A long while back I was looking around for free loops, and as far as I can tell, when I downloaded them I must have tossed all the old loops from Logic and Garageband. I d
-
Serverside conversion of PDF to Image (JPEG, GIF, PNG)
Hello JDCers..... I am currently looking for a serverside component (or some info on how to build one).... that will allow on the fly conversion of pdf to an image format on my web server... Any help would be greatly appreciated.... Thanks Fahim