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 routine

former_member599326
Participant
0 Likes
472


Hi,

I am working on pricing routine RV61A902, where I want to pick up the excise duty already paid for the chassis.  I have written code as below :-

But the problem is I am not getting KSCHL 'ZCEP' when i debug this code.  I want to execute below code only form ZCEP.   Is there any other way to do this ?

Or do I need to find out any other routine where I can code this?

Regards,

ABAP CODE :-

   FIELD-SYMBOLS : <fs_sernr> type any,
                <fs_ripw0> type any.

data : lv_obknr type OBJKNR,
       lv_LIEF_NR type VBELN_VL,
       lv_vbeln type VBELN_NACH,
       lv_curry type gjahr,
       lv_belnr type belnr_d,
       lv_dmbtr type DMBTR.

if xkomv-kschl = 'ZCEP' and komk-bukrs = '0100'.
assign ('(SAPLIPW1)RIPW0') to <fs_ripw0>.
IF <fs_ripw0> IS ASSIGNED.
  assign component 'SERNR' of structure <fs_ripw0> to <fs_sernr>.
  clear lv_obknr.
  select single OBKNR
  into lv_obknr
  from OBJK
  where EQUNR = <fs_sernr>
  and   TASER = 'SER01'.

  if lv_obknr is not INITIAL.
    clear lv_LIEF_NR.
    select single LIEF_NR
    into lv_LIEF_NR
    from SER01
    where OBKNR = lv_obknr.

    if lv_LIEF_NR is not INITIAL.
      select single vbeln
      into lv_vbeln
      from vbfa
      where VBELV   = lv_LIEF_NR
      and   POSNV   = '000010'
      and   VBTYP_N = 'U'.

      if lv_vbeln is not INITIAL.
        clear lv_curry.
        CALL FUNCTION 'GET_CURRENT_YEAR'
          EXPORTING
            BUKRS         = '0100'
            DATE          = SY-DATUM
         IMPORTING
            CURRY         = lv_curry.

        clear lv_belnr.
        select single belnr
        into lv_belnr
        from BKPF
        where BUKRS = '0100'
        and   GJAHR = lv_curry
        and   BLART = 'RX'
        and   XBLNR = lv_vbeln.

        if lv_belnr is not INITIAL.
           select single dmbtr
           into lv_dmbtr
           from BSEG
           where BUKRS  = '0100'
           and   BELNR  = lv_belnr
           and   GJAHR  = lv_curry.

         xkomv-kbetr = xkwert = lv_dmbtr.

        endif.
      endif.
    endif.
  endif.
ENDIF.
endif.

1 ACCEPTED SOLUTION
Read only

kiran_k8
Active Contributor
0 Likes
397

Santosh,

Is the Condition type maintained in the Pricinig Procedure ?

Is the Routine linked to this Condition type in the Pricing Procedure ?

You can check the above two in V/08 for the corresponding pricing procedure.

K.Kiran.

1 REPLY 1
Read only

kiran_k8
Active Contributor
0 Likes
398

Santosh,

Is the Condition type maintained in the Pricinig Procedure ?

Is the Routine linked to this Condition type in the Pricing Procedure ?

You can check the above two in V/08 for the corresponding pricing procedure.

K.Kiran.