‎2007 Mar 20 7:38 AM
Hello Friends,
I am using a select statement to fetch Bill to Party No. from KNVP table. Here is the select statement.
SELECT SINGLE kunn2 FROM knvp INTO y_kunn2
WHERE kunnr = vbrk-kunag and parvw = 'BP'. " c_bp.
Even though I could able to select with the same value in data dictionary, but in program this statement does not bring the record.
Thank U for ur time.
Cheers,
Sam
‎2007 Mar 20 7:42 AM
Hi
try to fetch the same Partner function from VBPA table
Pass the VBRP-AUBEL(sales order No) for this table VBPA and pass the partner function 'BP' you will get the required partner function.
regards,
Anji
Message was edited by:
Anji Reddy Vangala
‎2007 Mar 20 7:43 AM
Hi,
This code will work only if u have an internal table VBRK and a field in it as kunag and then loop into it and inside the loop place this select statement. Else the other option is
SELECT * from VBRK into VBRK.
SELECT SINGLE kunn2 FROM knvp INTO y_kunn2
WHERE kunnr = vbrk-kunag and parvw = 'BP'.
IF SY_SUBRC = 0.
ENDIF.
ENDSELECT.
If u have done similar thing, then plz paste ur complete code...
Cheers,
Sam
‎2007 Mar 20 7:55 AM
Hi, I am bringing the correct value in vbrk-kunag.
I think I need to use some conversion exits.
Cheers,
Sam
‎2007 Mar 20 7:52 AM
Check if vbrk-kunag has the leading zeroes , if not try this
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = vbrk-kunag
IMPORTING
OUTPUT = vbrk-kunag.
SELECT SINGLE kunn2 FROM knvp INTO y_kunn2
WHERE kunnr = vbrk-kunag and parvw = 'BP'.
‎2007 Mar 20 8:00 AM
Hi,
I have used the conversion exit.. but to my wonder its a simplest of the select statements.. still it does not bring the record.
Cheers,
Sam
‎2007 Mar 20 7:57 AM
Hi Sam,
The problem is not with the inputs you are giving the problem is with the format of KUNNR in KNVP and VBRK-KUNAG.
To solve this issue you need to use the conversion exit before the select query to get the records.
use foolowing conversion exit
CONVERSION_EXIT_ALPHA_INPUT
Regards,
Kunjal
‎2007 Mar 20 7:59 AM
Hi,
There seems to be a problem with the kunnr value you are using ..
So, you may try it like kunnr = '0000345' checking it out in the dictionary the field length .
Once this is diagnosed , u can use CONVERSION_EXIT_ALPHA_INPUT to add zeros in the beginning.
Pls reward if useful.
Regards,
Shweta
‎2007 Mar 20 7:59 AM
use FM CONVERSION_EXIT_ALPHA_INPUT
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = knvp-kunnr
IMPORTING
OUTPUT = knvp-kunnr.Regards,
Santosh
‎2019 Aug 09 2:21 PM
Don't use PARVW = 'BP', there is a conversion exit on PARVW. Try using PARVW = 'RE'
You can see the unconverted value using SE16N by double clicking on the row.
‎2019 Aug 09 3:58 PM
The problem is with the parvw = 'BP' input.
While fetching data using a select query you must provide the internal partner function which is mapped with BP i.e. RE. You can pass RE directly by hardcoding it in your code or else you can use CONVERSION_EXIT_PARVW_INPUT Function Module by passing BP as an input and getting RE as an output.
Reward if it was helpful for you.
Thanks and Regards,
Basim Wangde