‎2007 Oct 18 3:16 AM
hi all,
i have a requirement which says:
If RECONCILER is not initial.Perform a Lookup by Reconciler name to obtain all accounts for the select Reconciler; Search on ZRECON_ORG_STR-ROLE+0(1) = R and ZRECON_ORG_STR-HOLDER = RECONCILER.
here, i have two internal tables:
first one has the recon master data which has all account details and second one has organization data which has reconciler name role holder all those fields.
how to achieve this?
what is the meaning of performing lookup?
thanks,
points assured
‎2007 Oct 18 3:41 AM
Let me try:
Say master table is MASTER and org role table is ORG.
If not wf_reconciler is initial.
Loop at ORG where HOLDER = RECONCILER
and ROLE+0(1) = 'R'.
Loop at MASTER where RECONCILER = RECONCILER.
"Here you can get all the accounts since the condition from first loop
"will only give you those reconcilers who have the ROLE+0(1) = 'R'
Endloop.
Endloop.
endif.
Hope this helps
Regards
Nishant
‎2007 Oct 18 3:41 AM
Let me try:
Say master table is MASTER and org role table is ORG.
If not wf_reconciler is initial.
Loop at ORG where HOLDER = RECONCILER
and ROLE+0(1) = 'R'.
Loop at MASTER where RECONCILER = RECONCILER.
"Here you can get all the accounts since the condition from first loop
"will only give you those reconcilers who have the ROLE+0(1) = 'R'
Endloop.
Endloop.
endif.
Hope this helps
Regards
Nishant
‎2007 Oct 18 3:44 AM
what is the meaning of performing lookup?
This mean that you need to <b>search </b>by Reconciler name to obtain all accounts for the select Reconciler.
ashish
‎2007 Oct 18 4:10 AM
THANKS FOR THE INPUT. WELL I AM TRYING THIS CODE.. LETS SEE AFTER DEBUGGING
IF reconciler IS NOT INITIAL.
LOOP AT t_lookup.
READ TABLE t_lookup WITH KEY role+0(1) = 'R'
holder = 'RECONCILER'.
if syst-subrc = 0.
append t_lookup-account to t_acct.
endif.
ENDLOOP.
‎2007 Oct 18 4:13 AM
Hi,
Just for your info,
this is going to be bad performance code since for all accounts u'll check if the reconciler has role+01 = 'R' and it might be that the table has 2000 records and only 2 records are there that match.
rgds
Nishant