How to append the data list bod (JList)
how to append the data list box (JList)
Message was edited by:
raju_2reddy
For this you will need a nested internal table. such that each column of the internal table should be declared as another internal table.
Try something like this :
" Lets say that the type of table that will be returned by the function BOM is ty_ret_tab, then declare as follows
types begin of ty_tab,
c1 type table of ty_ret_tab,
c2 type table of ty_ret_tab,
end of ty_tab.
data gt_tab type standard table of ty_tab,
gwa_tab like ty_tab.
Now the question is how many columns should you declare ? Because you said that in a loop you intend to call a function which will return a internal table and this internal table you need to store in a column of another internal table. And if this is not fixed, you would need to do some dynamic programming to achieve this.
But if we assume that there are fixed number of columns and fixed number of loops, then within the loop, you wiill have to simply move the data from the returned table to each of the columns. Then append the work area outside the loop.
data field(30) type c.
data c_tabix(10) type c.
field-symbols <fs> type ret_tab. " this should be
Loop at itab.
call function BOM...
exporting...
importing.....
tables ret_itab.
c_tabix = sy-tabix.
concatenate 'C' c_tabix into field.
condense field.
assign component (field) of structure gwa_tab to <fs>.
<fs> = ret_tab. " Pass data to each column
endloop.
append gwa_tab to gt_tab. " Now a single record with all columns containing an internal table is built.
Hope this pseudo code helps.
BR,
Advait
Similar Messages
-
How to append the data in a file
Dear All,
i want to continously update one text file that is
in myfile.txt using java,
for example username:test:password:test
like wise how can i append this text with username and password to added in the next next lineTake a look at this:
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
public class FileWrite {
public static void main(String[] args) throws IOException {
BufferedWriter br = new BufferedWriter(new FileWriter("C:\\temp.txt",true));
br.write("Hello");
br.newLine();
br.close();
} -
How to transpose the data records (rows) to column(lists) using apd
Hi,
how to transpose the data records (rows) to column (lists) using apd in sap bw.
I do not want to use abap routine.only use the transpose rows to list transformation .
Pls provide the step by step procedure .
thanks,
NimaiSave youe file to transpose as a csv and in the header row of your file for the columns you want to transpose you need to put some soer of a tag before the column name (ie your colum header was for a period budget will be something lie 2011001:ZFIBDD)
1. You will need to create a new apd process (rsanwb)
2. Insert a "Read from Data File" data source object and map it file (,csv)
3. insert a transpose object into your apd process (middle row 4th one over in the transformations section)
4. under the definition tab in the transformation object select all the columns that are to be transposed into rows and move them to the transformed area, the grouping fields section should contain the rows that you want to now be columns
5.under the transformation tab enter in the seperator you selected under the Field Name/Infoobject area (ie. ZFIBDD)
6. under the details tab you need to enter in all the fields to be transformed and tner the transposition field (ie ZFIBDD)
7. Then you can insert a set of transformations and a DSO and link the newly transposed fields into that.
hope that helps -
How to take the data from excel list to sap r/3(with time interval)
hi experts,
how to transfer the data from a third party system(if it is in format of excel) to sap r/3.with that in a particular time interval,it will delete the data from excel sheet.Hi
use the Fm
'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_path
i_begin_col = '1'
i_begin_row = '2'
i_end_col = '2'
i_end_row = '500'
giving the starting row and column and passing the ending row and column name
Reward points if useful........
Regards,
Nitin Sachdeva -
How to populate the data in LISTBOX of Dialog programming
Hi All,
I know how to create a Listbox in Modulepool programming, But i do n't know how to populate the data in LISTBOX. Does anyone knows , please help me ?
Thanks in advance
KRhi,
u need to write this after all modules of PAI in screen flow logic
PROCESS ON VALUE-REQUEST.
FIELD ifmtp-form_type MODULE fm_drop.
MODULE fm_drop INPUT.
CLEAR ifmtp.
REFRESH ifmtp.
ifmtp-form_type = 'C'.
APPEND ifmtp.
ifmtp-form_type = 'F'.
APPEND ifmtp.
ifmtp-form_type = 'H'.
APPEND ifmtp.
ifmtp-form_type = 'D'.
APPEND ifmtp.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FORM_TYPE'
value_org = 'S'
TABLES
value_tab = ifmtp.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " fm_drop INPUT
here ifmtp-form_type is my list box field on screen in which ifmtp is my internal table and form_type is my field name
i have declared internal table like
DATA : BEGIN OF ifmtp OCCURS 0,
form_type LIKE zform_track_mast-form_type,
END OF ifmtp.
reward if useful... -
How to download the data which is in the table?
how to download the data which is in the table?
every field data in the table i want to download and once the download is finished then i have to set the flag as 'download is finished ' as one field in table?
can any one help me in this.
Phani.
Edited by: phani kumarDurusoju on Jan 9, 2008 6:36 AMOne way is to Download the data Directly from the database table using the path SE11->Give table name ->Execute -> system ->List ->Save ->Local File
There u can downlaad the data .
The ither way is to use the code
The Following Code will be helpfull to You
Data :ITAB TYPE TRUXS_T_TEXT_DATA,
FILE TYPE STRING.
C_ASC TYPE CHAR10 VALUE 'ASC',
DATA: L_STATUS TYPE C,
L_MESSAGE TYPE PMST_RAW_MESSAGE,
L_SUBJECT TYPE SO_OBJ_DES.
DATA: L_FILELENGTH TYPE I.
PERFORM download_to_pc
TABLES
itab
USING
filename
c_asc
c_x
CHANGING
l_status
l_message
l_filelength.
FORM DOWNLOAD_TO_PC TABLES DOWNLOADTAB
USING FILENAME
FILETYPE TYPE CHAR10
DELIMITED
CHANGING STATUS
MESSAGE TYPE PMST_RAW_MESSAGE
FILELENGTH TYPE I.
DATA: L_FILE TYPE STRING,
L_SEP.
L_FILE = FILENAME.
IF NOT DELIMITED IS INITIAL.
L_SEP = 'X'.
ENDIF.
STATUS = 'S'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = L_FILE
FILETYPE = FILETYPE
WRITE_FIELD_SEPARATOR = L_SEP
IMPORTING
FILELENGTH = FILELENGTH
TABLES
DATA_TAB = DOWNLOADTAB
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 = 22.
IF SY-SUBRC <> 0.
STATUS = 'E'.
CASE SY-SUBRC.
WHEN 1.
MESSAGE = 'gui_download::file write error'.
WHEN 2.
MESSAGE = 'gui_download::no batch'.
WHEN 3.
MESSAGE = 'gui_download::gui refuse file transfer'.
WHEN 4.
MESSAGE = 'gui_download::invalid type'.
WHEN 5.
MESSAGE = 'gui_download::no authority'.
WHEN 6.
MESSAGE = 'gui_download::unknown error'.
WHEN 7.
MESSAGE = 'gui_download::header not allowed'.
WHEN 8.
MESSAGE = 'gui_download::separator not allowed'.
WHEN 9.
MESSAGE = 'gui_download::filesize not allowed'.
WHEN 10.
MESSAGE = 'gui_download::header too long'.
WHEN 11.
MESSAGE = 'gui_download::dp error create'.
WHEN 12.
MESSAGE = 'gui_download::dp error send'.
WHEN 13.
MESSAGE = 'gui_download::dp error send'.
WHEN 14.
MESSAGE = 'gui_download::ubknown dp error'.
WHEN 15.
MESSAGE = 'gui_download::access denied'.
WHEN 16.
MESSAGE = 'gui_download::dp out of memory'.
WHEN 17.
MESSAGE = 'gui_download::disk full'.
WHEN 18.
MESSAGE = 'gui_download::dp timeout'.
WHEN 19.
MESSAGE = 'gui_download::file not found'.
WHEN 20.
MESSAGE = 'gui_download::dataprovider exception'.
WHEN 21.
MESSAGE = 'gui_download::control flush error'.
WHEN 22.
MESSAGE = 'gui_download::Error'.
ENDCASE.
ENDIF.
ENDFORM. "download_to_pc
At The End Reward points.
Please it's Required.
Thanks ,
Rahul -
How to get the data from multiple nodes to one table
Hi All,
How to get the data from multiple nodes to one table.examples nodes are like A B C D E relation also maintained
Regards,
IndraHI Indra,
From Node A, get the values of the attributes as
lo_NodeA->GET_STATIC_ATTRIBUTES( IMPORTING STATIC_ATTRIBUTES = ls_attributesA ).
Similarily get all the node values from B, C, D and E.
Finally append all your ls records to the table.
Hope you are clear.
BR,
RAM. -
How to bring the data from application server to presentation server
hi,
i have one problem,i have written the program which will open the files in the application server when we run the program in the background(sm37),the same data from application server i want to bring into presentation server in the format of (.csv),how to bring the data from application to presentation server can any body help me on this topic.folowing is the code .
*& Report ZPFA_HIER_LOAD
REPORT ZFPA_HIER_LOAD.
*---- Declaration of Oracle connectioN
DATA con_name LIKE dbcon-con_name VALUE 'COMSHARE'.
DATA: MFL1(9),MFL2(5),MFL3(9),MFL4(2),MFL5(8) TYPE c.
DATA : mfilename type string.
data: begin of matab1 occurs 0,
MFL1(9) TYPE C,
MFL2(5) TYPE C,
MFL3(9) TYPE C,
MFL4(2) TYPE C,
MFL5(8) TYPE C ,
end of matab1 .
data: setid(8) type c.
data: begin of source occurs 0,
setid(8) type c,
end of source.
*PARAMETERS : p_pfile LIKE filename-FILEEXTERN.
*PARAMETERS : m_bsenty(8). " type c obligatory.
*mfilename = P_PFILE.
EXEC SQL.
SET CONNECTION :con_name
ENDEXEC.
EXEC SQL.
CONNECT TO :con_name
ENDEXEC.
EXEC SQL PERFORMING get_source.
SELECT set_id FROM UNIT_SET INTO
:setid
ORDER BY SET_ID
ENDEXEC.
start-of-selection.
LOOP AT SOURCE.
REFRESH matab1. CLEAR matab1.
EXEC SQL PERFORMING evaluate.
SELECT TO_CHAR(MEM_ID),TRIM(TO_CHAR(MEM_PID)) FROM UNIT_TREE INTO :MFL1,
:MFL5
where set_id = :SOURCE-SETID ORDER BY MEM_ID
ENDEXEC.
if SOURCE-SETID = '80000000'.
mfilename = '/tmp/aesorg'.
elseif SOURCE-SETID = '80000006'.
mfilename = '/tmp/Consolidation_Manager'.
elseif SOURCE-SETID = '80000010'.
mfilename = '/tmp/10org'.
elseif SOURCE-SETID = '80000012'.
mfilename = '/tmp/20org'.
elseif SOURCE-SETID = '80000018'.
mfilename = '/tmp/30org'.
elseif SOURCE-SETID = '80000025'.
mfilename = '/tmp/40org'.
Endif.
mfilename = '/usr/test.dat'.
************************This was i tried***********************
open dataset mfilename for output in text mode encoding default." IN
*TEXT MODE ENCODING DEFAULT.
if sy-subrc <> 0.
exit.
endif.
close dataset mfilename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = MFILENAME
FILETYPE = 'ASC'
TABLES
data_tab = matab1
EXCEPTIONS
file_write_error = 1
invalid_type = 2
no_authority = 3
unknown_error = 4
OTHERS = 10.
loop at matab1 .
transfer matab1 to mfilename.
endloop.
clear matab1.
ENDLOOP.
loop at matab1 .
transfer matab1 to mfilename.
endloop.
close dataset mfilename.
MFL5 = '0'.
CLEAR MFL5.
FORM evaluate.
if MFL5 = -1.
MFL5 = ''.
ENDIF.
concatenate MFL1 ',' into MFL1.
concatenate MFL1 ',' into MFL3.
matab1-MFL1 = MFL1.
matab1-MFL2 = 'ZBUE,'.
matab1-MFL3 = MFL3.
matab1-MFL4 = ' ,'.
matab1-MFL5 = MFL5.
append matab1 .
CLEAR MFL1.
CLEAR MFL2.
CLEAR MFL3.
CLEAR MFL4.
CLEAR MFL5.
ENDFORM.
"evaluate
*& Form GET_SOURCE
text
FORM GET_SOURCE.
source-setid = setid.
append source.
clear source.
ENDFORM. "GET_SOURCEHi Rammohan,
You cannot use OPEN DATASET to transfer data from application server to presentation server.
You can do the following :
<b>Do 1st point in BACKGROUND</b>
1. Read the data file from application server into an internal table using OPEN DATASET
<b>Do 2nd point in Foreground</b>
2. Once you get the data into an internal table, then use FM GUI_DOWNLOAD to download it on presentation server
You cannot use the above 2 point together in Background because its not possible. Hence you need program it partially in background and partially in foreground.
Best regards,
Prashant -
How to validate the dates in the table control ?
How to validate the dates in the table control ?
Can I write like this ?
LOOP AT it_tab .
CHAIN.
FIELD : it_tab-strtdat,it_tab-enddat.
module date_validation.
ENDCHAIN.
ENDLOOP.
Module Date_validation.
ranges : vdat type sy-datum.
vdat-sign = 'I'.
VDAT-LOW = it_tab-STRTDAT.
VDAT-HIGH = it_tab-ENDDAT.
VDAT-OPTION = 'BT'.
APPEND VDAT.
WHAT CODE I have to write here to validate ?
and If I write like this How can we know which is the current row being add ?
It loops total internal table ..?
Bye,
Muttu.Hi,
I think there is no need to put chain endchain.
To do validation you have to write module in PAI which does required validations.
Thanks
DARSHAN PATEL -
How to get the date for the first monday of each month
Dear Members,
How to get the date for the first monday of each month.
I have written the following code
SELECT decode (to_char(trunc(sysdate+30 ,'MM'),'DAY'),'MONDAY ',trunc(sysdate+30 ,'MM'),NEXT_DAY(trunc(sysdate+30 ,'MM'), 'MON')) FROM DUAL
But it look bith complex.
Abhishek
Edited by: 9999999 on Mar 8, 2013 4:30 AMUse IW format - it will make solution NLS independent. And all you need is truncate 7<sup>th</sup> day of each month using IW:
select sysdate current_date,
trunc(trunc(sysdate,'mm') + 6,'iw') first_monday_the_month
from dual
CURRENT_D FIRST_MON
08-MAR-13 04-MAR-13
SQL> Below is list of first monday of the month for this year:
with t as(
select add_months(date '2013-1-1',level-1) dt
from dual
connect by level <= 12
select dt first_of_the_month,
trunc(dt + 6,'iw') first_monday_the_month
from t
FIRST_OF_ FIRST_MON
01-JAN-13 07-JAN-13
01-FEB-13 04-FEB-13
01-MAR-13 04-MAR-13
01-APR-13 01-APR-13
01-MAY-13 06-MAY-13
01-JUN-13 03-JUN-13
01-JUL-13 01-JUL-13
01-AUG-13 05-AUG-13
01-SEP-13 02-SEP-13
01-OCT-13 07-OCT-13
01-NOV-13 04-NOV-13
FIRST_OF_ FIRST_MON
01-DEC-13 02-DEC-13
12 rows selected.
SQL> SY. -
How to save the data of ABAP report into a notepad in desktop location???
HI all,
Can any one tell me how to transfer the data of ABAP report into a Notepad.
Actually I have to schedule a ABAP report in background on daily basis and I want to transfer the
whole record into Notepad.
If any program is available for this..please clearify the relevent code for transferring.
Thanks
Rajeevdeclare a character type internal table.
now move your data from it_data ( internal table with data ) into table itab.
since you are running this report in background, you cannot save it to the desktop. Instead give any app server location
data: itab(400) occurs 0 with header line.
field-symbols: <fs1> type any.
data: gv_file type rlgrap-filename default 'TEST.TXT'.
data: gv_filepath type rlgrap-filename default <path>.
LOOP AT it_data.
DO 100 TIMES.
ASSIGN COMPONENT sy-index OF STRUCTURE it_data TO <fs1>.
IF sy-subrc = 0.
CONCATENATE itab <fs1> INTO itab SEPARATED BY ' '.
ELSE.
EXIT.
ENDIF.
ENDDO.
SHIFT itab LEFT DELETING LEADING ' '.
APPEND itab.
CLEAR itab.
ENDLOOP.
concatenate gv_filepath '/' gv_file into gv_file.
OPEN DATASET gv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
LOOP AT itab.
TRANSFER itab TO gv_file.
ENDLOOP.
CLOSE DATASET gv_file.
ENDIF. -
How to Audit the data displayed within a Webi report
Hi All,
We have BOBJ XI R2 SP4 installed on our server.
One of the requirements is to audit the data the user has viewed through Canned reports and also Adhoc reports created in Webi.
I understand that we can audit what reports are accessed by the user, but not sure how to audit the data within the report. Could someone please let me know if auditing data can be acheived form SDK ? If so how ?
Thanks,
SireeshaPablo,
The following should get you started;
This is a report to pull Universe Name, Report Name, Action Time (last refreshed), Action Duration (execution time), User Name and Object Name (universe objects used in reports).
The Result Objects are as follows:
Object Name from Actions/Action Details
Action Time from Actions
Action Duration from Actions
Action Type from Actions
Action Type Detail from Actions (detail object associated with Action Type)
User Name from Actions
Document Name from Actions/Document
Universe Name from Actions/Action Details
The Query Filters are as follows:
Action Time between Day1 And Day2
Note: The Query Filter is necessary (obviously) only to restrict the size of the query. I wouldn't run this query without a filter on demand. Depending on the size of your deployment, you might want to restrict the query initially to a specific universe/list of universes while testing.
At the report level, I moved Universe Name and Document Name in to (nested) sections.
i.e.
Section on: Universe Name
Section on: Document Name
Table
Another option would be to retrieve this information from the CMS tables using WID Scanner [here|http://www.forumtopics.com/busobj/viewtopic.php?t=80856]
The last option would be to use the Report Engine SDK (for Webi) to write a program extract this information from the CMS tables and pass it to another table. WID scanner (above) does effectively the same thing, passes the info to an MS Access table (if I remember correctly..I may be wrong. I have'nt used it since it last tried to create a report to extract all used objects.)
Best,
Srinivas -
How to pass the data from web dynpro to workflow.
hi gurus,
how to pass the data from web dynpro to workflow.
Regards
vijayHi
you can use function module
data ls_input_container TYPE swr_cont.
data lt_input_container TYPE TABLE OF swr_cont.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = ptask
IMPORTING
return_code = lv_return_code
new_status = lv_new_status
TABLES
input_container = pinput_container
message_lines = lt_message_lines
message_struct = lt_message_struct.
where you pass the data in imnternal table "pinput_container" as
ls_input_container-element = 'KUNNR'.
ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'CLUSER'.
ls_input_container-value = lv_cluser.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'BUKRS'.
ls_input_container-value = lv_bukrs. " youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VKORG'.
ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VTWEG'.
ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'SPART'.
ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
*Also Forgot to mention where ptask is your workflow ID *
Regards,
Arvind
Edited by: Arvind Patel on May 14, 2010 7:38 AM -
How to export the data to a excel file from RSA3?
Hi experts,
1.I am trying to save the RSA (SRM extractor) to excel spread sheet to compare SRM data with BI data. When i run the the transaction RSA3 it just showed me 10 different data packets. How to export the data to excel spread sheet for reconciliation?
2. Does any body know if the stepup tables exist for SRM extractors?
Thank in advance
Sharat.Hello Sharat,
You have two options of saving data to excel sheet:
Step 1:
Goto RSA3, change the "Data Records / Calls" to 1000 and then execute. This way instead of 10 different packets you will get one packet.
Step2:
Click on the list button, open the packet by double clicking it. You will see all the data on your screen.
Step3:
Goto System -> List -> Save - > Local File -> Spreadsheet and give some name for your xls file.
Assign points if helpful.
Regards,
F-S -
How to fetch the data & display the data if fields got the same name in alv
hi frnds, i need ur help.
how to fetch the data & display the data if fields got the same name in alv grid format.
thanks in advance,
Regards,
mahesh
9321043028Refer the url :
http://abapexpert.blogspot.com/2007/07/sap-list-viewer-alv.html
Go thru the guide for OOPs based ALV.
Use SET_TABLE_FOR_FIRST_DISPLAY to display the table:
CALL METHOD grid->set_table_for_first_display
EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT' Structure data
CHANGING
IT_OUTTAB = gt_sflight. Output table
You can also implement
Full Screen ALV, its quite easy. Just pass the output table to FM REUSE_ALV_GRID_DISPLAY.
For controlling and implementing the FS-ALV we have to concentrate on few of the components as follows :
1. Selection of data.
2. Prepare Layout of display list.
3. Event handling.
4. Export all the prepared data to REUSE_ALV_GRID_DISPLAY.
Regd,
Vishal
Maybe you are looking for
-
Hi friends, im recently involved in uploading images in the report, and i have done it by following the below link.... http://apex.oracle.com/pls/apex/f?p=267:11 This is the page process that i found for uploading the images in the table a_images BEG
-
hi sdn experts, could you please explain about value mapping? where the value mapping is used? thanks in advance.
-
Date Sort Order in Column View?
10.4 could not do this. Can 10.5?
-
Only non html pages being saved in History; also can't change homepage
The last time Firefox actually saved an html page in the history was May 16th. Firefox will only save pages that I visit that are non-html pages, a page that ends in .pdf, jpg, .doc, etc. I have tried several times messing around with options - picki
-
Acrobat Pro XI Serial Number Issues
I just bought and downloaded Acrobat Pro XI. However, when I try to launch the product I get an error that says "Serial Number you provided is valid, but a qualifying product could not be found on this computer". What the heck is this and how do I