2006 Jun 14 1:46 PM
Hello All
Thers a litte Problem with an Selection From AFKO.
Field Pronr
The coding ist simple
TAbles: AFKo
DATA: it_afko like AFKO.
Select single * From AFKO into table it_afko.
But the entries in der internal Table It_Afko are not korrekt. The Entry must bei the Same like in TA SE16.
but is is not.
For Pronr From the selection is 0010000
But from the Tabel AFKO P.123456
Any Idear ??
Thanks for your help.
2006 Jun 14 2:19 PM
Hi Christian,
To get the value as show in SE16
you will have to do the following
Select * From AFKO into table it_afko.
loop at it_afko.
call FM CONVERSION_EXIT_KONPD_OUTPUT
to convert it_afko-PRONR
modify it_afko index sy-tabix.
endloop.
Sameena
Message was edited by: sameena attarwala
2006 Jun 14 1:49 PM
Christian,
Make your query as.
Select * From AFKO into table it_afko.single will select only one line.
rgds,
TM
2006 Jun 14 1:53 PM
The Coding ist korrekt. But the Problem ist not the Selection. I the DATAfield PRONR (N 8). The a convertion exit for this Field, but i does´nt work.
2006 Jun 14 2:05 PM
Hi,
data selected using select statement into internal table ; will be form present in the database.
if want to remove leading zero use CONVERSION_EXIT_ALPHA_OUTPUT
if u want to add leading zero use CONVERSION_EXIT_ALPHA_INPUT.
regards
2006 Jun 14 2:06 PM
u can loop at table and use CONVERSION_EXIT_ALPHA_INPUT
loop at it_afko.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_afko-pronr
IMPORTING
OUTPUT = it_afko-pronr.
modify it_afko index sy-tabix.
endloop.
2006 Jun 14 1:50 PM
dont use select single.
put like this
select aufnr from afko
into corresponding fields of it_afko
where pronr in s_pronr.
Regards
Prabhu
2006 Jun 14 1:51 PM
if u use select single u have to use where condirtion.
Select single * From AFKO into it_afko where aufnr = p_aufnr.
2006 Jun 14 1:59 PM
Hi Christian,
can you please be a bit more specific? I guess you´ve checked in debugging, that the line selected via your statement is the one you have viewd via se16. So what should your conversion do? Is the value wrong in printing?
I would go with the others and ask you to check the selection.I´ve you´ve done so, maybe you have some more information for us.
Thanx
Ute
2006 Jun 14 2:04 PM
Hello Christian,
the field PRONR (Projectdefinition) has a conversion exit. SE16 shows you the external format - from selection you get the internal format.
To switch between both use the functions
CONVERSION_EXIT_KONPD_INPUT
CONVERSION_EXIT_KONPD_OUTPUT
Regards Wolfgang
2006 Jun 14 2:05 PM
Hello Ute
The Output with Write (for Pronr) Ist P.10000
But the Entry in the internal Table It_Afko
is 0002345.
And Thats my Problem. I use Pronr for an other Selection, but i does'nt works.
Do you need more details ??
2006 Jun 14 2:19 PM
Hi Christian,
To get the value as show in SE16
you will have to do the following
Select * From AFKO into table it_afko.
loop at it_afko.
call FM CONVERSION_EXIT_KONPD_OUTPUT
to convert it_afko-PRONR
modify it_afko index sy-tabix.
endloop.
Sameena
Message was edited by: sameena attarwala