Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

IDOC EDID4-SDATA offset value

Former Member
0 Likes
4,719

Hello,

I've a requirement to create a report which works similar to WE09.

The report needs to find the IDOC number based on the segment, field & value.

(like E1EDKA1, IHREZ, Invoivce number)

I know the IDOC segment data can be found in EDID4-SDATA.

I've trouble with finding the offset & length of the required field in offset.

I've tried to use c call CALL 'C_DD_READ_FIELD' & FM  DDIF_FIELDINFO_GET.

They don't produce the desired result.

Is there any way to find the offset & length of a particular SEGMENT-FIELD given dynamically at runtime.

Please help with resolving this issue.

Thanks & Regards,

Balaji.

1 ACCEPTED SOLUTION
Read only

Former Member
2,615

Hi Balaji,

You can take the 'SEGNAM' from EDID4 and pass the SDATA in a structure of that SEGNAM.

Example :

if you have segnam E1EDKA1,

wa_E1EDKA1 = edid4-sdata. ( where wa_E1EDKA1 type E1EDKA1 ).

you can then find the value of IHREZ in wa_E1EDKA1-IHREZ.


Regards,

Sampat

4 REPLIES 4
Read only

Juwin
Active Contributor
0 Likes
2,615

How different will your report be, compared to WE09? What other functionality would you like to achieve in your report?

Since WE09 is an ALV report, you could submit WE09, from your report and then use method to get back the ALV report from WE09, without having to code the entire data fetch mechanism yourselves.

Thanks,

Juwin

Read only

Former Member
0 Likes
2,615

I'll need to pass multiple values into selection screen and compare it with the value in the SEGMENT-FIELD

Read only

ziolkowskib
Active Contributor
0 Likes
2,615

As mentioned above when it is possible try to stick to standard transactions instead of creating your own.

Answering your question EDID4 has field SEGNAM which represents IDoc segment name and corresponds to existing dictionary type. Moreover IDoc segments consist of field of type CHAR hence you could simply iterate over structure components and count the length from the beginning to the field you are interested in.

Read only

Former Member
2,616

Hi Balaji,

You can take the 'SEGNAM' from EDID4 and pass the SDATA in a structure of that SEGNAM.

Example :

if you have segnam E1EDKA1,

wa_E1EDKA1 = edid4-sdata. ( where wa_E1EDKA1 type E1EDKA1 ).

you can then find the value of IHREZ in wa_E1EDKA1-IHREZ.


Regards,

Sampat