‎2008 Jun 02 7:40 AM
Hi All,
I have written a select statment to get the the Sales order Type from VBAK.
select vbeln auart from VBAK
into corresponding fields of table i_vbeln
for all entries in it_main
where vbeln = it_main-aubel
and auart = 'CR'.
Even though the database table VBAK-AUART is having the value as 'CR', the select statment is unable to fetch this value.
How to resolve this?
Regards
Pavan
‎2008 Jun 02 7:52 AM
Hi
It internally uses CONVERSION ROUTINE. That is the problem in your case.
Use G2 instead CR.
Otherwise use FM CONVERSION_EXIT_AUART_INPUT
‎2008 Jun 02 7:44 AM
Hi,
Before this querry,please check whether the internal table it_main is filled.
Add the statement before select querry.
if it_main is not initial.
select.........
endif.
Also check whether the it_main contains valid 'AUBEL'.It should be matching with VBELN.
‎2008 Jun 02 7:45 AM
hi,
There is conversion routine for it.Sales order type is stored in different format in database table. you have to use the internal format of the order type in select condition.Try to use 'G2' instead of 'CR' in the select query.you can use the function modules CONVERSION_EXIT_AUART_INPUT
CONVERSION_EXIT_AUART_OUTPUT for getting the corresponding sales types and conversions.
Regards,
Veeresh
Edited by: veereshbabu ponnada on Jun 2, 2008 12:23 PM
‎2008 Jun 02 7:46 AM
Hi Pavan!
select vbeln auart from VBAK
into corresponding fields of table i_vbeln
for all entries in it_main
where vbeln = it_main-aubel
and auart = 'CR'.
try using:
select vbeln auart from VBAK
into table i_vbeln
for all entries in it_main
where vbeln = it_main-aubel
and auart = 'CR'.
kindly reward points if helpful.
‎2008 Jun 02 7:51 AM
Dear Pawan,
Even Though You wrote
select vbeln auart from VBAK
into corresponding fields of table i_vbeln
for all entries in it_main
where vbeln = it_main-aubel
and auart = 'CR'.
you need to check internal table which having AUBEL corresponding that in VBAK values are there and Doc type is CR.
check this.
Amit.
‎2008 Jun 02 7:52 AM
Hi
It internally uses CONVERSION ROUTINE. That is the problem in your case.
Use G2 instead CR.
Otherwise use FM CONVERSION_EXIT_AUART_INPUT
‎2008 Jun 02 7:54 AM
hi pavan,
check the table TAUUM. here, enter CR in the AUART_SPR field and you will see that it has a conversion. In our case, we have assigned 'CR' to the standard order type 'G2' of SAP.
regards,
Peter
‎2008 Jun 02 8:14 AM
Hi Pavan,
I think you should check AUBEL and VBELN is of same type..
I am sure problem with the data type..