Highlight a row in repeater control in ItemCommand event
Hi All,
I have a scenario where i have to highlight a repeater row from the code behind on the Item command event.
Please provide suggestions as to how we can make a repeater row highlighed or bold from code behind.
Thanks in advance,
Vaishali
This is ASP.net question that has nothing to do with SQL Server Data Access but I will attempt to reply
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
LinkButton btn = e.CommandSource as LinkButton;
RepeaterItem item = btn.NamingContainer as RepeaterItem;
Panel p = item.FindControl("Panel1") as Panel;
p.BackColor = System.Drawing.Color.Red;
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" OnItemCommand="Repeater1_ItemCommand">
<ItemTemplate>
<tr>
<td>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
<asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton>
</asp:Panel>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
Similar Messages
-
Highlighting one row in a table control
Hi All,
Can i highlight one row in a table control. I found some stroke color in the properties for a field in table control. But i am not sure, will it be applied to the entire column or to a particular field.
Anybody aware of this.?
Regards,
Manjunatha.T.SHi,
This is not currently available in VC.
Lior -
Possible to highlight a row in text area which in turn would fire an event?
I'm making a GUI of which the main portion consists of a large text area. The text area would list problems that our company is experiencing - each row would represent a problem. Each row would give a problem ID and a description of the problem. I want to make it so that when the user clicks on a row (a problem), another dialog box would open which would present possible solutions to the user regarding the problem at hand. How would I write code to highlight a row which in turn would fire an event opening up another box?
I thought about going about this another way - have a drop down (jcombobox) integrated into each row which the user can choose from but I'm not sure if you can insert a drop down into a text area (and neatly into a row at that!) so I think the former way may be preferable.
Thanks in advance.
Regards,
PaulIf a java application is required (as opposed to a web-based solution using HTML's linking capabilities) the best approach might be a JList implementation. It could go something like this...
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
public class ListFrame extends JFrame
public ListFrame()
super("JList example frame");
getContentPane().add(getListPanel(), BorderLayout.CENTER);
setDefaultCloseOperation(EXIT_ON_CLOSE);
pack();
setVisible(true);
private Component getListPanel()
JPanel panel = new JPanel(new BorderLayout());
final JList list = new JList(new Object[]
"List option 1...",
"List option 2...",
"List option 3..."
// This will make sure only one item can be checked at a time.
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
// Handle the selection here.
list.addListSelectionListener(new ListSelectionListener()
public void valueChanged(ListSelectionEvent e)
// No need to go on if this was a deselection.
if (e.getValueIsAdjusting() || list.isSelectionEmpty())
return;
// This is where you would have to convert the value that's selected into whatever
// it is you want to display to the user. This example just puts the text of the
// selected item into a messagebox.
Object selectedItem = list.getSelectedValue();
JOptionPane.showMessageDialog(ListFrame.this, selectedItem);
list.setVisibleRowCount(5);
// The scrollpane will control the scrolling of the list (so you can have as many options
// as you want). Standard JScrollPane functionalities can be used to control various
// visual aspects of the list.
JScrollPane scroll = new JScrollPane(list);
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
panel.add(scroll, BorderLayout.CENTER);
return panel;
public static void main(String[] args)
new ListFrame();
}I know this is quite after-the-fact, but I hope it helps (if you hadn't already solved the problem :) ) -
How to delete the row in table control with respect to one field in module pool programming?
Hi,
Can I know the way to delete the row in table control with respect to one field in module pool programming
Regards
Darshan MSHI,
I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
I have written this code,
module USER_COMMAND_9000 input.
DATA OK_CODE TYPE SY-UCOMM.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'DELETE'.
LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
APPEND LS_SOURCE TO LT_RESTORE.
DELETE TABLE LT_SOURCE FROM LS_SOURCE.
SOURCE-LINES = SOURCE-LINES - 1.
ENDLOOP.
But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
So I thought of doing with respect to the field. -
Highlight a row in classic report based on condition
HI all Gurus
Using Apex 4.1.1 oracle 11g linux oc4j
I want to highlight a row where #column_value#='Y' to grey keep others as normal report settings.
I have a simple sql query
SELECT PK_ID,
FIRST_NAME,
LAST_NAME,
INITIAL_REG_DATE,
MAIL_DATE,
BEGIN_DATE,
END_DATE,
END_DATE-BEGIN_DATE as "#days",
BEGIN_STATUS,
END_STATUS,
COMMENTS,
DELETE_FLAG,
case when DELETE_FLAG='Y' then 'GREY' else '#f0f0f0' end DELETE_FLAG ,
INITIAL_REG_DATE+(END_DATE-BEGIN_DATE) "New Reg end date"
FROM SOR_TRACKING_DEL
where pk2_id =:P216_Detail
order by mail_Date desc
I created a Dynamic action
which will fir on on load , BIND on this classic report
$("input[name=f29]").each(function(){
var lThis=$(this);
if(lThis.is("Y")){
lThis.parents("tr:eq(0)").children("td").css({"background-color":"GREY"});
} else {
lThis.parents("tr:eq(0)").children("td").css({"background-color":"#f0f0f0"});
But this is not changing color as expected..
Kindly help me !
ThanksScott and Tom
Thanks you guys for looking into this.
Pls ignore my improper explanation and my inexperience with jquery.
I read some blog and was trying to do same on classic report but all blogs I found so far referred either interactive report or tabular report none of them mentioned classic report.
I guess using array for classic report wont be a good idea to start with. :/
I am not sure if this is right syntax and logic to highlight the row
$(function(){
var DELETE_FLAG = $(this);
if DELETE_FLAG.is("Y"))
DELETE_FLAG.parents("tr").children("td").css({"background-color":"GREY"});
I also created app here
http://apex.oracle.com/pls/apex/f?p=35155
workspace sors
user tester/testing
application 35155
Thanks again. -
How to get all the index of "selected rows" in table control?
Hi Gurus,
I have a table control, wherein I need to get selected row so that I can get its respective TABIX.
I know that the event for capturing selected row is in PAI.
I also ensure that the w/ selColumn name in my screenpainter is exactly the same as my declaration in ABAP.
TOP INCLUDE
YPES: BEGIN OF Y_ZQID_CHECK,
IDNUM TYPE ZQID_CHECK-IDNUM,
WERKS TYPE ZQID_CHECK-WERKS,
MATNR TYPE ZQID_CHECK-MATNR,
LICHA TYPE ZQID_CHECK-LICHA,
LIFNR TYPE ZQID_CHECK-LIFNR,
ECOA_S TYPE ZQID_CHECK-ECOA_S,
ID_STAT TYPE ZQID_CHECK-ID_STAT,
ID_DATE TYPE ZQID_CHECK-ID_DATE,
FLAG_MAILCOA(1) TYPE C,
MARK(1) TYPE C, "Name of w/ SelColumn in ScreenPainter: T_ZQIDCHECK_DISCH-MARK
END OF Y_ZQID_CHECK.
DATA: T_ZQIDCHECK_DISCH TYPE STANDARD TABLE OF Y_ZQID_CHECK WITH HEADER LINE.
PAI
PROCESS AFTER INPUT.
* MODULE USER_COMMAND_9004.
LOOP AT T_ZQIDCHECK_DISCH.
MODULE READ_TC_DISCH .
ENDLOOP.
module READ_TC_DISCH input.
DATA: W_LINE_SEL TYPE SY-STEPL,
W_TABIX LIKE SY-TABIX.
GET CURSOR LINE W_LINE_SEL.
W_TABIX = TC_ID_ONLY-TOP_LINE + w_LINE_SEL - 1.
MODIFY T_ZQIDCHECK_DISCH INDEX TC_ID_ONLY-current_line.
If I am selecting single row, I can properly get the selected index via debug.
BUG:
When I'm selecting multiple rows in table control, only the last row is always being read inside the loop of my table control.
Please see the screenshot.
[url]http://img268.imageshack.us/img268/5739/tcselectedrows.jpg[url]
Notice in the debug screenshot, even if it's just in the 1st loop of table control, it automatically gets the 4th table control index, instead of the 2nd one.
Helpful inputs will be appreciated.
Thanks.
Jaime
Edited by: Jaime Cabanban on Dec 9, 2009 3:16 PMHi,
Are you sure that you have selected multiple line for tablecontrol in the property window of the tablecontrol.
Flowlogic.
LOOP WITH CONTROL TC_01.
Module Get_Marked.
ENDLOOP.
Module Pool
Module Get_Marked.
read the data from the internal table where mark = 'X'.
this should give you only selected records.
Endmodule.
Kindly check the tablecontrol property.
Regards,
Ranjith Nambiar -
Unable to delete a row in table control
Hi,
I'm unable to delete a row in table control.
I have defined a selection column for my table control but it is not getting value 'X' when i'm selecting a row for deletion.
Also, when I press enter, some of the columns in table control are getting initialized. I'm passing these values to the internal table along with other columns.
Please help.
Regards,
Manasee
Message was edited by: Manasee Chandorkarhi,
kindly chk this.
PROCESS BEFORE OUTPUT.
MODULE status_9010.
LOOP WITH CONTROL tab_control.
MODULE move_data_to_table.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL tab_control.
MODULE move_data_from_table.
ENDLOOP.
*& Module move_data_to_table OUTPUT
This is to move the data from the internal table to the table control
MODULE move_data_to_table OUTPUT.
This is to move the data from the internal table to the table control
zmpets_mode-modecode,zmpets_range-rangeid,zmpets_servfacto-factor are column name of table control
READ TABLE int_factor INDEX tab_control-current_line.
IF sy-subrc = 0.
zmpets_mode-modecode = int_factor-modecode.
zmpets_range-rangeid = int_factor-rangeid.
zmpets_servfacto-factor = int_factor-factor.
ENDIF.
ENDMODULE. " move_data_to_table OUTPUT
*& Module move_data_from_table INPUT
Date is moved from the table control to the Internal Table
MODULE move_data_from_table INPUT.
To move the data from the table control to internal table 'INT_FACTOR'.
int_factor-modecode = zmpets_mode-modecode.
int_factor-rangeid = zmpets_range-rangeid.
int_factor-factor = zmpets_servfacto-factor.
int_factor-chk = line.
*here if the data is there, it will modify
MODIFY int_factor INDEX tab_control-current_line.
IF sy-subrc NE 0. "data not exixting in table control . ie new data, then append it
APPEND int_factor.
CLEAR int_factor.
ENDIF.
ENDMODULE. " move_data_from_table INPUT
*delete a line from table control
MODULE user_command_9010 INPUT.
CASE sy-ucomm.
When an entry is deleted, and the entry is removed from the table
control.
WHEN 'DELETE'.
PERFORM f_del_frm_tab_cntrl.
ENDCASE.
ENDMODULE.
FORM f_del_frm_tab_cntrl .
LOOP AT int_factor WHERE chk = 'X'.
DELETE int_factor WHERE chk = 'X' .
CONTINUE.
ENDLOOP.
CLEAR int_factor.
ENDFORM.
for any clarifiaction pls mail me.
pls reward points, if this helped u.
regards,
anversha.
[email protected]
Message was edited by: Anversha s -
How to select perticular row in table control for BDC
Hi all
I want to select perticular row in table control for deletion through BDC. My transaction is CA02, My input is material no and plant , then it display table control with work center. Now i want to select W999 cost center and delete through BDC.
Please Suggest me. it urgent.
Thanks& Regards,
RPHi all
I want to select perticular row in table control for deletion through BDC. My transaction is CA02, My input is material no and plant , then it display table control with work center. Now i want to select W999 cost center and delete through BDC.
Please Suggest me. it urgent.
Thanks& Regards,
RP -
How to highlight selected row in a region ? ? ?
Hi There!
I have two regions Region1 and Region2. Region2 data is populated when I select a row in Region1.
Now I have Region1 and Region2 data on the same page, but I cant exactly tell which row in Region1 corresponds the data in Region2.
I was thinking of highlighting the row which was selected in Region1. Went through couple of solutions, but wasnt able to implement it.
So was wondering if any one of you know a easy to understand and implement a solution for this problem.
Any help or suggestions is greatly Appreciated.
Thank you
KrishnaHi krishna,
You can try this
http://roelhartman.blogspot.com/2009/06/highlight-row-in-interactive-report.html
and examples
http://apex.oracle.com/pls/otn/f?p=ROEL:CURROW:763487747488998
http://apex.oracle.com/pls/apex/f?p=34839:27:0
or try solutions from this thread
Highlighting currently selected row in a Report-Form page
hope this will help you
regards,
Chetan
Edited by: Chetan on 24 May, 2010 12:44 PM
Edited by: Chetan on 24 May, 2010 12:45 PM -
How to highlight a row in tree table - jdev 11.1.2
Hello:
Given a key, I want to highlight (select/set currency) the corresponding row in a tree table. I thought the following code would highlight the row in the tree table that corresponds to the key, but nothing is highlighted in the tree table. ie---> treeTable.setSelectedRowKeys(selectedRowKeys); What am I doing wrong? Thanks much.
public String cb1_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Next");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
DCBindingContainer bc = (DCBindingContainer) getBindings();
DCIteratorBinding iter = (DCIteratorBinding) bc.findIteratorBinding("DDF1Iterator");
RowKeySet selectedRowKeys = new RowKeySetImpl();
ArrayList list = new ArrayList();
Row r = iter.getCurrentRow();
Key k = r.getKey();
list.add(k);
selectedRowKeys.add(list);
treeTable.setSelectedRowKeys(selectedRowKeys);
AdfFacesContext adfc = AdfFacesContext.getCurrentInstance();
adfc.addPartialTarget(treeTable);
}Hello:
Do you mean setting the selectedRowKeys in the setter method of the treeTable in the Request Scoped Managed Bean?
If that is what you mean, I tried that and there was no change in behavior. (Still does not highlight the correct row in the tree table upon execution of the next method for the bindings) Does anyone have any sample code they can provide that works?
Thanks for the help. -
"Rows to Repeat at top" Not Available in Excel 2010
Hello, All!
Here I am with another question... Maybe someday when I grow up, I'll be able to
answer a few questions! ;-{)
I am creating a PDF via Adobe Acrobat Professional 9 and Excel 2010 and want to have the title row appear on the top of each of the 140+ pages, but when I go to the
Page Setup and select the Sheet Tab, the
Rows to repeat at top is unavailable.
Excel was fully installed as part of Office Professional Plus 2010 and Acrobat was fully installed as part of Adobe Design CS4.
Thanks in advance for your help!Hi,
Based on my research,
if you have more than one worksheet selected, the
Rows to repeat at top and Columns to repeat at left
boxes are not available in the Page Setup dialog box. To cancel a selection of multiple worksheets, click any unselected worksheet. If no unselected sheet is visible, right-click the tab of a selected sheet, and then click
Ungroup Sheets on the shortcut menu.
Quote from:
http://office.microsoft.com/en-us/excel-help/repeat-specific-rows-or-columns-on-every-printed-page-HA010342842.aspx
Jaynet Zhang
TechNet Subscriber Support
If you are
TechNet Subscription user and have any feedback on our support quality, please send your feedbackhere. -
Hi.
I'm using Apex 4.2.0 against Oracle 11gR2 and using mod_plsql. I'm searching for a good way to highlight a row (both the text and the background) in a report (both Classical and Interactive) when clicking an edit icon in the row and to preserve the highlighting as a way to give users context as they look at other regions, say, a form on the same page.
I've seen solutions for this: everything from placing calls to a Javascript function within a custom report template to using css styles. Unfortunately, thus far, these all fall short in that they "work" for only certain Apex themes or when using certain browsers. If users look at my app in IE 9, they see the row highlighted. But in Firefox 14, it is not. Or if a developer changes the theme, the highlighting may or may not work.
Does anyone know of a method that just plain works for any Apex theme and for any modern browser (IE 9+, Firefox 15+, Chrome, etc.). I sure would appreciate pointers to working code.
Thank you.
ElieMy question was answered by a talented person named Neelesh Shah on the Apex LinkedIn Forum page. Here is the link to our exchanges:
http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&discussionID=198216434&gid=82082&commentID=111109223&trk=view_disc&ut=1K9ux3Q2VTcBA1
Thanks very much, Neelesh.
Elie -
How do I deselect a row in table control on scrren?
Hello All:
How do I write the code to deselect a row in table control on a screen? This is in dialog programming.
Thanks.
MithunI thought that the descriptions given in the Help are clear.
The ADDRESS function constructs a cell address string from separate row, column, and table identifiers.
ADDRESS(row, column, [type], [style], [table])
row: The row number of the address.
column: The column number of the address.
I dropped the comments about type, style and table as I don't use them here.
=IF(ISBLANK(INDIRECT(ADDRESS(ROW(),1))),"",INDIRECT(ADDRESS(ROW(),2))*INDIRECT(A DDRESS(ROW(),3)))
INDIRECT(ADDRESS(ROW(),1))
returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 1st one)
INDIRECT(ADDRESS(ROW(),2))
returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 2nd one)
INDIRECT(ADDRESS(ROW(),3))
returns the contents of the cell whose row is the same than the one containing the formula \[the row number is given by ROW()] and whose column is the 3rd one)
In short, when the formula is applied in row 9 it behaves like:
=IF(ISBLANK(A9),"",B9*C9)
The long syntax is required to be able to enter it only once in the header cell as described in the Help and in the PDF User Guide in a chapter entitled "Applying a Formula Once to Cells in a Column or Row".
As we want to use such a formula, it would be odd to destroy its ability using a different formula in a standard bottom row.
More, in a footer row, we may use shorter formulas than in other rows.
In a standard row 10 we would have to write =SUM(D2:D9)
in a footer row we enter only =SUM(D) which add the contents of every standard cells of the column D.
This feature is also described in the named resources.
Yvan KOENIG (from FRANCE vendredi 3 octobre 2008 18:21:13) -
Nested Tables - Unable to make Table Header row to repeat in subsequent pages
Hi,
I am unable to make the header row to repeat in subsequent pages for nested tables.
Can anyone reply with a sample form to illustrate a similar scenario?
Thanks,
RohitHi All,
I have selected the the check box Insert Header Row in Subsequent Pages then also the header is not getting flowed in subsequent pages only till 2nd page its getting flowed.
I have used table wizard to create table and i have made the table subform as flowed then also table header is not repeating in subsequent pages.
MainForm (Flowed)
TableSubform1(Flowed)
Table1
HeaderRow
Row1
TableSubform2(Flowed)
Table2
HeaderRow
Row1
I selected TableSubform1 and in Pagination tab OverFlow Leader dropdown i selected HeaderRow, the same i did for TableSubform2 also but the table header is not getting repeated in subsequent pages.
Please help me in solving this problem.
Regards,
Bala Baskaran.S -
BDC : to select different rows in table control
Hi,
I have to fill many rows in table control and want to select different row one by one in increasing order which rows are filled in BDC.
Can anybody suggest me with coding...
thanks
nareshHi ,
I am attaching sample code for BDC transaction code is : FV11 , This code is also contains poage down concepts . By using this page down concept you can add number of item fields
Program Name : ZFV11_NEW
Program Description : To Upload Condition Records-FV11
Author : Jagadish
Start Date : 11/06/2007
REPORT zfv11
NO STANDARD PAGE HEADING LINE-SIZE 255.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE ***
TABLES : t100.
DATA: BEGIN OF record OCCURS 0,
data element: KSCHA
kschl(004), "Condition Type
data element: SELKZ_LIST
selkz(001),
data element: WERKS_D
werks(004), "Plant
data element: ELIFN
lifnr(010), "Vendor
data element: MATNR
matnr(018), "Material No.
data element: KBETR_KOND
kbetr(016), "Amount
data element: KODATAB
datab(010), "Condition Validity Date from
data element: KODATBI
datbi(010), "Condition Validity To
data element: MWSKZ
mwsk1(002),
END OF record.
DATA : BEGIN OF it_new OCCURS 0, " Internal Table for Header Data
kschl(004),
werks(004),
lifnr(010),
END OF it_new.
DATA : BEGIN OF it_item OCCURS 0, " Internal table for Item Data
werks(004),
lifnr(010),
matnr(018),
kbetr(016),
datab(010),
datbi(010),
mwsk1(002),
END OF it_item.
DATA : cnt(2) TYPE n,
fld(25) TYPE c.
TYPE-POOLS: truxs.
DATA: it_raw TYPE truxs_t_text_data.
DATA : n TYPE n.
DATA:
BEGIN OF t_data OCCURS 0,
data TYPE string,
END OF t_data.
DATA:BEGIN OF it_mess OCCURS 0,
msgtyp(5),
lms(200),
msgv1(50),
END OF it_mess.
DATA : p_mode TYPE c.
DATA:it_msgtab TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE,
it_msgtab1 TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.
DATA : l_mstring(150).
DATA : BEGIN OF bdcdata OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdcdata.
PARAMETERS : p_file1 LIKE rlgrap-filename.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
PERFORM file_selection.
PERFORM data_upload.
PERFORM table_control.
LOOP AT it_new.
REFRESH bdcdata.
PERFORM bdc_dynpro USING 'SAPMV13A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-KSCHL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RV13A-KSCHL'
it_new-kschl.
PERFORM bdc_dynpro USING 'SAPLV14A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV130-SELKZ(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1363'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KONP-KBETR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KOMG-WERKS'
it_new-werks.
PERFORM bdc_field USING 'KOMG-LIFNR'
it_new-lifnr.
DATA: "X(5) TYPE N,
N(5) TYPE N.
N = 0.
LOOP AT it_item.
N = N + 1.
ENDLOOP.
"X = 1.
CNT = 1.
DO N TIMES.
IF CNT > 19.
perform bdc_field using 'BDC_OKCODE' 'KOMG-MATNR(01)'.
perform bdc_field using 'BDC_OKCODE' '=P+'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1363'.
CNT = 1.
ENDIF.
cnt = 1.
LOOP AT it_item WHERE werks EQ it_new-werks AND lifnr EQ it_new-lifnr . "FROM x TO x.
CONCATENATE 'KOMG-MATNR(' cnt ')' INTO fld.
PERFORM bdc_field USING fld it_item-matnr.
CONCATENATE 'KONP-KBETR(' cnt')' INTO fld.
PERFORM bdc_field USING fld it_item-kbetr.
CONCATENATE 'RV13A-DATAB(' cnt ')' INTO fld.
PERFORM bdc_field USING fld it_item-datab.
CONCATENATE 'RV13A-DATBI(' cnt ')' INTO fld.
PERFORM bdc_field USING fld it_item-datbi.
CONCATENATE 'KONP-MWSK1(' cnt ')' INTO fld.
PERFORM bdc_field USING fld it_item-mwsk1.
cnt = cnt + 1.
if cnt = 20.
perform bdc_field using 'BDC_OKCODE' 'KOMG-MATNR(19)'.
perform bdc_field using 'BDC_OKCODE' '=P+'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1363'.
CNT = 1.
endif.
CLEAR it_item.
ENDLOOP.
ENDDO.
PERFORM bdc_dynpro USING 'SAPMV13A' '1363'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KONP-MWSK1(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
CALL TRANSACTION 'FV11' USING bdcdata MODE 'A'
UPDATE 'S'
MESSAGES INTO it_msgtab.
CLEAR bdcdata[].
PERFORM error.
ENDLOOP.
Start new screen -Subroutine for screen s *
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field -Subroutine for field s *
FORM bdc_field USING fnam fval.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDFORM. "BDC_FIELD
*& Form file_selection
FORM file_selection .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'P_FILE1'
IMPORTING
file_name = p_file1.
ENDFORM. " file_selection
*& Form data_upload
FORM data_upload .
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = p_file1
TABLES
i_tab_converted_data = record
EXCEPTIONS
conversion_failed = 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.
ENDFORM. " data_upload
*& Form error
FORM error .
LOOP AT it_msgtab.
IF it_msgtab-msgtyp = 'E'.
SELECT SINGLE * FROM t100 WHERE sprsl = it_msgtab-msgspra
AND arbgb = it_msgtab-msgid
AND msgnr = it_msgtab-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH it_msgtab-msgv1 INTO l_mstring.
REPLACE '&2' WITH it_msgtab-msgv2 INTO l_mstring.
REPLACE '&3' WITH it_msgtab-msgv3 INTO l_mstring.
REPLACE '&4' WITH it_msgtab-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH it_msgtab-msgv1 INTO l_mstring.
REPLACE '&' WITH it_msgtab-msgv2 INTO l_mstring.
REPLACE '&' WITH it_msgtab-msgv3 INTO l_mstring.
REPLACE '&' WITH it_msgtab-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
it_mess-msgtyp = it_msgtab-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = it_msgtab-msgv1.
APPEND it_mess.
WRITE: / it_msgtab-msgtyp, l_mstring(150).
ELSE.
WRITE: / it_msgtab.
it_mess-msgtyp = it_msgtab-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = it_msgtab-msgv1.
APPEND it_mess.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " error
*& Form table_Control
FORM table_control .
SORT record BY lifnr matnr.
LOOP AT record.
ON CHANGE OF record-lifnr.
MOVE-CORRESPONDING record TO it_new.
APPEND it_new.
ENDON.
MOVE-CORRESPONDING record TO it_item.
APPEND it_item.
ENDLOOP.
ENDFORM. " table_Control
Reward if useful
Thanks
Jagadeesh.G
Maybe you are looking for
-
Website not viewing properly in browsers
I am totally not a web designer so any input would be appreciated. For now let's just deal with my agencies homepage, http://www.casra.org/casra/home.html and hopefully any fixes I can take to other pages having problems. In Firefox, part of my heade
-
How can i get help by Administrator online.
All Administrator off-line, I cannot get help from the Administrator. I am really urgent !
-
Hi guys, I am SAP certified professional and wanted to install IDES on my computer. I went in service.sap.com -> Downloads -> Software Distribution Center -> Entry by application group and SAP Netweaver. It says no Data Available. Where can i find ID
-
Installation issues with JAVA 2 SDK
I am getting the following error message when installing the Java sdk: Internal error 2755.1624 http://java.sun.com/webapps/download/getfile/1.4.2_1-b06/windows-i586/Java 2 SDK, SE V1.4.2_01.MSI Any ideas anyone ? HAVE MET ALL SYSTEM REQUIREMENTS so
-
Lost and then found the Settings icon on iPad 2. Can I prevent this?
I just got an iPad2 several weeks ago and love it. Today I discovered that the settings icon was gone from the Home Page. Not on the second page either. I found some suggestions on this forum (by searching "google" which is much easier and takes yo