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

cancel multiple invoice documents

Former Member
0 Likes
518

Dear All,

when iam cancel single document in vf11 it is cancelled sucessfully,the cancel document date also coming correctly, but my issue is when iam doing cancel multiple invoice documents that time the cancel document date is not taking the latest date, please help me in this issue ...iam using the below code ....


include name:MV60AF0V_VBRK_UNTERLEGEN
FORM VBRK_UNTERLEGEN
ENHANCEMENT 71  ZSD_BILLING_DT_DEF
if sy-tcode = 'VF11'.
data : l_index TYPE sy-tabix,
          l_check(1) type c.

select single CHK from ZCONFIG into l_check
where ZCONFIGOB eq 'ALLOWBKINV'.
if sy-subrc eq 0.
  if l_check eq 'Y'.
  else.
    if sy-tcode = 'VF11'.
      if ( XVBRK-FKART = 'S1' OR XVBRK-FKART = 'IVS' ) .
         XVBRK-FKDAT = sy-datum.
      endif.
     l_index = XVBRK_TABIX_AKTUELL - 1.
     modify xvbrk INDEX l_index.
   endif.
 endif.
endif.

endif.

Regards

suni

1 REPLY 1
Read only

Former Member
0 Likes
335

HI,

Have you checked in debug that after entring the documents , is the part of your code triggered ? If yes then check tat in debug why it is not updating the sy-datum. I think the index is giving the problem check in debug you will find the solution .

Regards,

Madhukar Shetty