How to pass a internal table into Java Bean
Hi Experts,
I created a JSPDyn page to display Sales orders form R/3 using bapi_sales_order_getlist.
I used JCO to establish connectivity between JSP Dynpage and R/3. I executed the bapi successfully, i want to move the sales orders retrieved from the Bapi to a Java Bean. So that i can use the bean to populate the value as a table.
with regards,
James.
Valuable answers will be rewarded.....
Hi Bala,
If you want to pass this internal table between different methods of the same view then write the contents of this internal table to a context node of your view using BIND_TABLE. You can then read the contents of this internal table from the other method using the reference of that node & the GET_STATIC_ATTRIBUTES_TABLE method.
However if you want to pass the internal table between methods of different views then create a context node at the COMPONENTCONTROLLER level & then do a context mapping of this node to your local views context in both your views. You can follow the same BIND_TABLE & GET_STATIC_ATTRIBUTES_TABLE methods approach.
Regards,
Uday
Similar Messages
-
How to import the internal table into subroutine as parameter
how to import the internal table into subroutine as parameter, and its structure can be recognized inside the subroutine
Hi Yong,
try this:
parameters: p_tabnm like dd03l-tabname.
field-symbols: <fs_tabname> type standard table.
data: itab_ref type ref to data.
create data itab_ref type standard table of (p_tabnm)
with default key.
assign itab_ref->* to <fs_tabname>.
select * from (p_tabnm) into table <fs_tabname>.
perform subroutine tables <fs_tabname>
using p_tabnm.
*& Form subroutine
text
-->P_<FS_TABNAME> text
-->P_P_TABNM text
form subroutine tables p_tabname type standard table
using p_tabnm.
Here p_tabname already has the structure of the table you gave as input
parameter
endform. " subroutine -
How to pass an internal table to a SmartForm?
Hi there!
I have a program that calls a SmartForm.
I have a internal table wich I want to print.
This internal table is based on a custom structure with NO standard includes (e.g., with custom fields).
How do I declare this internal table in the transaction SMARTFORMS?
Best Regards,
Luís.Refer below thread..
How to pass an internal table to smartform.
hope it will solve ur problem
Thanks & Regards
ilesh 24x7 -
How to copy complete internal table into main dababase table
please tell me how to copy complete internal table into main dababase table by overwriting all the entries of the main DBtable.
HI,
you can use<b> Insert Or Modify statement ..</b>
<b>Modify updates the existing record, insert creates a new one. ...</b>
insert ZDBTAB from table itab.
Modify ZDBTAB from table Itab.
The structure of itab should be exactly the same as the z table.
You should not update standard tables directly though.
rewards if usefuyl
regards,
nazeer -
How to pass an internal table to LVC_FIELDCATALOG_MERGE
Hi Abap'ers
I want to know how to pass an internal table to the function module LVC_FIELDCATALOG_MERGE, as like we do in the FM REUSE_ALV_FIELDCATALOG_MERGE.
For Eg
v_name = 'I_OUTPUT'.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = wrk_repid
i_internal_tabname = v_name
i_inclname = wrk_repid
changing
ct_fieldcat = wrk_fld_cat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
Where I_OUTPUT is the internal table name.Re: LVC_FIELDCATALOG_MERGE with internal table
Check this
In PBO,
Building the field catalog
PERFORM f9001_build_field_cat TABLES i_fieldcat
USING 'ZCSA_MARKETIING_EXPENSE_OUTPUT'
FORM f9001_build_field_cat TABLES p_fieldcat STRUCTURE lvc_s_fcat
USING value(p_structure).
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = p_structure
CHANGING
ct_fieldcat = p_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE i013 WITH text-e05."Error in ALV field catalogue creation
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " f9001_build_field_cat
U can create a structure or example pass MARA then it will take the structure of MARA. -
How to pass the internal table data to smartforms
Hi Gurus,
I have a problem in passing the internal table data to the smartforms. In the print program
I get the data into one internal table "LT_PRDLBL1". I am passing this internal table to the other in print program by calling the FM_NAME.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = T_SSFCTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = T_SSFCOMPOP
USER_SETTINGS = ' '
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
LT_PRDLBL = LT_PRDLBL1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
In the print program I had defined the internal tables like
Data: lt_prdlbl type standard table of zprdlbl.
Data: Begin of lt_prdlbl1 occurs 0.
include structure zprdlbl.
Data: End of lt_prdlbl1.
How do I define the internal table in the smartform to get the values printed in the smartform?.
<REMOVED BY MODERATOR>
Thanks,
Edited by: Alvaro Tejada Galindo on Apr 21, 2008 1:01 PMNehal,
Thanks for quick response.
In the smartform under the Form Interface->Tables tab
I had defined
LT_PRDLBL LIKE ZPRDLBL. If I define TYPE instead of LIKE I get the error message saying "FLAT TYPES may only be referenced using LIKE for table parameters".
In the main window I have created LOOP, in which I have ticked the internal table and
LT_PRDLBL INTO LT_PRDLBL. In the text node I am passing the values of this internal table
<_PRDLBL-XXXX&.
I am able to get the print but the data is not printing.
Please help me with this.
Thanks, -
Passing dynamic internal table into ALV
I have made one ALV report where i had created one button 'GENERATE'. ON CLICKING THIS BUTTON the data in the ALV report is downloaded to excel file.
i have used this:-
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = l_title
default_extension = 'XLS'
initial_directory = 'C:\'
CHANGING
filename = filename
path = path
fullpath = fullpath
user_action = user_action
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
EXIT.
ENDIF.
Check which button is pressed
IF user_action <> cl_gui_frontend_services=>action_ok.
EXIT.
ENDIF.
Download error data collected from the internal table
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = fullpath
filetype = 'ASC'
write_field_separator = '#'
codepage = '4103'
write_bom = c_true
CHANGING
data_tab = gi_final
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
If selection is successful
IF sy-subrc EQ 0.
MESSAGE s004 . " File created successfully
ELSE.
MESSAGE i005 . " File is not created successfully
ENDIF.
In the table i have passed the internal table . this is working fine.
<b>But,
The problem is if i want to display the data in diferent layout based on selection screen criteria the data downloaded are same as default layout.
how to pass a dynamic internal table in the
CALL METHOD cl_gui_frontend_services=>gui_download</b>Hi ,
here is the Program for Download
REPORT yrs_download_transport_request.
PARAMETERS:
p_reqest TYPE trkorr OBLIGATORY,
p_folder(255) TYPE c LOWER CASE, p_sepr OBLIGATORY.
DATA:
folder TYPE string,
retval LIKE TABLE OF ddshretval WITH HEADER LINE,
fldvalue LIKE help_info-fldvalue,
transdir TYPE text255,
filename(255),
trfile(20) TYPE c,
datatab TYPE TABLE OF text8192 WITH HEADER LINE,
len TYPE i,
flen TYPE i.
TYPE-POOLS: sabc, stms, trwbo.
INITIALIZATION.
CONCATENATE sy-sysid 'K*' INTO p_reqest.
IF sy-opsys = 'Windows NT'.
p_sepr = ''.
ELSE.
p_sepr = '/'.
ENDIF.
* CALL FUNCTION 'WSAF_BUILD_SEPARATOR'
* IMPORTING
* separator = p_sepr
* EXCEPTIONS
* separator_not_maintained = 1
* wrong_call = 2
* wsaf_config_not_maintained = 3
* OTHERS = 4.
* IF sy-subrc NE 0.
* MESSAGE s001(00)
* WITH
* 'Unable to find out the separator symbol for the system.'(011).
* ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_reqest.
DATA:
tt_system TYPE TABLE OF tmscsys WITH HEADER LINE,
es_selected_request TYPE trwbo_request_header,
es_selected_task TYPE trwbo_request_header,
iv_organizer_type TYPE trwbo_calling_organizer,
is_selection TYPE trwbo_selection.
iv_organizer_type = 'W'. is_selection-reqstatus = 'R'.
CALL FUNCTION 'TR_PRESENT_REQUESTS_SEL_POPUP'
EXPORTING
iv_organizer_type = iv_organizer_type
is_selection = is_selection
IMPORTING
es_selected_request = es_selected_request
es_selected_task = es_selected_task.
p_reqest = es_selected_request-trkorr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_folder.
DATA: title TYPE string.
title = 'Select target folder'(005).
CALL METHOD cl_gui_frontend_services=>directory_browse
EXPORTING
window_title = title
CHANGING
selected_folder = folder
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
OTHERS = 3.
CALL FUNCTION 'CONTROL_FLUSH'
EXCEPTIONS
cntl_system_error = 1
cntl_error = 2
OTHERS = 3.
p_folder = folder.
AT SELECTION-SCREEN ON p_reqest.
DATA: request_info TYPE stms_wbo_request,
request_infos TYPE stms_wbo_requests.
REFRESH request_infos.
CALL FUNCTION 'TMS_MGR_READ_TRANSPORT_REQUEST'
EXPORTING
iv_request = p_reqest
iv_header_only = 'X'
IMPORTING
et_request_infos = request_infos
EXCEPTIONS
read_config_failed = 1
table_of_requests_is_empty = 2
system_not_available = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR request_info.
READ TABLE request_infos INTO request_info INDEX 1.
IF sy-subrc NE 0
OR request_info-e070-trkorr IS INITIAL.
MESSAGE e398(00) WITH 'Request'(006) p_reqest 'not found'(007).
ELSEIF request_info-e070-trstatus NE 'R'.
MESSAGE e398(00)
WITH 'You must release request'(008)
request_info-e070-trkorr
'before downloading'(009).
ENDIF.
START-OF-SELECTION.
folder = p_folder.
CONCATENATE p_reqest+3(7) '.' p_reqest(3) INTO trfile.
CALL FUNCTION 'RSPO_R_SAPGPARAM'
EXPORTING
name = 'DIR_TRANS'
IMPORTING
value = transdir
EXCEPTIONS
error = 0
OTHERS = 0.
PERFORM copy_file USING 'cofiles' trfile.
trfile(1) = 'R'.
PERFORM copy_file USING 'data' trfile.
trfile(1) = 'D'.
PERFORM copy_file USING 'data' trfile.
* FORM copy_file *
* --> SUBDIR * * --> FNAME *
FORM copy_file USING subdir fname.
DATA:
auth_filename TYPE authb-filename,
gui_filename TYPE string.
CONCATENATE transdir subdir fname
INTO filename
SEPARATED BY p_sepr.
REFRESH datatab.
CLEAR flen.
auth_filename = filename.
CALL FUNCTION 'AUTHORITY_CHECK_DATASET'
EXPORTING
activity = sabc_act_read
filename = auth_filename
EXCEPTIONS
no_authority = 1
activity_unknown = 2
OTHERS = 3.
IF sy-subrc <> 0.
FORMAT COLOR COL_NEGATIVE.
WRITE: / 'Read access denied. File'(001),
filename.
FORMAT COLOR OFF. EXIT.
ENDIF.
OPEN DATASET filename FOR INPUT IN BINARY MODE.
IF sy-subrc NE 0.
FORMAT COLOR COL_TOTAL.
WRITE: / 'File open error'(010), filename.
FORMAT COLOR OFF. EXIT.
ENDIF.
DO.
CLEAR len.
READ DATASET filename INTO datatab LENGTH len.
flen = flen + len.
IF len > 0. APPEND datatab. ENDIF.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET filename.
CONCATENATE p_folder '' fname INTO gui_filename.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = flen
filename = gui_filename
filetype = 'BIN'
CHANGING
data_tab = datatab[]
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 24.
IF sy-subrc = 0.
WRITE: / 'File'(002), filename, 'downloaded. Length'(003), flen.
ELSE.
FORMAT COLOR COL_NEGATIVE.
WRITE: / 'File download error. Filename:'(004), filename.
FORMAT COLOR OFF.
ENDIF.
ENDFORM. "copy_file
Reward points if it is usefull....
Girish -
How to pass the internal table defined in program to ALV
Hi Friends,
I have a doubt regaring the ALV's,
How can we pass the internal table defined in the program to ALV by not filling the attribute (I_STRUCTURE_NAME) in the REUSE_ALV_LIST_DISPLAY.
I have tried many ways but unable to pass the structure of the internal table. I am getting the error message "Field Catalog Not Specified......" and its terminating and when i am giving the I_STRUCTURE_NAME = 'INTERNAL-TABLE-NAME' then its displaying a blank screen with all the tool-bars and icons...(No output of internal table data is seen on the screen) .
and when i am passing the DDIC table or structure ( for eg. LFA1) to I_STRUCTURE_NAME then its displaying with any error.
Plaese help in resolving this problem....
Regards
Pradeep GoliHi,
Check this thread which gives example of ALV. This will give you an idea.
Interactive ALV
ashish -
How to consolidate 4 internal table into one
how can we consolidate data from
two or more internal tables into one
please help
its a bit uegent
thanks in advanceHi,
If you want to combine two internal table,you can follow 2 approaches.
Case1: If both the internal table are of same structure,
append lines of itab1 to itab2.
The above statement will append all the records in itab1 to itab2.
Case2:If both the internal table are of differnt structure,
you need one or more common fields in the two tables to connect.
loop at itab1.
move-corresponding itab1 to itab.
loop at itab2 where f1 = itab1-f1.
move-corresponding itab2 to itab.
append itab.
clear : itab2, itab.
endloop.
clear itab1.
endloop.
Now itab will hold the entries from itab1 and itab2. -
How to Pass the Internal table of a report to Smart Form
Hi Experts,
I have one report in which from selection screen i am getting the values from the users, and upon that values i am filling data in to the internal table.
Now i want to pass that internal table data to the smart form
and print that data in the smart form.
So could you pls give me some pseudo code or any steps to achieve it.
Thanks & Regards,
DSHi DS,
First of all you need to create a SF and then need to call the FM generated by the FM in your report.
In the SF in the form interface>tables tab>mention the name of the table and its type structure.
Pls note that a new structure has to be created as the same type of your internal table which holds the data.
And the import and export parameters as just the same as in a FM.
Now after you create and activate your SF a FM will be generated (wen u execute your SF you will be taken to this SE37 screen with the name of FM so no probs..)
You can call this FM in your report. Hope this helps.
Ex:
say itab has your final data, and you also want to export a variable var1 to the SF.
after your normal report operations end, call the FM and pass on these data.
say your FM name is FM1.
call function FM1
exporting
var1 = var1
tables
itab1 = itab1.
pls note that in the SF also i gave the same names, it is not mandatory to give the same names.
and as you want to print a table in the smartforms, you need to create a table in the smart forms and then display the data which is quite simple.
Hope this helps...
if you need any further explanations, pls revert...
Regards,
Narendra.
Reward points if helpful!!! -
How to pass a internal table used in one method to another method in a view
hi all,
Is it possible to pass a internal table from one method to another method in a view??
If so , kindly help me.Hi Bala,
If you want to pass this internal table between different methods of the same view then write the contents of this internal table to a context node of your view using BIND_TABLE. You can then read the contents of this internal table from the other method using the reference of that node & the GET_STATIC_ATTRIBUTES_TABLE method.
However if you want to pass the internal table between methods of different views then create a context node at the COMPONENTCONTROLLER level & then do a context mapping of this node to your local views context in both your views. You can follow the same BIND_TABLE & GET_STATIC_ATTRIBUTES_TABLE methods approach.
Regards,
Uday -
How to call precedure in impl into java bean
Dear all,
i'm tried to call procedure at impl.java into java bean.
but, there is error which is it cannot find the root of this.getDBTranstation
any idea.
TQHi
Please tell me
How to call ethod in AppModuleImpl from other bean?
I have created method in AppModuleImpl
public String callFuncWithArgs(String p_company, String p_division, String p_user, String p_wrkord_type,
String p_service_type, String p_HOLD_CODE_TYPE) {
return (String)callStoredFunction(VARCHAR2, "WS_tran.Margin_TO_USER(?,?,?,?,?,?)",
new Object[] { p_company, p_division, p_user, p_wrkord_type, p_service_type,
p_HOLD_CODE_TYPE });
This method is working after run APPModule. But I want to call this method from SparesTEOImpl class and
public boolean validateUnitPrice(int unitprice) {
//want to call here AppModuleImpl
callFuncWithArgs(String p_company, String p_division, String p_user, String p_wrkord_type,
String p_service_type, String p_HOLD_CODE_TYPE) here
Please tell me how to call , I wrote in following ways but I got error...
public boolean validateUnitPrice(int unitprice) {
String margin=appImpl.callFuncWithArgs("00004","SDWSG", "S1","CSH", "SP","M");
System.out.println("Output"+margin);
return margin;
After that I got the following error.
Exception in thread "main" oracle.jbo.InvalidOwnerException: JBO-25301: Application module AppModuleImpl_0 is not a root app module but has no parent
at oracle.jbo.server.ComponentObjectImpl.getRootApplicationModule(ComponentObjectImpl.java:177)
at oracle.jbo.server.ApplicationModuleImpl.getDBTransaction(ApplicationModuleImpl.java:3656)
at model.AppModuleImpl.callStoredFunction(AppModuleImpl.java:128)
at model.AppModuleImpl.callFuncWithArgs(AppModuleImpl.java:160)
at model.SparesTEOImpl.validateUnitPrice(SparesTEOImpl.java:55)
at model.SparesTEOImpl.main(SparesTEOImpl.java:67)
Process exited with exit code 1.
Please tell me how to solve this problem... -
How to Pass the internal table data?
DearAll,
How to pass the Data of one internal table on a 1.html page to another html page for output, in BSP Application.
regards.Hi ,
In the onInputProcessing event of the first page , write the following code...
call method NAVIGATION->SET_PARAMETER exporting
name = 'it_filt_cur'
value = it_filt_cur.
Here it_filt_cur is internal table.
NAVIGATION->GOTO_PAGE('next.htm').
In the next page , you can make the internal table as auto in the attributes.
Since you have made the itab as auto transfer , you can directly access the itab in the initialization event of the next page if it is stateless.
Regards,
Laxman Nayak.
Message was edited by: Laxman Nayak -
How to Convert an internal table into Text File
Hello friends,
Can you help me to find out the way to convert an internal table data into a flat file.
the problem is that my internal table contains fields with data type INT also.please go through the code and the parameter passed to the finction module ... since you didn't show your coding i am giving you the sample code also ..
REPORT y_ss_test_ekko .
* To hold selection data
DATA: i_ekko TYPE STANDARD TABLE OF ekko.
* To hold converted text data
DATA: i_text(4096) TYPE c OCCURS 0.
* Selection Screen
PARAMETERS: p_ebeln LIKE ekko-ebeln.
* Select data into an ITAB based on the selection Criteria
SELECT * FROM ekko
INTO TABLE i_ekko
WHERE ebeln = p_ebeln.
* Process further only if found some data
IF NOT i_ekko[] IS INITIAL.
* Convert data in internal table to a delimited text data
CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
EXPORTING
i_field_seperator = '|'
TABLES
i_tab_sap_data = i_ekko
CHANGING
i_tab_converted_data = i_text
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE: / 'Program failed to Convert data.'.
ELSE.
* Download convert data to Presentation Server
CALL FUNCTION 'DOWNLOAD'
TABLES
data_tab = i_text
EXCEPTIONS
OTHERS = 8.
IF sy-subrc <> 0.
WRITE: / 'Program failed to download data.'.
ENDIF.
ENDIF.
ENDIF.
reward points if it is usefull ....
Girish -
How to pass an internal table to "submit job"
Dear Expert,
I use open_job & close_job to submit a background job.
A text file is to be uploaded from local drive.
Since we cant perform upload during the background,
I will have to upload the file from local drive in foreground, and then submit to the background job.
I tried to use Export [internal table] to memory and Import from the background job, it doesnt work.
How can I do this ??
Thank you.hi ,
you can do this using the open dataset...
i think it is the best one..
open dataset p_file for input in text mode encoding default .
loop at p_file.
output0(10) = p_file0(10).
output10(20) = p_file20(10).
output30(10). = p_file30(10).
output40(10). = p_file40(10).
endloop.
close p_file.
regards,
venkat.
Maybe you are looking for
-
Sandbox WebPart Postback too Large?
Hi guys, I've done some research and it looks like the error I'm running into (when saving the web part properties) is that my post back is too large. This is a simple sandbox web part I'm building, which works great until I added the last configura
-
Refreshing predefined FOI in 11g
I am working on Mapviewer 11g on Jdeveloper 11g using ADF. I managed to display the base map and predefined theme FOI. I am now trying to just refresh the theme based FOI (predefinedTheme1) on user clicking the 'Refresh Now' command button, How do I
-
All queries in workflow 2.5 running on 10g slow .. recently
Hello, I would really appreciate any help in this regards. I have a table that has 350,000 records in the database. We recently migrated from 9i to 10g. select context from wf_notifications where begin_date > sysdate - 1; While in 9i, the following q
-
I created a report and a form in 9ias portal. I want to pass a report value from the report to the Form (not the Rowid). Can any body let me how can I do that? thanks, ajay
-
I was wondering if you can change the settings on an IPhone 4s to be able to look for businesses, maps, and traffic in the united Kingdom as Siri keeps saying its only available in the us? Thanks Paige