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

Extract Data Problem

Former Member
0 Likes
314

Hi,

I need a help how to get the data for the below Requirment.

Extract the data from the table EKBE where ebeln eq bseg-ebeln

ebelp eq bseg-ebelp.

if there are only 1 record found get the belnr + gjahr and append together.

if multiple records found then get the belnr + gjahr with the latest posting date budat.

if allposting dates( budat) are same then get the first line of belnr + gjahr and append together.

help me to solve this problem and advance thanks.

Thanks,

Deesanth

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
293

Hi,

Select field1 field2 .....

from ekbe

into it_ekbe

for all entries in it_bseg .............

if sy-subrc ne 0.

raise error (or as per your requirement)

endif.

if sy-dbcnt eq 1. or describe the table it_ekbe for the number of records. if it is 1.

concatenate the two fields.

else.

do the second check and concatenate the values as per the requirement so that you can prepare the correct extract.

endif.

Hope this will help.

Regards,

Srilatha.

1 REPLY 1
Read only

Former Member
0 Likes
294

Hi,

Select field1 field2 .....

from ekbe

into it_ekbe

for all entries in it_bseg .............

if sy-subrc ne 0.

raise error (or as per your requirement)

endif.

if sy-dbcnt eq 1. or describe the table it_ekbe for the number of records. if it is 1.

concatenate the two fields.

else.

do the second check and concatenate the values as per the requirement so that you can prepare the correct extract.

endif.

Hope this will help.

Regards,

Srilatha.