Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Modify component quantity field (ekpo-bdmng) before saving a process order (COR1)

Former Member
0 Likes
663

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

2 REPLIES 2
Read only

former_member188724
Contributor
0 Likes
585

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

Read only

0 Likes
585

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.