2009 Apr 03 12:22 AM
Hello Gurus,
How can we use structured variables as parameters. Here is the code that I am working on.
abap.
call method abc=>xyz
exporting 123 = 456
345 = 678
importing 012 = 345.
endabap.
log ( 345 ).
chetab ( ijk , ijk_1 ).
So when i run the script i notice that log ( 345 ) gives me:-
log 345 = XML-DATA-01
Parameter
1
a
b
c
2
a
b
c
Now 345 is a table with diff fields (a, b, c) and multiple records (1, 2,..). In chetab command interface I have to give b and c field values to compare and is it also possible to repeat the check for diff records. Please help me with this.
Thanks,
GS.
2009 Apr 16 6:37 AM
Hi,
use the code below.
Do 5 .
variable abc = x[&lpc]-a.
variable qwe = x[&lpc]-b.
CHETAB ---> pass abc and qwe or x[&lpc]-a and x[&lpc]-b.
in the interface,
clear chetab_1.
end loop
since chetab is in loop.
refresh the chetab interface so that every time in loop new data gets inn.
regards
vinay
Hello Gurus,
How can we use structured variables as parameters. Here is the code that I am working on.
abap.
call method abc=>xyz
exporting 123 = 456
345 = 678
importing 012 = 345.
endabap.
log ( 345 ).
chetab ( ijk , ijk_1 ).
So when i run the script i notice that log ( 345 ) gives me:-
log 345 = XML-DATA-01
Parameter
1
a
b
c
2
a
b
c
Now 345 is a table with diff fields (a, b, c) and multiple records (1, 2,..). In chetab command interface I have to give b and c field values to compare and is it also possible to repeat the check for diff records. Please help me with this.
Thanks,
GS.
2009 Apr 03 11:41 PM
Hello Gurus,
My question now is half answered. I am able to pass a, b values in CHETAB command. All I had to do was in CHETAB command interface for element a, b i entered the value as X[1]-a and X[1]-b.
However as mentioned earlier X[] has multiple records say 5. So i have to check table entries for 5 records. I have writted my CHETAB command in DO loop. However everytime it takes X[1]-a and X[1]-b.
So, all I need now is, can it take X[2]-a and X[2]-b, X[3]-a and X[3]-b, ... for each iteration in the DO loop. I dont know whether its possible. But if it is then please can anybody help me on this.
Thanks,
GS
Note: Sorry Gurus, please replace X with 345 in this message.
Edited by: Get Started on Apr 4, 2009 12:41 AM
2009 Apr 16 6:37 AM
Hi,
use the code below.
Do 5 .
variable abc = x[&lpc]-a.
variable qwe = x[&lpc]-b.
CHETAB ---> pass abc and qwe or x[&lpc]-a and x[&lpc]-b.
in the interface,
clear chetab_1.
end loop
since chetab is in loop.
refresh the chetab interface so that every time in loop new data gets inn.
regards
vinay
2009 Apr 17 4:31 AM
Hello Vinay,
I have done the same thing and was able to use the structured variables as parameters. Thank you so much for reply. Now that you have taken some time in writing a mail, I have awarded the points to you.
Thanks,
GS
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |