Creation of deliveries using BAPI
I am creating sales order using my customized code . In my code i am using a
BAPI_SALESORDER_CREATEFROMDAT2for this .
when i use this sales order , in VA02 and press enter and than save the message displayed is the delivery is created , deliveries are stored in LIKP and LIPS.
now the requirement is that , the deliveries are to be created automatically by passing value 'A' to the BAPI " BAPI_SALESORDER_CREATEFROMDAT2"
But i dont know, to which field i should pass this .
Can yo please help me regarding this
Thank you!
HI
Re: BAPI function create Customer master(T-code XD01)??
For XD01-- account group and customer number are mandatory.
Re: BAPI for creating customers
Regards
Pavan
Similar Messages
-
Creation of PO using BAPI from SRM
Hi all,
When PR is transfered to SRM from ERP,When i try to create PO in ERP using BAPI,i am getting a error message.SRM also uses the same BAPI to
replicate PO In ERP,but then we dont get any error message. According to my understanding in both cases , EPROFILE has values,and it will call the fm
BBP_EPROFILE_LOCAL_PROCESS.Can any one plz clarify this.
Thanks,
TessHi,
I have use the BAPI as per given note ref. I am taking the PO price from Info record for this I am not giving the item price in the BAPI items, but I want that the header discount should from the user input, but when I ma giving the header discount codnition system is giving error PO header fault, but along with this If i given the items value to in the net price then it is creating the PO, so is it possible to get the items value from the info record and header codnition discount value from user input, we dont want to maintain discount at info record.
regards,
zafar -
Creation of material using BAPI in LSMW without using material no.
Hi SAP Gurus,
I have a requirement of creating materials using the BAPI in LSMW.
I tried to create a material using the BAPI (Business Object - BUS1001006 , and method - SAVEDATA) which should be created internally, but it is asking the material number to be given externally and my configuration is setup to create the material number internally.
Even I looked into the material type which is associated with the number range and everything looks good.
Is there any solution to create the material by using BAPI in LSMW without passing the material no. externally ?
Appreciate your help.
Kalikonda.Hi,
it looks like it's not possible to call this BAPI wihtout material number. Here is a quote from BAPI documentation.
When creating material master data, you must transfer the material
number, the material type, and the industry sector to the method. You
must also enter a material description and its language.
Cheers -
Creation with Reference using BAPIs
We're looking into creating an order with reference to a quotation or a return order with reference to an order or invoice.
According to OSS note 370988 you can only achieve this using a workaround. We're in the process of testing it, so we were wondering whether anybody else out there already has experience with it.
Specifically:
- are there any issues in the document flow (based on our testing so far no) ?
- are there issues with regards to pricing ?
- do the final documents look as if created using VA01 ?
Are there other approaches ? E.g. how does the SAP web shop do it ?
Thanks
AdrianHI Adrian Zehnder,
1) If you want create order with reference to quotation like ex quotation document type is ymea then create quotation using standard bapi 2) By using bapi get the details of the quotation and pass that data to BAPI_SALESORDER_CREATEFROMDAT2 fill the fields ref_doc, ref_doc_it, and ref_doc_ca 3) There i s no issue with pricing everything will copy.4) It will like created in va01.Post if you need more help in this.
Regards,
Madhu. -
Problem while creation of Routing using BAPI "BAPI_ROUTING_CREATE"
Hi.
I am trying to create routing using the BAPI "BAPI_ROUTING_CREATE", when I execute I get the group number and the group counter number in the Export parameters. But it is not saved in the database, when we look at CA03 using the group number system says routing not found.
I am passing "Space" to Bapiflag and i am passing input to tables TASK, MATERIAL ALLOCATON and OPERATION as follows:-
MATERIALTASKALLOCATION-MATERIAL
MATERIALTASKALLOCATION-PLANT
TASK-TASK_LIST_USAGE
TASK-PLANT
TASK-TASK_LIST_STATUS
TASK-TASK_MEASURE_UNIT
OPERATION-ACTIVITY
OPERATION-CONTROL_KEY
OPERATION-WORK_CNTR
OPERATION-PLANT
OPERATION-DESCRIPTION
OPERATION-NUMERATOR
OPERATION-DENOMENATOR
OPERATION-BASE_QUANTITY
OPERATION-STD_UNIT_01
OPERATION-STD_VALUE_01
OPERATION-STD_UNIT_02
OPERATION-STD_VALUE_02
OPERATION-STD_UNIT_03
OPERATION-STD_VALUE_03
OPERATION-STD_UNIT_04
OPERATION-STD_VALUE_04
OPERATION-STD_UNIT_05
OPERATION-STD_VALUE_05
OPERATION-STD_UNIT_06
OPERATION-STD_VALUE_06
Appreciate your replies.
Regards.
Anand Ghawade.Use BAPI_TRANSACTION_COMMIT after you call the BAPI_ROUTING_CREATE
-
Probelm in creation of material using BAPI
Hi All,
Is it possible to create a material without passing a material number to the BAPI
(BAPIMATHEAD-MATERIAL)?
I am encountaring a problem that 'Enter the Material Number'.
I dont want to enter material number. The system should generate an internal material number.
How can i solve this issue...
will be rewarded with points....
Thanks in advance
KishoreHi,
first you need to check if your materialtype is customized for internal number
and then you can work with an btch-program
or MM17
regards
Nicole
Edited by: Nicole Lorenz on Mar 20, 2008 3:01 AM -
Service order creation using bapi with repair order number
Hi experts,
Pls suggest me a BAPI to create a service order for those repair orders where a PGR has been done(for return delivery type : LR).
The plant should be 0260 with storage location wh01 and item category ZRRE
Creation of a service order with repair order type SM03 is not allowed in iw31.
thanks and regards,
Vijayb.Hi prakash,
Thank u for the BAPI
But an error is being displayed saying that the REFURBISHMENT ORDERS CANNOT BE PROCESSED USING BAPI.
ERROR DURING PROCESSING OF BAPI METHODS.
This is while u pass the order type as either ZM03 or SM01or SM02 or SM03.
pls help me on that.
thanks and regards,
Vijayb. -
Deleting deliveries and sales orders using BAPI
Hello all...I am making some changes to the existing program which uses call transaction to VL02 and VA02 doe deleting deliveries and sales orders. This program is running for ever. So I want to use BAPI BAPI_OUTB_DELIVERY_CHANGE and BAPI_SALESORDER_CHANGE instead of call transaction. I just want to now what values should the input tables contain or please guide where I will find documentation over this. Please give me a little insight how to use these BAPI's in my program.
Thanks,Hello,
I got the following error when tried to execute my program with the BAPI function module.
The field "LT_DELIVERY" specified here has a different
field
type.
I am posting some part of my code here. Please help.
CONSTANTS: c_X TYPE c VALUE 'X'.
DATA: lt_header LIKE bapiobdlvhdrchg OCCURS 0 WITH HEADER LINE,
lt_control LIKE bapiobdlvhdrctrlchg OCCURS 0 WITH HEADER LINE,
lt_delivery LIKE bapiobdlvhdrchg OCCURS 0 WITH HEADER LINE,
lt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
lt_header-deliv_numb = sdel-vbeln.
lt_delivery-deliv_numb = sdel-vbeln.
lt_control-dlv_del = c_X.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
EXPORTING
HEADER_DATA = lt_header
HEADER_CONTROL = lt_control
DELIVERY = lt_delivery
TECHN_CONTROL =
TABLES
HEADER_PARTNER =
HEADER_PARTNER_ADDR =
HEADER_DEADLINES =
ITEM_DATA =
ITEM_CONTROL =
ITEM_SERIAL_NO =
SUPPLIER_CONS_DATA =
EXTENSION1 =
EXTENSION2 =
RETURN = lt_return
TOKENREFERENCE =
IF sy-subrc EQ 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
Please suggest how to proceed.
Thanks,
Naren -
Problem with Multiple record creation using BAPI BAPI_PRICES_CONDITION
Hi,
I am working on IS Media Sales And Distribution wherein i am using BAPI BAPI_PRICES_CONDITION for condition record creation in TCODE JC9B. I am able to create one record using this BAPI for one sales promotion but having problem while creation of multiple records for the same sales promotion wherein my internal table have multiple records. It gives me error that data in BAPICONDIT is missing.
I am aatching followig code for reference
BAPI have field of varkey which i am filling as combination of sales org. + distn channel + sales promotion + delivery type
In this varkey delivery type is changing for sales promotion Can be said that one sales promotion can have multiple delivery type .
Am i giving the correct varkey for each itration of internal table ?
I am attaching code for reference.
Here loop it_cond contain one promotion and multiple delivery type.
sales org distn ch promotion delivery
0100 01 zsalesprom 03
0100 01 zsalesprom z3
LOOP AT it_cond INTO wa_cond.
Get next condition number
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'KONH'
QUANTITY = '1'
SUBOBJECT = ' '
TOYEAR = '0000'
IGNORE_BUFFER = ' '
IMPORTING
number = number
QUANTITY =
RETURNCODE =
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
BUFFER_OVERFLOW = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Here i am concacating varkey for each new delivery
CLEAR : l_min,l_length,l_var.
CONCATENATE wa_cond-vkorg wa_cond-vtweg wa_cond-wrbakt INTO l_var.
l_length = STRLEN( l_var ).
IF l_var+14(2) IS INITIAL.
WRITE wa_cond-lifart TO L_VAR+14.
l_length = STRLEN( l_var ).
ENDIF.
W_LINE = W_LINE + 1.
*First table in BAPI
wa_bapicondct-operation = '009'.
wa_bapicondct-cond_usage = 'A'.
wa_bapicondct-table_no = '506'.
wa_bapicondct-applicatio = 'J0'.
wa_bapicondct-cond_type = 'RATE'.
wa_bapicondct-varkey = l_var.
wa_bapicondct-valid_to = wa_cond-datbi.
wa_bapicondct-valid_from = wa_cond-datab.
wa_bapicondct-cond_no = number. "
APPEND wa_bapicondct TO it_bapicondct.
*Second table in BAPI
wa_bapicondhd-operation = '009'.
wa_bapicondhd-cond_no = number.
wa_bapicondhd-cond_usage = 'A'.
wa_bapicondhd-table_no = '506'.
wa_bapicondhd-created_by = sy-uname.
wa_bapicondhd-creat_date = sy-datum.
wa_bapicondhd-applicatio = 'J0'.
wa_bapicondhd-cond_type = 'RATE'.
wa_bapicondhd-varkey = l_var.
wa_bapicondhd-valid_from = wa_cond-datab.
wa_bapicondhd-valid_to = wa_cond-datbi.
APPEND wa_bapicondhd TO it_bapicondhd.
*Third table in BAPI
wa_bapicondit-operation = '009'.
wa_bapicondit-cond_no = number.
wa_bapicondit-cond_count = wa_cond-cond_count.
wa_bapicondit-applicatio = 'J0'.
wa_bapicondit-cond_type = 'RATE'.
wa_bapicondit-calctypcon = 'C'.
wa_bapicondit-scaletype = 'A'.
wa_bapicondit-cond_value = wa_cond-kbetr.
wa_bapicondit-condcurr = wa_cond-konwa.
wa_bapicondit-promotion = wa_cond-wrbakt.
APPEND wa_bapicondit TO it_bapicondit.
*Fourth table in BAPI
wa_bapicondqs-operation = '009'.
wa_bapicondqs-cond_no = number.
wa_bapicondqs-cond_count = wa_cond-cond_count.
wa_bapicondqs-currency = wa_cond-kbetr.
wa_bapicondqs-condcurr = wa_cond-konwa.
wa_bapicondqs-cond_unit = 'EA'.
wa_bapicondqs-LINE_NO = W_LINE."'0001'.
APPEND wa_bapicondqs TO it_bapicondqs.
*Fifth table in BAPI
wa_bapicondvs-operation = '009'.
wa_bapicondvs-cond_no = number.
wa_bapicondvs-cond_count = wa_cond-cond_count.
wa_bapicondvs-currenckey = wa_cond-konwa.
wa_bapicondvs-currenciso = wa_cond-konwa.
wa_bapicondvs-currency = wa_cond-kbetr.
wa_bapicondvs-condcurr = wa_cond-konwa.
wa_bapicondvs-curren_iso = wa_cond-konwa.
wa_bapicondvs-LINE_NO = W_LINE."'0001'.
APPEND wa_bapicondvs TO it_bapicondvs.
CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
EXPORTING
PI_INITIALMODE = ' '
PI_BLOCKNUMBER =
TABLES
ti_bapicondct = it_bapicondct
ti_bapicondhd = it_bapicondhd
ti_bapicondit = it_bapicondit
ti_bapicondqs = it_bapicondqs
ti_bapicondvs = it_bapicondvs
to_bapiret2 = it_bapiret2
to_bapiknumhs = it_bapiknumhs
to_mem_initial = it_cnd_mem_initial
EXCEPTIONS
update_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
RETURN =
CLEAR : wa_bapicondct,wa_bapicondhd,wa_bapicondvs,wa_bapicondqs.
CLEAR : wa_bapicondit.
ENDLOOP.
ENDIF.
ENDIF.
Kindly Suggest.
Thanks
ParagSolved By myself
There is problem while passing data to internal table for item level -
Creation of sales order Using BAPI
Dear Friends,
I need a complete program for Sales order creation using BAPI with all mandatory fields.
I got some sample programs from our friends (SDN) but its not working perfectly.
( Complete working copy of Sales order creation using BAPI. )
Please help me, Expecting your quick reply.
Thanks in Advance.
ShankarHi,
Did u have a look at the standard programs which make use of BAPI_SALESORDER_CREATEFROMDAT1
Heres a list...
LWSSOU08
MV45WF0S
MWWMJF21_BAPI_SALESORDER_CREAT
RBUS2032
Regards,
Tanveer.
<b>Please mark helpful answers</b> -
Creation of material Documents for RMPM adjustments using BAPI
Hi
can any one help me Creation of material Documents for RMPM adjustments using BAPI...
i should be grateful to you...
advance thank you
with regards
venkatYou can check MB_CREATE_GOODS_MOVEMENT which has mkpf as inporting parameter.
-
Creation of sale order using bapi in webdynpro using table control
only first row is getting updated when checked in va03, the line items are not getting replaced, only first row is committed..
Here is the code for table control i used...
http://www.scribd.com/doc/51879492/creation-of-sale-order-using-bapi-in-webdynpro-using-table-control
pls help me out with this..Duplicate Posting. Original is here: Sales order creation with bapi in webdynpro using table control
-
Error in standard network creation using BAPI
hi,
I need to create standard network using BAPI.
I am trying with BAPI_BUS2002_CREATE. As per the documentation, I need to call function BAPI_PS_INITIALIZATION. But, I am not able to get the required output since its giving me error.
Does anybody has used the same BAPI for standard network creation.
Regards,
UjjwalaHI,
How did u create standard network? If u used bapi, which bapi did u use??? -
How to update VBFA while sales order creation using BAPI
Hi,
I am trying to create sales orders for each schedule line items while inquiry creation.
This I have done in the user exit in the VA11 program MV45AFF using BAPI "BAPI_SALESORDER_CREATEFROMDAT2".
along with the Inquiry, Sales orders are also getting created. But I am facing 2 problems.
1) BAPI is not returning the sales order number to the program but when checked from SE37 it is returning the sales order
number.
2) It is not updating the VBFA (SD flow) table.
Regards,
Krishna.Hello,
1) BAPI is not returning the sales order number to the program but when checked from SE37 it is returning the sales order
number.
- are you passing simulation parameter (TESTRUN) as 'X'
2) It is not updating the VBFA (SD flow) table.
- Please use BAPI_SALESDOCUMENT_COPY for copying and updating VBFA table
Thanks
Krish -
Reena Prabhakar - Sales order creation Using BAPI
Hi Reena,
This is Dinesh,i also face problem in Sales order creation using BAPI if you can send me the code it would be great help to me.
Regards,
DineshAnyhow, here is the code that I am using currently which works perfectly well. Not sure if it will be of any help to you, since the values to the BAPI come from the Webdynpro application. I have values stored in my "Test data directory" which I use for testing from the backend.
FUNCTION ztest.
Call the BAPI to create Sales Order
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = l_order_header
IMPORTING
salesdocument = l_salesdocument
TABLES
return = it_return
order_items_in = it_order_items
order_partners = it_order_partners
order_schedules_in = it_order_schdl
order_conditions_in = it_order_conditions
order_text = it_order_text.
READ TABLE it_return WITH KEY type = 'E'.
IF sy-subrc = 0.
*-- error occured
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
*-- no error
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
ENDFUNCTION.
Maybe you are looking for
-
unable to use the APP store... any tips? Thanks! Adrian
-
BAFF Format - Bank of America Format - Any SAP program to generate it
One of customers have a requirement to make electronic payments to vendors. The DME file should be in Bank of America format (BAFF). The guide reads : Welcome to the STP Guide for the BAFF Payment file format. This guide has been customized to provid
-
Email Select People From Drop Down List
I am creating a form that sales reps fill out to go to one whole department and I have that all set with my email submit button. However I also need to form to go to one of 5 others based off their names in a Drop down box for who is a manager for a
-
Hi all, I have placed a tab control to the application, in one tab panel I am running a heavy code which takes couple minutes to be done. During the code running time, I want to lock the current tab so it can't switch to different tab. Is that any
-
How to make each catergory has its own RenderListItem ?
Hello: Everyone! I am using XML Form Builder to creat a Blog,I creat three category which is called most recent blog, topic,bloggers. I preview the result iview,after I click every category,the RenderListItem is the same.However I need the R