Skip to Content
0
Jul 12, 2007 at 12:12 PM

How to add a New schedule line and update the order quantity?

102 Views

Hi all,

I have to add a new schedule line in VA01/VA02 so that when ther is partial confirmed quantity against a schedule line, we have to create a new schdule line based on the existing so that it will contain confirmed in one and unconfirmed in the other.

The schedule line will split once the user go to Header data screen in VA01/VA02. So I used USEREXIT_MOVE_FIELD_TO_VBAK user exits in MV45AFZZ include program.

I splited the order quantity against the confirmed quantity and added it as new schedule line in the XVBEP internal table and update UPDKZ flags for XVBEP & YVBEP.

Could anyone tell me is there any other way to do this without updating XVBEP? Because it is affecting some other place because of index table is not updating. How to you think use if update xvbap-etenr_high and update index table IVBEP1 for new line insert into XVBEP instead directly inseritng it into?

My code as follows:

xvbep-WMENG = t_temp-WMENG .

modify xvbep TRANSPORTING WMENG.

t_temp1- ETENR = '0002'.

if SY-SUBRC <> 0.

t_temp1-UPDKZ = UPDKZ_NEW.

modify xvbep TRANSPORTING WMENG UPDKZ.

endif.

With Regards

Raj