Upload legacy data into SAP
Hi experts,
I have to upload legacy data into SAP by using eCATT recording Transaction. For doing this I have completed Test script in tcode SECATT. After this what I have to do.. How can I attach my legacy file.. Can anyone help me. ..Its really urgent
Thanks in advance
Hi,
There are a series of weblogs in this area. Check them out, I think there are 8 in a series:
/people/sapna.modi/blog/2006/04/10/ecatt--an-introduction-part-i
cheers
Aveek
Similar Messages
-
Upload bulk data into sap?
hi all,
let me know is there any methods to upload bulk data into sap and can same data be modified , delete , add. please correct me if i am wrong. what i know is that we can do with lsmw method, as i am new to lsmw method please let me know where to hunt for lsmw documentation.
thanks,
john dias.Hi John-
According to SAP, The Data Transfer Workbench supports the automatic transfer of data into the system. The Workbench is particularly useful for various business objects with large amounts of data. It guarantees that data is transferred efficiently and ensures that data in the system is consistent.
Further, The Legacy System Migration Workbench (LSMW) is a tool recommended by SAP that you can use to transfer data once only or periodically from legacy systems into an R/3 System.
For your purpose you might be helped by the following two links-
'Data Transfer Workbench' - http://help.sap.com/saphelp_47x200/helpdata/en/0d/e211c5543e11d1895d0000e829fbbd/frameset.htm
'Using the LSM Workbench for the Conversion' - http://help.sap.com/saphelp_46c/helpdata/en/0f/4829e3d30911d3a6e30060087832f8/frameset.htm
Hope these links help,
- Vik. -
How to batch upload some data into SAP system?
Hi All:
I'm a SAP key user in our company, I want to know how to batch upload master data into SAP system? What t-code we can use for batch input?
Thanks in advance!Hi,
I think at least there are four methods for batch input which you can use in SAP system:
Standard mass change t-code: for example, MM17 for mass change of material master data, you can find the mass change t-code under the relevant function module;
T-code SCAT, you can use to record and generate the simple batch input template, it's easy to use for key user;
T-code LSMW, it's another transaction to generate batch input template, it's often used at the beginning of SAP rollout;
ABAP program, of course, ABAP is a universal tool for everything, you can use ABAP to generate a batch input program to upload data into SAP system as well.
So you had better contact your SAP support department, help you to upload data!
Good luck
Tao -
How to upload the data into SAP R/3 System
I have a scenario to upload the flat file data into SAP R/3 System.
I will describe my complete scenario here so that it will be better understanding for you to suggest the solution.
The segments that relevant for the upload of customer master data, namely
HD : Header Segment
PF : Partner Function Segment
OP : Output Segment
TX : Tax Segment
CR : Credit Segment
CT : Customer Text SegmentI think you can achieve this with IDOC creation. If it is so follow the steps below.
Basic Type:
Basic IDoc type defines the structure and format of the business document that is to be exchanged between two systems.
Segments:
Segments form the basic building blocks of an IDoc type and are used to store the actual datta. A segment type is the name of a segment and is independent of the SAP elease. A segment definition is the release-specific name of a segment.
Steps in creating Segments:
T.Code WE31
Enter the name for your segment type and click on the create icon.
Type the Short text.
Enter the variable names and data elements.
Save and Go back.
Go to Edit -> Set Release.
Repeat the steps to create more segments.
IDOC TYPE:
Business data is exchanged with an external system using the IDoc Interface.
IDoc types (Special Structures) An IDoc type is defined through its permitted segments. Segments can be dependent on each other (parent and child segments). The IDoc interface can check for each IDoc whether thhe segments contained are compatible with thhe definitiion of its type. This systax check is activated or deactivated in the Partner Profiles.
Steps in creating IDoc Type:
T.Code WE30 to create IDoc Type.
Enter the Object Name, Select Basic Type and click Create Icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDoc name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press enter
The system transfers the name of the segment type to the IDoc editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation.
Save it and go back.
Go to Edit -> Set Release.
Message Type:
Steps in Creating Message Type:
T.Code WE81.
change the details from Display mode to Change mode
After selection, the system will give this message "The table is cross client (See help for further info)". Press enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back.
Assign Message Type to IDoc Type:
T.Code WE82
Change the details from Display mode to change mode.
After selection, the system will give this message "The table is cross client (See help for further info)". Press enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back.
Reward Points if useful. -
To upload a data into SAP Table with the help of RFC function in BODS
Hi,
Please provide me step-by-step solution to upload data into any SAP table with the help of RFC function in Data Services.
I have created RFC function that upload data into SAP table. RFC Function contains one table that has same structure as my database table.
In the data services how can i filled the table of RFC function, i am using this function in query transform of data services but it gives me error.
I am also follow link http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsDataServicesTipsand+Tricks
but it did not help me.
Thanks,
AbhishekHi Abhishek,
Did you import the function module in the SAP datastore first? When you open the SAP datastore, the function should be listed in the 'functions' section. If not, import it. Make sure your function is remote executable.
Once the function is there, you can use it in a transformation. In 'Schema Out' right-click on 'Query' (top level) and choose 'New Function Call'. You can then select a datastore and a function in the datastore. The wizard will show you which output parameters are available. I believe you have to add at least one and can select as many as you like.
After confirming your selection the function and the output parameters appear in Schema Out. You can then right-click on the function and choose 'Modify function call'. A popup will appear where you can specify the input parameters.
I hope this helps.
Jan. -
Regarding Upload of data into SAP from Application server using DATA SETS
Hi all,
I have a problem when uploading data that is application server [.txt file] into SAP using OPEN DATA SET,READ DATA SET & CLOSE DATA SET it is now going to dump. The file is actually splits the fields by using Tab Delimiter.
During uploading some junk values are coming with '#' so it going to dump and giving follow type of error.
Runtime Errors CONVT_NO_NUMBER
Exception CX_SY_CONVERSION_NO_NUMBER
Unable to interpret "#0#0#0#0#0#0#0#" as a number.
Can any one solve the above issue as i need it urgently.
Thanks in advance.
Thanks & Regards,
Rayeezuddin.Hi Hielman,
Thnaks for that reply and for effort you are putting to solve my issue.
I had done the same thing what u have posted prior to your reply but still i am getting dump.
FORM f_get_legacy_data .
DATA: l_tab type xstring,
l_tab1(1) type c,
s type x.
move '23' to l_tab.
move l_tab to l_tab1.
OPEN DATASET v_pfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
OPEN DATASET v_pfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc <> 0.
MESSAGE text-207 TYPE c_e.
ELSE.
DO.
CLEAR wa_input1.
READ DATASET v_pfile INTO wa_input1.
READ DATASET v_pfile INTO wa_read.
IF sy-subrc EQ 0.
move wa_read to i_txt-txt.
append i_txt.
ELSE.
EXIT.
ENDIF.
ENDDO.
s = '09'.
loop at i_txt.
move i_txt-txt+10(1) to l_tab1.
move '#' to l_tab1.
split i_txt-txt at s into wa_input1-vbeln wa_input1-posnr
split i_txt-txt at '#' into wa_input1-vbeln wa_input1-posnr
wa_input1-per0bal wa_input1-per1val
wa_input1-per2val wa_input1-per3val
wa_input1-per4val wa_input1-per5val
wa_input1-per6val wa_input1-per7val
wa_input1-per8val wa_input1-per9val
wa_input1-per10val wa_input1-per11val
wa_input1-per12val.
APPEND wa_input1 TO i_input1.
CLEAR wa_input1.
endloop.
ENDIF.
CLOSE DATASET v_pfile.
IF i_input1[] IS INITIAL.
If there is no data in the legacy file or if the structure of the
legacy data does not match with that of internal table error message
need to be displayed.
MESSAGE text-211 TYPE c_e.
*&--begin of change--
ELSE.
CLEAR: wa_input, wa_input1.
LOOP AT i_input1 INTO wa_input1.
MOVE wa_input1 TO wa_input.
MOVE: wa_input1-vbeln TO wa_input-vbeln,
wa_input1-posnr TO wa_input-posnr,
wa_input1-per0bal TO wa_input-per0bal,
wa_input1-per1val TO wa_input-per1val,
wa_input1-per2val TO wa_input-per2val,
wa_input1-per3val TO wa_input-per3val,
wa_input1-per4val TO wa_input-per4val,
wa_input1-per5val TO wa_input-per5val,
wa_input1-per6val TO wa_input-per6val,
wa_input1-per7val TO wa_input-per7val,
wa_input1-per8val TO wa_input-per8val,
wa_input1-per9val TO wa_input-per9val,
wa_input1-per10val TO wa_input-per10val,
wa_input1-per11val TO wa_input-per11val,
wa_input1-per12val TO wa_input-per12val.
APPEND wa_input TO i_input.
CLEAR: wa_input, wa_input1.
ENDLOOP.
ENDIF.
ENDFORM. " GET_LEGACY_DATA
When i am giving input as
Directory /pw/data/erp/D5S/fi/up
Name: Backlog1616_D1S.txt
BKCOPO1 BKSOI1 1000.00 100.00 -200.00 0 0 0 0 0 0 0
BKSOPO2 BKSOI2 2222.22 0 300 0 0 0 0 0 0 0
BKSOPO3 BKSOI3 -3000 400 0 0 0 0 0 0 0 0
BKSOPO4 4000.55 500 600 0 0 0 0 0 0 0
0040000000 000010 -100 -110 -110 0 0 -600 0 0 0 0
0040000001 000010 -110 -110 0 0 0 -610 0 0 0 0
I am getting i_input internal table populated as follows at the end of that subroutine.
After appending [APPEND wa_input TO i_input].
BKCOPO1#BK|000000| 0.00 | 0.00 | 0.00 |
BKSOPO2#BK|000000| 0.00 | 0.00 | 0.00 |
BKCOPO3#BK|000000| 0.00 | 0.00 | 0.00 |
BKCOPO4##4|000000| 0.00 | 0.00 | 0.00 |
0040000000|000000| 0.00 | 0.00 | 0.00 |
0040000001|000000| 0.00 | 0.00 | 0.00 |
And output is showing erronious records: 6
No entries inserted.
Can you solve this issue. -
Using bapi how to upload the data into sap database?
hi dear all,
im facing problem with bapi ? let me edcuate on bapi ..
i will be waiting for reply.
my e-id :[email protected]
thanks®ards
shiva.Hi
A BAPI is a method of a SAP Business Object. BAPI enables SAP and third party applications to interact and integrate
with each other at the Business Object / Process level.
Check this link to know more about BAPI.
http://www.sapgenie.com/abap/bapi/example.htm
http://sappoint.com/abap/
Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a
typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form
of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The
transaction is then started using this internal table as the input and executed in the background.
In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.
It can also be used for real-time interfaces and custom error handling & logging features. .
To know more about BDC,
check the link.
http://sappoint.com/abap/
Main differences are...
In case of bdc data transfer takes place from flat file into sap system ie the file existing in sap system to sap sytem
where is bapi's r remotly enabled function modules which are assigned to some business objects n used to transfer the data between different business partners who are using different systems other than sap.
not only that...
when you plan to upgrade your system version then bdc willnot support those upgradations where as bapi's will support.
http://www.sap-img.com/abap/ale-bapi.htm
SAP BAPI
BAPI STEPS
Hope this helps.
ashish -
Upload of data into SAP R/3 System
The falt file data is in the form of segment types (HD,PF,TX,OP) and we have to upload it to SAP R/3 System by using the Function modules.
How i have to proceed?
Please ping to my question.I think you are working with IDOC creation. If it is so follow the steps below.
<b>Basic Type:</b>
Basic IDoc type defines the structure and format of the business document that is to be exchanged between two systems.
<b>Segments:</b>
Segments form the basic building blocks of an IDoc type and are used to store the actual datta. A segment type is the name of a segment and is independent of the SAP elease. A segment definition is the release-specific name of a segment.
<b>Steps in creating Segments:</b>
T.Code WE31
Enter the name for your segment type and click on the create icon.
Type the Short text.
Enter the variable names and data elements.
Save and Go back.
Go to Edit -> Set Release.
Repeat the steps to create more segments.
<b>IDOC TYPE:</b>
Business data is exchanged with an external system using the IDoc Interface.
IDoc types (Special Structures) An IDoc type is defined through its permitted segments. Segments can be dependent on each other (parent and child segments). The IDoc interface can check for each IDoc whether thhe segments contained are compatible with thhe definitiion of its type. This systax check is activated or deactivated in the Partner Profiles.
<b>Steps in creating IDoc Type:</b>
T.Code WE30 to create IDoc Type.
Enter the Object Name, Select Basic Type and click Create Icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDoc name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press enter
The system transfers the name of the segment type to the IDoc editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation.
Save it and go back.
Go to Edit -> Set Release.
<b>Message Type:</b>
<b>Steps in Creating Message Type:</b>
T.Code WE81.
change the details from Display mode to Change mode
After selection, the system will give this message "The table is cross client (See help for further info)". Press enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back.
<b>Assign Message Type to IDoc Type:</b>
T.Code WE82
Change the details from Display mode to change mode.
After selection, the system will give this message "The table is cross client (See help for further info)". Press enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back.
Reward Points if useful. -
Hi experts,
I have to upload legacy data into SAP by using eCATT recording Transaction. For doing this I have completed Test script in tcode SECATT. After this what I have to do.. How can I attach my legacy file.. Can anyone help me. ..Its really urgenthi silviya,
check these threads...
/people/sapna.modi/blog/2006/04/10/ecatt-scripts-creation--sapgui-mode-part-iii
Steps in ECATT
uploading data from external files with multiple entries in ecatt
ecatt upload
Error in executing eCATT GUI Script
hope these help,
do reward if it helps,
priya. -
Data upload from excel into SAP
Hi Gurus
Could anyone please guide me how to upload excel data into SAP?
I need to update existing Gross weight and Net weight data. Got new data in excel format.So need to upload excel file straight into SAP and update the data.
Step by step procedure will be much appreciated.
Rgds
Utpaltry with bdc .....
below coding is move the data from excel to internal table ....
TYPES: BEGIN OF s_ovro,
VKORG LIKE V_TVSFK-VKORG,
VTWEG LIKE V_TVSFK-VTWEG,
SPART LIKE V_TVSFK-SPART,
STGKU LIKE V_TVSFK-STGKU,
STGAK LIKE V_TVSFK-STGAK,
STAFO LIKE V_TVSFK-STAFO,
END OF s_ovro.
DATA: I_OVRO TYPE TABLE OF s_ovro,
w_ovro type s_ovro.
data : request(15) type c,
i type c.
DATA : IT_EXCEL TYPE STANDARD TABLE OF ALSMEX_TABLINE WITH HEADER LINE.
FIELD-SYMBOLS: <FS1> TYPE ANY.
include bdcrecx1.
SELECTION-SCREEN BEGIN OF BLOCK DATA WITH FRAME.
PARAMETERS: P_FILE TYPE RLGRAP-FILENAME DEFAULT 'C:\Documents and Settings\itfactory\Desktop\sd1.xls' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK DATA.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = P_FILE.
start-of-selection.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FILE
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 24
I_END_ROW = 60000
TABLES
INTERN = IT_EXCEL
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
LOOP AT IT_EXCEL.
ASSIGN COMPONENT IT_EXCEL-COL OF STRUCTURE
W_ovro TO <FS1>.
<FS1> = IT_EXCEL-VALUE.
AT END OF ROW.
MOVE-CORRESPONDING: Wib TO Iib.
APPEND w_ovro to I_ovro.
CLEAR W_ovro.
ENDAT.
ENDLOOP.
through bdc program update the data from internal table to bdc... -
How can we upload the Time data into SAP system
Dear all,
ingeneral which method we can use to read the Time data and how can we upload that data into SAP system. Please any one can answer this asap.In the recent project that I have done.. the time data is uploaded from the external time recording machine.. in the form a file...
The other way is through CATS... which in turn will populate the time entries as per hte work schedules... and will explicitly have to populate the deviations to the work scheudle by going through transactions..
Please reward the points if it is helpful...
Regards,
Suvan,
Yash Technologies Pvt Ltd, Hyderabad.
Message was edited by:
Suvan -
Hi guys,
How to upload a XML file into sap?
is there any function module?
can anybody give me an example program for converting or uploading XML data into sap.
regards,
vinoth.Hi all,
The XML code and XML file given is running fine for me, but when i am using it, my XML file and code, the tables GV_header and GT_item are filling in the perform but outside perform it's empty. Please find the code and XML file , PLease give the answer its urgent, points will be given for sure.
My function module code is:-
FUNCTION Z_MMI_XML_EXTRACT_COPY.
""Local interface:
*" IMPORTING
*" REFERENCE(DOCTYPE) LIKE DRAW-DOKAR
*" REFERENCE(DOCNUM) LIKE DRAW-DOKNR
*" REFERENCE(DOCVER) LIKE DRAW-DOKVR
*" REFERENCE(DOCPART) LIKE DRAW-DOKTL
*" TABLES
*" T_HEADER STRUCTURE ZFI_HEADER
*" T_ITEMS STRUCTURE ZFI_ITEMS
Load iXML Lib.
type-pools: ixml.
class cl_ixml definition load.
data: G_IXML type ref to if_ixml.
data: STREAMFACTORY type ref to if_ixml_stream_factory.
data: ISTREAM type ref to if_ixml_istream.
data: DOCUMENT type ref to if_ixml_document.
data: PARSER type ref to if_ixml_parser.
You should provide the parameter for file name
*LV_FILE_URL = 'C:input_xml.xml'.
types: begin of XML_LINE,
DATA(256) type x,
end of XML_LINE.
***types: begin of TY_HEADER,
CUST_NAME(20) type c,
CARD_NO(20) type c,
TAX_AMOUNT(10) type c,
TOTAL_AMOUNT(10) type c,
end of TY_HEADER.
***types: begin of TY_ITEM,
ITEM_NO(4) type n,
ITEM_ID(20) type c,
ITEM_TITLE(50) type c,
ITEM_QTY(10) type c,
ITEM_UPRICE(10) type c,
end of TY_ITEM.
*data: GV_HEADER type TY_HEADER.
*data: GV_HEADER like zfi_header occurs 0 with header line.
data : GV_HEADER LIKE ZFI_HEADER.
*data: GT_ITEM type standard table of TY_ITEM with header line.
*data: GT_ITEM type standard table of zfi_items with header line.
data: GT_ITEM type standard table of zfi_items with header line.
data: XML_TABLE type table of XML_LINE,
XML_TABLE_SIZE type i.
data: LV_FILE_URL type rlgrap-filename.
DATA : BEGIN OF itab OCCURS 0,
a(100) TYPE c,
END OF itab.
DATA: xml_out TYPE string .
DATA : BEGIN OF upl OCCURS 0,
f(255) TYPE c,
END OF upl.
DATA: xmlupl TYPE string .
DATA : BEGIN OF wa_draw OCCURS 0,
dokar LIKE draw-dokar,
doknr LIKE draw-doknr,
dokvr LIKE draw-dokvr,
doktl LIKE draw-doktl,
END OF wa_draw.
DATA : g_documenttype LIKE bapi_doc_aux-doctype,
g_documentnumber LIKE bapi_doc_aux-docnumber,
g_documentpart LIKE bapi_doc_aux-docpart,
g_documentversion LIKE bapi_doc_aux-docversion.
*" Itab required in IMPORTING parameter of BAPI
DATA : t_documentfile LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE.
DATA : t_documentstructure LIKE bapi_doc_structure OCCURS 0 WITH HEADER
LINE,
itab required in TABLES parameters of BAPI
t_documentfiles LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE,
t_components LIKE bapi_doc_comp OCCURS 0 WITH HEADER LINE,
t_return LIKE bapiret2.
DATA : l_docfile TYPE string.
***FILL THE TYPE OF ATTACHMENT in IMPORTING itab**
t_documentfile-wsapplication = 'XML'.
APPEND t_documentfile.
wa_draw-dokar = DOCTYPE.
wa_draw-doknr = DOCNUM.
wa_draw-doktl = DOCPART.
wa_draw-dokvr = DOCVER.
CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEW2'
EXPORTING
documenttype = wa_draw-dokar
documentnumber = wa_draw-doknr
documentpart = wa_draw-doktl
documentversion = wa_draw-dokvr
documentfile = t_documentfile "IMPORTING itab of BAPI
getstructure = '1'
getcomponents = 'X'
ORIGINALPATH = ' '
HOSTNAME = ' '
getheader = 'X'
DOCBOMCHANGENUMBER =
DOCBOMVALIDFROM =
DOCBOMREVISIONLEVEL =
IMPORTING
return = t_return
TABLES
documentstructure = t_documentstructure
documentfiles = t_documentfiles "TABLES itab of BAPI
components = t_components
LOOP AT t_documentfiles .
ENDLOOP.
l_docfile = t_documentfiles-docfile.
The next step is creating the main factory for the iXML library:
G_IXML = cl_ixml=>create( ).
Now Create Stream Factory
STREAMFACTORY = G_IXML->create_stream_factory( ).
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
*filename = 'C:DMS_SPA.XML'
filename = l_docfile
filetype = 'BIN'
IMPORTING
FILELENGTH = XML_TABLE_SIZE
TABLES
data_tab = XML_TABLE.
ISTREAM = STREAMFACTORY->create_istream_itable( table = XML_TABLE
size = XML_TABLE_SIZE )
Create XML Document instance
DOCUMENT = G_IXML->create_document( ).
Create parser Object
PARSER = G_IXML->create_parser( stream_factory = STREAMFACTORY
ISTREAM = istream
DOCUMENT = document ).
Parse an XML document into a DOM tree
*parser->parse( ).
Parsing Error Processing
if PARSER->parse( ) ne 0.
if PARSER->num_errors( ) ne 0.
data: PARSEERROR type ref to if_ixml_parse_error,
STR type STRING,
I type i,
COUNT type I,
INDEX type i.
COUNT = PARSER->num_errors( ).
write: COUNT, ' parse errors have occured:'.
INDEX = 0.
while INDEX < COUNT.
PARSEERROR = PARSER->get_error( INDEX = index ).
I = PARSEERROR->get_line( ).
write: 'line: ', i.
I = PARSEERROR->get_column( ).
write: 'column: ', i.
STR = PARSEERROR->get_reason( ).
write: STR.
INDEX = index + 1.
endwhile.
endif.
endif.
Close the stream since it �s not needed anymore
call method ISTREAM->close( ).
clear ISTREAM.
DATA : GV_NODE type ref to if_ixml_node.
DATA : GV_NODETEXT type STRING.
data: GV_FIRST_TIME.
GV_FIRST_TIME = 'X'.
GV_NODE = DOCUMENT.
*GT_ITEM-item_no = 1.
GT_ITEM-itemno_acc = 1.
perform GET_DATA tables GT_ITEM
using GV_NODE
changing GV_HEADER.
Last item is still not added.
append GT_ITEM.
APPEND GV_HEADER.
*T_HEADER[] = gv_header[].
t_items[] = gt_item[].
**write : GV_HEADER-cust_name,
GV_HEADER-card_no,
GV_HEADER-tax_amount,
GV_HEADER-total_amount.
**loop at GT_ITEM.
write /:.
write : GT_ITEM-item_no,
GT_ITEM-item_id,
GT_ITEM-item_title,
GT_ITEM-item_qty,
GT_ITEM-item_uprice.
**endloop.
ENDFUNCTION.
FORM Get_data *
***form get_data tables YT_ITEM structure gt_ITEM
using value(x_node) type ref to if_ixml_node
changing Y_HEADER type TY_HEADER.
form get_data1 tables YT_ITEM structure zfi_items
using value(x_node) type ref to if_ixml_node
changing Y_HEADER type zfi_header.
***form get_data tables YT_ITEM structure GT_ITEM
using value(x_node) type ref to if_ixml_node
changing Y_HEADER type TY_HEADER.
data: INDENT type i.
data: PTEXT type ref to if_ixml_text.
data: STRING type string.
data: TEMP_STRING(100).
case X_NODE->get_type( ).
when if_ixml_node=>co_node_element.
STRING = X_NODE->get_name( ).
GV_NODETEXT = STRING.
when if_ixml_node=>co_node_text.
PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
if PTEXT->ws_only( ) is initial.
STRING = X_NODE->get_value( ).
case GV_NODETEXT.
when 'Customer'.
when 'HEADER'.
clear GV_HEADER.
when 'Name'.
when 'INVOICE_IND'.
move STRING to GV_HEADER-cust_name.
move STRING to GV_HEADER-INVOICE_IND.
when 'CompanyCode'.
move STRING to GV_HEADER-CompanyCode.
when 'OBJ_TYPE'.
move STRING to GV_HEADER-OBJ_TYPE.
when 'username'.
move STRING to GV_HEADER-username.
when 'PO_reference'.
move STRING to GV_HEADER-PO_reference.
when 'Invoice_Date'.
move STRING to GV_HEADER-Invoice_Date.
when 'Posting_Date'.
move STRING to GV_HEADER-Posting_Date.
when 'Amount'.
move STRING to GV_HEADER-Amount.
when 'Currency'.
move STRING to GV_HEADER-Currency.
*APPEND GV_HEADER.
Iteam details
when 'invoice_doc_item'.
move STRING to GT_ITEM-ITEMNO_ACC.
when 'currency'.
move STRING to TEMP_STRING.
move TEMP_STRING to GT_ITEM-CURRENCY.
when 'Quantity'.
move STRING to GT_ITEM-Quantity.
when 'UoM'.
move STRING to GT_ITEM-UoM.
endcase.
endif.
endcase.
if GV_NODETEXT = 'Header'.
clear GV_HEADER.
elseif GV_NODETEXT = 'Item'.
if GV_FIRST_TIME ne 'X'.
append GT_ITEM.
clear : gt_item.
GT_ITEM-ITEMNO_ACC = gt_item-itemno_acc + 1.
endif.
GV_FIRST_TIME = ' '.
endif.
Get the next child
X_NODE = x_node->get_first_child( ).
Recurse
while not X_NODE is initial.
perform GET_DATA tables GT_ITEM
using X_NODE
changing GV_HEADER.
X_NODE = x_node->get_next( ).
endwhile.
endform.
the XML file is:-
Thanx in advance -
Hi All,
I had an requirement where the inbound idoc contains data i want to upload that data into sap. How to update the value that is coming in the Idoc to our SAP system. so that the data has to reflect in database tables.
Regards,
Karthik
Moderator message: please search for available information/documentation/how-to guides.
Edited by: Thomas Zloch on Apr 5, 2011 2:14 PMHi Madhu,
Check this link
Re: What about receiving?
Post ur query in this forum .U might get possible solutions for ur requirement.
[SAP Netweaver Mobile|SAP for Mobile;
Regards,
Lakshman. -
Upload Hierarchy data into BW using XI.
Hi I need to upload Hierarchy data for Info Object in SAP BW using SAP XI.
<b>I have gone through the XI-BI integration document but it gives only Flexible upload method which doesnt support Hierarchy data upload into BW.</b>
Can anybody suggest me the best way to upload Hierarchy data into SAP BW Info objects using SAP XI.
Advance Thanks,
Anil.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 extract non-sap data (A/R Invoices from Legacy system) into SAP ICR
Hi
We are trying to bring A/R invoices from a legacy system into SAP ICR special ledger so that ICR tool can be used these items for intercompany reconcilliation. Could you please let's know the way to load these legacy AR invoice items into ICR data base using any function moduels.
Regards,
Eswar.Hello Eswar,
In what form do you have these "external" open items? If they are contained in a file you should simply import the file in ICR during data selection using the File Upload functionality. There is no need to store them in a special purpose ledger first. Actually you would have to create a BADI implementation to extract the data from that special purpose ledger during data selection. Please consider using File Upload standard functionality.
If for some reason this cannot be used you could implement a logic calling RFC enabled function module FB_ICRC_ADD_DATA_RFC which will take the open items you are supplying in your logic and push them into the ICR database. This strategy could be used to include these external open items without them being processed during data selection.
Best regards,
Ralph
Maybe you are looking for
-
How to download a file from a custom server location?
Hello experts, I have the following scenario: A BAPI creates an .exe file and stores it in a custom folder in the server where the portal (and my WD application) is running. This happens once a day. What I need to do is create a link or button (doesn
-
Recorded MPEG-2. Now confused/need help importing DV or MPEG-4? Help!
HI there from Buffalo NY and a year-old mac user I'm using ... a JVC Hard disk camcorder (GZ-MG20U) which records in MPEG-2 format. iMovie HD 5.0.2 won't accept these files when I try to import, so I'm using the software that came with the camera (Ca
-
When I try to edit a photo in iphoto, I select a photo and click on the edit button but all it does is duplicate the photo and doesn't give me any editing tools. How can I fix this? I have tried exporting a photo, importing it again but the same thi
-
Got Officejet 6600 from third party vendor, had no setup cartridges​.
My company bought an HP 6600 to use as a standalone copier. It's not hooked up to any computer. Our printer did not come with setup cartridges (All original packing intact, but company removed the setup cartridges for their own use.). This was commun
-
Use 1 stylesheet to translate 2 xml documents(raw data)into one result xml
I have one java application which can generate two xml documents (raw data), now i want to have one result xml which contains contents of these two xml documents(raw data) by using one stylesheet. is it possible? how to match template in the styleshe