2007 Nov 02 7:29 AM
Hi experts,
i want to get the value from t030 table the field name is KONTS - - G/L Account Number. the logic is as follows i am selecting
SELECT matnr bwkey bklas
FROM mbew
INTO TABLE it_mbew
FOR ALL ENTRIES IN it_mara
WHERE matnr = it_mara-matnr
AND bwkey = p_bwkey.
but the problem is when i need to get the KONTS - - G/L Account Number.from t030 table the only the common field is BKLAS in mbew and t030 table is the any possibility to have link to below fields
KTOPL
KTOSL
BWMOD
KOMOK
bklas are the key fields in t030 table but i have only bklas get the glaccount number, could any body telme the other table which joins mbew and t030 table .....i need to finish this report immediately....
will be rewarded full points....
regards
sreenivas
2007 Nov 02 7:40 AM
The other fields don't process of the Material "There is not a single Account per Material"
<b>What you can join</b>
<i>KTOPL</i> come from <i>T001</i>, society, Part can have different account number in different society. Look for society code in <i>T001K</i> where <i>bwkey</i> field will give <i>bukrs</i> and also <i>bwmod</i> fields
<b>What you cannot join</b>
<i>KTOSL</i> is the operation ("Transaction key"), try '<i>BSX</i>' to get the account for stock valorization (there are other accounts used in material accounting, look at customization <b>OBYC</b> transaction)
Regards
2007 Nov 02 7:40 AM
The other fields don't process of the Material "There is not a single Account per Material"
<b>What you can join</b>
<i>KTOPL</i> come from <i>T001</i>, society, Part can have different account number in different society. Look for society code in <i>T001K</i> where <i>bwkey</i> field will give <i>bukrs</i> and also <i>bwmod</i> fields
<b>What you cannot join</b>
<i>KTOSL</i> is the operation ("Transaction key"), try '<i>BSX</i>' to get the account for stock valorization (there are other accounts used in material accounting, look at customization <b>OBYC</b> transaction)
Regards
2007 Nov 02 8:38 AM
Thanks Raymond ................ my issue is resolved....
i am rewarding you full points....
i did as below plz suggest me if i am wrong
i/p so_matnr
p_bwkey
so_budat
based on p_bwkey i got the bukrs,bwmod from t001k table
based on t001k-bukrs value i have got the ktopl from t001 table
based on so_matnr and p_bwkey i got the bklas from mbew table
by using mbew-bklas, t001-ktopl, mbew-bklas i have got the G/L Account number.
Please suggest me raymond if i am wrong......
Thanks once again...
Sreenivas
Message was edited by:
sharmashree kashi
Message was edited by: sreenivas
sharmashree kashi
2007 Nov 02 8:42 AM
2007 Nov 02 7:41 AM
Yes you can perform that by using join condition between those tables you can do it bu=y using the fields BKLAS you can perform that
Regards
Pavan
2007 Nov 02 7:52 AM
pavan,
if i join mbew and t030 by using bklas, i can get multiple gl account number but i required single account number. Is there any posibility to join other table so that i can get unique account number. I guess joining of ktopl will do that job for me....
regards
sreeni
2007 Nov 02 7:57 AM
Hi
Check the G/L account numbers if they are repeating then you can use statement
delete adjacent duplicates and you can delete those duplicates and if u want to know any other tables using this field then go to SE15 and goto the folder ABAP Dicttionary > Table fields> Give your field name and press execute then you can have a tables list which contains those fields out of which you have to check which table is giving you relevant data
Regards
Pavan