Using clear statements
Hi Friends,
I am confusing about Clear Statement use in programs..
Which Situtation wse use Clear Statements in programs..
Please clarify.
Regrads,
Kumar.
Moderator Message: You should have read the F1 documentation on CLEAR keyword before posting
Edited by: Suhas Saha on Jun 24, 2011 4:33 PM
I was speaking about these methods without keeping a reference to the Textboxs, like in full declarative syntax.
Stage {
def tbIds = for(n in [0..<10]) "TextBox{n}";
var vbox: VBox;
scene: Scene {
width: 100 height: 250
content: [
vbox = VBox {
layoutX: 10
layoutY: 10
content: [
HBox {
content: [
Button {
text: "Set"
action: function() {
for (id in tbIds) {
//def tb = vbox.lookup(id) as TextBox;
//Also work
def tb = vbox.scene.lookup(id) as TextBox;
tb.text = id
Button {
text: "Clear"
action: function() {
for (id in tbIds) {
def tb = vbox.lookup(id) as TextBox;
tb.text = ""
for (id in tbIds) TextBox {id: id}
}
Similar Messages
-
hi experts,
while printing salesorder i am using a temporrary variable to print the total .if there is two line items it will total and print the qty in the total column .
while seeing preview the total is coming properly .but when we take a print out the value is doubling up .only if we go out of the tcode and enter again it is coming properl;y.
what shall i do for this..
regards,
maniFORM SOprice TABLES intab
STRUCTURE itcsy outtab
STRUCTURE itcsy.
clear :t1.
READ TABLE intab INDEX 1.
gknumv = intab-value.
READ TABLE intab INDEX 2.
gkposn = intab-value.
READ TABLE intab INDEX 3.
l_char = intab-value.
l_char1 = l_char.
REPLACE FIRST OCCURRENCE of ',' in l_char1 with ' '.
gmeng = l_char1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = gknumv
IMPORTING
output = gknumv.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = gkposn
IMPORTING
output = gkposn.
select mwsk1 KSCHL from konv into (mwsk1 , KSCHL) where knumv eq gknumv AND KSCHL EQ 'JIN6'.
ENDSELECT.
select mwsk1 KSCHL from konv into (mwsk1 , KSCHL) where knumv eq gknumv AND KSCHL EQ 'JIN7'.
ENDSELECT.
CASE MWSK1.
WHEN 'A0'.
TAX = 'NIL'.
WHEN 'A1'.
TAX = '4%'.
WHEN 'A2'.
TAX = '3%'.
WHEN 'A3'.
TAX = 'NIL'.
WHEN 'A4'.
TAX = '8%(CST)'.
WHEN 'A6'.
TAX = 'NIL'.
ENDCASE.
SELECT VBELN FROM VBAK INTO I_VBELN WHERE KNUMV EQ gknumv.
ENDSELECT.
SELECT IHREZ_E FROM VBKD INTO TEXT WHERE VBELN EQ I_VBELN AND POSNR NE '000000'.
ENDSELECT.
SELECT AUART FROM VBAK INTO AUART WHERE VBELN EQ I_VBELN.
ENDSELECT.
IF AUART EQ 'YOR' OR AUART EQ 'YTS' OR AUART EQ 'YRE' OR AUART EQ 'YKA' OR AUART EQ 'YKB'
OR AUART EQ 'YKE' OR AUART EQ 'YKR'.
SELECT kawrt kwert FROM konv INTO (gkawrt , gkwert) WHERE knumv = gknumv AND kposn = gkposn AND kschl = 'JIN6'.
ENDSELECT.
gfinal = gkawrt + gkwert.
tmeng = tmeng + gmeng.
tqty = tmeng.
select kBETR from konv into t1 where knumv = gknumv and kposn = gkposn and kschl eq 'PR00'.
ENDSELECT.
PRICE = T1.
elseif auart eq 'ZCV'.
tmeng = tmeng + gmeng.
tqty = tmeng.
select kBETR from konv into t1 where knumv = gknumv and kposn = gkposn and kschl eq 'JASS'.
ENDSELECT.
SELECT kawrt FROM konv INTO gkawrt WHERE knumv = gknumv AND kposn = gkposn AND kschl = 'JIN6'.
ENDSELECT.
SELECT kawrt FROM konv INTO gkawrt WHERE knumv = gknumv AND kposn = gkposn AND kschl = 'JIN7'.
ENDSELECT.
dPRICE = GKAWRT / gmeng.
PRICE = T1 + DPRICE.
ELSE.
tmeng = tmeng + gmeng.
tqty = tmeng.
SELECT kawrt FROM konv INTO gkawrt WHERE knumv = gknumv AND kposn = gkposn AND kschl = 'JIN6'.
ENDSELECT.
SELECT kawrt FROM konv INTO gkawrt WHERE knumv = gknumv AND kposn = gkposn AND kschl = 'JIN7'.
ENDSELECT.
dPRICE = GKAWRT / gmeng.
price = dprice.
ENDIF.
READ TABLE outtab INDEX 1.
MOVE price TO outtab-value.
MODIFY outtab INDEX 1.
READ TABLE outtab INDEX 2.
MOVE tqty TO outtab-value.
MODIFY outtab INDEX 2.
READ TABLE outtab INDEX 3.
MOVE tAX TO outtab-value.
MODIFY outtab INDEX 3.
READ TABLE outtab INDEX 4.
MOVE TEXT TO outtab-value.
MODIFY outtab INDEX 4.
READ TABLE outtab INDEX 5.
MOVE price1 TO outtab-value.
MODIFY outtab INDEX 5.
ENDFORM. "price
in this code when seeing preview value is coming properly but whn i go for print by using back tab .the temp value tmeng,tqty remains uncleared and the value is doubling .Mainly if tmeng is cleared the code will work properly .
but i cant put clear inside the program bcoz the subroutine will be called as many times eq to line items .so only the final line items weight will be stored in tot..
what to do ?
ragrds,
mani -
Can we use Loop Statement for Ranges
Hi Friends,
I have a range say R_Range. I need to loop at each line item and get the values in another range R_New_Range, i have to count the number of items in R_new_range. How is it possible.
I know range is nothing but an internal table. So we can direcly use Move statements or so ...,
But my question is .....
My R_range has values as below
'I' 'EQ' '001'
'I' 'EQ' '002'
'I' 'BT' '003' '007'
'I' 'EQ' '008'
I have to move all these values to R_New_range and my count of items should be '8'.
How can i do that????????
Expecting ur answers....
Thanks in advance
Cheers,
R.Kripa.hey friends,
Its nice to see the replies.... but i think i had confused u all with the question
Now i'll explain u all in detail ....
See i have 15000 projects ( eg., AAA111... ) and 100 GL accounts ( eg., 123443... ) .....
I have to get the costs from COSS and COSP tables for all the projects - GL account combinations which leads to some 1500000 entries ..... So it is giving me a SQL Dump "DBIF_RSQL_INVALID_RSQL" .........
Description of the Dump is
Error in the module RSQL accessing the database interface
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
neither
caught nor passed along using a RAISING clause, in the procedure
"GET_COSP_COSS" "(FORM)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
The SQL statement generated from the SAP Open SQL Statement violates a
restriction imposed by the database system used in R/3.
Possible errors:
o The maximum size of an SQL statement has been exceeded.
o The statement contains too many input variables.
o The space needed for the input data exceeds the available memory.
o ...
You can usually find details in the system log (SM21) and in the
developer trace of the work process (ST11).
If an error occurs the developer trace often informs you about the
current restrictions.
So now i want to fine tune the program so that the execution works perfectly and get me the values for all the data 1500000 :-|
Now :
My Projects are stored in the form of a range R_Range
I have to loop at this range and then process 100 records at a time and then again take other 100 records .... i'll count till 100 records by getting loopaing at the range and for each loop pass i'll increment the counter ....
I am clear till this .....
If record consist of 'EQ' option .... then ofcourse we can consider the total record to be 1 record and we can add 1 to counter ......
But if the record consist of 'BT' option ...... then how can we loop that and get the number of -low numbers in that range and add to my counter ????
Hope iam clear with my question
If not do revert back ....
Thanks in advance for the replies
Cheers,
R.Kripa.
My Doubt is .... -
How to use perform statements in sap scripts
how to use perform statements in sap scripts . and pls send me one progam for this
thnaks
rajaHi Raja,
<b>PERFORM</b> key work is used to include subroutine in sapscript form...
But the processing is lttle bit different form the one we use in ABAP.
Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
Check out the example below to see how this is used..
<b>Definition in the SAPscript form:</b>
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
<b>Coding of the calling ABAP program:</b>
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Hope this is clear to understand...
Enjoy SAP.
Pankaj Singh. -
HOW TO USE HIDE STATEMENT IN INTERACTIVE ALV.
Hi Friends,
Actually i am writing the INTERACTIVE ALV.In this ALV i need to USE HIDE STATEMENT.
This is an urgent requirement.
Please anybody help me.
Thanks&Regards
Thummala Krishna Reddy.Hi,
use the below code for Hide in ALV interactive report.
use hotspot in fieldcatalog
gwa_fieldcat-tabname = gc_bsik.
gwa_fieldcat-fieldname = gc_bukrs.
gwa_fieldcat-outputlen = gc_12.
gwa_fieldcat-hotspot = gc_x.
gwa_fieldcat-seltext_l = text-016.
APPEND gwa_fieldcat TO git_fieldcat.
CLEAR gwa_fieldcat.
and create dynamic subroutine like:
FORM sub_user_command1 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
*Fi Documents-3rd level
CASE r_ucomm.
WHEN '&IC1'.
CLEAR gwa_bsik3.
READ TABLE git_bsik3 INTO gwa_bsik3 INDEX rs_selfield-tabindex.
MOVE rs_selfield-value TO gwa_bsik3-lifnr.
IF rs_selfield-fieldname EQ 'LIFNR'.
PERFORM sub_build_fieldcatlog2.
PERFORM sub_data_retrieval2.
PERFORM sub_display_alv2.
ENDIF.
ENDCASE.
ENDFORM. "sub_user_command1
call the above user command in alv display like below code.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gv_repid
i_callback_user_command = 'SUB_USER_COMMAND1'
i_callback_top_of_page = 'SUB_F_TOP_OF_PAGE'
it_fieldcat = git_fieldcat1[]
i_save = gc_a
it_events = git_events
TABLES
t_outtab = git_bsik3
EXCEPTIONS
OTHERS = 0.
CLEAR : git_bsik3.
pl let me know if you need any more info.
Regards,
Mahesh -
How to use collect statement for below
data : begin of itab,
n(3) type c,
n1 type n,
k(5) type c,
end of itab.
select n n1 from into itab table /zteest.
*internal table has
n n1 k
gar 100 uji
hae 90 iou
gar 90 uji
hae 87 iou
I want
gar 190
hae 177
How to use collect statement as n1 is n ..?
let me know..
Thankstry this..
DATA : BEGIN OF itab OCCURS 0,
n(3) TYPE c,
n1(3) TYPE p DECIMALS 2,
k(5) TYPE c,
END OF itab.
itab-n = 'gar'.
itab-n1 = 100.
itab-k = 'uji'.
COLLECT itab .CLEAR itab.
itab-n = 'hae'.
itab-n1 = 90.
itab-k = 'iou'.
COLLECT itab .CLEAR itab.
itab-n = 'gar'.
itab-n1 = 90.
itab-k = 'uji'.
COLLECT itab .CLEAR itab.
itab-n = 'hae'.
itab-n1 = 87.
itab-k = 'iou'.
COLLECT itab .CLEAR itab. -
How to Insert Character using Prepared statement
Hi All,
Can anyone let me know how can I insert character using prepared statement.
Thanks
SameerIn the future JDBC related questions should be posted into the JDBC forum.
Can you please provide some more information about what you are trying to do? It isn't clear to me. Are you trying to update a CHAR field? -
(statement cache size = 0) == clear statement cache ?
Hi
I ran this test with WLS 8.1. I set to the cache size to 5, and I call a servlet
which invokes a stored procedure to get the statement cached. I then recompile
the proc, set the statement cache size to 0 and re-execute the servlet.
The result is:
java.sql.SQLException: ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package "CCDB_APPS.MSSG_PROCS" has been invalidated
ORA-04065: not executed, altered or dropped package "CCDB_APPS.MSSG_PROCS"
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at line 1
which seems to suggest even though the cache size has set to 0, previously cached
statements are not cleared.
Rgs
ErikGalen Boyer wrote:
On Fri, 05 Dec 2003, [email protected] wrote:
Galen Boyer wrote:
On 14 Nov 2003, [email protected] wrote:
Hi
I ran this test with WLS 8.1. I set to the cache size to 5,
and I call a servlet which invokes a stored procedure to get
the statement cached. I then recompile the proc, set the
statement cache size to 0 and re-execute the servlet.
The result is:
java.sql.SQLException: ORA-04068: existing state of packages
has been discarded ORA-04061: existing state of package
"CCDB_APPS.MSSG_PROCS" has been invalidated
ORA-04065: not executed, altered or dropped package
"CCDB_APPS.MSSG_PROCS" ORA-06508: PL/SQL: could not find
program unit being called ORA-06512: at line 1
which seems to suggest even though the cache size has set to
0, previously cached statements are not cleared.This is actually an Oracle message. Do the following test.
Open two sqlplus sessions. In one, execute the package.
Then, in the other, drop and recreate that package. Then, go
to the previous window and execute that same package. You
will get that error. Now, in that same sqlplus session,
execute that same line one more time and it goes through. In
short, in your above test, execute your servlet twice and I
bet on the second execution you have no issue.Hi. We did some testing offline, and verified that even a
standalone java program: 1 - making and executing a prepared
statement (calling the procedure), 2 - waiting while the
procedure gets recompiled, 3 - re-executing the prepared
statement gets the exception, BUT ALSO, 4 - closing the
statement after the failure, and making a new identical
statement, and executing it will also get the exception! JoeI just had the chance to test this within weblogic and not just
sqlplus.Note, I wasn't using SQL-PLUS, I wrote a standalone program
using Oracle's driver...
MY SCENARIO:
I had one connection only in my pool. I executed a package.
Then, went into the database and recompiled that package. Next
execution from app found this error. I then subsequently
executed the same package from the app and it was successful.And this was with the cache turned off, correct?
What the application needs to do is catch that error and within
the same connection, resubmit the execution request. All
connections within the pool will get invalidated for that
package's execution.Have you tried this? Did you try to re-use the statement you had,
or did you make a new one?
Maybe Weblogic could understand this and behave this way for
Oracle connections?It's not likely that we will be intercepting all exceptions
coming from a DBMS driver to find out whether it's a particular
failure, and then know that we can/must clear the statement cache.
Note also that even if we did, as I described, the test program I
ran did try to make a new statement to replace the one that
failed, and the new statement also failed.
In your case, you don't even have a cache. Would you verify
in your code, what sort of inline retry works for you?
Joe -
How to use session state protection
I use Apex 3.2.1
I access my site by a url passing a parameter like this : f?p=101:1:0::::ITEM1:1234567. There is no login and password to access the site.
The value of the parameter ITEM1 is the authorization of the first page, with a database function for the verification.
To secure my site I want to use session state protection so, I enabled it , then I defined "Arguments Must have checksum" for the page 1.
Now , when i try to acces my site with the same url it does not work.
it is the first time a try to use session state protection, could someone tell me what's wrong?Hi user5719906,
I would suggest that as you need to pass an item and are unable to generate a checksum as you are not yet logged in, that you will need to allow arguments without checksum for this page.
This could be a bit of a hole in your security, but as long as you know it is there and clear the cache for all pages that you branch to, you should be able work around it.
The issue is that a malicious user can set page and application items via the url to an unsecured page.
Regards
Michael -
hi experts,
I am working with interactive report using hide statement.for thr first time it is working properly but the next time it is not working properly.Hope some clear statement has to be given ..
Please give some simple progarm for interactiev report in list using hide statement.
regards,
maniHIDE dobj.
Effect
This statement stores the content of a variable dobj together with the current list line whose line number is contained in sy-linno in the hide area of the current list level. The data type of the variables dobj must be flat and no field symbols can be specified that point to rows of internal tables, and no class attributes can be specified. The stored values can be read as follows:
For each user action in a displayed screen list that leads to a list result, all the row values stored using HIDE - that is, the row on which the screen cursor is positioned at the time of the event - are assigned to the respective variables.
If a list row of an arbitrary list level is read or modified using the statements READ LINE or MODIFY LINE, all the values of this row stored using HIDE are assigned to the respective variables.
Notes
The HIDE statement works independently of whether the list cursor was set. In particular, variables for empty list rows can be stored - that is, rows in which the list cursor was positioned using statements like SKIP.
The HIDE statement should be executed immediately at the statement that has set the list cursor in the row.
Outside of classes, prior to release 7.0, for dobj constants and literals could still be specified. However, it was not possible to read them at list events and in the READ LINE statement.
Example
Storing square numbers and cubic numbers for a list of numbers. The example shows that arbitrary variables can be stored independently of row content. In the real situation, one would more likely store only the number and execute the calculation, when required, in the the event block for AT LINE-SELECTION.
REPORT ...
DATA: square TYPE i,
cube TYPE i.
START-OF-SELECTION.
FORMAT HOTSPOT.
DO 10 TIMES.
square = sy-index ** 2.
cube = sy-index ** 3.
WRITE / sy-index.
HIDE: square, cube.
ENDDO.
AT LINE-SELECTION.
WRITE: square, cube.
HIDE f.
The contents of f related to the current output line are stored. If this line is selected, f is filled automatically with the stored value.
The selection can be made using:
AT LINE-SELECTION
AT PFx
AT USER-COMMAND
READ LINE
You do not have to output the field with WRITE in order to be able to store its value.
The HIDE statement does not support structures that contain tables (deep structures).
System fields that are particularly useful in interactive reporting are listed in the system fields for lists documentation.
You cannot save lines or components of lines of an internal table that is addressed using a field symbol to the HIDE area. (Compare the ASSIGNING addition to the READ and LOOP statements). Assign the contents of the line or component to a global variable and save this instead.
You can only write variables to the HIDEarea.
In ABAP Objects, the following statements acause an error message:
CONSTANTS f.
HIDE: '...', f.
Correct syntax:
DATA: f1, f2.
HIDE: f1, f2.
Cause:
Interactive list events cause the fields hidden by the HIDE command to be overwritten with values in the HIDE area, which means that they must be changeable.n.
Reward points if useful. -
Sorting techinque without using sort statement /Comparing table fields.
Hi,
How to achieve sorting techinque without using sort statement in tables.
Also how to compare fields of 2 custom tables and check their compatability without using code ?Hi,
Refer the below program, it will be helpful.
types: begin of t_int,
int type i,
end of t_int.
data: it_int type standard table of t_int,
wa_int type t_int,
wa_int1 type t_int.
wa_int-int = 70.
append wa_int to it_int.
clear wa_int.
wa_int-int = 50.
append wa_int to it_int.
clear wa_int.
wa_int-int = 20.
append wa_int to it_int.
clear wa_int.
wa_int-int = 30.
append wa_int to it_int.
clear wa_int.
wa_int-int = 23.
append wa_int to it_int.
clear wa_int.
wa_int-int = 23.
append wa_int to it_int.
clear wa_int.
wa_int-int = 32.
append wa_int to it_int.
clear wa_int.
wa_int-int = 77.
append wa_int to it_int.
clear wa_int.
wa_int-int = 99.
append wa_int to it_int.
clear wa_int.
wa_int-int = 1.
append wa_int to it_int.
clear wa_int.
wa_int-int = 11.
append wa_int to it_int.
clear wa_int.
wa_int-int = 90.
append wa_int to it_int.
clear wa_int.
wa_int-int = 40.
append wa_int to it_int.
clear wa_int.
data: wk_line type i.
data: cnt type i.
data: cnt1 type i.
describe table it_int lines wk_line.
clear: cnt,cnt1.
data wk_flag type c.
clear wk_flag.
while wk_line gt cnt1.
cnt = cnt + 1.
read table it_int into wa_int index cnt.
cnt1 = cnt + 1.
read table it_int into wa_int1 index cnt1.
if wa_int-int lt wa_int1-int.
modify it_int from wa_int index cnt1.
modify it_int from wa_int1 index cnt.
wk_flag = 'X'.
endif.
if cnt1 eq wk_line.
clear: cnt, cnt1.
if wk_flag eq 'X'.
clear wk_flag.
continue.
else.
exit.
endif.
endif.
endwhile.
loop at it_int into wa_int.
write: / wa_int-int.
endloop. -
Clearing state currentState = ''; not working
I am developing a code where I have developed three components that is three states for me. I have a contol on my home screen (base state) which is able to take me to any of these states whenever required. My issue is once I reach to say in State A and want to go back to home page. My "HOME" button in State A is not working even after I am clearing state using currentState = '' ; Do I have to do anything extra to get it to home page from State A here? Any help would be highly appreciated!!
Whenever I create a flex app that has several states, I've gotten into
the habit of simply copying my base state and renaming it something
to the effect of "start", so rather than trying to clear your state try this method.
Slightly superfluous and even a tad bit inane, but it works and gives you an
extra state buffer between impromptu edits and your base state .
So copy your base state
and rather than:
currentState = "";
try currentState = "start";
on for size. -
Hi,
How can I use select stat. rather than join to join to tables so that I have all the fields from both tables appearing in my output.Hi,
There are two ways to handle the problem.
1. For all entries
Types: begin of str1_tab,
lgnum type lgnum,
ivnum type LVS_IVNUM,
ivpos type LVS_IVPOS,
lgtyp type lgtyp,
lgpla type lgpla,
idatu type LVS_IDATU,
uname type LINK_UNAME,
end of str1_tab.
Data: it_tab1 type table of str1_tab,
wa_tab1 like line of it_tab1.
DATA: it_tab3 TYPE TABLE OF str1_tab,
wa_tab3 LIKE LINE OF it_tab3.
select lgnum ivnum lgtyp uname FROM link INTO CORRESPONDING FIELDS OF
TABLE it_tab1 where lgnum = pa_lgnum AND ivnum IN s_ivnum.
<b>if sy-subrc eq 0.</b>
select lgnum ivnum lgpla idatu from linp into corresponding
fields of table it_tab3 for all entries in it_tab1 <b>where lgnum = itab1-lgnum and ivnum = itab1-ivnum.</b><b>endif.</b>
LOOP AT it_tab3 INTO wa_tab3.
<b>clear wa_tab1.</b>
READ TABLE it_tab1 INTO wa_tab1 WITH
KEY lgnum = wa_tab3-lgnum
ivnum = wa_tab3-ivnum.
IF sy-subrc = 0.
move-corresponding it_tab1 to it_tab3.
<b>modify it_tab3 from wa3 transporting lgtyp uname where lgnum = wa_tab3-lgnum
and ivnum = wa_tab3-ivnum.</b>ENDIF.
clear it_tab3.
endloop.
2. Use inner join
Types: begin of str1_tab,
lgnum type lgnum,
ivnum type LVS_IVNUM,
ivpos type LVS_IVPOS,
lgtyp type lgtyp,
lgpla type lgpla,
idatu type LVS_IDATU,
uname type LINK_UNAME,
end of str1_tab.
Data: it_tab1 type table of str1_tab,
wa_tab1 like line of it_tab1.
select linklgnum linkivnum linklgtyp linkuname linplgpla linpidatu FROM link inner join linp on linklgnum = linplgnum
and linkivnum = linkivnum
into TABLE it_tab1 where lgnum = pa_lgnum AND ivnum IN s_ivnum.
Now itab1 will contain all the values -
If we use DML statement in function then that function can be used inside s
if we use DML statement in function then that function can be used inside select query or any DML query?
select f from t2;I think you meant to query t1.
It works if the function is an autonomous transaction:
create or replace function f return number
is
PRAGMA AUTONOMOUS_TRANSACTION;
begin
update t1 set c=2;
commit;
return 1;
end;
select f from t1But as Billy said why would you want to do DML this way. And this is not the way autonomous procedures should be used either.
An an answer to an interview question though nothing wrong with it. -
How do we use if statement in labview?moreover can i use if statement inside for loop?
how do we use if statement in labview?moreover can i use if statement inside for loop?
The if statement in LabVIEW is the Case structure. You can find that on the Structures palette right next to the For Loop. If you're still on the same subject about terminating a for loop early, then what you do is enclose your functions inside the loop with a case statment and make one of the case's empty except for one or more constants that you might have to wire. Hopefully, the attached picture will explain what I mean. Also, as I mentioned in one of your other posts, I think this technique is not as good as using a while loop. The array in the attached example is the same size no matter what and you may have to handle stripping extra or invalid elements.
Attachments:
For_Loop_with_Case.jpg 21 KB
Maybe you are looking for
-
Cisco Forward and Call return to Voicemail on CUCM 8.5 question
Hi, I have a user A that requires the call forward when busy/no answer to another extension B. If extension B is busy/no answer, A wants call to be returned to his voicemail. Unfortunately User B has also a call forward to another extension c, so cal
-
Need value in a field to be Save As name of document
Hello, I have a text field which will have a value in it that will also be the name of the PDF. I am familiar with JavaScript as it applies to InDesign, but do not have a clue as to how to write a script for Adobe Acrobat. I know this much: var v =
-
Regarding work flow in the organisation
Hello, I am new to SAP XI. I want to join as a SAP XI developer. So I want to know about the work flow in the organisation. Means who will raise issues and who will take care of it first. and how it will reach to SAP XI developer. What are
-
How to find Archive data In SAP
Hi experts , How to find Archive data in SAP throught the following tcodes FTWL & AS_afb. Thnx Venky
-
hi, i have ERP6 EHP4 with 60 GB in database , but after running the SGEN T-Code it was increased to 90 GB and the log file also increased to 48 Gb from 3 GB . my question is , is this normal of this much of space . if yes then it's ok if not then wha