on 09-18-2008 5:45 AM
Hi Expert,
I have a requirement. which needs to be compare the values of the field in the loop or read statement.
Thanks in Advance,
venkat
Hi,
i am assuming Itab as:
vendor
v1
v2
v3
v4
....
and Ktab as
__Vendor_ Quota_
V1 Q1
V2 Q2
V3 Q3
V4 Q4
...................................
So you want to compare that Q1,Q2,Q3,Q4 are equal or not...if so then you can do it in this way
Loop at ITAB into wa_itab.
read table ktab into wa_ktab with key vendor = wa_itab-vendor.
if sy-subrc = 0.
if temp_quota is initial.
temp_quota = wa_ktab-quota.
elseif temp_quota = wa_ktab-quota. "Same quota as for the previous record
<whatever processing you want>
elseif temp_quota <> wa_ktab-quota. "Different quota as for the previous record
<whatever processing you want>
endif.
As youe requirement is not very clear i could suggest you this much only but inthis way you can set a flag for differnt values of quota or same values .
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neha,
thanks for your reply, i hope u understood properly..
here i already got quota records in ktab table based on the quota arrangement number from itab.
now i want to check wether all quota values are different or same.
ex:- if i go to md04..there i will give material, werks, then i will see the quota arrangement for that material. if i click on quota arrangement ..i will see list of quota items...vendors...quota values..
ex:-
1 vendor1 quota1
1 vendor2 quota1
ex:-
1 vendor1 quota1
2 vendor2 quota2
so this is the way i will hav the values..
now i want to check my internal table(ktab) which contain quota values and vendors...
is there all quota values are same...or differnet?
so how to check.
Thanks in Advance,
Venkat
hiii
i think for this prblem you use the concept of for all entries ...thru this you compare both the table......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi..
try this
DATA: HEX1(3) TYPE X VALUE '34B7A1',
HEX2(1) TYPE X VALUE 'F0'.
IF HEX2 > HEX1.
...
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For me the question is not clear explain that in detail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murthy,
my requirement is..
i have valid vendors in 'itab' table.
for that valid vendors i have different quota values in 'ktab' table
there is a possibility that may be all the quota values are same for all the vendors.
so i want to check wether quota field values are same or different for vendors which are available in itab table.
so how can i check it.
Thanks in Advance,
venkat
User | Count |
---|---|
87 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.