2007 Apr 04 9:50 AM
hi all,
i need to change it_header at method BEFORE_UPDATE but since it is importing table, it is not allowed to be changed ..is there anyway that enable me to change the data at it_header
2007 Apr 04 11:02 AM
Try to use field-symbols
field-symbols: <fs_abc> type cobai_s_header.
Loop at IT_HEADER assigning <fs_abc>
your codes....
endloop.
Hope it helps.
hi all,
i need to change it_header at method BEFORE_UPDATE but since it is importing table, it is not allowed to be changed ..is there anyway that enable me to change the data at it_header
2007 Apr 04 11:02 AM
Try to use field-symbols
field-symbols: <fs_abc> type cobai_s_header.
Loop at IT_HEADER assigning <fs_abc>
your codes....
endloop.
Hope it helps.
2007 Apr 05 3:36 AM
Hi Yuen Yap,
Thanks for replying.
This is my coding:
field-symbols: <fs_abc> type line of cobai_t_header.
loop at it_header assigning <fs_abc>.
<fs_abc>-refnr = 'abc'.
modify it_header from <fs_abc> transporting refnr.
endloop.
but still error occurs:
the field it_header cannot be changed
Kindly advice if you have the sample correct coding
2007 Apr 05 4:10 AM
As I remember you don't need to use the reserve word modify. Try it in debug mode to see if it change.
Your code should just have:
loop at it_header assigning <fs_abc>.
<fs_abc>-refnr = 'abc'.
endloop.
Field-symbols works like a pointer, it points to that specific record.
2007 Apr 05 9:30 AM
Thanks Yuen Yap.
I need to ask 1 more question. DO you have any idea what is the indicator in this BADI when it is in creating/changing mode instead of looking from sy-tcode
2007 Apr 09 9:42 AM
Errrmmm... I need more clarification. What kind of indicator are you refering? Success indicator (sy-subrc)?
sy-tcode is a transaction code. BADI work as exits, it needs to be implemented and activate before you can start using it.
2007 Apr 09 9:56 AM
Thanks Yuen Yap for replying.
I have found the 'insert' indicator at component level.
it_component-vbkz = 'I'
another 1 question:
smod: CNEX0016 has importing parameter COCI_AUFK_IMP which will auto update to EBAN (PR table) , how come badi WORKORDER_UPDATE does not have..or is there any other badi that can perform update to EBAN
2007 Apr 11 3:56 AM
I don't think I can help you much, because I am a HR programmer and not a logistic programmer. You can start a new thread for this question so that other experts can help you.
If you are asking general Abap question, I can still help, but the question you just posted don't look like a general Abap question.
2007 Apr 11 3:58 AM
2010 Jan 21 7:08 AM
I am having similar problem to overwriting badi fileds..have you mangaed solve this???
method if_ex_workorder_update~before_update.
break dreddy.
field-symbols: <fs_abc> type line of cobai_t_header.
loop at it_header assigning <fs_abc>.
<fs_abc>-gltrp = '20100130'.
endloop.
endmethod.
2007 Oct 09 8:12 PM
Hi ,
I have a similar requirement to update the special stock indicator in the components tab of work order. I too used the field symbol technique but it is not working.
My code is
assign wa_component to <fs_abc>.
<fs_abc>-sobkz = '3'.
Please correct if there is any error in the code.
Regards,
Prabaharan.G
2010 Jan 21 7:07 AM
i am having similar probelme...did you managed to solve the issue??
method if_ex_workorder_update~before_update.
break dreddy.
field-symbols: <fs_abc> type line of cobai_t_header.
loop at it_header assigning <fs_abc>.
<fs_abc>-gltrp = '20100130'.
endloop.
endmethod.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |