‎2007 Oct 30 11:57 AM
Hi, I'm looking a source code of abap report and I found that:
SELECT SINGLE * FROM *KNA1
WHERE KUNNR = *BSEG-FILKD
what does it means? The * before the name of the table
Thanks.
‎2007 Oct 30 12:04 PM
Hi Dani,
means that all the fields from the table table KNA1 wil be selected into the work area of KNA1.
KNA1 must have been declared as
Tables : KNA1. in the declaration part.
This declaration creates a automatic workarea of the same type as KNA1.
Do you have any other clarification please feel free to ask.
Regards
Gowri
‎2007 Oct 30 12:00 PM
This *BSEG is the workarea of type BSEG.
That is also the reason why SINGLE is used
Regards
Nishant
‎2007 Oct 30 12:04 PM
Hi Dani,
means that all the fields from the table table KNA1 wil be selected into the work area of KNA1.
KNA1 must have been declared as
Tables : KNA1. in the declaration part.
This declaration creates a automatic workarea of the same type as KNA1.
Do you have any other clarification please feel free to ask.
Regards
Gowri
‎2007 Oct 30 12:07 PM
Hi,
It means the selected data is coming in the workarea.
Reward if useful.
Regards,
Shilpi
‎2007 Oct 30 12:16 PM
‎2007 Oct 30 2:19 PM
I'm upgrading 4.5 to 6.0 ECC version and doesn't work if I use the same statement. Someone knows if I have to change anything? Thank you all.
‎2007 Oct 30 2:29 PM
Hi,
you can use
SELECT SINGLE * FROM KNA1
INTO KNA1
WHERE KUNNR = ...
cya,
dimas
‎2007 Oct 30 2:30 PM
Hi,
I meant
SELECT SINGLE * FROM KNA1
INTO KNA1
WHERE KUNNR = BSEG-FILKD.
cya,
dimas
‎2007 Oct 30 3:27 PM
‎2007 Oct 30 3:30 PM
yes... select single just return one row form your table... is the same when you use select... endselect.
cya,
dimas
‎2007 Oct 30 3:40 PM
sorry...
I assumed that you defined KNA1 with
TABLES KNA1.
but you're right, it's into a working area
cya,
Dimas.
‎2007 Oct 30 3:53 PM
But, do you know why *kna1 gives error when changing from version 4.5 to 6.0 ECC?
‎2007 Oct 30 3:54 PM
I don't know why... but sicerely I always use the long way _