Q
Problem solve Get help with specific problems with your technologies, process and projects.

Extracting data out of EDID4 structure in SAP

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.

OCCURS 0

WITH HEADER LINE.

LOOP AT edidd.

CASE edidd-segnam.

WHEN 'E1MARAM'.

MOVE edidd-sdata TO xmara.

WHEN 'E1MARCM'.

MOVE edidd-sdata TO tmarc.

APPEND tmarc.

ENDCASE.

ENDLOOP.

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

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

I need a function OR process to extract SDATA to an output string via VBScript. Alternately: How can i read character by character of SDATA and pick up what i need based on EDIAPPL structure?
Cancel

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchContentManagement

SearchHRSoftware

Close