- 浏览: 174246 次
- 性别:
- 来自: 成都
文章分类
Q: create New Sales Order using BAPI: BAPI_SALESORDER_CREATEFROMDAT2, but get the error message:Unpermitted combination of business object BUS2032 and sales doc. category H.
A:This is a shortcoming of this BAPI. If you look into the coding you will see that it call SD_SALESORDER_CREATE with restriction to business object 'BUS2032'.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
...
BUSINESS_OBJECT = 'BUS2032'
...
Now if you look into SD_SALESORDER_CREATE you will find the following routine call where the function module checks the valid combination of business object and sales document type (DOC_TYPE):
*
if business_object ne space.
perform i_check_type tables return
using sales_header_in
business_object.
endif.
*
if not return is initial.
exit.
endif.
In the routine you will find the function module that makes the check:
...
* 3. determine the businessobject *
CALL FUNCTION 'SD_OBJECT_TYPE_DETERMINE'
EXPORTING
I_DOCUMENT_TYPE = TVAK-VBTYP
IMPORTING
E_BUSINESS_OBJECT = US_OBJTYPE
EXCEPTIONS
OTHERS = 1.
IF US_OBJTYPE NE BUSINESS_OBJECT.
PERFORM ERROR_PROCESSING TABLES US_RETURN
USING 'E'
'V1'
'761'
BUSINESS_OBJECT
TVAK-VBTYP
SPACE
SPACE.
ENDIF.
ENDFORM.
If you call this function module with I_DOCUMENT_TYPE = 'H' it will return 'BUS2102' as allowed business object.
To overcome the problem with BAPI_SALESORDER_CREATEFROMDAT2 simply call the (RFC-enabled) function module <b>SD_SALESORDER_CREATE directly.</b>. Leave the IMPORTING parameter BUSINESS_OBJECT empty since it it optional.
A:This is a shortcoming of this BAPI. If you look into the coding you will see that it call SD_SALESORDER_CREATE with restriction to business object 'BUS2032'.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
...
BUSINESS_OBJECT = 'BUS2032'
...
Now if you look into SD_SALESORDER_CREATE you will find the following routine call where the function module checks the valid combination of business object and sales document type (DOC_TYPE):
*
if business_object ne space.
perform i_check_type tables return
using sales_header_in
business_object.
endif.
*
if not return is initial.
exit.
endif.
In the routine you will find the function module that makes the check:
...
* 3. determine the businessobject *
CALL FUNCTION 'SD_OBJECT_TYPE_DETERMINE'
EXPORTING
I_DOCUMENT_TYPE = TVAK-VBTYP
IMPORTING
E_BUSINESS_OBJECT = US_OBJTYPE
EXCEPTIONS
OTHERS = 1.
IF US_OBJTYPE NE BUSINESS_OBJECT.
PERFORM ERROR_PROCESSING TABLES US_RETURN
USING 'E'
'V1'
'761'
BUSINESS_OBJECT
TVAK-VBTYP
SPACE
SPACE.
ENDIF.
ENDFORM.
If you call this function module with I_DOCUMENT_TYPE = 'H' it will return 'BUS2102' as allowed business object.
To overcome the problem with BAPI_SALESORDER_CREATEFROMDAT2 simply call the (RFC-enabled) function module <b>SD_SALESORDER_CREATE directly.</b>. Leave the IMPORTING parameter BUSINESS_OBJECT empty since it it optional.
发表评论
-
DISABLE button(FCODE) from the GUI-Status
2014-08-04 15:54 6321. Goto-> Attributes->Pus ... -
Handy SAP function module to automate user events
2013-11-28 09:49 751*Begin-Auto triggers ENTER comm ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 818FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 743FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
Function Module: get all users who have specific role
2013-01-25 14:16 676CALL FUNCTION 'RSRA_USERS_O ... -
Create a SELECT-OPTIONS in a module pool screen
2012-03-07 15:35 1026source:http://abap-explorer.blo ... -
Converting OTF data from script to Spool Request
2012-03-06 17:25 0source:http://forums.sdn.sap.co ... -
Calculate the days, months and years between 2 dates.
2012-02-21 16:14 835FORM compute_2date_diff. DAT ... -
Retrieving Domain fixed values
2012-02-16 11:13 811source:http://www.saptechnical. ... -
If 1 equals 2, what’s the purpose?
2012-02-16 10:59 836source:http://sapport.blogspot. ... -
get status name for batch input session
2012-01-31 14:47 922Line 601 in program SAPMSBDC_CC ... -
create zip folder with cl_abap_zip
2011-12-05 18:11 1208REPORT ztest. DATA: gv_file ... -
MIRO
2011-11-29 10:39 2064from: http://help-sap.blogspot. ... -
Create Vendor or Customer_master Data
2011-11-23 16:22 2920To Create or Change Vendor_mast ... -
Pay attention to the following points when using append structures
2011-10-27 13:43 1309You cannot create append str ... -
Help Views
2011-10-20 10:46 737source:http://help.sap.com/saph ... -
What is the Different Types and Usage of Views
2011-10-19 23:06 847source:http://www.sap-img.com/a ... -
Upload a Comma Delimited CSV file that contains commas in data
2011-09-23 17:22 2233source:http://wiki.sdn.sap.com/ ... -
What is the difference between SET SCREEN and CALL SCREEN ?
2011-09-19 21:50 763source:http://www.saptechies.co ... -
cl_gui_frontend_services=>file_open_dialog
2011-09-09 09:21 1419CALL METHOD cl_gui_frontend_ser ...
相关推荐
可以用来解决VC不包含stdint.h头文件问题,网上下载的很多工程项目经常使用的两个头文件inttypes.h stdint.h,将头文件放到(以VS2008为例):C:\Program Files\Microsoft Visual Studio 9.0\VC\include(装在C盘时...
双柱图 和 折线图 的组合图表#Combination chart of 2-column and line chart.twbx
Work with a combination of access modifiers, prefixes, properties, fields, attributes, and local variables to encapsulate and hide data Master DOM manipulation, cross-browser strategies, and ES6 ...
Developers who are familiar with writing traditional software applications and want to broaden their understanding of concepts in order to include BI fall into this category. Some may have never ...
- **Integration of Linear and Nonlinear Methods**: One of the unique aspects of the book is its detailed coverage of both linear and nonlinear techniques. This approach provides readers with a broader...
The combination of hardware, software, and networking capabilities in digital devices has transformed how we communicate, work, and entertain ourselves. 3. Digital Data Representation In digital ...
We were concerned that the development of business analysis, and the inroads made in appreciating the benefits it can offer, were in danger of being eroded if agile was adopted by organisations and ...
Focus is on creating the right combination of scalability, high-availability, backup and recovery, integrity, and resource control. The book covers everything from simple to enterprise-class ...
MySQL and Perl for the Web provides a much-needed handbook for database and Web developers seeking an extensive and detailed guide for using the combination of MySQL and Perl to build dynamic and ...
5.4.8. Redefining Classes and Changing the Class of Instances 5.4.9. Extending CLOS Using the Metaobject Protocol 5.4.10. Performance Considerations 5.4.11. Summary of CLOS Operators Part V—...
ance of a vehicle is primarily ... The process involves a combination of art and science, with continuous testing and refinement to create the perfect harmony between a vehicle's chassis and its dampers.
"In this thoroughly revised edition, Jos and Anneke offer a concise, pragmatic, and pedagogic explanation of the Object Constraint Language (OCL) and its different applications. Their discussion of ...
regardless of bus type Fits on a diskette for easy transportability and quick downloads Drag and drop captured data to other products in html format<br> Save captured data to a text ...
basedonNIOshavebeentheobjectofresearchsincesomedecadesandtheimportanceofthissubject iswidelyrecognized.Inordertoapplyanaturedinspiredalgorithm,...
In conclusion, the design and implementation of the "Dudu" plush doll sales website based on HTML5 involve a combination of technical skills, creative design, and user-centric thinking. By leveraging ...
This combination ensures efficient data handling and user-friendly interactions. Testing is carried out to verify the system's functionality, identifying and rectifying any bugs or issues. The ...
结合先验知识,学习贝叶斯网络的文档,可以看看
The combination of technology and cultural heritage creates a unique digital platform that connects travelers with the rich tapestry of history and traditions in the region. In conclusion, the ...