Hello everyone,
I need some help with creating an internal table. HOW CAN I CREATE INTERNAL TABLE IN MY CODE that I want to populate with data from 2 different tables:
1st column should be TAXCODE (mwsk1 field from VBRP table) and
2nd should contain the TAX (in percentage) for that taxcode. But VBRP does not contain that value. This is the code that Im using to get the tax %.
SELECT kbetr INTO l_procenatPDV10<br> FROM konp JOIN a003 ON konp~mwsk1 EQ a003~mwskz<br> JOIN vbrp ON a003~aland EQ vbrp~land1_ana AND a003~mwskz EQ vbrp~mwsk1<br> WHERE vbrp~vbeln = p_vbeln.<br> ENDSELECT.<br><br> l_procenatPDV = l_procenatPDV10 / 10.
(p_vbeln - the document number that I insert at the start of the program)
Since the TAX AMOUNT in KONP is times 10 for some reason (ex. for 20% its 200) I have to divide it by 10.
3rd should contain TAXVALUE (Tax Amount - MWSBP from VBRP table)
4th shoud contain NET VALUE (netwr - from VBRP table)
Example:
I am creating this internal table so I can SUM all of the values with the same tax%. Since I dont have filed with tax% in VBRP I have to get it like this from KONP table. Then I want to create this new table, populate that table like I showded you above, group them by TAX% and SUM the values.
This is probably a simple problem but I am fairly new at abap. I would love it if someone could help me fast.
Thanks in advance.