Skip to Content
0
Former Member
Sep 18, 2006 at 11:49 PM

BAPI call in Smartform - errors

55 Views

Hi all,

my requirement is, in SD - quotation some items has 'override prices', i need to display both prices 'actaul i.e after override price' and original i.e. before override price in smartform output. For this i am simulating BAPI to get the original item price with BAPI FM 'BAPI_SALESORDER_SIMULATE'.i have written a stand alone report program, which is working fine.

Here my problem is when i am calling this BAPI in a smart form which is attached to 'std quotation i.e VA22/VA23' output type, the BAPI FM is not retrieving any values. The reason is both quotation and sales order uses the same program 'SAPMV45A'. when BAPI is called from 'quotation output-smartform' the internal structures ( like XVBAP, YVBAP etc.,) are already filled with values, Some validations on these structures forcing to return empty tables in BAPI call.moreover BAPI is not returning any error.

I have tried options like 1. PERFORM xxxx in program 2. Submit program XXXXX, nothing is working.

Even i tried FM 'GN_INVOICE_CREATE' to calculate the item price. This is also not working with quotation output type.

Any ideas in getting the item price for the given line item.

Thanks in advance.

-naveen