cancel
Showing results for 
Search instead for 
Did you mean: 

QUERY amounts with + or - signals

Former Member
0 Kudos

Hello,

Can anyone help me with the following question :

In a Query I need to have signals + or - in front of the amounts of purchase orders invoices (for example) depending of the value found in field bseg-shkzg is equal to H (Credit) or S (Debit)... do you know how we can do this?

Thanks in advance for your help,

Best regards

Karine

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

Hello,

I got the answer to my question and put this in here to share it with you all :

A colleage of mind explained that the easiest way to do it is to create a new field in the query and add some abap codes :

for example the new field could be called w_wrbtr

Abap code should be :

'if bseg-shkzg = 'S'

w_wrbtr = bseg-wbtr * ( -1 )

else . w_wrbtr = bseg-wrbtr.

endif

I tried it and it worked!

Thanks any way for your answer

Best regards

Karine

former_member529134
Active Contributor
0 Kudos

Hello Karine,

I dont think that is possible since, as far as i know nowhere in the system, there is + or -. debit or credit is controlled by S or H.

And in the creation of a query, the maximum we can do is to create a view and display the database values.So all u have is the S or H debit/credit indicator.

Regards