10-08-2008 12:31 PM
Hi Gurus,
I'm creating purchase order using bapi ''BAPI_PO_CREATE'' but it will return a message like ' No master record exists for vendor 1015 '. But i check in lfa1 table this record will exits.
please tell me what is this error.
10-08-2008 12:35 PM
HI,
problem is with the alpha conversion of the vendor number.
use fm
CONVERSION_EXIT_ALPHA_INPUT
vendor_variable = '1015'
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = vendor_variable
IMPORTING
OUTPUT = vendor_variable .
after the function call vendor_variable will be
0000001015.
or use like this...
DATA: w_vendor LIKE EKKO-LIFNR,
w_vendor_n(10) TYPE N.
* Lets assign w_vendor the vendor number 1015
w_vendor = '1015'.
* Convert vendor number 1015 to vendor number 0000001015
w_vendor_n = w_vendor.
* Now use w_vendor_n in the BAPI.
CALL FUNCTION 'BAPI_PO_CREATE' ...
you need to use the new vendor number with preceeding 0's.
Regards,
Omkaram.
Edited by: Omkaram Yanamala on Oct 8, 2008 5:09 PM
10-08-2008 12:37 PM
Hi,
It can be the one mentioned in the above reply to yur query. If same is not the case then you need to share the BAPI call Code....to get more information....
10-08-2008 12:38 PM
Hi Radhika,
I guess that you are calling this BAPI through your program and not running the BAPI directly.
You might have passed the vendor number somewhere in your program as wa_lfa1-lifnr = '1015'. but there is 'ALPHA' conversion exit for LIFNR. so you need to pass the value as stated below.
wa_lfa1-lifnr = '0000001015'.
I think this can solve your problem. Not only vendor number, you have to check all other hard coded fields, whether there is any 'ALPHA' conversion is there or not.
thanks & regards
Kishore Kumar M