Search help in selection screens for interactive report
A search help can only be assigned to DB table.
So my doubt is can it also be used for seletion screens created for an interactive report?
If yes what is the procedure.. Please give me one example at least...
waiting for your valuable suggestions.....
Thanks,
regards,
Chinmay
Hi Chinmay,
I suppose your requirement is to give search help to selection screen elements.
Here is the code.
REPORT ZSHAIL_F4HELP .
parameters: name(10) type c .
TYPES: BEGIN OF VALUES,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
END OF VALUES.
dATA: PROGNAME LIKE SY-REPID,
DYNNUM LIKE SY-DYNNR,
DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
VALUES_TAB TYPE TABLE OF VALUES.
at selection-screen on value-request for name.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'DEMOF4HELP'
fieldname = 'CARRIER1'
SEARCHHELP = ' '
SHLPPARAM = ' '
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'CARRIER'
STEPL = 0
VALUE = ' '
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
SELECTION_SCREEN = ' '
IMPORTING
USER_RESET =
TABLES
RETURN_TAB =
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
PROGNAME = SY-REPID.
DYNNUM = SY-DYNNR.
CLEAR: FIELD_VALUE, DYNPRO_VALUES.
FIELD_VALUE-FIELDNAME = 'CARRIER'.
APPEND FIELD_VALUE TO DYNPRO_VALUES.
I hope your query is solved.
If so,please award points.
Regards,
Sylendra.
Similar Messages
-
Need help on search help on selection screen field
Hi guyz,
Please tell me how to pass the parameter or restrict the below search help.
*s_bsart FOR ekko-bsart . " Doc. Type*
For the above selection screen field i need to display the data only for cat = F if i click search help.
Thanks,
Mohamed KaleelHi,
Use At selection-screen for value-request for s_bsart.
SELECT_OTPIONS: s_bsart FOR ekko-bsart.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bsart.
CALL SCREEN 100 STARTING AT 10 5
ENDING AT 50 10.
MODULE value_list OUTPUT.
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SET PF-STATUS space.
NEW-PAGE NO-TITLE.
s_bsart-low = 'F' / 'CAT=F'.
write :/ s_bsart-low.
Hide: s_bsart-low
clear s_bsart-low.
ENDMODULE.
AT LINE-SELECTION.
LEAVE TO SCREEN 0.
This will resolve the issue.
Regards,
Gurpreet -
Variants on tabbed selection screen for ALV reports
Scenario: We use a tabbed selection screen for an ALV report. We create a variant, make a selection field on the second tab mandatory & save it without a value. When we run the report with the saved variant it does not check that the required field on the second tab is populated before it executes.
Question: How can I code such a check?
Edited by: Alridge Tom on Jul 4, 2008 3:43 PMHi,
try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
START HERE
PARAMETERS: pa_vari TYPE disvariant-variant.
INITIALIZATION.
g_repid = sy-repid.
CLEAR e_variant.
e_variant-report = sy-cprog.
e_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
pa_vari = e_variant-variant.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
PERFORM alv_variant_f4 CHANGING pa_vari.
*& Form ALV_VARIANT_F4
FORM alv_variant_f4 CHANGING pa_vari.
DATA: l_exit(1) TYPE c.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = e_variant
i_tabname_header = 'ANYTHING'
i_save = 'A'
IMPORTING
e_exit = l_exit
es_variant = e_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 l_exit = space.
pa_vari = e_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " ALV_VARIANT_F4
END
Hope iy helps!
Alfonso -
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 -
Selection Screen for crystal report ?
Hi to all,
Is it possible to create selection screen using Crystal report designer alone ?
I came to know that we can give selection parameteres using SELECT EXPERT option in desginer.
Can we create selection screen for user input like we have in abab (selection screen) ?.
Is it possible to check authorization using Crystal report designer ?
If anyone knows anything .... remotely connected with the question I asked please reply.
Waiting for reply.
Regards,
Surya.Surya,
To do what you are wanting, you will want to do the following:
1) Create parameters. Open the Field Explorer > right click Parameter Fields > fill in the necessary fields o create the desired parameter.
2) Add the parameter to the Select Expert.
2a) If you are using a SQL Command to generate your data set you will need to add the parameter name to the Parameter List of the Command and add it the selection criteria of the SQL statement.
Something like this:
WHERE f.FieldName = {?ParameterName}
HTH,
Jason -
Regarding Search help on selection-screen field
Hi there,
I am working on custom tables.
I have a requirement to maintain search pattern on a selection-screen field.
selection-screen parameter: p_name which is company name filed from Z table.
By giving a string like Holl* and by pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
Thanks in advance.
-TulasiHi
Go through the link given below :
How to create a search help for my own fields in selection screen
F4 search help on report selection screen
also try :
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'VKORG'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_VKORG'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'C'
TABLES
VALUE_TAB = T_TABLE1
FIELD_TAB = field_tab
RETURN_TAB = RET_TAB
DYNPFLD_MAPPING = DYN_TAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
With Regards
Nikunj shah -
Search help on selection screen.
I have a selection screen with
Report name
Variant name
Variant fields
Variant fields is attached to a search help 'Z_Search_variant' and this search help fetches values based on "Report name" "Variant name" on the selection screen.
I am using
AT SELECTION-SCREEN ON VALUE-REQUEST FOR Variant_field
PERFORM f4_help_variant.
FORM f4_help_variant.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = space
fieldname = space
SEARCHHELP = 'Z_SEARCH_VARIANT'
SHLPPARAM = 'REPORT'
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
VALUE = Report
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = 'X'
CALLBACK_PROGRAM = SY-REPID
CALLBACK_FORM = ' '
SELECTION_SCREEN = ' '
IMPORTING
USER_RESET =
TABLES
RETURN_TAB = return_tab
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
How do I pass value to this search help? Currently I do not see this FM allowing this option? Any other options?Hi Vinita,
wat i figured out from your problem is u need how to get values from FM so u can do it in this way..
READ TABLE it_return INTO wa_return INDEX 1.
IF sy-subrc = 0.
wa_output-vkorg = wa_return-fieldval.
ENDIF.
IF wa_output-vkorg IS NOT INITIAL.
MODIFY it_output FROM wa_output INDEX row_id * it_output is final ITAB
TRANSPORTING vkorg.
ENDIF.
CALL METHOD c_alv->refresh_table_display.
CLEAR: wa_return,it_return[],wa_output. -
Dynamic Search-help in Selection Screen Parameter
Hi,
Please can you provide some solution for the below requirements.
I have 2 fields ( Organization channel and Team ) in my selection screen. Under one organization channel there can be many teams.
And I am trying a dynamic search help on both the fields using event AT selection-screen on Value request and
FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
But I am facing the below issue .
First I am giving some values in field 'Organization channel' . Then I am clicking on F4 button on my 2nd field 'Team' .
and in debugging mode under the event 'At selection-screen on value request', Select option SO_Team is blank.
The value provided in the Organiozation channel is not being captured in SO_TEAM-Low
Please have a look on the below codes.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_team-low .
if not so_orgchannel-low is initial. "Here so_orgchannel-low value is coming as Zeros.
select * from HRP1001 into table GT_HRP1001
where objid = so_orgchannel-low.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ORGID'
value_org = 'S'
dynpprog = 'ZTEST'
dynpnr = '1000'
TABLES
value_tab = gt_hrp1001
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.Hi,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_team-low .
"Add This Begin
CLEAR t_dynpfields.
REFRESH t_dynpfields.
t_dynpfields-fieldname = 'SO_ORGCHANNEL-LOW'.
APPEND t_dynpfields.
w_repid = sy-repid.
* reading Screen variables and Values
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = w_repid
dynumb = sy-dynnr
TABLES
dynpfields = t_dynpfields
EXCEPTIONS
OTHERS.
READ TABLE t_dynpfields INDEX 1.
so_orgchannel-low = t_dynpfields-fieldvalue.
"Add this End
if not so_orgchannel-low is initial. "Your code is here
select * from HRP1001 into table GT_HRP1001
where objid = so_orgchannel-low.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ORGID'
value_org = 'S'
dynpprog = 'ZTEST'
dynpnr = '1000'
TABLES
value_tab = gt_hrp1001
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Regards,
Prabhudas -
Selection screen for EEA report
Hi guys
Q1 - I need help on understanding what should be inputs filled in selection screens fields of EEA report (WEIMS) for Canada :
LEAVE Definition section - what does this field mean on selection screen - should we be entering Leave of absence action here or Separation / termination actions?
Q2 - in my system there are aproximately 200 terminations in system for reporting period 2013, but not sure why term report of WEIMS is pulling only 10 .. and most of those PERNRs dont appear in error log either.
ThanksEmployee File
If the data of an employee is correct (as per data elements below) , the PERNR , his IT0077 , IT0008 salary, NOC code etc are picked up in Employee file including Full time, part time and temporary employees:
IT0001 has Work contract field maintained.
IT0016 Contract type Infotype is maintained.
IT0077 infotype is maintained with correct CMA code.
All Permanent and Full-time employees on LOA will appear in Employee file.
Term FileEmployees having work contract as Temporary will qualify to appear in this file, if following data criteria are met:
IT0001 –work contract= Temporary
IT0016- Contract Type = Fixed term with end date
IT0077 infotype is maintained with correct CMA code.
This file is NOT providing us information about employees who got terminated in reporting year , instead this pulls up Contract start and end date for Fixed term contract Temporary employees.
All Temporary employees on LOA will appear in Term file.
Promo fileIF any employee has had Org change with reason as Promotion ( what we define in Selection screen) in reporting period , this file will pull up data of the employee with promotion date, irrespective of Employee type (permanent / temp etc) and employment status ( active / inactive/ withdrawn) if following data paramenters are maintained appropriately:
IT0001 – work contract is filled
IT0016 – Contract type is maintained
IT0077 maintained with correct CMA code.
Error file Will have all employees having incorrect / missing data for selection screen. -
How can I add a new field in selection screen for this report
*& Report ZGS_BARKODLA_HIZLI_GIRIS
report zgs_barkodla_hizli_giris.
tables: mara,
mseg,
mch1,
*mch1,
mkpf,
mchb ,
makt.
type-pools: esp1.
data: i_message_tab type esp1_message_tab_type,
wa_message_tab type esp1_message_wa_type ,
sc_count type i.
ALV
type-pools: slis, kkblo.
data: gs_layout type slis_layout_alv ,
gt_fldcat type slis_t_fieldcat_alv with header line,
gt_header type slis_t_listheader with header line,
gt_sortin type slis_t_sortinfo_alv with header line,
g_repid like sy-repid .
define add-fieldcat.
gt_fldcat-fieldname = &1.
gt_fldcat-ref_tabname = &2.
gt_fldcat-seltext_s = &3.
gt_fldcat-seltext_m = &3.
gt_fldcat-seltext_l = &3.
gt_fldcat-reptext_ddic = &3.
gt_fldcat-ddictxt = 'M'.
append gt_fldcat.
clear gt_fldcat.
end-of-definition.
types: begin of titab,
sel type xfeld,
matnr type matnr,
maktx type maktx,
charg type charg_d,
menge type menge_d,
erfmg type erfmg,
end of titab.
data : witab type titab.
data : itab type table of titab.
data : ok_code type sy-ucomm.
controls: tc_itab type tableview using screen 0100.
data: gv_header like bapi2017_gm_head_01,
gv_code like bapi2017_gm_code.
BAPI export parameters
data: gv_headret type bapi2017_gm_head_ret,
gv_matdoc type bapi2017_gm_head_ret-mat_doc,
gv_matyear type bapi2017_gm_head_ret-doc_year.
data : lv_objek like inob-objek .
data : ls_inob like inob .
data : imseg type ty_t_mseg.
data : wmseg type mseg.
data : answer.
data : count type i.
data : v_atinn type atinn.
BAPI movement details
data: i_goodsmvt_items type bapi2017_gm_item_create occurs 0
with header line.
data: i_return type bapiret2 occurs 0 with header line.
start-of-selection.
call function 'CONVERSION_EXIT_ATINN_INPUT'
exporting
input = 'Z_ORAN'
importing
output = v_atinn.
call screen 100.
*& Module status_0100 OUTPUT
module status_0100 output.
set pf-status '100'.
set titlebar '100'.
mseg-werks = 1000.
mseg-umwrk = 1000.
**added
sc_count = sc_count + 1.
if sc_count eq 1.
mseg-bwart = 313.
endif.
mkpf-budat = sy-datum.
**added
describe table itab lines tc_itab-lines.
endmodule. " status_0100 OUTPUT
*& Module user_command_0100 INPUT
module user_command_0100 input.
data field(20).
data: line_t like sy-index.
data: lines like sy-index.
data line_count like sy-loopc.
data: begin of cols,
screen like screen,
index type i,
selected(1) type c,
vislength like icon-oleng,
invisible(1) type c,
end of cols.
case ok_code.
when 'DELE'.
delete itab where sel eq 'X'.
when 'ENTE'.
check *mch1-charg is not initial.
read table itab into witab with key charg = *mch1-charg.
if not sy-subrc is initial.
witab-charg = *mch1-charg.
select single matnr from mch1 into witab-matnr
where charg eq witab-charg.
if not syst-subrc is initial.
set cursor field '*MCH1-CHARG'.
message e115(12) with *mch1-charg.
endif.
select single maktx from makt into witab-maktx
where matnr eq witab-matnr
and spras eq syst-langu.
witab-erfmg = 1.
concatenate witab-matnr witab-charg into lv_objek .
clear ls_inob .
select single * into ls_inob
from inob
where objek = lv_objek and
klart = '023' and
obtab = 'MCH1' .
select single atflv from ausp into witab-menge
where objek = ls_inob-cuobj and
klart = '023' .
append witab to itab.
**added
clear *mch1-charg.
**added
endif.
when 'SAVE'.
if mkpf-budat is initial.
set cursor field 'MKPF-BUDAT'.
message e055(00).
endif.
if mseg-lgort is initial.
set cursor field 'MSEG-LGORT'.
message e055(00).
endif.
if mseg-umlgo is initial.
set cursor field 'MSEG-UMLGO'.
message e055(00).
endif.
if mseg-bwart is initial.
set cursor field 'MSEG-BWART'.
message e055(00).
endif.
refresh imseg.
loop at itab into witab.
move-corresponding witab to wmseg.
append wmseg to imseg.
endloop.
call function 'ZMM_POPUP_WITH_DATA'
exporting
imseg = imseg
importing
answer = answer.
if answer eq 'Y'.
perform create_goods_movement.
endif.
when 'P--'.
clear ok_code.
perform paging using 'P--'.
set cursor field 'MARA-MATNR' line 1.
when 'P-'.
clear ok_code.
perform paging using 'P-'.
set cursor field 'MARA-MATNR' line 1.
when 'P+'.
clear ok_code.
clear lines.
perform paging using 'P+'.
set cursor field 'MARA-MATNR' line 1.
when 'P++'.
clear ok_code.
perform paging using 'P++'.
set cursor field 'MARA-MATNR' line 1.
when 'SORA'.
read table tc_itab-cols into cols with key selected = 'X'.
if sy-subrc is initial.
field = cols-screen.
field = field+5(10).
sort itab ascending by (field).
endif.
when 'SORZ'.
read table tc_itab-cols into cols with key selected = 'X'.
if sy-subrc is initial.
field = cols-screen.
field = field+5(10).
sort itab descending by (field).
endif.
when 'PRNT'.
perform write_alv.
endcase.
endmodule. " user_command_0100 INPUT
*& Module read_table OUTPUT
module read_table output.
mara-matnr = witab-matnr.
makt-maktx = witab-maktx.
mch1-charg = witab-charg.
mseg-menge = witab-menge.
mseg-erfmg = witab-erfmg.
line_count = sy-loopc.
endmodule. " read_table OUTPUT
*& Module write_table INPUT
module write_table input.
witab-matnr = mara-matnr.
witab-maktx = makt-maktx.
witab-charg = mch1-charg.
witab-menge = mseg-menge.
witab-erfmg = mseg-erfmg.
modify itab from witab index tc_itab-current_line.
endmodule. " write_table INPUT
*& Module exit INPUT
module exit input.
leave to screen 0 .
endmodule. " exit INPUT
*& Form create_goods_movement
form create_goods_movement .
clear : gv_header, i_return[], i_goodsmvt_items[].
gv_header-doc_date = gv_header-pstng_date = mkpf-budat.
gv_header-pr_uname = sy-uname.
GM with reference to reservation
loop at itab into witab.
i_goodsmvt_items-material = witab-matnr.
i_goodsmvt_items-entry_qnt = witab-erfmg.
i_goodsmvt_items-entry_uom = 'ST'.
i_goodsmvt_items-move_type = mseg-bwart.
i_goodsmvt_items-plant = mseg-werks.
i_goodsmvt_items-stge_loc = mseg-lgort.
i_goodsmvt_items-move_plant = mseg-umwrk.
i_goodsmvt_items-move_stloc = mseg-umlgo.
i_goodsmvt_items-batch = witab-charg.
append i_goodsmvt_items.
endloop.
find BAPI processing transaction
if gv_code is initial.
perform determine_bapi_code using mseg-bwart
changing gv_code.
endif.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gv_header
goodsmvt_code = gv_code
importing
goodsmvt_headret = gv_headret
materialdocument = gv_matdoc
matdocumentyear = gv_matyear
tables
goodsmvt_item = i_goodsmvt_items
return = i_return[].
cancel blocking process
loop at i_return where type eq 'E' or type eq 'A' or type eq 'X'.
exit.
endloop.
if sy-subrc ne 0.
refresh i_message_tab.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
wa_message_tab-msgid = 'M7'..
wa_message_tab-msgty = 'S'.
wa_message_tab-msgno = '060'.
wa_message_tab-msgv1 = gv_matdoc.
wa_message_tab-msgv2 = ''.
wa_message_tab-msgv3 = ''.
wa_message_tab-msgv4 = ''.
append wa_message_tab to i_message_tab.
else.
refresh i_message_tab.
call function 'BAPI_TRANSACTION_ROLLBACK'.
write a message as there is an unexpected error.
loop at i_return.
wa_message_tab-msgid = i_return-id.
wa_message_tab-msgty = i_return-type.
wa_message_tab-msgno = i_return-number.
wa_message_tab-msgv1 = i_return-message_v1.
wa_message_tab-msgv2 = i_return-message_v2.
wa_message_tab-msgv3 = i_return-message_v3.
wa_message_tab-msgv4 = i_return-message_v4.
append wa_message_tab to i_message_tab.
endloop.
endif.
call function 'C14Z_MESSAGES_SHOW_AS_POPUP'
tables
i_message_tab = i_message_tab.
endform. " create_goods_movement
*& Form determine_bapi_code
form determine_bapi_code using p_bwart type bwart
changing p_code type bapi2017_gm_code.
data: lt_t158b type table of t158b with header line.
clear p_code.
select tcode from t158b into corresponding fields of table lt_t158b
where bwart eq p_bwart.
loop at lt_t158b.
select single gmcode from t158g into p_code
where tcode eq lt_t158b-tcode.
if sy-subrc is initial.
exit.
endif.
endloop.
endform. " determine_bapi_code
*& Form paging
form paging using code.
data: i type i,
j type i.
case code.
when 'P--'. tc_itab-top_line = 1.
when 'P-'.
tc_itab-top_line = tc_itab-top_line - line_count.
if tc_itab-top_line le 0.
tc_itab-top_line = 1.
endif.
when 'P+'.
i = tc_itab-top_line + line_count.
j = tc_itab-lines - line_count + 1.
if j le 0.
j = 1.
endif.
if i le j.
tc_itab-top_line = i.
else.
tc_itab-top_line = j.
endif.
when 'P++'.
tc_itab-top_line = tc_itab-lines - line_count + 1.
if tc_itab-top_line le 0.
tc_itab-top_line = 1.
endif.
endcase.
endform. " paging
*& Form write_alv
form write_alv .
perform find_list_header.
perform fill_field_cat.
perform fill_sortinfo.
g_repid = sy-repid.
gs_layout-colwidth_optimize = 'X'.
gs_layout-zebra = 'X'.
answer = 'Y'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_buffer_active = ''
i_callback_program = g_repid
i_save = 'A'
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = gs_layout
it_fieldcat = gt_fldcat[]
it_sort = gt_sortin[]
tables
t_outtab = itab[].
endform. " write_alv
Form find_list_header
form find_list_header.
data : v_datum(10),
v_datlo(10),
v_dathi(10),
v_uzeit(8).
clear: gt_header, gt_header[].
gt_header-typ = 'H'.
gt_header-info = sy-title.
append gt_header.
clear gt_header.
gt_header-typ = 'S'.
gt_header-key = 'Çalıştırma Zamanı : '.
write syst-datum to v_datum.
write syst-uzeit to v_uzeit.
concatenate v_datum '/' v_uzeit into gt_header-info.
append gt_header.
endform. " find_list_header
Form fill_field_cat
form fill_field_cat.
refresh gt_fldcat.
clear gt_fldcat.
gt_fldcat-key = 'X'.
add-fieldcat 'MATNR' 'MARA' ''.
add-fieldcat 'MAKTX' 'MAKT' ''.
add-fieldcat 'CHARG' 'MSEG' ''.
gt_fldcat-do_sum = 'X'.
add-fieldcat 'MEINS' 'MARA' 'Olcu Birimi '.
gt_fldcat-do_sum = 'X'.
add-fieldcat 'ERFMG' 'MSEG' 'Adet'.
endform. " fill_field_cat
Form fill_sortinfo
form fill_sortinfo.
gt_sortin-up = 'X'.
gt_sortin-fieldname = 'MATNR'. append gt_sortin.
endform. " fill_sortinfo
Form top_of_page *
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
i_logo = 'ZKUTAS'
it_list_commentary = gt_header[].
endform. " top_of_pageHI,
if it is a normal report program then you can directly create a Selection screen field.
After the Type-pool you can use Parameters or Select-options to create the selection screen field..
If it is a Modulpool program then you can create a selection scren field like
SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.
PARAMETERS: p1(10) TYPE c.
SELECTION-SCREEN END OF SCREEN 1100.
defines a selection screens 1100 as subscreens.
The next screen number of screen 100 is 100 (statically-defined).
PROCESS BEFORE OUTPUT.
MODULE status_0100.
CALL SUBSCREEN area INCLUDING sy-repid number.
PROCESS AFTER INPUT.
MODULE cancel AT EXIT-COMMAND.
CALL SUBSCREEN area.
MODULE user_command_0100.
look at the below link
http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
Regards
Sudheer -
Selection screen for HR report with logical database PNP
Hi All,
I am writing a HR report. And I use the logical database PNP. Also I create a HR report category for this report. In the report category, I can define the selection screen field. But all these fields are selection option format. My question is How can I add parameters, radiobutton group and checkbox in the selection screen. Thanks.
AlexHi Alex,
Sorry for replying so late. Please try this tutorial:
w w w. s a p t e c h n i c a l. c o m -> tutorials -> ABAP-HR -> Creating HR Report category in PNP logical database
Sorry, I put it like this, because direct link doens't let me post the answer. Don't know why.
It can also be something with your custom code in selection screen. Though it works fine for, try to remove COMMENTs and observe the result. Maybe parameters are overlapping somehow. First try this:
SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETERS RefDate type DATS.
parameter BFlag type c RADIOBUTTON GROUP grp1.
PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
parameters days type i.
PARAMETERS spvsr like PA0001-MSTBR.
selection-SCREEN end of BLOCK blk2.
If that works together with the report category, try to extend it with adding a selection-screen comment, but do this in reversed order (comment goes first and FOR FIELD addition is supplied) like this:
SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
PARAMETERS RefDate type DATS.
SELECTION-SCREEN begin of line.
SELECTION-SCREEN COMMENT 3(10) text-003 for field bflag. "FOR FIELD, and goes first
parameter BFlag type c RADIOBUTTON GROUP grp1.
SELECTION-SCREEN COMMENT 16(10) text-004 for FIELD fflag. "here two
PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
SELECTION-SCREEN end of line.
parameters days type i.
PARAMETERS spvsr like PA0001-MSTBR.
selection-SCREEN end of BLOCK blk2.
If still not working, see if text-003 and text-004 are not too long (you expect them to be 10 chars), This may somehow affect selection screen.
You may also try with setting cursor position explicity by:
SELECTION-SCREEN begin of line.
SELECTION-SCREEN POSITION 3.
SELECTION-SCREEN COMMENT (10) text-003 for field bflag.
parameter BFlag type c RADIOBUTTON GROUP grp1.
SELECTION-SCREEN POSITION 16.
SELECTION-SCREEN COMMENT (10) text-004 for FIELD fflag. "here two
PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
SELECTION-SCREEN end of line.
It is really hard to identify where can be a bug as it is working fine for me. Keep trying with different variations, it should finally run with some.
Regards
Marcin -
Hi Experts, a question about search help in selection screen?
Hi Experts,
I have a selection screen and two parameters, one is plant and another is material, what I want is as following:
the user select a plant and when he select the material the material should be in the plant he has filled in, how can I handle this? detail help, thank you in advance.
Kind regards
DawsonHi,
Check the below code.
tables: t001k.
For Identification Number
DATA: BEGIN OF it_bwkey OCCURS 0,
bwkey LIKE t001k-bwkey,
END OF it_bwkey.
data: v_bukrs(4).
For Run date
DATA: BEGIN OF it_bukrs OCCURS 0,
bukrs LIKE t001k-bukrs,
END OF it_bukrs.
DATA it_ret LIKE ddshretval OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN: BEGIN OF BLOCK main WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS: p_bukrs(4) TYPE c.
SELECT-OPTIONS s_bwkey FOR t001k-bwkey NO INTERVALS.
SELECTION-SCREEN END OF BLOCK main.
INITIALIZATION.
SELECT DISTINCT bukrs FROM t001k INTO TABLE it_bukrs.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING retfield = 'BUKRS'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
value_org = 'S'
TABLES value_tab = it_bukrs
EXCEPTIONS parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bwkey-low.
TABLES: t130r.
DATA: BEGIN OF dynpfields OCCURS 0.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynpfields.
DATA : sy_repid LIKE sy-repid,
sy_dynnr LIKE sy-dynnr.
CLEAR dynpfields.
REFRESH dynpfields.
dynpfields-fieldname = 'P_BUKRS'.
APPEND dynpfields.
sy_repid = sy-repid.
sy_dynnr = sy-dynnr.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy_repid
dynumb = sy_dynnr
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 01.
IF sy-subrc = 0.
READ TABLE dynpfields WITH KEY fieldname = 'P_BUKRS'.
IF sy-subrc = 0.
v_bukrs = dynpfields-fieldvalue.
ENDIF.
ENDIF.
SELECT bwkey FROM t001k INTO TABLE it_bwkey WHERE bukrs = v_bukrs.
DELETE ADJACENT DUPLICATES FROM it_bwkey.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BWKEY'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_BWKEY'
value_org = 'S'
TABLES
value_tab = it_bwkey
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
*MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Kumar Bandanadham -
Help on print button for interactive report
Hi,
I have created an interactive report and have also added a print button on the button of the report (unfortunately forgot how I did it). Say my column on the reports was Col_No, Col_First_name, Col_Last_name and a print button when I pressed a would get to choose open or save a pdf file, if I opened or saved it, I would had the same info on my pdf report as above.
Since I have changed the column order meaning I have Col_No, Col_Last_name, Col_Start_Date, Col_First_name and that is working fine but when I click on the print button I will get the pervious columns.
I noticed I have created a branches to print the report, basically after processing, when button was pressed an action with f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=6259824360775969936:&DEBUG.::: is present.
I need help to fix this and I do very much appreciate any help or suggestions
-regards
ahmadiiFound the answer, thanks.
-
Search Help in Select - Options for Time field
Hi,
I have a select option which is a time field.
For date field the F4 help is automatically generated.
How to get F4 help for time field.
Regards,
RemoSelection-Options or normal field - it doesn't matter. There is no system delivered value help for a time field. This is documented in the online help:
There is no automatic F4 help for data element TIMS.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm
You would have to create your freely programmed value help if you want something like the time value help available in the SAPGUI. -
Attaching search help to a screen field
Hi all,
I've created a search help (zhlp) and want to attach it to the screen field in the selection screen of my report.
SELECT-OPTIONS KSCHL FOR VAKE-KSCHL
MEMORY ID VKS.
I've attached zhlp to the screen by defining it on the element list of the screen 1000.
And the original db table T685 already got a search help H_T685, when I run my report and press F4 in the field, it calls the default search help H_T685 but not mine.
Could anyone help me? Thanks.here is the syntax for assiging search help to selection screen field.
SELECT-OPTIONS KSCHL FOR VAKE-KSCHL MATCHCODE OBJECT ZHLP.
Regards
Raja
Maybe you are looking for
-
I recently started trying WMFS and I am encountering a issue where it requires me to click a lot of times on entries inside the Applications Menu to open a terminal (urxvt) and the program never opens. The only way I can run the terminal is through t
-
How do I get my movies back on iTunes
How do I get my movies back if I purchased it on iTunes.
-
Using (Parallels) PS as an external editor for Aperture
I am new to the Mac so perhaps this has already been addressed. If so, I apologize. I am using Aperture for my photo editing and have been using PhotoShop CS5, through Parallels, as an external editor. Much to my surprise this works reasonably well m
-
I used to be alble to double click and open a new page but that is no longer an option. Because you cant get a total view of the playlist it is almost impossible.. if a song is in position 95 and I want to put it at 3 I have to hold it and drag it ti
-
Can no longer clear Local Shared Objects (Persistent Identification Element)
The equivalent of a cookie in Flash is the "Persistent Identification Element" which is also called a "local shared object." The Adobe TechNote titled "How to manage and disable Local Shared Objects" at url http://www.adobe.com/cfusion/knowledgebase/