File-xi- sap to create a PO
hi,
I am having the requirement file-xi-r3 create po, can any one tell me the necessary steps needed for this. i am new to all this and still learning things, so please help me.
thank you
Hey
you can use PORDCR04 IDOC,and u dont have to use BAPI for this,i guess ur not doing a sync scenario.
thanx
ahmad
Message was edited by:
Ahmad
Similar Messages
-
Creating an RDI file from SAP script
Hello All,
I would like to create an RDI file from SAP Script.
Please can anyone let me know how do we do it programmatically.
I am aware of the option of setting RDI parameter to 'X'.
However my requirement is to allow user to have a print preview option and simulatenously create RDI file .
Thanks and Regards
AmrutaSee:
http://discussions.apple.com/message.jspa?messageID=11535851#11535851 -
Dynamic title for Chart created by an xml-file in SAP ChartDesigner
Hello everybody.
I created an xml-file with SAP ChartDesigner for using it in my abap program. I import this file as a MIME-Object.
Everything works fine, i declared my charts and all my values.
But now I need a dynamic title on the top.
And know that I can give a title in my xml. But it's not dynamic.
I looked into the xml file and the path for the title is:
SAPChartCustomizing
Elements
ChartElements
Title
and then Caption.
p_ixml_doc = g_ixml->create_document( ).
l_encoding = g_ixml->create_encoding( byte_order = if_ixml_encoding=>co_little_endian character_set = 'utf-8' ).
p_ixml_doc->set_encoding( l_encoding ).
l_chartdata = p_ixml_doc->create_simple_element( name = 'SAPChartCustomizing' parent = p_ixml_doc ).
l_elements = p_ixml_doc->create_simple_element( name = 'Elements' parent = l_chartdata ).
l_chartelements = p_ixml_doc->create_simple_element( name = 'ChartElements' parent = l_elements ).
l_title = p_ixml_doc->create_simple_element( name = 'Title' parent = l_chartelements ).
l_element = p_ixml_doc->create_simple_element( name = 'Caption' parent = l_title ).
l_element->if_ixml_node~set_value( 'QRK-Mittelwert' ).
In my opinion, it's the right path :/
My other values i declare like this.
l_series = p_ixml_doc->create_simple_element( name = 'Series' parent = l_chartdata ).
l_series->set_attribute( name = 'label' value = 'TO' ).
l_series->set_attribute( name = 'customizing' value = 'Series1' ).
loop at gt_mw into gs_mw.
lv_tabix = sy-tabix.
l_point = p_ixml_doc->create_simple_element( name = 'Point' parent = l_series ).
l_element = p_ixml_doc->create_simple_element( name = 'Value' parent = l_point ).
l_element->set_attribute( name = 'type' value = 'x' ).
l_element->if_ixml_node~set_value( lv_tabix ).
l_element = p_ixml_doc->create_simple_element( name = 'Value' parent = l_point ).
l_element->set_attribute( name = 'type' value = 'y' ).
l_element->if_ixml_node~set_value( '35.00' ).
endloop.
It works...and i already checked this solution for my title, but it didn't work.
I call the xml file with the method cl_wb_mime_repository:
CALL METHOD cl_wb_mime_repository=>load_mime
EXPORTING
io = lv_io
IMPORTING
bin_data = lt_xmlr
CHANGING
language = sy-langu
EXCEPTIONS
no_io = 1
illegal_io_type = 2
not_found = 3
error_occured = 4
OTHERS = 5.
CHECK sy-subrc = 0.
*-- Convert raw to xstring
CREATE OBJECT lo_conv.
LOOP AT lt_xmlr INTO ls_xmlr.
CALL METHOD lo_conv->convert
EXPORTING
inbuff = ls_xmlr
outbufflg = 25000
IMPORTING
outbuff = lv_xstr.
CONCATENATE p_xml lv_xstr INTO p_xml IN BYTE MODE.
Maybe somebody can help me.
Thanks a lot.I got it!
This thread helped me.
[http://forums.sdn.sap.com/thread.jspa?threadID=1343796|http://forums.sdn.sap.com/thread.jspa?threadID=1343796] -
I want read PDF file from SAP directory and create a spool request or print
Hi all,
I want read PDF file from SAP directory and create a spool request or print the pdf through SAP. Can any body help me in this.
Also please write to me if its possible to open PDF from SAP directory to adobe pdf reader.
Thanks in advance,
SunnyHi Sunny,
Check these links.
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
http://www.erpgenie.com/sap/abap/pdf_creation.htm
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
Hope this resolves your query.
Reward all the helpful answers.
Regards -
How do I create rules files in Sap Data Services
Hello Guys,
I'm new with Bo Sap Development Data Services, and am migrating SSIS packages 2008 for the bods.
I am studying the process of cleanup and word processing via bods.
But I noticed that my installation does not have Rules Files.
My question is:
How do I create rules files in Sap Data Services library with support for Portuguese?Hello Ramana,
So with version 4.2 of Sap Data Services do not currently have the rules files?
How to mount files for text comparison Cleanse facing Addresses, Names, Clients, Companies? If you can give me some help link?
Thanks again ... -
Create an outbound flat file .txt file from SAP to UAPM.
How to Create an outbound flat file .txt file from SAP to UAPM (Unicenter Asset Portfolio Management).
What do u want in flat file and what is your doubt please let me know as iam working i can help u
-
FILE /usr/sap/trans/bin/DOMAIN.CFG could not be created
Hi
After a DB copy into the QAS system the TMS will not connect to QAS. I set the CHGR3SHLOC to the domain controller and ran SE06 to delete and reset the TMS as DDIC in client 000.
When I run TMS on the QAS box and try to include QAS in the DOMAIN_DEV I get the message
FILE /usr/sap/trans/bin/DOMAIN.CFG could not be created.
I have all the QAS accounts on the TMS domain controller and they have the same password on both systems.
Any one else had this one? Its v5r3 and 4.6c releases.
Thanks
Matt Milne
Freelance SAP BASIS ConsultantHi Matt,
I'm pretty sure, you are missing one:
sidnn ...
Change this user on QAS so that you can logon and logon and try to edit the following file:
edtf '/usr/sap/trans/bin/test.txt'
I guess, you run into the same issue ... that needs to be fixed first ... most likely the wrong password for this user (default: sapNNpwd)
Regards
Volker Gueldenpfennig, consolut.gmbh
http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de -
Creating Installer Files for SAP Programs
Hi All,
I have created one Z* transaction and I would like to create a installer file for this transaction. It includes tables, screens and reports and I would like to make it a installer file. All these objetcs are under one transport request. Any kind of help would be great in this regard.Hi,
There is no concept of installer files in SAP. You can only transport the request to a different system and can start running the transaction code in the system.
ABAP cannot be running as a stand alone EXE file, it needs the SAP environment.
REgards,
Ravi
Note : Please mark all the helpful answers -
How to store multiple files from SAp in to Application server?
Hi Guys,
Can anybody tell me how to store multiple files from SAP into Application server.in my application i have to get the data from SAP tables BSEG , BKPF , BSAK and BSIK that to daily i have to do.
Any Logic or Code for how to do is welcomed.
plz help me urgently.
Thanks,
GopiHi,
directories creates basis. If you have task to store data in application server you already should have information into which folder you have to do it. If you don't have this information because it is just for example training for next task then you can use your personal folder into which you have access. To get list of all available folders please look at attached code and form get_directories (you get the list of folders you see in transaction AL11). But don't forget: If you are using open dataset you have to have rights to access application folder!
Here you are code which I use to upload text files from local disc into application folder
Regards,
Karol
*& Report FILE_PC_TO_SAP
REPORT FILE_PC_TO_SAP.
DATA: BEGIN OF searchpoints OCCURS 100,
DIRNAME(200) TYPE c, " name of directory.
sp_name(100) TYPE c," name of entry. (may end with *)
END OF searchpoints.
DATA: BEGIN OF isearchpoints OCCURS 10,
dirname(75) TYPE c, " name of directory.
aliass(75) TYPE c, " alias for directory.
svrname(75) TYPE c, " svr where directory is availabl
sp_name(75) TYPE c, " name of entry. (may end with *)
sp_cs(10) TYPE c, " ContainsString pattern for name
END OF isearchpoints.
data: l_file type filetable.
data: l_rc type i.
data: itab type TABLE OF string.
data: g_tmp_file_path type rlgrap-filename.
data: wa_itab type string.
data: h_destin(100) type c.
data: dat type string.
INITIALIZATION.
perform get_directories.
START-OF-SELECTION.
parameters: in_file type string OBLIGATORY LOWER CASE.
parameters: destin(100) type c OBLIGATORY LOWER CASE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = in_file
"FILETYPE = 'BIN'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
TABLES
DATA_TAB = itab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF sy-SUBRC <> 0.
write: / 'Error during loading input file!'.
ENDIF.
if h_destin is INITIAL.
h_destin = in_file.
endif.
CONCATENATE destin h_destin into dat SEPARATED BY '/'.
*TRANSLATE dat TO UPPER CASE.
OPEN DATASET dat FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-SUBRC = 0.
loop at itab into wa_itab.
TRANSFER: wa_itab TO dat.
endloop.
CLOSE DATASET dat.
write: / 'File uploaded!'.
ELSE.
write: / 'Not possible to open dataset'.
ENDIF.
at selection-screen on value-request for in_file.
perform select_input_file_name.
loop at l_file into g_tmp_file_path.
move g_tmp_file_path to in_file.
h_destin = ''.
SPLIT g_tmp_file_path at '\' into table itab.
loop at itab into g_tmp_file_path.
h_destin = g_tmp_file_path.
endloop.
endloop.
at selection-screen on value-request for destin.
DATA: lt_dfies TYPE TABLE OF dfies.
DATA: lwa_dfies TYPE dfies.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = '/BI0/PCO_AREA'
lfieldname = 'CO_AREA'
IMPORTING
dfies_wa = lwa_dfies.
lwa_dfies-tabname = 'searchpoints'.
lwa_dfies-REPTEXT = 'Destination directory'.
lwa_dfies-LENG = 100.
lwa_dfies-INTLEN = 100.
lwa_dfies-OUTPUTLEN = 100.
lwa_dfies-fieldname = 'SP_NAME'.
APPEND lwa_dfies TO lt_dfies.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'SP_NAME'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'destin'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = searchpoints
FIELD_TAB = lt_dfies
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
*& Form select_input_file_name
* text
form select_input_file_name.
* call function 'F4_FILENAME'
* exporting
* program_name = sy-repid
* dynpro_number = sy-dynnr
* field_name = 'PATH'
* importing
* file_name = g_tmp_file_path.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'Please choose a file'
"default_extension = '*.TXT'
"default_filename = 'C:\*.txt'
initial_directory = 'C:\'
file_filter = '*.*'
CHANGING
FILE_TABLE = l_file
RC = l_RC
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "select_input_file_name
*& Form WRITE_DB_HOME
* Write DB home directory
* no parameters
FORM write_db_home.
CASE sy-dbsys(3).
WHEN 'ORA'.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_ORAHOME'
ID 'VALUE' FIELD searchpoints-dirname.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_ORAHOME', 30 searchpoints-dirname.
MOVE: 'DIR_ORAHOME' TO searchpoints-sp_name.
APPEND searchpoints.
*--- C5056155 End of ALV -------------------------------*
WHEN 'ADA'.
CALL 'C_GETENV' ID 'NAME' FIELD 'DBROOT'
ID 'VALUE' FIELD searchpoints-dirname.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_ADA_DBROOT', 30 searchpoints-dirname.
MOVE: 'DIR_ADA_DBROOT' TO searchpoints-sp_name.
APPEND searchpoints.
*--- C5056155 End of ALV -------------------------------*
WHEN 'INF'.
CALL 'C_GETENV' ID 'NAME' FIELD 'INFORMIXDIR'
ID 'VALUE' FIELD searchpoints-dirname.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_INF_INFORMIXDIR', 30 searchpoints-dirname.
MOVE: 'DIR_INF_INFORMIXDIR' TO searchpoints-sp_name.
APPEND searchpoints..
*--- C5056155 End of ALV -------------------------------*
WHEN 'DB6'.
CALL 'C_GETENV' ID 'NAME' FIELD 'INSTHOME'
ID 'VALUE' FIELD searchpoints-dirname.
IF sy-subrc = 0.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_DB2_HOME', 30 searchpoints-dirname.
MOVE: 'DIR_DB2_HOME' TO searchpoints-sp_name.
APPEND searchpoints.
*--- C5056155 End of ALV -------------------------------*
ELSE.
EXIT.
ENDIF.
WHEN OTHERS.
EXIT.
ENDCASE.
ENDFORM. " WRITE_DB_HOME
FORM get_directories.
* get the name and aliases of ALL userdefined directories
SELECT * FROM user_dir INTO isearchpoints
WHERE svrname = sy-uname.
MOVE isearchpoints-dirname to searchpoints-dirname.
MOVE isearchpoints-aliass to searchpoints-sp_name.
APPEND searchpoints.
ENDSELECT.
SELECT * FROM user_dir INTO isearchpoints
WHERE svrname = 'all'.
MOVE isearchpoints-dirname to searchpoints-dirname.
MOVE isearchpoints-aliass to searchpoints-sp_name.
APPEND searchpoints.
ENDSELECT.
* Get DB home
IF sy-dbsys(3) = 'ADA'.
PERFORM write_db_home.
ENDIF.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_ATRA'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_ATRA' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_BINARY'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_BINARY' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory $DIR_CCMS
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_CCMS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_CCMS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_CT_LOGGING'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_CT_LOGGING' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_CT_RUN'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_CT_RUN' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_DATA'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_DATA' TO searchpoints-sp_name.
APPEND searchpoints.
* Get DB home
IF sy-dbsys(3) = 'DB6'.
PERFORM write_db_home.
ENDIF.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_DBMS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_DBMS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_EXECUTABLE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_EXECUTABLE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_EXE_ROOT'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_EXE_ROOT' TO searchpoints-sp_name.
APPEND searchpoints.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GEN'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GEN' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GEN_ROOT'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GEN_ROOT' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GLOBAL'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GLOBAL' TO searchpoints-sp_name.
APPEND searchpoints.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GRAPH_EXE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GRAPH_EXE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GRAPH_LIB'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GRAPH_LIB' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_HOME'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_HOME' TO searchpoints-sp_name.
APPEND searchpoints.
* Get DB home
IF sy-dbsys(3) = 'INF'.
PERFORM write_db_home.
ENDIF.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_INSTALL'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_INSTALL' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_INSTANCE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_INSTANCE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_LIBRARY'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_LIBRARY' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_LOGGING'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_LOGGING' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the files written by the memory inspector
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_MEMORY_INSPECTOR'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_MEMORY_INSPECTOR' TO searchpoints-sp_name.
APPEND searchpoints.
* Get DB home
IF sy-dbsys(3) = 'ORA'.
PERFORM write_db_home.
ENDIF.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PAGING'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PAGING' TO searchpoints-sp_name.
APPEND searchpoints.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PUT'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PUT' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PERF'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PERF' TO searchpoints-sp_name.
APPEND searchpoints.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PROFILE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PROFILE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PROTOKOLLS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PROTOKOLLS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_REORG'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_REORG' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_ROLL'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_ROLL' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_RSYN'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_RSYN' TO searchpoints-sp_name.
APPEND searchpoints.
* calculate directory for saphostagent (no sapparam available...)
IF ( sy-opsys(3) = 'WIN' ) OR ( sy-opsys(3) = 'Win' ).
DATA: windir_path(64), programfiles_path(64).
* hoping that ProgramFiles is set in service user environment
CALL 'C_GETENV' ID 'NAME' FIELD 'ProgramFiles'
ID 'VALUE' FIELD programfiles_path.
IF programfiles_path IS INITIAL.
* %ProgramFiles% not available. guess from windir
CALL 'C_GETENV' ID 'NAME' FIELD 'windir'
ID 'VALUE' FIELD windir_path.
* e.g. S:\WINDOWS ==> S:\Program Files
CONCATENATE windir_path(3) 'Program Files' INTO programfiles_path.
ENDIF.
CONCATENATE programfiles_path '\SAP\hostctrl'
INTO searchpoints-dirname.
ELSE.
* on UNIX, the path is hard coded
searchpoints-dirname = '/usr/sap/hostctrl'.
ENDIF.
MOVE: 'DIR_SAPHOSTAGENT' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SAPUSERS'
ID 'VALUE' FIELD searchpoints-dirname.
IF searchpoints-dirname = '.'.
IF sy-opsys = 'Windows NT'.
searchpoints-dirname = '.\'.
ELSE.
searchpoints-dirname = './'.
ENDIF.
ENDIF.
MOVE: 'DIR_SAPUSERS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SETUPS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_SETUPS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SORTTMP'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_SORTTMP' TO searchpoints-sp_name.
APPEND searchpoints.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SOURCE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_SOURCE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TEMP'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TEMP' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRANS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TRANS' TO searchpoints-sp_name.
APPEND searchpoints.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRFILES'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TRFILES' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRSUB'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TRSUB' TO searchpoints-sp_name.
APPEND searchpoints.
* get the name of the current server.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'rdisp/myname'
ID 'VALUE' FIELD searchpoints-dirname.
data: h_ind type i.
LOOP AT searchpoints.
h_ind = sy-tabix.
IF searchpoints-sp_name IS INITIAL.
DELETE searchpoints INDEX h_ind.
ENDIF.
ENDLOOP.
ENDFORM. -
How to upload schedule line from flat files to sap file
dear all,
i want to upload the schedule lines from flat files to sap schedulle lines
but the flat files have 15 schedule lines and the data is as per date
so how to upload that and the fields available in flat files are more than the sap screen
we are having more than 6 items
and 15scedule lines its abt 90data to be upload
for one customer in every 15 day
so how to do this
is there any direct use in functional side
with out the help of any abap
but my user will do it
so he need a permanent solution
with regards
subratHi Subrat ,
u can upload the data either ( Master /Transaction) data with the help of lsmw. for that all u need to do is go through the lsmw and do it. in that u can go Batch input recording/ BAPI/ IDOC any of that. here i am sending the LSMW Notes go through it and do the work.
once u create the LSMW project then u can ask the data from user or u can explain the user about the program and can run the flat file to upload the data.
if u require LSMW material Just send me blank mail from u. my mail id is [email protected]
Reward if Helpful.
Regards,
Praveen Kumar.D -
Hello,
I'm looking for a way to print a .pdf file from sap . The file was created manualy and is in a newtwork folder.
I have to send the print to a network printer . Is it possible to use the AcroRd32.exe as a command line?
Thank you.hii,
try this
CONVERT_OTFSPOOLJOB_2_PDF
http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm
PDF - Printing a PDF file from ABAP or SAP Script
regards,
Sri. -
Hello Experts,
I follow the flightbooking tutorial to create a Material application to get material list. I can start the agentry server but when I connect to SAP server and get data, I face below issue
Error in getting the BAPIWrapper name from the ini file or SAP mobile configuration. Please check the ini file or the mobile configuration for the bapi key (com.syclo.sap.material.bapi.materialbapi) either in sections BAPI_WRAPPER or REQUIRED_BAPI_WRAPPER
I check the parameters name in SAP Agentry Config panel, all are correct. Why cannt it get the data. Do I have to add anything in javaBE.ini? Please help me. Thank you very much.
My javaBE
[HOST]
server=be1.vdc.csc.com
APPNAME=ZCH_MATERIALLIST
[CLIENT_NUM]
CLIENT=800
[SYSTEM_NUM]
SYSNUM=01
[LOGON_METHOD]
; USER_AUTH if standard UID/Password authentication is used
; USER_AUTH_GLOBAL if pooled connections using single UID/Password is used
; USER_AUTH_GROUP if UID/Password authentication with SAP Message Server
; (load balancing) is used
LOGON_METHOD=USER_AUTH
[GLOBAL_LOGON]
; referenced when LOGON_METHOD=USER_AUTH_GLOBAL
; uses a pool of connections to the SAP backend all utilizing a single
; UID/password
UID=
UPASSWORD=
SHAREDCONNECTION=0
GET_PERSONNEL_INFO=
[SERVICE_LOGON]
ENABLED=true
UID=hngu3
UPASSWORD=xxxxxxx
UPASSWORDENCODED=false
[GROUP_LOGON]
; referenced when LOGON_METHOD=USER_AUTH_GROUP
; individual user authentication using an SAP Message Server which distributes
; client connections among a "group" of SAP application servers based on load
; balancing criteria
; host name or IP address of SAP Message Server
MESSAGE_SERVER=
GROUP_NAME=
SYSTEM_ID=
CLIENT=
[LANGUAGE]
LANG=EN
[LOGGING]
Level=4
[REQUIRED_BAPI_WRAPPER]
com.syclo.sap.bapi.LoginCheckBAPI=/SYCLO/CORE_SUSR_LOGIN_CHECK
com.syclo.sap.bapi.RemoteUserCreateBAPI=/SYCLO/CORE_MDW_SESSION1_CRT
com.syclo.sap.bapi.RemoteParameterGetBAPI=/SYCLO/CORE_MDW_PARAMETER_GET
com.syclo.sap.bapi.SystemInfoBAPI=/SYCLO/CORE_SYSTINFO_GET
com.syclo.sap.bapi.ChangePasswordBAPI=/SYCLO/CORE_SUSR_CHANGE_PASSWD
com.syclo.sap.bapi.CTConfirmationBAPI=/SYCLO/CORE_OUTB_MSG_STAT_UPD
com.syclo.sap.bapi.DTBAPI=/SYCLO/CORE_DT_GET
com.syclo.sap.bapi.GetEmployeeDataBAPI=/SYCLO/HR_EMPLOYEE_DATA_GET
com.syclo.sap.bapi.GetUserDetailBAPI=/SYCLO/CORE_USER_GET_DETAIL
com.syclo.sap.bapi.GetUserProfileDataBAPI=/SYCLO/CORE_USER_PROFILE_GET
com.syclo.sap.bapi.PushStatusUpdateBAPI=/SYCLO/CORE_PUSH_STAT_UPD
com.syclo.sap.bapi.RemoteObjectCreateBAPI=/SYCLO/CORE_MDW_USR_OBJ_CRT
com.syclo.sap.bapi.RemoteObjectDeleteBAPI=/SYCLO/CORE_MDW_USR_OBJ_DEL
com.syclo.sap.bapi.RemoteObjectGetBAPI=/SYCLO/CORE_MDW_SESSION_GET
com.syclo.sap.bapi.RemoteObjectUpdateBAPI=/SYCLO/CORE_MDW_SESSION_UPD
com.syclo.sap.bapi.RemoteReferenceCreateBAPI=/SYCLO/CORE_MDW_USR_KEYMAP_CRT
com.syclo.sap.bapi.RemoteReferenceDeleteBAPI=/SYCLO/CORE_MDW_USR_KEYMAP_DEL
com.syclo.sap.bapi.RemoteReferenceGetBAPI=/SYCLO/CORE_MDW_SESSION_GET
com.syclo.sap.bapi.RemoteReferenceUpdateBAPI=/SYCLO/CORE_MDW_SESSION_UPD
com.syclo.sap.bapi.RemoteSessionDeleteBAPI=/SYCLO/CORE_MDW_SESSION1_DEL
com.syclo.sap.bapi.RemoteUserDeleteBAPI=/SYCLO/CORE_MDW_SESSION1_DEL
com.syclo.sap.bapi.RemoteUserUpdateBAPI=/SYCLO/CORE_MDW_SESSION_UPD
com.syclo.sap.bapi.TransactionCommitBAPI=WFD_TRANSACTION_COMMIT
com.syclo.sap.bapi.SignatureCaptureBAPI=/SYCLO/CS_DOBDSDOCUMENT_CRTHi Tahir, please help me check the log below
Agentry Runtime Worker Thread###throwExceptionToClient::begin |
Agentry Runtime Worker Thread###throwExceptionToClient::com.syclo.sap.material.steplet.MaterialSteplet::throwExceptionToClient::397::MaterialSteplet - Error in getting the BAPIWrapper name from the ini file or SAP mobile configuration. Please check the ini file or the mobile configuration for the bapi key (com.syclo.sap.material.bapi.materialbapi) either in sections BAPI_WRAPPER or REQUIRED_BAPI_WRAPPER |
Agentry Runtime Worker Thread###Exception: 17:15:35 06/17/2014 : 20 (Agentry3), Java Business Logic Error (com.syclo.agentry.BusinessLogicException: MaterialSteplet - Error in getting the BAPIWrapper name from the ini file or SAP mobile configuration. Please check the ini file or the mobile configuration for the bapi key (com.syclo.sap.material.bapi.materialbapi) either in sections BAPI_WRAPPER or REQUIRED_BAPI_WRAPPER), |
Agentry Runtime Worker Thread###loggedOut::begin |
Agentry Runtime Worker Thread###HNGU3: SESSION END |
Agentry Runtime Worker Thread###BAPI::begin |
Agentry Runtime Worker Thread###create::nulled repository::created new repository |
Agentry Runtime Worker Thread###create::/SYCLO/CORE_MDW_SESSION1_DEL Connection ID: com.sap.mw.jco.JCO$Client@2656ed99 |
Agentry Runtime Worker Thread###create::Function /SYCLO/CORE_MDW_SESSION1_DEL created | -
Reading TXT file to SAP table.
Hi everyone,
my task is to read data from chosen text file into table I created.
Text file look like this:
ID_ASK|DATA_OD|DATA_DO|
1234|20140517|20140824|
ID_MAG|ID_ASO|ID_KAT_ASO|SOURCE|NAME|
12|23|34|600156|TEST NAME1|
ID_MAG|ID_ASO|ID_KAT_ASO|SOURCE|NAME|
23|24|54|600156|TEST_NUMR2|
Header "ID_ASK|DATA_OD|DATA_DO|" occurs only once, while header "ID_MAG|ID_ASO|ID_KAT_ASO|SOURCE|NAME|" can occur many times.
I want to insert those values (except of headers, of course) into my SAP table:
Table Fields
Fields from file
ZIDASK
ID_ASK
ZIDMAG
ID_MAG
ZIDASO
ID_ASO
ZIDKAT
ID_KAT_ASO
ZZRCEL
SOURCE
ZDAOD
DATA_OD
ZDADO
DATA_DO
ZKATNAM
NAME
I want user to choose file from browser and I am using F4_FILENAME function.
1. To avoid reading header into table I think I'll use something like this (in loop, of course):
IF (lv_linecounter MOD 2) = 1.
CONTINUE.
ELSE.
SPLIT something AT '|' INTO those_fields.
2. What should be next function to call?
3. Is declaring separate types for those two headers a good idea?
TYPES: BEGIN OF ty_output_hdr,
id_ask type zask-zidask,
data_od TYPE zask-zdaod,
data_do TYPE zask-zdado,
END OF ty_output_hdr.
TYPES: BEGIN OF ty_output_pos,
id_mag TYPE zask-zidmag,
id_aso TYPE zask-zidaso,
id_kat_aso TYPE zask-zidkat,
source TYPE zask-zzrcel,
name TYPE zask-zkatnam,
END OF ty_output_pos.
With kind regards,
BartlomiejHello Bartlomiej,
His logic for processing (item 1) is correct and you can do the processing in this way without any problems.
Regarding item 2, after the process of SPLIT, you can assign information to a structure and then insert the contents in the table individually.
SPLIT gs_line
AT '|'
INTO gv_fieldA
gv_fieldB
gv_fieldC.
gs_data-fieldA = gv_fieldA.
gs_data-fieldB = gv_fieldB.
gs_data-FieldC = gv_fieldC.
INSERT FROM ZTABLE gs_data.
Regarding item 3, a separate statement, however it manages more lines, is the best method that can be applied, allowing a subsequent maintenance will not affect other component.
Regarding F4_FILENAME object, you can use it on AT SELECTION-SCREEN event of report:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = '
IMPORTING
file_name = p_file.
Tks
Renato Bertizini -
Data Services XI3.1 function module files for SAP R/3 is not working
Hi guys,
Thank you for the quick response so far. I am very grateful to you all.
I got an issue and will try to explain as detail as I could and
hope ur guys won't mind. :P
I pass the functions module to SAP tech guy to install to SAP using CTS
method, and using 900086.R63 file type because my chinese client is
running SAP on unicode environment.
My DS installed on my laptop client; job server plus db2 is on HP
unix. SAP is on another HP Unix server. The function module I used is
supplied from Data Services XI3.1.
Anyway, the installation is successfully done with GUI wizard windows of
SAP Workbench instead of tp command line method.
1)However, I checked the ZAW0 function group, I opened and can't see any functions
listed under it, although the table structures ZACTA, ZTAB2048 and other items
were created.
2)So I tried to create SAP Datastore, Transport Target, etc and tried to
extract file. It failed and log said "can't open file ---
/db2/temp/curcode.txt". I checked and SAP working directory /db2/temp didn't have
curcode.txt, because the result file supposed to be extracted and stored there.
The SAP tech guy checked SAP and cant find generated ABAP program of
ZCURCD is running anyway, although my local CURCD ABAP program is
created.
3)Is it the 900086.R63 not complete? Is my function installation correct? I could view data
on datastore, but just cant run job to extract. Another non-unidcode 900200.S08 group
has larger file sizes. Should I try to install also this 900200.S08 files? Will it corrupt SAP
and cause system errors?
4)After that, I had tried to install the functions manually into ZAW0
one by one using cut and paste, however after that, I cant view the data view anymore with
error. Besides, I tried to run Check on the functions and they all returned
syntax errors, so I cant Activate any of them with SAP. Maybe dependency is missing??
Then, I deleted the manually installed functions and can view data again, but just cant extract
data by job.
5)Another side issue is all these SAP datastore creation and viewing is
through DI 11.5 old installation. The new Data Services X3.1 unable to
create datastore with database error, although the function module
installed is came from Data Services. Does anyone know the issue?
Thank you very much to read it patiently. :PHi,
Thank you for the informative link. It did help a lot in solving the problem.
(1) to (4) --- The Sap tech guy didnt install the function programs correctly, and he redo the transport again using CTS. Now I can see all the functions inside the function group ZAW0. While for the problem of cannot generate extracted file to SAP working directory for downloading, it is due to unix directory access permission setting. And also have to include the ftp username into SAPSYS user group as the help link suggested.
(5) For this problem, I reinstalled again the DS with all required components like Server Manager. The network technical guy helped me with the first installation, and the installation was not complete. So now the issue is solved, I can create R/3 Datastore with DS. -
Dear friends
For converting XML file to SAP, I used TEXT_CONVERT_XML_TO_SAP function module. In this I have some doubt. Pls clarify this.
1. I am getting run time error with type h.
2 I_FIELD_SEPERATOR = ';'
I_LINE_HEADER =
I_TAB_RAW_DATA =
I_FILENAME =
I_TOTALSIZE =
for the above parameter what are the value has to passed.
Thanks.Hi,
Take a look in this code:
*& Report z_xit_xml_check
REPORT z_xit_xml_check.
TYPE-POOLS: ixml.
DATA: BEGIN OF t_cabec OCCURS 0.
INCLUDE STRUCTURE zmmt2010.
DATA END OF t_cabec.
DATA: BEGIN OF t_item OCCURS 0.
INCLUDE STRUCTURE zmmt2011.
DATA END OF t_item.
DATA: BEGIN OF t_itemt OCCURS 0.
INCLUDE STRUCTURE zmmt2012.
DATA END OF t_itemt.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA check_item(1).
DATA check_itemt(1).
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.
DATA: l_elem TYPE REF TO if_ixml_element,
l_root_node TYPE REF TO if_ixml_node,
l_next_node TYPE REF TO if_ixml_node,
l_name TYPE string,
l_iterator TYPE REF TO if_ixml_node_iterator.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\xml.xml'.
START-OF-SELECTION.
PERFORM busca_xml.
PERFORM carrega_tabela.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
Local variable declaration
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab TYPE TABLE OF string.
l_filename = pa_file.
upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "get_xml_table
*& Form process_dom
FORM process_dom USING document TYPE REF TO if_ixml_document.
DATA: node TYPE REF TO if_ixml_node,
iterator TYPE REF TO if_ixml_node_iterator,
nodemap TYPE REF TO if_ixml_named_node_map,
attr TYPE REF TO if_ixml_node,
name TYPE string,
prefix TYPE string,
value TYPE string,
indent TYPE i,
count TYPE i,
index TYPE i.
DATA v_codcat TYPE zmmt2011-codcat.
DATA v_master_for TYPE zmmt2011-master_for.
node ?= document.
CHECK NOT node IS INITIAL.
IF node IS INITIAL. EXIT. ENDIF.
create a node iterator
iterator = node->create_iterator( ).
get current node
node = iterator->get_next( ).
loop over all nodes
WHILE NOT node IS INITIAL.
indent = node->get_height( ) * 2.
indent = indent + 20.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
element node
name = node->get_name( ).
TRANSLATE name TO LOWER CASE.
IF name = 'iten'.
MOVE 'I' TO check_item.
ENDIF.
IF name = 'cabec'.
MOVE 'C' TO check_item.
ENDIF.
IF name = 'iten_texto'.
MOVE 'T' TO check_item.
ENDIF.
nodemap = node->get_attributes( ).
IF NOT nodemap IS INITIAL.
attributes
count = nodemap->get_length( ).
DO count TIMES.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
text node
value = node->get_value( ).
IF check_item = 'C'.
TRANSLATE name TO LOWER CASE.
CASE name.
WHEN 'lifnr'. MOVE value TO t_cabec-lifnr.
WHEN 'codcat'.
MOVE value TO t_cabec-codcat.
MOVE value TO v_codcat.
WHEN 'bukrs'. MOVE value TO t_cabec-bukrs.
WHEN 'zterm'. MOVE value TO t_cabec-zterm.
WHEN 'waers'. MOVE value TO t_cabec-waers.
WHEN 'inco1'. MOVE value TO t_cabec-inco1.
WHEN 'inco2'. MOVE value TO t_cabec-inco2.
WHEN 'telf1'. MOVE value TO t_cabec-telf1.
WHEN 'verkf'. MOVE value TO t_cabec-verkf.
WHEN 'datav'.
MOVE value TO t_cabec-datav.
APPEND t_cabec.
ENDCASE.
ENDIF.
IF check_item = 'I'.
TRANSLATE name TO LOWER CASE.
CASE name.
WHEN 'master_for'.
MOVE value TO t_item-master_for.
MOVE value TO v_master_for.
WHEN 'werks'. MOVE value TO t_item-werks.
WHEN 'versao'. MOVE value TO t_item-versao.
WHEN 'matkl'. MOVE value TO t_item-matkl.
WHEN 'j_1bindus3'. MOVE value TO t_item-j_1bindus3.
WHEN 'j_1bmatuse'. MOVE value TO t_item-j_1bmatuse.
WHEN 'j_1bmatorg'. MOVE value TO t_item-j_1bmatorg.
WHEN 'j_1bnbmco1'. MOVE value TO t_item-j_1bnbmco1.
WHEN 'bsgru'. MOVE value TO t_item-bsgru.
WHEN 'ekgrp'. MOVE value TO t_item-ekgrp.
WHEN 'txz01'. MOVE value TO t_item-txz01.
WHEN 'epstp'. MOVE value TO t_item-epstp.
WHEN 'netpr'. MOVE value TO t_item-netpr.
WHEN 'peinh'. MOVE value TO t_item-peinh.
WHEN 'meins'. MOVE value TO t_item-meins.
WHEN 'plifz'. MOVE value TO t_item-plifz.
WHEN 'mwskz'. MOVE value TO t_item-mwskz.
WHEN 'steuc'.
MOVE value TO t_item-steuc.
MOVE v_codcat TO t_item-codcat.
APPEND t_item.
ENDCASE.
ENDIF.
IF check_item = 'T'.
TRANSLATE name TO LOWER CASE.
CASE name.
WHEN 'linha'. MOVE value TO t_itemt-linha.
WHEN 'txlng'. MOVE value TO t_itemt-txlng.
MOVE v_master_for TO t_itemt-master_for.
MOVE v_codcat TO t_itemt-codcat.
append t_itemt.
ENDCASE.
ENDIF.
ENDCASE.
advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom
*& Form Busca_XML
text
--> p1 text
<-- p2 text
FORM busca_xml .
DATA: lc_mess(70) TYPE c,lv_tab.
TYPES: BEGIN OF ty_zvmsgorgtr.
INCLUDE STRUCTURE zmmt2011.
TYPES END OF ty_zvmsgorgtr.
Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table =
l_xml_table size = l_xml_table_size ).
Creating a document
l_document = l_ixml->create_document( ).
Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
Parse the stream
IF l_parser->parse( ) NE 0.
IF l_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 = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_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.
ENDFORM. " Busca_XML
*& Form Carrega_Tabela
text
--> p1 text
<-- p2 text
FORM carrega_tabela .
Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
PERFORM process_dom USING l_document.
ENDIF.
ENDFORM. " Carrega_Tabela
Maybe you are looking for
-
Saving apps to another folder?
Hi All, Is there any way to get iTunes to save my apps automatically in my iTunes folder rather than "My Documents" folder? (I'm using a Windows machine). I have all my music pointed to another drive (which is a RAID), but the apps always download to
-
Currency translation - based on posting date
Hi everyone.. im again posting this topic bcos im in need of a solution for my problem as early as possible.please excuse me. Problem related to currency conversion: Im taking a report from sales order and billing cube,and the report is coming fine,b
-
I need a new Macbook but -.I need advice regarding the new fixed configurations
I have a MacBook from 2007 and it probably needs replacing as I'm starting to see problems, little hints that any day it might completely stop working. I was ready to buy a new computer but after reading about the new MacBook Pros, it seems like App
-
DVD Player problem - "supported disk not available" ?
Hi all, Running DVD Player 4.6.5 on Tiger. Up until a while, everything was fine. Now, it won't play any DVD. It starts when I insert a DVD, but does not start playing automatically (which is what the setting currently is). When I start playing manua
-
Displaying Last Items in HorizontalList
I have a HorizontalList with a columnCount of 5 and I am trying to set horizontalScrollPosition so the last five items are displayed in the list. The following should wor, but it does not: imagesTL.horizontalScrollPosition = imagesTL.dataProvider.