Application Development 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: 

when i parked a document in FV60 by giving amount and amount in doc currency is 0,it should through success message as doc is posted

Former Member
0 Kudos


Hi All,

i am requirement that in FV60 Transaction ,when i park a document by giving required detials in the fields i.e in Amount as 1000 and Amount in Doc currency as 500,then i shoul get status message as Error message " Posting is Only Possible with a Zero Balance; Correct Document".

I have codded for it as below and i am getting as said

enhancement:

 
IF yfuncl EQ char_i.

   
IF sy-calld EQ space OR sy-binpt = 'X'.              

     
MESSAGE e060(F5) WITH bkpf-belnr  bkpf-bukrs.          

ELSE.                                                 
      g_imess
= 'X'.                                      
   
ENDIF.                                                
 
ELSE.

   
MESSAGE s092 WITH bkpf-belnr  bkpf-bukrs.

 
ENDIF.

but now when Amount is 1000 and amount in doc currency is 1000,i should get the succes message as 'Document  was parked'.

can any on eplease help me out to solve this.

Thanks,

Ramesh



4 REPLIES 4

deependra_shekhawat3
Contributor
0 Kudos

Hi Ram,

You can achieve same functionality by using 'Save as Complete'. 'Save as Complete' first checks document posting with zero balance , in case of non-zero balance it gives error message FP099 ,if document is with zero balance, it parks document with msg FP001.

Please check if you can add same functionality in your case.

Deependra

0 Kudos

Hi Deependra,

Thanks for your  reply,

Yes when in the case of zero balance it should through success message as FP001,currenctly as my above code is throughing as 'Posting is Only Possible with a Zero Balance; Correct Document' even when i balance as zero as it should only work for non-zero only.

can you please help me out where to write code and functionality for it.

Thanks,

Ram

raphael_almeida
Active Contributor
0 Kudos

Hi Ram!

You need done your doc with amount = 0, like this image

Regards,

0 Kudos

Hi Raphel,

my requirement is that in FV60 when amount and amount in doc currency is not equal it should through as error message 'Posting is possible with Zero balance' when i park the document  or else if amount is ZERO i.e amount and amount in doc currency is equal and when i park the document it should be succesfully park the document, but now i have done coding for it but what ever the case it is throwing as error message when i park the document ''Posting is possible with Zero balance' .

Can you please suggest me how to solve this issue with some sample code.

Thanks,
Ram