on 11-05-2007 8:15 PM
Hello friends. Thanks to SDN for getting the below code work. I just need to fix this last one. I want to modify only the data for Fiscper 001.2007 and 002.2007. I was able to modify all the data in Table /BIC/AZDAFIGL000 but when I put the restriction Fiscper 001.2007 it does not modify the data Table /BIC/AZDAFIGL000
Message was edited by:
soniya kapoor
Your condition should be
AND (FISCPER = '001.2007' OR FISCPER = '002.2007').
If you put AND (FISCPER = '001.2007') AND ( FISCPER = '002.2007'). The condition will always fail.
TRUE AND FALSE = FALSE.
TRUE AND TRUE = TRUE.
Since the Value of FISCPER can never be 001.2007 and 002.2007 at the same time, the condition fails
Regards,
Abhishek
Message was edited by:
Abhishek Jolly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Soniya.
Your code is not correct.
LOOP AT I_MAT into wa_itab.
select * from /BIC/AZDAFIGL000 into wa_zdtg
WHERE COMP_CODE EQ wa_itab-COMP_CODE AND PROFIT_CTR EQ
WA_ITAB-PROFIT_CTR AND ( FISCPER = '001.2007' OR FISCPER = '002.2007')
IF SY-SUBRC = 0.
wa_zdtg-/BIC/ZCONSUNIT = wa_itab-/BIC/ZCONSUNIT.
ENDIF.
MODIFY /BIC/AZDAFIGL000 from wa_zdtg.
endselect.
endloop.
Your modify statement was outside the loop. So the data was not getting updated in the database table.
I did this but it is not working. what I need to do FISCPER Is standard content
LOOP AT I_MAT into wa_itab.
select * from /BIC/AZDAFIGL000 into wa_zdtg
WHERE COMP_CODE EQ wa_itab-COMP_CODE AND PROFIT_CTR EQ
WA_ITAB-PROFIT_CTR AND ( FISCPER = '001.2007' OR FISCPER = '002.2007')
IF SY-SUBRC = 0.
wa_zdtg-/BIC/ZCONSUNIT = wa_itab-/BIC/ZCONSUNIT.
ENDIF.
MODIFY /BIC/AZDAFIGL000 from wa_zdtg.
endselect.
endloop.
Can try with this:
LOOP AT I_MAT into wa_itab.
select * from /BIC/AZDAFIGL000 into wa_zdtg
WHERE COMP_CODE EQ wa_itab-COMP_CODE AND PROFIT_CTR EQ
WA_ITAB-PROFIT_CTR AND ( FISCPER = <b>'2007001'</b> OR FISCPER = <b>'2007002'</b>) " <<<
IF SY-SUBRC = 0.
wa_zdtg-/BIC/ZCONSUNIT = wa_itab-/BIC/ZCONSUNIT.
ENDIF.
MODIFY /BIC/AZDAFIGL000 from wa_zdtg.
endselect.
endloop.
Regards,
Naimesh Patel
Hello friends, Select query is failing, modification work fine if I remove fiscper restriction.
I use nimesh template it says <b> b not declared nor as Data .
I removed <b> b and its working. but now i will just post another where i will use the logic to use the select statement based on current quater based on system date.
thanks alot for all friends help
thanks
soniya
null
soniya kapoor
User | Count |
---|---|
91 | |
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.