on 09-26-2005 11:09 AM
Hi all
can anyone send me the codes for creating POS sales order via BAPI.
my Z* program should have the following featuer.:
1. Feature to get executed with read data from FILE and to get executed with read data from Z-Table
2. Create the SAP Sales Orders; Calling a BAPI: BAPI_SALESORDER_CREATEFROMDAT2 with respective parameters
3. Capture the messages returned by the BAPI
4. If Sales order created successfully, capture the new order number and report it
5. If any sales order creation fails, capture the data for that Sales order and insert the same in Z-table. And report the respective errors.
6. The data in Z-table that can be verified and reprocessed with step 1, here the successful records will be deleted from the z-table
7. If file is processed successfully, move it to the Archive folder in SAP Apps Server
any help from anyone..
will wait of reply
hi all,,
can someone offer me the sample code for bapi for creating sales order
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
1. first you upload the file into internal file
2. define tables and structures as like in bapi for ex
create_order_bapisdhd1 LIKE
bapisdhd1,item_data_bapisdhd LIKE bapisdhd
OCCURS 0 WITH HEADER LINE,
3 in the itab you have all the values, using string / some manipulations assign all the fields to the relevant bapi structure / table
then call the bapi
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = create_order_bapisdhd1
IMPORTING
salesdocument = created_order_number
TABLES
return = create_order_bapiret2
order_items_in = create_order_bapisditm
order_schedules_in = create_order_bapischdl
order_partners = create_order_bapiparnr
order_text = create_order_bapisdtext.
in the importing - sales document you have the sales document number if the sales order created successfully.
else in the return you have all the error message for the sales order creation using return you can find out the whether sales order created successfull or not.
then move all the error order details to another internal table (say itab_error )
then finaly move the itab_error tab to application server using open dataset and transfer statements
cheers,
sasi
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.