Hello Experts,
we are extracting data from 2lis_11_vaitm. after the first load to the target.. in the next delta loads for few document types we are fill the field1 and field2 in the DSO.. below is the scenario
IF doc_type <> x.. then
the values from the Refer_doc and refer_item from the loading request should be compared to the Doc_num and doc_item in the DSO, if we find any entry in the DSO.. then we have to copy the values from the doc_numb and doc_itm from Request to the DSO fields - field A and Field B..
Example:
IF Refer_doc(in request) = Doc_num (in DSO) and refer_item(in req) = Doc_itm ( in DSO)
then, Field 1 (in DSO) = Doc_num (in Loading REquest)
Field 2 (in DSO) = doc_item(in loading request)
Loading Request:
Refer_doc | refer_itm | doc_numb | doc_itm | |
---|---|---|---|---|
100 | 10 | 500 | 50 |
data in target:
refer_doc | refer_itm | doc_num | doc_itm | field A | field B |
---|---|---|---|---|---|
100 | 10 | 500 | 50 |
(Copied values from blue to green)
I tried writing routine in the the fields and also in the end routine.. I am not understanding how to write this values in the DSO.
here is the attached code in the field routine:
If SOURCE_FIELDS-AUART <> 'x'.
if SOURCE_FIELDS-VGBEL is NOT INITIAL.
read table itab1 into wa_itab1 with key /* i hv declared itab as global with the structure as DSO, and filling it in the start routine */
doc_num = SOURCE_FIELDS-VGBEL
doc_item = SOURCE_FIELDS-VGPOS
Binary search.
If sy-subrc = 0.
RESULT = wa_itab1-doc_num.
endif.
endif.
endif.
by this coding.. it is writing value for the record in the request.. but i want the value to be updated in the DSO.
Coudl anyone suggest me..??