2007 Dec 20 4:26 AM
DATA : s_werks TYPE vbrp-werks,
BELN like vbpa-VBELN,
BITM like vbpa-POSNR,
v_adrnr like vbpa-adrnr.
tables : vbpa.
READ TABLE IT_FINAL.
beln = it_final-vbeln.
bitm = it_final-posnr.
s_werks = it_final-werks.
s_bukrs = it_final-bukrs.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = beln1
IMPORTING
OUTPUT = beln1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = bitm1
IMPORTING
OUTPUT = bitm1.
select single *
from vbpa
where vbeln = beln
and posnr = bitm
AND PARVW EQ 'SH'.
Now i have changed the query yar, but its also not woking,
it returns sy-subrc = 4, even the condition satisfied with values.
can anyone help me on this.
Regards
Rajaram
2007 Dec 20 4:31 AM
Go to SE16 and use table VBPA after giving input values check whether you are getting values?
a®
2007 Dec 20 4:31 AM
Go to SE16 and use table VBPA after giving input values check whether you are getting values?
a®
2007 Dec 20 4:42 AM
I am getting values in se16 yar, but in debugging returns
sy-subrc = 4.
2007 Dec 20 4:46 AM
select single *
from vbpa
where vbeln = beln
and posnr = bitm
AND PARVW EQ 'WE'. "<<<<<<<
There will a conv routine behind data element PARVW please check thru SE11 .
a®
2007 Dec 20 4:58 AM
yes yar PARVW value in se11 is 'WE', but in database when i put N transaction its SH.
whats the reason actually.
2007 Dec 20 5:04 AM
Check the domain PARVW , in the definition tab you can find conversion routine PARVW double click on that
you can find
CONVERSION_EXIT_PARVW_INPUT
CONVERSION_EXIT_PARVW_OUTPUT
a®
2007 Dec 20 5:14 AM
i dont understand conversion routine PARVW.
pls explain me, and even if i remove PARVW condition,
the quey is not working yar, what could be the reason.
2007 Dec 20 5:15 AM
hi,
there are two function modules involved in this pls check
in se 37.
CONVERSION_EXIT_PARVW_INPUT--which converts SH to WE
CONVERSION_EXIT_PARVW_OUTPUT-which converts WE to SH
for some reason SAP has made conversion like this for many fields so we have to check when we hard code some values in query...but in se16 it will atomatically do the process...
pls check the link too...
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee19446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2b/e9a20d3347b340946c32331c96a64e/content.htm
regards,
karthik.
Edited by: karthikeyan sukumar on Dec 20, 2007 10:47 AM
2007 Dec 20 5:16 AM
select single *
from vbpa
where vbeln = '0081600002'
and posnr = '000010'.
This query is working perfectly yar,
i thing the forwaded zeroes is the problem.
how can we solve this.
2007 Dec 20 5:18 AM
For checking & testing
select single *
from vbpa
where vbeln = beln
and posnr = bitm.
check whether you are getting values if not
select single *
from vbpa
where vbeln = beln.
then you can easily filter it out where the problem is
for find the conversion routines pl check function module i have give able
a®
2007 Dec 20 4:40 AM
hi ,
i have just made small change...more than that i could not find any error...
DATA : s_werks TYPE vbrp-werks,
BELN like vbpa-VBELN,
BITM like vbpa-POSNR,
v_adrnr like vbpa-adrnr.
tables : vbpa.
*What u are trying to read every time i think u should use index/key field
READ TABLE IT_FINAL.
if sy-subrc = 0.
beln = it_final-vbeln.
bitm = it_final-posnr.
s_werks = it_final-werks.
s_bukrs = it_final-bukrs.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = beln "not beln1
IMPORTING
OUTPUT = beln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = bitm "not bitm1
IMPORTING
OUTPUT = bitm.
select single *
from vbpa
where vbeln = beln
and posnr = bitm
AND PARVW EQ 'SH'.
endif.
regards,
karthik
2007 Dec 20 4:44 AM
Hi Raja,
Your code seems to be ok.
Will you can tell me the structure of IT_FINAL.
Regards
Manoj Kumar
2007 Dec 20 4:59 AM
hi ,
there is a conversion routine for PARVW field pls check..
regards,
karthik
2007 Dec 20 5:28 AM
Hi Raja Ram,
Even i have faced the similar problem, the problem is coming bcoz in the select query in the condition ,we will not get the leading zeros, when we go in se16 and check for that particular condition we will see there will be leading zeros, so just add the fm, convrersion_alpha_exit_input and your problem will be solved.
All the Best
Ramesh.