Please go through the code, is it pass by value?
Can any one explain me the diff between call by value and call by reference in Subroutines.
ex :
PERFORM ADD_Z1CLASS1 USING LW_MARA-MATNR
CHANGING IDOC_DATA[].
FORM ADD_Z1CLASS1 USING PV_MATNR TYPE MATNR
CHANGING PT_EDIDD TYPE EDIDD_TT.
Please let me know, if the above code is call by value or call by reference...?
Any suggestions will be appreciated!
Regards,
Kittu
hi,
using -- Pass by reference
changing -- Pass by reference
using value() -- Pass by value
changing value( )-- Pass by value and result
The main difference between the pass by value and pass by reference is that " In pass by value the actual parameters are not changed while in pass by reference those are changed".
By reference Passes a pointer to the original memory location. Very efficient
By value Allocates a new memory location for use within the subroutine. The memory is freed when the subroutine ends. Prevents changes to passed variable
By value and result Similar to pass by value, but the contents of the new memory is copied back into the original memory before returning. Allows changes and allows a rollback .
Go through the following eg:
pass by ref:
data f1 value 'A'.
perform s1 using f1.
write / f1.
form s1 using p1.
p1 = 'X'.
endform.
o/p is X
using and changing Are Identical in Function
report ztx1805.
data: f1 value 'A',
f2 value 'B'.
write: / f1, f2.
perform s1 using f1
changing f2.
write: / f1, f2.
form s1 using p1
changing p2.
p1 = p2 = 'X'.
endform.
o/p : A B
X X
Pass by value:
data: f1 value 'A'.
perform s1 using f1.
write / f1.
form s1 using value(p1).
p1 = 'X'.
write / p1.
endform.
o/p is X
A
Hope this is clear.
so the code which you have pasted comes under pass by reference.
Reward points if helpful.
Thanks and regards.
Similar Messages
-
Interactive Form - How to make fields read-only through the code?
Simple question but i can't seem to figure out how to do it. I have an interactive form that have editable fields. How do I toggle fields to make some of them read-only through the code. Please provide cold sample. thanks a lot.
<b>Nagarajan Kumarappan:</b>
I know how to do that but that's setting the value at design time. Mine has to be done at runtime(when the page loads) because there are a lot of condidtions determining which fields should be and should not be readonly. therefore I have to do in the code. Any by saying code I mean Java not java script or formcal.
<b>kushagra mittal:</b>
are you talking about regular webdynpro input fields? I am asking for that. I am talking about input fields inside my adobe interactive form embedded on the webdynpro page.
I think what needs to be done is to disable context attributes like Nagarajan Kumarappan suggested but do that through Java which I don't see any tutorials show that.
still looking for help. -
Hello, one of our customers just encountered an execution error in a vi running under LabVIEW 6.1, which doesn't exist under LabVIEW 5.1 or 6.01. I have a simple vi that has two encapsulated For Loops. Two string arrays go in, one goes out of the outer loop. Inside the outer loop the first array is indexed. The string which results from this indexing is compared with all other strings from the second string array in the inner loop. If it matches one of the strings of the second array, it is not outputted, otherwise this string goes through the inner For Loop to the output of the inner loop and from there to the output of the outer loop. The count
terminal of the outer/inner loop is connected to the Array Size of the first/second string array. If the second array is empty, that means that the element in test from the first arry cannot match anything from the second array, so the element in test is send to the output of the inner loop and from there to the output of the outer loop. This works fine in LabVIEW 5.1 and 6.01, but NOT in LabVIEW 6.1. In LabVIEW 6.1 the inner loop is never executed if the count value is zero (which is correct), but the data line running through the loop is not executed either, which is different to what LabVIEW 5.1 and 6.01 do. There, the input string is sent to the output of the inner loop correctly even if the loop counter is zero. The solution is easy - I just have to connect the output of the outer loop to the data line BEFORE it enters the inner loop. But: I don't know if this is a LabVIEW 6.1 bug or if it is supposed to be a feature, but it brings some incompatibility in programming between the
different LabVIEW versions.
Best regards,
GabsiHi,
When a for-loop runs zero times, all outputs are 'undefined' (and should
be).
Besides, how would LV know what the output of a not executed routine should
be?
It might be handled differently in LV5 and LV6, which is unfortunate. In
both cases, the result is undefined.
It's not a bug. It's just something that should be avoided in any LV
version.
> The solution is easy - I just have to connect the
> output of the outer loop to the data line BEFORE it enters the inner
> loop. But: I don't know if this is a LabVIEW 6.1 bug or if it is
In some cases this does the trick. But if the data is changed in the inner
loop, this will effect the results if the N is not zero.
Technically, I think the output in this construction is also 'undefined'.
But LV handles this as expected / desired.
Another solution is to use a shift register. If N is zero, the input is
directly passed through to the output.
Regards,
Wiebe.
"Gabs" wrote in message
news:[email protected]...
> LabVIEW 6.1 If For Loop count terminal is zero then value going
> through the loop is not passed on to the output of the loop
>
> Hello, one of our customers just encountered an execution error in a
> vi running under LabVIEW 6.1, which doesn't exist under LabVIEW 5.1 or
> 6.01. I have a simple vi that has two encapsulated For Loops. Two
> string arrays go in, one goes out of the outer loop. Inside the outer
> loop the first array is indexed. The string which results from this
> indexing is compared with all other strings from the second string
> array in the inner loop. If it matches one of the strings of the
> second array, it is not outputted, otherwise this string goes through
> the inner For Loop to the output of the inner loop and from there to
> the output of the outer loop. The count terminal of the outer/inner
> loop is connected to the Array Size of the first/second string array.
> If the second array is empty, that means that the element in test from
> the first arry cannot match anything from the second array, so the
> element in test is send to the output of the inner loop and from there
> to the output of the outer loop. This works fine in LabVIEW 5.1 and
> 6.01, but NOT in LabVIEW 6.1. In LabVIEW 6.1 the inner loop is never
> executed if the count value is zero (which is correct), but the data
> line running through the loop is not executed either, which is
> different to what LabVIEW 5.1 and 6.01 do. There, the input string is
> sent to the output of the inner loop correctly even if the loop
> counter is zero. The solution is easy - I just have to connect the
> output of the outer loop to the data line BEFORE it enters the inner
> loop. But: I don't know if this is a LabVIEW 6.1 bug or if it is
> supposed to be a feature, but it brings some incompatibility in
> programming between the different LabVIEW versions.
> Best regards,
> Gabsi -
hi help unlock the phone happened after we installed a new programa we can not get the activation password and ID, I know and still does not stop the phone bought in Israel and what documents should be sent to confirm that my phone Please read through the help
What I am saying is ..........
The iPhone HAS to be active making calls on the UK carrier network for the carrier to identify as "theirs" and therefore eligible for the Carrier to unlock
The way to achieve this is to use a PAYG sim making and receiving calls to establish a customer relationship with the Carrier and then follow the Carrier's process to unlock
With a PAYG it usually means adding a specified (by the carrier ) amount usually £15 /£20 depending on the carrier
This is how O2 function and according to Gemma this is how Vodafone work -
Using Eclipse, latest build, on a Mac, I'm stepping through the FlexPMD code. I enter in the debug configuration the parameters "-s <src dir>" and "-o <output dir>". Those arguments are successfully passed into FlexPMD but when the FileUtils tries to locate the Flex source files, I have some ActionScript, *.as, files in the <src dir>, I get an error:
Exception in thread "main" net.sourceforge.pmd.PMDException: sourceDirectory does not contain any Flex sources (Specify the source directory in relative (not absolute))
at com.adobe.ac.pmd.files.impl.FileUtils.getFlexFiles(FileUtils.java:107)
at com.adobe.ac.pmd.files.impl.FileUtils.computeFilesList(FileUtils.java:52)
at com.adobe.ac.pmd.FlexPmdViolations.computeFiles(FlexPmdViolations.java:128)
at com.adobe.ac.pmd.FlexPmdViolations.computeViolations(FlexPmdViolations.java:92)
at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.computeViolations(AbstractFlexPmdEngine.ja va:153)
at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:1 36)
at com.adobe.ac.pmd.commandline.FlexPMD.startFlexPMD(FlexPMD.java:115)
at com.adobe.ac.pmd.commandline.FlexPMD.main(FlexPMD.java:69)
Since the 'args' parameter in the main function is getting the '-s' and '<src dir>' parameters, I'm not sure what is it complaining. I don't see anything in the source code what those parameters are being discarded.
Any ideas?
Thanks
BrendaHi Brenda!
I don't think I understood your problem.
The error you mentioned means that the source folder you specified does not contain any Flex source files (*.as, *.mxml)
Are you saying that you have a folder with Flex source files, and that those files are not picked up by FlexPMD?
Any FlexPMD clients (command-line, Maven, Ant, ...) are using AbstractFlexPmdEngine which uses the class FlexPmdParameters
I don't see any reasons why your source folder would be discarded.
Best
Xavier -
ASH
T2
T3
T6
T8
T12
T14
T15
T18
T19
T22
T29
T32
T35
T39
T49
T52
T2
100
68
53
65
74
52
61
63
50
55
53
52
86
45
48
69
T3
0.6
100
51
65
55
49
55
62
34
43
69
55
52
53
58
73
T6
0.6
0.3
100
68
83
74
63
60
65
32
55
62
66
76
63
71
T8
2.6
0.2
3.9
100
58
62
56
68
63
58
60
63
63
73
69
67
T12
1.2
1.9
2.2
6.9
100
86
61
73
47
47
53
67
60
47
58
88
T14
0.2
0.8
3.1
3.4
2.3
100
62
64
38
60
60
56
51
37
56
74
T15
2
0.6
2.6
2.4
0.3
9.5
100
59
57
40
57
60
67
71
57
53
T18
2.1
0.3
2.2
5.1
3.8
3
1.6
100
71
68
50
31
70
63
55
58
T19
1.2
1.6
3
0.2
0.5
3.2
3.2
2.3
100
60
56
65
48
47
58
56
T22
1.2
0.6
3.2
4.7
2.5
3.5
6.5
5.1
2.3
100
61
55
59
60
50
62
T29
3.3
4
1.6
3
1.2
4.7
3.7
3.4
3.5
6.3
100
53
51
67
47
68
T32
0.1
1.3
4.4
2.4
2.8
2.9
3.7
0.2
0.5
3.1
0.4
100
56
74
45
65
T35
4
3.8
0.3
2.9
0.9
3.1
1.8
0.2
0.3
3.5
5.7
0.8
100
62
68
68
T39
0.4
0.7
1.9
1
1.5
3
0.4
0.3
0.3
1.5
0.3
1.6
1.8
100
70Hi Ken
Use Conditional Format to provide a Cell colour fill or a font colour if the Cell contents exceed a certain value.
Here is a thread where the question was to highlight values below a certain value, but I think you will get the idea!
https://discussions.apple.com/thread/5187841?tstart=0
Regards,
Ian. -
RANGES : r_matnr FOR mara-matnr .
SELECT lifnr
matnr
INTO CORRESPONDING FIELDS OF TABLE t_data
FROM zdata
WHERE lifnr = p_lifnr.
LOOP AT t_data .
r_matnr-sign = 'I' .
r_matnr-option = 'EQ' .
r_matnr-low = t_data-matnr .
APPEND r_matnr .
ENDLOOP.
SELECT mblnr
matnr
menge
INTO TABLE lt_menge
FROM mseg
FOR ALL ENTRIES IN lt_itab
WHERE mblnr = lt_itab-mblnr
AND matnr IN r_matnrHello madan,
RANGES : r_matnr FOR mara-matnr .
"""range is being declared for material number
SELECT lifnr "Account Number of Vendor or Creditor
matnr "Material number
INTO CORRESPONDING FIELDS OF
TABLE t_data "respective fields of internal table
FROM zdata "Source table
WHERE
lifnr = p_lifnr."p_lifnr is used as selection criterion
"From the naming convention P_lifnr looks like a parameter entered by user
"So all material numbers and A/C numbers for a particular account number are being selected
"The following process is defining a range.r_matnr will contain all Material numbers
which are available for the account number P_lifnr
eg:imagine that you have 1,2,3 matnr having LIFNR '001' from ZDATA
then:::::after this loop r_matnr eill contain 1,2,3>
LOOP AT t_data .
r_matnr-sign = 'I' .
r_matnr-option = 'EQ' .
r_matnr-low = t_data-matnr .
APPEND r_matnr .
ENDLOOP.
"select X from Y where matnr IN r_matnr" means
it will select field X from table Y
where material number = '1' or '2' or '3'...(based on matrn in the t_data)
you are selecting from MSEG some fields which have material numbers in ZDATA for a particular
account number and which have mblnr values in lt_itab...ie records which have mblnr from lt_itab
and material number from ZDATA for the account number from the database table mseg
SELECT mblnr
matnr
menge
INTO TABLE lt_menge
FROM mseg
FOR ALL ENTRIES IN lt_itab
WHERE mblnr = lt_itab-mblnr
AND matnr IN r_matnr
Reward if useful
Regards
Byju -
Problem in the code to update a column value based on the value of a column
Merge into item_TMP S using items I on (S.ITL_ITEM= I.ITEM_ITEM)
when matched then
update set
S.ITL_UOM = I.ITEM_UOM;
when not matched then null;Try
update Item_TMP set ITL_UOM = (select ITEM_UOM from ITEMS
where Item_TMP_TMP.ITL_ITEM = ITEMS.ITEM_ITEM
and items.ITEM_UOM is not null )
where ITL_ITEM in (select ITEMS.ITEM_ITEM from ITEMS
where items.ITEM_UOM is not null )
/Cheers, APC
blog: http://radiofreetooting.blogspot.com -
Please check the Code snippet and detail the difference
Please go through the two code snippets given below...
Can some one please let me know if using generics is a better way to denote the signature and if yes, why is it so?
Thank you
Two classes:
class SimpleStr {
String name = "SimpleStr";
public SimpleStr(String name) {
this.name = name;
public String getName() {
return this.name;
public String toString() {
return getName();
class MySimpleStr extends SimpleStr {
String name = "MySimpleStr";
public MySimpleStr(String name) {
super(name);
this.name = name;
public String getName() {
return this.name;
public String toString() {
return getName();
Code Snippet 1:
class AnotherSimpleStr {
public <S extends SimpleStr>S getInfo() {
return (S)new MySimpleStr("val3");
Code Snippet 2:
class AnotherSimpleStr {
public SimpleStr getInfo() {
return new MySimpleStr("val3");
}Also, please see the code below, the getInfo() method is not taking care of Type safety right??!!!!
class AnotherSimpleStr {
public <S extends SimpleStr>S getInfo() {
return (S)new Object();
public <S extends SimpleStr>S getInfoAgain(Class<S> cls) {
return (S)new MySimpleStr("Val");
} -
How to assign a class to the material through ABAP code
Hi,
I am working on a transaction in ABAP which takes material name, material description and a class from the user. Now, after this much input I create the material, its configuration profile through the ABAP code. For this I know I have to make relevant entries in tables MARA, MAKT, CUCO.. and also check for the existence of the class in the table KLAH.
Now the point where I am stuck is that I am not able to get how to assign the class to the material through the code. I am able to get the internal class id from the table KLAH but I am not able to figure how the internal material number is being generated in the table INOB and i need this number as well as the internal class id number to insert a record in the table KSSK to show proper assignment.
Can anyone please suggest me some solutions?
Thanks....Hi,
I tried using BAPI_OBJCL_CREATE. In order to understand it functioning better I created a material and class (of type 300) through transactions MM01 and cl01 respectively. Then i created a report and called the FM BAPI_OBJCL_CREATE, gave the material name as the material above, table as MARA, class as the one i created above and class type 300. I even analysed the message of the table return (return-message) after executing the report. The messahe said assignment done. But when I checked mnaually in cl20n there was no assignment done to the required material. There was also no entry for the required material in the table INOB which I need.
Can anyoene tell me that where am i going wrong? Please do help. -
Add the new item through the Bapi 'bapi_outb_delivery_change'
I want to add the new item to the existing outbound delivery.How to add the new item in the bapi 'bapi_outb_delivery_change'. Please provide me the code for the bapi 'BAPI_OUTB_DELIVERY_CHANGE' to add the new item.
Hi Kyndal,
I have a requirment to add new items in a delivery which will refer to the higher items in the same delivery itself.
I am trying to use the BAPI BAPI_OUTB_DELIVERY_CHANGE for the purpose.
Could u pls give some clue on how to tried to do it?
I am constantly getting a error VL216.
Also I tried passing the reference document and item : same delivery number and the higher level item in the delivery
VBTYP_N = J -
How to step thru the code in jar file.
I am trying to step through the code in the jar file. My code is a Java stored procedure which uses a jar file. Whenever I try to Trace into the code residing in the jar file I am always hitting the
JDeveloper API Decompiler STUB SOURCE generated from class file.
I tried to set up the Class path and Source path in the Project Options but it didn't help.
Any help is appreciated.
Thanks.If are trying to debug the Java Stored Procedure deployed in Oracle8i (816), then you should be using Remote Debugging feature in JDeveloper 3.1
check out http://technet.oracle.com/products/jdev/info/jdev/rdjsproc/s000.html http://technetinside.us.oracle.com/products/jdev/info/rdebugwp/rdebugwp.html
raghu -
//remove this line if you want to edit the code by hand? um which line?
Several of my pages are locking up and I don't know why. As I work through the code, I remembered that I altered some text in a SendEmail by directly altering the page rather than using the Server Behavior. Don't understand why that would matter but whatever...
Now as I ponder if that is causing the problem, I ran across this commented line in the code:
//remove this line if you want to edit the code by hand
But are they talking about the line just after that line of //remove or do they mean the actual comment line of
//remove this line if you want to edit the code by hand?
Thanks for your helpTrigger and $tNG look suspiciously like ADDT code to me. Ask the guys in the ADDT forum (http://forums.adobe.com/community/dreamweaver/addt). There are a couple of them in there who know the code intimately. I haven't touched ADDT for ages.
-
REPORT zfi_vendor_ageing
NO STANDARD PAGE HEADING
LINE-COUNT 58
line-size 168
MESSAGE-ID zh_msg.
D A T A B A S E T A B L E S D E C L A R A T I O N
TABLES: lfa1, " Vendor Master (General)
t001, " Company Codes
rfpdo.
I N T E R N A L T A B L E S D E C L A R A T I O N S *
Internal Table for Vendor Open Items Data
DATA: BEGIN OF int_bsik OCCURS 0,
lifnr LIKE bsik-lifnr, " Vendor Number
name1 LIKE lfa1-name1, " Vendor Name
shkzg LIKE bsik-shkzg, " Dr/Cr Indicator
belnr LIKE bsik-belnr, " Document Number
xblnr LIKE bsik-xblnr, " Ref Doc No
blart LIKE bsik-blart, " Document Type
zfbdt LIKE bsik-zfbdt, " Base Line Date
zbd1t LIKE bsik-zbd1t, " Due date1
zbd2t LIKE bsik-zbd2t, " Due Date2
zbd3t LIKE bsik-zbd3t, " Due Date3
waers LIKE bsik-waers, " Currency
dmbtr LIKE bsik-dmbtr, " Amount in Local Curr
END OF int_bsik.
Internal Table for Amounts Sum Up Data
DATA: BEGIN OF int_final OCCURS 0,
lifnr LIKE bsik-lifnr, " Vendor Number
name1 LIKE lfa1-name1, " Vendor Name
total1 LIKE bsik-dmbtr, " Amount in Local Curr
total2 LIKE bsik-dmbtr, " Amount in Local Curr
total3 LIKE bsik-dmbtr, " Amount in Local Curr
total4 LIKE bsik-dmbtr, " Amount in Local Curr
total5 LIKE bsik-dmbtr, " Amount in Local Curr
total6 LIKE bsik-dmbtr, " Amount in Local Curr
total LIKE bsik-dmbtr, " Amount in Local Curr
END OF int_final.
D A T A D E C L A R A T I O N S
DATA : v_flag, " Flag
v_gtotal1 LIKE bsik-dmbtr, " Amount Totals
v_gtotal2 LIKE bsik-dmbtr, " Amount Totals
v_gtotal3 LIKE bsik-dmbtr, " Amount Totals
v_gtotal4 LIKE bsik-dmbtr, " Amount Totals
v_gtotal5 LIKE bsik-dmbtr, " Amount Totals
v_gtotal6 LIKE bsik-dmbtr, " Amount Totals
v_gtotal LIKE bsik-dmbtr, " Amount Totals
v_subtotal1 LIKE bsik-dmbtr, " Amount Totals
v_subtotal2 LIKE bsik-dmbtr, " Amount Totals
v_subtotal3 LIKE bsik-dmbtr, " Amount Totals
v_subtotal4 LIKE bsik-dmbtr, " Amount Totals
v_subtotal5 LIKE bsik-dmbtr, " Amount Totals
v_subtotal6 LIKE bsik-dmbtr, " Amount Totals
v_subtotal LIKE bsik-dmbtr, " Amount Totals
v_date LIKE bsik-zfbdt, " Due Date
v_tage1(4), " Age 30 days
v_tage2(4), " Age 60 days
v_tage3(4), " Age 90 days
v_fir(15), " Column Text1
v_sec(15), " Column Text2
v_thir(15), " Column Text3
v_four(17), " Column Text4
v_fidd(4), " Days field1
v_sedd(4), " Days field2
v_thdd(4), " Days field3
v_fodd(4), " Days field4
v_str TYPE SY-LISEL, " String
v_str1(11), " String
v_tage(3), " String
v_date1(10). " Date field
R A N G E D E C L A R A T I O N S
RANGES: r_date1 FOR bsik-zfbdt, " Date Range 1
r_date2 FOR bsik-zfbdt, " Date Range 2
r_date3 FOR bsik-zfbdt, " Date Range 3
r_date4 FOR bsik-zfbdt. " Date Range 4
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr. "Vendor account
PARAMETERS: p_bukrs LIKE t001-bukrs. "Co. Code
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_allgst LIKE rfpdo-allgstid OBLIGATORY DEFAULT sy-datum.
"Open items at key date
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_tage1 LIKE rfpdo1-allgfael DEFAULT '30',
p_tage2 LIKE rfpdo1-allgfael DEFAULT '60',
p_tage3 LIKE rfpdo1-allgfael DEFAULT '90',
p_tage4 LIKE rfpdo1-allgfael DEFAULT '120'.
SELECTION-SCREEN END OF BLOCK b3.
A T S E L E C T I O N S C R E E N *
AT SELECTION-SCREEN.
Validate the screen fields
PERFORM validate_flds.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
T O P O F P A G E
Header
TOP-OF-PAGE.
PERFORM header.
E N D O F P A G E
Footer
END-OF-PAGE.
ULINE.
T O P O F P A G E D U R I N G L I N E S E L E C T I O N *
Top of Page in Secondary List
TOP-OF-PAGE DURING LINE-SELECTION.
PERFORM header1.
A T L I N E S E L E C T I O N *
AT LINE-SELECTION.
Perform Line Selections
PERFORM line_selection.
E N D O F S E L E C T I O N
END-OF-SELECTION.
List generation
PERFORM basic_list.
*& Form validate_flds
Validation of Selection Screen fields
FORM validate_flds .
Validate Vendor Code
CLEAR lfa1-lifnr.
SELECT lifnr UP TO 1 ROWS
INTO lfa1-lifnr
FROM lfa1
WHERE lifnr IN s_lifnr AND
spras = sy-langu.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'Invalid Vendor Code range'(023).
ENDIF.
Validate Company Code
CLEAR t001-bukrs.
SELECT bukrs UP TO 1 ROWS
INTO t001-bukrs
FROM t001
WHERE bukrs = p_bukrs AND
spras = sy-langu.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e021. " Invalid Company Code range
ENDIF.
IF ( p_tage1 > p_tage2 ) OR ( p_tage1 > p_tage3 ) OR
( p_tage1 > p_tage4 ).
MESSAGE e999 WITH 'Column 1 greater'(004)
'than Column# 2 or 3 or 4'(005).
ENDIF.
*column 2
IF ( p_tage2 > p_tage3 ) OR ( p_tage1 > p_tage4 ).
MESSAGE e999 WITH 'Column 2 greater'(006)
'than Column# 3 or 4'(007).
ENDIF.
*column3
IF ( p_tage3 > p_tage4 ).
MESSAGE e999 WITH 'Column 3 greater'(008)
'than Column#4'(009).
ENDIF.
ENDFORM. " validate_flds
*& Form fetch_data
Fetching Data from Database Tables
FORM fetch_data .
Date Range Population
r_date1-sign = 'I'.
r_date1-option = 'BT'.
r_date1-low = p_allgst.
r_date1-high = r_date1-low + p_tage1.
APPEND r_date1.
r_date2-sign = 'I'.
r_date2-option = 'BT'.
r_date2-low = r_date1-high + 1.
r_date2-high = r_date1-low + p_tage2.
APPEND r_date2.
r_date3-sign = 'I'.
r_date3-option = 'BT'.
r_date3-low = r_date2-high + 1.
r_date3-high = r_date1-low + p_tage3.
APPEND r_date3.
r_date4-sign = 'I'.
r_date4-option = 'BT'.
r_date4-low = r_date3-high + 1.
r_date4-high = r_date1-low + p_tage4.
APPEND r_date4.
Select the Vendor Open Items data from BSIK
SELECT l~lifnr
l1~name1
b~waers
b~dmbtr
b~zfbdt
b~zbd1t
b~zbd2t
b~zbd3t
b~belnr
b~xblnr
b~shkzg
b~blart
INTO CORRESPONDING FIELDS OF TABLE int_bsik
FROM lfb1 AS l INNER JOIN lfa1 AS l1
ON llifnr = l1lifnr
INNER JOIN bsik AS b
ON llifnr = blifnr AND
lbukrs = bbukrs
WHERE l~lifnr IN s_lifnr AND
l~bukrs = p_bukrs and
b~zfbdt le p_allgst.
IF SY-SUBRC <> 0.
MESSAGE i000 WITH 'No Data found'(027).
ENDIF.
Removing the date limit to get the due items in the past
DELETE int_bsik WHERE
( blart NE 'RE' AND blart NE 'KR' ) OR
shkzg NE 'H'.
SORT int_bsik BY lifnr.
ENDFORM. " fetch_data
*& Form header
Display the Report Columns
FORM header .
v_tage1 = p_tage1 + 1.
v_tage2 = p_tage2 + 1.
v_tage3 = p_tage3 + 1.
v_fidd = p_tage1.
v_sedd = p_tage2.
v_thdd = p_tage3.
v_fodd = p_tage4.
MOVE v_fodd0(4) TO v_fodd1(3).
v_fodd+0(1) = space.
CONCATENATE '1 to'(010) v_fidd INTO v_fir.
CONCATENATE v_tage1 ' to '(011) v_sedd INTO v_sec.
CONCATENATE v_tage2 ' to '(011) v_thdd INTO v_thir.
CONCATENATE v_tage3 ' to '(011) space v_fodd INTO v_four.
Standard header
clear: v_date1, v_str, v_str1, v_tage.
write p_allgst to v_date1.
Move p_tage4 to v_tage.
concatenate '>' v_tage text-025 into v_str1.
concatenate
'Summary of Ageing Analysis for Vendor Open Invoices as on'(013)
v_date1 into v_str separated by space.
FORMAT COLOR OFF.
WRITE : /1(168) sy-uline.
FORMAT COLOR 1 INTENSIFIED.
WRITE :/1 sy-vline, 13 sy-vline, 49 sy-vline,
50(101) 'Invoices Due For(In Days)'(014) CENTERED,
151 sy-vline, 168 sy-vline .
WRITE :/1 sy-vline, 2(11) 'Vendor#'(015) CENTERED,
13 sy-vline ,14(35) 'Vendor Name'(016) CENTERED,
49 sy-vline,
50(101) sy-uline,151 sy-vline,
152(16) 'Total'(017) CENTERED,
168 sy-vline.
WRITE : /1 sy-vline,13 sy-vline, 49 sy-vline,
50(16) v_fir CENTERED, 66 sy-vline,
67(16) v_sec CENTERED, 83 sy-vline,
84(16) v_thir CENTERED, 100 sy-vline,
101(16) v_four CENTERED, 117 sy-vline,
118(16) v_str1 centered, 134 sy-vline,
135(16) 'Already Overdue'(018) CENTERED,151 sy-vline,
168 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(168) sy-uline.
ENDFORM. " header
*& Form basic_list
Display the Basic List
FORM basic_list .
NEW-PAGE LINE-SIZE 168.
LOOP AT int_bsik.
CLEAR v_date.
IF int_bsik-zbd3t <> ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd3t.
ELSE.
IF int_bsik-zbd2t <> ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd2t.
ELSE.
v_date = int_bsik-zfbdt + int_bsik-zbd1t.
ENDIF.
ENDIF.
IF int_bsik-zbd1t = ' '.
v_date = int_bsik-zfbdt.
ENDIF.
IF v_date IN r_date1.
int_final-total1 = int_final-total1 + int_bsik-dmbtr.
ELSEIF v_date IN r_date2.
int_final-total2 = int_final-total2 + int_bsik-dmbtr.
ELSEIF v_date IN r_date3.
int_final-total3 = int_final-total3 + int_bsik-dmbtr.
ELSEIF v_date IN r_date4.
int_final-total4 = int_final-total4 + int_bsik-dmbtr.
ELSEif v_date > r_date4-high.
int_final-total5 = int_final-total5 + int_bsik-dmbtr.
ELSEif v_date < p_allgst.
int_final-total6 = int_final-total6 + int_bsik-dmbtr.
ENDIF.
AT END OF lifnr.
v_flag = 1.
ENDAT.
IF v_flag = 1.
int_final-lifnr = int_bsik-lifnr.
int_final-name1 = int_bsik-name1.
int_final-total = int_final-total1 + int_final-total2 +
int_final-total3 + int_final-total4 + int_final-total5 +
int_final-total6.
APPEND int_final.
v_gtotal1 = v_gtotal1 + int_final-total1.
v_gtotal2 = v_gtotal2 + int_final-total2.
v_gtotal3 = v_gtotal3 + int_final-total3.
v_gtotal4 = v_gtotal4 + int_final-total4.
v_gtotal5 = v_gtotal5 + int_final-total5.
v_gtotal6 = v_gtotal6 + int_final-total6.
v_gtotal = v_gtotal + int_final-total.
WRITE: /1 sy-vline,
2 int_final-lifnr COLOR 4 INTENSIFIED ON,
13 sy-vline,
14 int_final-name1 COLOR 4 INTENSIFIED ON,
49 sy-vline.
DATA : v_rem.
v_rem = sy-tabix MOD 2.
IF v_rem NE 0.
FORMAT COLOR 2 INTENSIFIED.
WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
66 sy-vline,
67 int_final-total2 CURRENCY int_bsik-waers,
83 sy-vline,
84 int_final-total3 CURRENCY int_bsik-waers,
100 sy-vline,
101 int_final-total4 CURRENCY int_bsik-waers,
117 sy-vline,
118 int_final-total5 CURRENCY int_bsik-waers,
134 sy-vline,
135 int_final-total6 CURRENCY int_bsik-waers,
151 sy-vline,
152 int_final-total CURRENCY int_bsik-waers,
168 sy-vline.
ELSE.
WRITE : 50 int_final-total1 CURRENCY int_bsik-waers,
66 sy-vline,
67 int_final-total2 CURRENCY int_bsik-waers,
83 sy-vline,
84 int_final-total3 CURRENCY int_bsik-waers,
100 sy-vline,
101 int_final-total4 CURRENCY int_bsik-waers,
117 sy-vline,
118 int_final-total5 CURRENCY int_bsik-waers,
134 sy-vline,
135 int_final-total6 CURRENCY int_bsik-waers,
151 sy-vline,
152 int_final-total CURRENCY int_bsik-waers,
168 sy-vline.
ENDIF.
FORMAT COLOR OFF.
HIDE int_final.
CLEAR int_final.
v_flag = 0.
ENDIF.
AT LAST.
WRITE : /1(168) sy-uline.
FORMAT COLOR 3 INTENSIFIED.
WRITE : /1 sy-vline, 2(47) 'GRAND TOTAL'(022) CENTERED,
49 sy-vline, 50 v_gtotal1 CURRENCY int_bsik-waers,
66 sy-vline, 67 v_gtotal2 CURRENCY int_bsik-waers,
83 sy-vline, 84 v_gtotal3 CURRENCY int_bsik-waers,
100 sy-vline,101 v_gtotal4 CURRENCY int_bsik-waers,
117 sy-vline,118 v_gtotal5 CURRENCY int_bsik-waers,
134 sy-vline,135 v_gtotal6 CURRENCY int_bsik-waers,
151 sy-vline,152 v_gtotal CURRENCY int_bsik-waers,
168 sy-vline.
HIDE : v_gtotal1,
v_gtotal2,
v_gtotal3,
v_gtotal4,
v_gtotal5,
v_gtotal6,
v_gtotal.
ENDAT.
FORMAT COLOR OFF.
ENDLOOP.
WRITE : /1(168) sy-uline.
ENDFORM. " basic_list
*& Form line_selection
When double clicked on the line display the seconday list
FORM line_selection .
NEW-PAGE LINE-SIZE 206.
Sy-lsind = 1.
DATA : v_rem,v_cnt LIKE sy-tabix.
v_cnt = 0.
SORT int_bsik BY belnr zfbdt.
LOOP AT int_bsik WHERE lifnr EQ int_final-lifnr.
v_rem = v_cnt MOD 2.
CLEAR v_date.
IF int_bsik-zbd3t <> ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd3t.
ELSE.
IF int_bsik-zbd2t <> ' '.
v_date = int_bsik-zfbdt + int_bsik-zbd2t.
ELSE.
v_date = int_bsik-zfbdt + int_bsik-zbd1t.
ENDIF.
ENDIF.
IF int_bsik-zbd1t = ' '.
v_date = int_bsik-zfbdt.
ENDIF.
IF v_rem NE 0.
format color 2 intensified.
WRITE :/1 sy-vline, 2 int_bsik-belnr,
12 sy-vline,13 int_bsik-lifnr,
23 sy-vline,24 int_bsik-name1,
59 sy-vline,60 int_bsik-xblnr,
76 sy-vline,77 int_bsik-zfbdt,
87 sy-vline.
WRITE : 104 sy-vline,121 sy-vline,
138 sy-vline,155 sy-vline,
172 sy-vline, 189 sy-vline,
190 int_bsik-dmbtr CURRENCY int_bsik-waers,
206 sy-vline.
IF v_date IN r_date1.
v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date2.
v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date3.
v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date4.
v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEif v_date > r_date4-high.
v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEif v_date < p_allgst.
v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
ENDIF.
format color off.
ELSE.
WRITE :/1 sy-vline, 2 int_bsik-belnr,
12 sy-vline,13 int_bsik-lifnr,
23 sy-vline,24 int_bsik-name1,
59 sy-vline,60 int_bsik-xblnr,
76 sy-vline,77 int_bsik-zfbdt,
87 sy-vline.
WRITE : 104 sy-vline,121 sy-vline,
138 sy-vline,155 sy-vline,
172 sy-vline,189 sy-vline,
190 int_bsik-dmbtr CURRENCY int_bsik-waers,
206 sy-vline.
IF v_date IN r_date1.
v_subtotal1 = v_subtotal1 + int_bsik-dmbtr.
WRITE : 88 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date2.
v_subtotal2 = v_subtotal2 + int_bsik-dmbtr.
WRITE : 105 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date3.
v_subtotal3 = v_subtotal3 + int_bsik-dmbtr.
WRITE : 122 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEIF v_date IN r_date4.
v_subtotal4 = v_subtotal4 + int_bsik-dmbtr.
WRITE : 139 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEif v_date > r_date4-high.
v_subtotal5 = v_subtotal5 + int_bsik-dmbtr.
WRITE : 156 int_bsik-dmbtr CURRENCY int_bsik-waers.
ELSEif v_date < p_allgst.
v_subtotal6 = v_subtotal6 + int_bsik-dmbtr.
WRITE : 173 int_bsik-dmbtr CURRENCY int_bsik-waers.
ENDIF.
ENDIF.
FORMAT COLOR OFF.
v_cnt = v_cnt + 1.
ENDLOOP.
WRITE : /1(206) sy-uline.
v_subtotal = v_subtotal1 + v_subtotal2 + v_subtotal3
+ v_subtotal4 + v_subtotal5 + v_subtotal6.
FORMAT COLOR 3 INTENSIFIED.
WRITE : /1 sy-vline,
2(85) 'Total'(017) CENTERED CURRENCY int_bsik-waers ,
87 sy-vline,
88 v_subtotal1 CURRENCY int_bsik-waers,
104 sy-vline,
105 v_subtotal2 CURRENCY int_bsik-waers,
121 sy-vline,
122 v_subtotal3 CURRENCY int_bsik-waers,
138 sy-vline,
139 v_subtotal4 CURRENCY int_bsik-waers,
155 sy-vline,
156 v_subtotal5 CURRENCY int_bsik-waers,
172 sy-vline,
173 v_subtotal6 CURRENCY int_bsik-waers,
189 sy-vline,
190 v_subtotal CURRENCY int_bsik-waers,
206 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(206) sy-uline.
CLEAR : v_subtotal,v_subtotal1,v_subtotal2,v_subtotal3,
v_subtotal4,v_subtotal5,v_gtotal1,v_gtotal2,v_gtotal3,
v_gtotal4, v_gtotal5,v_gtotal,v_subtotal6,v_gtotal6.
ENDFORM. " line_selection
*& Form header1
Secondary List Header
FORM header1 .
Standard header
clear: v_date1, v_str, v_str1, v_tage.
write p_allgst to v_date1.
Move p_tage4 to v_tage.
concatenate '>' v_tage text-025 into v_str1.
concatenate
'Details of Ageing Analysis for Vendor Open Invoices as on'(024)
v_date1 into v_str separated by space.
FORMAT COLOR 1 intensified.
WRITE :/1(206) sy-uline.
WRITE :/1 sy-vline,12 sy-vline ,
23 sy-vline,59 sy-vline,76 sy-vline,87 sy-vline,
88(101) 'Invoices Due For(In Days)'(014) CENTERED,
189 sy-vline,206 sy-vline.
WRITE : /1 sy-vline, 2(10) 'Doc Number'(021) CENTERED,
12 sy-vline, 13(10) 'Vendor#'(015) CENTERED,
23 sy-vline, 24(35) 'Vendor Name'(016) CENTERED,
59 sy-vline, 60(16) 'Ref invoice#'(019) CENTERED,
76 sy-vline, 77(10) 'Inv dt'(020) CENTERED,
87 sy-vline, 88(101) sy-uline,
189 sy-vline,190(16) 'Total'(017) CENTERED,
206 sy-vline.
WRITE : /1 sy-vline, 12 sy-vline,
23 sy-vline,59 sy-vline,
76 sy-vline,87 sy-vline,
88(16) v_fir CENTERED, 104 sy-vline,
105(16) v_sec CENTERED, 121 sy-vline,
122(16) v_thir CENTERED, 138 sy-vline,
139(16) v_four CENTERED, 155 sy-vline,
156(16) v_str1 CENTERED,
172 sy-vline,
173(16) 'Already Overdue'(018) CENTERED,
189 sy-vline,
206 sy-vline.
format color off.
WRITE : /1(206) sy-uline.
ENDFORM. " header1Hi
Account Payables(AP) data related vendor invoices is stored in BSIK and BSAK tables
SO fetching the data from those tables for the given vendor and the bucket selected (as I told this ageing is calculated in daysbuckets) and display and the totals at the end of the vendor
go through the code it is easily understandable as we are fetching data just from table BSIK and vendor tables LFA1 LFB1.
<b>Reward points for useful Answers</b>
Regards
Anji -
class ThreadA {
public static void main(String [] args) {
ThreadB b = new ThreadB();
b.start();
synchronized(b) {
try {
System.out.println("Waiting for b to complete...");
b.wait();
} catch (InterruptedException e) {}
System.out.println("Total is: " + b.total);
class ThreadB extends Thread {
int total;
public void run() {
synchronized(this) {
for(int i=0;i<100;i++) {
total += i;
notify();
}can anyone please explain me the code flow of this particular program n how does wait n notify work inb this..im a bit confused.thankx in adv.sowme wrote:
kajbj wrote:
sowme wrote:
its just an example to illustrate the use of wait and notify and i think i havent mentioned any word saying this code is a good one or safe to use ..but i would like to know why it is bad and unsafe.Total needs to be volatile. The main thread can otherwise print the wrong value. There's also a possibility that the program never terminates, and that can happen if thread B gets the lock before the main thread gets the lock. (That is, notify is called before the main thread has invoked wait).
but when will this happen that is thread B gets the lock before the main thred gets the lock?i dint understand can u please explain.The threads are sharing the cpu time, and thread B can start executing after the call to b.start(). Nothing says that the main thread will reach the syncrhonized block before thread b does.
Kaj
Maybe you are looking for
-
How to turn on Flat Sequence Structure based on a Boolean input?
Hello, I trying to write a VI ( attached) that will sample an analog voltage coming through a an analog MUX. I using a flat sequance structure to change the select signals outputs to change the channel being sampled. I am wondering if I can turn on t
-
10.6.2: Bad image quality with SIPS
I used to convert my PDF documents with SIPS like this: /usr/bin/sips --setProperty format jpeg --setProperty formatOptions high -z 400 200 sourcefilename.pdf --out targetfilename.jpg This results in a very bad image quality after updating to 10.6.2
-
MLS implementation - Oracle Apps 11i
Can anybody answer by following questions: 1)What is Localization? 2)How to add new language (Japan) to an existing 11i instance?? 3)Is it possible for a user to see the data in English which was input by an Japanese user in Japanese lang and vice-ve
-
Hi I have created a payment advice FBE1 by mistake through F110, where is says generate payment advice I have tried to delete using FBe6, but it states that I can only delete this after 10 days. Is there any other way to delete FBE1. We do not u
-
Unexpected DAG mailbox database failover
Good evening I am running a three node Exchange 2013 server environment in a stretched DAG configuration. I have been experiencing a problem recently whereby failover is occurring unexpectedly. Below is a brief description of the environment. Site 1