2014 Oct 09 10:05 AM
Hi everyone,
I'm looking for the way to modify component quantity field (ekpo-bdmng) before saving a process order in COR1 transaction. Depends on the quality of some components we should to adjust the quantity of some of them. This modification should be done automatically.
I've tried to do it using EXIT_SAPLCOBT_001 exit, making necessary changes at COMPONENT_TABLE & COMPONENT_TABLE_OLD. But I can't get the desired result.
Has anybody ever done a change like this?
Thanks in advance
Hi everyone,
I'm looking for the way to modify component quantity field (ekpo-bdmng) before saving a process order in COR1 transaction. Depends on the quality of some components we should to adjust the quantity of some of them. This modification should be done automatically.
I've tried to do it using EXIT_SAPLCOBT_001 exit, making necessary changes at COMPONENT_TABLE & COMPONENT_TABLE_OLD. But I can't get the desired result.
Has anybody ever done a change like this?
Thanks in advance
2014 Oct 09 10:17 AM
Hi,
After passing values to the table what are you doing?
Are you updating the necessary table field to get the changes effected.Maybe you are not updating the table. Hope it helps.
Pls paste your Piece of code in case you Need further assistance.
Regards,
K.S
2014 Oct 09 11:06 AM
Hi K,
I update just bdmng field at component_table. Maybe is needed to update more fields. I've attached the code where I update component_table_old and component_table.
Best regards.
FIELD-SYMBOLS: <fs_componentes> LIKE LINE OF component_table,
<fs_resto_comp> LIKE LINE OF component_table.
.......>
**** Block to calculate component parameters and characteristics.
>.......
*****Block to copy all register which should be uploaded in COMPONENT_TABLE_OLD
LOOP AT component_table ASSIGNING <fs_resto_comp> WHERE matnr NOT IN lr_materiales.
IF <fs_resto_comp>-matnr = lv_matnr.
append <fs_resto_comp> to COMPONENT_TABLE_OLD .
lv_quant_h2o = lv_quant_h2o + <fs_resto_comp>-bdmng.
lv_cont = lv_cont + 1.
ELSE.
lv_quant_rest = lv_quant_rest + <fs_resto_comp>-bdmng.
ENDIF.
ENDLOOP.
.....
******Block to calculate new quantity of component
.....
*****Block to update bdmng field in component table.
LOOP AT component_table ASSIGNING <fs_componentes> WHERE matnr = lv_matnr.
<fs_componentes>-bdmng = lv_bdmng.
ENDLOOP.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |