Export internal table to application server
hello all!
i would like to export the contents of an internal table to the appliation server. i tried via OPEN DATASET, but my itab contains not only character type data.
i do not want to copy all content into a parallel structure with all character type colums
do you know a way to export an internal table on application server, in a way that it is readable by ms excel?
thanks!
Hi Matthias, i think that the only solution is using a parallel structure with all character type colums. Also use 'SAP_CONVERT_TO_CSV_FORMAT' to convert the internal table to csv format in order to be readable by ms excel.
Regards,
Andrez
Similar Messages
-
Sending data from final internal table to application server in xml format
hi to all ,
can anyone send details about send data from final internal table to application server in xml format.right now i am able to download data to presentation server in xml format . love to here soon from all the abap gigs.welcome to SDN.
are you using call transformation to convert itab to XML? the XML string is in which format?
convert it to xstring and then use the following code to store it in application server.
OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
TRANSFER XML_content TO FNAME.
CLOSE DATASET FNAME.
where fname is the path to the file name.
Regards
Raja -
Urgent - Append data to internal table from Application server
Hi All,
I encountered the problem while read the input file from Application server...then append it to internal table. I manage to read the input file from presentation and append the data to internal table.
Below are my coding which cause me not able the append data from Application server. Please kindly help me to solving/correct my coding. Thanks in advance .
PARAMETERS : p_inpfl LIKE rlgrap-filename. "Material Input File
SELECTION-SCREEN BEGIN OF LINE.
Application Server
SELECTION-SCREEN COMMENT 1(19) text-002 FOR FIELD rb_ux.
SELECTION-SCREEN POSITION 33.
PARAMETERS: rb_ux RADIOBUTTON GROUP g1.
Presentation Server
SELECTION-SCREEN COMMENT 40(21) text-003 FOR FIELD rb_pc.
SELECTION-SCREEN POSITION 65.
PARAMETERS: rb_pc RADIOBUTTON GROUP g1 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK b01.
FORM f_Input_file.
CLEAR: v_f_exists.
CHECK NOT p_inpfl IS INITIAL. "input file exist
IF NOT rb_pc IS INITIAL. " Pc check
PERFORM f_read_tab_delimited_file TABLES i_input
USING c_09
p_inpfl
rb_ux
CHANGING v_ifile_str_with_tab
v_f_exists
v_ifile_record_count
v_message.
IF v_f_exists EQ '1' .
UPLOAD FILE could not be read
MESSAGE e546 .
ENDIF .
IF v_ifile_record_count EQ 0 .
Zero records in upload file
MESSAGE e547 .
ENDIF.
ELSE.
OPEN DATASET p_inpfl FOR INPUT IN TEXT MODE.
DO.
READ DATASET p_inpfl INTO i_input.
IF sy-subrc EQ 0.
APPEND i_input.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET p_inpfl.
ENDIF.Hi,
Refere the following code for the poulating internal from the application server.
PARAMETERS : pr_sfile TYPE filename-fileintern,
Here give the logical file name from the application serevr.
data : w_param_1 LIKE filename-fileintern,
x_file(500),
w_move_file LIKE epsf-epsfilnam,
w_from_dir LIKE epsf-epsdirnam,
w_path LIKE rlgrap-filename,
input_line(1000),
w_path LIKE rlgrap-filename,
w_file LIKE rlgrap-filename,
w_dir LIKE rlgrap-filename,
w_dir1 LIKE epsf-epsdirnam,
w_file1 LIKE epsf-epsfilnam,
**************Start of the code***************
MOVE '*' TO w_param_1.
PERFORM get_file_name USING pr_sfile w_param_1.
LOOP AT it_file WHERE name CP w_file1.
CLEAR : x_file, w_path,
w_move_file, w_from_dir.
REFRESH : it_input,
it_input_err.
IF w_flag IS INITIAL.
CONCATENATE w_dir it_file-name INTO x_file.
CONDENSE x_file.
TO Move file from sever for backup storing the file name and path
w_path = x_file.
CALL FUNCTION 'TRINT_SPLIT_FILE_AND_PATH'
EXPORTING
full_name = x_file
IMPORTING
stripped_name = w_move_file
file_path = w_from_dir
EXCEPTIONS
x_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
********here it_input will be the structure of the file present on the application server
PERFORM read_file TABLES it_input
USING x_file.
CLEAR it_input_err.
REFRESH it_input.
ENDLOOP.
*******************end of the code****************
*& Form read_file
text
-->P_X_FILE text
FORM read_file TABLES it_tab
USING x_file.
OPEN DATASET x_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
WRITE : / text-006.
ELSE.
DO.
READ DATASET x_file INTO input_line.
IF sy-subrc = 0.
CLEAR: it_input, count.
DO.
ADD 1 TO count.
ASSIGN COMPONENT count OF STRUCTURE it_tab TO <fs>.
IF sy-subrc = 0.
SPLIT input_line AT separator INTO <fs> input_line.
ELSE.
EXIT.
ENDIF.
ENDDO.
APPEND it_tab.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET x_file.
*& Form get_file_name
text
-->P_P_SFILE text
-->P_W_PARAM_1 text
FORM get_file_name USING p_sfile
w_param_1.
CHANGING x_file.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
client = sy-mandt
logical_filename = p_sfile
parameter_1 = w_param_1
IMPORTING
file_name = x_file
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
w_path = x_file.
CALL FUNCTION 'TRINT_SPLIT_FILE_AND_PATH'
EXPORTING
full_name = w_path
IMPORTING
stripped_name = w_file
file_path = w_dir
EXCEPTIONS
x_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
w_dir1 = w_dir.
w_file1 = w_file.
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = w_dir1
file_mask = w_file1
TABLES
dir_list = it_file
EXCEPTIONS
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
read_directory_failed = 5
too_many_read_errors = 6
empty_directory_list = 7
OTHERS = 8.
IF sy-subrc <> 0.
WRITE : / text-006.
ENDIF.
Hope this will help you. -
Re: How to download an internal table to application server.. Unicode
Hi..
i have populated an internal table of a big structure (custom table) which has more than 100 fields.
i wanted to download it into the application server.. as a tab de-limited file..
Can anyone guide me how to proceed with
Thanks In Advance
Guhapriyan..HI
this program will convert the internal table to the xml document
Report ZPRUEBA_MML_13 *
Export an internal table to XML document *
NO BORRAR ESTE CODIGO *
REPORT Z_table_xml.
PARAMETERS: GK_RUTA TYPE RLGRAP-FILENAME.
TYPES: BEGIN OF TURNOS,
LU LIKE T552A-TPR01,
MA LIKE T552A-TPR01,
MI LIKE T552A-TPR01,
JU LIKE T552A-TPR01,
VI LIKE T552A-TPR01,
SA LIKE T552A-TPR01,
DO LIKE T552A-TPR01,
END OF TURNOS.
TYPE SOCIO *
TYPES: BEGIN OF SOCIO,
NUMERO LIKE PERNR-PERNR,
REPOSICION LIKE PA0050-ZAUVE,
NOMBRE LIKE PA0002-VORNA,
TURNOS TYPE TURNOS,
END OF SOCIO.
TYPE SOCIO *
ESTRUCTURA ACCESOS *
DATA: BEGIN OF ACCESOS OCCURS 0,
SOCIO TYPE SOCIO,
END OF ACCESOS.
ESTRUCTURA ACCESOS *
START OF SELECTION *
START-OF-SELECTION.
PERFORM LLENA_ACCESOS.
PERFORM DESCARGA_XML.
END-OF-SELECTION.
END OF SELECTION *
FORM LLENA_ACCESOS *
FORM LLENA_ACCESOS.
REFRESH ACCESOS.
CLEAR ACCESOS.
MOVE: '45050' TO ACCESOS-SOCIO-NUMERO,
'MOISES MORENO' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
CLEAR ACCESOS.
MOVE: '45051' TO ACCESOS-SOCIO-NUMERO,
'RUTH PEÑA' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
ENDFORM.
FORM LLENA_ACCESOS *
FORM DESCARGA_XML *
FORM DESCARGA_XML.
DATA: L_DOM TYPE REF TO IF_IXML_ELEMENT,
M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
G_IXML TYPE REF TO IF_IXML,
W_STRING TYPE XSTRING,
W_SIZE TYPE I,
W_RESULT TYPE I,
W_LINE TYPE STRING,
IT_XML TYPE DCXMLLINES,
S_XML LIKE LINE OF IT_XML,
W_RC LIKE SY-SUBRC.
DATA: XML TYPE DCXMLLINES.
DATA: RC TYPE SY-SUBRC,
BEGIN OF XML_TAB OCCURS 0,
D LIKE LINE OF XML,
END OF XML_TAB.
CLASS CL_IXML DEFINITION LOAD.
G_IXML = CL_IXML=>CREATE( ).
CHECK NOT G_IXML IS INITIAL.
M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
CHECK NOT M_DOCUMENT IS INITIAL.
WRITE: / 'Converting DATA TO DOM 1:'.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'ACCESOS'
DATAOBJECT = ACCESOS[]
IMPORTING
DATA_AS_DOM = L_DOM
CHANGING
DOCUMENT = M_DOCUMENT
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
CHECK NOT L_DOM IS INITIAL.
W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
IF W_RC IS INITIAL.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
W_RC.
ENDIF.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = M_DOCUMENT
IMPORTING
XML_AS_STRING = W_STRING
SIZE = W_SIZE
TABLES
XML_AS_TABLE = IT_XML
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
LOOP AT IT_XML INTO XML_TAB-D.
APPEND XML_TAB.
ENDLOOP.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_SIZE
FILENAME = GK_RUTA
FILETYPE = 'BIN'
TABLES
DATA_TAB = XML_TAB
EXCEPTIONS
OTHERS = 10.
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.
FORM DESCARGA_XML *
u can check the link
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap-code-samples/conversion of abap data to xml.doc
Regards,
Naveen -
Problem in uploading the file of internal table into appliaction server
i want to send the data of internal table to application server through selection screen and in selection screen and in selection screen parameter it should show the path of application server and through that path internal table data should go to application server , if possible give the code
Hi,
form download_file_appl_server.
open dataset p_dlf2 for output
in text mode encoding default .
if sy-subrc ne 0.
message:i005 with text-415 text-407.
endif.
loop at i_final into wa_final.
transfer wa_final to p_dlf2.
endloop.
close dataset p_dlf2.
endform. " OPENDATA_CLOSE
where p_dlf2 is the seelction screen parameter which give the application server file path
You can use this code for ur purpose.
Reward if useful.
Regards
Shibin -
Problem while exporting internal table to memory id using EXPORT
Hi friends,
Iam facing a following problem.
I have 4 line items in my va01 tcode.
now when i give material number and quantity and hit enter the processing for that line item starts.
iam moving that current line item to a internal table lt_vbap in userexit_check_vbap.
now for the 2nd line item also i have to move to internal table lt_vbap.
but my problem is that in internal table lt_vbap iam not getting all the line items.
every time the current line item is being processed the the previous line items are being refreshed.
from lt_vbap internal table.
how can i export internal table.
code
move vbap to lt_vbap.
append lt_vbap.
export lt_vbap to memory id 'ZXYZ'.>
Prakash Pandey wrote:
> Hi Priyanka,
>
> The internal table lt_vbap will always be empty unless you import it from the Memory ID (in your case ZXYX).
>
> Use the code this way:
>
> IMPORT lt_vbap FROM MEMORY ID 'ZXYX'.
>
> move vbap to lt_vbap.
>
> append lt_vbap.
>
> export lt_vbap to memory id 'ZXYZ'.
>
> Regards,
> Prakash Pandey
The memory id shud be same in both cases -
Export INTERNAL TABLE to shared buffer
Hi all,
My requirement:
Export INTERNAL TABLE to shared buffer or SAP Memory.
Any help will be appreciated.
Can SET/GET parameter be adopted for internal tables?
Thanks,
TabraizEXPORT (OBJ_TAB) TO MEMORY ID 'ABCD'
also refer to
http://help.sap.com/saphelp_45b/helpdata/en/34/8e73a36df74873e10000009b38f9b8/content.htm -
Import/export internal tabl
Hi,
This is regarding import/export internal table to 2 different prog, somehow when i execute in prog ztest_hl7, it doesnt work. Please help.
report ztest_hl7.
TYPES:
BEGIN OF tab_type,
para TYPE string,
dobj TYPE string,
END OF tab_type.
DATA:
id TYPE c LENGTH 10 VALUE 'TEXTS',
text1 TYPE string VALUE `IKE`,
text2 TYPE string VALUE `TINA`,
line TYPE tab_type,
itab TYPE STANDARD TABLE OF tab_type.
line-para = 'P1'.
line-dobj = 'TEXT1'.
APPEND line TO itab.
line-para = 'P2'.
line-dobj = 'TEXT2'.
APPEND line TO itab.
EXPORT itab TO MEMORY ID id.
submit ztest_hl6 and return.
report ztest_hl6.
data : id TYPE c LENGTH 10 VALUE 'TEXTS'.
TYPES:
BEGIN OF tab_type,
para TYPE string,
dobj TYPE string,
END OF tab_type.
DATA: itab TYPE STANDARD TABLE OF tab_type,
wa_itab type tab_type.
IMPORT itab FROM MEMORY ID id.
loop at itab into wa_itab.
write:
wa_itab-para,
wa_itab-dobj.
endloop.
Edited by: Hui Leng Yeoh on Jun 26, 2008 11:25 AMHi There are few syntax errors. Comment ur code and Paste this code and check. It is working fine.
report ztest_hl7.
TYPES:
BEGIN OF tab_type,
para TYPE string,
dobj TYPE string,
END OF tab_type.
DATA:
id(10) TYPE c VALUE 'TEXTS',
text1 TYPE string, " VALUE `IKE`,
text2 TYPE string, " VALUE `TINA`,
line TYPE tab_type,
itab TYPE STANDARD TABLE OF tab_type.
text1 = 'IKE'.
text2 = 'TINA'.
line-para = 'P1'.
line-dobj = 'TEXT1'.
APPEND line TO itab.
line-para = 'P2'.
line-dobj = 'TEXT2'.
APPEND line TO itab.
EXPORT itab TO MEMORY ID id.
SUBMIT z7569411 AND RETURN.
data : id(10) TYPE c VALUE 'TEXTS'.
TYPES:
BEGIN OF tab_type,
para TYPE string,
dobj TYPE string,
END OF tab_type.
DATA: itab TYPE STANDARD TABLE OF tab_type,
wa_itab type tab_type.
IMPORT itab FROM MEMORY ID id.
loop at itab into wa_itab.
write:
wa_itab-para,
wa_itab-dobj.
endloop.
Thanks,
vinod. -
Export internal table to Excel file pressing a new button created in ALV
Hello, I am trying to implement the functionality to export to excel file inside a button that i have created into my ALV. I don't want to use FileDownload UI.
The code I have set for event handler of this button is the following:
METHOD attach_files .
TYPES:
BEGIN OF tipo_alv_tab,
tipod TYPE objid,
descd TYPE p1000-stext,
begda TYPE begdatum,
endda TYPE enddatum,
pernr TYPE pernr_d,
nombre TYPE ad_namefir,
email TYPE ad_smtpadr,
posicion TYPE p1000-stext,
uodesc TYPE p1000-stext,
END OF tipo_alv_tab.
DATA:
i_alv_tab TYPE TABLE OF tipo_alv_tab,
conv_out TYPE REF TO cl_abap_conv_out_ce,
content TYPE xstring,
lv_filename TYPE string,
xml_out TYPE string.
Fill values from memory
IMPORT name1 TO i_alv_tab FROM MEMORY ID 'ZCA'.
Build XML file with internal table information
CALL TRANSFORMATION ('ID') SOURCE tab = i_alv_tab[] RESULT XML xml_out.
Build XSTRING with XML
CALL FUNCTION 'CRM_IC_XML_STRING2XSTRING'
EXPORTING
instring = xml_out
IMPORTING
outxstring = content.
Format XSTRING
conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
Convert data
conv_out->convert( EXPORTING data = xml_out IMPORTING buffer = content ).
Save file
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
EXPORTING
i_filename = 'Excel File.xls'
i_content = content
i_mime_type = 'application/msexcel'
i_in_new_window = i_in_new_window
i_inplace = i_inplace.
ENDMETHOD.
When pressing the button, the file created is without extension, and with a rare name. When trying to open the file, it seems to be corrupted.
Does anyone know what am I doing wrong???
Please, help is really really appreciated!!!!Hi Jorge,
The export data to excel functionality is available inbuilt in ALV and you dont have to write any implementation. However, if you want to create your own button for it, you can do so as below.
data:
lr_button type ref to cl_salv_wd_fe_button,
lr_function type ref to cl_salv_wd_function.
CREATE OBJECT lr_button.
lr_button->set_text( 'Export to excel' ).
lr_button->set_tooltip( 'Export data to excel' ).
lr_function = l_alv_model->if_salv_wd_function_settings~create_function( id = 'EXCEL' ).
lr_function->set_function_std( IF_SALV_WD_C_STD_FUNCTIONS=>EXPORT_EXCEL ).
lr_function->set_editor( lr_button ).
Now, you have created your own button, created a user defined function for the ALV and set this button as editor for the function. And using the set_function_std method, we have just mapped the functionality of your new button to the existing export to excel functionality in ALV.
Hope this is what you are looking for.
Regards
Nithya -
Export internal table from report to web-dynpro
Hi,
I am trying to export an internal table from a report to my web dynpro pragram however its not working.
Statement used in my report -
EXPORT it_ordbk FROM it_ordbk TO MEMORY ID 'ZORDBK'.
Statement used in my web dynpro program
IMPORT it_ordbk to it_ordbk FROM MEMORY ID 'ZORDBK'.
This dynpro application is being called in HTML container on the screen.
Kindly help.
Cordially,
DanishHi Danish,
do not use export or import in Webdynpro.
try to create a class with global variables and in the report or at the place of Export fille the data .
and next in the place of Import memory to to call the global variable in the webdynpro and fill the internal table
go to se24> create a zclasss-> methods initialize>create a ztable same as export table and also declare in glaobal vairaible
--> next in the webdynpro program -->call the method retrive and push the global data to internal table.
Prabhudas -
Export internal table to Excel during debugging.
Hi Experts
I have put a debugger( old debugger ) on a certain line of code where we are checking the data of an internal table having around 10000 entries and I want to export this internal table data to an excel for analysis during debugging itself.
Is there a way to export this ? The new debugger does not work in IFD. ( 6.40)
Regards
Sukanya.Hi
In application menu follow the path
Select the internal table then
Goto->Display Data Object -> Structure Editor
This will show only part of the internal.
Goto List-> Display entire list.
You can print the list or send it to excel sheet.
Regards
Navneet -
Error writing XML Table on application server
Hi All ,
I am converting a internal table into a XML table using Fm SAP_CONVERT_TO_XML_FORMAT, And then writing it to the application server ,
at the end of the file which is written to application server there are some junk characters .
when i download the same xml table to PC using gui_download there is no problem atr all .
Its only when i using
TRANSFER ls_XMLTAB-data TO lv_filename. i get junk characters at the end and the error on the xml page is
" An invalid character was found in text content. Error processing resource 'file:///C:/Documents and Settings..."
This i guess is due to the line break ,
Any help on resolving would be great thanks
Regards
Vinay Kolla1) Are you asking me to create a folder on Database directory which points to a folder on the Apps server ?I suggest creating an Oracle directory object (a database object) pointing to a real location (folder) on Application server.
we DONOT want a hand shake between the DB Server and the APPS server.I don't see where the problem is.
I'm not familiar with Apps R12 but there's no doubt the two servers are already communicating, at least App server should be able to access the DB for the whole thing to run.
As I said :
One way or another, the data has to make its way to the database, there's no workaround to that.How do you imagine the data will end up in a database table if it doesn't come to the DB server?
There's no magical method out there, both servers have to communicate at some point.
About client-server approaches (client being here the App server), you can read about accessing the XML DB repository in the XML DB Developer's Guide : http://download.oracle.com/docs/cd/E11882_01/appdev.112/e23094/toc.htm
Other option : SQL*Loader can load a CLOB, or an XMLType column too
Edited by: odie_63 on 19 déc. 2011 20:22 -
Internal table in ABAP Server Proxy
Hi Experts,
I have developed a JDBC to ABAP Proxy scenario.
I have a problem. In my ABAP server proxy I have to import the values into an internal table and pass them to a BAPI for GR creation.
I get an error like. OCCURS 0 is not allowed in OO concept.
Can anyone give me examples on declaring internal table in an ABAP Proxy(OO Concept).
Thanks
AKHi
Check this out.
http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb3660358411d1829f0000e829fbfe/frameset.htm
Cheers -
Exporting internal table in a oops
hi friends,
I have to pass internal table to a method and export that internal table.
now when i am passing this internal table i am getting the last value of the table..
i am enclosing code here please go through and modify me regarding this..
REPORT ZTEST_ABAP_PROXY.
DATA PRXY TYPE REF TO ZCO_MI_PROXY_OUTBOUND.
DATA: BEGIN OF I_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,
ERNAM LIKE MARA-ERNAM,
END OF I_MARA.
CREATE OBJECT PRXY.
DATA IT TYPE ZMT_PROXY_OUTBOUND OCCURS 0 WITH HEADER LINE.
TRY.
SELECT MATNR ERNAM INTO TABLE I_MARA FROM MARA UP TO 10 ROWS.
LOOP AT I_MARA.
IT-MT_PROXY_OUTBOUND-MATNR = I_MARA-MATNR.
IT-MT_PROXY_OUTBOUND-ERNAM = I_MARA-ERNAM.
APPEND IT.
ENDLOOP.
CALL METHOD PRXY->EXECUTE_ASYNCHRONOUS
EXPORTING
OUTPUT = IT.
COMMIT WORK.
CATCH CX_AI_SYSTEM_FAULT .
DATA FAULT TYPE REF TO CX_AI_SYSTEM_FAULT .
CREATE OBJECT FAULT.
WRITE :/ FAULT->ERRORTEXT.
ENDTRY.
i need to pass all the values of internal table to output at once..
Thanks and Regards
VijayHi Vijay,
I think the problem is with the output parameter.
Might be I'll give you the background and then explain you the problem. This may help.
In the older release of ABAP there used to be Tables as one of the tabs where one could import/export tables to/from the FM. The problem was that it would difficult to identify what table are being imported and what are bein exported.
So with later releases of ABAP this tab was removed and currently there are Exporting/Importing/Changing tabs. You can use changing in your case if you are passing the table to modify the same.
Now the problem.
As stated above the OUTPUT is a line type (means structure) while IT is a internal table with header lines. So the record in the wa of this table is only transferred to OUTPUT.
What needs to be done.
You need to change the type of the OUTPUT to table type. I am not sure if you know about table type.
You can create a Table Type is se11 under Data Type.
I hope this helps.
Regards,
Saurabh -
Exporting Internal Table from Methods
Hi Experts,
I wanted to export an internal table from Methods and I am using below syntax and its not working.
METHODS get_data IMPORTING value(s_matnr) type mara-matnr
exporting it_tab TYPE STANDARD TABLE itab.
Please let me know what is the proper syntax.
Thanks
BasanagoudaHi,
Define itab as a 'table type' of standard table.
Example: TYPES: t_sflight TYPE STANDARD TABLE OF sflight.
METHODS : get_data IMPORTING s_carrid type sel_carrid
EXPORTING e_tab type t_sflight.
ENDCLASS
Maybe you are looking for
-
I Use Yahoo calendar as my main calendar so my dh can access it from work, so I subscribe to it for iCal. I recently moved from Eastern Time zone to Central. I didn't re-set all my calendars and apps right away. I have all my calendars and computers
-
Sponsor Portal after upgrade ISE 1.2 - 1.3
Hi, After upgrade ISE to version 1.3 I can't access to Sponsor Portal via ://ISE_IP:8443/sponsorportal/ as it was done in version 1.2 (error: [ 404 ] Sponsor Portal Resource Not Found. The resource requested cannot be found). I have to open it throug
-
Trouble with CC on a 32c11ou1 32 inch
I cannot seem to get the cc to work on my TV when watching certain DVD's..I have a Panasonic Blue Ray Player, and in the hires mode the TV will not produce any text..This is only a problem on some Standard DVD's..If I try to run the TV in the lower r
-
Dear Sir, Please i need create free apple id and password from my i phone 4
-
Currently have hosting with Muse, and have problem publishing some updates to my website. So I clicked Manage which created a new mysite.adobecatalyst.com. When I try to launch, it brings me to pay screen. I already have paid account, just want to ge