I am trying to extract data out of the EDID4 structure in SAP. I need to extract data for IDOC type ACC_BILLING. I found this sample of code on the Internet, but it deals with Material Master:
DATA: xmara LIKE mara.
DATA: tmarc LIKE marc.
WITH HEADER LINE.
LOOP AT edidd.
MOVE edidd-sdata TO xmara.
MOVE edidd-sdata TO tmarc.
Now do something with xmaraand tmarc.
I am trying to figure out how to make this piece of code work for ACC_BILLING, but I'm not sure what tables I should be using. I know the segment names, but not the tables they post to? The only 2 tables that I am aware of are BSEG and BKPF. Surely not all of the segments go to these 2 tables?
Any suggestions that you may have for the ACC_BILLING IDOC would be greatly appreciated.
Well, this code sample works simply by coincidence. Actually, the content of the field EDIDD-SDATA always has the structure of the segment name. The segment e.g. E1MARAM is defined with WE30 and simultaneously in SE11.
See SE11 for E1MARAM. For ACC_BILLING it is the same deal.
See SE11 to view the DDIC structure with the same name as the segment.
Dig Deeper on SAP data management
Related Q&A from Axel Angeli
An SAP user is receiving an error message while integrating SAP iDoc PORDCR1 for a purchase order. Continue Reading
SAP expert Axel Angeli explains how to update the "further dates" tab information in am SAP transaction through an SAP IDoc. Continue Reading
An SAP R/3 4.7 user wants looking to post a document entry using different trading partner fields for credit and debit for function FB01. Continue Reading