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

pricing

Former Member
0 Likes
332

Hi all,

i have a requirement to check for the pricing condition whether exist if not create it in transaction VK12. i have got the function module RV_CONDITONS_COPY but i am not able to get the price. can anyone help me on this issue how to display/ create condition pricing records. i would appritiate if someone could send me the sample code for this. Thanks.my code is as follows,when i go to the transaction vk12 i can see the record from there but here i am not able to get anything except for it returns only the date.please suggest on this?

it_cond-matnr = wa_so_data-matnr."material number

it_cond-vkorg = v_vkorg. "sales org

it_cond-kbstat = 'Z1'.

it_cond-j_3gdatvo = wa_so_data-aedat. "purchase order date

it_cond-j_3gdatbi = '99991231'. "end date

it_cond-waerk = wa_so_data-waers. "currency

APPEND it_cond.

MOVE-CORRESPONDING : it_cond TO wa_komg.

it_komv-kappl = 'V'.

it_komv-kschl = 'ZP00'. "condition table

it_komv-kbetr = wa_so_data-netpr. "net price

it_komv-waers = wa_so_data-waers."currency

it_komv-krech = 'C'. "calculaton

it_komv-kpein = wa_so_data-peinh.

it_komv-kmein = wa_so_data-bprme.

APPEND it_komv.

MOVE-CORRESPONDING : it_komv TO it_komv_idoc.

APPEND it_komv_idoc.

CALL FUNCTION 'RV_CONDITION_COPY'

EXPORTING

application = 'V'

condition_table = '953'

condition_type = 'ZP00'

date_from = wa_so_data-aedat

date_to = '99991231'

enqueue = 'X'

key_fields = wa_komg

maintain_mode = 'C'

keep_old_records = 'X'

used_by_idoc = 'X'

  • I_KONA =

overlap_confirmed = 'X'

IMPORTING

new_record = l_record

TABLES

copy_records = it_komv

copy_recs_idoc = it_komv_idoc

EXCEPTIONS

enqueue_on_record = 1

invalid_application = 2

invalid_condition_number = 3

invalid_condition_type = 4

no_authority_ekorg = 5

no_authority_kschl = 6

no_authority_vkorg = 7

no_selection = 8

table_not_valid = 9

no_material_for_settlement = 10

no_unit_for_period_cond = 11

no_unit_reference_magnitude = 12

invalid_condition_table = 13

OTHERS = 14.

1 REPLY 1
Read only

Former Member
0 Likes
292

Abhinav,

i would suggest you to post these kind of threads in SD forums for better and quick replies.

Amit.