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,
Tess
Hi,
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
Similar Messages
-
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
-
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 -
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 -
Hi,
Thanks in advance
I need step by step procedure to create sales orders using BAPI from a text filecreate report prorgam in se38
create selection screen with below fileds
header file name
itme file name
radio button 1 : Local PC
radio button 2 : application server
if local PC = X
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gv_file
filetype = gc_filetype
TABLES
data_tab = gt_text_file
EXCEPTIONS
LOOP AT gt_text_file INTO wa_text_file.
SPLIT wa_text_file-line AT gc_comma INTO list of your fileds
append internal table
endloop.
else.
OPEN DATASET gv_file FOR INPUT IN TEXT MODE ENCODING DEFAULT
WITH SMART LINEFEED.
LOOP AT gt_text_file INTO wa_text_file.
SPLIT wa_text_file-line AT gc_comma INTO list of your fileds
append internal table
endloop.
after that your ready with internal tbale
loop your internal table
call the sales order cretae BAPI
endif. -
Creation of GR from Contract using bapi BAPI_GOODSMVT_CREATE
Hi,
As per requirement I need to create a GR for Contract line item. I tried to create using BAPI BAPI_GOODSMVT_CREATE but It returns the error message. I tried with GM_CODE '05', so could you please let me know which are the parameters I need to pass to create GR?
Thanks,
Nishad ShahHi,
Populate header, code, item and return table
In header populate PSTNG_DATE ,DOC_DATE ,PR_UNAME(if u have additional information then pass those also)
In Item table MOVE_TYPE ,MVT_IND ,PO_NUMBER ,MATERIAL,PLANT ,STGE_LOC ,PO_ITEM = POITEM-PO_ITEM,ENTRY_QNT .
MVT_IND filed u can leave it as blank as GM_CODE is 05.
Regards,
Sajith -
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> -
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. -
Vendor replication and exchange documents from SRM to SUS (using PI)
Hi Gurus,
We are implementing scenario plan driven procurement with suppllier collaboration on SRM 7.0.
Our architecture involve:
A server machine with SRM 7.0 (SRM server and SUS components both in this machine)
A server machine with Netweaver PI 7.0
A server machine with EP 7.0
A server machine with SAP R/3 4.6C
Now we are working on vendor replication process in order to carry out vendors from R/3 to SUS (on portal enviroment) and we made following steps:
- Replication of vendor from R/3 to SRM by mean tx BBPGETVD: OK
- Replication of vendor from SRM to SUS (on portal enviroment) by mean tx BBP_SP_SUPP_INI:
In this step we put the BP (created with tx BBPGETVD) on field "Supplier" but we obtained the Message no. BBP_XP004
"No vendor allowed for vendor portal"
So we want to know, in connection with mentioned architecture, the way to perform this activity in order to replicate the suppliers in SUS.
Is possible perform activities related to exchange documents (by mean Netweaver PI) between SRM and SUS (as necessary for our implementation scenario) if these mentioned components are installed and configured on the same phisical server machine?
What is the best recommendation about installation of SRM and SUS? A unique server machine or separated server machines?
Is there any inconvenience or technical reason having SRM and SUS in the same server machine?
Thanks in advance.
Regards,
HoracioHi Nikhil,
Thanks for your soon response.
Our process involve PR and PO manual creation in MM and then PO (with ALE message type) is routed to a supplier in SUS via XI. We could achieve that steps succsesfully.
We don´t have in scope neither use SRM for sourcing nor PO creation (via IDOC) in MM.
In connection with my previous explanation; Would you say that our process is MM-SUS?.
If yes, can I follow the steps mentioned in below link described at point u201CProcess Flow Without Supplier Registrationu201D?. What´s the difference between creating and replicating bussiness partner data?.
http://help.sap.com/saphelp_srm40/helpdata/en/c0/7a0859ee91d54aa48a69fb5d2c4089/content.htm
Thanks in advance.
Regards,
Horacio -
Sending Custom fields from SRM to ECC through BAPI
Dear All ,
I am looking for a step by step instructions on how to send my data i.e Start date and end date at ITEM :LEVEL for limit items from SRM to ECC
It is currently only sent a Header level . I have almost read all the posts and yet not able to figure out . Please can you some one help me to understand .
Checked the below
http://scn.sap.com/thread/476423
http://scn.sap.com/thread/170189
http://scn.sap.com/thread/26494
http://scn.sap.com/thread/1399901
http://scn.sap.com/thread/1991218
and also checked the SAP official page :
http://wiki.scn.sap.com/wiki/display/ABAP/BAPI?original_fqdn=wiki.sdn.sap.com#BAPI-Passingcustomfield
http://wiki.scn.sap.com/wiki/display/SRM/Transfer+process+of+the+Shopping+Cart
http://scn.sap.com/docs/DOC-2726
However no luck . I also opened a similar thread previously but still unable to get an end to end understanding .Please could some one guide me for this one ? Currently what I found out there is a class CL_BBP_BS_ADAPTER_PO_CRT_ERP10 where CREATE_DOCUMENT decides what fields would be passed .. In that there is a FM which is being called from ECC .. and in that there is header and header X field ..
which has the fields which I need VPER start and end date ..
CALL FUNCTION 'BAPI_PO_CREATE1'
DESTINATION av_rfc_dest
EXPORTING
poheader = as_po_out-is_poheader "#EC ENHOK
poheaderx = as_po_out-is_poheaderx
h
Now I wnat the same fields to be passed at item level of the SC .. Please could you confirm on what exactly I should do ?
I saw the below tables not sure what I should do with them to include the 2 fields I want which should be passed to ECC .
TABLES
poitem = as_po_out-it_poitem "#EC ENHOK
poitemx = as_po_out-it_poitemx "#EC ENHOK
extensionin = as_po_out-it_extensionin "#EC ENHOK
* extensionout = as_po_out-it_extensionout "not used by SRM
poexpimpitem = as_po_out-it_poexpimpitem "#EC ENHOK
poexpimpitemx = as_po_out-it_poexpimpitemx "#EC ENHOK
potextheader = as_po_out-it_potextheader "not used by SRM
* popartner = as_po_out-it_popartner "not used by SRM
Please can some one let me know for the below queries :
1, How to identify If I am checking on the right method .
2. How I can create these 2 fields voer start date and end date and pass them to EKPO table of PO in ECC ?
3. How to create these 2 fields in BAP and pass it further from SRM to ecc
4. How would they be visisble in SC portal screen ..
Please guide me on this would be really grateful . Thanks in advance for the help
Regards
VinitaHi Madhu,
Please check out this note 1027081 which is for the PO Held in classic scenario.
Praveen. -
Issue in material master update from presentation server using BAPI....
Hi Guru's...
i am trying to change the material master from presentation server (desktop flat file)
using BAPI(BAPI_MATERIAL_SAVEDATA) ....
while executing my program i am getting the message like material had changed...
but while in mm02 i am un able to fine the updates...
please find below program logic and correct me if any mistakes....
thanks in advance...
*& Report ZAREPAS36
REPORT zarepas36.
DATA : gs_bapimathead TYPE bapimathead,
gs_clientdata TYPE bapi_mara,
gs_clientdatax TYPE bapi_marax.
TYPES : BEGIN OF gty_itab1,
matnr(18),
matkl(9),
spart(2),
ntgew(13),
gewei(3),
meins(3),
END OF gty_itab1.
DATA : gt_itab1 TYPE STANDARD TABLE OF gty_itab1,
gwa_itab1 TYPE gty_itab1.
TYPES: BEGIN OF gty_itab2,
abc(132),
END OF gty_itab2.
DATA: gt_itab2 TYPE STANDARD TABLE OF gty_itab2,
gwa_itab2 TYPE gty_itab2.
flat file at selection screen
PARAMETERS: p_files TYPE string.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = p_files
filetype = 'ASC'
CHANGING
data_tab = gt_itab2
EXCEPTIONS
OTHERS = 8.
LOOP AT gt_itab2 INTO gwa_itab2.
IF gwa_itab2-abc(1) = 'S'.
gwa_itab1 = gwa_itab2-abc(132).
APPEND gwa_itab1 TO gt_itab1.
ENDIF.
ENDLOOP.
loop at gt_itab1 into gwa_itab1.
*Material
gs_bapimathead-material = gwa_itab1-matnr.
*Material details at client data
*material group.
gs_clientdata-matl_group = gwa_itab1-matkl.
gs_clientdatax-matl_group = 'X'.
*Division
gs_clientdata-division = gwa_itab1-spart.
gs_clientdatax-division = 'X'.
*Net Weight
gs_clientdata-net_weight = gwa_itab1-ntgew.
gs_clientdatax-net_weight = 'X'.
*Unit of Weight
gs_clientdata-unit_of_wt = gwa_itab1-gewei.
gs_clientdatax-unit_of_wt = 'X'.
*Base Unit of Measure
gs_clientdata-base_uom = gwa_itab1-meins.
gs_clientdatax-base_uom = 'X'.
endloop.
*calling BAPI for making changes in material and saving thru BAPI.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = gs_bapimathead
clientdata = gs_clientdata
clientdatax = gs_clientdatax.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE: / 'Error occured while changing material'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE: / 'material',gs_bapimathead-material,'changed'.
ENDIF.hi hello Guru's
i resolved the issuee..
pleaso go thru the below proram logic for your reference..........
*& Report ZAREPAS36
REPORT zarepas36.
DATA : gs_bapimathead TYPE bapimathead,
gs_clientdata TYPE bapi_mara,
gs_clientdatax TYPE bapi_marax.
TYPES : BEGIN OF gty_itab1,
matnr(18),
matkl(9),
spart(2),
ntgew(13),
gewei(3),
meins(3),
END OF gty_itab1.
DATA : gt_itab1 TYPE STANDARD TABLE OF gty_itab1,
gwa_itab1 TYPE gty_itab1.
TYPES: BEGIN OF gty_itab2,
abc(132),
END OF gty_itab2.
DATA: gt_itab2 TYPE STANDARD TABLE OF gty_itab2,
gwa_itab2 TYPE gty_itab2.
DATA:ls_return TYPE bapiret2,
lt_bapiret2 TYPE standard table of bapiret2.
flat file at selection screen
PARAMETERS: p_files TYPE string.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = p_files
filetype = 'ASC'
CHANGING
data_tab = gt_itab2
EXCEPTIONS
OTHERS = 8.
LOOP AT gt_itab2 INTO gwa_itab2.
IF gwa_itab2-abc(1) = 'S'.
gwa_itab1 = gwa_itab2-abc(132).
APPEND gwa_itab1 TO gt_itab1.
ENDIF.
ENDLOOP.
LOOP AT gt_itab1 INTO gwa_itab1.
*Material
gs_bapimathead-material = gwa_itab1-matnr.
*Material details at client data
*material group.
gs_clientdata-matl_group = gwa_itab1-matkl.
gs_clientdatax-matl_group = 'X'.
*Division
gs_clientdata-division = gwa_itab1-spart.
gs_clientdatax-division = 'X'.
*Net Weight
gs_clientdata-net_weight = gwa_itab1-ntgew.
gs_clientdatax-net_weight = 'X'.
*Unit of Weight
gs_clientdata-unit_of_wt = gwa_itab1-gewei.
gs_clientdatax-unit_of_wt = 'X'.
*Base Unit of Measure
gs_clientdata-base_uom = gwa_itab1-meins.
gs_clientdatax-base_uom = 'X'.
ENDLOOP.
*calling BAPI for making changes in material and saving thru BAPI.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = gs_bapimathead
clientdata = gs_clientdata
clientdatax = gs_clientdatax
IMPORTING
return = ls_return.
LOOP AT lt_bapiret2 INTO ls_return.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE: / 'Error occured while changing material'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE: / 'material',gs_bapimathead-material,'changed'.
ENDIF. -
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.
Maybe you are looking for
-
Access Reliability in Web Application
Does anyone have recommendation on using Access database in Web application. I have always used Access, but recently heard that it can cause great problems if more than one user is accessing information at the same time. Is there anyway around this o
-
"weather has been running in the background"
My iPad said "weather has been running in the background," but las I checked iPad didn't come with the "weather" app. What's the deal?
-
I'm unable to burn a Philips DVD+RW 1-4x 4.7gb dvd. I get this error code: 0x80020063. I've downloaded SuperDriveFWUv2.0.dmg, but when I install I get a message saying no device needing this upgrade was found. Here's the info about my drive; MATSHITA
-
Disk Utility is completely worthless with external drives
I've tried two different drives now on both Leopard and Tiger. Any time I try to do anything at all with the drive it beach balls and I have to force quit Dick Util. I just want to format/partition one of my hard drives -- something I've done hundred
-
Problems with photo view and email
My iphoto has started acting very badly. When I click on a thumbnail to view a photo, I often get a big grey area with an X in it. And the email photo feature won't work anymore. I click email, it starts to process it and then nothing. this is pretty