Problem in Billling doc creation
Hi experts,
When creating a billing doc for service item category "TAD", I have set the necessary copy control from Delivery doc type LF to a billing doc type.
But I hit the message, "The doc is not relevant for billing..".
Can you let me know if something is missing in Config?
Rgds,
Pri
I could see both copy control set for Sales to Billing as well as Delivery to Billing.
When I tried with Sales Order number, I could create the billing doc now.
But when I try to use Delivery number, it gives error.
However I could see the config in IMG for Delivery to billing.
Pls advise.
Rgds,
Pri
Similar Messages
-
BAPI - Problem in Sales order creation
Hi Friends,
I have problem in Sales order creation using BAPI ,I am getting a messsage - Error in creating document ,I have sent the code along with this mail ,can you help it out.
Code:
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'.
ENDIF.
Regards,
Dineshwhat messages u are gettting in RETURN ? Please check the RETURN tables data.
[code]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.
Regards
Prabhu -
Problem in Purchase Requisition Creation
Dear Experts:
We are facing a problem while purchase requisition creation. We have created an Internal order No. 600406 and an Asset in Company Code AB01 but while creation of Purchase Requisition level when we are selection that Order and Asset in Purchase Requisition system automatically changing my Order no. 600020 instead of 600406. I've checked OKB9 where Order no. maintained as 600020 against Company code AB01 which I deleted and save but after that Purchase requisition asking for Order Number that means we have to maintain Order number in OKB9. Now can you please advise how can we get my current order number in requisition instead of any default number.
Thanks in advance and your kind suggestion is highly appreciated.
Best Regards.
Ripon Kumar PaulPlease find attached screen shots of OME9
-
Problem In time of creation wprk Scheduled...
Hi...
I have faced a problem in time of creation work scheduled, it is displaying a error massage like " Error while accessing public holiday calender on 20100101".
Can anybody help me to resolve the problem....
with regards,
DiptenduHi Diptendu,
I believe you are creating work schedule rule for the year 2009. So for this, u need to mandatorily generate holiday calendar upto Jan 2010.
This is because in order to generate workschedule rule for Dec2009, holidays in the holiday calendar should be assigned atleast in the month of Jan 2010 and then generate the holiday calendar upto Jan 2010. So the dates for generating holiday calendar would be 2009-2010
Hope this would solve ur issue.
Thanks. -
Problem in process order creation.
Dear Sir/ Madam
i am facing a problem while process order creation.
the problem is:
Error when calculating cost for order ATFEDEC11 "see log Log is deleted when saving
Do you still want to save?"Hi,
The log for production order preliminiary costing is not saved. Therefore, once the order is saved, there is no log available anymore (this is by the way a question of PP; none of the logs is saved).
Hope that helps...
Regards,
Declan -
PROBLEM IN CUSTOM IDOC CREATION
Hi Friends,
I'm facing a problem in custom idoc creation plz try to assist me
1.As per the information i have i'm creating segment in we31
for cremas01 idoc.But when i enter the name for segment i'm getting message "Name range Voilation particular name which i had given is not permitted in customer system?
Plz clarify this,and are there any formalities which i should look for before creating custom idoc?
Good answers will be rewarded.
Regards,
Vinod.The Problem might be.... with the naming of the segment.
Standard segments should be created with 'E1' and all the custom segments are created using 'Z1' and the name with 8 characters long only is permitted.
Reward Points if useful. -
Problem in billing doc release to finance
Hi All,
When i am doing billing doc relese to finance i am getting below error kindly suggest what is the problem.
Incorrect doc.no.: 93000000. Select document number between 0090000000 and 0090999999
Message no. F5151
Diagnosis
The document number you specified, "&v1", is not in the appropriate number range. The number range is dependent on the document type.
The exception to this rule is formed by recurring entry documents, which must use number range 'X1' and sample documents, which must use number range 'X2'.
Possible reasons for this error message are:
You have entered an incorrect document number.
An incorrect document number was transferred to this application during an update from another application (e.g. CO).
System Response
The document cannot be processed any further.
Procedure
Enter a document number that is within the specified number interval.
If this error was caused by an update from another application, check the type of number assignment in that application (external or internal?) as well as the document number transferred.
Example
In the CO settlement profile, a document type with external number assignment was entered, whereas an internal document number was transferred.Hi Sudha,
I guess that you have kept the no. ranges in SD and FI same for the Billing document.
So you must have ticked External in FBN1 for RV document type.
But What I think could be the issue is that the no. range maintained in SD and in FI is not matching.. it has to be same.. so check in SD what no. range is assigned and then check in FI in FBN1, what no. range you have assigned for RV and whether you have external tick there.
Regards,
SAPFICO -
Problem in DB Link creation of Oracle Wraehouse Builder 3i - Updated question
I am facing a problem in DB Link creation.
Backend: Oracle 8i Server on my machine
DW Software: Oracle warehouse builder 3i ( client , repository
asistant.....)
Operating system: Windows NT 4 SERVICE PACK 6
I wants to use the scott database( default database given by oracle )
as my input source.
How can I create the DB LINK ( for scott database) ?
How can I create the DB LINK ( for any other database) ?
Should I need to add anything in Setting of"ODBC DATASOURCE
ADMINISTRATION"
==================
Settings done:
==================
DB Link Name :prashant
Host name
Host name: my machine's ip address
port number: 1521
oracle sid: prashant ( my oracle sid)
user name:scott
password:tiger
==================
Gives error:
==================
Testing...
Failed.
Cwm Error Message: Failed in the WBAPIFactory.createDBLink()
Cwm Error: SQL Exception
Class Name: oracle.wh.ui.integrator.common.RepositoryUtils
Method Name: createDBLink(String, String, String, String)
Method Name: -1
Repository Error Message: java.sql.SQLException: ORA-02082: a loopback database link must have a connection qualifier
==================
==================
How should I proceed further.
I am expecting URGENT FEEDBACK.
Reply me on : [email protected] or this OTN Network
From
PrashantI solved the problem.
Procedure I followed :
UNINSTALL ORACLE WRAEHOUSE BUILDER SOFTAWARE.
'GLOBAL_NAMES = FALSE' in init.ora file.
RESTARTED MY MACHINE.
INSTALL THE ORACLE WRAEHOUSE BUILDER SOFTAWARE. -
Problem in DB Link creation ( Oracle warehouse builder 3i )
I am facing a problem in DB Link creation.
Backend: Oracle 8i Server on my machine
DW Software: Oracle warehouse builder 3i ( client , repository asistant.....)
Operating system: Windows NT 4 SERVICE PACK 6
I wants to use the scott database( default database given by oracle ) as my input source.
How can I create the DB LINK ( for scott database) ?
How can I create the DB LINK ( for any other database) ?
Should I need to add anything in Setting of"ODBC DATASOURCE ADMINISTRATION"
==================
Settings done:
==================
DB Link Name :scott
Host name
Host name: my machine's ip address
port number: 1521
oracle sid: prashant ( my oracle sid)
user name:scott
password:tiger
==================
Gives error:
==================
Testing...
Failed.
ORA-02085 Database link %s connects to %s
*Cause: a database link connected to a database with a different name.
The connection is rejected.
*Action: create a database link with the same name as the database it
connects to, or set global_names=false.
Please change it to false by doing :
first option:
Log in the database with DBA privilege and use the command:
alter system set GLOBAL_NAMES = false
second option:
Change the GLOBAL_NAMES to false in database system parameter file, init.ora
==================
Options tried:
==================
1. I tried to change GLOBAL_NAMES = false but still not able to create the DB LINK.
2. As per suggestion of one the friend
"A file named "Logon.Properties" under the directory $OWB_HOME/wbapp
in this file please set the property
OWBSingleUserLockUsage = false"
I tried the same but it is still not working.
How should I proceed further.
I am expecting URGENT FEEDBACK.
Reply me on : [email protected]
From
PrashantI solved the problem.
Procedure I followed :
UNINSTALL ORACLE WRAEHOUSE BUILDER SOFTAWARE.
'GLOBAL_NAMES = FALSE' in init.ora file.
RESTARTED MY MACHINE.
INSTALL THE ORACLE WRAEHOUSE BUILDER SOFTAWARE. -
Stop the Billing Doc creation for error confirmation
Hello Experts,
This is regarding the Billing issue.
Our Service Process: We create the Service Process and also create the followup confirmations.
For ex: I have created one SP and also created one followup two confirmations.
The second Confirmation contained an error and it has generated Billing Document
Actually The bill should not be generated until all confirmation contain no error and only one billing document should be generated per Service Call.
Could you help to stop ,the Billing Doc creation for Error Confirmations?
Regards
MadhuCheck the following thread: KEPM valuation K/(834) No standard cost estimate could be found for mat.
Shail -
T-codes for accrual doc creation and posting
Hi,
Anyone knows the T-codes for accrual doc creation and posting?
Thanks,
CWHi,
Try with T Codes:
FBS1 - Enter Accrual/Deferral Document
F.81 - Reverse Accrual/Deferral Document
Thanks
Chandra -
Delivery doc creation for a selected line item of the Sales order
Hi folks,
Can any one help me in how to create a delivery order for a selected line item of the Sales order.My requirement is the request comes from the web browser where a sales document and details of the items are shown the user select one line item and request for delivery create of that particular SO doc.I have used couple of FM to create delivery but the delivery create is depend on the schedule line dates so iam unable to figure out where exactly i can distinguish between the line items.
Example:
SO:- 11193645
Line item -1 has 2 schedule line 06/11
06/13
Line iteam-2 has 1 schedule line 06/12
so if i try to create Delivery doc for date 06/12
it creates partially for line 1 and line 2.
but my requirement is i wanted to create SO for only line item 1 as i wanted to process Del Doc for only line item 1.
If you have any idea please help me.hi ,
You can develop a customised FM to process the Idoc data .
1. Read the Idoc data into internal table for the line items which need to be delivered .
2. Run BDC for transaction 'VL01N' ( delivery creation ) through which eliminate the line items which are not in internal table and save the delivery document
Note : Because in VL01N , you specify the sales document with respect to which you want to perform delivery hence automatically all items are copied to the delivery document .
During BDC recording , select items by " MOVING TO TOP"
and then deleting the selected item
If you face problem in BDC recording , i can help u that too . -
Problem with SLD and Creation of JCo
Hello everyone!
I have a problem with the SLD and the Creation of JCo on the Portal, in trying to create the JCo always tells me that the name used there in the SLD, being that the facility is new.
Who performs the installation, set in the SLD the ECC 6 PRD, delete it to see if I could create a JCo but still the error again when creating the ECC 6 PRD in the SLD I said that already exists and can not create it.
I found a forum which recommended re-import the cimsap .... .... zip and zip CR_Content which would clean everything, I managed to import the zip cimsap ... but in trying to raise CR_Content gives me the following message "All incremental updates of the selected aggregate import for export SAP_CR line have already been loaded before. You require a newer import to update your current content SAP_CR version 4.11." .
I recommend, do the installation again, reload the cimsap.zip and CR_Content.zip a copy homogeneous.
from already thank you very much
Text of error to create JCo destination
Failed to process request. Please contact your system administrator.
[Hide]
Error Summary
While processing the current request, an exception occured which could not be handled by the application or the framework.
If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
Root Cause
The initial exception that caused the request to fail, was:
java.lang.NullPointerException
at at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.checkStatus(SystemLandscapeFactory.java:991)
at at com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscape.checkStatus(WDSystemLandscape.java:469)
at at com.sap.tc.webdynpro.tools.sld.ButtonBar.onActionGoForward(ButtonBar.java:505)
at at com.sap.tc.webdynpro.tools.sld.wdp.InternalButtonBar.wdInvokeEventHandler(InternalButtonBar.java:280)
at at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
... 28 more
See full exception chain for details.
System Environment
Client
Web Dynpro Client Type HTML Client
User agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; InfoPath.1)
Version null
DOM version null
Client Type msie7
Client Type Profile ie6
ActiveX enabled
Cookies enabled
Frames enabled
Java Applets enabled
JavaScript enabled
Tables enabled
VB Script enabled
Server
Web Dynpro Runtime Vendor: SAP, build ID: 7.0017.20081210091801.0000 (release=NW04S_17_REL, buildtime=2009-01-12:09:43:27[UTC], changelist=52884, host=pwdfm114), build date: Tue Apr 28 19:28:39 CLT 2009
J2EE Engine 7.00 patchlevel 48199.450
Java VM IBM J9SE VM, version:2.2, vendor: IBM Corporation
Operating system Linux, version: 2.6.18-92.el5, architecture: amd64
Session & Other
Session Locale en
Time of Failure Fri Aug 28 11:43:53 CLT 2009 (Java Time: 1251474233677)
Web Dynpro Code Generation Infos
sap.com/tcwdtools
No information available null
sap.com/tcwddispwda
No information available null
sap.com/tcwdcorecomp
No information available null
Detailed Error Information
Detailed Exception Chain
java.lang.NullPointerException
at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.checkStatus(SystemLandscapeFactory.java:991)
at com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscape.checkStatus(WDSystemLandscape.java:469)
at com.sap.tc.webdynpro.tools.sld.ButtonBar.onActionGoForward(ButtonBar.java:505)
at com.sap.tc.webdynpro.tools.sld.wdp.InternalButtonBar.wdInvokeEventHandler(InternalButtonBar.java:280)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(AccessController.java:207)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)Hello!!
The "SLD" with which I am working up to Portal, the "ECC" installs itself as "ABAP.
Who did the installation and initial configuration, do not leave any documentation about it.
Now I need to create the systems and "JCo" necessary to enable them to implement the "ESS", but errors are presented above.
Some days ago I managed to update the CR_Content, which allowed me to create the "JCo" but at the time of the test, says' com.sap.mw.jco.JCO $ Exception: (103) RFC_ERROR_LOGON_FAILURE "name or password incorrect .
I managed to also create the portal systems, "System Administration -> System Configuration -> Content Portal" and to test it fails on "Test Connection with Connector", which as noted is associated with the connectors "JCo".
For the creation of the system, I think I should create something in the Visual Administrator ", but within the documentation that I do not see anything about it.
thanks for your help! -
Problem with Change Doc BANF for BUS2009
Hi,
The scenario of mine is to trigger the REJECTION_STOP event of BUS2009 when a PR rejection is cancelled for that I am using Change documents.
I have created an entry in SWEC for change doc object BANFand BO BUS2009- REJECTION_STOP.
The problem is the Event Container is not getting filled and bcoz of that Workflow is going on error.When I see the Workflow log in SWi1 I can't find the values for my WF container element BUS2009.
Do I have to explicitly fill the Event container in my case.If so how to do that
Kindly suggest....Hi,
Please Check all Binding Parts...that is the Problem over there..
Go to SWUE enter ur Object and Event and check in SWEL and in ur Inbox.
Thanks and Regards,
Prabhakar Dharmala -
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
Maybe you are looking for
-
Iview Isolation Modes Question
I have some strange situation here. I have a page that contains one embedded iView and 3 isolated url iViews. When I try to use client side eventing to communicate between two url iViews. Said : URL Iview "1" raiseEvent "A" , and only URL Iview B sub
-
But how to use submit??
but how to use submit?? i mean how to generate an event thru submit and how to receive these values in the next page
-
I've just brought myself a new MacBook Pro from a friend I have no idea how to use them I YouTube how to reset a MacBook Pro I done everything all we'll In till you reinstall then it say "this disk is locked"??? Can anyone help me please
-
What do I need to develope an iOS app?
Hello everyone Many Many and Many days I think about making apps for iOS and I have great ideas too But I have a huge problem and some good potentials too I want someone help me and tell me how to start making apps for iOS I know its not going to be
-
I'm trying to generate a list of vendors that we have made payment to within a time period. The list structure of my design is correct - line 1 = fiscal year (BKPF-GJAHR), with subsequent lines of vendor (LFA1-LIFNR) and name 1 (LFA1-LIFNR). Select