BAPI_PO_CREATE1 not able to create PO's for multiple rows from the flat fil
Hi
i am uploading PO's from a flat file into SAP using the BAPI_PO_CREATE1. Everything works fine if the flat file hast only one record.
if the flat file has more than one record then while loading the second record the BAPI returns a error message. I am calling the BAPI in a loop.
The strange thing is that if i load the second record individually the program is able to create the PO. So only when i have multiple records in the flat file i am unable to load the PO into SAP. I debugged and checked all the internal tables passed to the BAPI. All seems to have the data correctly but still the BAPI fails.
any idea where i am going wrong?
the code looks something like this.
LOOP AT HEADER_ITAB.
PERFORM FILL_HEADER_RECORDS.
LOOP AT ITEM_ITAB WHERE EBELN eq HEADER_ITAB-EBELN.
PERFORM FILL_ITEM_RECORDS.
ENDLOOP.
PERFORM CERATE_PO_VIA_BAPI.
ENDLOOP.
What is the error message. Are you trying something like this:
LOOP AT T_DATA1.
AT NEW LIFNR.
READ TABLE T_DATA1 INDEX SY-TABIX.
PERFORM INIT_TABLES.
PERFORM FILL_DATA.
--Call the BAPI to create PO
PERFORM CREATE_PO.
ENDAT.
ENDLOOP.
FORM CREATE_PO .
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = POHEADER
POHEADERX = POHEADERX
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPPURCHASEORDER = EXPPURCHASEORDER
EXPHEADER = EXPHEADER
EXPPOEXPIMPHEADER = EXPPOEXPIMPHEADER
TABLES
RETURN = RETURN
POITEM = POITEM
POITEMX = POITEMX
POADDRDELIVERY =
POSCHEDULE = POSCHEDULE
POSCHEDULEX = POSCHEDULEX
POACCOUNT = POACCOUNT
POACCOUNTPROFITSEGMENT =
POACCOUNTX = POACCOUNTX
POCONDHEADER =
POCONDHEADERX =
POCOND = POCOND
POCONDX = POCONDX
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM = POTEXTITEM
ALLVERSIONS =
POPARTNER = POPARTNER
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = RETURN1.
DATA: L_NAME TYPE LFA1-NAME1.
CLEAR L_NAME.
SELECT SINGLE NAME1
FROM LFA1
INTO L_NAME
WHERE LIFNR = POHEADER-VENDOR.
LOOP AT RETURN.
WRITE : / RETURN-TYPE,
RETURN-ID,
RETURN-MESSAGE.
WRITE : '--> For vendor:',
POHEADER-VENDOR,
L_NAME.
ENDLOOP.
ENDFORM. " CREATE_PO
Similar Messages
-
Not Able to create ODBC Connections to AS400 DB2 from OWB 11g
Hi,
Currently i am in the process of setting up of database connections to AS400 DB2 Database from Oracle Warehouse Builder 11g.
I installed Oracle 11.1.0.6.0 and upgraded to 11.1.0.7.0.
I am able to create database links manually but not able to create using oracle warehouse builder.
The error i am getting error
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[IBM][Client Access Express ODBC Driver (32-bit)][DB2/400 SQL]SQL7973 - SQL create package for DG4ODBCFBA in REMOTEDB has failed.
ORA-02063: preceding 2 lines from OWB_82
I am trying different methods from the last 2 days.
Please help me in this situation.
Thanks.
Salih KMMy Http server port is 7777. used that , it doesn't work. Using 7101(admin server port) also doesn't work.
Testing JSR-160 Runtime ... failed.
Cannot establish connection.
Testing JSR-160 DomainRuntime ... skipped.
Testing JSR-88 ... skipped.
Testing JSR-88-LOCAL ... skipped.
Testing JNDI ... skipped.
Testing JSR-160 Edit ... skipped.
Testing HTTP ... success.
Testing Server MBeans Model ... skipped.
1 of 8 tests successful.
Both the cases only HTTP is success.
Thanks
Manish -
Search for a word and return all the lines (row) from the text file..
Hi all,
I need a help on how to search a string from the text file and returns all the lines (rows) where the searched string are found. I have included the code, it finds the indexof the string but it does not return the entire line. I would appreciate your any help.
public class SearchWord
public static void main(String[] args){
//Search String
String searchText = "man";
//File to search (in same directory as .class file)
String fileName = "C:\\Workspace\\MyFile.txt";
//StringBuilder allows to create a string by concatinating
//multiple strings efficiently.
StringBuilder sb =
new StringBuilder();
try {
//Create the buffered input stream, which reads
//from a file input stream
BufferedInputStream bIn =
new BufferedInputStream(
new FileInputStream(fileName));
//Holds the position of the last byte we have read
int pos = 0;
//Holds #of available bytes in our stream
//(which is the file)
int avl = bIn.available();
//Read as long as we have something
while ( avl != 0 ) {
//Holds the bytes which we read
byte[] buffer = new byte[avl];
//Read from the file to the buffer
// starting from <pos>, <avl> bytes.
bIn.read(buffer, pos, avl);
//Update the last read byte position
pos += avl;
//Create a new string from byte[] we read
String strTemp =
new String(buffer);
//Append the string to the string builder
sb.append(strTemp);
//Get the next available set of bytes
avl = bIn.available();
catch(IOException ex) {
ex.printStackTrace();
//Get the concatinated string from string builder
String fileText = sb.toString();
int indexVal = fileText.indexOf(searchText);
//Displays the index location in the file for a given text.
// -1 if not found
if (indexVal == -1)
System.out.println("No values found");
else
System.out.println("Search for: " + searchText); }
}Hi, you can use servlet class and use this method to get the whole line of searched string. You can override the HttpServlet to treat that class as servlet.
public class ReportAction extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//write your whole logic.
BufferedReader br = new BufferedReader(new FileReader("your file name"));
String line = "";
while(line = br.readLine() != null) {
if(line.contains("your search string")) {
System.out.println("The whole line, row is :"+line);
} -
Need to create sale order from the flat file & mail has to be sent
Hi Experts,
I have a requirement to create a sale order from a flat file and once the oder is created, mail has to be sent to customer as well as to internal user with the order details. I want to know how this process can be implemented and what adapters are needed to execute this.
it would be very helpful, if i get an step-by-step procedure.
Points assured for any helpful answers.
Thanks in Advance
JaiHI Jai,
You need to create two interfaces as file will be sending the Sales oreder details that you need to capture in IDOC or RFC and then have to trigger to create the sales order. For this Standard BAPIs are also available.
These RFC or BAPIs will response with Sales order details that you need to divert to Mail adapter with the use of BPM and also have to go for Async to Sync bridge.
File -
>XI (BPM) ---> BAPI/RFC (Request)
MailAdapter <- XI (BPM) <--- BAPI/RFC (Response)
For this refer below links for step by step
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] - File to Mail
/people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm - Walk through BPM
/people/siva.maranani/blog/2005/05/22/schedule-your-bpm - Schedule BPM
/people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi - Use of Synch - Asynch bridge in ccBPM
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken] - Use of Synch - Asynch bridge in ccBPM
If you will use IDOC then In IDOC inbound processing you need to trigger for Sales order creation and then have to send the Sales Order generated IDOC as an Outbound to Mail Adapter
Flat file -
> XI ---> IDOC
IDOC -
> XI ---> Mail
This will be bit easy scenario to develope as compare to using BAPI with BPM
/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping - Any flat file to any Idoc
configuring IDOC-XI-Mail scenario using following web-log:
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
/people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u - Triggering Email from folder
Thanks
Swarup -
Not able to created Number Ranges for Asset Classes in AS08
Dear Friends,
I am not able create Number Ranges for Asset Classes in AS08.
It is giving me an error message as company code does not exist.
When I Check Consistency under path SPRO -> Financial Accounting -> Asset Accounting -> Preparing for Production Startup -> Check Consistency -> Overview Report: Company Codes. I am getting the following
RSOL Reliance Sealink One PLtd
CoCode no. alloc. NKTR
Fiscal Year Variant V3 Apr.- March, 4 special periods
Start 2nd half month 00
Transfer date 31.03.2006
Chart of dep. TOLL Chart of Depreciation - For Highway Projects
Net worth tax 01 Book depreciation as per Compinies Act 1956
Enter net book value
Status company code 2
Current fiscal year 2007
Doc. type dep. pstng AF Dep. postings
> Number range &1 in co.code &2 for doc.type &3 must be defined as internal
Calc.insur.value
Input tax exempt
If you see the above first two line you will find the difference is that Company code RSOL in the first line and NKTR company code in the second line.
Actually CoCode no. alloc. has been wrongly copied as NKTR while copying CoCode it should be RSOL and not NKTR.
I think because of this wrong allocation it is giving me an error in AS08. Also it is not showing me CoCode in drop down list in AS08.
Please help me to resolve the problem.
Thanks
Rahul JainLook in TC OAOB if the company code is assigned to a chart of depreciation
-
Hi,
I am trying to create a SQL server database, but are not able to. I get this message: The operation is not supported for your subscription offer type.
I have to azure accounts and this is only happening in one of them.
I have created a subscription, but I can see that I have 1250 NOK in credit that is expiring in 29 days.
Regards
Christian
ChristianLLoydHi Christian,
The error you saw should only occur for a subscription used with a free trial offer type. Please use the below link to open a support ticket.
http://azure.microsoft.com/en-us/support/options/
You can check the following links for similar issues.
The operation is not supported for your subscription offer type
Could not submit the request to create database
DBNAME. The operation is not supported for your subscription offer type
Thanks,
Lydia Zhang
If you have any feedback on our support, please click
here.
Lydia Zhang
TechNet Community Support -
How to create send connectors for multiple sites in the same domain?
Current Scenario:
We have 2 offices, 1 in London and 1 in India. Both are in the same domain and are connected via VPN. Both have their own separate Exchange 2003 server. Each location sends out their mail via the Default SMTP Virtual Server on their exchange server through
their local ISP. There are no Send connectors created currently.
We have now installed an additional Exchange 2010 server with Hub, CAS and Mailbox roles at the London site. Internal mail flow between the sites seems to be working fine.
I believe the Exchange 2010 needs a Send connector to send out mail to the internet. However as soon as we create a Send connector on Exchange 2010, mail from the older 2003 servers at both sites start to flow out from the exchange 2010 server. This is not
optimal for our India site since their outgoing mail now has to flow via the VPN to London and out via the new server.
How can we configure it so that each server sends outgoing mail independently?
ThanksHi,
In India site, you can create a SMTP connector which point to the local ISP.
Thanks.
Niko Cheng
TechNet Community Support -
I
Unfortunately, Photoshop CS5 is not going to be able to open your D610 files directly.
The camera is newer than the latest update for your version of the software. Adobe stopped updating older versions to be able to read raw files from newer cameras when they released a new major version of Photoshop. Photoshop CS5 is no longer receiving Camera Raw updates.
To double check this yourself, using Adobe documentation:
First you need to determine whether Adobe has released support for your new camera in your version of Photoshop. To do that, look at these two pages. You'll want to find out the earliest version of Camera Raw that can support your camera, then what version of Photoshop can run that version of Camera Raw.
Camera Raw plug-in | Supported cameras
Camera Raw-compatible Adobe applications
Since your version of Photoshop cannot support your camera, you can download and install the latest version of the free Adobe DNG Converter, which can take your raw files as input and put out DNG format files, which your version of Photoshop can then open.
Photoshop Help | Digital Negative (DNG)
The DNG converter does work, but if you want maximum quality from your new camera's raw files (not to mention the convenience and ease of use of directly opening your raw files) you may want to consider upgrading to the latest version of Photoshop. Adobe has made substantial improvements in raw conversion quality in recent years.
-Noel -
Query on creating "Lead" from the Flat file
Hi Group,
I was trying to use the BAPI "BAPI_LEAD_CREATEMULTI" to create the lead.
I have a requirement for creating the Lead... and I have a few questions on creating the Lead like:
1)Does this Lead creation happen with the Business Partners or it has no
in no way connection with the Business Partners?
2)My requirement is that, I need to create leads for the records of the input file
which I get from the User and this looks like this with the fields as:
Sales prospect; Lead group; status; Qualification level; Origin; Priority; contact person; Lead group; status; Qualification level; Origin; and Priority.
(ie., 12 different input fields starting with Sales Prospect to Priority ).
In Sales Prospect, I will give the Business Partner # and also in the Contact Person.
Could you pls let me know how my requriement can be fulfilled( probably with some other code ).
Please give me your valuable suggestions on this to move further. And also, please give me some sample code to build this requirement.
thanks in advance.
Regards,
Vishnu.Check the return structure in the BAPI if it contains only success message, then try giving <b>CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'</b> passing essential parameters immediately after the create bapi call.
-
I'm trying to deploy the 10.0.1 update to my corporation. I need the multiple language update. When I go to the Downloads site for Adobe Reader, the update for multiple languages languages is the exact same file as the update for Tier 1 languages. I've called (yes, and actually held on long enough to speak to someone) twice asking for clarification on the files. The first time I was told this would be escalated to the web team and to call back. Over a week later no change to the files on the download site so I had to call in again and go through the same painful process to get the person on the phone to understand the problem. Has anyone already gone through this and determined whether that update is Tier 1 or multiple languages? Thank you very much.
http://www.adobe.com/support/downloads/product.jsp?product=10&platform=Windows
You need to select an appropriate Patch (Tier1 through Tier4) for the Reader(s) installed on you system(s) -
Not Able to create Source system for MSS using DB Connect
hi All,
i am trying to create a source system for MSS(SQL Server) using DB Connect.
CAN I KNOW THE ENTIRE PROCEDURE FROM BOTH THE ENDS?
like how you create the user in SQL Server and
Do WE NEED ANY ADD-ONS in BW SYSTEM and the Connection Parameters..
needed immediate HELP...
ADVANCE THANKS TO ALLHi Lokanth,
Refer to OSS Note 512739.
Also check these links:
http://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/frameset.htm
Bye
Dinesh -
I have tried " Authorize this computer", " Sign in to istore"
none of these is hapening..
plaese help me out.I have the exact same problem with my 1GB Nano. I've looked all over the internet at forums and such for the answer. Lots of the same problem, no solution. What's extremely strange is that I added 5 photos earlier after fiddling with it for about 30 minutes. When I took those photos out of the specified folder on my PC to add 3 new ones, Itunes wouldn't add the new photos. The new photos actually take up less space than the old ones did. I've messed with deleting the photo cache on both the Ipod and my PC specified folder with no luck. It still says there's not enough room on my Ipod, when in fact there is 70MB of free unused space according to both the Ipod and Itunes. So far none of the synching sites were any help. Once in a blue moon, I change some setting somewhere, update, eject the Ipod, and the photos appear on the Ipod. I plug it back in and Itunes agrees that the photos have transferred. I just don't understand it.
-
Sales Order form error "Not able to retrieve Display values for Service"
Hi,
Few of our orders flash the below error message when the order is queried
"Not able to retrieve Display values for Service"
Below are the points I observed
1.The orders I am referring to are imported order via EDI interface.
2.The service reference type code has value of ORDER, however no other service related fields (like service reference line id) have any values.
3. The item is not a service item (service tab in Item setup is disabled)
4. Same item when imported with value of "Customer Ordered" in "service reference type code" field, does not throw an error.
5. If I update "service reference type code" with value null or change it to CUSTOMER_PRODUCT, the error disappears.
Can someone explain the significance of this column value and what could have been causing this error message?
May be there are some dependent fields/setups which must have a value when service reference type code =ORDER.
Thanks in advance,
JC
Edited by: user10174990 on Oct 25, 2012 10:58 AMHi,
Maintain the dafault values using Tcode OISF with respective to Planning Plant you have to maintain the following values like Order Type, Main Work Center, Maint. Plant,Group,Group Counter,Business Area & Task List type.
or
Apply these OSS note 150732 / 195993.
regards,
Venkatesan Anandan -
Am not able to create software component in SLD
Am not able to create software component in SLD,
It shows the following error,
First i got this error.
[NWMss][SQLServer JDBC Driver][SQLServer]Attempt to fetch logical page (3:505360) in database 'ENW' belongs to object '861818472', not to object 'BC_SLD_INST'
Now am getting this error.
NWMss][SQLServer JDBC Driver][SQLServer]Warning: Fatal error 823 occurred at Aug 17 2007 2:21PMB??. Note the error and time, and contact your system administrator.Hi
Please restart your XI Server, SLD,J2EE Engine.
Thanks -
Sql loader does not skip header rows from the second infile
Hi
I am new to Sql Loader and trying to figure out a way to load data into the table from 2 files which have different data in the same format. The files get successfully loaded into the database with just one glitch:
Its skips first 2 rows from the first file however it takes first 2 rows from the 2nd file which I do not want. Can anyone help me with this issue? How can i restrict loader from picking up the 2 header rows from the second file as well?
given below is the content of the control file
OPTIONS ( SKIP=2)
LOAD DATA
INFILE 'C:\loader\contacts\Italy_Wave11_Contacts.csv'
BADFILE 'C:\loader\contacts\Contacts.bad'
DISCARDFILE 'C:\loader\contacts\contacts.dsc'
infile 'C:\loader\contacts\Spain_Wave11_Contacts.csv'
BADFILE 'C:\loader\contacts\Contacts1.bad'
DISCARDFILE 'C:\loader\contacts\contacts1.dsc'
Truncate
into table V_contacts_dump
fields terminated by ',' optionally enclosed by '"'
trailing nullcols
(ASSISTANT_EMAIL_TX,
ASSISTANT_NM,
ASSISTANT_PHONE_TX,
BUSINESS_AREA_CD,
BUSINESS_EMAIL_TX,
BUSINESS_FAX_TX,
BUYER_ROLE_CD,
COMMENTS_TX,
COUNTRY_CD,
COUNTY_STATE_PROVINCE_CD,
DATE_OF_BIRTH_DT,
DO_NOT_CALL_IN,
DO_NOT_EMAIL_IN,
DO_NOT_MAIL_IN,
DOMESTIC_PARTNERS_NM,
FIRST_NM,
FULL_NM,
GENDER_CD,
INTERESTS_CD,
LAST_NM,
MIDDLE_NM,
MOBILE_TX,
OFFICE_PHONE_TX,
OWNER_PARTY_EMAIL,
PREFERRED_CONTACT_LANG_CD,
PREFERRED_CONTACT_CD,
PRIMARY_CONTACT_IN,
REFERRED_BY_TX,
SALUTATION_CD,
STAC_SRC_ID_TX,
STAC_STDS_SRC_ID,
STCN_SRC_ID_TX,
STREET_TX,
STREET2_TX,
STREET3_TX,
SUFFIX_TX,
TITLE_CD,
TOWN_CITY_TX,
ZIP_POSTAL_CD_TX )It would be possible to call the loader twice with only one input-File at each run.
Maybe you are looking for
-
Performance problem submitting big XML string parameter to the web service
We deployed a web service on the OC4J via oracle.j2ee.ws.StatelessJavaRpcWebService . This web service takes one string as a parameter. The string contains XML. Evrything works great UNLESS input XML string reaches 5Mb in size. When it happens OC4J d
-
[SOLVED] dvipng unable to find required binary in libgd
Hello- I'm not sure whether I should make this post in the main Arch Linux forums or in AUR for dvipng, but I will try here first. I have used dvipng without any problems for over six months, but yesterday I got the following error: dvipng: error whi
-
OutOfMemory... leak somewhere in this class
I've been programming Java for a few months, and have for the past few weeks been working on this Swing GUI RPG. I know that the below code could be optimised a certain amount by doing lots of things I don't understand but for now all I'm looking for
-
HT201209 can I buy a gift card online and redeem it right away?
can I buy a iTunes gift card online, and redeem it right away?
-
Has anyone else noticed that Netflix is down on iPad?
I keep getting an error message. I have deleted the app and re-installed it and I am still getting the error messages Fault Type: httprequestreceiveerror Error Type: Default