Hierarchial list output to internal table
Hi Folks,
REPORT ZMB51 .
DATA LIST_TAB TYPE TABLE OF ABAPLIST.
<b>DATA: BEGIN OF olist OCCURS 0,
filler1(1500) TYPE c,
END OF olist.</b>
submit RM07DOCS EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LIST_TAB
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
TABLES
<b>LISTASCI = oLIST</b>
LISTOBJECT = LIST_TAB
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
BREAK-POINT.
write:/ sy-subrc.
ENDIF.
The above program is getting the MB51 output into an internal table.So far it is fine but this internal table can't be used for further processing.I want to get the MB51 output into an internal table which can be used for further processing.
data:begin of itab1 occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
werks like vbrp-werks,
sloc like zmmstoragebin-storage,
bwart like mseg-bwart,
mblnr like mseg-mblnr,
zeile like mseg-zeile,
budat like bkpf-budat,
menge like mseg-menge,
meins like mara-meins,
end of itab1.
If I delcare an internal table as above and given itab1 instead of olist it is going for dump.How to achieve this?
Thanks,
K.Kiran.
Hi Kiran,
You will be getting all the fields in the concatenation form into the string of oLIST.
Is there any delimitor like space or Tab between the fields or not?
so try to use Split the oLIST-filler1 into different fields at the delimiter
or you have to offet oLIST-filler1 to different fields
like example
itab1-matnr = oLIST-filler1+0(18)
itab1-werks = oLIST-filler1+19(4) like that
based on the fields data in oLIST-filler1 you have to do it
Regards
Anji
Similar Messages
-
Output of intern table xyz as List
Hi Experts,
I want to show my intern table gt_xyz as list.
What have I to do?
Regards,
Mikehi,
For a Simple List:
If the table consists of multiple records.
Loop at <itab>.
write: / 2 itab-field1,
12 itab-field2,
& so on...
endloop.
For an ALV list use the function module 'REUSE_ALV_LIST_DISPLAY'
DATA: REPID LIKE SY-REPID.
DATA: XFIELD TYPE SLIS_T_FIELDCAT_ALV.
DATA: X_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: GT_XEVENTS TYPE SLIS_T_EVENT.
XDATA is the internal table which holds the data for output.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPID
IT_FIELDCAT = XFIELD
IS_LAYOUT = X_LAYOUT
IT_EVENTS = GT_XEVENTS
TABLES
T_OUTTAB = XDATA.
regards,
Sireesha -
Save report painter output into internal table
Hi,
i have created a report painter for vendor aging report. got output in drill down format.
i need to show the data in smartform as well. so need to save the report painter output into an internal table. can anyone please help me resolving this.
regards,
sudha.mHi Sudha
You can use sample below:
DATA: list_tab TYPE TABLE OF ABAPLIST.
SUBMIT NROWS EXPORTING LIST TO MEMORY
AND RETURN VIA SELECTION-SCREEN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = list_tab.
ENDIF.
Best regards -
Standard Report RM07MLBB output in internal Table
Hi Experts ,
i want Standard Report output which is in basic List to internal table .
standard report RM07MLBB . i don't want to use enhancement nor Export /import
is there any other way .
regards
Deepak.hi JACk ,
It was a perfect solution of using Include and using internal table of that report
i have done certain modification in calling Program such as
include rm07mlbb.
at selection-screen output.
perform hide_fields. " in order to hide screen of include rm07mlbb .
loop at screen.
if screen-name = 'LIFNR-LOW' or
screen-name = 'LIFNR-HIGH' or
screen-name = 'MATNR-LOW' or
screen-name = 'MATNR-HIGH' or
screen-name = 'WERKS-LOW' or
screen-name = 'WERKS-HIGH' or
screen-name = 'BUKRS-LOW' or
screen-name = 'BUKRS-HIGH' or
screen-name = '%_LIFNR_%_APP_%-TEXT' or
screen-name = '%_LIFNR_%_APP_%-OPTI_PUSH' or
screen-name = '%_LIFNR_%_APP_%-TO_TEXT' or
screen-name = '%_LIFNR_%_APP_%-VALU_PUSH' or
screen-name = '%_MATNR_%_APP_%-TEXT' or
screen-name = '%_MATNR_%_APP_%-OPTI_PUSH' or
screen-name = '%_MATNR_%_APP_%-TO_TEXT' or
screen-name = '%_MATNR_%_APP_%-VALU_PUSH' or
screen-name = '%_WERKS_%_APP_%-TEXT' or
screen-name = '%_WERKS_%_APP_%-OPTI_PUSH' or
screen-name = '%_WERKS_%_APP_%-TO_TEXT' or
screen-name = '%_WERKS_%_APP_%-VALU_PUSH' or
screen-name = '%_BUKRS_%_APP_%-TEXT' or
screen-name = '%_BUKRS_%_APP_%-OPTI_PUSH' or
screen-name = '%_BUKRS_%_APP_%-TO_TEXT' or
screen-name = '%_BUKRS_%_APP_%-VALU_PUSH' or
screen-name = '%B002006_BLOCK_1000' or
screen-name = '%B001000_BLOCK_1000' or
screen-name = '%_ALV_DEF_%_APP_%-TEXT' or
screen-name = 'ALV_DEF' or
screen-name = 'NULLS' or
screen-name = '%_NULLS_%_APP_%-TEXT' .
screen-invisible = 1.
screen-active = 0.
modify screen.
endif.
endloop.
if not p_werks is initial .
werks-low = p_werks.
append werks.
endif.
if not p_bukrs is initial .
bukrs-low = p_bukrs.
append bukrs.
endif.
delete adjacent duplicates from werks comparing low.
delete adjacent duplicates from bukrs comparing low.
endform " hide_fields
Regards
Deepak. -
Report output into internal table and going ahead
Hi Folks,
We have a report MB51.It is showing some details.Now along with these details I wanna fetch some more detail and show it in the same report.
One way is I can copy this into Z and then go ahead with the changes.But I would like to know can we SUBMIT MB51 program in my ZPROGRAM and then get the output into an internal table and then again populate this internal table with the rest of the data and again display it as final output.
To be precise,is it possible to get the final output of MB51 into an internal table by using submit.
K.Kiran.dear kian
pls check the below code for example:
DATA LIST_TAB TYPE TABLE OF ABAPLIST.
DATA: BEGIN OF olist OCCURS 0,
filler1(1500) TYPE c,
END OF olist.
SUBMIT YTEST04 WITH MATNR EQ 't000001'
EXPORTING LIST TO MEMORY
AND RETURN.
BREAK-POINT.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LIST_TAB
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
TABLES
LISTASCI = oLIST
LISTOBJECT = LIST_TAB
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
BREAK-POINT.
ENDIF. -
Retrieve Filtered ALV output into Internal Table in Program
Guys,
I want to update my internal table with the filtered output that the user has selected in the output.
Lets say my internal table had 6 entries which was outputted.
Now the the user filters that output ( say where material is initial ) so that there are only 2 entries left on the output.
How can i know which 2 entries are left on the output screen ?
( i need to know as i am deleting entries from a table )
I came across this slis_filter_alv0 but could not use it in my user exit command routine.
Any ideas would be very helpful.
Cheers.....Try the method get_filtered_entries
This method teturns a table with all indexes that are currently hidden on the screen using the standard "filter" function.
CALL METHOD
<ref.var. to CL_GUI_ALV_GRID>->get_filtered_entries
IMPORTING
ET_FILTERED_ENTRIES = <int tbl of type LVC_T_FIDX >.
Then by using this internal table you can find out the entries which are shown in the output.
Hope this helps.
Thanks,
Balaji -
How to build tree/hierarchy/explorer format in internal table
Dear Friends,
I have one internal table with parent and child, again child will be acting as parent and it can have further childs ......
like that it goes on there is no constant levels it goes on....
for example.
parent child
100 101
102
103
101 201
202
102 301
103 401
402
403
this has to be displayed in hierarchy mode.
here i to as a column wich has to represent its position/level in the hierarchy like:
1
1.1
1.1.1
1.2
1.2.1
......n
1.2.2...n
1.3
2
2.1
2.2
3
etc...
let me know any ideas to get the maping of the rows to put it in tree format( like windows explorer).
Thanks,
Mahesh.GattuREPORT Z_TREE.
TYPE-POOLS: ICON.
TYPE-POOLS : FIBS,STREE.
INCLUDE <ICON>.
DATA : T_NODE TYPE SNODETEXT.
DATA : NODE_TAB LIKE T_NODE OCCURS 0 WITH HEADER LINE.
DATA : ITAB LIKE VBAP OCCURS 0 WITH HEADER LINE.
DATA : ITTX LIKE MAKT OCCURS 0 WITH HEADER LINE.
DATA : LI TYPE I VALUE 1.
CLEAR : NODE_TAB, NODE_TAB[].
SELECT * FROM VBAP INTO TABLE ITAB UP TO 50 ROWS.
SELECT * FROM MAKT INTO TABLE ITTX FOR ALL ENTRIES IN ITAB WHERE MATNR = ITAB-MATNR.
NODE_TAB-TYPE = 'T'.
NODE_TAB-NAME = ''.
NODE_TAB-TLEVEL = '01'.
NODE_TAB-NLENGTH = ''.
NODE_TAB-COLOR = '3'.
NODE_TAB-TEXT = 'ICON_DETAIL'.
NODE_TAB-TCOLOR = '1'.
NODE_TAB-KIND = 'I'.
NODE_TAB-TLENGTH = '2'.
NODE_TAB-TEXT1 = 'Details'.
NODE_TAB-TCOLOR1 = '2'.
NODE_TAB-KIND = 'I'.
NODE_TAB-TLENGTH1 = '10'.
APPEND NODE_TAB.
CLEAR NODE_TAB.
LOOP AT ITAB.
AT NEW VBELN.
NODE_TAB-TYPE = 'P'.
* node_tab-name = 'Sale Number'.
NODE_TAB-TLEVEL = '02'.
* node_tab-nlength = '12'.
NODE_TAB-TCOLOR = '4'.
NODE_TAB-TEXT = ITAB-VBELN.
NODE_TAB-TLENGTH ='10'.
APPEND NODE_TAB.
CLEAR NODE_TAB.
ENDAT.
READ TABLE ITTX WITH KEY MATNR = ITAB-MATNR.
NODE_TAB-TYPE = 'P'.
* node_tab-name = 'LI'.
NODE_TAB-TLEVEL = '03'.
* node_tab-nlength = '4'.
NODE_TAB-TEXT = 'ICON_MATERIAL'.
NODE_TAB-TCOLOR = '1'.
NODE_TAB-KIND = 'I'.
NODE_TAB-TLENGTH = '2'.
NODE_TAB-TCOLOR1 = '5'.
NODE_TAB-TEXT1 = ITAB-MATNR.
NODE_TAB-TLENGTH1 = '20'.
NODE_TAB-TCOLOR2 = '7'.
NODE_TAB-TEXT2 = ITTX-MAKTX.
LI = STRLEN( ITTX-MAKTX ).
NODE_TAB-TLENGTH2 = LI.
APPEND NODE_TAB.
CLEAR NODE_TAB.
* READ TABLE ITTX WITH KEY MATNR = ITAB-MATNR.
* NODE_TAB-TYPE = 'P'.
** node_tab-name = 'LI'.
* NODE_TAB-TLEVEL = '03'.
** node_tab-nlength = '4'.
* NODE_TAB-TCOLOR1 = '7'.
* NODE_TAB-TEXT1 = ITTX-MAKTX.
* LI = STRLEN( ITTX-MAKTX ).
* NODE_TAB-TLENGTH = LI.
* APPEND NODE_TAB.
* CLEAR NODE_TAB.
ENDLOOP.
CALL FUNCTION 'RS_TREE_CONSTRUCT'
TABLES
NODETAB = NODE_TAB.
*DATA: type_mapping TYPE stree_ctl_type_mapping_tab.
*DATA: wa_type TYPE stree_ctl_type_mapping.
*CLEAR: type_mapping[].
*wa_type-type = 'A'.
*wa_type-icon = '@BL@'.
*APPEND wa_type TO type_mapping.
CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
EXPORTING
STATUS = 'STANDARD'
USE_CONTROL = 'L'. -
REPORT OUTPUT to Internal table
Hi,
I order to achieve my requirement i need to know if this can happen:
Q: I want to write a report REP1 (which has ITAB1) in which I want to run an already existing report REP2 and direct the result of the REP2 to ITAB1. So that upon this ITAB1 contents i will again perform some queries.
Is this possible? If YES can anyone please let me know how?
Thanks in advance,
Karuna.Hi,
Try using the command
SUBMIT report_name AND RETURN EXPORTING LIST TO MEMORY.
This will call the report and store the output of called report in momory. Then you can retrieve it in your main program by FM 'LIST_FROM_MEMORY'.
See Below Sample Code.
Hope it Helps. Reward points if useful.
SUBMIT zefl_soff_update_single
WITH so_objid IN fin_tran
AND RETURN
EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_list
EXCEPTIONS
not_found = 1.
REFRESH t_ascii.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = t_ascii " list converted to ASCII
listobject = t_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
Regards,
Shailesh Jadhav -
Help on ALV GRID display outputting format for 2 internal tables
Hi,
I have requirement in ALV GRID where I need to display the data from 2 internal tables. The first internal table has the content of Delivery due list data and second the internal table has the corresponding stock transfer data of the Delivery Due list. I have a checbox on my selection screen, when unchecked it should output the 1st internal table data, i.e for Delivery due list. When it is checked then it should output 1st Internal table data + 2nd internal table data of stock transfer. For example, 1 document delivery due list data and 2nd line for that document should show the stock transfer data. You can also check the transaction code VL10E for that will show a delivery due list...and for stock tranfer,you need to check with Purchase order in in the USer Role tabstrip. Pls suggest.
Regards,
MiraHi,
U can try out this code
REPORT zzz_test NO STANDARD PAGE HEADING
MESSAGE-ID zz.
The Data Declarations
INCLUDE zzm_test_alv_data.
The Selection Screen Definition
INCLUDE zzm_test_alv_selscrn.
The definition and implementation of the event reciever class
INCLUDE zzm_test_alv_class.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM f1000_load_itabs.
END-OF-SELECTION
END-OF-SELECTION.
IF NOT cb_disp IS INITIAL.
CALL SCREEN 9001.
ENDIF.
Include for getting data
INCLUDE zzm_test_alv_forms.
Include for PAI and PBO of screen
INCLUDE zzm_test_alv_screen.
INCLUDE ZZM_TEST_ALV_DATA *
This include has all the data declaration defined
Author............: Judith Jessie Selvi
Creation Date.....: 28/03/2005
Table Declarations:
TABLES: mara,
makt.
Internal Tables:
The following structure type must be defined in the data dictionary
DATA: i_fieldcat TYPE lvc_t_fcat,
i_fieldcat1 TYPE lvc_t_fcat,
i_output1 TYPE STANDARD TABLE OF mara,
i_output2 TYPE STANDARD TABLE OF makt,
Work Areas:
w_output1 TYPE STANDARD TABLE OF mara,
w_output2 TYPE STANDARD TABLE OF makt.
Variable:
DATA: lv_repid LIKE sy-repid.
lv_repid = sy-repid.
INCLUDE ZZM_TEST_ALV_SELSCRN *
Author............: Judith Jessie Selvi
Creation Date.....: 28/03/2005
SELECTION-SCREEN BEGIN OF BLOCK b_main WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP 1.
PARAMETERS: cb_disp AS CHECKBOX.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN END OF BLOCK b_main.
INCLUDE ZZM_TEST_ALV_CLASS *
This include has all the data declaration defined for ALV
Author............: Judith Jessie Selvi
Creation Date.....: 28/03/2005
INCLUDE <icon>.
Predefine a local class for event handling to allow the
declaration of a reference variable before the class is defined.
DATA : o_alvgrid1 TYPE REF TO cl_gui_alv_grid ,
o_alvgrid2 TYPE REF TO cl_gui_alv_grid ,
cont_for_cognos1 TYPE scrfname VALUE 'BCALC_GRID_01_9100',
cont_for_cognos2 TYPE scrfname VALUE 'BCALC_GRID_01_9200',
custom_container1 TYPE REF TO cl_gui_custom_container,
custom_container2 TYPE REF TO cl_gui_custom_container,
Work Area
w_layout TYPE lvc_s_layo ,
w_variant TYPE disvariant.
Constants
CONSTANTS : c_lay(1) TYPE c VALUE 'A' . " All Layouts
CONSTANTS: BEGIN OF c_main_tab,
tab1 LIKE sy-ucomm VALUE 'MAIN_TAB_FC1', "
tab2 LIKE sy-ucomm VALUE 'MAIN_TAB_FC2', "
END OF c_main_tab.
INCLUDE ZZM_TEST_ALV_FORMS *
This Include has the various forms used in the program
Author............: Judith Jessie Selvi
Creation Date.....: 28/03/2005
*& Form f9001_build_field_cat
To Build Field Catalog
-->P_I_FIELDCAT text
-->P_0021 text
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 i005 WITH 'Error in ALV field catalogue creation'.
" text-e05.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " f9001_build_field_cat
*& Form f9000_objects_create
For creating Custom Containers
--> p1 text
<-- p2 text
FORM f9000_objects_create.
CREATE OBJECT custom_container1
EXPORTING
container_name = cont_for_cognos1
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
CREATE OBJECT custom_container2
EXPORTING
container_name = cont_for_cognos2
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc NE 0.
add your handling, for example
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = lv_repid
txt2 = sy-subrc
txt1 = 'The control could not be created'(510).
ENDIF.
CREATE OBJECT o_alvgrid1
EXPORTING i_parent = custom_container1.
CREATE OBJECT o_alvgrid2
EXPORTING i_parent = custom_container2.
ENDFORM. " f9000_objects_create
*& Form f9003_layout
To define the layout
-->P_SY_TITLE text
-->P_0030 text
-->P_0031 text
-->P_0032 text
FORM f9003_layout USING value(ptitle)
value(pzebra)
value(pmode)
value(pwidth).
w_layout-grid_title = ptitle.
w_layout-zebra = pzebra.
w_layout-sel_mode = pmode.
w_layout-cwidth_opt = pwidth.
w_variant-report = sy-repid.
ENDFORM. " f9003_layout
*& Form f9006_error_handle
To handle event
-->P_PTEXT text
FORM f9006_error_handle USING value(ptext).
IF sy-subrc NE 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = text-e03 " Error Note
txt2 = sy-subrc
txt1 = ptext.
ENDIF.
ENDFORM. " f9006_error_handle
FORM EXIT_PROGRAM *
FORM exit_program.
CALL METHOD custom_container1->free.
CALL METHOD custom_container2->free.
CALL METHOD cl_gui_cfw=>flush.
IF sy-subrc NE 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = lv_repid
txt2 = sy-subrc
txt1 = 'Error in FLush'(500).
ENDIF.
ENDFORM.
*& Form f1000_load_itabs
Select from Database
--> p1 text
<-- p2 text
form f1000_load_itabs.
SELECT * FROM mara
INTO TABLE i_output1
UP TO 50 rows.
SELECT * FROM makt
INTO TABLE i_output2
UP TO 50 rows.
endform. " f1000_load_itabs
INCLUDE ZZM_TEST_ALV_SCREEN *
2/ Description / Include functions
This include contains PBO and PAI events for the screen of report
ZZZJJ_TEST_ALV
3/ Responsibility
Author............: Judith Jessie Selvi
Creation Date.....: 28/03/2005
DATA FOR TABSTRIP 'MAIN_TAB'
CONTROLS: main_tab TYPE TABSTRIP.
DATA: BEGIN OF i_main_tab,
subscreen LIKE sy-dynnr,
prog LIKE sy-repid VALUE
'ZZZ_TEST',
pressed_tab LIKE sy-ucomm VALUE c_main_tab-tab1,
END OF i_main_tab.
*& Module STATUS_9001 OUTPUT
text
MODULE status_9001 OUTPUT.
IF custom_container1 IS INITIAL.
SET PF-STATUS 'ZSTATUS'.
SET TITLEBAR 'ZTITLE'.
Creating Object
PERFORM f9000_objects_create.
Building the field catalog
PERFORM f9001_build_field_cat TABLES i_fieldcat
USING 'MARA'.
PERFORM f9001_build_field_cat TABLES i_fieldcat1
USING 'MAKT'.
Modifying the field catalog
PERFORM f9002_modify_field_cat TABLES i_fieldcat.
For Layout
PERFORM f9003_layout USING sy-title 'X' 'B' 'X'.
ENDIF.
ENDMODULE. " STATUS_9001 OUTPUT
*& Module MAIN_TAB_ACTIVE_TAB_SET OUTPUT
Call method to display in the output grid
MODULE main_tab_active_tab_set OUTPUT.
main_tab-activetab = i_main_tab-pressed_tab.
CASE i_main_tab-pressed_tab.
WHEN c_main_tab-tab1.
To display report
i_main_tab-subscreen = '9100'.
CALL METHOD o_alvgrid1->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = c_lay
is_layout = w_layout
CHANGING
it_outtab = i_output1[]
it_fieldcatalog = i_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i000 WITH text-e06."Error in ALV report display
LEAVE LIST-PROCESSING.
ENDIF.
WHEN c_main_tab-tab2.
To display report
i_main_tab-subscreen = '9200'.
CALL METHOD o_alvgrid2->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = c_lay
is_layout = w_layout
CHANGING
it_outtab = i_output2[]
it_fieldcatalog = i_fieldcat1[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i005 WITH text-e06."Error in ALV report display
LEAVE LIST-PROCESSING.
ENDIF.
WHEN OTHERS.
DO NOTHING
ENDCASE.
ENDMODULE. MAIN_TAB_ACTIVE_TAB_SET OUTPUT
*& Module MAIN_TAB_ACTIVE_TAB_GET INPUT
Check & Process the selected Tab
MODULE main_tab_active_tab_get INPUT.
CASE sy-ucomm.
WHEN c_main_tab-tab1.
i_main_tab-pressed_tab = c_main_tab-tab1.
WHEN c_main_tab-tab2.
i_main_tab-pressed_tab = c_main_tab-tab2.
WHEN OTHERS.
DO NOTHING
ENDCASE.
ENDMODULE. MAIN_TAB_ACTIVE_TAB_GET INPUT
*& Module USER_COMMAND_9001 INPUT
User Command
MODULE user_command_9001 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
PERFORM exit_program.
SET SCREEN '0'.
WHEN 'EXIT' OR 'CANC'.
PERFORM exit_program.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. USER_COMMAND_9000 INPUT
*& Module MAIN_TAB_ACTIVE_TAB_SET INPUT
Set sunscreen
MODULE main_tab_active_tab_set INPUT.
main_tab-activetab = i_main_tab-pressed_tab.
CASE i_main_tab-pressed_tab.
WHEN c_main_tab-tab1.
i_main_tab-subscreen = '9100'.
WHEN c_main_tab-tab2.
i_main_tab-subscreen = '9200'.
WHEN OTHERS.
DO NOTHING
ENDCASE.
ENDMODULE. MAIN_TAB_ACTIVE_TAB_SET INPUT
Thanks & Regards,
Judith. -
Collecting spool list into internal table.
Hey guys,
Could you pls help me in how to take the output in spool list and collec the list into one internal table?
i guess using GET_PRINT_PARAMETER does that? how to collect the list from the spool list.
ambichan.Hi ambi,
e.g.:
SUBMIT y123...
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = liste
EXCEPTIONS
not_found = 1
OTHERS = 2.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = tab
listobject = liste
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
LOOP AT tab.
append tab to tab_total.
endloop.
free tab.
regards Andreas -
How to store output of SQ01 into internal table.
Hello Experts
How to store output of SQ01 into internal table.
Thanks,
UmeshYou can't store the sq01 output into internal table.
Once you create the query it will generate the abap program, in that program you can see the contents.
Regards
Sasi -
How to pass data from list to internal table
Sir,
Please tell me how to pass data from list display to internal table. Some fields in the list display are input fields .These are added at run time and these added values should be stored in the internal tableFollow this code sample:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = W_REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
P_SELFLD TYPE SLIS_SELFIELD.
case p_ucomm.
when '<Some user Action>'.
Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1->check_changed_data
* Your internal table will have the data
endcase.
ENDFORM.
Regards,
Ravi -
ALV Tree list output using the Class and method
Hi,
How to get the internal table values of ALV Tree List in classes.
My requirement is i need to store the output values in Ztable of a SAP Transaction of CK86_99.
for this, i copied the SAP Standard Transaction into Z tcode and i am trying to poplulate the output display into Ztable. But this standard tcode CK86_99 is using the classes of ALV tree list to display output.
CL_STRUCTURE_EXPLOSION_TREE -- Class
CONSTRUCTOR - method
Finally in the above mentioned method, i am able to see the output values of ALV tree list in the internal table of mt_output_table.
But these are SAP Standard Class and method.
My doubt is, How to get these internal table values in my Zprogram.
is there any user exit or badi can we use in the method of class???? Actually my system is 4.6C
Please suggest me on this problem.
Thanks in advance
KBS ReddyFirst your getInstance() method returns 'singleton' which you havent declared/init anywhere.
your getAll() method needs to be static if you need to call it the way you are doing.
In your getAll() method u are passing a parameter called patientRecord ... where have you declared/init it.
i think you have to do something like this ... if i have understood you correctly.
/* THIS IS IN YOUR SERVLET*/
Collections c = database.getAll();
out.println(C);
/* YOUR FlatfileDatabase CLASS HAS SOMETHING LIKE THIS*/
public static FlatfileDatabase getInstance() {
return new FlatfileDatabase();
public static Collections getAll() { -
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 -
Finding duplicates:Minus set operator in dealing with internal tables
Dear experts,
I am newbie to ABAP developement,i have been given an assignment to find the duplicate list of vendors in lfa table.
Now duplicate list doesnot means that text tokens will be just exact to conclude them as duplicate ,it could also be like
1111 Vendor ABC
1222 ABC Vendor
If anybody has clue ,how to work on such a problem ,plz come forward.
Right now i just tried initially how to find exact duplicates,i found on change command,it do works.
Then i am trying a new way which should just do the same thing.
I did as per this algorithm
1.Compute wholesome list in one internal table itab1
2.Used delete adjacent duplicates in itab2.
3.I feel itab3=itab1-itab2 will contain all duplicates in itab3.
Can anyone give me a hint.How can i do A-B ?.Hi Arul,
There is no special aided SET operations upon internal tables in ABAP. Concerning your particular task I would say that you can try INSERT statement for each record in your internal table without preliminary comparing them with DB table. If there is a record in DB table with the same key then sy-subrc after INSERT will be non zero (actually 4) and no real insert would occur. So, only those records would be inserted which have no counterpart in DB table.
Best regards, Sergei
Maybe you are looking for
-
Hi Experts, I have posted one document with amount of USD 30000.00 against 30001 Fund center ... Document Number is :- 280000001 same amount has released as consumable amount ,release document number is :- 29000001 Now i am not understand why system
-
Is Maxtor Personal Storage 3200 compatible with MacBook OSx 10.6?
I can't see the external hard drive on my MacBook. Is there a compatibility issue?
-
System settings regularly get lost
Every day or so I find the settings for mouse buttons have disappeared. At one point Time Machine was also turned off without my knowing it. Has anyone else had this happen?
-
Hi All I need to assign a new cost center to the HR module to allocate for payroll costs... I m not sure what needs to be done but can anyone guide me on this Thank you Rukshana
-
Creating an Import Document iView
Hi, I´m trying to create an iview for batch document upload to the portal. At the moment, I've only been able to upload documents from a source directory in the server, given an xml file uploaded from the client, which indicates the location of these