TO remove lines from itab where debit = credit
hi experts,
pls have look to the following code.
*& Report YTEST *
REPORT ytest NO STANDARD PAGE HEADING.
DATA: BEGIN OF itab OCCURS 0,
ref(3) type c, " reference number
po(10) TYPE C, " purchase order number
ic TYPE c, " debit/credit indicator s= debit h = credit
amount TYPE p DECIMALS 2, " cuurency
END OF itab.
itab-ref = '100'.
itab-po = '4000'.
itab-ic = 'S'.
itab-amount = '200'.
APPEND itab.
CLEAR itab.
itab-ref = '101'.
itab-po = '4000'.
itab-ic = 'H'.
itab-amount = '200'.
APPEND itab.
CLEAR itab.
itab-ref = '102'.
itab-po = '4000'.
itab-ic = 'S'.
itab-amount = '600'.
APPEND itab.
CLEAR itab.
itab-ref = '103'.
itab-po = '4001'.
itab-ic = 'S'.
itab-amount = '300'.
APPEND itab.
CLEAR itab.
itab-ref = '104'.
itab-po = '4002'.
itab-ic = 'S'.
itab-amount = '400.50'.
APPEND itab.
CLEAR itab.
LOOP AT itab.
WRITE:/3 itab-ref , 10 itab-po , 25 itab-amount LEFT-JUSTIFIED.
IF ITAB-IC = 'S'.
WRITE: 37 'DEBIT'.
ELSE.
WRITE: 37 'CREDIT'.
ENDIF.
ENDLOOP.
the o/p is as follows
100 4000 200.00 DEBIT
101 4000 200.00 CREDIT
102 4000 600.00 DEBIT
103 4001 300.00 DEBIT
104 4002 400.00 DEBIT
OK now since purchase order no. (po) is debited as well
as credited by amount 200.00 , the balance becomes 0
so in the output po: 4000 should not appear when debited and credited so the o/p SHOULD BE:
102 4000 600.00 DEBIT
103 4001 300.00 DEBIT
104 4002 400.00 DEBIT
WHAT ADDITIONAL LOGIC SHOULD I APPLY TO GET ABOVE O/P
pls give me lines of code that should be use
BEST REGARDS
PANKAJ
hi madam
i have used ur logic in my code but with this the
ref no 100 is not deleted and the o/p is
100 4000 200.00
102 4000 600.00
103 4001 300.00
104 4002 400.00
here the code is:
*& Report YTEST *
REPORT ytest NO STANDARD PAGE HEADING.
DATA: BEGIN OF itab OCCURS 0,
ref(3) type c, " reference number
po(10) TYPE C, " purchase order number
ic TYPE c, " debit/credit indicator s= debit h = credit
amount TYPE p DECIMALS 2, " cuurency
END OF itab,
fs_tab like itab.
itab-ref = '100'.
itab-po = '4000'.
itab-ic = 'S'.
itab-amount = '200'.
APPEND itab.
CLEAR itab.
itab-ref = '101'.
itab-po = '4000'.
itab-ic = 'H'.
itab-amount = '200'.
APPEND itab.
CLEAR itab.
itab-ref = '102'.
itab-po = '4000'.
itab-ic = 'S'.
itab-amount = '600'.
APPEND itab.
CLEAR itab.
itab-ref = '103'.
itab-po = '4001'.
itab-ic = 'S'.
itab-amount = '300'.
APPEND itab.
CLEAR itab.
itab-ref = '104'.
itab-po = '4002'.
itab-ic = 'S'.
itab-amount = '400.50'.
APPEND itab.
CLEAR itab.
LOOP AT itab.
IF ITAB-IC = 'S'.
read table itab into fs_tab with key ic = 'H'.
if sy-subrc eq 0.
if fs_tab-amount eq itab-amount.
delete itab index sy-tabix.
endif.
endif.
else.
read table itab into fs_tab with key ic = 'S'.
if sy-subrc eq 0.
if fs_tab-amount eq itab-amount.
delete itab index sy-tabix.
endif.
endif.
endif.
endloop.
loop at itab.
WRITE:/3 itab-ref , 10 itab-po , 25 itab-amount LEFT-JUSTIFIED.
IF ITAB-IC = 'S'.
WRITE: 37 'DEBIT'.
ELSE.
WRITE: 37 'CREDIT'.
*ENDIF.
ENDLOOP.
pls tell me where lies the mistake.
regards
pankaj
Similar Messages
-
How to remove records in itab where its HKONT does not end in '0'...
Hello Experts,
I am getting records from BSIS and BSAS and I want to remove those records with
their HKONT(GL account) does not end in '0'(zero). I do now want to do it via a loop.
I tried using DELETE FROM ITAB statement but it seems it does not work.
Here is what I did:
IF NOT gt_bsis_bsas[] IS INITIAL.
DELETE gt_bsis_bsas WHERE hkont+10(0) <> '0'.
ENDIF.
Hope you can help me guys. Thank you and take care!Hi Viray,
'+' is a wildcard char which is used to represent one char
where as '*' represents any number of char's.
In this case +++++++++0
<b>means that the length of the field is 10 chars and first 9 can be anything</b>
he didn't use '*0' since it could mean that the length of the data entered can be anything .
Hope this clarifies
Regards
Nishant -
Select lines from DB where keys not already selected
This must have been asked many times, but I haven't been able to find an answer:
How do I best select a large number of entries from a table X where the keys of X
are not already cached in a (also large) internal table t?
There are three possibilities I can think of, one of which doesn't actually work, although
I think it should.
1. Convert t to a range table, where all entries have the form sign=E option=EQ (or
sign=I option=NE - I'm confused about the difference in meaning. Which is right?)
2. Use "for all entries". The documentation of FAE leads me to believe that this
should be possible, because the docs only talk of using logical expressions in general
with FAE, not equality specifically. However, using inequality does not give the right result,
i. e.
select * from X for all entries in t where k NE t-k
does not work. Am I missing something?
3. Do a select loop and read t before accepting a line. Although t is a hash table, this is
probably the worst as regards performance.
-- SebastianIn the 2nd option, just check the statment
select * from X into table itab for all entries in t where k NE t-k -
Report for G/L line items with both debit & credit posting accounts
Hi,
My client requires a G/L line items report. It can be possible thru fs10n or fbl3n etc. But he wants to see both the credit and debit accounts in the same line.
for ex: if I open a expense account and show the report of individual documents, he wants to see the corresponding credit item to which bank/cash account it got credited to.
we showed them to double click on that document and goto document overview. but they dont want in that way.
they want to see all the line items with both postings in the same sheet for all line items.
valuable replies will be fairly rewarded.
thanks,
chaitanyaHi,
U can use the following TCodes...
- S_ALR_87012287
- S_ALR_87012289
- S_ALR_87012291
But i am not sure if your client will be happy...
This is a very common req and the only solution possible is to have a customized report for the client..
Hope its clear..
Cheers
Raghu -
How do I remove lines from linked text?
I am using Dreamweaver CS 4 and linked images and text are automatically underlined. How do I remove the underlines from linked text?
https://www.adobe.com/support/dreamweaver/layout/link_underline/#72192
According to the Adobe page above, I can add this code to the “head’ area of my html page and then all my links will not have visible lines, but I did that and the lines are still there. Any ideas why?
<style type="text/css">
<!--
a:link {text-decoration: none}
a:visited {text-decoration: none}
a:active {text-decoration: none}
a:hover {text-decoration: underline}
-->
</style>Hello,
in my DW I can define this in the (translated from my german DW) page properties, see screenshot
Have a look at Hyperlinks (CSS) >>> Unterstreichungsstil (underlining style) >>> use dropdown menu output >>> never underline (nie unterstreichen)
Hans-Günter -
Removing line from Portrait layout
I have a line that I would like to remove. In portrait layout, Basic Template there is a vertical line between text image that is getting in the way of my two column text. Highlighted as the red vertical line below. It doesn't seem to be removable?? A workaround is to go one column and stretch the page vertically. (Too many student objectives ;-)
Did you try unlocking the line, then deleting it? Click on the line so its ends show Xs (indicating it's locked). Then on the pulldown menu Arrange>Unlock and you should be able to delete it, or move it. If you do it in Layouts, it will affect all the pages that use that layout.
JS -
DePixelating a picture Or Removing Lines From Fabric Tex
I have a image of a BAG and the photo was shot in HD 3.4mb in size
i have to print the photo in catalouge and in small size it shows lines (curved) and when the photo is zoomed lines remove as much as i zoom
at 35% zoom in picture viewer and 45% in photoshop fabric is clear looking
tried blurring but quality is reduced
also tried to add noise and other textures no possible outcome
please helpI suspect a blur may be what you need, and that you just haven't yet found the sweet spot of "blurred just enough to hide the aliasing" but "not blurred so much as to reduce visual quality".
-Noel -
How do I remove lines from plot using property nodes
I am displaying data on an XY Graph and want to actively change the plot using property nodes. I can add plot points and set there colour and understand using active plot, my problem is I can not get rid of the line. I have tried Plot.Linestyle but there is no option to completemy remove the line.
Anyone any clues
niceTo get rid of the line, set Plot interpolation = 0.
=====================================================
Fading out. " ... J. Arthur Rank on gong." -
hii,
output contains a line on top of every page (date, report name) how to exclude that.
thanks.
Edited by: aks on May 4, 2009 3:20 AMin abap editor on the top where "Report <report name>." is written just add and write it this way
Report <report name> no standard page headings.
This wud do what you want -
Why does hitting the Single Field checkbox in QT remove lines from my video?
Hi, when reviewing my HD video's I see annoying lines. However I went into the video track and hit the Single Field checkbox and they went away. The deinterlace checkbox did absolutely nothing however. Does this simply mean the footage is progressive but quicktime was just reading it wrong initially?
Very intereseted in knowing the answer.
All the best
KevinOk, maybe you can help me. I was sold some software that was meant to output progressive files in the AVI container with the MJPEG codec. I told him the software seems to be outputting interlaced files and this was his reasoning. Is he correct or is he taking me for a ride? This is a little beyond my knowledge of video systems so if anyone and help me please do.
They are Progressive Segmented Frames (PsF). This means they are progressive frames but with their information spread across two fields of an interlaced frame. Remember, interlacing is something added to the output of video to facilitate display requirements; it doesn't exist inside your PC. Odd, yes, but this is handy because if you had a true native progressive feed and tried to watch it on a display monitor that only supported interlaced input, you would not get an image. Also, PsF streams allow you to effectively use an interlaced camera to create progressive frames because, again, in a PC or MAC, there is no such thing as interlacing and during capture of each film frame, nothing moves between fields. Everything ends up progressive though carried on interlaced fields.
Forget film for a moment: Even when you shoot live video with an interlaced camera, the two successive fields for each frame are ALWAYS handled as one progressive frame inside your NLE, which usually displays only one of the fields during editing while the other field just goes along for the ride unseen. When you output the file or watch it on an external video monitor, the frames are then again broken up into fields to facilitate ease of playback on a variety of displays. If you were to deinterlace that video footage on your NLE, it would drop one field and use the remaining field to artificially create the missing field information to create one progressive frame. However, the output file would then be a PsF file because, even though the frames are now progressive, they are still being carried by an interlaced medium.
Likewise, when you use your progressive camera to create a live image, believe it or not, the video output is a PsF stream. That means the progressive frames are carried in two successive fields. The PC or Mac doesn't care that the information for each progressive frame arrives in two parts because, as mentioned earlier, the two parts are handled as one frame inside the NLE during editing. -
We recently upgraded from CRM 2011 to 2015.
When users pick a queue item to work on, and check "Also remove item from Queue" - where does it go? I cannot find a view that lists these items anywhere???Hi This depends on, which entity is in the queue. If it is an opportunity it could be found in opportunities If it is an email it could be found in activities etc. If you upgraded from crm2013, where could you find it before update to crm2015? Hope it
helps. Gr.peb -
How to skip first 5 lines from a txt file when using sql*loader
Hi,
I have a txt file that contains header info tat i dont need. how can i skip those line when importing the file to my database?
CheersDanny Fasen wrote:
I think most of us would process this report using pl/sql:
- read the file until you've read the column headers
- read the account info and insert the data in the table until you have read the last account info line
- read the file until you've read a new set of column headers (page 2)
- read the account info and insert the data in the table until you have read the last account info line (page 2)
- etc. until you reach the total block idenfitied by Count On-line ...
- read the totals and compare them with the data inserted in the tableOr maybe like this...
First create an external table to read the report as whole lines...
SQL> ed
Wrote file afiedt.buf
1 CREATE TABLE ext_report (
2 line VARCHAR2(200)
3 )
4 ORGANIZATION EXTERNAL (
5 TYPE oracle_loader
6 DEFAULT DIRECTORY TEST_DIR
7 ACCESS PARAMETERS (
8 RECORDS DELIMITED BY NEWLINE
9 BADFILE 'bad_report.bad'
10 DISCARDFILE 'dis_report.dis'
11 LOGFILE 'log_report.log'
12 FIELDS TERMINATED BY X'0D' RTRIM
13 MISSING FIELD VALUES ARE NULL
14 REJECT ROWS WITH ALL NULL FIELDS
15 (
16 line
17 )
18 )
19 LOCATION ('report.txt')
20 )
21 PARALLEL
22* REJECT LIMIT UNLIMITED
SQL> /
Table created.
SQL> select * from ext_report;
LINE
x report page1
CDC:00220 / Sat Aug-08-2009 xxxxp for 02/08/09 - 08/08/09 Effective Date 11/08/09 Wed Sep-30-2009 08:25:43
Bill to
Retailer Retailer Name Name on Bank Account Bank ABA Bank Acct On-line Amount Instant Amount Total Amount
======== ============================== ============================== ========== ==================== =============== =============== ===============
0100103 BANK Terminal raji 123456789 123456789 -29,999.98 9 0.00 99 -29,999.98
0100105 Independent 1 Savings 123456789 100000002 -1,905.00 9 0.00 99 -1,905.00
0100106 Independent 2 system 123456789 100000003 -800.00 9 -15.00 99 -815.00
LARGE SPACE
weekly_eft_repo 1.0 Page: 2
CDC:00220 / Sat Aug-08-2009 Weekly EFT Sweep for 02/08/09 - 08/08/09 Effective Date 11/08/09 Wed Sep-30-2009 08:25:43
Bill to
Retailer Retailer Name Name on Bank Account Bank ABA Bank Acct On-line Amount Instant Amount Total Amount
======== ============================== ============================== ========== ==================== =============== =============== ===============
Count On-line Amount Instant Amount Total Amount
============== ====================== ====================== ======================
Debits 0 0.00 0.00 0.00
Credits 3 -32,704.98 -15.00 -32,719.98
Totals 3 -32,704.98 -15.00 -32,719.98
Total Tape Records / Blocks / Hash : 3 1 37037034
End of Report
23 rows selected.Then we can check we can just pull out the lines of data we're interested in from that...
SQL> ed
Wrote file afiedt.buf
1 create view vw_report as
2* select line from ext_report where regexp_like(line, '^[0-9]')
SQL> /
View created.
SQL> select * from vw_report;
LINE
0100103 BANK Terminal raji 123456789 123456789 -29,999.98 9 0.00 99 -29,999.98
0100105 Independent 1 Savings 123456789 100000002 -1,905.00 9 0.00 99 -1,905.00
0100106 Independent 2 system 123456789 100000003 -800.00 9 -15.00 99 -815.00And then we adapt that view to extract the data from those lines as actual columns...
SQL> col retailer format a10
SQL> col retailer_name format a20
SQL> col name_on_bank_account format a20
SQL> col online_amount format 999,990.00
SQL> col instant_amount format 999,990.00
SQL> col total_amount format 999,990.00
SQL> ed
Wrote file afiedt.buf
1 create or replace view vw_report as
2 select regexp_substr(line, '[^ ]+', 1, 1) as retailer
3 ,trim(regexp_replace(regexp_substr(line, '[[:alpha:]][[:alnum:] ]*[[:alpha:]]', 1, 1), '(.*) +[^ ]+$', '\1')) as retailer_name
4 ,trim(regexp_replace(regexp_substr(line, '[[:alpha:]][[:alnum:] ]*[[:alpha:]]', 1, 1), '.* ([^ ]+)$', '\1')) as name_on_bank_account
5 ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 1)) as bank_aba
6 ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 2)) as bank_account
7 ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 3),'999,999.00') as online_amount
8 ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 5),'999,999.00') as instant_amount
9 ,to_number(regexp_substr(regexp_replace(line,'.*[[:alpha:]]([^[:alpha:]]+)','\1'), '[^ ]+', 1, 7),'999,999.00') as total_amount
10* from (select line from ext_report where regexp_like(line, '^[0-9]'))
SQL> /
View created.
SQL> select * from vw_report;
RETAILER RETAILER_NAME NAME_ON_BANK_ACCOUNT BANK_ABA BANK_ACCOUNT ONLINE_AMOUNT INSTANT_AMOUNT TOTAL_AMOUNT
0100103 BANK Terminal raji 123456789 123456789 -29,999.98 0.00 -29,999.98
0100105 Independent 1 Savings 123456789 100000002 -1,905.00 0.00 -1,905.00
0100106 Independent 2 system 123456789 100000003 -800.00 -15.00 -815.00
SQL>I couldn't quite figure out the "9" and the "99" data that was on those lines so I assume it should just be ignored. I also formatted the report data to fixed columns width in my external text file as I'd assume that's how the data would be generated, not that that would make much difference when extracting the values with regular expressions as I've done.
So... something like that anyway. ;) -
I am unable to a remove lines from a document originally done in 2004 using Mac Word 2004 while running it on Pages. Using Mac Mini with OSX 10.9.4.
Tried to delete lines. Delete is not highlighted in Pages.
Message was edited by: francinefromkent, 08/8/2014, 5p.m. EST. Edited to give more information.The version of Pages is the most useful extra information, it hardly matters what Mac you are using.
Menu > Pages > About Pages
The line could possibly be an underline or a paragraph border or a line which is a separate object underneath the rest of the text.
Probably it is a paragraph border.
Peter -
Why can't I remove a debit/credit card from my account?
When I try reoving the debit/credit card it says "Sorry, we are not able to process your request. Please try again later."
I have the same question. Please help!
-
Which table where I can find diff between Invoice and subseq deb/ cred
Dears,
Is ther any table from where I can check whether Invoices is created based on
1, Invoice
2. Subsequent debit/Credit.
I could not find the difference in rbkp table. Pls suggest
Regards
KameshHi,
Invoice Header table: RBKP
Invoice item table: RSEG
and check following link also
[How to identify an invoice/credit memo/ subs credit / subs debit in tables;
Regards
Kailas Ugale
Maybe you are looking for
-
Unable to make purchases with my new Mac in iTunes Store.
I am unable to make purchases with my new Mac in iTunes Store. I can buy with my iPhone or my company lap-top (Windows) without any problems. Only with my brand new MacBook Pro it is impossible. When I try to authorize my Mac, sure dialog window app
-
I have partial sight; what is the best PC for me?
I've heard that Apple Mac is a good option for people with partial sight. Has anyone any suggestions which would be the best computer for me?
-
Flash Pro CS6 & CreateJS - Prevent looping
I've recently upgraded to Flash Pro CS6 because of the toolkit for CreateJS. I've already successfully exported a few simple, slide by slide animations. I was surprised to see them working in all modern browsers, not just Firefox and Chrome. The o
-
Sync Note field in outlook 2010
Is it possible to sync the note field with multiple people in the same company? i use outlook 2010 and exchange 365. When i enter notes in 1 person from a company the note field for a contact from the same company just stays blank. thanks.
-
I have put numerous packages on a suite of various up to date Macs, all of which have installed successfully. Lastly, I try to put on Acrobat Pro and although it says Successful installation, there is no sign of it anywhere. When I do a search, the o