2005 Sep 26 2:37 AM
Hi all,
I have a requirement where i need to lookup for a value in ods1 and based on that value i should update in ods2. can anyone help me with any abap logic --- is there one for look-up ? any sample code would be really helpful.
~rahul
2005 Sep 26 3:59 AM
Rahul - I'm not entirely sure what you want. Is it something like:
parameter: p_seln.
SELECT SINGLE zfield1
FROM ztab1
INTO ztab1-zfield1
WHERE zkey1 = p_seln.
UPDATE ztab2
SET zfield2 = ztab1-zfield1
WHERE zkey2 = ztab1-zkey1.Rob
Hi all,
I have a requirement where i need to lookup for a value in ods1 and based on that value i should update in ods2. can anyone help me with any abap logic --- is there one for look-up ? any sample code would be really helpful.
~rahul
2005 Sep 26 3:59 AM
Rahul - I'm not entirely sure what you want. Is it something like:
parameter: p_seln.
SELECT SINGLE zfield1
FROM ztab1
INTO ztab1-zfield1
WHERE zkey1 = p_seln.
UPDATE ztab2
SET zfield2 = ztab1-zfield1
WHERE zkey2 = ztab1-zkey1.Rob
2005 Sep 26 5:31 AM
thanks rob. assume there is an infoobject A in ods1. Based on A's value i need to update the infoobject B in ods2 based on some calculation. for this i need to lookup for the value of A. Hope i am a bit clear now.
P.S: A resides in ods1, B in ods2.
Message was edited by: rahul choudhury
Message was edited by: rahul choudhury
2005 Sep 26 7:07 AM
the following method will give the ODS table name
CALL METHOD cl_rsd_odso=>get_tablnm
EXPORTING
i_odsobject = <ods name>
i_tabt = '0'
IMPORTING
e_tablnm = ods_tab_name .
do a select from the ODS table to find whether infoobject A is there and get the value and based on that update ods2.
Regards
Raja
2005 Sep 26 8:50 AM
thanks raja. do i need to write the code in se38 to find out the ods table first. could u please tell. i will try that and let u know the outcome.
Message was edited by: rahul choudhury
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |