on 05-19-2011 7:40 AM
Hi friends,
I'm new to smartforms. I have created a smartform for customer outstanding Report. but have some issues.
That is,
I want to categorize all rows in reports to,
- Unsettled Invoices (Condition is -> BSID-BLART = 'RV' AND BSID-BLART = 'SA')
- Unsettled Advances/Credit Notes (Condition is -> BSID-BLART = 'DZ' AND BSID-BLART = 'DG' AND BSID-UMSKZ = 'A')
- Unsettled return Cheques (Condition is -> BSID-BLART = 'DZ' AND BSID-UMSKZ = 'D' AND BSID-XBLNR = 'R')
for example the output is like this:
Date invoice No Amount No of Days Balance Less30 Over30 Over60 Over90 Over120
Unsettled Invoices
15/03/2010 HHIN00023952 100000 100 750
15/03/2010 HHIN00023952 100000 100 750
15/03/2010 HHIN00023952 100000 100 750
Unsettled Advances/Credit Notes
15/03/2010 HHIN00023952 100000 100 750
15/03/2010 HHIN00023952 100000 100 750
Total 500000
Unsettled Return Cheques
15/03/2010 HHIN00023952 100000 100 750
15/03/2010 HHIN00023952 100000 100 750
Total 200000
This is the download link to my smartform - https://rapidshare.com/files/785255519/zcusrep.xml
please help me someone. Thanks
Hi,
You can add one more column to your internal table as identifier and give values.
- Unsettled Invoices (Condition is -> BSID-BLART = 'RV' AND BSID-BLART = 'SA') -->Give value 1
- Unsettled Advances/Credit Notes (Condition is -> BSID-BLART = 'DZ' AND BSID-BLART = 'DG' AND BSID-UMSKZ = 'A') -->Give value 2
- Unsettled return Cheques (Condition is -> BSID-BLART = 'DZ' AND BSID-UMSKZ = 'D' AND BSID-XBLNR = 'R')-->Give value 3
and pass this internal table to smartform. In the smartform, loop over the internal table and when there is a change in the identifier, print the total for that section.
Hope this helps!
Regards,
Shyam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply, Can you clarify your solution more? cuz i don't have any idea of adding identifier to those conditions in internal table
this is my se38 program for it,
REPORT ZCUSTREP2.
TABLES : KNVP, KNVV.
types : begin of ty_knvp,
kunnr type knvp-kunnr,
pernr type knvp-pernr,
end of ty_knvp.
data : wa_knvp type ty_knvp,
it_knvp type table of ty_knvp.
types : begin of ty_knvv,
kunnr type knvv-kunnr,
vkorg type knvv-vkorg,
end of ty_knvv.
data : wa_knvv type ty_knvv,
it_knvv type table of ty_knvv.
types : begin of ty_final,
kunnr type knvp-kunnr,
pernr type knvp-pernr,
vkorg type KNVv-vkorg,
end of ty_final.
data : wa_final type ty_final,
it_final type table of ty_final.
Selections **********************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_PERNR for knvp-PERNR matchcode OBJECT ZREP_CODE. "repcode
SELECT-OPTIONS : S_VKORG for KNVv-VKORG no intervals no-extension OBLIGATORY. "company code
SELECTION-SCREEN END OF BLOCK B1.
Selections **********************
end-of-selection.
select kunnr pernr
into table it_knvp
from knvp
where PERNR in S_PERNR
and pernr ne '00000000'.
select kunnr vkorg
into table it_knvv
from knvv
where vkorg in S_VKORG.
loop at it_knvp into wa_knvp.
read table it_knvv into wa_knvv with key kunnr = wa_knvp-kunnr.
if sy-subrc = 0.
wa_final-kunnr = wa_knvp-kunnr.
wa_final-pernr = wa_knvp-pernr.
wa_final-vkorg = wa_knvv-vkorg.
append wa_final to it_final.
endif.
endloop.
CALL FUNCTION '/1BCDWB/SF00000052'
*EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
ITAB = it_final
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.