Application Development 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: 

Maintenance of Condition master for shipment costing

Former Member
0 Kudos

Dear all,

I need to perform maintenance of shipment costing's condition master which included Create, Update and delete of the existing condition master. Via manual way TCode TK11 and TK12 are required.

But i might need your help to comment what are the FM/BAPI available to achieve the above?

Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try

RV_CONDITION_COPY

CALL FUNCTION 'RV_CONDITION_COPY'

EXPORTING

application = 'V'

condition_table = gw_t681-kotabnr

condition_type = p_kschl

date_from = <gfs_kodatab> " sy-datum

date_to = <gfs_kodatbi> " '99990101'

enqueue = 'X'

i_komk = gt_komk

i_komp = gt_komp

key_fields = gt_keyfields " KOMG

maintain_mode = 'A'

no_authority_check = 'X'

no_field_check = ''

keep_old_records = 'X'

overlap_confirmed = 'X'

IMPORTING

  • e_komk = gt_komk

  • e_komp = gt_komp

new_record = g_it_newrecord

TABLES

copy_records = gt_copyrecord

EXCEPTIONS

enqueue_on_record = 01

invalid_application = 02

invalid_condition_number = 03

invalid_condition_type = 04

no_authority_ekorg = 05

no_authority_kschl = 06

no_authority_vkorg = 07

no_selection = 08

table_not_valid = 09.

IF sy-subrc = 0.

CALL FUNCTION 'RV_CONDITION_SAVE'.

COMMIT WORK.

CALL FUNCTION 'RV_CONDITION_RESET'.

ENDIF.

Regards,

Amit

3 REPLIES 3

Former Member
0 Kudos

Hi,

Try

RV_CONDITION_COPY

CALL FUNCTION 'RV_CONDITION_COPY'

EXPORTING

application = 'V'

condition_table = gw_t681-kotabnr

condition_type = p_kschl

date_from = <gfs_kodatab> " sy-datum

date_to = <gfs_kodatbi> " '99990101'

enqueue = 'X'

i_komk = gt_komk

i_komp = gt_komp

key_fields = gt_keyfields " KOMG

maintain_mode = 'A'

no_authority_check = 'X'

no_field_check = ''

keep_old_records = 'X'

overlap_confirmed = 'X'

IMPORTING

  • e_komk = gt_komk

  • e_komp = gt_komp

new_record = g_it_newrecord

TABLES

copy_records = gt_copyrecord

EXCEPTIONS

enqueue_on_record = 01

invalid_application = 02

invalid_condition_number = 03

invalid_condition_type = 04

no_authority_ekorg = 05

no_authority_kschl = 06

no_authority_vkorg = 07

no_selection = 08

table_not_valid = 09.

IF sy-subrc = 0.

CALL FUNCTION 'RV_CONDITION_SAVE'.

COMMIT WORK.

CALL FUNCTION 'RV_CONDITION_RESET'.

ENDIF.

Regards,

Amit

0 Kudos

Hi Amit,

Thanks for your reply. I'm checking the FM now, and realize one of the exporting parameter KEY_FIELDS is more related for "Pricing condition".

Could you please comment further?

0 Kudos

Hi,

u need to pass KOMG - Allowed Fields for Condition Structures in an internal table.

for the logic on how to pass it goto se37 RV_CONDITION_COPY, click on display & check where used list for this FM -> then click on programs.

u'll find few std programs where its used..find the logic there & implement it in ur requirement.

Programs:

FM06IFPS_MARKTPREIS

LJ1BCONDTAXF02

LMLSPF5V

LMLSPF5X

LWVKCF0R

Regards,

Amit