Internal table containing any number of fields.
Hi all ,
I had a requirement where in i have to create a generalised Function module for downloading the excel sheet to presentation server with some non editable fields.
Here i need to pass an internal table contaning different fields each time with different data in it to be saved in the excel sheet in the presentation server.
But iam unable to understand how to declare the import parameter i.e. an internal table which can accept different data whenever it is called and display the same in the output.
Please help me with the fields in the internal table and the corresponding types in the internal table.
Thanks in advance,
Venu.
Hi ,
Thanks for ur reply,
but still i have one problem i.e. since i can get any field as input how to know the type of it ?
I need to display the contents of the table in the output excel sheet so i actually need to know its type and the corresponding column name as heading in the output excel sheet.
Thanks in advance,
Venu.
Similar Messages
-
OO ALV displaying without Values despite Internal table contains
My below OO ALV displaying without Values despite Internal table contains the values ...
Help please ...
REPORT zsd_concession1 NO STANDARD PAGE HEADING
LINE-SIZE 285
LINE-COUNT 64
MESSAGE-ID zz.
Program Description ******************************
This report is to Calculate consession against Quotations
complying standards for enhanced Performance, Readability &
Maintenance.
Change Log *********************************
Remedy # / Who When Why / What
Transport #
CLASS lcl_event_handler DEFINITION DEFERRED.
*& Data Definitions .
DATA: BEGIN OF vbap_wa,
vbeln TYPE vbak-vbeln, "Quotation#
erdat TYPE vbak-erdat, "Quot date
knumv TYPE vbak-knumv, "Cond Rec#
posnr TYPE vbap-posnr, "Line Item
matnr TYPE vbap-matnr, "Mat#
zansicat TYPE zmarall-zansicat, "AnsiCat#
zansigrd TYPE zmarall-zansigrd, "Grade
zcurrvaltnarea TYPE zco002-zcurrvaltnarea,"Val Area
zcurrcstusd TYPE zco002-zcurrcstusd, "Cost$
zzbrndnm TYPE mara-zzbrndnm, "Brand
zqedscgrp TYPE zglbprc-zqedscgrp, "QE Disc Grp
mstav TYPE mara-mstav, "Status
kwmeng TYPE vbap-kwmeng, "Qty
lprc TYPE konv-kbetr, "List Price ZBP1
sprc TYPE konv-kbetr, "Std Pric ZNAA,ZNAX
netpr TYPE vbap-netpr, "Quot price
mrgn TYPE konv-kbetr, "margin%
END OF vbap_wa,
BEGIN OF konv_wa,
knumv TYPE konv-knumv, "Cond#
kposn TYPE konv-kposn, "Cond Item#
kappl TYPE konv-kappl, "Applic
kschl TYPE konv-kschl, "Cond Typ
kbetr TYPE konv-kbetr, "Price ZBP1,ZNAA,ZNAX
END OF konv_wa,
BEGIN OF vbpa_wa,
vbeln TYPE vbpa-vbeln, "Quot#
posnr TYPE vbpa-posnr, "Item#
parvw TYPE vbpa-parvw, "Prt Fn
kunnr TYPE vbpa-kunnr, "Cust#
END OF vbpa_wa,
BEGIN OF result_wa,
posnr TYPE vbap-posnr, "Line Item
matnr TYPE vbap-matnr, "Mat#
zansicat TYPE zmarall-zansicat, "AnsiCat#
zansigrd TYPE zmarall-zansigrd, "Grade
zcurrvaltnarea TYPE zco002-zcurrvaltnarea,"Val Area
zcurrcstusd TYPE zco002-zcurrcstusd, "Cost$
zzbrndnm TYPE mara-zzbrndnm, "Brand
zqedscgrp TYPE zglbprc-zqedscgrp, "QE Disc Grp
mstav TYPE mara-mstav, "Status
kwmeng TYPE vbap-kwmeng, "Qty
lprc TYPE konv-kbetr, "List Price ZBP1
sprc TYPE konv-kbetr, "Std Pric ZNAA,ZNAX
netpr TYPE vbap-netpr, "Quot price
mrgn TYPE konv-kbetr, "margin%
END OF result_wa.
DATA: ikonv LIKE STANDARD TABLE OF konv_wa,
ivbap LIKE STANDARD TABLE OF vbap_wa,
ivbpa LIKE STANDARD TABLE OF vbpa_wa,
iresult LIKE STANDARD TABLE OF result_wa.
*Work storage
DATA: BEGIN OF ws,
vbeln TYPE vbak-vbeln,
ok_code TYPE sy-ucomm,
alv_save TYPE c, "ALV save
alv_variant TYPE disvariant, "ALV Variant
alv_sort TYPE lvc_t_sort, "Sort table
END OF ws.
*Data declarations for ALV Main list
DATA : ty_lay1 TYPE lvc_s_layo,
it_fieldcat TYPE lvc_t_fcat ,
ty_fieldcat TYPE lvc_s_fcat ,
l_smenu TYPE REF TO cl_ctmenu,
c_alv1 TYPE REF TO cl_gui_alv_grid,
c_cont1 TYPE REF TO cl_gui_custom_container,
e_dclick TYPE REF TO lcl_event_handler.
*Data declarations for ALV Interactive list
DATA : ty_lay2 TYPE lvc_s_layo,
it_fcat TYPE lvc_t_fcat ,
ty_fcat TYPE lvc_s_fcat ,
c_alv2 TYPE REF TO cl_gui_alv_grid,
c_cont2 TYPE REF TO cl_gui_custom_container.
*Field-Symbols
FIELD-SYMBOLS:
<konv> LIKE konv_wa,
<vbap> LIKE vbap_wa.
*Constants
CONSTANTS:
c_end_row TYPE i VALUE 65000.
*CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row.
ENDCLASS. "lcl_event_handler DEFINITION
*CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_handler IMPLEMENTATION.
METHOD handle_double_click.
DATA: sec_wa LIKE LINE OF iresult.
*Reading the selected data into a variable
READ TABLE iresult INDEX e_row-index INTO sec_wa.
*Select the field details of the selected table
SELECT * FROM dd03l INTO CORRESPONDING FIELDS OF TABLE it_dd03l
WHERE tabname EQ ls_dd02l-tabname.
*Calling the ALV containing the field values
CALL SCREEN 101.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_event_handler IMPLEMENTATION
*& SELECTION-SCREEN.
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS:
s_vbeln FOR ws-vbeln DEFAULT '2002354788' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK a.
INITIALIZATION.
PERFORM setup_screen_defaults.
START-OF-SELECTION.
PERFORM gather_report_data.
END-OF-SELECTION.
PERFORM create_output.
*& Form initialization
FORM setup_screen_defaults.
CLEAR: ws, konv_wa, vbap_wa, vbpa_wa.
REFRESH: ivbpa, ikonv, ivbap, iresult.
ENDFORM. " setup_screen_defaults
*& Form gather_report_data
FORM gather_report_data.
SELECT vbeln posnr parvw kunnr
INTO TABLE ivbpa
FROM vbpa
WHERE vbeln IN s_vbeln
AND ( parvw = 'SP' OR "SoldTO
parvw = 'WE' OR "ShipTo
parvw = 'ZT' ). "Top Parent
SELECT vkvbeln vkerdat vkknumv vpposnr vp~matnr
z1zansicat z1zansigrd z2~zcurrvaltnarea
z2zcurrcstusd m1zzbrndnm zg~zqedscgrp
m1mstav vpkwmeng vp~netpr
INTO CORRESPONDING FIELDS OF TABLE ivbap
FROM vbak AS vk
INNER JOIN vbap AS vp
ON vpvbeln = vkvbeln
INNER JOIN zmarall AS z1
ON z1matnr = vpmatnr
INNER JOIN zco002 AS z2
ON z2matnr = vpmatnr
INNER JOIN zglbprc AS zg
ON zgmatnr = vpmatnr
INNER JOIN mara AS m1
ON m1matnr = vpmatnr
WHERE vk~vbeln IN s_vbeln
AND vk~auart = 'AG'."AG = Quot
SORT ivbap BY posnr matnr.
SELECT kvknumv kvkposn kvkappl kvkschl kv~kbetr
INTO TABLE ikonv
FROM konv AS kv
FOR ALL ENTRIES IN ivbap
WHERE kv~knumv = ivbap-knumv
AND kv~kposn = ivbap-posnr
AND kv~kappl EQ 'V'
AND ( kv~kschl EQ 'ZBP1'
OR kv~kschl EQ 'ZNAX'
OR kv~kschl EQ 'ZNAA' ).
SORT ikonv BY knumv kposn.
LOOP AT ivbap ASSIGNING <vbap>.
CLEAR konv_wa.
READ TABLE ikonv INTO konv_wa WITH KEY
knumv = <vbap>-knumv
kposn = <vbap>-posnr
kschl = 'ZBP1'
BINARY SEARCH.
IF sy-subrc EQ 0.
<vbap>-lprc = konv_wa-kbetr.
ENDIF.
READ TABLE ikonv INTO konv_wa WITH KEY
knumv = <vbap>-knumv
kposn = <vbap>-posnr
kschl = 'ZNAX'
BINARY SEARCH.
IF sy-subrc EQ 0.
<vbap>-sprc = konv_wa-kbetr.
ENDIF.
READ TABLE ikonv INTO konv_wa WITH KEY
knumv = <vbap>-knumv
kposn = <vbap>-posnr
kschl = 'ZNAA'
BINARY SEARCH.
IF sy-subrc EQ 0.
<vbap>-sprc = konv_wa-kbetr.
ENDIF.
ENDLOOP.
SORT ivbap BY posnr matnr.
LOOP AT ivbap INTO vbap_wa.
MOVE-CORRESPONDING vbap_wa TO result_wa.
APPEND result_wa TO iresult.
CLEAR: vbap_wa, result_wa.
ENDLOOP.
ENDFORM. " gather_report_data
*& Form create_output
FORM create_output.
CALL SCREEN 100.
FREE: iresult.
ENDFORM. " create_output
*& Module PBO_0100 OUTPUT
text
MODULE pbo_0100 OUTPUT.
SET PF-STATUS '0100'.
SET TITLEBAR '0100'.
IF c_cont1 IS INITIAL.
*Creating object of container
CREATE OBJECT c_cont1
EXPORTING
container_name = 'CCONT1'.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Creating object of alv
CREATE OBJECT c_alv1
EXPORTING
i_parent = c_cont1.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Alv layout
PERFORM alv_100_layout.
PERFORM save_alv_layout.
*Alv field catalogue
PERFORM alv_100_fieldcat.
*Displaying the ALV grid
CALL METHOD c_alv1->set_table_for_first_display
EXPORTING
is_layout = ty_lay1
i_save = ws-alv_save
is_variant = ws-alv_variant
CHANGING
it_outtab = iresult[]
it_sort = ws-alv_sort
it_fieldcatalog = it_fieldcat[].
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Create object of the event class
*and setting handler for double click
CREATE OBJECT e_dclick.
SET HANDLER e_dclick->handle_double_click FOR c_alv1.
ENDIF.
ENDMODULE. " PBO_0100 OUTPUT
*& Module PAI_0100 INPUT
text
MODULE pai_0100 INPUT.
ws-ok_code = sy-ucomm.
CASE ws-ok_code.
WHEN 'BACK'.
CALL SELECTION-SCREEN 1000.
CLEAR ws-ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
CLEAR ws-ok_code.
EXIT.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
CLEAR ws-ok_code.
EXIT.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " PAI_0100 INPUT
*& Form alv_100_layout
text
--> p1 text
<-- p2 text
FORM alv_100_layout.
ty_lay1-numc_total = 'X'. " Numc total line
ty_lay1-cwidth_opt = 'X'. " Optimal column width
ty_lay1-detailinit = 'X'. " Show values that are initial in
ty_lay1-sel_mode = 'A'. " Column selection mode
ty_lay1-no_merging = 'X'. " No merging while sorting columns
ty_lay1-keyhot = 'X'.
ty_lay1-grid_title = 'SD Concessions'.
ty_lay1-zebra = 'X'.
ty_lay1-no_toolbar = ' '.
ENDFORM. " alv_100_layout
*& Form alv_100_fieldcat
text
--> p1 text
<-- p2 text
FORM alv_100_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 1.
ty_fieldcat-fieldname = 'posnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Item#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 2.
ty_fieldcat-fieldname = 'matnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Mat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 3.
ty_fieldcat-fieldname = 'zansicat'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'AnsiCat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 4.
ty_fieldcat-fieldname = 'zansigrd'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Grade'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 5.
ty_fieldcat-fieldname = 'zcurrvaltnarea'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Val Area'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 6.
ty_fieldcat-fieldname = 'zcurrcstusd'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Cost $'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 7.
ty_fieldcat-fieldname = 'zzbrndnm'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Brand'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 8.
ty_fieldcat-fieldname = 'zqedscgrp'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'QE'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 9.
ty_fieldcat-fieldname = 'mstav'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Status'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 9.
ty_fieldcat-fieldname = 'kwmeng'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Qty'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 10.
ty_fieldcat-fieldname = 'lprc'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'List Price'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 11.
ty_fieldcat-fieldname = 'sprc'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Discount'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 12.
ty_fieldcat-fieldname = 'netpr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Quot Price'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 13.
ty_fieldcat-fieldname = 'mrgn'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Margin%'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
ENDFORM. " alv_100_fieldcat
*& Module PBO_0101 OUTPUT
text
MODULE pbo_0101 OUTPUT.
*Check if the Custom container exists.
IF c_cont2 IS INITIAL.
*Creating container object
CREATE OBJECT c_cont2
EXPORTING
container_name = 'CCONT2'.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*creating ALV grid for interactive list
CREATE OBJECT c_alv2
EXPORTING
i_parent = c_cont2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*ALV layout
PERFORM alv_101_layout.
*ALV fieldcatalogue
PERFORM alv_101_fieldcat.
*Sorting the output by field position
SORT iresult BY posnr.
*ALV for display field details
CALL METHOD c_alv2->set_table_for_first_display
EXPORTING
is_layout = ty_lay2
CHANGING
it_outtab = iresult[]
it_fieldcatalog = it_fieldcat.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDMODULE. " PBO_0101 OUTPUT
*& Module PAI_0101 INPUT
text
MODULE pai_0101 INPUT.
ENDMODULE. " PAI_0101 INPUT
*& Form alv_101_layout
text
--> p1 text
<-- p2 text
FORM alv_101_layout.
ty_lay2-grid_title = 'Line Details'.
ty_lay2-zebra = 'X'.
ty_lay2-no_toolbar = 'X'.
ENDFORM. " alv_101_layout
*& Form alv_101_fieldcat
text
--> p1 text
<-- p2 text
FORM alv_101_fieldcat.
REFRESH it_fieldcat.
REFRESH it_fcat.
CLEAR ty_fcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 1.
ty_fieldcat-fieldname = 'posnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Item#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 2.
ty_fieldcat-fieldname = 'matnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Mat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 3.
ty_fieldcat-fieldname = 'zansicat'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'AnsiCat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 4.
ty_fieldcat-fieldname = 'zansigrd'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Grade'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 5.
ty_fieldcat-fieldname = 'zcurrvaltnarea'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Val Area'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
ENDFORM. " alv_101_fieldcat
*& Form save_alv_layout
text
--> p1 text
<-- p2 text
form save_alv_layout.
ws-alv_save = 'A'.
ws-alv_variant-report = sy-repid.
endform. " save_alv_layoutHello
Creating fieldcatalogs manually is one of the major error sources in ALV programming.
There is hardly any reason why NOT to use the standard-fm LVC_FIELDCATALOG_MERGE in order to create a proper fieldcatalog.
If you need some modification of the standard fieldcatalog (e.g. renaming of columns, etc.) just do your post-processing after calling the fm.
Regards
Uwe -
Sorting internal table with variable no of fields
Hi ,
I want to sort the internal table with variable no of fields . Every time the report is run the number of fields as well as the sequence by which the table has to be sorted changes . How to do this .
regardsHi,
Please try this.
DATA: BEGIN OF ITAB OCCURS 0,
F1(4),
END OF ITAB.
DATA: BEGIN OF ITAB2 OCCURS 0,
F1(1),
F2(1),
F3(4),
END OF ITAB2.
ITAB-F1 = '01AC'.
APPEND ITAB.
ITAB-F1 = '02AB'.
APPEND ITAB.
ITAB-F1 = '01CD'.
APPEND ITAB.
ITAB-F1 = '02CA'.
APPEND ITAB.
LOOP AT ITAB.
ITAB2-F1 = ITAB-F1+2(1).
ITAB2-F2 = ITAB-F1+3(1).
ITAB2-F3 = ITAB-F1.
APPEND ITAB2.
ENDLOOP.
SORT ITAB2 BY F1 ASCENDING
F2 DESCENDING.
LOOP AT ITAB2.
WRITE: / ITAB2-F3.
ENDLOOP.
REWARD POINTS IF HELPFUL -
Runtime error in Dynamic internal table with AMOUNT and Quantity Fields..
Dear friends,
I am attempting write a dymanic Select Statement (with joins).
And the sleect query looks like this..
SELECT (LT_SEL_LIST)
INTO CORRESPONDING FIELDS OF
TABLE <DYN_TABLE>
FROM (LT_FROM_LIST)
WHERE (LT_WHERE3).
Here the into table is a dynamically created internal table..
which is created by ...this
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_OUTPUT2[]
IMPORTING
EP_TABLE = DY_TABLE.
the it_output2 contains the the fieldcatlog information of dynamically given fields :-
like:-
TABNAME
FIELDNAME
DATATYPE
LENG
INTTYPE
ROLLNAME
DECIMALS
REFTABLE
REFFIELD
i mean the internal table is constructed with reference to all the bove metadata.
Problem:- This query run fine with all the fields Except AMOUNT AND QUANTITY fields....
When the selection list contain VBAK-NETWR or MSEG-MENGE..It throws a runtime error.
"The data read during a SLECT access couldnt be inserted into the target field,either conversion is not supported for
the target field's type or the target field is too short."
after this I even tried to construct the dynamic table with CFILEDNAME and QFIELDNAME in the Fieldcatalog.
so now my fieldcatlog looks like this:---
LOOP AT IT_DD03L..
IF IT_DD03L-DATATYPE = 'CURR'.
TABLEFIELD-CFIELDNAME = IT_DD03L-FIELDNAME .
ENDIF.
IF IT_FIELDCAT3-DATATYPE = 'QUAN'.
TABLEFIELD-QFIELDNAME = IT_DD03L-FIELDNAME .
ENDIF.
TABLEFIELD-TABNAME = IT_DD03L-TABNAME.
TABLEFIELD-FIELDNAME = IT_DD03L-FIELDNAME.
TABLEFIELD-DATATYPE = IT_DD03L-DATATYPE.
TABLEFIELD-INTLEN = IT_DD03L-LENG.
TABLEFIELD-INTTYPE = IT_DD03L-INTTYPE .
TABLEFIELD-ROLLNAME = IT_DD03L-ROLLNAME.
TABLEFIELD-DECIMALS = IT_DD03L-DECIMALS.
TABLEFIELD-REF_TABLE = IT_DD03L-REFTABLE.
TABLEFIELD-REF_FIELD = IT_DD03L-REFFIELD.
APPEND TABLEFIELD.
CLEAR TABLEFIELD.
ENDLOOP.
Note:- this is a test code so ignore performance issues...
Please help me with some code ...to avoid the Runtime erorr.
Thanks,
jeevan.Hi Jeevan,
Why are moving only few fields from DD03L table to your field catalog? Why don't you use move-corresponding? The following code works for me in ECC6.0.
data: it_dd03l type table of dd03l initial size 0,
ls_dd03l type dd03l,
lt_fldcat TYPE lvc_t_fcat,
ls_fldcat TYPE lvc_s_fcat,
ls_where(72) TYPE c,
lt_where LIKE TABLE OF ls_where,
lt_fld LIKE TABLE OF ls_where,
lt_data_dy TYPE REF TO data.
field-symbols: <ft_data> TYPE STANDARD TABLE.
select * into table it_dd03l from dd03l
where tabname = 'VBAK'
and ( fieldname = 'VBELN' or fieldname = 'NETWR' ).
check sy-subrc eq 0.
loop at it_dd03l into ls_dd03l.
move-corresponding ls_dd03l to ls_fldcat.
append ls_fldcat to lt_fldcat.
move ls_dd03l-fieldname to ls_where.
append ls_where to lt_fld.
if ls_dd03l-fieldname = 'VBELN'.
clear ls_where.
concatenate ls_dd03l-fieldname ' <> ''''' into ls_where.
append ls_where to lt_where.
endif.
endloop.
check not lt_fldcat is initial.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt_fldcat
IMPORTING
ep_table = lt_data_dy
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
IF sy-subrc <> 0.
RAISE no_configuration_data.
ENDIF.
ASSIGN lt_data_dy->* TO <ft_data>.
check sy-subrc eq 0.
select (lt_fld) from VBAK into corresponding fields of table
<ft_data>
where (lt_where).
Thanks
Bala -
Sort the internal table based on the vendor field
hello experts,
I am stuck with a small problem...
I am uploading the data for partner association for vendors through lsmw BI program.
I am collecting all the records in the end of trasaction and downloading all those records on to the apps server.
I declared one internal table as
TYPES: BEGIN OF type_erecord,
mesg(1000) TYPE c,
END OF type_erecord.
DATA: t_precord type standard table of type_erecord initial size 0,
w_precord type type_erecord.
I am concatenating all the fields and moving to the internal table..
concatenate zvendor_master-source zvendor_master-lifnr blf00-lifnr
zvendor_master-lname zvendor_master-parvw
zvendor_master-psource zvendor_master-pname
zvendor_master-lifn2 bwyt3-lifn2
zvendor_master-ekorg zvendor_master-werks
w_PLANT-muplant zvendor_master-defpa
v_message
into w_precord-mesg separated by c_pipe.
append w_precord to t_precord.
now at the end I have to sort this internal table t_precord based on blf00-lifnr
can any one guide me how to do it
Thanks for your anticipation
NiteshaOK...
Than you can create one more table and do the process of sorting and than put data into the final table.
TYPES: BEGIN OF type_erecord,
mesg(1000) TYPE c,
END OF type_erecord.
DATA: t_precord type standard table of type_erecord initial size 0,
w_precord type type_erecord.
TYPES: BEGIN OF type_erecord_1,
mesg(1000) TYPE c,
lifnr type blf00-lifnr , "<<<
END OF type_erecord_1.
DATA: t_precord_1 type standard table of type_erecord initial size 0,
w_precord_1 type type_erecord.
I am concatenating all the fields and moving to the internal table..
concatenate zvendor_master-source zvendor_master-lifnr blf00-lifnr
zvendor_master-lname zvendor_master-parvw
zvendor_master-psource zvendor_master-pname
zvendor_master-lifn2 bwyt3-lifn2
zvendor_master-ekorg zvendor_master-werks
w_PLANT-muplant zvendor_master-defpa
v_message
into w_precord_1-mesg separated by c_pipe.
w_precord_1-lifnr = blf00-lifnr . " <<<
append w_precord_1 to t_precord_1. " <<<
SORT T_PRECORD_1 by LIFNR. " <<
LOOP AT T_PRECORD_1 into w_precord_1.
move-corresponing w_precord_1 to w_precord.
append w_precord to T_PRECORD.
clear w_precord .
endloop.
Regards,
Naimesh Patel -
Differences between Internal table with Occurs 0 and Field-Groups?
Is there really any difference between just using an internal table with an OCCURS 0 statement-- which would write the entire table to paging space-- and using field-groups? How is Field-Groups is more effective than Internal tables with occurs 0 when it comes to performance?
Could anybody please give some information regarding above question?
Thanks,
Surya.hi,
occurs 0 means it wont create any extra memory. based on the records only the memory is allocated to internal tables at run time. but when an internal table is created it can hold data of type to which it is declared.
i.e data: itab like mara occurs 0 with header line.
can take data only from mara table
we can also do in another way as using types keyword we can declare a standard structure and create a internal table of that type. its also not that useful as we have to change the structure depending on changes for storing data.
for this purpose field symbols are used. field symbols can hold any data means that they can point to tables, fields, any standard or user-defined types. field symbols actually points to respective types by which we can directly access to that types using field symbols.
filed symbols works more faster than internal tables.
if helpful reward some points.
with regards,
Suresh.A -
Appending internal table which is referenced by field-symbol
Hi,
I have a selection screen field called SP$00005 which is not known until runtime as the field is selected in Adhoc Query (SAP Query) by the user.
In the customer exit I am attempting to write code to default in a range to this field - it is a date field and I want to enter the range 01.04.2007 - 30.04.2007.
As select-options require the appending of the screen field table SP$00005 I need a way of adding an entry to this table.
Please see my latest attempt below which appends the correct value to the field symbol <startdate> but this entry does not appear in the internal table SP$00005 when stepping through at runtime.
Can anyone suggest a possible solution?
Thanks,
Alan
data: ref_field(8) type c.
field-symbols: <startdate> type table. "table = STANDARD by default
types: begin of sp$00005, "type definition required for syntax check
sign(1),
option(2),
low type d,
high type d,
end of sp$00005.
data: lt_ref type ref to data.
ranges: selection for sy-datum.
ref_field = 'SP$00005'.
create data lt_ref type table of (ref_field).
assign lt_ref->* to <startdate>.
assign (ref_field) to <startdate>. "- raises type error
move 'I' to selection-sign.
move 'BT' to selection-option.
move '20070401' to selection-low.
move '20070430' to selection-high.
append selection to <startdate>.Hi,
I tried the following which appends <startdate> with the new entry but the underlying referenced table SP$00005 is still not updated.
Any ideas?
Thanks,
Alan
field-symbols: <startdate> type any table,
<l_line> type any,
<l_field> type any.
data: ref_field(8) type c.
types: begin of sp$00005, "type definition required for syntax check
sign(1),
option(2),
low type d,
high type d,
end of sp$00005.
data: lt_ref type ref to data.
ranges: selection for sy-datum.
data: new_line type ref to data.
ref_field = 'SP$00005'.
create data lt_ref type table of (ref_field).
assign lt_ref->* to <startdate>.
create data new_line like line of <startdate>.
assign new_line->* to <l_line>.
if <l_line> is assigned.
move values using assing stt.
endif .
move 'I' to selection-sign.
move 'BT' to selection-option.
move '20070401' to selection-low.
move '20070430' to selection-high.
assign selection to <l_line>.
insert <l_line> into table <startdate>. -
Delete and internal table with not eqaul to fields
Hi I have an internal table I want delete few records with fields not equal to the variable v_lifnr, v_name1 and v_city,
structure of internal table has fields LIFNR, NAME1, CITY, TEXT1 and TEXT2.
I dont want to go by deletin in loop.Hi ,
i want to delete a internal table record based on the values which are NOT in the ranges ..
I am facing a syntax error with not operation in some system s
code looks like below !
i am not facing this problem when there in no not in ranges.
Thanks .
RANGES: RA_FFIDS FOR /VIRSA/ZFFUSERS-ZVIRFFID.
data : BEGIN OF IZVIRFFTRANSLOG OCCURS 0.
INCLUDE STRUCTURE /VIRSA/ZFFTNSLOG.
DATA: DESC LIKE RS38M-REPTI,
END OF IZVIRFFTRANSLOG.
data : IT_ZFlight_T LIKE IZVIRFFTRANSLOG OCCURS 0 WITH HEADER LINE.
IF NOT IT_ZFlight_T_TCODE[] IS INITIAL.
DELETE IT_ZFlight_T_TCODE WHERE ZVIRFFID NOT IN RA_FFIDS.
DELETE IT_ZFlight_T WHERE ZVIRFFID NOT IN RA_FFIDS.
ENDIF. -
Hello Dear ABAP Ace's,
Please let me know if what are differences between Extract datasets, Internal Tables, & Field Groups????? And what are the similarities?? Also let me know the uses of extract datasets & Field groups???
Thanks in advance.
Regards.
FarooqHi,
There are two ways of processing large quantities of data in ABAP - either using internal tables or extract datasets.
An internal table is a dynamic sequential dataset in which all records have the same structure and a key. They are part of the ABAP type concept. You can access individual records in an internal table using either the index or the key.
Extracts are dynamic sequential datasets in which different lines can have different structures. Each ABAP program may currently only have a single extract dataset. You cannot access the individual records in an extract using key or index. Instead, you always process them using a loop.
Check these links :
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9ede35c111d1829f0000e829fbfe/frameset.htm
http://www.geocities.com/SiliconValley/Grid/4858/sap/ABAPCode/Fieldgroups.htm
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm
Regards
L Appana -
Which internal table is storing MSEG-ZEILE field in bapi BAPI_GOODSMVT_CREA
Dear Sap Gurus,
I am facing one problem . i am using standard bapi for migo transaction i.e. BAPI_GOODSMVT_CREATE . it is working fine. Now i want to modify this bapi for some of our own developed fileds that is stored in another table say ZMSEG . i have found all fields in bapi of table mseg and put those fileds in our developed table zmseg but i am unable to find one field MSEG- ZEILE . Plz guide me from which internal table this filed MSEG-ZEILE is coming . The appropriate answers will be highly appreciated.
Thanks & Regards,
Amit RanjanHi
U can't find out the field ZEILE in BAPI field, just as somebody said you before, that field will be automatically calculated before saving the document.
So u can calculate it by yourself for your table ZMSEG
Anyway it doesn't make sense to change the BAPI in order to store the data in own z-table, there is an exit to do it:
EXIT_SAPLMBMB_001
Why don't you use it?
Max -
Table containing serial number of a material
Hi Friends,
I have activated serial number for materials. When I do GR, i give serial number for the material. I just want to know in which Table does these serial numbers specific to one material is stored. Information for the serial number for each specific materials is required for a developed report. Can anybody please let me know the table name where I can find the serial number for a specific material?
Thanks & Regards
SatyaDear Sahoo,
Check these tables,
SER00 General Header Table for Serial Number Management
SER01 Document Header for Serial Numbers for Delivery
SER02 Document Header for Serial Nos for Maint.Contract (SD Order)
SER03 Document Header for Serial Numbers for Goods Movements
SER04 Document Header for Serial Numbers for Inspection Lot
SER05 Document Header for Serial Numbers for PP Order
SER06 Document Header for Serial Numbers for Handling Unit-Content
SER07 Document Header for Serial Numbers in Physical Inventory
Regards
Mangalraj.S -
Why is the returned internal table contains same values?
Hi all,
I got a bapi that returned an internal table type MARC.
For testing in R/3, the internal table returns 3 material no. with different values,
but in vb.net, it returns 3 entries with same values,
(I've passed the internal table as ByRef in the vb)
what's wrong are there?
Thanks.Please post your test code.
-
Suggest a TABLE CONTAINING THESE IDOC segment FIELDS
E1MBXYJ : Create Goods Movement from Non-SAP System: Item++
Segment definition E2MBXYJ001 Released since Release 620 , Segment length: 0476
For the following fields. Tell me a table which contains a majority or all of the below fields.
PARGB : Trading partner's business area
internal data type : CHAR
Internal length : 000004 characters
Position in segment : 001, Offset : 0063. external length : 000004
PARBU : Clearing company code
internal data type : CHAR
Internal length : 000004 characters
Position in segment : 002, Offset : 0067. external length : 000004
CLASS : Class number
internal data type : CHAR
Internal length : 000018 characters
Position in segment : 003, Offset : 0071. external length : 000018
UMCLA : Class number
internal data type : CHAR
Internal length : 000018 characters
Position in segment : 004, Offset : 0089. external length : 000018
XCLAS : Checkbox
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 005, Offset : 0107. external length : 000001
UMXCL : Checkbox
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 006, Offset : 0108. external length : 000001
XNIBU : Checkbox
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 007, Offset : 0109. external length : 000001
BDTER : Requirement Date for the Component
internal data type : DATS
Internal length : 000008 characters
Position in segment : 008, Offset : 0110. external length : 000008
TBBEL : Article doc. no. of transfer requirement to be cancelled
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 009, Offset : 0118. external length : 000010
TBBPO : Article doc. item of transf.reqmnt item to be cancelled
internal data type : NUMC
Internal length : 000004 characters
Position in segment : 010, Offset : 0128. external length : 000004
TBBJR : Article doc. year of transfer requirement to be cancelled
internal data type : NUMC
Internal length : 000004 characters
Position in segment : 011, Offset : 0132. external length : 000004
OBJNR : Object number
internal data type : CHAR
Internal length : 000022 characters
Position in segment : 012, Offset : 0136. external length : 000022
AUTYP : Order category
internal data type : NUMC
Internal length : 000002 characters
Position in segment : 013, Offset : 0158. external length : 000002
QPLOA : Inspection Lot on Which the Usage Decision is Based
internal data type : NUMC
Internal length : 000012 characters
Position in segment : 014, Offset : 0160. external length : 000012
TBPKZ : Indicator: No Transfer Requirement Created
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 015, Offset : 0172. external length : 000001
TAFKZ : Indicator: do not cal up automatic TO creation
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 016, Offset : 0173. external length : 000001
KZEAR_OLD : Final Issue for This Reservation
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 017, Offset : 0174. external length : 000001
RSART : Record type
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 018, Offset : 0175. external length : 000001
PPRCTR : Partner Profit Center
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 019, Offset : 0176. external length : 000010
XMEVO : Propose quantities
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 020, Offset : 0186. external length : 000001
UMLGT : Storage Type
internal data type : CHAR
Internal length : 000003 characters
Position in segment : 021, Offset : 0187. external length : 000003
UMLGP : Storage Bin
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 022, Offset : 0190. external length : 000010
MENGE : Quantity
internal data type : QUAN
Internal length : 000013 characters
000003 decimal places, without sign
Position in segment : 023, Offset : 0200. external length : 000015
MEINS : Base Unit of Measure
internal data type : UNIT
Internal length : 000003 characters
Position in segment : 024, Offset : 0215. external length : 000003
FKBER : Functional Area
internal data type : CHAR
Internal length : 000004 characters
Position in segment : 025, Offset : 0218. external length : 000004
MHDAT : SLED/Best-Before Date or Date of Production
internal data type : DATS
Internal length : 000008 characters
Position in segment : 026, Offset : 0222. external length : 000008
BSSKZ : Special movement indicator for warehouse management
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 027, Offset : 0230. external length : 000001
EXIDV : External Handling Unit Identification
internal data type : CHAR
Internal length : 000020 characters
Position in segment : 028, Offset : 0231. external length : 000020
BERKZ : Material Staging Indicator for Production Supply
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 029, Offset : 0251. external length : 000001
PRVBE : Supply Area
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 030, Offset : 0252. external length : 000010
KZECH : Determination of batch entry in the production/process order
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 031, Offset : 0262. external length : 000001
UPTYP : Subitem Category, Purchasing Document
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 032, Offset : 0263. external length : 000001
REFIX : Field defined as in SY-TABIX
internal data type : INT4
Internal length : 000010 characters
Position in segment : 033, Offset : 0264. external length : 000011
VLIEF_AVIS : Delivery
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 034, Offset : 0275. external length : 000010
VBELP_AVIS : Delivery Item
internal data type : NUMC
Internal length : 000006 characters
Position in segment : 035, Offset : 0285. external length : 000006
XWAIT : Checkbox
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 036, Offset : 0291. external length : 000001
XNOEQ : Checkbox
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 037, Offset : 0292. external length : 000001
ILINR : IDoc line item number
internal data type : NUMC
Internal length : 000006 characters
Position in segment : 038, Offset : 0293. external length : 000006
VOLUM : Volume
internal data type : QUAN
Internal length : 000015 characters
000003 decimal places, without sign
Position in segment : 039, Offset : 0299. external length : 000017
VOLEH : Volume unit
internal data type : UNIT
Internal length : 000003 characters
Position in segment : 040, Offset : 0316. external length : 000003
ANZL1 : Number of Storage Units to be Placed Into Storage
internal data type : DEC
Internal length : 000003 characters
No decimal places, without sign
Position in segment : 041, Offset : 0319. external length : 000004
ANZL2 : Number of Storage Units to be Placed Into Storage
internal data type : DEC
Internal length : 000003 characters
No decimal places, without sign
Position in segment : 042, Offset : 0323. external length : 000004
LMEN1 : Quantity per Storage Unit to be Placed into Stock in Alt.UoM
internal data type : QUAN
Internal length : 000013 characters
000003 decimal places, without sign
Position in segment : 043, Offset : 0327. external length : 000015
LMEN2 : Quantity per Storage Unit to be Placed into Stock in Alt.UoM
internal data type : QUAN
Internal length : 000013 characters
000003 decimal places, without sign
Position in segment : 044, Offset : 0342. external length : 000015
LETY1 : Storage Unit Type
internal data type : CHAR
Internal length : 000003 characters
Position in segment : 045, Offset : 0357. external length : 000003
LETY2 : Storage Unit Type
internal data type : CHAR
Internal length : 000003 characters
Position in segment : 046, Offset : 0360. external length : 000003
KZKUB : Indicator: Do not create posting change notice
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 047, Offset : 0363. external length : 000001
UBTYP : Storage Type
internal data type : CHAR
Internal length : 000003 characters
Position in segment : 048, Offset : 0364. external length : 000003
UBLGP : Storage Bin
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 049, Offset : 0367. external length : 000010
MBLNR : Number of Article Document
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 050, Offset : 0377. external length : 000010
MBLPO : Item in Article Document
internal data type : NUMC
Internal length : 000004 characters
Position in segment : 051, Offset : 0387. external length : 000004
MJAHR : Article Document Year
internal data type : NUMC
Internal length : 000004 characters
Position in segment : 052, Offset : 0391. external length : 000004
URZEI : Original line in article document
internal data type : NUMC
Internal length : 000004 characters
Position in segment : 053, Offset : 0395. external length : 000004
GEBER : Fund
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 054, Offset : 0399. external length : 000010
FISTL : Funds Center
internal data type : CHAR
Internal length : 000016 characters
Position in segment : 055, Offset : 0409. external length : 000016
KZBWS : Valuation of Special Stock
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 056, Offset : 0425. external length : 000001
KDAUF_SD : Sales Order Number
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 057, Offset : 0426. external length : 000010
KDPOS_SD : Item Number in Sales Order
internal data type : NUMC
Internal length : 000006 characters
Position in segment : 058, Offset : 0436. external length : 000006
XRERE : Reservation reading is mandatory
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 059, Offset : 0442. external length : 000001
XSTOR : Reverse posting indicator
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 060, Offset : 0443. external length : 000001
BRGEW : Gross weight
internal data type : QUAN
Internal length : 000015 characters
000003 decimal places, without sign
Position in segment : 061, Offset : 0444. external length : 000017
GEWEI : Weight Unit
internal data type : UNIT
Internal length : 000003 characters
Position in segment : 062, Offset : 0461. external length : 000003
WM_KZBEW : Movement Indicator
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 063, Offset : 0464. external length : 000001
WENUM : Goods Receipt Number
internal data type : CHAR
Internal length : 000010 characters
Position in segment : 064, Offset : 0465. external length : 000010
GEBEH : Lot Container
internal data type : UNIT
Internal length : 000003 characters
Position in segment : 065, Offset : 0475. external length : 000003
ANZGEB : QM - No. of Containers
internal data type : QUAN
Internal length : 000006 characters
000003 decimal places, without sign
Position in segment : 066, Offset : 0478. external length : 000009
KANBA : Kanban Indicator
internal data type : CHAR
Internal length : 000001 characters
Position in segment : 067, Offset : 0487. external length : 000001
BSTMG : Goods receipt quantity in order unit
internal data type : QUAN
Internal length : 000013 characters
000003 decimal places, without sign
Position in segment : 068, Offset : 0488. external length : 000015
FUNC_AREA_LONG : Functional Area
internal data type : CHAR
Internal length : 000016 characters
Position in segment : 069, Offset : 0503. external length : 000016
GRANT_NBR : Grant
internal data type : CHAR
Internal length : 000020 characters
Position in segment : 070, Offset : 0519. external length : 000020see the tables MSEG, MKPF.
REgards,
Ravi -
Rows missing in ALV output compared to internal table (was "ALV issue")
Hi guys,
I am getting an ALV for 70 rows whereas the internal table I am passing has 120 rows.
Any idea why I could be facing this issue.Has anyone ever faced something similar?
Thanks,
Chirantan
Moderator message: please use more descriptive subject lines for your posts.
Edited by: Thomas Zloch on May 9, 2011 9:51 AMBY default, maximum number of coulmns displayed in ALV is 90.
You can increase it by setting the parameter NO_OUT as initial for the remaining fields in their field catalog.
Please check below sample code:
"Build Field catalog using structure of QALS
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_structure_name = 'QALS'
CHANGING
ct_fieldcat = g_t_fcat " Internal table contains more than 90 fields
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
"Only first 90 fields will be displayed in output. So, set NO_OUT as initial for remaining fields.
LOOP AT g_t_fcat INTO g_r_fcat WHERE no_out = 'X'.
g_r_fcat-no_out = ''. " Set NO_OUT as initial
MODIFY g_t_fcat FROM g_r_fcat INDEX sy-tabix TRANSPORTING no_out.
ENDLOOP. -
Delete spaces in internal table
Hi this question is to improve my performance...
what is the performance oriented way of delete entires in internal table where any of the field is empty.
1 2 3 4 5 6 7
A B C D E F G "<< ok
A B C E F G "<< delete
A B C E G "<< delete
or
loop at itab.
if itab-f1 eq space or itab-f2 eq space.....
delete itab.
endif.
endloop. " how to eliminate this loop...?Try this way
delete itab where f1 eq space
or f2 eq space
or f7 eq space.
a®
Maybe you are looking for
-
PB 12.5.1 Build 4015 Excel 12 Save As
We recently have clients with new W7 PCs and they have O365/Excel 2013. I have a simple save as function parent.idw_results.SaveAs ('', PDF!, TRUE). Saving out to Excel 5 does not work with very large files (74.000 rows). Saving as Excel 12 (help
-
Adobe Acrobat X 'spools' in both Vista & 7
Hi guys, I am posting here in the hopes someone else has previously run into this issue. This user originally had Windows Vista, along with an older version of Acrobat (9.0). The problem would be triggered by them attempting to "print to a PDF" throu
-
B2B 11g - B2B-51507 - A data element contains characters not listed in the
How can we change the character set used in b2b ? We are getting the following error when some non english characters are present in the payload. We see the issue also when CRLF characters are present in the payload. Error : Element NTE02 (Descriptio
-
Hi folks, I'm looking for some advice on which cable(s?) to purchase in order to hook my MIDI keyboard up to the MacBook Pro w/intel. I'm finding that some things that run on the power macs don't run on intel macs. However, I don't speak "Macenese" f
-
As far as I can tell, there is absolutely no way to create a menu from scratch. Allowing you to make your own back ground, music and links to videos. You think that we this "advanced" software, they would also have the option to make your own menu fr