Getting error msg even I entered all mandatories to BAPI for sales order.
Hi Experts,
I am trying to create sales order using standard BAPI
"BAPI_SALESORDER_CREATEFROMDAT2". But, even I had entered all mandatory fields, I am unable to create sales order sucessfully.
I had gone through the documentaion of this BAPI and entered these fields.
These are the mandatory fields that which I had tried to create,
ORDER_HEADER_IN :
DOC_TYPE Sales document type
SALES_ORG Sales organization
DISTR_CHAN Distribution channel
DIVISION Division
ORDER_PARTNERS..:
PARTN_ROLE Partner role, SP sold-to party
PARTN_NUMB Customer number
ORDER_ITEMS_IN..:
MATERIAL Material number
Do we have anymore fields to give as inputs? I am getting this error message as below :
Msg: Personal number 00007176 does not exit.
But, I am not giving any personal number manually. This personal number was having connection with partner role field,
I had reffered this from the VBPA (Sales Document: Partner Table). Now, please suggest me how to solve this?
Can anyone tell me how to solve this problem and create sales order sucessfully.
Thanks in advance,
Surender Batlanki.
hi,
try out this sample code.. it is working fine in creating sales order through BAPI.
REPORT z_bapi_salesorder_create.
Parameters
Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
Partner data
Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
Ship to
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
Commit the work.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
regards,
pavan reddy
Similar Messages
-
Error thrown in BAPI for SALE order
Hi,
In BAPI_SALESORDER_CREATEFROMDAT1 i got one error
Personnel master record (some number) does not exist for sales
How to solve this issue. Please give the solution.
thanks,
Suresh.MHi,
Can you please mention the exact data you are passing to the bapi ?
Kindly, check the partners details you are passing in the bapi as well.
KR Jaideep, -
Hi All,
Not able to install Adobe Flash Builder 4.7 in windows xp 32 bit OS. Getting error msg 64 bit required.
Pls help me for installation.
thanks in advance.You don't have service pack 3 most likely. Refer to the tech specs:
http://www.adobe.com/products/flash-builder/tech-specs.html
Mylenium -
After i have upgraded to Lion OS, this computer has become the **** computer on this planet. Everything is so slow as if i am in 1990 where you can click on something and take a coffee break. Constantly get errors on MS Outlook and all applications are taking for ever to open up. If you guys can't fix it i am going to throw this out the window. Completely fed up with this. Have always loved apple but this is the worst experience i have with the MacBook Air and its not even 1.5yr old.
There are two ways to upgrade to Lion - one is to install Lion overtop of the existing Snow Leopard and the other is to erase the hard drive, install Lion, and then migrate your applications and user accounts. This second option takes a good deal longer than the first so the preferred method for most is the first method and in most cases it works fine. But not in all.
captfred has told you what I'd start out doing if it were my computer. There's a good chance that you can identify an application or plug-in that's causing the problem. Upgrading the involved item(s) can solve the problem. Of all the Lion upgrades I performed I had a couple that weren't completely successful even though I'd looked for programs and plug-ins that needed upgrading first. I missed a few but I found them after the fact and had happy computers.
There was one computer that still had problems. With this computer I reinstalled Lion right over the old version. (If you didn't keep a copy you'll need to download it first.) I still wasn't satisfied so with that computer I rebooted into the recovery partition (Command R after restarting) formatted the hard drive, installed Lion and then migrated. That did solve the problem. -
FM to get purchase requisiton created for Sales order in APO
Hello experts,
I want to know is there any FM or BAPI exists in APO to get Purchase requisiton created for a sales order created in R/3 using sales order number? and FM or BAPI to get the sales order config data. if the mapping of sales order and purchase requisition is in Table, Please mention those tables also.
Many thanks,
SenthilHi,
Please see the below link for useful SCM BAPIs....
http://wiki.sdn.sap.com/wiki/display/SCM/SCM+BAPIs
For sales order config data, BAPI_SLSRVAPS_GETLIST2 is available.
Regards,
Saurabh -
iTunes no longer works on my Windows VISTA system. Get error msg saying an application is attempting to access C runtime library incorrectly... Error 7, Windows error 1114. Same msg, or one that says unable to install, when trying to update or reinstall iTunes. iTunes worked well up until about a month ago when this error msg starting appearing.
Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
Remove all of these items in the following order:
iTunes
Apple Software Update
Apple Mobile Device Support (if this won't uninstall move on to the next item)
Bonjour
Apple Application Support
Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
Please note:
Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
HT1925: Removing and Reinstalling iTunes for Windows XP
HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
tt2 -
Unable to email a document. Keep getting error message: Invalid Date Enter 2-digit month
Does not happen with all forms which emante from same USG webpage
Any adivice?If i am using 11G andrtp is 11g but on rtp side if they configure SSL, is it mandatory to do it from our side also?No it not mandatory to enable SSL at your end however you have to configure identity and trsut at your end.
Any update on my regular question(The main forum question)?You mentioned that you are posting message from 10g to 11g and as per log you are sending it to URL - https://dev-nog.server:443/b2b/transportServlet
So few things which I see as a problem are-
1. You should use URL https://hostname:soa_server_ssl_port/b2b/httpReceiver instead of https://dev-nog.server:443/b2b/transportServlet
2. SOA server SSL port should be enabled (SSL should be enabled on SOA server)
3. You should configure wallet at 10g side to contain trust cert of 11g server
Regards,
Anuj -
having problems opening a pdf file with reader 10/11 get error msg cannot open close reader and try again any ideas
Hi George ,
Is it happening with all the PDF' or any specific one?
Could you please share the error message so that we can replicate at our end ?
Try repairing reader once and see if that fixes the issue.
Launch Reader>Navigate to Help>Repair Adobe Reader Installation
Regards
Sukrit Dhingra -
i rented "this is the end" and it never fully downloads just get error msg saying it cant download at this time
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Go to Settings>iTunes and App Store and sign out and sign back in
- Power off and then back on your router
.- Reset network settings: Settings>General>Reset>Reset Network Settings. You will have to rejoin all wifi networks
- Try when connected to another network
- Contact iTunes
Apple - Support - iTunes - Contact Us -
Hi All,
Since I upgraded to ML, I keep getting error msg. 4 my lacie external drive that it unexpectedly quit. It then proceeds to go away and reappear again a few mins. will appear. It also mentions this ejection could destroy my data. I've already updated the Driver to the most current one ta LaCie had for my 500 GB Rikki External. That didn't help. I also tried Disk Utility to repair permissions No Help! Suggestions?That would be highly unusual, since the Apple ID is almost always the email address, unless it's changed later, and normally has to be unique to set up a new Apple ID. In any case, if you have two Apple IDs (or more), you probably need to authorize the computer using both.
Regards. -
Getting error msg while inserting a record
HI
Am getting error msg while am inserting a new record. Am unable to view the data that i inserted in to database. If any one can help in sorting of the problem plz help. I used the following code in Application Module(AM) and Controller(CO)
processRequest()
-- am.invokeMethod("insertmethod");
processFormRequest()
-- if(pageContext.getParameter("Create")!=null)
-- am.invokeMethod("savemethod");
In AM Code
public void insertmethod()
EOVOImpl vo=getEOVO1();
if(!vo.isPreparedForExecution())
{ vo.executeQuery(); }
Row ro=vo.createRow();
vo.insertRow(ro);
ro.setNewRowState(Row.STATUS_INITIALIZED);
public void savemethod()
{ OADBTransaction oa=getOADBTransaction();
oa.commit(); }
Error
Attribute SummaryFlag in kiInsertAM.kiInsertEOVO1 is requiredHi,
Either on the form you don't have SummaryFlag field or you forgot to map VO attribute i.e. SummaryFlag to that field.
If you don't have SummaryFlag field on form then you need to set it programatically before committing record.
Please check and let us know.
Regards,
Mukesh Uchaniya -
Bought new Mac Retina; how do I get CS 5 on it; bought external hard drive but get error msg 15?
Hi there,
I was able to format the Toshiba hard drive on my old Mac and copy the Adobe Suite onto it. I followed instructions to format the hard drive to the Retina Mac through Disk Utility, but I still can see the external drive on the new Mac.
Any suggestions…?
Susan Babin -
when i try to open itunes on my pc i get error msg msvcr80.dll followed by error 7 (windows error 126)
This has been a very popular question the past 24 hours...best solution so far is that of tt2: https://discussions.apple.com/thread/5819124
-
I keep getting error msg 1015 when I tried to restore my iphone
I keep getting error msg 1015 when I try to restore my iphone, What can I do fix this issue
Error 1015: This error is typically caused by attempts to downgrade the iPhone, iPad, or iPod touch's software. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version is not supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple. This error can also occur when an unauthorized modification of the iOS has occurred and you are now trying to restore to an authorized, default state.
-
Cannot install update 9.0.3 in my Photoshop Elements 9. Getting error msg "Patch cannot be applied". How can I correct?
Nobody can know. You are not offering system info or otehr details. Start by uninstalling and reinstalling the base program.
Mylenium
Maybe you are looking for
-
What is the shortcut to snap to the cut point in premiere pro?
what is the shortcut to snap to the cut point in premiere pro?
-
OATS Load test is not able to scale for more than 10 users
Hi, I am using OATS load test runner for performance testing Fusion based application on webcenter portal.I am not able to run OATS load tester sucessfully for more than 10 VU's.After that it gives a component not found issue or loop error.Please let
-
Hi everyone! I am having a very poor battery life and I have a lot of apps, which I do believe its time to refresh the system so I thought about restoring my iPhone to a new iPhone, but I don't want to lose my contacts, they're very important; on my
-
Can anyone explain the significance of using Procurement Contract Terms from the end-user perspective?I mean, when and why is it used? We have a case where the client has different terms and conditions with different vendors (mostly for different ann
-
Why does my iPad add letters to the beginning of the first word in a sentence sometimes?
For example, if I begin a sentence with the word "I" it is often auto-corrected to "PICK", all caps.