‎2007 Jan 31 6:11 AM
can anybody advice me please.
As I'm trying to modify ITAB, but not able to modify......
READ TABLE i_yibrk_earnings INTO w_yibrk_earnings INDEX 1.
IF sy-subrc EQ 0.
w_yibrk_earnings-status = 'S'. "Status S-Submitted
w_yibrk_earnings-cname = sy-uname. "submitted by
w_yibrk_earnings-cdate = sy-datum. "submitted date (should be in MM-DD-yyyy format)
MODIFY TABLE i_yibrk_earnings FROM w_yibrk_earnings TRANSPORTING status cname cdate.
ENDIF.
Structure and Data of i_yibrk_earnings:
*********************************************
Field:BAREA PLTYP PLAN_OPT BEGDA ENDDA VALUE_DATE
Data: SPACE DMP D SPACE SPACE 26.01.2007
field:PERCENTAGE STATUS CNAME CDATE UNAME AEDTM
data: 10,00
first line fields are key fields...
Thanks in advance...
‎2007 Jan 31 6:23 AM
Why don't you use the below MODIFY statement:
MODIFY i_yibrk_earnings INDEX 1 FROM w_yibrk_earnings
TRANSPORTING status cname cdate.
‎2007 Jan 31 6:20 AM
Hi,
Give the WHERE condition also in the MODIFY TABLE.
Regards
Subramanian
‎2007 Jan 31 6:22 AM
‎2007 Jan 31 6:23 AM
Why don't you use the below MODIFY statement:
MODIFY i_yibrk_earnings INDEX 1 FROM w_yibrk_earnings
TRANSPORTING status cname cdate.
‎2007 Jan 31 6:25 AM
hi BR.
use field symbols to modify the internal tabe.. so that it very esy for u as well as improves the performance. u no need to use MODIFY again.
FIELD-SYMBOLS: <fs_ w_yibrk_earnings> TYPE TY_ITAB.
READ TABLE i_yibrk_earnings ASSIGNING <fs_ w_yibrk_earnings> INDEX 1.
IF sy-subrc EQ 0.
<fs_ w_yibrk_earnings>-status = 'S'. "Status S-Submitted
<fs_ w_yibrk_earnings>-cname = sy-uname. "submitted by
<fs_ w_yibrk_earnings>-cdate = sy-datum. "submitted date (should be in MM-DD-**yyyy format)
***MODIFY TABLE i_yibrk_earnings FROM w_yibrk_earnings TRANSPORTING **status cname cdate.
ENDIF.Please Close this thread.. when u r problem is solved
Reward if Helpful
Regards
Naresh Reddy K
‎2007 Jan 31 6:27 AM
Hi,
Since u r reading a record of INDEX 1.., u have to mention the Index while modifying...
this will modify a single entry...
But if u use a WHERE condition this can modify many records depending on the condition specified in where clause..
Cheers
Rajiv
‎2007 Jan 31 6:39 AM
Hi,
Use the modify statement within a loop.The table should get modified.
Pls reward if found useful.
Thanks
Shyam
‎2007 Jan 31 6:44 AM
hi all,
my problem was solved with Sushant's advice.
Thanks to all for helpful advices and points rewarded to all...
Thanks...