on 10-11-2007 9:02 AM
Hi all,
Our end routine, located between two DSO is aimed at filling a field of the target DSO through a lookup to another table (or a third DSO). At the end of this end routine, according to the debugger, the result_package contains the record as it should be written in the DSO : the concerned field contains the right value.
However, after having been loaded, the DSO does not contain any value for this field. What is the possible cause of this issue ?
Thanks for your feedback,
chris
FYI -
Just to let you know, there is a bug in NW 7.0 with un-mapped fields being filled in the End Routine. I don't have the OSS note handy, but we had this issue on SP 7, and saw the issue again on SP 13.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Ensure all the related objects are active and then debug
Regards
N Ganesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
what is the code of the end routine?
so that we can suggest a solution?
Janardhan KUmar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is an extract of the code (without declaration):
LOOP AT RESULT_PACKAGE into itab.
select BBP_SC_ID BBP_APPROV /BIC/C_AP_ENDD /BIC/C_AP_ENDT
from /BIC/AZOGPES0200
into table tab_approv
where BBP_SC_ID = itab-BBP_SC_ID
and /BIC/C_TYPAPPR = 'H'.
sort tab_approv by /BIC/C_AP_ENDD descending /BIC/C_AP_ENDT descending.
delete adjacent duplicates from tab_approv comparing BBP_SC_ID.
read table tab_approv index 1 into st_approv.
if sy-subrc = 0.
itab-/bic/C_VALHIER = st_approv-BBP_APPROV.
endif.
modify RESULT_PACKAGE from itab.
Thanks for your help
chris
Dear Chris,
Why can't you write it in Start Routine itself. copy the same code into start routine and replace RESULT_PACKAGE with SOURCE_PACKAGE.
Ofcourse for the concerned field is direct mapping in your rule details the above appraoch works.
One more thing : May be you never find a hit with the select statement and that is why you are getting blank. Try to debug and check.
Regs
Gopi
Assign point if it helps
please note the loop will run for each record in the package & select will run everytime which is highly time consuming. Also if you want to update one field in target DSO my suggestion is make use of start routine & field routine.
In start Routine update following code ---
select BBP_SC_ID BBP_APPROV /BIC/C_AP_ENDD /BIC/C_AP_ENDT
from /BIC/AZOGPES0200 into table tab_approv
for all entries in SOURCE_PACKAGE
where BBP_SC_ID = SOURCE_PACKAGE-BBP_SC_ID
and /BIC/C_TYPAPPR = 'H'.
sort tab_approv by /BIC/C_AP_ENDD descending /BIC/C_AP_ENDT descending.
delete adjacent duplicates from tab_approv comparing BBP_SC_ID.
In the Field Routine update the field as per the condition.In routine SOURCE-FIELD is main table.
Dear all,
Finally, the best solution we found consisted in making the lookup to the other table through the start routine and to put the results in an internal table. Then, in the update rules, the field gets the result through a read of the internal table.
Thanks & regards - Some points rewarded.
chris
Hi Chris,
Check the end routine, last statement should be ..modify result package ..
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.