How to execute the hardcode line
i have a problem that i want to do the looping and copy to the itab_shipmark
when read 1 line, then copy to itab_shipmark. (the field will change depend on number of looping as sy-tabix)
let say, there is 7 rows and loop 7 times
i want to execute when looping
clear itab_shipmark.
loop start...
1st time : move t_tline-tdline to itab_shipmark-row1.
2nd time: move t_tline-tdline to itab_shipmark-row2.
7th time: move t_tline-tdline to itab_shipmark-row7.
end loop.
append itab_shipmark.
see the following draft coding ***************
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = '002'
LANGUAGE = SY-LANGU
NAME = THE_TDNAME
OBJECT = 'VBBP'
TABLES
LINES = T_TLINE1
EXCEPTIONS
IF SY-SUBRC = 0.
CLEAR ITAB_SHIPMARK.
LOOP AT T_TLINE1.
tindex = sy-tabix.
concatenate 'itab_shipmark-row' tindex into tshipmark.
concatenate 'move t_tline-tdline to' tshipmark into tshipmark.
???? (how to execute move t_tline-tdline to itab_shipmark-row1.)
ENDLOOP.
APPEND ITAB_shipmark.
ENDIF.
ENDFORM. "GET_SHIP_MARK
Hi,
I think you can use the command INSERT <workarea> INTO <table position>. You can use the Loop index (Number of Loop traversal) as the table index for determining the position at which the new line is to be inserted.
Follow the F1 help for the command.
Does that answer the question or I missed something here?
Regards
Barada
Similar Messages
-
How to execute unix command line from cocoa?
how to execute unix command line from cocoa?
for example, if I want to call "ping" from cocoa, how should I do it? and how can I obtain the return value?
thank you.
Power G5 Quad Mac OS X (10.4.3)The following article may also help:
http://cocoadevcentral.com/articles/000025.php
Mihalis.
Dual G5 @ 2GHz Mac OS X (10.4.6) -
How to execute the FM K_COSTS_PLAN_INTERFACE_TOTAL with ranges
Hi All,
can anybody suggest me, how to execute the Function module K_COSTS_PLAN_INTERFACE_TOTAL with range of Cost element(KSTAR)
and what is the field for Cost Element TO
The fm is for tcode KP06
Edited by: Kachi Reddy on Feb 17, 2012 2:26 PMHi, Kachi.
Try this example:
REPORT rkkipl1t.
* The parameters are used to fill the internal table and describe the
* planning object.
PARAMETERS: p_kokrs LIKE tka01-kokrs MEMORY ID cac OBLIGATORY,
p_perab LIKE cobk-perab DEFAULT '001' OBLIGATORY,
p_perbi LIKE cobk-perbi DEFAULT '012' OBLIGATORY,
p_gjahr LIKE cobk-gjahr MEMORY ID gjr OBLIGATORY,
p_versn LIKE cobk-versn MEMORY ID kvt OBLIGATORY,
p_kostl LIKE cssl-kostl OBLIGATORY,
p_kstar LIKE cskb-kstar OBLIGATORY,
p_vrgng LIKE cobk-vrgng DEFAULT 'RKP1' OBLIGATORY,
p_kwaer RADIOBUTTON GROUP ein DEFAULT 'X',
p_owaer RADIOBUTTON GROUP ein,
p_twaer RADIOBUTTON GROUP ein,
p_waers LIKE coss-twaer.
DATA: i_rku01_cur LIKE rku01_cur.
* internal table for function
DATA: itrku01g TYPE TABLE OF rku01g WITH HEADER LINE.
REFRESH itrku01g.
PERFORM fill_itrku01g.
* Which currency is to be used?
IF p_twaer = 'X'.
* planning in transaction currency
i_rku01_cur-wtg_man = p_twaer.
i_rku01_cur-wtf_man = p_twaer.
ELSEIF p_owaer = 'X'.
* planning in object currency
i_rku01_cur-wog_man = p_owaer.
i_rku01_cur-wof_man = p_owaer.
ELSE.
* planning in controlling area currency
i_rku01_cur-wkg_man = 'X'.
i_rku01_cur-wkf_man = 'X'.
ENDIF.
CALL FUNCTION 'K_COSTS_PLAN_INTERFACE_TOTAL'
EXPORTING
* BLTXT = ' '
* COMMIT = 'X'
* DELTA = ' '
gjahr = p_gjahr
kokrs = p_kokrs
messages_show = 'X'
perab = p_perab
perbi = p_perbi
update_values = 'X'
versn = p_versn
vrgng = p_vrgng
* ONLINE_VB = ' '
irku01_cur = i_rku01_cur
* TESTMODE = ' '
* KEEP_TWAER = ' '
TABLES
irku01g = itrku01g
EXCEPTIONS
messages_occured = 1
OTHERS = 2
IF sy-subrc = 0.
MESSAGE s000(15).
* Verbuchung wurde erfolgreich durchgeführt
ENDIF.
* FORM FILL_ITRKU01G
FORM fill_itrku01g.
* fill internal table for function
CLEAR itrku01g.
itrku01g-kostl = p_kostl. "for CCA planning
itrku01g-kstar = p_kstar. "must be filled
itrku01g-wtgbtr = 12000. "value when planning
itrku01g-wkgbtr = 12000. "value when planning
itrku01g-wogbtr = 12000. "value when planning
itrku01g-twaer = p_waers. "transaction currency
itrku01g-fcwkg = '1'. "distribution key must be filled
itrku01g-fcwkf = '1'. "must be filled
itrku01g-fcwkv = '1'. "must be filled
itrku01g-fcmeg = '1'. "must be filled
itrku01g-fcmef = '1'. "must be filled
itrku01g-fcmev = '1'. "must be filled
APPEND itrku01g.
ENDFORM. "FILL_ITRKU01G.
Best regards,
George Shlyahov. -
How to delete the logical lines in JTextArea
Hi all,
Now that I know how to find the logical line count in JTextArea as
I found the following in the forum.
public static int getLineCount (JTextArea _textArea)
boolean lineWrapHolder = _textArea.getLineWrap();
_textArea.setLineWrap(false);
double height = _textArea.getPreferredSize().getHeight();
_textArea.setLineWrap(lineWrapHolder);
double rowSize = height/_textArea.getLineCount();
return (int) (_textArea.getPreferredSize().getHeight() / rowSize);
I want to delete the 4th line to the last line and append ... at the 4th, if the getLineCount exceeds 3. Does any body know how to do so?
The intention is for the multiline tooltip as I just want to show
the first three logical line and ... if the string is too long.
Thanks
PinThe code looks good to me. The only thought I have is that the y coordinate for the rowThree point is wrong and is referencing row four.
I've been playing around with using a JTextArea as a renderer for a JTable. I have it working so that "..." appear when the text exceeds 2 rows. Try clicking on "B" in the letter column and then the update cell button a few times to add text. My code is slightly different than yours.
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
public class TestTable extends JFrame
private final static String LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
JTable table;
Vector row;
public TestTable()
Object[][] data = { {"1", "A"}, {"2", "B"}, {"3", "C"} };
String[] columnNames = {"Number","Letter"};
DefaultTableModel model = new DefaultTableModel(data, columnNames);
table = new JTable(model)
public String getToolTipText( MouseEvent e )
int row = rowAtPoint( e.getPoint() );
int column = columnAtPoint( e.getPoint() );
if (row == 0)
return null;
else
return row + " : " + column;
table.setRowSelectionInterval(0, 0);
table.setColumnSelectionInterval(0, 0);
table.setRowHeight(0,34);
table.setRowHeight(1,34);
table.setRowHeight(2,34);
table.setDefaultRenderer(Object.class, new TextAreaRenderer(2));
JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane );
JPanel buttonPanel = new JPanel();
getContentPane().add( buttonPanel, BorderLayout.SOUTH );
JButton button2 = new JButton( "Update Cell" );
buttonPanel.add( button2 );
button2.addActionListener( new ActionListener()
public void actionPerformed(ActionEvent e)
int row = table.getSelectedRow();
int column = table.getSelectedColumn();
String value = (String)table.getValueAt(row, column);
value += value;
table.setValueAt( value, row, column );
DefaultTableModel model = (DefaultTableModel)table.getModel();
model.fireTableCellUpdated(row, column);
table.requestFocus();
public static void main(String[] args)
TestTable frame = new TestTable();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setVisible(true);
private class TextAreaRenderer extends JTextArea implements TableCellRenderer
public TextAreaRenderer(int displayRows)
setRows(displayRows);
setLineWrap( true );
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
setText( value.toString() );
Dimension d = getPreferredSize();
int maximumHeight = getRows() * getRowHeight();
if (d.height > maximumHeight)
setSize(d);
int offset = viewToModel( new Point(d.width, maximumHeight - 1) );
replaceRange( "...", offset-3, getDocument().getLength() );
return this;
} -
How to delete the specified line in file?
How to delete the specified line in file? In case of deleting a specified line in a file, how to do?
Line 1
Line 2
Line 3
Line 4
Line 5
The case is a file including the above content. Now I wanna to delete the "Line 3" and how to realize the action in Java?An alternative solution can be :
import java.io.LineNumberReader;
import java.io.IOException;
import java.io.File;
import java.io.FileReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.PrintWriter;
public class LineDeleter {
public static void main(String args[]){
try {
//suppose you want to delete line 3
int lineToBeDeleted = 3;
File f = new File("line.txt");
long fileSize = f.length();
//Wrap the FileReader with a LineNumberReader. It will help you
//identify the lines.
LineNumberReader lnr = new LineNumberReader( new FileReader(f));
//Wrap the FileWriter object with BufferedWriter object. Create it with the buffersize
//equal to the file size.
BufferedWriter bw = new BufferedWriter(new FileWriter(new File("line1.txt")),(int)fileSize);
//Wrap BufferedWriter object with PrintWriter so that it allows you
//to print line by line
PrintWriter pw = new PrintWriter(bw);
String s=null;
while ( (s=lnr.readLine())!=null ){
System.out.println(s);
int lineNumber = lnr.getLineNumber();
//match the line number
if(! (lineNumber==lineToBeDeleted)){
pw.println(s);
pw.flush();
lnr.close();
pw.close();
catch(Exception e){System.out.println(e);}
If you want you can rename the line1.txt to the original file name.
I hope this helps.Good luck!!!!!! -
How to handle the multiple line items in the Inbound idoc FM
Hi ,
Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
Thanks in Advance,,,,
Regards,
BharaniHi ,
Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
Thanks in Advance,,,,
Regards,
Bharani -
How can hide the command line of a t.code in the portal
Dear Experts.
I have the following doubt:
How can hide the Command Line of a Report that is called with a T.Code in the portal?
Attach Image:
[Image T.Code|http://www.freeimagehosting.net/uploads/eab3b6a03c.jpg]
When I created a service using the T.Code SICF for the T.Code , I can hide buttons and the filed command line using
~webgui_simple_toolbar
~singletransaction
~NOHEADEROKCODE
With notes 1010519, "SAP GUI for HTML: Simplified Title Area Without Menu and OK Code" and 959417.
But the problem is that when I create the service in the T.Code SICF, I also have that create an Iview IAC in the portal.
The Question is : How can hide this fields and buttons if I want Publish the T.code using an Iview Transaction in the portal?
In this moment I have used the two options:
1 option) I created a service using the t.Code SICF for my Transaction and I also created an Iview IAC in the portal for call the service.
RESULT:
SAP Web Application Server
500 Connection timed out
Error: -5
Version: 7000
Component: ICM
Date/Time: Sat Jun 12 20:26:39 2010
Module: icxxthr_mt.c
Line: 2698
Server: xyxab...
Error Tag: {-}
Detail: Connection to partner timed out after 60s
2) created an Iview Transaction in the portal and call my transaction.
RESULT.
[Image T.Code|http://www.freeimagehosting.net/uploads/eab3b6a03c.jpg]
But not can hide the field Command Line and other buttons.
I think that the command :
~webgui_simple_toolbar
~singletransaction
~NOHEADEROKCODE
Only can be used if I create a service using the T.Code SICF .
Best Regards
Carmen.Hi Carmen,
The bottom line is that this cannot be done for transaction iviews without modifying the standard webgui service in SICF, which is probably not a good idea (since it affects everyone using SAP GUI for HTML). (You could hack the appintegrator to add the ~webgui_simple_toolbar parameter to the transaction URL template in the portal, but again its not a recommended thing to do ...). Better to create an IAC service in SICF with ~webgui=1 where you set the required appearance using an appropriate value for ~webgui_simple_toolbar, and then create an IAC iview to point at this service.
You can even override the ~transaction value configured in the new service in individual IAC iviews by entering the appropriate value in the application parameter of the iview, for example:
~okcode=/nSU01
And you can pass parameters in the same way:
~okcode=/nSU01 USR02-BNAME=xyz;USREFUS-USERALIAS=abc;
By the way, it would not be recommended to create a URL iview to access an IAC, since you are likely to encounter session management issues in this scenario - better to use an IAC iview.
Regards, Rory -
Workflow Questions - How to execute the steps in a workflow automatically?
I am using MDM 5.5 SP6.
My Question is how to execute the steps in the workflow automatically. That means NO user interaction.
I have a simple workflow, Start- Process -- Syndicate - Stop.
When a new record added /updated/inserted this workflow will start automatically. The workflow inbox, the workflow status is u2018Receivedu2019 Step is u2018Processu2019. Now I have to right click on the record then u2018Next Stepu2019 then click on u2018Syndicateu2019 then workflow completes automatically.
How to execute the Syndication step automatically?. I donu2019t want to have any user interaction to syndicate these records.
Is this possible?
The reason for this is I want to do some field validation and based on the field validation some assignments then then I want to syndicate these records without user interaction..Hi,
If you want to do some validations and then based on result assignments on some of the fields before syndicating, then you have to use workflow. Only syndication server will not fulfill this requirement.
you may try by making validation's automatic property as "Error". This way it will not allow to add any record not fulfilling validation. You can also try using calculated fields instead of assignment.
I am not sure if you can make your workflow fully automatic, because atleast one process step is must for any workflow, and process step means user action.
Regards,
Shiv -
How to make the diagonal line in the swing table cell?
Hi all,
How to make the diagonal line in the swing table cell just like the link below?
http://61.132.17.188/webber/table.gifOne improvement.. To get a line that is neat, use a bit of Graphics2D
public void paintComponent(java.awt.Graphics g)
int w = getSize().width;
int h = getSize().height;
// draw a line between (0,0) and (w,h)
g.setColor(getForeground());
if (strTop == null)
strTop = " ";
if (strBottom == null)
strBottom = " ";
java.awt.Graphics2D g2 = (java.awt.Graphics2D)g;
g2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
//g2.setStroke(new java.awt.BasicStroke(14.0f));
g.drawLine(0, 0, w, h);
//the following lines will draw the two strings,
//one above the top of the line and the above below it.
g2.drawString(strTop, (w/2)+2, (h/2)-2);
g2.drawString(strBottom, 2, (h / 2) + 2);
//the x,y for drawString are only based on assumption. //do necessary changes to suit ur needs.
}Then create a TableCellRenderer and set it to the Table Header for ur table's 1st row.....
Cheers -
How to execute the data in the form when the data is already avaliable
Hi,
I am working with forms 6i. I have a problem while executing the data in the form
Actually, the data is already present in the form. But when i run the form, the data is not displayed.
can anyone please help me how to execute the data. below is the code
Set_Alert_Property(alert_id,ALERT_MESSAGE_TEXT,'Do you want to refresh new Data for that Year and Field ? (it will take a time).') ;
SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON1, LABEL, 'Yes');
SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON2, LABEL, 'No');
SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON3, LABEL, 'Cancel');
button_number :=Show_Alert(alert_id) ;
synchronize;
if button_number != ALERT_BUTTON3 then
if button_number = ALERT_BUTTON1 then
:param.field := :control.f_cd;
:param.year := :control.year;
build_tables;
fields;
-- areas(:param.field);
PUT_PARAM;
COMMIT_FORM;
go_block('wet_criterias');
end if;
if button_number = ALERT_BUTTON2 then
:exhibits.field_display := :control.f_name || ' - Exhibits';
go_block('RESERVOIR');
execute_query;
end if;
end if;
end if;
else
message('Fields must be entered...');
end if;
else
message('Fields must be entered...');
end if;It's hard to know what logic you are trying to implement.
However, by looking at your code, it seems that if the user select 'Yes' to the question "Do you want to refresh", nothing is done except the go_block('wet_criterias'). Should there be an 'Execute_Query' ?
No idea... -
How to break the command line in SAP scripts
Hi,
Can any one Please guide me how to continue the command line( /: ) of SAP SCPRIPT into multiple lines.
Regards
KiranHi Kiran,
U can continue in the same line itself by pressing SHIFT+F8
If u want it in the next line then u can give space in the tag column.
Thanks,
Vinod. -
How to execute the parametered stored procedure in sql *plus ?
how to execute the parametered stored procedure in sql *plus ?
my storedprocedure format
CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE
(empDOB out date, empEmpName out varchar2)
thanks & regards
mk_murOh, sorry... making many reading-too-fast mistakes today...
You can't declare date variables in SQL*Plus (seel help var), but you can cast to varchar2:
TEST> CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE (empDOB out date, empEmpName out varchar2) IS
2 d date := sysdate;
3 e varchar2(10) := 'bob';
4 begin
5 empdob := d;
6 empempname := e;
7 end;
8 /
Procedure created.
TEST> var d varchar2(30)
TEST> var n varchar2(30)
TEST> call SMS_SELECTMPLOYEE(:d,:n);
Call completed.
TEST> print d n
D
11/07/06
N
bobYoann. -
How to execute the content of varchar variable like a simple query
Hi everyone!
I did a PL/SQL region in apex, in this region I did the query which is storaged in a variable; it was did it concatenate several times,
in the procedure I have several sentences.
I thought that the command 'execute immediate' would get a good result but it do not print the result.
declare
variable varchar2(1000);
begin
--sentences
--execute inmmediate( variable );
--return variable
end;
I only want to how to execute the content of varchar variable.
For example, suppose that the result of this procedure is
'SELECT SYSDATE FROM DUAL'
How and what do I must do for this query execute like a normal query that is in apex?
I expect your prompt reply.
Thank you for your help.
Best regardsLet us say your table containing SQL is
t_sql_table
and has two columns
primary_key
and
sql_query.
You would need to do the following:
1. Create a Report of type "Function returning SQL Query"
2. Put the following there:
DECLARE
v_query VARCHAR2 (4000);
BEGIN
SELECT sql_query
INTO v_query
FROM t_sql_table
WHERE primary_key = 1;
RETURN v_query;
END;Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
How to execute the logical database.
how to execute the logical database.
There are two ways of using a logical database - either by linking it with the executable program(specify the LDB name in the program attributes) or by using the function module LDB_PROCESS.
1.Data read by the logical database is passed back to the program using the interface work areas.Use GET statements in the report.
GET events are implemented internally as FORM routines.
2.If you call the logical database using the above function module, the selection screen of LDB is not displayed.It uses special subroutines called callback routines, which are called by the function module and filled with the required data.
Please refer the following link for more details.
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm -
How to echo the first line???
Hi everybody,
I need to know how to echo the first line of an XML document with a SAX parser, for example :
<?xml version="1.0"?>I've already tried :
public void processingInstruction(String target, String data) throws SAXException {
System.out.println("Target = (" + target + ")");
System.out.println("Data = (" + data + ")");
}but it doesn't work.
Please, help me...
Thanks.
Maxime.http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPSAX4.html
Maybe you are looking for
-
Midi tempo/key Apple Loops
I tried working with Apple Loops and an extensive external midi rig the other day and came to an impasse at trying to do the following. Any suggestions? I used a ton of Jam pack loops with original loops in exs24 and external modules What I wanted to
-
Dear Gurus, I am using Taxinn procedure. Also At the time of import purchase I am calculating SECess 1 % with the help of Condition JESH . I have assigned this condition at AP AT2 cond. in taxinn and also in prising procedure for import as in import
-
Can i maintain a same number for both the customer and vendor
Hi all, i have a scenario, as a vendor is supplying some assembly components to the client. the client is assembling the components. and sending the same to the vendor since the same person is acting as a vendor and a customer i want a common number
-
When trying to edit work area rules in the RON I am getting the following message: "The error stack that you are attempting to display is empty. There is no message to display." I have tried the same actions on 5 different machines, on three there wa
-
Vista Business won't play anything
I have Vista business on my laptop, upgraded from XP Pro. Since that move my itunes won't play anything...songs or podcasts. I have unintstalled and downloaded and reinstalled itunes but nothing occurs when I click on a song and then play. Anyone els