‎2011 Jan 26 11:51 AM
Hi experts
I have created a Z table with corresponding maintenance view (with transaction). Also, there is a Z program to insert records into the table from xls file.
When accesing the maintenance view, I can add and remove entries, but the problem is:
when I update a record, if the records has been created using the maintenance view, then changes are saved to database, but if I try to modify a record added by using the Z program, none of the modifications are saved to DB.
I have re-created maintenance view, and table properties (delivery class A, display/maintenance allowed ...) seem to be OK.
Can someone provide some help with this?.
Many thanks in advance for your help.
Best regards,
Carlos.
‎2011 Jan 26 4:53 PM
Hi Carlos,
I have replicated your scenario and I do not face any issue. Can you please regenerate the table maintenance view by selecting 'Expert Mode'.
If you still face the issue, you can paste your program and other details here.
Regards,
Rudresh Chand
Edited by: Rudresh Chand on Jan 26, 2011 5:55 PM
‎2011 Jan 26 4:53 PM
Hi Carlos,
I have replicated your scenario and I do not face any issue. Can you please regenerate the table maintenance view by selecting 'Expert Mode'.
If you still face the issue, you can paste your program and other details here.
Regards,
Rudresh Chand
Edited by: Rudresh Chand on Jan 26, 2011 5:55 PM
‎2011 Jan 26 5:25 PM
HI
Thanks for your answer, but didn't work.
Below my program (
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_fin
i_begin_col = 1
i_begin_row = 2
i_end_col = 9
i_end_row = 9999
TABLES
intern = gt_fichero
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
LOOP AT gt_fichero INTO gs_fichero.
CASE gs_fichero-col.
WHEN 1. "Proyecto
"Validaciones
gs_unidades-proyecto = gs_fichero-value.
WHEN 2. "TipologÃa
"Validaciones
gs_unidades-tipologia = gs_fichero-value.
WHEN 3. "Alias
"Validaciones
gs_unidades-identificador = gs_fichero-value.
WHEN 4. "Superficie
"Validaciones
TRANSLATE gs_fichero-value USING ',.'.
gs_unidades-superficie = gs_fichero-value.
WHEN 5. "Estado
"Validaciones
gs_unidades-estado = gs_fichero-value.
WHEN 6. "Entrega
"Validaciones
gs_unidades-entrega = gs_fichero-value.
WHEN 7. "PVPCoste
"Validaciones
TRANSLATE gs_fichero-value USING ',.'.
gs_unidades-pvpcoste = gs_fichero-value.
"Se añade el registro a la tabla de datos maestros
INSERT ztt_fi_unidades FROM gs_unidades.
CLEAR gs_unidades.
IF sy-subrc EQ 0.
gv_total_correctos = gv_total_correctos + 1.
ELSE.
gv_total_erroneos = gv_total_erroneos + 1.
ENDIF.
gv_total_registros = gv_total_registros + 1.
WHEN OTHERS.
ENDCASE.
ENDLOOP.
‎2011 Jan 26 5:37 PM
Hi again
I found the solution.
It is a problem with the domain of the table fields. I'm using standard domains, so the Uppercase / Lowercase converson is active.
The records from the file are lowercase, but when I modify a value using the view, it is transalated to uppercase automatically.
As the key of the record is in lowercase, when saving it is triying to modify the record with the key in uppercase, which is not in the table, so the update returns sy-subrc = 4.
I uploaded a record in uppercase from the file and worked fine.
Once again, thanks four your help.
Regards,
Carlos.