How to upload data into IT0000 using ABAP-HR program
Hello,
I'm required to upload data into multiple infotypes [IT000, 0001, 0002, etc] using single input text file. Can anyone able to guide me, how to upload data into IT0000 using ABAP program ?
Thanks in advance.
Regards
Prabhakar.
Message was edited by:
Prabhakara Muthyal
Example code for HR_MAINTAIN_MASTERDATA to COPY IT0002
DATA: INT_0002_FINAL TYPE STANDARD TABLE OF PA0002 WITH HEADER LINE.
DATA: VALUES LIKE PPROP OCCURS 10 WITH HEADER LINE,
RETURN LIKE BAPIRETURN1,.
LOOP AT INT_0002_FINAL.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-PERNR'.
VALUES-FVAL = INT_0002_FINAL-PERNR.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-BEGDA'.
VALUES-FVAL = INT_0002_FINAL-BEGDA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-ENDDA'.
VALUES-FVAL = INT_0002_FINAL-ENDDA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-nachn'.
VALUES-FVAL = INT_0002_FINAL-NACHN.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-gblnd'.
VALUES-FVAL = INT_0002_FINAL-GBLND.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-vorna'.
VALUES-FVAL = INT_0002_FINAL-VORNA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-rufnm'.
VALUES-FVAL = INT_0002_FINAL-RUFNM.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-name2'.
VALUES-FVAL = INT_0002_FINAL-NAME2.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-inits'.
VALUES-FVAL = INT_0002_FINAL-INITS.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-famst'.
VALUES-FVAL = INT_0002_FINAL-FAMST.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-gbdat'.
VALUES-FVAL = INT_0002_FINAL-GBDAT.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-sprsl'.
VALUES-FVAL = INT_0002_FINAL-SPRSL.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-anzkd'.
VALUES-FVAL = INT_0002_FINAL-ANZKD.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-natio'.
VALUES-FVAL = INT_0002_FINAL-NATIO.
APPEND VALUES.
* maintain master data
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = INT_0002_FINAL-PERNR
ACTIO = 'COP'
BEGDA = INT_0002_FINAL-BEGDA
* ENDDA = INT_0002_FINAL-ENDDA
SUBTY = SPACE
NO_ENQUEUE = SPACE
DIALOG_MODE = '0'
TCLAS = 'A'
IMPORTING
RETURN1 = RETURN
TABLES
PROPOSED_VALUES = VALUES
* MODIFIED_KEYS =
EXCEPTIONS
OTHERS = 1.
IF RETURN IS INITIAL.
WRITE:/' Done....'.
ELSE.
WRITE:/ RETURN-ID, RETURN-TYPE, RETURN-NUMBER, RETURN-MESSAGE_V1, RETURN-MESSAGE_V2, RETURN-MESSAGE_V3, RETURN-MESSAGE_V4.
ENDIF.
CLEAR VALUES.
REFRESH VALUES.
ENDLOOP.
Similar Messages
-
How to upload data into CRM using batch job
Hello,
I got some problem and need some hints.
I am uploading data from a flat text file (product data) into CRM using thefunction module GUI_UPLOAD. My program starts with a selection screen whereI enter the path and the filename of the program, then I click start, and
the data is transferred in CRM. This works perfect, and I can automaticallycreate service products in CRM.
Here comes the PROB:
But now I want to automize this procedure using a batch job that automatically picks up the file from the server and processes it automatically without any user interaction. BUT I always get an error saying that my function module GUI_UPLOAD can't run in batch mode. So
anyone has an idea how to do this? Any other function modules that can run in batch mode? Any other ideas?
Thx very much for ur help on this.Hi Bill,
GUI_UPLOAD, like the name says, uses the SAPGUI to upload the data to theserver.. and in a batch job, you don't have the connection to a SAPGUI.
So you should use following kind of coding:
DATA MSG(100).
OPEN DATASET "FILENAM" FOR INPUT IN TEXT MODE ENCODING DEFAULT MESSAGE
MSG.
IF sy-subrc = 0.
DO.
READ DATASET "FILENAM" INTO [Your internal table].
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND [Your internal table]P_DATA.
ENDDO.
ENDIF.
The file should then be available on the server.
Regards -
How to upload data into form of Oracle EBS R12 using ATS ver 9.0
Hi experts,
Could you please guide me how to upload data into form on Oracle EBS R12 using Oracle Application Testing Suite verson 9.(The simpliest way)
For example: I need to create user account on Oracle EBS. Normally, I use Dataloader to upload the data, however it just can upload one by one record, cannot upload multi record at same time. Moreover if the performance of server is low, so I will get the issue when using dataloader.
Thanks in advance
Best Regards
HieuHi you can create Virtual users to enter data. Note than you have to name the objects accordingly.
For Example default recording provided by Open script is ObjectNAME_(Index No of the object).
when you record one iteration the name of any object would be ObjectNAME_(0)
You can then create virtual users so the index will increment as the total number of Virtual users increases. Also you have to handle which row of your test data would get mapped to which Virtual user in the script run session.
Thanks -
How to upload data into Classification-MM02 for each MATNR By using BAPI
Hi all
How to upload data into characterstic value in classification- MM02 for each MATNR by using BAPI.Hi Siva,
Please try BAPI BAPI_OBJCL_CHANGE.
The object key should be material number and object table should be MARA.
Regards
Hiren K.Chitalia -
How to upload an excel file using ABAP.
Hi,
Can anyone please help me in understanding how to upload an excel file using ABAP.
Thanks!!http://diocio.wordpress.com/2007/02/12/sap-upload-excel-document-into-internal-table/
check the link
TYPES: Begin of t_record,
name1 like itab-value,
name2 like itab-value,
age like itab-value,
End of t_record.
DATA: it_record type standard table of t_record initial size 0,
wa_record type t_record.
DATA: gd_currentrow type i.
*Selection Screen Declaration
PARAMETER p_infile like rlgrap-filename.
*START OF SELECTION
call function ALSM_EXCEL_TO_INTERNAL_TABLE
exporting
filename = p_infile
i_begin_col = 1′
i_begin_row = 2′ Do not require headings
i_end_col = 14′
i_end_row = 31′
tables
intern = itab
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
message e010(zz) with text-001. Problem uploading Excel Spreadsheet
endif.
Sort table by rows and colums
sort itab by row col.
Get first row retrieved
read table itab index 1.
Set first row retrieved to current row
gd_currentrow = itab-row.
loop at itab.
Reset values for next row
if itab-row ne gd_currentrow.
append wa_record to it_record.
clear wa_record.
gd_currentrow = itab-row.
endif.
case itab-col.
when 0001′. First name
wa_record-name1 = itab-value.
when 0002′. Surname
wa_record-name2 = itab-value.
when 0003′. Age
wa_record-age = itab-value.
endcase.
endloop.
append wa_record to it_record.
*!! Excel data is now contained within the internal table IT_RECORD
Display report data for illustration purposes
loop at it_record into wa_record.
write:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
endloop. -
How to upload data into ztables
Hi all,
How to upload data into ztables
plz sent the detail description as well sa sample programsHi Narendra,
Sample code to update the Z db table :
REPORT yupload.
TABLES ybtab.
DATA itab LIKE ybtab OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
filename = 'C:\data.txt'
filetype = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = itab
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
INSERT ybtab FROM TABLE itab.
ENDIF.
Schedule this program as a Background Job with required time paramters .
Regards,
Ramganesan K. -
Uploading Data Into CRM Using a Batch Job
Hi,
How can I automate the procedure of uploading data from a flat text file (product data) into CRM using the function module GUI_UPLOAD?
Thanks,
Rachita.Hi,
GUI_UPLOAD, like the name says, uses the SAPGUI to upload the data to the server, and in a batch job, you don't have the connection to a SAPGUI. So you should use following kind of coding:
DATA MSG(100).
OPEN DATASET "FILENAM" FOR INPUT IN TEXT MODE ENCODING DEFAULT MESSAGE
MSG.
IF sy-subrc = 0.
DO.
READ DATASET "FILENAM" INTO [Your internal table].
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND [Your internal table]P_DATA.
ENDDO.
ENDIF.
Reward points if found helpfull...
Cheers,
Siva. -
How to upload data into Sharepoint?
Hello Community
Before you use RBS you have to either:
1- Manually upload data into Sharepoint 2013 Server
2- Use a migration tool.
But how do you "manually" upload data into Sharepoint 2013 Server and what is the
recommended tool to use to upload data into Sharepoint 2013 Server
Thank you
ShabeautUploading manually just involves uploading data like you normally would to SharePoint. Drag-and-drop documents into the Document Libraries or use WebDAV to connect to the SharePoint site and copy that way.
As for migration tools, there are plenty out there. ShareGate, Metavis, Metalogix, AvePoint and others have migration tools.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
How to upload data for me01 using lsmw recording method
*dear expert please tell me the complete procedure for how to upload data in me01 transaction using lsmw recording method.
Moderator Message: Duplicate post locked.
Edited by: Vinod Kumar on May 8, 2011 7:56 PMHi,
To be honest I don't understand your question. When You execute LSMW and create project, then all steps are shown in a very clear way with good description. With which one you have problems?
Best regards
Marcin Cholewczuk -
How to upload data for me01 using LSMW BDC METHOD
*hi export please tell me the complete procedure for uploading data in me01 using LSMW BDC METHOD*
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on May 8, 2011 10:06 PMHi,
To be honest I don't understand your question. When You execute LSMW and create project, then all steps are shown in a very clear way with good description. With which one you have problems?
Best regards
Marcin Cholewczuk -
How to upload data into PC cluster
Hi Experts,
Please let me know how do the data into the PC cluster is stored?I mean how the leave from the quota is deducted and the how is PC cluster is updated?
Thanks,
AnkitaHi Narendra,
Sample code to update the Z db table :
REPORT yupload.
TABLES ybtab.
DATA itab LIKE ybtab OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
filename = 'C:\data.txt'
filetype = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = itab
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
INSERT ybtab FROM TABLE itab.
ENDIF.
Schedule this program as a Background Job with required time paramters .
Regards,
Ramganesan K. -
How to upload data into SAP BW Info Objects using SAP XI
Hi,
I need to upload master and hierarchy data into SAP BW Info Objects using SAP XI as EAI.
Can anyone suggest me the best solution to do it.
Thanks in Advance,
Volker.Hi! Have you not checked the BW-XI Integration document? It is available on the main page of the SDN section for XI. Almost all the steps for the integration are there...
-
How to upload data into a database from a csv file in a jsp app?
I can write a HTML form to let users to post a csv file and store it in the web server, then how could I process the file to load the data into a View Obj or an Entity Obj without manually parsing the csv files? Any jsp or java code samples that will do something like the "sqlload" in sqlplus?
I'm using JDev 3.1.1.2. Thanks.Navy_Coder wrote:
6 zebras.But you must marry his eldest daughter as well, for that dowry. -
How to load data into table Using Script Task
We have a directory/folder where we have a file. We need to insert the File Created Date , File Name , Extension into the database table of Sql server by using Script Task.
So could you please suggest , how to frame the connection string , fetch the file details and insert the data into the database table using Script Task of SSIS 2008You can achieve it as follows using standard script task
1. Add a ForEachLoop container to point to your directory to iterate though the files. Add a variable of type string inside loop to get file name of each file it iterates. Choose option Filename and extension. Add a variable to just store extension part
(FileExtension), set EValuateAsExpression true for it and give expression as below
SUBSTRING(@[User::FileName],FINDSTRING(@[User::FileName],".",1)+1,LEN(@[User::FileName]))
2. Add a script task inside loop and pass filename variable as a read only variable to it. Crete a new variable to get creationdate and pass it as ReadWrite. Inside write code as below
Public Sub Main()
' Add your code here
Dim f As New System.IO.FileInfo(Dts.Variables("FileName").Value.ToString())
Dts.Variables("FileCreatedDate").Value = f.CreationTime
Dts.TaskResult = ScriptResults.Success
End Sub
3. Add a Exec SQL Task after Script task inside loop and give a query like below
INSERT INTO TableName (FileName,CreatedDate,Extension)
VALUES(?,?,?)
and in parameter tab map the parameter placeholders 0,1 and 2 to @[User::FileName],@[User::FileCreatedDate] & @[User::FileExtension] variables
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to put data into textbox using JSP
How can I put data into a textbox using JSP?
This code prints to a html page but I want it inside an text area:
// Print out the type and file name of each row.
while(ftplrs.next())
int type = ftplrs.getType();
if(type == FtpListResult.DIRECTORY)
out.print("DIR\t");
else if(type == FtpListResult.FILE)
out.print("FILE\t");
else if(type == FtpListResult.LINK)
out.print("LINK\t");
else if(type == FtpListResult.OTHERS)
out.print("OTHER\t");
out.print(ftplrs.getName() +"<br>");
}I have tried with the code below:
<textarea name="showDirectoryContent" rows="10" cols="70">
<%
// Print out the type and file name of each row.
while(ftplrs.next())
int type = ftplrs.getType();
if(type == FtpListResult.DIRECTORY)
%>
<%= "DIR\t" %>
<% else if(type == FtpListResult.FILE) %>
<%= "FILE\t" %>
<% else if(type == FtpListResult.LINK) %>
<%= "LINK\t" %>
<% else if(type == FtpListResult.OTHERS) %>
<%= "OTHER\t" %>
<% String temp = ftplrs.getName() +"<br>");
<%= temp > <br>
%>
</textarea>I get the following error:
Location: /myJSPs/jsp/grid-portal-project/processviewfiles_dir.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated.
C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\processviewfiles_dir_3.java:151: 'else' without 'if'.
else if(type == FtpListResult.FILE)
^
C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\processviewfiles_dir_3.java:165: 'else' without 'if'.
else if(type == FtpListResult.LINK)
^
C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\processviewfiles_dir_3.java:179: 'else' without 'if'.
else if(type == FtpListResult.OTHERS)
^
C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\processviewfiles_dir_3.java:193: ';' expected.
String temp = ftplrs.getName() +"");
^
4 errors, 1 warning
at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:898)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:733)
at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506)
at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:875)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)
Please help???Yes indeed this works:
<textarea name="showDirectoryContent" rows="10" cols="70">
<%
// Print out the type and file name of each row.
while(ftplrs.next())
int type = ftplrs.getType();
if(type == FtpListResult.DIRECTORY)
{%>
<%= "DIR\t" %>
<%} else if(type == FtpListResult.FILE) {%>
<%= "FILE\t" %>
<%} else if(type == FtpListResult.LINK) {%>
<%= "LINK\t" %>
<%} else if(type == FtpListResult.OTHERS) %>
<%= "OTHER\t" %>
<%= ftplrs.getName() %>
<%
%>
Maybe you are looking for
-
My iphone 3gs keeps loosing wi-fi at home
Has anyone got any ideas as my phone keeps loosing the wi-fi connection at home. Its only in the next room but keeps disconnecting. Please any ideas would be great.
-
Asynchrnous Update for the report?
I know there is Asynchrnous Update for the chart in HTMLDB - if you enable it, and if the underlying data has changed, when the next update interval passed, you will see the chart updated with the new data. Does this feature also apply to tabular tab
-
It shows that the file downloads but I can't open file - it just says untitled and I can't open it
-
GSSContext.isEstablished() always return false
I'm writing a servlet filter for Kerberos single-signon between IE and websphere 5 on Win2000 through JGSS-API and SPNEGO. I use com.ibm.security.auth.module.Krb5LoginModule as the login module and I've created the keytab and put in the app. server.
-
HP Mini 110-3519la Bios Password RESET
Hi, I bought a hp mini 110 one year ago and I set the bios administrative and user password, I need to make some changes in these options but I forgot the administration password, the system show me this message "System Disable" [94192761], can you h