on 09-18-2013 7:22 AM
we have one SD billing document, document 13000005, with multiple line items for different material, line item1 is with revenue 1000, cost 800, line item 2 is with revenue 1300, cost 900, cost 800 and 900 are posted to different COGS account
from billing document number, how can I link to delivery accounting document line item through table or function module, for e.g. I want to link billing line item1 with delivery accounting document which post to COGS account
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, the approach provided so far didn't work for order related billing, because there is no delivery.
so in the table level, can we identify whether it is order related billing or delivery related billing?
if it is order related, from billing document number, how can I get the accounting document for COGS posting? thanks
Siva,
If your business process is Order related billing then how COGS comes in the picture as you are not doing the delivery & COGS is your inventory movement in PGI.
The movement type 601 is used for sales from a delivery.
Please explain your exact requirement along with business process.
Find the answer for your query.
"May I know if I already know billing document, from which table we can get SO number?"
>> This can be fetched from VBRP table check VBRP-AUBEL where VBRP-AUTYP='C'
"from outbound delivery, which table can we get Sales order number?"
>> You can get this from LIPS table check LIPS-VGBEL where LIPS-VGTYP='C'.
Note :Also want to share you that VBFA is the only table to get the data faster from any other alternatives.So prepare your report depending on the data volume of your system.
Hope this is clear to you.
Thanks,
Suman$
Hi Siva,
in VBRP-VGBEL you can get the delivery document , provided if the billing created from Delivery
with the delivery number you can check Accounting document number in MSEG
hope it is clear
regards,
santosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva,
Yes you can do this by simple table join logic and provide the same to ABAP to meet the requirement.
For your case the driving document will be Billing doc VBRK-VBELN.
You have to follow the table VBRK/VBRP to VBFA-VBELN and take the VBFA-VBELV where VBFA-VBTYP_V = J (Delivery).
Then pass the VBFA-VBELV to BKPF-XBLNR and fetch the BKPF-BELNR then pass this to BSEG-BELNR with fiscal year and company code to get the details line items.
Hope this will help you.
If you have any doubt do let me know.
Thanks,
Suman$
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
109 | |
15 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.