Error on creation of PR using BAPI_PR_CREATE
Hello All,
while creating a PR using BAPI_PR_CREATE getting an error simultaneously a PR is creating
The error is Enter a G/L Account. Even when I am providing with the G/L Account number.
There is one input field as SERIAL_NO in tables PRACCOUNT and PRACCOUNTX. If I give SERIAL_NO as 00 in tables PRACCOUNT and PRACCOUNTX, then it gives the same error but and no PR is created but if i give 01 it gives the same error but and now PR is created simultaneouly .
Using the same details if I execute BAPI_REQUISITION_CREATE and SERIAL_NO as 00, the PR is successfully created.
Please let me know if anybody worked on it.
Thanks & Regards,
Ruchi Tiwari
Hi,
you just need to populate the following fields:
praccount-preq_item = '10'. <--- this depends on how many items you have in your PR.
praccount-serial_no = '1'. <--- this one is required, in case you split the qty of the item by G/L or Cost Center.
dont forget to populate the ff. fields in the Purchase Requisition Change Parameter - Account Assignment table.
praccountx-preq_item = '10'.
praccountx-serial_no = '1'.
Thanks & regards,
ShreeMohan
Similar Messages
-
Error during creation of datasource using BI publisher
Hi All,
I have installed BI publisher 10.1.3.4.2 from http://www.oracle.com/technetwork/middleware/bi-publisher/downloads/index.html for linux - 32/64.
I am able to see the reports under Reports tab in BI publisher. But need datasource to get actual data. During the creation of datasource, tried Driver -11, 10 and driver class oracle.jdbc.OracleDriver, oracle.jdbc.driver.OracleDriver but all the time error is coming -
[100512_022947829][][EXCEPTION] java.sql.SQLException: ORA-28040: No matching authentication protocol
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:277)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:243)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:304)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at oracle.apps.xdo.servlet.data.JDBCDataSource.testConnection(JDBCDataSource.java:268)
at oracle.apps.xdo.servlet.ui.admin.datasource.UpdateConnectionServlet.doConnectionTest(UpdateConnectionServlet.java:411)
at oracle.apps.xdo.servlet.ui.admin.datasource.UpdateConnectionServlet.doPost(UpdateConnectionServlet.java:151)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:100)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Not sure if I need to install or configure any other thing.
Please let me know how can I proceed?
Regards,
Sourabh
Edited by: 963380 on Oct 7, 2012 7:48 AMThe error is described here: http://oracledocs.shu.ac.uk/oracle/B28359_01/readmes.111/b28280/toc.htm#autoId36 , so talk to your DBA about setting the appropriate authentication protocol version.
-
Error whil creating Service Line item in ME51N using BAPI_PR_CREATE
Hi Experts,
Am able to create PR number using BAPI_PR_CREATE, but when am trying to create Service line item am getting acc assignment error please check my code and solve my issue. ..its very adj please help me .
DATA : t_bapimereqitemimp TYPE TABLE OF bapimereqitemimp ,
t_bapimereqaccount TYPE TABLE OF bapimereqaccount,
t_bapimereqaccountx TYPE TABLE OF bapimereqaccountx,
t_pritemx TYPE TABLE OF bapimereqitemx,
wa_bapimereqitemimp TYPE bapimereqitemimp,
pr_number TYPE bapimereqheader-preq_no,
wa_prheader TYPE bapimereqheader,
wa_prheaderx TYPE bapimereqheaderx,
wa_pritemx TYPE bapimereqitemx,
wa_bapimereqaccountx TYPE bapimereqaccountx,
wa_bapimereqaccount TYPE bapimereqaccount,
t_return TYPE TABLE OF bapiret2,
wa_return TYPE bapiret2.
DATA : t_bapi_srv_limit_data TYPE TABLE OF bapi_srv_limit_data,
wa_bapi_srv_limit_data TYPE bapi_srv_limit_data.
DATA servicelimitx TYPE TABLE OF bapi_srv_limit_datax.
DATA w_servicelimitx TYPE bapi_srv_limit_datax.
DATA : t_servicelines TYPE TABLE OF bapi_srv_service_line,
w_servicelines TYPE bapi_srv_service_line,
t_servicelinesx TYPE TABLE OF bapi_srv_service_linex,
w_servicelinesx TYPE bapi_srv_service_linex,
t_bapi_srv_acc_data TYPE TABLE OF bapi_srv_acc_data,
w_bapi_srv_acc_data TYPE bapi_srv_acc_data,
t_bapi_srv_acc_datax TYPE TABLE OF bapi_srv_acc_datax,
w_bapi_srv_acc_datax TYPE bapi_srv_acc_datax.
DATA : t_bapimereqitem TYPE TABLE OF bapimereqitem,
w_bapimereqitem TYPE bapimereqitem.
DATA : t_bapimereqitemx TYPE TABLE OF bapimereqitemx,
w_bapimereqitemx TYPE bapimereqitemx.
wa_prheader-pr_type = 'RV'."lv_doc_type.
wa_prheaderx-pr_type = 'X'.
wa_bapimereqitemimp-preq_item = '1'."wa_eban-item.
wa_bapimereqitemimp-pur_group = '100'."wa_eban-ekgrp.
wa_bapimereqitemimp-preq_name = 'E.R. TITTO'."wa_eban-afnam.
wa_bapimereqitemimp-short_text = 'AC Fitting'."wa_eban-txz01.
wa_bapimereqitemimp-material = ' '."wa_eban-matnr.
wa_bapimereqitemimp-plant = '1000'."wa_eban-werks.
wa_bapimereqitemimp-store_loc = 'ST00'."wa_eban-lgort.
wa_bapimereqitemimp-matl_group = 'Z13'."wa_eban-matkl.
wa_bapimereqitemimp-quantity = '1'."wa_eban-menge.
wa_bapimereqitemimp-unit = 'AU'."wa_eban-meins.
wa_bapimereqitemimp-deliv_date = '20140604'."wa_eban-lfdat.
wa_bapimereqitemimp-preq_price = '100'."wa_eban-preis.
wa_bapimereqitemimp-item_cat = 'D'."wa_eban-pstyp.
wa_bapimereqitemimp-acctasscat = 'K'."wa_eban-knttp.
wa_bapimereqitemimp-fixed_vend = ' '."wa_eban-flief.
wa_bapimereqitemimp-purch_org = '1000'."wa_eban-ekorg.
wa_bapimereqitemimp-currency = 'INR'."wa_eban-waers.
wa_bapimereqitemimp-pckg_no = '00000001'.
wa_bapimereqaccount-preq_item = '1'."wa_eban-item.
*wa_bapimereqaccount-serial_no = '01'.
wa_bapimereqaccount-gl_account = '0000002244'."wa_eban-sakto.
wa_bapimereqaccount-costcenter = 'OPSD'."wa_eban-kostl.
APPEND wa_bapimereqitemimp TO t_bapimereqitemimp.
APPEND wa_bapimereqaccount TO t_bapimereqaccount.
wa_pritemx-preq_item = '1'."wa_eban-item.
wa_pritemx-pur_group = 'X'.
wa_pritemx-preq_name = 'X'.
wa_pritemx-short_text = 'X'.
wa_pritemx-material = 'X'.
wa_pritemx-plant = 'X'.
wa_pritemx-store_loc = 'X'.
wa_pritemx-matl_group = 'X'.
wa_pritemx-quantity = 'X'.
wa_pritemx-unit = 'X'.
wa_pritemx-deliv_date = 'X'.
wa_pritemx-preq_price = 'X'.
wa_pritemx-item_cat = 'X'.
wa_pritemx-acctasscat = 'X'.
wa_pritemx-fixed_vend = 'X'.
wa_pritemx-purch_org = 'X'.
wa_pritemx-currency = 'X'.
wa_pritemx-pckg_no = 'X'.
wa_bapimereqaccountx-preq_item = '1'."wa_eban-item.
*wa_bapimereqaccountx-serial_no = '01'.
wa_bapimereqaccountx-preq_itemx = 'X'.
wa_bapimereqaccountx-serial_nox = 'X'.
wa_bapimereqaccountx-gl_account = 'X'.
wa_bapimereqaccountx-costcenter = 'X'.
APPEND wa_pritemx TO t_pritemx.
APPEND wa_bapimereqaccountx TO t_bapimereqaccountx.
**Service item limit
*wa_bapi_srv_limit_data-doc_item = '10'.
wa_bapi_srv_limit_data-overall_limit = '1000'.
wa_bapi_srv_limit_data-exp_value = '800'.
APPEND wa_bapi_srv_limit_data TO t_bapi_srv_limit_data.
*w_servicelimitx-doc_item = '10'.
w_servicelimitx-overall_limit = 'X'.
w_servicelimitx-exp_value = 'X'.
APPEND w_servicelimitx TO servicelimitx.
w_bapimereqitem-preq_item = '10'.
***w_bapimereqitem-preq_name = 'E.R. TITTO'.
***w_bapimereqitem-plant = '1000'.
***w_bapimereqitem-store_loc = 'ST00'.
***w_bapimereqitem-matl_group = 'Z03'.
***w_bapimereqitem-quantity = '1'.
***w_bapimereqitem-unit = 'AU'.
w_bapimereqitem-item_cat = 'D'.
w_bapimereqitem-deliv_time = '20140604'.
w_bapimereqitem-acctasscat = 'K'.
**w_bapimereqitem-consumpt = 'U'.
APPEND w_bapimereqitem TO t_bapimereqitem.
**w_bapi_srv_acc_data-doc_item = '1'.
**w_bapi_srv_acc_data-outline = '0000000001'.
*w_bapi_srv_acc_data-srv_line = '20'.
w_bapi_srv_acc_data-serial_no = '10'.
w_bapi_srv_acc_data-serial_no_item = 'D'.
*w_bapi_srv_acc_data-quantity = '1'.
*APPEND w_bapi_srv_acc_data TO t_bapi_srv_acc_data.
**w_bapi_srv_acc_datax-doc_item = '1'.
**w_bapi_srv_acc_datax-outline = '0000000001'.
*w_bapi_srv_acc_datax-srv_line = '20'.
**w_bapi_srv_acc_datax-serial_no = '01'.
**w_bapi_srv_acc_datax-serial_no_item = '01'.
*w_bapi_srv_acc_datax-quantity = '1'.
*APPEND w_bapi_srv_acc_datax TO t_bapi_srv_acc_datax.
w_servicelines-service = '00000001'.
APPEND w_servicelines TO t_servicelines.
w_servicelinesx-service = 'X'.
APPEND w_servicelinesx TO t_servicelinesx.
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
prheader = wa_prheader
prheaderx = wa_prheaderx
IMPORTING
number = pr_number
TABLES
return = t_return
pritem = t_bapimereqitemimp
pritemx = t_pritemx
pritemexp = t_bapimereqitem
praccount = t_bapimereqaccount
praccountx = t_bapimereqaccountx
servicelimit = t_bapi_srv_limit_data
servicelimitx = servicelimitx
servicelines = t_servicelines
servicelinesx = t_servicelinesx
serviceaccount = t_bapi_srv_acc_data
serviceaccountx = t_bapi_srv_acc_datax.Hi,
Check this Thread , Thread1 . It might help you to resolve the issue.
Thanks
KH -
Create a Service Purchase Requisition using BAPI_PR_CREATE
Hi Everyone,
I am using BAPI_PR_CREATE.
I am able to create Standard Purchase requisition.
But while creating Service Purchase Requisition, i am not able to create.
I am getting no errors for the PR Item, but even after entering Services for the PR Item i am getting error message in return table of bapi "Please Maintain Services or limits'.
Do i have to pass value to Package_No field in the item level table of BAPI_PR_CREATE.
Please help.
Regards,
AkashHi,
Check this link for creation of services.
Bapi_pr_change in services
PO Upload through BAPI_PO_CREATE1 - Problem in Service Item
BAPI_PO_CREATE1 Error
Hope it helps
Sujay -
Error in creation of Lead by Channel Manager
Hi All,
I created Channel Manger Portal for creation of Lead using blview=MKT_LEAD_M,BSP Application=CRM_BSP_FRAME and CRM Application=CRMD_BUS2000108.
It is working fine for search only.when i click on create button then no process is going and i am getting the following error message on the top of page:
"Erorr:Please select at least one entry to execute the function".
Please help me
kushalHi,
As the error message implies - you are trying to insert a record into a table with duplicate keys to a record that already exists.
You need to look further into the termination to determine which table it was failing on and then figure out why it was trying to insert a duplicate key entry. Find out if it is a standard or custom table and see if there is any custom code in user-exits or BADI's that might be causing it.
Thanks.
Ashok. -
Error in Creation of Object ID 00000000 is not allowed
Hi all,
When I am Hiring an employee using PA40, I am getting an error as "Creation of Object ID 00000000 is not allowed", when I save it.
In the NUMKR Feature, the return value has been assigned to the Personnel Sub Area.
Pls. can anybody explain, how can I solve this problem.
This is urgent requirement of client.
Thanks,
HR User.Hi Hr user
Now listen carefully.
1. If you have defined your feature NUMKR according to PSA then while running hiring action does PSA comes or it just gives you the Position, PA, EG and ESG fileds only.
2. If the first condition is true then you will get the error, now the question is why
Answer, you have defined the feature through PSA and once you try to save the IT0000 there is no PSA mentioned there thats why the system gives you the error.
If this explnanation is understood by you than reply , i will tell you how you can bring the PSA field also in hiring action at IT0000.
Do reply
Regards,
Bhupesh Wankar -
Error in creation PO for Asset
Hi All,
I am getting error while creation asset PO(Purchase Order)
here is the system error
G/L account 200200 cannot be used (please correct)
Message no. ME045
Diagnosis
Comparison of the field selection strings from the G/L account 200200 and the account assignment category A reveals that there is an incompatible combination of field selections for the field selection group 'Earmarked Funds'.
The G/L account field selection is stored in table T004F; that for the account assignment is stored in table T162K.
Procedure
Please enter a correct G/L account.
200200 is Asset aqcuisition gl
And also can you guide me what are the extra precausion need to take & configure for Creating Asset Purchase order
Thank you
AnilHi All,
1. One clarification, why Aquisition account effecting while creating PO?
2. the other issue, when I run Maintain GR/IR clearing account (Choose Logistics -> Materials Management -> Logistics Invoice Verification -> GR/IR Account Maintenance -> Maintain GR/IR Clearing Account)
I'm getting below error
For object RE_BELEG , number range interval 04 does not exis
Message no. NR751
Diagnosis
The database table NRIV has the delivery class 'C', i.e. the SAP default settings are only in client 000.
Procedure
Create the missing number range interval in customizing.
Thank you
Anil -
Error while creation of waste approval in waste management in EH&S
hi all,
while creating waste approval i got some error message when i am using the process status as released. The error message is
'Release status cannot be assigned to the waste approval 0000000010'
or tell me how to create a waste approval.
thanks
regards
sathish. RHi sathish,
waste approval can be created after business partner creation and assignment.
in transaction waa02, create generator, generation and disposal channel. then you select for which generation and disposal channel you want to create waste approval.
go to waste approval tab and give inputs like set status 01(in progress), authwasteappr number(plant_disposer_transporter), waste approval tyoe(0001), disposal doc type based on country eg for india (WD_IN), then validity period. press enter waste approval numer will be assigned internally.
then select the created waste approval and assign waste code, partners and disposal channel details.
This is the procedure to create waste approval. hope this will help you. if still error comes send your steps and screenshot to [email protected]
-Ram -
Creation of role using T-code PFCG in R/3
Hi Experts,
I have created a Role using PFCG inorder to give acess only to three T-codes(PZ09. PZ80,PZ88).
so i have created a role intially using PFCG and incorporated PZ09 tcode in it and assigend the Role to users in R/3. it is displaying the TCode(PZ09) in Portal.
Now again i have added PZ80 & PZ88 to the same Role in R/3, but now i am getting an error:
Infotype 0000 does not exist.
but whereas when i assign SAP_ALL they(PZ88 & PZ 80) are working fine.
Is they anything i can do so that i can avoid assigning SAP_ALL Profile to the users and eliminate the Error "Infotype 0000 does not exist.
Thanks Inadvance,
Regards,
SivaHi,
Thanks for your reply,
Creation of role using T-code PFCG in R/3
The above link has solved my issue, Thank you!
Regards,
Siva -
Hi!
I am using USERS_GEN to generate a user in organizational structure from an existing SU01 user. When I first did this it worked fine. After that we removed the user from the org.structure. Now when we try to generate it again from USERS_GEN we get the message "Error during creation of user....central person already exists".
When I look at that CP I see that is already exists. I need to create a position under an org. unit and I need the already created CP to be allocated to that position.
How do I do that?
Sincerely
Anders ÖhrlingHi
Which SRM version are you in ?
However you can delete the CP via Function module HR_CENTRALPERSON_DELETE but this central persons are stored in HRP1001 table .
regards
Muthu
Edited by: Muthuraman Govindasamy on Sep 9, 2008 12:56 PM -
Unable to create Service PR using BAPI_PR_CREATE
Hi Guys,
I am creating PRs using BAPI_PR_CREATE. I am able to create all type of PRs except Service.
I have tried passing additional data to structures servicelines, servicelinesx, serviceaccount, serviceaccountx, but still i could not able to create service PR successfully. Getting error message like 'In case of account assignmernt, please enter acc. assignment data for item'.
Please let me know what data I need to pass to get service PR created.
Thx in advance.Hi,
In order to create the Service PR you need to pass the list of services in a way similar to that in which they appear in the ESLL table i.e with the combination of the package number and the subpackage number and that option is not there in this bapi so either you need to activate the properties of the business function LOG_MM_CI_2 using the T-Code SFW5 or you need to use the
BAPI:- 'BAPI_REQUISITION_CREATE'
In which need to pass the following tables:-
REQUISITION_ITEMS
REQUISITION_SERVICES
REQUISITION_SRV_ACCASS_VALUES
The First table will contain the data relevant to the items that will be created in the PR.
The Second table will contain the Header and Item level data for each item defined in the previous table
Say for Example:-
Header Data You need to pass a Pack Number that could be any number I passed 1234 and then the sub package number will be the pack number + 1. Other fields that we need to pass are ext_line line_no and short_text.
ITEM DATA Here we need to pass the subpackNumber from the header data as the pack number
and the sub pack number will be left blank here at the item level and the other details like the qty and gross price and the activity number and others will be passed here.
So if there are multiple services( Say 5 ) in the single line item of a PR you should create a single header data and append that to the table REQUISITION_SERVICES and then you must create or get the item data 5 times one for each service and append all those to the same table REQUISITION_SERVICES.
Third Table This table will contain the account assignment data for the line items of the PR.
In Case of any issue do revert back and i will give you the test data.
<removed by moderator>
Regards,
Dev
Message was edited by: Thomas Zloch -
How to add components to a subcontract PR using BAPI_PR_CREATE
I am trying to use BAPI_PR_CREATE in SAP ECC 6.0 to create a Purchase Requisition with Item Category "L" (subcontracting) to be subcontracted to a vendor for repair. Normally, in ME51N, we would add components to the PR before creating it, but I can't see any way to do that with this BAPI, and the documentation doesn't say.
The result is an error with the following messages:
T ID NUM MESSAGE
E BAPI 001 No instance of object type PurchaseRequisition has been created. External reference: # 1
E ME 154 Not possible to determine any components
E ME 642 Subcontracting only possible with vendor
The error 154 (Not possible to determine any components) is the same message that would appear in ME51N if the components were not added for the repair.
The error 642 (Subcontracting only possible with vendor) is confusing because a valid vendor number is being supplied to the FIXED_VEND field in PRITEM and the equivalent field in PRITEMX is marked with X.
Any help would be greatly appreciated.Very late reply - but hoping it might help somebody in the future:
SAP Note 1489799 - ME 154: Creating subcontracting purchase requisition w/o BOM -
Create PR using BAPI_PR_create
Hi Friends,
Can any body send step by step procedure to create PR using BAPI.
Also when i try to create pr using bapi_pr_create , im getting following error.
T ID NUM MESSAGE
E ME 083 Enter Document Type
E BAPI 001 No instance of object type PurchaseRequisition has been created. External reference: # 5
E ME 083 Enter Plant
E KI 205 Cost accounting is not active in company code QP01
Regards,
JayaExample
TABLES:eban.
DATA: BEGIN OF itab OCCURS 0,
NO(5),
bnfpo LIKE eban-bnfpo,
bsart LIKE eban-bsart,
matnr LIKE eban-matnr,
lgort LIKE eban-lgort,
menge LIKE eban-menge,
bednr LIKE eban-bednr,
lfdat LIKE eban-lfdat,
TX(132),
END OF itab.
DATA :
prheader LIKE TABLE OF bapimereqheader WITH HEADER LINE,
prheaderx LIKE TABLE OF bapimereqheaderx WITH HEADER LINE,
PRITEMEXP LIKE TABLE OF BAPIMEREQITEM WITH HEADER LINE,
return LIKE TABLE OF bapiret2 WITH HEADER LINE,
pritem LIKE TABLE OF bapimereqitemimp WITH HEADER LINE,
pritemx LIKE TABLE OF bapimereqitemx WITH HEADER LINE,
PRITEMTEXT LIKE TABLE OF BAPIMEREQITEMTEXT WITH HEADER LINE.
DATA auxfilename LIKE rlgrap-filename.
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = 'C:\PRCREATE.TXT'
filetype = 'DAT'
IMPORTING
act_filename = auxfilename
TABLES
data_tab = itab.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
Using BAPI_PR_CREATE , but failed to overwrite the item short text
As I want to create PR items and rewrite the items' short text,
even if i have give the short_text some values ,
but it still to be the default value after the PR items created.
The following is main part of my program using BAPI 'BAPI_PR_CREATE' to create PR:
w_pritem-material = t_in-matnr.
perform frm_add_zero using w_pritem-material.
W_PRITEM-PREQ_ITEM = SY-TABIX.
w_pritem-preq_item = l_tabix.
perform frm_add_zero using w_pritem-preq_item.
w_pritem-acctasscat = t_in-knttp.
w_pritem-plant = t_in-werks.
W_PRITEM-STORE_LOC = '1003'.
w_pritem-quantity = t_in-menge.
w_pritem-SHORT_TEXT = t_in-txz01.
append w_pritem to t_pritem.
w_pritemx-preq_item = w_pritem-preq_item.
w_pritemx-material = 'X'.
w_pritemx-preq_itemx = 'X'.
w_pritemx-acctasscat = 'X'.
w_pritemx-plant = 'X'.
W_PRITEMX-STORE_LOC = 'X'.
w_pritemx-quantity = 'X'.
w_pritemx-SHORT_TEXT = 'X'.
append w_pritemx to t_pritemx.
call function 'BAPI_PR_CREATE'
exporting
prheader = w_prhead
prheaderx = w_prheadx
importing
number = l_prnum
tables
return = t_return
pritem = t_pritem
pritemx = t_pritemx
praccount = t_praccount
praccountx = t_praccountx
pritemtext = t_pritemtext
Ivan YangNow I try to use 'BAPI_REQUISITION_CREATE' to instead of 'BAPI_PR_CREATE'.
But it still fail , it always give a error message like that 'No direct postings can be made to G/L acct.'.
Pls note that the ACCTASSCAT is setted to be 'M' , and I am sure that all the data entries can generate a PR without problem
while using 'BAPI_PR_CREATE'.
Following is the main part of my program:
PR_ITEM-DOC_TYPE = T_in-BSART.
PR_ITEM-PREQ_ITEM = l_tabix.
perform frm_add_zero using PR_ITEM-PREQ_ITEM.
PR_ITEM-ACCTASSCAT = 'M' .
PR_ITEM-MATERIAL = t_in-MATNR.
perform frm_add_zero using PR_ITEM-MATERIAL.
if t_in-txz01 is not initial.
PR_ITEM-SHORT_TEXT = t_in-txz01.
endif.
PR_ITEM-QUANTITY = T_IN-MENGE.
PR_ITEM-DELIV_DATE = '20090801'.
PR_ITEM-PLANT = T_IN-WERKS.
PR_ITEM-PREQ_DATE = '20090801'.
APPEND PR_ITEM.
PR_ACCOUNT-PREQ_ITEM = PR_ITEM-PREQ_ITEM.
PR_ACCOUNT-G_L_ACCT = T_IN-SAKNR.
PR_ACCOUNT-SERIAL_NO = 1.
PR_ACCOUNT-CO_AREA = 'XXX'.
PR_ACCOUNT-PREQ_QTY = t_in-MENGE.
PR_ACCOUNT-sd_doc = t_in-vbeln.
perform frm_add_zero using PR_ACCOUNT-sd_doc.
PR_ACCOUNT-SDOC_ITEM = t_in-posnr.
perform frm_add_zero using PR_ACCOUNT-SDOC_ITEM.
APPEND PR_ACCOUNT.
CLEAR PR_ACCOUNT.
CLEAR PR_ITEM.
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
EXPORTING
SKIP_ITEMS_WITH_ERROR =
AUTOMATIC_SOURCE = 'X'
IMPORTING
NUMBER = l_prnum
TABLES
REQUISITION_ITEMS = PR_ITEM
REQUISITION_ACCOUNT_ASSIGNMENT = PR_ACCOUNT
RETURN = PR_RETURN
Ivan Yang -
Create service PR using BAPI_PR_CREATE
Hi experts,
I am trying to create service PR using BAPI_PR_CREATE, though i am a able to create a service PR with account assignment category = 'K'(i.e. cost centre), I am not ble to create PR with acc. assign. category = 'N' (i.e. network).
It gives me an error saying please entre operation/activity number, when i pass the activity number in the acc. assgn. data structure in the BAPI, it gives an error that the network XXX cannot be assigned with an the activity number.
As this BAPI is for ME51N, i do not understand why does it ask for an activity number.Can you please help.
RegardsSolved Using Item category 9 instead of D
Maybe you are looking for
-
I use iwires to connect macbook to lg tv to watch netflix.How do you increase screen size on rv.I have tried display settings ,but not working
-
Transaction happens twice.
Transaction happens twice. I need two files to demonstrate this File 1.) index.jsp <?xml version="1.0" standalone="no"?> <%@ page contentType="image/svg-xml" %> <svg > <text x="200" y="100" stroke="navy" >GPro</text> </svg> File 2.) public class Acco
-
Error when installing with pacman
yesterday i update my arch and now i cant install anything this is the error error: giblib: key "7F2D434B9741E8AC" is unknown error: error al realizar la transacción (paquete no válido o dañado) Ocurrieron errores, no se actualizaron paquetes any ide
-
Japan already seem to have the Creative ZEN V PLUS 8GB?when will the UK get this item? and at what cost ?
-
Apple Digital AV Adapter not working with iPod touch 4th gen.
it has worked before in the past, and still works with my iphone 4, however it has mysteriously stopped working with the ipod touch. anybody else have problems with this, if so, what helped? also, anyone know of any possible reasons as to why this w