‎2006 Jul 28 10:08 PM
Hellom
check out this code.
loop at t_bseg into wa_bseg.
at new belnr.
// is this following also correct or wrong
if KOART EQ 'K'.
// pick up vendor's WRBTR
ELSE
// pick up other line item's WRBTR ( how ?? )
endif.
endat.
endloop.
basically what i wanna do is, iterate thru bseg and select vendor line item and other line items separately(cuz i have to show them in different columns).
but when i do,
AT NEW BELNR.
IF bseg-KOART EQ 'K'.
//
ENDIF.
ENDAT.
i am getting no value, whereas i get value when i remove the 'AT NEW BELNR' condition.
Thanks,
Shehryar Dahar
‎2006 Jul 28 10:22 PM
Use <b>wa_bseg</b> values for codition checks in <b>at new</b> and <b>end at</b>.
Regds
Manohar
‎2006 Jul 28 10:10 PM
Within the at new end at stmnts, other than belnr, all the fields have *. That is why you are not seeing anything.
‎2006 Jul 28 10:11 PM
hi
<b>Between AT and ENDAT the content of workarea will not contain any value.</b>
Cheers,
Abdul Hakim
Mark all useful answers.Plz close the thread if your question has been answered.
‎2006 Jul 28 10:31 PM
Hi,
then maybe u can help me out. Suppose i have made a payment ( document type 'KZ')
debit credit
bank 9,500
Tax 500
vendor 10,000
I am making a report for cleared items (document type 'KZ') in which i have 3 columns in which i have to show sumthing like this(against each vendor in the bseg),
col1 col2 col 3
10,000 9,500 500
each line item in my report will be of a vendor so i have to give a consition like (KOART = 'K') but i also have to show WRBTR of other line items(of the same document) in the respective columns.
can you demostrate with an example or sumthing..
thanks.
Shehryar
Message was edited by: shehryar dahar
‎2006 Jul 28 10:22 PM
Use <b>wa_bseg</b> values for codition checks in <b>at new</b> and <b>end at</b>.
Regds
Manohar
‎2006 Jul 28 10:36 PM
Hi manohar,
i didnt get it. Can u plz demonstrate with an example?
Thanks.
‎2006 Jul 28 10:37 PM
Could you please paste ur complete code here not like
// is this following also correct or wrong
which is causing problem..
Cheers,
Abdul Hakim
‎2006 Jul 28 10:38 PM
AT NEW BELNR.
*IF bseg-KOART EQ 'K'.
*//
*ENDIF.
if wa_bseg-koart eq 'K'. ---> Use wa_bseg
endif.
ENDAT.
‎2006 Jul 28 10:42 PM
‎2006 Jul 28 10:51 PM
Hi,
Abdul.. can u see my post in this thread 'Jul 28, 2006 5:31 PM'
basically i am looping thru bseg(all item of document type 'KZ'). When i come across a document number(suppose it has three line items, 2 debit line items(bank and tax) and 1 credit line item(vendor). i want to show sumthing like this in my report,
col1 col2 col3 col4
vendor name credit(WRBTR) debit(WRBTR) debit(WRBTR)
.... .... ..... .....
.... .... ..... .....
How to go on doing this ?
‎2006 Jul 28 10:52 PM
use this code
loop at t_bseg.
move t_bseg into wa_bseg.
at new belnr.
// is this following also correct or wrong
if WA_BSEG-KOART EQ 'K'.
// pick up vendor's WRBTR
ELSE
// pick up other line item's WRBTR ( how ?? )
endif.
endat.
endloop.