‎2007 Jun 17 10:29 AM
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
‎2007 Jun 17 10:51 AM
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.
‎2007 Jun 17 10:51 AM
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.