HOW TO REFER TO A PARTICULAR LINE IN A SCREEN FETCHED BY A MULTILINE QUERY
Hi,
Can anyone help me with an answer for the following problem:
I have a screen where multiple records are displayed by a query. I want to change certain columns in each record and re-insert as new new record in to the same table. Can anyone tell me how to do that.
Thanks & regards,
VASUDEVAN
my email is [email protected]
I just want to make sure, this is the only way to do what i mentioned ? or it could be done another way !a) write the data to a new file
b) delete the old file
c) write the data to a newer file
d) delete the new file
e) rename the newer file to the old file name.
For a hint about still more ways to do this, search for the complete lyrics of One man went to mow, Went to mow a meadow...
db
Similar Messages
-
How to delete and edit particular line in a file and save it in same file ?
Hi,
I want to delete and edit text at particular line in a file.
But edit and delete should reflect in same file.
I have done googling for this but it results with using another file, that i dont want as i need to save changes in same file.
How can i do this?
Thanks in advance
Edited by: vj_victor on May 24, 2010 3:33 PMI just want to make sure, this is the only way to do what i mentioned ? or it could be done another way !a) write the data to a new file
b) delete the old file
c) write the data to a newer file
d) delete the new file
e) rename the newer file to the old file name.
For a hint about still more ways to do this, search for the complete lyrics of One man went to mow, Went to mow a meadow...
db -
How to refer to a particular field in Table Control.
Hi,
How can we refer to a particular field in a table control like 5th row 6th column. The actual requirement of mine is, i have a column with listbox. For each row i need to have different values for the list box. So i need to refer to that particular field in the column and assign the list values. Please kindly help.
Regards,
Vinay.hi,
TABLE CONTROL -
http://www.geekinterview.com/Interview-Questions/SAP-R-3
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm
http://www.sapgenie.com/abap/example_code.htm
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
Eg of table Control:
http://members.aol.com/_ht_a/skarkada/sap/table_control/
table_control.htm
http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
Table control in BDC
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/45/adee2396f711d1b46b0000e8a52bed/frameset.htm
Regards,
Laxmi -
How to refer to a particular message
Hi all,
In java mail api's it is mentioned
Since message numbers can change within a session if the folder is expunged , clients are advised not to use message numbers as references to messages. Use Message objects instead.
but while developing web based email system ( like yahoo).....
i first collect 10 msgs from folder and display them .
now to give some reference to these 10 msgs i need to give some identification so that when user selects one of these message it would lead to different screen which will display the content of that message.
And this identification is message No. In the other screen i get this message no use this method
folder.getMessage( msgno);
Giving message number identification is unsafe only when user do some delete action on that folder. In my programme after deleting the message the folder is expunged closed and re-opened and then again 10 msgs are displayed on screen.
I guess it wont be a problem.
In API's it is said that instead of message number message objects can be used for reference. But i cant find any method in folder class where i can get a message with any other reference than message number.
does anyone have a better solution to this.When you perform a Folder.getMessages() you get an array of Messages returned. This is your list of objects that reference messages. The api doc states that this reference always refers to a message regardless of whether the message number changes due to an expunge. So this insulates you from the volatility associated with message numbers.
The issue you have to deal with is whether a change took place to inbox in between the time you performed the Folder.getMessages()] and the next action upon the mailbox. Specifically, you should code to handle the expunging of the message outside of your application, by testing isExpunged and catching MessageRemovedExceptions. With every interaction you should refresh the message list, ingoring messages marked as expunged.
I hope that helps. -
Report Painter: How to change the order of lines in selection screen
Dear Gurus on Report Painter,
how can I change the order of the lines (where the values for the variable selection of my cost center report are entered) in the selection screen of a report painter report? The Selection screen looks awful.
Is there also a possibility to add another description to each line of the selection screen?
Thank you very much for your advice.
Best regards TimoI am afraid you have much choice in choosing the order of the selection parameters. However, with the developer's access you may.
This is how!
Step 1: If it is a standard report, copy to your own report. and assign it to a report group. and execute.
Step 2: When you execute, and the selection appears, go to systems>status and here , copy the program name (it may look something like GP46LP6VEDORBSA2IHWYSR4TL58020)
Step3: Go to SE38 and enter the above derived program name with a view to re-arrange the line withing the program, with reference to selection parameters.
For example: I have a selection screen in the following order:
Controlling area
Fiscal Year
From period
To period
Plan version
Cost center group
Or value(s)
Cost element group
Or value(s)
The corresponding program that drives this order is in the program and would look like this,
SELECTION-SCREEN BEGIN OF BLOCK VALUE_SELECTION
WITH FRAME TITLE TEXT-003.
<b> PARAMETERS: $1KOKRE LIKE CCR1S-KOKRS .
PARAMETERS: %1KOKRE LIKE CCR1S-KOKRS MODIF ID IN4.</b>
<b><i> for controlling area</i></b>
PARAMETERS: $1GJAHR LIKE COSP-GJAHR .
PARAMETERS: %1GJAHR LIKE COSP-GJAHR MODIF ID IN4.
<b><i> for fiscal year</i></b>
PARAMETERS: $1PERIV LIKE COSP-PERBL .
PARAMETERS: %1PERIV LIKE COSP-PERBL MODIF ID IN4.
<b><i> for period from</i></b>
PARAMETERS: $1PERIB LIKE COSP-PERBL .
PARAMETERS: %1PERIB LIKE COSP-PERBL MODIF ID IN4.
<b><i> for period to</i></b>
etc.
PARAMETERS: $1VERP LIKE COSP-VERSN .
PARAMETERS: %1VERP LIKE COSP-VERSN MODIF ID IN4.
PARAMETERS: $1VALUTP LIKE CCR1S-VALUTYP MODIF ID IN4 .
PARAMETERS: %1VALUTP LIKE CCR1S-VALUTYP MODIF ID IN4.
SELECTION-SCREEN END OF BLOCK VALUE_SELECTION.
......... set variables ..............................................
SELECTION-SCREEN BEGIN OF BLOCK SET_SELECTION
WITH FRAME TITLE TEXT-004.
PARAMETERS: $1KOSET LIKE RKSB1-KSGRU.
PARAMETERS: %1KOSET LIKE RGSBS-SETNR MODIF ID IN5.
SELECT-OPTIONS _1KOSET FOR CCR1S-KOSTL .
PARAMETERS: $1KSTAR LIKE RKSB1-KAGRU.
PARAMETERS: %1KSTAR LIKE RGSBS-SETNR MODIF ID IN5.
SELECT-OPTIONS _1KSTAR FOR CCR1Z-KSTAR .
SELECTION-SCREEN END OF BLOCK SET_SELECTION.<i></i><b></b>
If you want fiscal year to appear first, you try just copying the coding relating to fiscal year just above the coding for Controlling area.
Extend the same logic for what you may want to get. -
Editable ALV - Particular Lines Display and Edit Problem
Hi,
I have developed a program which updates the Custom tables in the database.
I am using cl_gui_alv_grid in the module pool program. I am making all the fields editable using ls_fcat-edit = 'X'.
But as per my requirement in the change mode of the same data base entry, the user should not be able to change the existing data (like PO line items).
My requirement is for a particular Purchase Order if there are line items, when I open the Purchase Order in the change mode all the existing line items should be in display mode and I need to provide the user to add more lines.
Say the PO has 3 line items, in the Grid, it should be like all the existing 3 line items should be in display mode and rest of the lines should be in editable mode which will give the option for the user to add more line items for the same PO.
Here it is not Purchase Order, I just compared as an example.
Logic I am using.
I am building the internal table with a serial numbers from 1-99 and this particular column will be in display mode in the ALV Grid. Using the class cl_gui_alv_grid.
Capturing all the data entered using event handler with method handle_data_changed.
Please tell me how do I set the particular lines in display mode and others in editable mode within the same internal table.
ThanksHi Prabhu,
thanks for the logic, but for some reason the it is not working for me. Please see the below logic and let me know what I am missing.
I am not passing anything related to style to the method Set table for first display.
Is this correct it_outtab = gt_outtab[].
or because of the below method
CALL METHOD g_grid->set_ready_for_input the lines are not actually coming in display mode
DATA : BEGIN OF gt_outtab OCCURS 0.
INCLUDE TYPE zaodoperation.
DATA: celltab TYPE lvc_t_styl ."--->for styles.....
DATA: END OF gt_outtab.
DATA ls_celltab TYPE lvc_s_styl .
DATA lt_celltab TYPE lvc_t_styl .
DATA v_tabix TYPE sy-tabix.
IF gt_outtab[] IS NOT INITIAL.
*Setting the non editiable mode
LOOP AT gt_outtab INTO gs_outtab.
IF gs_outtab-heatnum IS NOT INITIAL.
LOOP AT gt_fieldcat INTO gs_fieldcat.
ls_celltab-fieldname = gs_fieldcat-fieldname.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled."-->no edit.....
INSERT ls_celltab INTO TABLE lt_celltab.
ENDLOOP.
INSERT LINES OF lt_celltab INTO TABLE gs_outtab-celltab.
MODIFY gt_outtab FROM gs_outtab.
CLEAR : gs_outtab.
* else.
* v_tabix = sy-tabix.
ENDIF.
* delete gt_outtab INDEX v_tabix.
ENDLOOP.
ENDIF.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
it_toolbar_excluding = gt_exclude
CHANGING
it_fieldcatalog = gt_fieldcat
it_outtab = gt_outtab[].
* set editable cells to ready for input
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
CALL METHOD g_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
Thanks -
How to highlight the whole row of a particular line item of sale
How to highlight the whole row of a particular line item of sales order depending on condition?
Please help its urgent..
Looking forward your reply.
Moderator message: please do more research before asking, show what you have done yourself when asking, do not flag posts as "urgent".
[Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
[Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
Edited by: Thomas Zloch on Aug 9, 2011 9:30 AMAny ideas on what would cause this NOT to work? I added this row right after the table is created and populated and it is still not highlighted when I enter the form. The snippet of code that does this is:
MyTableModel modelS = (MyTableModel)dataModel.get("S");
jTable1 = new JTable(modelS);
jTable1.setRowSelectionInterval(0,0);MyTableModel is this:
class MyTableModel extends DefaultTableModel {
public MyTableModel(Object[] columnNames, int numRows) {
super(columnNames, numRows);
public boolean isCellEditable(int row, int column) {
if (TableKey == 'S') {
if (column == 6) {
return false;
if (TableKey == 'O') {
if (column == 0 || column == 4 || column == 5) {
return false;
if (TableKey == 'P') {
return false;
return true;
}Can anyone help? Thanks.
Allyson -
How to visualiza just particular lines in InfoView report
Hi, I'd like to know how to visualize in InfoView report that contatin following variables ="ID, TypeNUM, Value"
just lines that have populate TypeNUM with the Maximium value for single ID like in the following example:
Starting table
ID TypeNUM Value
001 50 1000
001 100 500
002 60 750
003 50 1000
003 120 1000
003 30 500
Result:
ID TypeNUM Value
001 100 500
002 60 750
003 120 1000
thank you in advanceHi Dennis,
We got it.We need to use below code when we want to delete a particular line in between the column headers.
Thanks for ur inputs
#__column1{
border-left: none !important;
#__column0
border-right: none !important; -
How to refer a particular filed of a Table data type
DECLARE
CURSOR C1 IS SELECT
GLUSR_USR.GLUSR_USR_ID BYER_ID,
GLUSR_USR.GLUSR_USR_ADD1 BUYER_ADD
FROM
GLUSR_USR
WHERE
ROWNUM<=5;
TYPE TBL_TYPE IS TABLE OF C1%ROWTYPE;
TBL TBL_TYPE;
BEGIN
OPEN C1;
FETCH C1 BULK COLLECT INTO TBL;
CLOSE C1;
FORALL I IN 1..TBL.COUNT
INSERT INTO SATYA_TEMP VALUES(TBL.BYER_ID,TBL.BUYER_ADD);(How to use a particular field of TBL in this case).
--INSERT INTO SATYA_TEMP VALUES TBL(I); (I know this)
END;
My question is how to refer a particular field of table type..?
Please suggest.Then you have to create a record type and give all the columns inside it as given below.
Then you can create a variable for this type and use it
Type IS RECORD OF
columnname1 table_name.column_name1%type,
columnname2 table_name.column_name2%type,
columnname3 table_name.column_name3%type,
OR Use
rec table%ROWTYPE;
Edited by: Geek vishal on Aug 4, 2011 12:54 PM -
How to read the particular line in a file !!!
i want to read the 5th , 8th or some other line number of the file. This file is consists of many data arranged by line number. I'm able to retrieve the LineNumber of the file but i'm not able to point the curser to that particular line so it can read that line only.
i'm pointing the cursor to that particular linenumber as in.setLineNumber(5) it moves to that particular line but after that when i try to read that particular line i'm not able to read that line.
could any one tell me which is the other way to read that particular line or in this only where i'm doing wrong...
i need this urgent....As is typical of people who claim their problem is urgent, you posted this in the wrong forum (it doesn't have anything to do with JSP) and you left out any details that might help us understand what you are blathering about.
So take a deep breath. It isn't urgent. There is no rush. Now formulate a proper description of your problem and post it in the proper forum. -
To Set Goods Receipt Indicator For Particular Line Items In SRM
Hi All,
i am working on BBP_DOC_CHANGE_BADI in SRM. i am trying to set the goods receipt indicator for particular line items based upon certain conditions. The values are being set in the badi. But when the Purchase Order is created in the backend R/3 i coudn't able to find the goods receipt indiactor being set..
i used this field to set the GR indicator
GR_IND = 'X'. " Goods Receipt Indicator
Can anyone help me in this?
helpfull answers will be rewarded....
Thanks,
MuraliTo Murali and Christophe,
I have set the GR and GR non val indicator in CREATE_PO BADI but I face the following situation :
problem -
In case of multiple account assignment in the shopping cart, the R/3 transaction ME21N sets these flags.
The flag status determined as per EBP conditions is lost.
I need to retain the flag status as per EBP conditions even in this multiple account assignment scenario.
proposed solution -
- CREATE PO badi is already implemented in EBP and customised logic for GR and GR non valflag is in place.
- I create user exit in R/3 backend system in ME21N transaction
- I make RFC call in this user exit to EBP and check the table BBP_PDPSET for the shopping cart.
This is how I get the flag status as per EBP conditions and copy the same to R/3 thereby overriding the multiple account assignment check of the R/3 system.
issue -
When I tried to verify that I can check the BBP_PDPSET table from R/3, I found that this table is not having entries for all the records in CRMD_ORDERADM_I table.
For which shopping carts will the BBP_PDPSET table not be populated ?
thank you in advance,
Bhakti. -
How to dispaly items of Particular Sorder of IT into single row in alv dis?
Hi,
Experts,
I have an Sales order internal table along with its corresponding items
i want to display those items in side by side in alv display.
Ex:
Vbeln posnr netwr waerk
56800 10 21.00 Col
56800 20
56800 30
56800 40
I want to display:
Vbeln posnr posnr2 posnr3 posnr4 netwr waerk
56800 10 20 30 40 21.00 Col
I have added columns how can pull data into particular columns .How can i achieve this if any idea or input or suggestions please far word to me.
Thank You,
Shabeer ahmed.Hi,
Using basic report you can do like this:
DATA: BEGIN OF itab occurs 0,
sku(10) TYPE c,
month(2) TYPE n,
qty(2) TYPE n,
END OF itab.
itab-sku = 'AA'.
itab-month = '01'.
itab-qty = 10.
APPEND ITAB.
itab-sku = 'AA'. itab-month = 02. itab-qty = 20. APPEND ITAB.
itab-sku = 'AA'. itab-month = 03. itab-qty = 20. APPEND ITAB.
itab-sku = 'BB'. itab-month = 01. itab-qty = 20. APPEND ITAB.
itab-sku = 'BB'. itab-month = 02. itab-qty = 40. APPEND ITAB.
itab-sku = 'CC'. itab-month = 02. itab-qty = 50. APPEND ITAB.
itab-sku = 'CC'. itab-month = 03. itab-qty = 10. APPEND ITAB.
itab-sku = 'CC'. itab-month = 04. itab-qty = 20. APPEND ITAB.
PERFORM LIST.
FORM LIST.
data: cl like itab-sku.
SKIP TO LINE 3.
LOOP AT ITAB.
if cl <> itab-sku.
write : / itab-sku.
else.
write : ''.
endif.
write : itab-qty.
cl = itab-sku.
ENDLOOP.
ENDFORM.
Regards,
Bhaskar -
How to delete the Cost center line item data
How to delete the cost center line item data of particular cost center and only one cost center is exisiting for that company code.
Is there any way to delete the line items in that cost center.
Can data archiving & deleting can help us..........
does it have any effect over other cost center data....
any input needed.........
regards
rajeshHi,
i found 2 reports for you:
1) CO_TOTAL_WRI - Archiving CO Totals Records
2) RKCOITW1 - Archiving CO Line Items: Write Program
from 2) is a linlk to customize archiv-parameters
-> start it with transaction se38 / sa38
A. -
How to refer a .jar file in the code.
How to refer a .jar file in the code.
I want to use a library dnsjava.jar, which I download from the internet. I want to know how to refer it
If I am compiling the code on Solaris
If I compiling the code on windows using eclipse.
I added the following line in my code to refer to this library. But it always complains of not found the class
import org.xbill.DNS.*;
I tried the following to add this library but did not work
On eclipse/windows: Went to window-> preferences -> BuildPath _> class path Variable.
On Solaris: Could not add this library /opt/java_reference/v1.6.0_04/jre/lib. Although I am logged in as root, but not able to add the library there. Complains of Permission denied.Set the classpath option when compiling.
javac -classpath /path/to/lib/dnsjava.jar YourProgram.java
I don't use Eclipse, but it probably has a library list on your project preferences. Add it there.
Regards,
Henrique Abreu -
How to refer to Excel tables (ListObjects) in PowerPivot
I am trying to figure out how to import ListObjects in PP.
As far as I can tell PP does not seem to "see" range names that refer to entire ListObjects i.e. =T_DTL[#All], while it "sees" ranges that refer to direct cells i.e. =Dtl!$O$3:$V$46.
Is that correct and is there a way to work around it?
The reason I am asking is that the tables I want to work with do not necessarily start on line 1 and PP references entire worksheets i.e. Dtl$, as per my example above.I tried different approaches with dynamic ranges but PP refuses to present them as choices
while Selecting Tables and Views. The only way to achieve what I need is by creating named ranges with hardcoded start and end, which is a bit odd since Tables (ListObjects) are a powerful tool since Excel 2007 and I would expect a stronger integration with
other powerful tools such as PowerPivot.Apart from the overhead of having to go through each workbook and define a range for every Table I wish to use.
Am I missing something here?My PowerPivot attempt was abruptly broken about a month ago, hence my very late reply.
Peter is quoting VBA statements on how to refer to a Table (ListObject), which is familiar to me as I am also writing VBA code. Unfortunately my problem is in interactive mode, not in code execution.
When we open a file's PowerPivot window from within Excel we are prompted to select the tables we want to work with. That is where I cannot see my ListObjects / Tables. I am presented with all ranges that PowerPivot sees as declared in the file that I am
opening (as in Formulas / Names Manager) EXCEPT for the ListObjects. Those are missing.
Try it if you will and let me know if this behavior is relevant only to my installation or to yours as well.
George Thalassinos
Maybe you are looking for
-
HI, I have an IMac with 4 G of Ram and am using Apeture 3.51. When trying to edit CS2 raw files I experience frequent crashes and freez ups of the whole computer. Any suggestions?
-
Problem with trasferring music from Itunes to Iphone
Hi I have a problem with trasferring music from Itunes to Iphone and that is, as soon as I finish transferring music to my Iphone, Itunes suddely stops at the stage of where it says (at the top-centre of the screen), 'Sync Min's Iphone'. Due to this
-
Using Beans First time...
I'm relatively new to JSP. This is basically the error I recieve using latest Tomcat... : cannot resolve symbol symbol : class Wallet location: class org.apache.jsp.Wallet_jsp Wallet foo = null; Wallet.class is in myApp/WEB-INF/classes/Wallet.class T
-
I'm organizing my songs for itunes mac, and I have two albums with the same name but with different songs, how do I put everything in one albu
-
hello to all, i was looking on the oracle's website for the installation guide of 11g and i was able to find it only for linux. could anyone please tell where can i find the installer guide for windows? thank you!