on 04-21-2011 4:14 AM
Hi Experts,
I select some items from table BSEG and show in a table of smartform,
and I have two problems, as follows ,
1. I select two columns named WRBTR and DMBTR from BSEG ,
and I want the value show with a minus sign if the item is credit.
2. I wanna summarize the value of column WRBTR AND DMBTR at the end of table.
Please...Can you help me how to do that?
Thanks a lot in advanced.
Best Regards,
Yacoa
Edited by: Yacoa Chen on Apr 21, 2011 5:15 AM
Hi Chen,
Declare the field Like standard . Then automatically sign will come. Post if need more help.
Regards,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI madhurao123 ,
I build a data dictionary named ZADOCUMENT in SE11 ,
and the data element of column DMBTR WRBTR are as BSEG's data element
(DMBTR's data element is DMBTR , WRBTR's data element is WRBTR) ,
then in my smartform , I declare a table name: TACC LIKE ZADOCUMENT
I pass data to TACC from my driver program .....
I consider the field format is right, but I don't know why the value just display number but doesn't with a sign.
Regards,
Yacoa
In most countries there is no negative sign in accounting statements, but usually data is displayed in two columns debit/credit.
In SAP BSEG table the amount are positive, but you have a flag which indicates a debit/credit status. So you have to add this field SHKZG to your internal table, (H is "Haben" have for credit, S is Sollen "Debt" for debit) or use it to multiply amounts by -1. You should also use or analyze FM READ_BSEG which reads BSEG and complements a structure BSEGA with signed fields.
Also consider adding BKPF-WAERS for field WRBTR as there can be multiple currency codes.
Regards,
Raymond
Hi,
You can format the field like this :
&field(<)& : Displays the sign to the left of the number.
Below link might be useful for you.
http://help.sap.com/saphelp_nw04/helpdata/en/1c/f40c6fddf311d3b574006094192fe3/frameset.htm
Thanks.
Regards,
Megha
Hi,
You can format the field like this :
&field(<)& : Displays the sign to the left of the number.
Below link might be useful for you.
http://help.sap.com/saphelp_nw04/helpdata/en/1c/f40c6fddf311d3b574006094192fe3/frameset.htm
Thanks.
Regards,
Megha
Hi Yacoa,
Try this logics!!!!
For (1) - you can create a program line in the node which you are displaying DMBTR, WRBTR and write your accordingly whether to print sign or so.
For (2) - I hope you are using a table to display the item values. Just double click on table node, now navigate to calculations tab and provide as follows: Operation = total , Field name = your field name(for which you want to display total), Time = after loop.
Hope this info will help you to resolve both the issues & close the thread.
BR,
Vinit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.