Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

RV_CONDITION_COPY with Scales

$
0
0

Hi All

I am trying to create Pricing Condition using 'RV_CONDITION_COPY' but scales are not  getting created.

Could some one help me with example.

 

 

Help me

 

data:

cr like table of komv with header line, " copy_records

nr,

key_fields like table of komg with header line,

komk like table of komk with header line,

komp like table of komp with header line,

copy_staffel like table of condscale with header line.

 

key_fields-werks = 'KABL'.

key_fields-matnr = 'PD-1043-LA'.

 

cr-kappl = 'V'.

cr-kschl = 'PR00'.

cr-kbetr = '77.77'.

cr-kpein = '1'.

cr-kmein = 'EA'.

cr-waers = 'USD'.

append cr.

 

copy_staffel-KNUMH = '0000007575'.

*copy_staffel-KLFN1 = 'PR00'.

copy_staffel-KSTBW = '5'.

copy_staffel-kopos = '01'.

copy_staffel-kstbm = '10'.

copy_staffel-kbetr = '10'.

copy_staffel-UPDKZ = 'X'.

append copy_staffel.

 

 

data wa_pispr like table of pispr with header line.

 

*wa_pispr-kunnr = '0000745641'.

wa_pispr-matnr = 'MATR1001'.

wa_pispr-vkorg = '0010'.

*wa_pispr-vtweg = 10.

*wa_pispr-spart = 00.

wa_pispr-werks = 'KABL.

*wa_pispr-pltyp = 'E1'.

 

append wa_pispr.

 

call function 'SPR_KOMK_KOMP_FILL'

  exporting

    pi_i_spr  = wa_pispr

  importing

    pe_i_komk = komk

    pe_i_komp = komp.

 

call function 'RV_CONDITION_COPY'

     exporting

          application              = 'V'

          condition_table          = '004'

          condition_type           = 'PR00'

  •          date_from                = sy-datum

  •          date_to                  = '99990101'

          enqueue                  = 'X'

          i_komk                   = komk

          i_komp                   = komp

          key_fields               = key_fields

          maintain_mode            = 'A'

          no_authority_check       = 'X'

          keep_old_records         = 'X'

          overlap_confirmed        = 'X'

     importing

          e_komk                   = komk

          e_komp                   = komp

          new_record               = nr

     tables

          copy_records             = cr

           copy_staffel = copy_staffel

     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.

 

break-point.

 

 

call function 'RV_CONDITION_SAVE'.

call function 'RV_CONDITION_RESET'.

 

 

Thanks

 

Edited by: Senthil Ram Kumar Palanisamy Ganapathi on Aug 10, 2009 7:11 PM

 

Edited by: Senthil Ram Kumar Palanisamy Ganapathi on Aug 10, 2009 7:12 PM


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>