Uploading data of the ME21
What is the procedure to upload the data of the purchase order
in the transaction ME21
hi,
See the simple example :
REPORT ZBAPI.
DATA: BEGIN OF i_data OCCURS 0,
text(255),
END OF i_data.
DATA: i_ekko TYPE bapiekkoc.
DATA: it_ekko LIKE TABLE OF i_ekko INITIAL SIZE 0 WITH HEADER LINE.
DATA: BEGIN OF i_ekpo OCCURS 0,
po_item(5),
pur_mat(18),
plant(4),
net_price(23),
disp_quan(13),
END OF i_ekpo.
DATA: it_ekpo LIKE TABLE OF bapiekpoc INITIAL SIZE 0 WITH HEADER LINE .
DATA: BEGIN OF i_eket OCCURS 0,
po_item(5),
deliv_date(8),
quantity(13),
END OF i_eket.
DATA: it_eket LIKE TABLE OF bapieket INITIAL SIZE 0 WITH HEADER LINE.
DATA: v_index TYPE i.
DATA: return TYPE TABLE OF bapireturn INITIAL SIZE 0 WITH HEADER LINE.
DATA: po_num(10).
START-OF-SELECTION.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = ' '
FILETYPE = ' '
ITEM = ' '
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
TABLES
data_tab = i_data
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at i_data.
if i_data-text(1) = 'H'.
shift i_data-text.
v_index = v_index + 1.
split i_data-text at ',' into i_ekko-doc_type
i_ekko-purch_org
i_ekko-pur_group
i_ekko-vendor.
append i_ekko to it_ekko.
elseif i_data-text(1) = 'I'.
shift i_data-text.
split i_data-text at ',' into i_ekpo-po_item
i_ekpo-pur_mat
i_ekpo-plant
i_ekpo-net_price
i_ekpo-disp_quan.
append i_ekpo.
move-corresponding i_ekpo to it_ekpo.
append it_ekpo.
clear it_ekpo.
else.
shift i_data-text.
split i_data-text at ',' into i_eket-po_item
i_eket-deliv_date
i_eket-quantity.
append it_eket .
move-corresponding i_eket to it_eket.
append it_eket.
clear it_eket.
endif.
endloop.
CALL FUNCTION 'BAPI_PO_CREATE'
EXPORTING
po_header = i_ekko
PO_HEADER_ADD_DATA =
HEADER_ADD_DATA_RELEVANT =
PO_ADDRESS =
SKIP_ITEMS_WITH_ERROR = 'X'
ITEM_ADD_DATA_RELEVANT =
HEADER_TECH_FIELDS =
IMPORTING
PURCHASEORDER =
tables
po_items = it_ekpo
PO_ITEM_ADD_DATA =
po_item_schedules = it_eket
PO_ITEM_ACCOUNT_ASSIGNMENT =
PO_ITEM_TEXT =
RETURN = return
PO_LIMITS =
PO_CONTRACT_LIMITS =
PO_SERVICES =
PO_SRV_ACCASS_VALUES =
PO_SERVICES_TEXT =
PO_BUSINESS_PARTNER =
EXTENSIONIN =
POADDRDELIVERY =
write: po_num.
loop at return.
write:/ return-message,return-type.
endloop.
Similar Messages
-
DB Connect Load - "Unknow error while uploading data from the DB Table"
Hi Experts,
We have our BI7 system connected to Oracle DB based third party tool. The loads are performing quite well in DEV environment.
I would like to know, how we transport DB Connect datasources to Quality systems? Any different process to be followed for DB Connect datasources?
At present the connections between BI Quality and the third party quality systems are established. We transported the DataSource from BI DEV system to BI quality system, but on trigerring an infopackage we are not able to perform loads. It prompts - "Unknow error while uploading data from the DB Table".
Also on comparing the DataSources in DEV system and Quality system there are no fields in "Proposal" tab of datasource in Quality system. Also I cannot change or activate Datasource in Quality system as we dont have change access in quality.
Please advice.
Thanks,
AbhijitHi,
Sorry for bumping an old thread ....
Did this issue get ever get resolved?
I am facing the same one. The loads work successfully in Dev. The transport for DBConnect DS also moved in successfully.
One strange this is that DB User for dev did not automatically change to db user from quality when I transported the DBConnect datasource. DBCon DS still shows me the DB User from Dev in Quality system
I get "Unknown Error" whenever I trigger the data package.
Advait -
While uploading data into the r/3 using call transaction or session method
hi experts
while uploading data into the r/3 using call transaction or session method error occured in the middle of the processing then how these methods behaves it transfers next records or not?hai
Session method: The records are not added to the database until the session is processed. sy-subrc is not returned. Error logs are created for error records. Updation in database table is always Synchronous.
Call Transaction method: The records are immediately added to the database table. sy-subrc is returned to 0 if successful. Error logs are not created and hence the errors need to be handled explicitly. Updation in database table is either Synchronous or Asynchronous.
While to transfer the data from the through if any errors occurs until the errors are the complete the data is not transfer to the SAP system.
the system compulsory shows the errors. that errors are stored into the error logs (Transaction is SM35).
so the session method should not return any value.
In call transaction method data is directly pass to the SAP system.
So its compulsory return the value.
Because of the call transaction is the function.
A function should return the value mandatory
In session method errors stroed in SYSTEM GENRATED ERROR LOG.
IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.
FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.
THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.
THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"
AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNING. -
I'm looking into how apps use the cloud. Would you consider any app with social media access as uploading information to the cloud? e.g. being able to tweet through an app is the same as uploading data to the cloud
Most of us in this forum are users who volunteer on technical issues, and not Adobe employees although they do drop in from time to time. As users we simply have no control over activation and that's why you are not getting responses.
If you havn't done so,you might try the Muse forums and see if you can get a staff member to look into it. Have your case numbers and phone transcripts handy.
Last option is to keep calling customer service until you get someone who will help or ask for a supervisor.
Hope this get resolved,
Gene -
Getting error while uploading data using the EXCEL( GUI_upload)
Dear Freinds,
I am uploading data from my excel sheet to my Custom table . I am using the below code
call function 'GUI_UPLOAD'
exporting
filename = l_fn
filetype = 'BIN' "'ASC'
has_field_separator = 'X'
tables
data_tab = p_i_ins_db
exceptions
others = 17.
i can see in my internal P_i_ins_db ...all the data is coming in encrypted format.
The flat given to me is the .CSV file .
Could any one please let me know how i can upload the data which is there in .csv file.
regards
syamalaHi Syamala,
Before using the GUI_UPLOAD to upload the data from the excel file to the internal table,you can try usng the Function Module 'SAP_CONVERT_TO_TEX_FORMAT' or 'SAP_CONVERT_TO_CSV_FORMAT' as it helps n formatting the data.
In case you have any further clarifications,do let me know.
Regards,
Puneet Jhari. -
Hi Experts,
I need to upload the data in the pdf file to the R/3 with fileupload element.
But I am not able to get the correct data(it is confusion code) in the pdf file when I debug the programe. However, I am able to get the data if the data is in the txt or excel file.
Do you give some hint for this problem ?
Thanks & Regards,
TaoHi, experts,
The version of R/3 : ABAP: 10, BASIS:11.
Best regards,
tao -
Best solution to automate/upload data to the GL_DAILY_RATES_INTERFACE table
We are using Oracle Apps 11.5.10.2 and I would like to get some feedback on a proposed solution to upload Exchange rates to the GL_DAILY_RATES_INTERFACE and then populate the GL_DAILY_RATES table.
From what I have read so far I understand that I need to do the following, to allow the GL_DAILY_RATES table to be populated:
Use sql Loader as the tool to upload the data.
Write a control file, with the load data command, in this example, called rates.ctl
LOAD DATA
APPEND
INTO TABLE GL_DAILY_RATES_INTERFACE
FIELDS TERMINATED BY ','
(FROM_CURRENCY CHAR
,TO_CURRENCY CHAR
,FROM_CONVERSION_DATE DATE
,TO_CONVERSION_DATE DATE
,USER_CONVERSION_TYPE CHAR
,CONVERSION_RATE DECIMAL EXTERNAL
,MODE_FLAG CHAR)
Provide a data file .txt or .csv for the control file to access, for this example called fxcsv.csv
formated:
PHP,USD,01-SEP-11,01-SEP-11,Corporate,0.01984,I
Provide a command for sql loader that can be written into a Unix shell script. I don't have unix level access or the recent experience to perform this task.
sqldr apps/pw contraol=rates.ctl log=rates log bad -rates.bad data-fxcsv.csv
Create a batch file to request the fxcsv.csv file from the OANDA site for the days current rates.
Create a Samba share for the .csv file for OANDA file to be copied from the windows environment.
Run Program - Daily Rates Import + Calculation to populate GL_DAILY_RATES from the data in GL_DAILY_RATES_INTERFACE.
Couple of items that I will need to address, if the above process is the correct way to make this upload work.
The format of the OANDA file that is download from the OANDA site, will have to be modified before it can be upload by the control file.
I am not sure the best approach to script a modification to the .csv file, but any suggestions are welcome.
The date in the OANDA file is not formatted correctly.
The OANDA file does not have to_conversion_date.
The OANDA file does not have a user_conversion_type.
The OANDA file does not have a Mode Flag for insert or delete.
All of the above being said, is this a solid process for uploading into the GL_DAILY_RATES_INTERFACE?
Any feedback is appreciated.Hi,
Thanks for the solution. My company has assigned me similar kind of automation process. So if you could give me more input on this that would be great. You can send me further mails on the following id : [email protected] or a reply in the same forum is much appriciated. Waiting for your reply.
Thanks,
Nagaraj -
Problem in uploading data for the Tcode CA02
Hi,
I am trying to upload the data for the Tcode ca02 and i am facing a problem i.e. the uploading for the for the 18th inspection characterstic is not able to being uploaded. I had checked the code of it and the logic is there.
It was previously uploading the data for it,but iit is not doing now. I had cheked the program of the screen also the fields are also present..would u plz send code.so i can check
-
Getting error while uploading data to the CCM thru excel file.
Hi
while uploading supplier data to CCM i am getting error " The destination FXP_HTTP_ADAPTER has not been maintained! (see long text) " Error when sending to SAP XI; upload canceled ".
FXP_HTTP_ADAPTER (Production) - is not maintained in SM59 transaction.
we have maintained FXT_HTTP_ADAPTER (TEST) in SM59 transaction.
we want to connect to test link not production link.but it is taking production link.
How it could pointing to production link.
thanks,
Prashsanth.Hi Prashsanth
Please check in customizing which RFC destination is maintained for uploading catalogs.
SPRO -> Cross Application Components -> SAP Catalog Authoring Tool -> Specify Settings for Uploading Catalogs.
This is probably wrong.
Regards.
Jason -
Uploading data in the table from mysql db, any help is welcome
Hi, I have made a table with two columns, "Name" and "ID". Those are binded to contexts NameCtx and IDCtx. There are ten rows in table. What I need to do is upload Names and IDs from mysql database and fill those rows from 1 to 10 and I dont have much idea how to do this. Any tutorial, blog or your piece of code or tips will be most welcome. Regards, Balmer
Hi,
To access the My SQL db pl refer this thread
writing data form Webdyn Pro inputfield into MySQL db
Once the connection is done
Create a statement
Exeecute the sql statement
Iterate the resultset
populate the context
try{
Connection conn;
Class.forName("com.sap.dbtech.jdbc.DriverSapDB");
String urlConn = "jdbc:sapdb://localhost/maxdb1"; //replace localhost and the maxdb1 with your server name and database.
String username = "userID";
String password = "password";
conn = DriverManager.getConnection(urlConn, username, password);
System.out.println("connected to DB...");
//Change the select statement to that of yours
Statement stmt = conn.createStatement();
stmt.execute("select name,id from table1");
//Result set
ResultSet resultSet = stmt.getResultSet();
//Iterate to populate the context that is bound to the table.
while (resultSet.next())
//Change the element and node name to that of yours
IOrdersElement ordersElement = wdContext.nodeOrders().createAndAddOrdersElement();
ordersElement.setNameCtx(resultSet.getString(1));
ordersElement.setIDCtx(resultSet.getString(2));
}catch(Exception e)
//handle the exception
Regards
Ayyapparaj -
Fill/upload data for the customizn order in Tcode SE09
Hello!
I have created a customizing order in SE09 and have to fill it with data from SAP Note (it is a .txt file).
After this this should be transported into the producitve Client
Which action are necessary for that?
Should I perhaps better implement the SAP Note?
Thank you very much indeed!
regardsHello!
Thank you for your response!
<b>Is it aslo possible to create an customizing order in SE09 and to fill the data that is included into the SAP note (.zip-file --> unzipped it is a .txt-file)?</b>
Because this procedure is recommended in the SAP Note 898614
Thank you very much!
regards -
Upload data from Excel.
Hello Experts,
I gotta a question regarding upload data from the excel to the sap. Does anybody know how do i have to procede ??? I was trying through transactions KP65 and KP34 but i got really confuse.
A documentation step by step will be very helpful !
Thank´s in advance!Hi,
If you don't want to program, you can either use LSMW or you can use CATT.
Regards
Mark -
Uploading data from non sap system to sap system
hi to all experts,
my requirement is to upload data into the sap system from non sap system . the data is in a flat file ,but the problem is that in the flat file all the field lengths and fields are not in order or same as sap system. How to upload the data into sap system ....hi,
the data is in a flat file,but the problem is that in the flat file all the field lengths and fields are not in order or same as sap system.
If the data is in excel sheet use this FM.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FILE
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 17
I_END_ROW = 3000
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
It will read the data from excel sheet column wise and then store it in ITAB. you can change the order after reading the file.
In case of Text file use FM GUI_UPLOAD.
You can change the order of the fileds after reading it from file, but the length and all you have to make compatible to SAP standard fields.
Regards,
Sachin -
Uploading data from a particular column of a particular sheet from an excel file into internal table
Hi,
I have to upload data in the first coulmn of 7th sheet of an excel file.
Can anyone please help me on this.
This link works perfectly fine for excel files without Macros.
Read multiple sheets of an Excel file into SAP through ABAP - Code Gallery - SCN Wiki
But my excel file has some macros.
And after the macro enable/disable popup is cleared, the system freezes.
Can someone pease help me on this abd tell me an approach different from the one in the above link?Welcome to SCN
Please search before you post next time:BDC, upload data from multi excel sheets -
Error while uploading data in SAP (me01)using LSMW
Hi All,
I am using LSMW for the first time.
I am trying to upload data to the Source List transaction (me01) using batch input recording. I created a new recording through LSMW itself. My source structure consists of 5 fields:
<b>MATNR C(18)
WERKS C(4)
VDATU N(8)
BDATU N(8)
LIFNR C(10)
EKORG C(10)</b>
Now the problem is when i try to convert the data, it gives me an error saying
"For type "C",a maximum length specification of 65535 is allowed."
I have noticed that unlike Direct Input method,
using batch input does not give any fields in "Maintain Field Mapping & Conversion Rules". So even if I have my fields in my source structure ,there are no fields to which I can map them to.
I don't know that is how it is when we go with batch input.
My file contain data in following order:
DANGEROUS GOODS,ABBY,20060801,20060831,30010,TEST
Pls help me to solve this problem.Hi Swapna!
You get such an error message, when define a constant and forget the second ':
g_werks = '1000. "wrong
g_werks = '1000'. "correct
In general: a batch input recording can have fixed values and some variables. You need to define, which fields you like to fill with a variable. Go to the overview of the recordings, open the recording in change mode and assign some variable names to the according batch lines.
<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/76/a05b69e8a411d1b400006094b944c8/frameset.htm">Editing batch input recordings</a>
Follow the help for the following steps of structure assignments.
Regards,
Christian
Maybe you are looking for
-
Hi all, I am trying to do dynamic file renaming for my file to file scenario. I mapped the filename to an output field and i can see it in Technical Ruoting/Payload in sxmb_moni also. But I am unable to generate the file using the variable substituti
-
How we can create the batch file to download the data in from URL in ssis
hi, any one help on one the below requirement. i have to create one batch file to download the report(reports is in csv format) from URL... requirement should be like this... 1. we have some reports is there in the URL.. 2.when ever we execute the ur
-
How to save a clip with a transparent background?
How do i save a clip with a transparent background to export to quicktime and then be able to import it back into my timeline and have it be able to overlay ontop of another clip? Transparent clip is for lower third
-
I have an HTML page that contains text in columns, and although the columns look good in Safari, when I ask Safari to save that page to PDF, the text is all jammed into one column. I tried both: <style type="text/css"> .two-col { -moz-column-count: 2
-
How can I get iCloud working again on my iPad?