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

How to get data from different SEGMENTs

Former Member
0 Likes
735

Hi;

My requirement is to first of all retrieve the data from different segments in run time.

I mean, i have to execute t/code WE19 and the idoc will be given after that an user exit would called where i have to retrieve the data from different segments and then it would store in an internal table for further calculation.

Can you all please guide me how to retrieve the data via ABAP code in runtime so that it can store in an internal table.

Regards

Shashi

Hi;

My requirement is to first of all retrieve the data from different segments in run time.

I mean, i have to execute t/code WE19 and the idoc will be given after that an user exit would called where i have to retrieve the data from different segments and then it would store in an internal table for further calculation.

Can you all please guide me how to retrieve the data via ABAP code in runtime so that it can store in an internal table.

Regards

Shashi

3 REPLIES 3
Read only

Former Member
0 Likes
577

In user exit you will be getting Import parameters, tables. From that read the segment and populate the required data. For custom fields it will be 255 characters length and you have to read the offset of them.

Read only

Former Member
0 Likes
577

write code lke this ..

form post_idoc tables idoc_data structure edidd

idoc_status structure bdidocstat .

loop at idoc_data .

case idoc_data-segnam .

when 'zsegment1'.

move idoc_data-sdata to wa_zsegment1 .

when 'zsegment2'.

move idoc_data-sdata to wa_zsegment2 .

when 'zsegmentn'.

move idoc_data-sdata to wa_zsegmentn.

endcase .

endloop.

After this write code to move data to int table from work area .

endform .

Hope this helps u....

Read only

Former Member
0 Likes
577

I got the answer by myself