Change Type of Screen Element in Report Program
Okay guys, I have been struggling with this the whole day.. someone please help me.
I have a selection screen defined in the selecton-screen of a report program
select-options : so_matnr for mara-matnr,
so_ebeln for ekpo-ebeln,
so_ebelp for ekpo-ebelp.
Now if I go to SE51 and give the program name and the screen number as 1000 (Default screen for report)
Now go to tab "Element List" --> "General Attributes"
in the column "Type of screen element" everything is considered as "I/O".
*Name* *Type of Screen Element*
%_SO_MATNR_%_APP_%-TEXT I/O
%_SO_MATNR_%_APP_%-OPTI_PUSH I/O
SO_MATNR-LOW I/O
%_SO_MATNR_%_APP_%-TO_TEXT I/O
SO_MATNR-HIGH I/O
%_SO_MATNR_%_APP_%-VALU_PUSH Push
%_SO_EBELN_%_APP_%-TEXT I/O
%_SO_EBELN_%_APP_%-OPTI_PUSH I/O
SO_EBELN-LOW I/O
%_SO_EBELN_%_APP_%-TO_TEXT I/O
SO_EBELN-HIGH I/O
%_SO_EBELN_%_APP_%-VALU_PUSH Push
%_SO_EBELP_%_APP_%-TEXT I/O
%_SO_EBELP_%_APP_%-OPTI_PUSH I/O
SO_EBELP-LOW I/O
%_SO_EBELP_%_APP_%-TO_TEXT I/O
SO_EBELP-HIGH I/O
Now, my requirement is that I need to do something at the loop at screen to change the 'I/O' to 'Text' for all the %TEXT% screen fields. Exactly behave like text labels in the dialog program
Now, I don't want to write a dialog program to achieve this. Is there any thing i can do in the report program to achieve it.
Hello,
Try something like this:
INITIALIZATION.
loop at screen.
if screen-name eq <your field>
screen-input = 0.
modify screen.
endif.
endloop.
The important thing is to do it on INITIALIZATION event
Gabriel P.-
Similar Messages
-
Passing parameter from selection screen to corresponding report program.
Hi all,
I am developing a report in which there is a selection screen containing 2 list boxes having month 'from' and 'to' ;ie the month range for which the report is to be run and a parameter for year.below it i have 2 radio button options which will lead to the report that the user clicks on.
I have done the following in the code.
selection-screen begin of block b1 with frame title text-001.
parameters: month1(10) as listbox visible length 10 obligatory.
parameters: month2(10) as listbox visible length 10.
parameters: year(4) obligatory.
selection-screen : end of block b1.
selection-screen: begin of block b2 with frame title text-002.
parameters: rb1 radiobutton group g1,
rb2 radiobutton group g1.
selection-screen : end of block b2.
if rb1 = 'X'.
submit ZMIS1.
ENDIF.
if rb2 = 'X'.
submit ZMIS2.
endif.
Now i want the values selected in the listbox and the year to be passed in the report that will be selected in the radiobutton (ie ZMIS1 or ZMIS2) so that the corresponding report output will be displayed directly with the inputs given in the selection screen .
Please tell me how to do this.Thanks in advance.You also have to pass Selection-screen data for called program the way it has been shown down.
REPORT ZVENKAT_ALV_LIST.
DATA:
IT_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS,
WA_RSPARAMS LIKE LINE OF IT_RSPARAMS.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: MONTH1(10) AS LISTBOX VISIBLE LENGTH 10 OBLIGATORY.
PARAMETERS: MONTH2(10) AS LISTBOX VISIBLE LENGTH 10.
PARAMETERS: YEAR(4) OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK B1.
SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS: RB1 RADIOBUTTON GROUP G1 USER-COMMAND UC1,
RB2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN : END OF BLOCK B2.
IF RB1 = 'X'.
WA_RSPARAMS-SELNAME = 'P_MATNR'. "PARAMETER or SELECT-OPTION of the called program
WA_RSPARAMS-KIND = 'P'. "S=Select-options P=Parameters
WA_RSPARAMS-SIGN = 'I'.
WA_RSPARAMS-OPTION = 'EQ'.
WA_RSPARAMS-LOW = '11010'.
WA_RSPARAMS-HIGH = SPACE.
SUBMIT ZMIS1 WITH SELECTION-TABLE RSPARAMS AND RETURN.
ENDIF.
IF RB2 = 'X'.
WA_RSPARAMS-SELNAME = 'P_MATNR'. "PARAMETER or SELECT-OPTION of the called program
WA_RSPARAMS-KIND = 'P'. "S=Select-options P=Parameters
WA_RSPARAMS-SIGN = 'I'.
WA_RSPARAMS-OPTION = 'EQ'.
WA_RSPARAMS-LOW = '11010'.
WA_RSPARAMS-HIGH = SPACE.
SUBMIT ZMIS2 WITH SELECTION-TABLE RSPARAMS AND RETURN.
ENDIF.
Thanks
Venkat.O -
Skipping Selection Screen for a report program
Hi guys,
I have a report program that works in 2 modes - Create and modify ( There is a toggle button in the ALV report). Its an editable ALV grid. There are 2 tcodes - zcreate and zmodify to access the same report in 2 above modes. For zmodify, i have a selection screen. How do i skip the selection screen for zcreate ?
Here is my report program
REPORT ZSWR_RCKDVOLS .
INCLUDE ZSWR_RCKDVOLS_TOP.
INCLUDE ZSWR_RCKDVOLS_CLDEF.
INCLUDE ZSWR_RCKDVOLS_CLIMP.
INCLUDE ZSWR_RCKDVOLS_SELSCR. " Selection Options are written in this.
INCLUDE ZSWR_RCKDVOLS_PBO.
INCLUDE ZSWR_RCKDVOLS_PAI.
INCLUDE ZSWR_RCKDVOLS_FORM.
INITIALIZATION
initialization.
perform layout_build.
AT SELECTION-SCREEN
at selection-screen on s_locid.
clear lv_plnt.
select single werk from oijrra
into lv_plnt
where locid in s_locid and rpart = gc_rpart.
perform memory_id_build.
START-OF-SELECTION
start-of-selection .
perform fieldcatalog.
perform fill_internal_table.
perform build_outtab.
END-OF-SELECTION.
CHECK: NOT gi_zswt_rckdvols[] IS INITIAL.
set SCREEN 100. "Main Screen
A sample code will be greatly helpful.
Thanks,
SHKSo if we were to implement this in your program.....
report zswr_rckdvols .
include zswr_rckdvols_top.
include zswr_rckdvols_cldef.
include zswr_rckdvols_climp.
<b> include zswr_rckdvols_selscr. " Selection Options are written in this ".
* Add this line into your selection screen include.
parameters: p_switch type c no-display.</b>
include zswr_rckdvols_pbo.
include zswr_rckdvols_pai.
include zswr_rckdvols_form.
* INITIALIZATION
initialization.
perform layout_build.
* AT SELECTION-SCREEN
<b>at selection-screen output.
if sy-tcode = 'ZCREATE'
and p_switch = space.
submit zswr_rckdvols
with p_switch = 'X'
and return.
leave program.
endif.</b>
at selection-screen on s_locid.
clear lv_plnt.
select single werk from oijrra
into lv_plnt
where locid in s_locid and rpart = gc_rpart.
perform memory_id_build.
* START-OF-SELECTION
start-of-selection .
perform fieldcatalog.
perform fill_internal_table.
perform build_outtab.
end-of-selection.
check: not gi_zswt_rckdvols[] is initial.
set screen 100. "Main Screen
Regards,
Rich Heilman -
Choose fields option in Selection Screen of report program.
Hi Experts,
Actually In my requirement , the user wants to display the output fields in ALV Grid and also in Block ALV format.They need 10 fields to be displayed by default and the additional fields has to be displayed based on the choose fields option
( i.e like SE11 choose fields option ) provided in the selection screen of this report program.So based on this the output has to be displayed.
Pls suggest ur ideas.....
Thanks in advance.
Regards,
Srinivas.Hi ,
The following code will be helpful for your requirement...
REPORT ypm_hist_dyn.
* T Y P E - P O O L S *
TYPE-POOLS: slis.
* T Y P E S *
TYPES : BEGIN OF t_equz,
datbi TYPE datbi, " Valid To Date
equnr TYPE equnr, " Equipment Number
erdat TYPE erdat, " Date on Which Record Was Created
aedat TYPE aedat, " Changed On
iloan TYPE iloan, " Location and account assignment for technical object
gewrk TYPE lgwid, " Object ID of the Work Center
ingrp TYPE ingrp, " Planner Group for Customer Service and Plant Maintenance
END OF t_equz,
BEGIN OF t_equz1,
datbi TYPE datbi, " Valid To Date
equnr TYPE equnr, " Equipment Number
erdat TYPE erdat, " Date on Which Record Was Created
aedat TYPE aedat, " Changed On
END OF t_equz1,
BEGIN OF t_iloa,
iloan TYPE iloan, "Location and account assignment for technical object
tplnr TYPE tplnr, " Functional Location
msgrp TYPE raumnr, " Room
END OF t_iloa,
BEGIN OF t_iflotx,
tplnr TYPE tplnr, "Functional Location
pltxt TYPE pltxt, " Description of functional location
END OF t_iflotx,
BEGIN OF t_equi,
equnr TYPE equnr, " Equipment Number
eqart TYPE eqart, "Type of Technical Object
END OF t_equi,
BEGIN OF t_crhd,
objid TYPE cr_objid, "Object ID of the resource
arbpl TYPE arbpl, "Work center
END OF t_crhd,
BEGIN OF t_eqkt,
equnr TYPE equnr, "Equipment Number
eqktx TYPE ktx01, "Description of technical object
END OF t_eqkt,
BEGIN OF t_t370k_t,
eqart TYPE eqart, "Type of Technical Object
eartx TYPE eartx, "Text for Object Type
END OF t_t370k_t,
BEGIN OF t_t024i,
ingrp TYPE ingrp, "Planner Group for Customer Service and Plant Maintenance
innam TYPE innam, "Name of the Maintenance Planner Group
END OF t_t024i,
BEGIN OF t_viqmel,
equnr TYPE equnr, "Equipment Number
qmnum TYPE qmnum, "Notification No
qmdat TYPE qmdat, "Date of Notification
bequi TYPE bequi, "Equipment Affected
iloan TYPE iloan, "Location and account assignment for technical object
END OF t_viqmel,
BEGIN OF t_final,
equnr TYPE equz-equnr,
eqktx TYPE eqkt-eqktx,
tplnr TYPE iloa-tplnr,
pltxt TYPE iflotx-pltxt,
iloan TYPE iloan,
datbi TYPE equz-datbi,
ingrp TYPE t024i-ingrp,
erdat TYPE equz-erdat,
enddt1 TYPE char10,
aedat TYPE equz-aedat,
innam TYPE t024i-innam,
equart TYPE equi-eqart,
eartx TYPE t370k_t-eartx,
qmnum TYPE viqmel-qmnum,
arbpl TYPE crhd-arbpl,
msgrp TYPE iloa-msgrp,
dat_diff TYPE char10,
END OF t_final,
BEGIN OF t_final1,
equnr TYPE equz-equnr,
eqktx TYPE eqkt-eqktx,
tplnr TYPE iloa-tplnr,
pltxt TYPE iflotx-pltxt,
END OF t_final1.
DATA: it_equz TYPE STANDARD TABLE OF t_equz,
it_iloa TYPE STANDARD TABLE OF t_iloa,
it_iflotx TYPE STANDARD TABLE OF t_iflotx,
it_equi TYPE STANDARD TABLE OF t_equi,
it_crhd TYPE STANDARD TABLE OF t_crhd,
it_eqkt TYPE STANDARD TABLE OF t_eqkt,
it_t370k_t TYPE STANDARD TABLE OF t_t370k_t,
it_t024i TYPE STANDARD TABLE OF t_t024i,
it_viqmel TYPE STANDARD TABLE OF t_viqmel,
it_final TYPE STANDARD TABLE OF t_final,
it_final1 TYPE STANDARD TABLE OF t_final1,
it_equz1 TYPE STANDARD TABLE OF t_equz1.
DATA: wa_equz TYPE t_equz,
wa_iloa TYPE t_iloa,
wa_iflotx TYPE t_iflotx,
wa_equi TYPE t_equi,
wa_crhd TYPE t_crhd,
wa_eqkt TYPE t_eqkt,
wa_t370k_t TYPE t_t370k_t,
wa_t024i TYPE t_t024i,
wa_viqmel TYPE t_viqmel,
wa_final TYPE t_final,
wa_final1 TYPE t_final1,
wa_equz1 TYPE t_equz.
DATA: t_equnr TYPE equz-equnr, "EQUZ-EQUNR
t_tplnr TYPE iloa-tplnr, "Functional Location
t_datbi TYPE equz-datbi, "Date
t_ingrp TYPE equz-ingrp, "Planner Group
t_eqart TYPE equi-eqart, "Technical Object
w_diff TYPE p,
w_time TYPE t.
* ALV DATA DECLARATION *
* Field Catalog
TYPES: BEGIN OF t_fldnam,
fld TYPE fieldname,
desc TYPE char30,
END OF t_fldnam.
DATA: is_layout TYPE slis_layout_alv,
it_fieldcat TYPE slis_t_fieldcat_alv,
is_fieldcat TYPE slis_fieldcat_alv,
it_fldnam TYPE STANDARD TABLE OF t_fldnam,
wa_fldnam TYPE t_fldnam,
it_sort TYPE STANDARD TABLE OF slis_t_sortinfo_alv,
wa_sort LIKE LINE OF it_sort.
DATA: i_events TYPE slis_t_event,
ls_line TYPE slis_listheader,
gt_list_top_of_page TYPE slis_t_listheader, "FOR TOP OF PAGE
gt_list_end_of_page TYPE slis_t_listheader. "FOR END OF PAGE
DATA : formname_top_of_page TYPE slis_formname VALUE
'GENERATE_TOP_OF_PAGE',
formname_end_of_page TYPE slis_formname VALUE
'GENERATE_END_OF_PAGE',
formname_user_command TYPE slis_formname VALUE 'USER_COMMAND'.
* C O N S T A N T S *
*CONSTANTS: c_top TYPE slis_formname VALUE 'TOP_OF_PAGE',
* c_final(40) TYPE c VALUE 'IT_FINAL',
* c_detail(15) TYPE c VALUE 'IT_FINAL1'.
DATA : g_save(1) TYPE c,
g_exit(1) TYPE c,
g_variant LIKE disvariant,
gx_variant LIKE disvariant.
* S E L E C T I O N S C R E E N *
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_equnr FOR t_equnr,
s_tplnr FOR t_tplnr,
s_datbi FOR t_datbi ,
s_ingrp FOR t_ingrp,
s_eqart FOR t_eqart.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(16) text-007.
SELECTION-SCREEN POSITION 22.
PARAMETERS : 11_flds RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND g1.
SELECTION-SCREEN COMMENT 39(13) text-009.
SELECTION-SCREEN POSITION 54.
PARAMETERS : 6_flds RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : END OF BLOCK blk2.
SELECTION-SCREEN:BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
PARAMETERS: alv_list RADIOBUTTON GROUP gp1 DEFAULT 'X'.
PARAMETERS: alv_grid RADIOBUTTON GROUP gp1.
SELECTION-SCREEN:END OF BLOCK b2.
SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE text-005.
PARAMETERS : p_vari LIKE disvariant-variant.
SELECTION-SCREEN: END OF BLOCK b3.
AT SELECTION-SCREEN.
PERFORM date_range.
IF s_datbi[] IS INITIAL.
MESSAGE e398(00) WITH 'ENTER A VALUE FOR DATE'(012).
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
START-OF-SELECTION.
IF 11_flds EQ 'X'.
PERFORM fill_equz.
PERFORM fill_iloa.
PERFORM fill_iflotx.
PERFORM fill_equi.
PERFORM fill_t370k_t.
PERFORM fill_t024i.
PERFORM fill_crhd.
PERFORM fill_eqkt.
PERFORM fill_viqmel.
ELSE.
PERFORM fill_equz.
PERFORM fill_iloa.
PERFORM fill_iflotx.
PERFORM haha_final.
PERFORM dyn_tab.
ENDIF.
PERFORM fill_final.
PERFORM get_day_diff.
* END-OF-SELECTION *
END-OF-SELECTION.
*Display Output in ALV Format
* PERFORM populate_layout.
PERFORM populate_fcat.
PERFORM populate_events .
* PERFORM gen_top.
PERFORM display_alv .
*& Form FILL_EQUZ
* text
* --> p1 text
* <-- p2 text
FORM fill_equz .
IF s_datbi-high IS INITIAL.
s_datbi-high = '99990701'.
ENDIF.
* IF s_datbi-LOW IS INITIAL.
* s_datbi-LOW = '20071201'.
* ENDIF.
SELECT datbi
equnr
erdat
aedat
iloan
gewrk
ingrp
FROM equz
INTO CORRESPONDING FIELDS OF TABLE it_equz
* WHERE datbi IN s_datbi AND equnr IN s_equnr.
WHERE equnr IN s_equnr
AND ingrp IN s_ingrp
AND datbi LE s_datbi-high
AND datbi GE s_datbi-low.
ENDFORM. " FILL_EQUZ
*& Form FILL_ILOA
* text
* --> p1 text
* <-- p2 text
FORM fill_iloa .
SELECT iloan
tplnr
msgrp
INTO CORRESPONDING FIELDS OF TABLE it_iloa
FROM iloa
FOR ALL ENTRIES IN it_equz
WHERE iloan = it_equz-iloan.
ENDFORM. " FILL_ILOA
*& Form FILL_IFLOTX
* text
* --> p1 text
* <-- p2 text
FORM fill_iflotx .
SELECT tplnr
pltxt
INTO CORRESPONDING FIELDS OF TABLE it_iflotx
FROM iflotx
FOR ALL ENTRIES IN it_iloa
WHERE tplnr = it_iloa-tplnr.
ENDFORM. " FILL_IFLOTX
*& Form FILL_EQUI
* text
* --> p1 text
* <-- p2 text
FORM fill_equi .
SELECT equnr
eqart
INTO CORRESPONDING FIELDS OF TABLE it_equi
FROM equi
FOR ALL ENTRIES IN it_equz
WHERE equnr = it_equz-equnr.
ENDFORM. " FILL_EQUI
*& Form FILL_T370K_T
* text
* --> p1 text
* <-- p2 text
FORM fill_t370k_t .
SELECT eqart
eartx
INTO CORRESPONDING FIELDS OF TABLE it_t370k_t
FROM t370k_t
FOR ALL ENTRIES IN it_equi
WHERE eqart = it_equi-eqart.
ENDFORM. " FILL_T370K_T
*& Form FILL_T024I
* text
* --> p1 text
* <-- p2 text
FORM fill_t024i .
SELECT ingrp
innam
INTO CORRESPONDING FIELDS OF TABLE it_t024i
FROM t024i
FOR ALL ENTRIES IN it_equz
WHERE ingrp = it_equz-ingrp.
ENDFORM. " FILL_T024I
*& Form FILL_CRHD
* text
* --> p1 text
* <-- p2 text
FORM fill_crhd .
SELECT objid
arbpl
INTO CORRESPONDING FIELDS OF TABLE it_crhd
FROM crhd
FOR ALL ENTRIES IN it_equz
WHERE objid = it_equz-gewrk.
ENDFORM. " FILL_CRHD
*& Form FILL_EQKT
* text
* --> p1 text
* <-- p2 text
FORM fill_eqkt .
SELECT equnr
eqktx
INTO CORRESPONDING FIELDS OF TABLE it_eqkt
FROM eqkt
FOR ALL ENTRIES IN it_equz
WHERE equnr = it_equz-equnr.
ENDFORM. " FILL_EQKT
*& Form FILL_VIQMEL
* text
* --> p1 text
* <-- p2 text
FORM fill_viqmel .
ENDFORM. " FILL_VIQMEL
*& Form SHW_DATA
* text
* --> p1 text
* <-- p2 text
FORM shw_data .
LOOP AT it_final1 INTO wa_final1.
WRITE : wa_final1-equnr , wa_final1-eqktx , wa_final1-tplnr , wa_final1-pltxt.
CLEAR wa_final1.
ENDLOOP.
ENDFORM. " SHW_DATA
*& Form POPULATE_LAYOUT
* text
* --> p1 text
* <-- p2 text
*FORM populate_layout .
* is_layout-zebra = 'X'.
* is_layout-colwidth_optimize = 'X'.
* APPEND is_layout.
*ENDFORM. " POPULATE_LAYOUT
*& Form POPULATE_FCAT
* text
* --> p1 text
* <-- p2 text
FORM populate_fcat .
IF 11_flds EQ 'X'.
APPEND 'EQUNR EQUIP NUMBER ' TO it_fldnam.
APPEND 'EQKTX DESC OF EQUIP ' TO it_fldnam.
APPEND 'ERDAT START DATE ' TO it_fldnam.
APPEND 'DATBI END DATE ' TO it_fldnam.
APPEND 'AEDAT CHND ON ' TO it_fldnam.
APPEND 'ILOAN LOC ON ACCOUNT ' TO it_fldnam.
APPEND 'TPLNR FUNC LOC ' TO it_fldnam.
APPEND 'PLTXT DESC FUNC LOC ' TO it_fldnam.
APPEND 'INGRP PLANNER GRP ' TO it_fldnam.
APPEND 'INNAM MAINT PLN GRP ' TO it_fldnam.
APPEND 'DAT_DIFF DATE DIFF ' TO it_fldnam.
ENDIF.
IF 6_flds EQ 'X'.
APPEND 'TPLNR FUNC LOCATION ' TO it_fldnam.
APPEND 'PLTXT DESC OF FUC LOC ' TO it_fldnam.
APPEND 'DATBI END DATE ' TO it_fldnam.
APPEND 'EQUNR EQUIP NUMBER ' TO it_fldnam.
APPEND 'ERDAT START DATE ' TO it_fldnam.
APPEND 'AEDAT CHND ON ' TO it_fldnam.
ENDIF.
ENDFORM. " POPULATE_FCAT
*& Form DISPLAY_ALV
* text
* --> p1 text
* <-- p2 text
FORM display_alv .
*--------------------------------------------------Preparing the Layout*
is_layout-colwidth_optimize = 'X'.
is_layout-zebra = 'X'.
*-------------------------------------------Preparing the Field Catalog*
BREAK-POINT.
LOOP AT it_fldnam INTO wa_fldnam.
is_fieldcat-tabname = 'IT_FINAL'.
is_fieldcat-fieldname = wa_fldnam-fld.
is_fieldcat-seltext_l = wa_fldnam-desc.
is_fieldcat-col_pos = sy-tabix.
IF wa_fldnam-fld = 'EQKTX'.
is_fieldcat-lowercase = ' '.
ENDIF.
APPEND is_fieldcat TO it_fieldcat.
CLEAR : is_fieldcat, wa_fldnam.
ENDLOOP.
*-------------------------------------------------------Calling Display*
IF alv_list = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = is_layout
it_fieldcat = it_fieldcat
it_events = i_events[]
i_default = 'X'
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSE.
* CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
* EXPORTING
* i_callback_program = sy-repid
* i_callback_top_of_page = 'GEN_TOP'
* is_layout = is_layout
* it_fieldcat = it_fieldcat
* it_events = i_events[]
* i_save = g_save
* is_variant = g_variant
* i_default = 'A'
* TABLES
* t_outtab = it_final
* EXCEPTIONS
* program_error = 1
* OTHERS = 2.
* IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
* ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
i_callback_top_of_page = 'GEN_TOP'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
is_layout = is_layout
it_fieldcat = it_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
* IS_VARIANT = g_variant
* IT_EVENTS = i_events[]
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 20
* I_SCREEN_START_LINE = 30
* I_SCREEN_END_COLUMN = 100
* I_SCREEN_END_LINE = 40
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. " DISPLAY_ALV
*& Form GET_DAY_DIFF
* text
* --> p1 text
* <-- p2 text
FORM get_day_diff .
w_time = '00:00:00'.
FIELD-SYMBOLS: <deb> LIKE LINE OF it_final.
LOOP AT it_final ASSIGNING <deb>.
CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
EXPORTING
date1 = <deb>-datbi
time1 = w_time
date2 = <deb>-erdat
time2 = w_time
IMPORTING
datediff = w_diff
* TIMEDIFF =
* EARLIEST =
* EXCEPTIONS
* INVALID_DATETIME = 1
* OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSEIF sy-subrc = 0.
<deb>-dat_diff = w_diff.
* MODIFY it_final FROM WA_FINAL TRANSPORTING dat_diff.
ENDIF.
ENDLOOP.
ENDFORM. " GET_DAY_DIFF
*& Form HAHA_FINAL
* text
* --> p1 text
* <-- p2 text
FORM haha_final .
* FIELD-SYMBOLS: <deb> LIKE LINE OF it_final.
LOOP AT it_iflotx INTO wa_iflotx.
* wa_final1-equnr = wa_iflotx-equnr.
* wa_final1-eqktx = wa_iflotx-eqktx.
wa_final1-tplnr = wa_iflotx-tplnr.
wa_final1-pltxt = wa_iflotx-pltxt.
APPEND wa_final1 TO it_final1.
ENDLOOP.
ENDFORM. " HAHA_FINAL
*& Form DYN_TAB
* text
* --> p1 text
* <-- p2 text
FORM dyn_tab .
LOOP AT it_equz INTO wa_equz.
wa_equz1-datbi = wa_equz-datbi.
wa_equz1-equnr = wa_equz-equnr.
wa_equz1-erdat = wa_equz-erdat.
wa_equz1-aedat = wa_equz-aedat.
APPEND wa_equz1 TO it_equz1.
ENDLOOP.
ENDFORM. " DYN_TAB
*& Form FILL_FINAL1
* text
* --> p1 text
* <-- p2 text
FORM fill_final.
IF 11_flds EQ 'X'.
FIELD-SYMBOLS: <deb> LIKE LINE OF it_equz,
<deb1> LIKE LINE OF it_final.
CLEAR wa_equz.
REFRESH : it_final[].
LOOP AT it_equz ASSIGNING <deb>.
wa_final-equnr = <deb>-equnr.
wa_final-datbi = <deb>-datbi.
wa_final-erdat = <deb>-erdat.
wa_final-aedat = <deb>-aedat.
wa_final-iloan = <deb>-iloan.
wa_final-ingrp = <deb>-ingrp.
APPEND wa_final TO it_final.
CLEAR wa_final.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb1>.
READ TABLE it_iloa INTO wa_iloa WITH KEY iloan = <deb1>-iloan.
<deb1>-tplnr = wa_iloa-tplnr.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb1>.
READ TABLE it_iflotx INTO wa_iflotx WITH KEY tplnr = <deb1>-tplnr.
<deb1>-pltxt = wa_iflotx-pltxt.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb1>.
READ TABLE it_eqkt INTO wa_eqkt WITH KEY equnr = <deb1>-equnr.
<deb1>-eqktx = wa_eqkt-eqktx.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb1>.
READ TABLE it_t024i INTO wa_t024i WITH KEY ingrp = <deb1>-ingrp.
<deb1>-innam = wa_t024i-innam.
ENDLOOP.
ELSE.
REFRESH : it_final[].
LOOP AT it_equz INTO wa_equz.
wa_final-datbi = wa_equz-datbi.
wa_final-equnr = wa_equz-equnr.
wa_final-erdat = wa_equz-erdat.
wa_final-aedat = wa_equz-aedat.
wa_final-iloan = wa_equz-iloan.
APPEND wa_final TO it_final.
CLEAR wa_final.
ENDLOOP.
FIELD-SYMBOLS: <deb2> LIKE LINE OF it_final.
LOOP AT it_final ASSIGNING <deb2>.
READ TABLE it_iloa INTO wa_iloa WITH KEY iloan = <deb2>-iloan.
<deb2>-tplnr = wa_iloa-tplnr.
ENDLOOP.
LOOP AT it_final ASSIGNING <deb2>.
READ TABLE it_iflotx INTO wa_iflotx WITH KEY tplnr = <deb2>-tplnr.
<deb2>-pltxt = wa_iflotx-pltxt.
ENDLOOP.
ENDIF.
ENDFORM. " FILL_FINAL
*& Form DATE_RANGE
* text
* --> p1 text
* <-- p2 text
FORM date_range .
DATA :l_dat TYPE i.
IF s_datbi-high IS NOT INITIAL.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = s_datbi-high
i_datum_von = s_datbi-low
IMPORTING
e_tage = l_dat
EXCEPTIONS
days_method_not_defined = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF l_dat GT '31'.
MESSAGE e398(00) WITH 'Split Your Planning for a range of 31 Days'(012).
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
ENDFORM. " DATE_RANGE
*& Form GEN_TOP
* text
* --> p1 text
* <-- p2 text
FORM gen_top .
DATA: info(60),
w_dt TYPE d.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = 'ALV DISPLAY'.
APPEND ls_line TO gt_list_top_of_page.
CONCATENATE 'Date :' s_datbi-low ' TO ' s_datbi-high INTO info SEPARATED BY space.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-info = info.
APPEND ls_line TO gt_list_top_of_page.
CLEAR ls_line.
ls_line-typ = 'A'.
ls_line-info = 'By Debarshi Roy'.
APPEND ls_line TO gt_list_top_of_page.
* Generate the End of Page
* CLEAR ls_line.
* ls_line-typ = 'H'.
* ls_line-info = 'ECL'.
* APPEND ls_line TO gt_list_end_of_page.
CLEAR: ls_line.
* PERFORM generate_top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_list_top_of_page
i_logo = 'DEB'.
ENDFORM. " GEN_TOP
*& Form POPULATE_EVENTS
* text
* --> p1 text
* <-- p2 text
FORM populate_events .
DATA: l_i_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = i_events[].
*----- Pass top-of-page
READ TABLE i_events WITH KEY name = slis_ev_top_of_page
INTO l_i_event.
IF sy-subrc = 0.
MOVE formname_top_of_page TO l_i_event-form.
APPEND l_i_event TO i_events.
ENDIF.
CLEAR l_i_event.
*----- Pass end-of-page
READ TABLE i_events WITH KEY name = slis_ev_end_of_page
INTO l_i_event.
IF sy-subrc = 0.
MOVE formname_end_of_page TO l_i_event-form.
APPEND l_i_event TO i_events.
ENDIF.
CLEAR l_i_event.
*----- Pass user-command
READ TABLE i_events WITH KEY name = slis_ev_user_command
INTO l_i_event.
IF sy-subrc = 0.
MOVE formname_user_command TO l_i_event-form.
APPEND l_i_event TO i_events.
ENDIF.
ENDFORM. " POPULATE_EVENTS
*& Form generate_top_of_page
* text
*FORM generate_top_of_page.
* CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
* EXPORTING
* it_list_commentary = gt_list_top_of_page
* i_logo = 'DEB'.
*ENDFORM. "generate_top_of_page
*& Form generate_end_of_page
* text
FORM generate_end_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_list_end_of_page
* I_LOGO =
ENDFORM. "generate_end_of_page
*& Form F4_FOR_VARIANT
* text
* --> p1 text
* <-- p2 text
FORM f4_for_variant .
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save = g_save
IMPORTING
e_exit = g_exit
es_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF g_exit = space.
p_vari = gx_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " F4_FOR_VARIANT -
How to find Screen element names in a program programatically
Hi Experts,
I have to find out all the table control names in a program. I am able to find all the screen numbers for a program from the table D020S. Is there any functionality to find out the table controls in a program or atleast screen elements in a program?
Thanks and regards,
venkat.Hello
You can get the information by calling the below two FM's. First call the FM IAC_GET_DYNPRO_INFO by passing the program name and screen number. This will return an internal table with all the screen elements of structure D021S.
Next loop through this internal table and pass the structure to FM RS_SCRP_GET_FIELD_TYPE_TEXT to know what kind of screen element it is.
Also, if the FILL parameter of the first FM is 'T', then it is a table control.
Regards
Ranganath -
What is module pool programming?how we can change the standard screen?
Hi EXPERTS
what is module pool programming?how we can change the standard screen using module pool programming ?
please explain with example.Check the below link:
http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.sap-img.com/
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
You can also check the transaction ABAPDOCU which gives you lot of sample programs.
Also you can see the below examples...
Go to se38 and give demodynpro and press F4.
YOu will get a list of demo module pool programs.
One more T-Code is ABAPDOCU.
YOu can find more examples there.
See the prgrams:
DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
regards,
venkat. -
Triggering smartform output from the report program
Hi,
I have developed a new report program.The selection screen of the report program is like this.
plant: ________
warehouse: ___________
sheet #: _________ to _________
bay/bin: ___________ to __________
building: ___________ to __________
counter sheet printer: __________
Auditor sheet printer: _________
When the data for sheet#,bay,building, counter sheet printer is given,then the counter sheet smartform has to be output on the screen.
or
When the data for sheet#,bay,building, auditor sheet printer is given,then the auditor sheet smartform has to be output on the screen.
Is it pessible to trigger the smartform from the selection screen of the report.If so can anyone send me a sample code for that.CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = <smartform name>
IMPORTING
fm_name = v_form_fm
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
Call Smartfrom to print the document
CALL FUNCTION v_form_fm
EXPORTING
p_compensation = p_comp <--parameter list
p_skill = p_skill
p_deci_auhtority = p_da
TABLES
s_job = s_job <--select option list
s_level = s_level
s_date = s_date
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
declare the paramters of your selection screen in the form interface section of the smartform.
If you have a parameter in teh selection screen then declare it in the smartform as:
P_matnr TYPE matnr (in form interface -
>import)
If you have a select option then
S_LEVEL LIKE <dictionary structure like a range>
this u declare it in the tables section of the form interface. For the select option , the dictionary sructures should be like a range (see RNGE_OBJID as an example). If you dont have a dictionary structure
then u need to declare it in the dictionary.
REWARD IF HELPFUL -
Text Elements not working in report program
Hi Friends,
I had created a new Text-element in my report program while i execute the program my text element is not displayed. but if i use the exiisting element then it is displaying correctly.
For Ex:
There are Text-Elements like
E01: Error
S01:Success
Now i am adding new text-element
W01: Warning.
In program;
Message text-W01 type 'E'. . In this case it is not displying the TE.
But if i use E01 or S01 then it is displaying.
Can anybody tell me what is the problem?HI
Goto SE38 > GOTO> TRANSLATION
Check in which language it is then CHANGE LANGUAGE FROM GERMEN TO ENGLISH.
NOW YOU BE ABLE TO CHANGE.
GOTO> TEXT ELEMENTS> SELECTION TEXTS -
Creating Cpmplecated screen in report program
hi,
We have requirement of creating report program with complecated screen design.This screen can be created easily in Dialog programming .I want to create similar screen in report program .
Please suggest how can I achieve this.
Thanks
SaurabhHi,
In the report program,
parameters: a type i.
now go to se51 enter the name of your program and screen no as 1000 and do the required changes as per the requirement.
if you execute the report, whatever you modified by using se51 will come. -
How to change the screen element of a single field in a table control
Hi Gurus,
I want to change the screen element of a single field (or the whole row) in a table control according to a condition.
I have 2 columns in the table control. One is an input column and one output only. When user enters values into the input column, they need to be compared against the values in the other column, and if there is a discrepancy, the row where the discrepancy is needs to be highlighted.
I have tried the following code which highlights the whole column ...
CONTROLS: TC_ZVOYG_BINS TYPE TABLEVIEW USING SCREEN 0500.
DATA: wa_tc_zvoyg_col LIKE LINE OF TC_ZVOYG_BINS-cols.
LOOP AT G_TC_ZVOYG_BINS_ITAB
INTO G_TC_ZVOYG_BINS_WA.
if G_TC_ZVOYG_BINS_WA-zdelivery_bin ne G_TC_ZVOYG_BINS_WA-zactual_bin.
loop at screen.
IF screen-name = 'ZVOYG_BINS-ZACTUAL_BIN'.
wa_tc_zvoyg_col-screen-intensified = 1.
MODIFY tc_zvoyg_bins-cols FROM wa_tc_zvoyg_col TRANSPORTING
screen-intensified WHERE screen-name = screen-name.
endif.
endloop.
endif.
endloop.
And also the following code which makes no change ...
LOOP AT G_TC_ZVOYG_BINS_ITAB
INTO G_TC_ZVOYG_BINS_WA.
if G_TC_ZVOYG_BINS_WA-zdelivery_bin ne G_TC_ZVOYG_BINS_WA-zactual_bin.
loop at screen.
IF screen-name = 'ZVOYG_BINS-ZACTUAL_BIN'.
screen-intensified = '1'.
modify screen.
endif.
endloop.
endif.
endloop.
Thanks in advance.Hi,
The modification of a screen element attribute (LOOP AT SCREEN...MODIFY SCREEN) must always be done in the PBO (for a dynpro, it will be in a PBO module, i.e. declared by MODULE ... OUTPUT)
About the loop at the internal table, it is done automatically by the system, also during the PBO, you'll find something like LOOP [AT itab] ... WITH CONTROL ... in the PBO part of the screen flow logic (note: you may have to complete with a supplementary READ TABLE if you don't use AT itab). So you don't need an additional loop.
Best regards
Sandra -
ABAP Dictionary type FLTP is not allowed for screen element
Hi Experts
I tried to open VBFA in se16 and i got the message in the status bar like this , what does it mean. please explain.
"ABAP Dictionary type FLTP is not allowed for screen element"Hi,
This is from help
ABAP Dictionary type FLTP is not allowed for screen element
Message no. 37048
<b>Diagnosis</b>
The format of the ABAP Dictionary field is only for use within the ABAP
program and cannot be used in the Screen Painter.
<b>Procedure</b>
The field cannot be used in screens. If you want to output the
information in the field or assign a value to the field from the screen,
you must use an intermediate field with an appropriate format.
<b>Reward points</b>
Regards -
How to set Screen type "Selection Screen" in Dialog program
Hi Experts,
I have copied a screen 400 from a program into my program. In that screen in source program, the screen type was defined as 'Selection Screen'. After i copied that screen into my program, the screen type Selection Screen option is disabled. How to set the screen type of a screen to Selection Screen.
I am currently getting the following error
"Error when generating the selection screen "0400" of "Ztest_screen ".
I tried running the generation program RSDBGENA. There the diagnosis was given as follows:
When generating the report Ztest_screen and its selection screen, an existing screen 1000 (not a selection screen) was overwritten.
The selection screen was defined as follows:
SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK blck1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
PARAMETERS: p_werks TYPE werks_d OBLIGATORY.
SELECTION-SCREEN END OF BLOCK blck1.
SELECTION-SCREEN END OF SCREEN 400 .
I am calling the screen 400 with selection screen declarations in PBO of screen 0100.
CALL SUBSCREEN sub_scr INCLUDING 'Ztest_Screen' '400'.
Where am i going wrong? Your inputs are needed.
ThanksThanks Przemysław and Nabheet for your suggestions.
I had copied the generated screen 400 also from the source program into my program. This was the error. I deleted that and the report got activated now.
Both the source and destination programs are not module pool. They are executable programs.
Thanks -
How to use a parameter of a report program from selection screen in a dialog program
how to use a parameter value(entered ) of a report program from a selection screen in a dialog program.
I have to fetch the value entered in the parameter of report program and display it in a dialog programHi Aasim,
Just mention like below in your ABAP report.
PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro -
How to get selection screen elements and its table reference of a report ?
halo experts
How can I get selection screen elements and its table reference of a report ? . I tried rs_refresh_from_select_options. But I am unable to get the table and field it is referring to
For eg if my selection screen 1000 is
parameters: p_carrid type spfli-carrid,
select-options :s-_connid type sflight-connid.
is there any Fm or method which gives me what are the screen elements( p_carrid and s_connid ) and what table( splfi and sflight ) and field ( carrid and conid )it is referring to ?The following code is an example of how you might dynamically determine all your PARAMETERS and SELECT-OPTIONS variables at run time. The PARAMETERS and SELECT-OPTIONS only point to a dictionary element--not a specific table. Even though you may say "spfli-carrid" or "sflight-connid", the data type really references the dictionary type and not a specific table/structure.
REPORT ZTEST_PROG.
TABLES sflight.
DATA:
screen_tab TYPE STANDARD TABLE OF screen,
wa_screen TYPE screen,
scrn_nm TYPE string,
scrn_leftover TYPE string,
l_type TYPE REF TO cl_abap_typedescr,
typ_nm TYPE string,
typ_pre TYPE string.
FIELD-SYMBOLS <fs_data> TYPE ANY.
PARAMETERS p_carrid TYPE spfli-carrid.
SELECT-OPTIONS s_connid FOR sflight-connid.
INITIALIZATION.
LOOP AT SCREEN.
IF screen-group3 = 'PAR'
OR screen-group3 = 'LOW'.
APPEND screen TO screen_tab.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
LOOP AT screen_tab INTO wa_screen.
ASSIGN (wa_screen-name) TO <fs_data>.
l_type = cl_abap_typedescr=>describe_by_data( <fs_data> ).
IF wa_screen-group3 = 'LOW'.
SPLIT wa_screen-name AT '-' INTO scrn_nm scrn_leftover.
TRANSLATE scrn_nm TO UPPER CASE.
ELSE.
scrn_nm = wa_screen-name.
ENDIF.
SPLIT l_type->absolute_name AT '=' INTO typ_pre typ_nm.
WRITE:
/ 'Screen Name: ', scrn_nm,
/ 'DDIC Type: ', typ_nm.
ENDLOOP.
When you get into defining internal tables you can determine those at run time with cl_abap_structdescr. The following is an example of how you might do that. You can loop through the "components_table" and evaluate each field of the structure in this way.
DATA: structure_reference TYPE REF TO cl_abap_structdescr,
components_table TYPE abap_compdescr_tab,
components_structure LIKE LINE OF components_table.
structure_reference ?= cl_abap_structdescr=>describe_by_data( any_structure ).
components_table = structure_reference->components.
I don't know if this answers any of your questions but I hope that some of it is useful. -
Submit a report program with same selection screen with some values exclude
Dear All,
I have to submit a stndard report program from a copied zprogram with same slection screen values ,
and in some slect-options some values will be excluded depending upon the zprogram.
How to make it.
I mean when i submit , same selction screen values should go along with , depending upon some condions i have to exclude some values .
for ex: selection screen from a to b
posting date should go same
but may be along with it i have to pass movem,ent type <> 202 to the submit screen ,.
how to do this?Hi Rajendra
>What if i have to pass the movement type also 200 to 250 , with 202 and 203 exluded .
Use BT ( between ) operator for 200 to 250 :
lr_move_type-sign = 'I'.
lr_move_type-option = 'BT'.
lr_move_type-low = '200'.
lr_move_type-high = '250'.
COLLECT lr_move_type.
And use NE ( not equal ) operator to exclude 202 and 203 :
lr_move_type-sign = 'I'.
lr_move_type-option = 'NE'.
lr_move_type-low = '202'.
COLLECT lr_move_type.
lr_move_type-low = '203'.
COLLECT lr_move_type.
It works just this way.
> Secondly,
>
> If i have the selction sreen same in both the screen , is it possible to pass the same values as it is with out writing one by one selct-option and parameter?
No I don't think there is way to do it without writing one by one
but you may not specify for empty select-options.
Edited by: Bulent Balci on Aug 21, 2010 11:46 AM
Maybe you are looking for
-
How does one convert a text path back into a line path in Illustrator CS 5?
The previous answer to the same question in Nov 2009 does not work for me. That was to copy and paste in front. I've tried every permutation of copy and paste; I renamed the path to path. It looks like a path when I add stroke, but it does not behave
-
I made some adjustments to Adobe settings and now some of my websites are not opening? Not sure if it's related but...
-
Alternative to iphoto on new IOS in the I
In the past year I have been using my Mini Ipad to initially capture, edit and upload selected images during a photo shoot. Now that Iphoto is no longer supported what are people using? I do understand photo, yet I miss the editing feature, adding sm
-
Account not in this store your is not valid for use in the U.S. store, you must switch to the Chinese Store before purchasing: Bing, Picasa PHO, Evernote, TED, Facebook, Weather Channel.
-
Nokia 5130c-2 Firmware Problem (V 07.97)
Hi there! I've recently updated my Nokia 5130c-2 Firmware version from V 06.94 (21-07-09) to V 07.97 (13-09-10) and I found some problems after I updated my handphone's firmware. The problem includes: » Delay in opening music player » Delay / Slow me