2014 Mar 20 11:46 AM
Hi,
I just want to know is there any method to create multiple sales order from single order.
i.e. suppose we created one order using va01 and we get the sales order number and now we want to create 100 more sales order. is there any way to make the process faster?
Plz Reply.
Thanks in advance
Hi,
I just want to know is there any method to create multiple sales order from single order.
i.e. suppose we created one order using va01 and we get the sales order number and now we want to create 100 more sales order. is there any way to make the process faster?
Plz Reply.
Thanks in advance
2014 Mar 20 4:14 PM
Hello Shubham,
As I understand you want to create multiple sales order for the same material and same partners.
i.e., multiple orders should be created similar to the original sales order.
Is my understanding correct ?
Regards,
TP
2014 Mar 20 4:31 PM
In that case use function module "BAPI_SALESDOCUMENT_COPY" to copy the existing sales order to create another.
Regards,
TP
2014 Mar 21 12:58 PM
Thanks for the reply TP, u understand correct. but can u explain in detail how it works as I am new to SAP and don't know the coding part my main functionality is through GUI. So if u can help it will be more helpful.
Thanks
2014 Mar 21 1:29 PM
Create a Z* program and call the function module "BAPI_SALESDOCUMENT_COPY" inside the program like below, so based on the number those many sales orders will be created.
PARAMETERS: order LIKE vbak-vbeln,
type LIKE vbak-auart,
no TYPE i.
DATA: c_lv_vbeln TYPE bapivbeln-vbeln,
itab_lt_return TYPE TABLE OF bapiret2,
str_ls_return TYPE bapiret2.
DO no TIMES.
CALL FUNCTION 'BAPI_SALESDOCUMENT_COPY'
EXPORTING
salesdocument = order
documenttype = type
testrun = ' '
IMPORTING
salesdocument_ex = c_lv_vbeln
TABLES
return = itab_lt_return.
READ TABLE itab_lt_return INTO str_ls_return WITH KEY type = 'E'.
IF sy-subrc EQ 0.
WRITE:/ 'Sales document creation failed'.
ELSE.
WRITE:/ 'Sales document', c_lv_vbeln, 'cretaed'.
ENDIF.
ENDDO.
Regards,
TP
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |