‎2008 Jul 03 1:25 PM
Hey guys,
can we call the BAPI from the program..
if yes how can we can show sales orders being loaded..
thanks its urgent
‎2008 Jul 03 2:12 PM
here is an example:
http://help.sap.com/saphelp_46c/helpdata/en/dd/5009660aa411d2ad1b080009b0fb56/content.htm
Regards,
ravi
‎2008 Jul 03 2:08 PM
Hello.
Yes, you can call a BAPI from a program! To achieve that you have to fill it's input parameters and then call the bapi. For sales orders you have BAPI_SALESORDER_CREATEFROMDAT2. Don't forget to call FM BAPI_TRANSACTION_COMMIT after each order.
To show the sales orders that are created use parameter SALESDOCUMENT that BAPI_SALESORDER_CREATEFROMDAT2 has.
Regards.
Valter Olivera.
‎2008 Jul 03 2:11 PM
Nishant,
yes easily you can call bapi from program.
for getting all sales order use:
BAPI_SALESORDER_GETLIST
also am providing a program so that you can see how bapi has to call in program.
CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
EXPORTING
customer_number = lf_customernumber
sales_organization = if_sales_organization
document_date = lf_document_date_from
document_date_to = lf_document_date_to
* PURCHASE_ORDER = IF_PURCH_ORDER
material = lf_matno
IMPORTING
return = ls_return
TABLES
sales_orders = sales_orders.Am afraid to say you that above solution you get about bapi it is not for showing the list of SO these are for creating SO.
Edited by: Amit Gujargoud on Jul 3, 2008 3:12 PM
‎2008 Jul 03 2:12 PM
here is an example:
http://help.sap.com/saphelp_46c/helpdata/en/dd/5009660aa411d2ad1b080009b0fb56/content.htm
Regards,
ravi