cancel
Showing results for 
Search instead for 
Did you mean: 

Condition requirement routine not triggered with change in Order Reason

Former Member
0 Kudos

Hi,

I am creating a debit memo request (tcode:VA01) based on a billing document. One of condition type ZSB3 is having "requirement routine" linked to Order Reason of the sale order. As per logic in routine, on entering a particular order reason ZSB3 should disappear . It is not doing so automatically.

However, when I go to item conditions and execute  "Update condition" manually -ZSB3 disappears.

Condition analysis  is not giving any clue.

I want to happen this automatically without any programming involved.

Please help.

Regards,

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member183879
Active Contributor
0 Kudos

Hi Ravi,

Ideally when you are creating credit memo request from invoice, the copy control should refer to pricing type pricing type B or G as applicable. There is no meaning in having D as pricing type.

I think your solution lies in pricing type in copy control. There is some problem in the code in your routine also.

jignesh_mehta3
Active Contributor
0 Kudos

Hello Ravi,

This is essentially a ABAP programming issues.

Kinfly suggest your ABAPer to use XVBAK instead of VBAK in his ABAP code (SImalarly if VBKD is used, XVBKD is suggested).

Thanks,

Jignesh Mehta

former_member186385
Active Contributor
0 Kudos

Hi,

Since it is a custom routine , you should check whether carryout price update is put in your routine or not

Generally your abaper should put

komp-prsfd eq 'B'

which will carry out price update automatically upon adding the order reason

This piece of code is always added in all standard routines as well

regards,

santosh

Former Member
0 Kudos

Thanks for your reply.

The condition routine code is as follows:

FORM KOBED_629.

  sy-subrc = 4.

  if komp-kposn ne 0.

    check: komp-prsfd = 'X'.

  endif.

  check: komk-vbtyp ca vbtyp_fakt or   "Invoices

         komk-vbtyp ca vbtyp_anfo or   "Credit / Debit requests

         komk-vbtyp = 'H'.             "Returns

  check: komk-vbtyp ne 'U'.            "excluding Pro Forma invoices

  check: komk-vbtyp ne 'M'.            "excluding invoice added 160708

  check: komk-augru ne 'Z44'.          "Z44 is order reason for discount

  sy-subrc = 0.

   

ENDFORM.

FORM KOBEV_629.

   sy-subrc = 4.

  check: komk-vbtyp ca vbtyp_fakt or

         komk-vbtyp ca vbtyp_anfo or

         komk-vbtyp = 'H'.

  check: komk-vbtyp ne 'U'.

  check: komk-vbtyp ne 'M'.            "excluding invoice added 160708

  check: komk-augru ne 'Z44'.          "Z44 is order reason for discount

  sy-subrc = 0.

 

ENDFORM.

Can you guide me where should I put the code you mentioned?

Regards

Former Member
0 Kudos

Hi Ravi, Have you found solution to this?