2008 May 15 10:42 AM
Hi there , I got this problem , in a ALV I got a quantity field that in the field catalog is referred to a unit field, the problem is that when i change the value , after click or enter pressing, the value change in Sap standard value , for example the value 30 (pieces) began 0,030, I tried to intercept the data_changed event but seems that I can read the new value but I can't write on it.
this is how I declared the fieldcatalog
ls_fieldcatalog-col_pos = 8.
ls_fieldcatalog-fieldname = 'MENGE_C'.
ls_fieldcatalog-reptext = ls_fieldcatalog-scrtext_l =
ls_fieldcatalog-scrtext_m = ls_fieldcatalog-scrtext_s = 'Q.ta Cons Forn.'.
ls_fieldcatalog-outputlen = '000015'.
ls_fieldcatalog-qfieldname = 'MEINS'.
ls_fieldcatalog-just = 'R'.
ls_fieldcatalog-emphasize = 'C3'.
APPEND ls_fieldcatalog TO pt_fieldcat. "clear pt_fieldcat.
(i change the editability dinamically depending on the value of another field)
Hi there , I got this problem , in a ALV I got a quantity field that in the field catalog is referred to a unit field, the problem is that when i change the value , after click or enter pressing, the value change in Sap standard value , for example the value 30 (pieces) began 0,030, I tried to intercept the data_changed event but seems that I can read the new value but I can't write on it.
this is how I declared the fieldcatalog
ls_fieldcatalog-col_pos = 8.
ls_fieldcatalog-fieldname = 'MENGE_C'.
ls_fieldcatalog-reptext = ls_fieldcatalog-scrtext_l =
ls_fieldcatalog-scrtext_m = ls_fieldcatalog-scrtext_s = 'Q.ta Cons Forn.'.
ls_fieldcatalog-outputlen = '000015'.
ls_fieldcatalog-qfieldname = 'MEINS'.
ls_fieldcatalog-just = 'R'.
ls_fieldcatalog-emphasize = 'C3'.
APPEND ls_fieldcatalog TO pt_fieldcat. "clear pt_fieldcat.
(i change the editability dinamically depending on the value of another field)
2008 May 15 11:24 AM
2008 May 15 11:39 AM
Thanks for your answer but my ALV is an object ALV and does not work in the same way of the function one does..
2008 May 15 11:47 AM
Hi ,
In the catalog please check if you are using the REF Table field and in the example you gave for thet row what is the value of MEINS.
Regards
Arun
2008 May 15 1:36 PM
The quantity is referred to an order, so the meins is the one of the order line,( usually pieces ), that is stored in the same internal table .
..I noted that in the handle_data_changed event there is a sort of "object of the object"
er_data_changed->mp_mod_rows
that has the same structure of my internal table , and where the new data are stored , I tried to access the field in the debugging mode and I changed the value of interest by hand , but seems that is not possible in the abap code ( i tried in forms like er_data_changed->mp_mod_rows-menge_c ) , someone got an idea ??
2008 May 15 3:33 PM
...resolved by myself this way :
in method METHOD handle_data_changed.
FIELD-SYMBOLS: <fs> TYPE table.
*
LOOP AT er_data_changed->mt_mod_cells INTO wa_mod_cell.
*
ASSIGN er_data_changed->mp_mod_rows->* TO <fs>.
*
READ TABLE <fs> INTO rc_doc INDEX wa_mod_cell-tabix.
*
I DO MY COMPUTATION
*
MODIFY <fs> FROM rc_doc INDEX wa_mod_cell-tabix.
*
GET REFERENCE OF <fs> INTO er_data_changed->mp_mod_rows.
*
ENDLOOP.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |