logic for WBS ELEMENT
i have an issue in the report, the problem is
in the selection screen i have an WBS ELEMENT as an select option(there is no belnr in selection scrren)
for eg- if i enter
COMP CODE = 0010
WBS ELEMNT = 23456
YEAR = 2008.
For the above details there are 2 line items in table for that particular belnr as
BUKRS BELNR YEAR BUZEI WBSELT SHKZG
0010 40000050 2008 001 23456 S
0010 40000050 2008 002 00000 H
there is only one line item for WBS ELEMENT IN BSEG TABLE.
So i am getting debit(SHKZG-S) value but i am not getting credit value if i write the select query as below.
into table gt_bseg
for all entries in i_get
where bukrs eq i_get-bukrs
and belnr eq i_get-belnr
and gjahr eq i_get-ryear
and buzei eq i_get-buzei
and projk in s_projk.
please help how to get both values.help with code
thanks in advance,
one of the friend from SDN gave the following solution to my problem
but here he kept KOART = D, WHEREAS FOR MY CODE OTHERLINEITEM MISSED WOULD BE CREDIT OR DEBIT ONCE IT MAY BE MISSED THE CREDIT LINEITEM OR DEBIT ONE.
LOOP AT GT_BSEG.
select single BELNR KOART WRBTR PROJK FROM BSEG INTO wa_bseg WHERE BELNR = BSEG-BELNR AND KOART = 'D'.
append the values of wa_bseg to it_bseg.
i have faced same problem if u observe the table BSEG if KOART value is D , in that line item you cant get the PROJK value so
from above select statemnt u can retrieve that value
finally in it_bseg u can get the lineitems which are emitted by your select query
PLEASE HELP ME