cancel
Showing results for 
Search instead for 
Did you mean: 

Delete freight cost items

Former Member
0 Kudos

Hello all,

I am trying to delete freight cost items. When certain items are of a certain type and have 0 cost value I need to erase them. The problem is that I need to do this automatically, is there a user exit or a FM or BAPI or BADI to do this?

Many thanks in advance.

Best Regards,

Tiago Magalhães

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

done

Former Member
0 Kudos

Problem solved.

I used the user exit EXIT_SAPLV54B_004

Because the items that had 0 cost value were generating error on the transfer of the costs, what I did is change their status like this:

IF c_scd_item-vfkp-netwr IS INITIAL.

IF c_scd_item-vfkp-stber <> 'C'.

c_scd_item-vfkp-stber = 'C'.

ENDIF.

IF NOT c_scd_item-vfkp-stfre IS INITIAL.

c_scd_item-vfkp-stfre = ' '.

ENDIF.

IF NOT c_scd_item-vfkp-stabr IS INITIAL.

c_scd_item-vfkp-stabr = ' '.

ENDIF.

ENDIF.

Former Member
0 Kudos

Two options:

1. Create a BDC program for VI02 transaction, and you can schedule it as background job. (easy development task, even though the technology is a bit old)

2. I found SAP using this function when deleting the shipment cost: SD_SCD_DELETE. The ABAPer can find more information

on how to use this FM using "where used".