‎2006 Jul 07 7:00 AM
HI GURUS,
CAN YOU PLEASE TELL ME THE LOGIC FOR THIS ITS URGENT
For the documents contained in the INTAB1 table check whether there are any line items posted to HKONTs =(260501,260502,260503) and store them in an internal table INTAB2
If yes then get the following fields from BSIS/BSAS table
BSIS/BSAS BELNR
BSIS/BSAS DMBTR
BSIS/BSAS SHKZG
Where
BELNR = INTAB2-BELNR
GJAHR = P_GJAHR
HKONT = (260501, 260502 and, 260503)
SHKZG = H.
Summate the BSIS/BSAS DMBTR and depict against second line item and fourth line.
4) Subtract line1 and line2 and depict against the 3 line.
5) Subtract the DMBTR of 4th line from the 2nd line DMBTR and depict against the 5th line item
‎2006 Jul 07 7:13 AM
Get the data from first table...
use the if itab1-belnr = '20654).
define itab2 same structure has itab1 and
append the fields to itab2 based on ur if condition.
loop the itab2..and do validate ur other fields..on cretia u have mentioned
‎2006 Jul 07 7:13 AM
Get the data from first table...
use the if itab1-belnr = '20654).
define itab2 same structure has itab1 and
append the fields to itab2 based on ur if condition.
loop the itab2..and do validate ur other fields..on cretia u have mentioned
‎2006 Jul 07 7:19 AM
IF U DON'T MINE CAN YOU WRITE CODE AND GIVE ME PLEASE IT'S URGENT
‎2006 Jul 07 7:40 AM
hi...
hope it would soleve the purpose
data : intab2 like intab1 occurs 0 with header line.
loop at intab1 where hkonts = (260501,260502,260503) .
move-corresponding intab1 to intab2.
append intab2.
endloop.
data : begin of it_bsis occurs 0.
include structure bsis.
data : end of it_bsis.
select belnr dmbtr shkzg from bsis
into corresponding fields of table it_bsis
for all entries in intab2
where BELNR = INTAB2-BELNR
and GJAHR = P_GJAHR
and HKONT = (260501, 260502 and, 260503)
and SHKZG = H.
if not it_bsis[] is initial.
what type of data u want..
take a another with ur fields
and collect ur internal table.
loop at it_bsis.
it_bsis1-belnr = it_bsis-belnr.
collect it_bsis1.
endloop.
endif.
loop the it_bsis1.
and do subtraction..
and delete based on condition,
endloop.
‎2006 Jul 07 7:32 AM
Hi Amit,
Try with this code.
DATA ITAB2 LIKE LINE OF ITAB1.
DATA:
BEGIN OF ITAB3 OCCURS 0,
BELNR TYPE BSIS-BELNR,
DMBTR TYPE BSIS-DMBTR,
SHKZG TYPE BSIS-SHKZG,
END OF ITAB3.
LOOP AT ITAB1 WHERE HKONT = '260501' OR HKONT = '260502 ' OR HKONT = '260503'.
APPEND ITAB1 TO ITAB2.
CLEAR ITAB2.
ENDLOOP.
IF ITAB2[] IS NOT INITIAL.
SELECT BELNR DMBTR SHKZG
FROM BSIS
INTO TABLE IT_BSIS
FOR ALL ENTRIES IN ITAB2
INTO TABLE ITAB3
WHERE BELNR = ITAB2-BELNR
GJAHR = P_GJAHR
HKONT IN ('260501','260502','260503')
SHKZG = 'H'.
IF ITAB3[] IS NOT INITIAL.
*--DO 4th and 5th steps as I didnt get from your qurey
ENDIF.
ENDIF.
Thanks,
Vinay
‎2006 Jul 07 9:33 AM
HI VINAY,
<b>I WILL SEND TOATL PROGRAM PLEASE DONT MIND . PLEASE SEND ME THE CODE.</b>
The retrieval logic is to be used only for displaying the accounting and assessment year
1) Accounting Year: GJAHR-(GJAHR+1)
Assessment Year GJAHR1) (GJAHR2)
2) Get the following details from BSIS/BSAS
BSIS/BSAS BELNR
BSIS/BSAS DMBTR
BSIS/BSAS SHKZG
Where
BSIS/BSAS GJAHR = P_GJAHR
BSIS/BSAS HKONT = (334551, 499001, 402001, 402002, 403000) and store them in an internal table INTAB1
Summate the BSIS/BSAS DMBTR and depict it in the first line of the table
3) For the documents contained in the INTAB1 table check whether there are any line items posted to HKONTs =(260501,260502,260503) and store them in an internal table INTAB2
If yes then get the following fields from BSIS/BSAS table
BSIS/BSAS BELNR
BSIS/BSAS DMBTR
BSIS/BSAS SHKZG
Where
BELNR = INTAB2-BELNR
GJAHR = P_GJAHR
HKONT = (260501, 260502 and, 260503)
SHKZG = H.
Summate the BSIS/BSAS DMBTR and depict against second line item and fourth line.
4) Subtract line1 and line2 and depict against the 3 line.
5) Subtract the DMBTR of 4th line from the 2nd line DMBTR and depict against the 5th line item.
‎2006 Jul 07 7:52 AM
Loop at itab1 .
IF ( HKONT = 260501 or HONT = ....)
Append Itab1 to Itab2.
Endif.
Endloop
If Itab2[] is not initial.
select BELNR DMBTR SHKZG from BSIS
into Itab3
for all entries in Itab2
where
BELNR = INTAB2-BELNR
GJAHR = P_GJAHR
HKONT in (260501, 260502 and, 260503)
SHKZG = H.
endif.
Whether the subtract sd be in Itab3 or what....explain this clearly
‎2006 Jul 07 9:24 AM
THSI IS THE TOTAL PROGRAM CAN YOU SEND ME CODE [PLEASE
The retrieval logic is to be used only for displaying the accounting and assessment year
1) Accounting Year: GJAHR-(GJAHR+1)
Assessment Year GJAHR1) (GJAHR2)
2) Get the following details from BSIS/BSAS
BSIS/BSAS BELNR
BSIS/BSAS DMBTR
BSIS/BSAS SHKZG
Where
BSIS/BSAS GJAHR = P_GJAHR
BSIS/BSAS HKONT = (334551, 499001, 402001, 402002, 403000) and store them in an internal table INTAB1
Summate the BSIS/BSAS DMBTR and depict it in the first line of the table
3) For the documents contained in the INTAB1 table check whether there are any line items posted to HKONTs =(260501,260502,260503) and store them in an internal table INTAB2
If yes then get the following fields from BSIS/BSAS table
BSIS/BSAS BELNR
BSIS/BSAS DMBTR
BSIS/BSAS SHKZG
Where
BELNR = INTAB2-BELNR
GJAHR = P_GJAHR
HKONT = (260501, 260502 and, 260503)
SHKZG = H.
Summate the BSIS/BSAS DMBTR and depict against second line item and fourth line.
4) Subtract line1 and line2 and depict against the 3 line.
5) Subtract the DMBTR of 4th line from the 2nd line DMBTR and depict against the 5th line item.