on 07-30-2010 9:57 AM
Hello Experts,
I want to print sum of credit balance and debit balance in script.
I am getting correct values in program even in OUT_TAB.
like
BSEG-WRBTR = 30000
BSEG-DMBTR = -63000
I used perform endperform in script like
PERFORM ZSSC_FI_01_BAL IN PROGRAM ZRFKORK00
USING &BSEG-BUKRS&
USING &BSEG-KOART&
USING &DKADR-KONTO&
CHANGING &BSEG-WRBTR&
CHANGING &BSEG-DMBTR&
ENDPERFORM
But when i see print preview
I am getting
Debit bal: -63000
Credit bal: -63000
Can anyone plz help me .
Thanks & regards,
Manisha
check the modify statements in your external perform, i sense you stored same value in both changing parameters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Florian,
Thanks for your reply.
But i hv written like
READ TABLE OUT_TAB INDEX 1.
IF SY-SUBRC = 0.
OUT_TAB-VALUE = SUM_DEBIT.
MODIFY OUT_TAB INDEX 1.
ENDIF.
READ TABLE OUT_TAB INDEX 2.
IF SY-SUBRC = 0.
OUT_TAB-VALUE = SUM_CREDIT.
MODIFY OUT_TAB INDEX 2.
ENDIF.
Manisha
Edited by: PATIL MANISHA on Jul 30, 2010 11:05 AM
Hi,
Check the output table of the two fields in the perform. Otherwise the problem will be while declaring in the sap script after the perform statement
Debit bal: &BSEG-WRBTR&
credti bal: &BSEG-DMBTR&
check out the OUT_TAB-FIELD while passing the values based on the index.
Thanks
Arul
Edited by: Arul on Jul 30, 2010 2:41 PM
ahhh get rid of those INDEX 1 things. thats not a good programming style and very error forcing when maintained.
it works like:
READ TABLE out_tab
WITH KEY name = 'BSEG-WRBTR'.
IF sy-subrc = 0.
out_tab-value = lv_lgort.
MODIFY out_tab INDEX sy-tabix.
ENDIF.
READ TABLE out_tab
WITH KEY name = 'BSEG-DMBTR'.
IF sy-subrc = 0.
out_tab-value = lv_lgort.
MODIFY out_tab INDEX sy-tabix.
ENDIF.
well forget about that lv_lgort, i copied that from one of my developments and forgot to change it everywhere.
Edited by: Florian Kemmer on Jul 30, 2010 11:21 AM
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.