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.
Alex
Hi 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
Similar Messages
-
Parameter inactive in the selection screen of a report with logical datab.
I`m using a logical database in a report (PNP).
I need put as inactive some parameters of the selection screen. How can i do it ??? From customizing ???
ThanksHi,
Check this code..
" In screen loop You need to inactive the field.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name CS 'PNPKOKRS' OR
screen-name CS 'PNPKOSTL' OR
screen-name CS 'PNPORGEH'.
screen-active = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
CLEAR screen.
ENDIF.
ENDLOOP. -
How does works default parameters in a program with logical database PNP?
Hi Friends,
I have a basic program, i need to filter info with period parameters in a program that uses logical database PNP, but it doesn't work.
If i use "person selection period" that it's suposed to filter info according to infotype 0001 (as the sap help says), it doesn't work, i use: PNPBEGPS = today and PNPENDPS = today, and the result it's a lot of registers that doesn't meet that criteria.
Also i tried with: data selection period, today, up to day, current month. And the result it's with the same problem.
How does works period parameters in a program with logical database PNP?
This it's the program example, i use the default category.
REPORT ZRPHRTEST.
tables: pernr.
infotypes: 0001.
start-of-selection.
get pernr.
write: pernr-pernr, p0001-begda, p0001-endda.
end-of-selection.
write 'fin'.Hi,
Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
Syntax: Tables pernr.
Get pernr.
Try, activate and test. This should solve your problem.
Regards,
Abhijeet -
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 -
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 -
ABAP Report Program Logical Database PNP
I have a ABAP program using the logical database PNP. The report is config to run on MSS using EP. I have added code to capture the Org Unit when it is pass to the program from MSS. My issue is how do i capture the org unit value that is passed to the program. I have added code to capture field pnporgeh in the START OF SELECTION event. This works great if you are running the program from R3, but none of my edit checking against field pnporgeh works.
Hi John,
I am also having same trouble where in i have added a new custom(Z) report in the MSS ->My Staff -> Reporting under report category -> Time Management (MSS). I am not able to find how the value of org unit which is selected on portal screen is passed to report in R/3 which is using PNP logical db.
I tested in debugging but selection screen parameter PNPORGEH contains nothing.
Many Thanks in advance for the help.
Edited by: Ankit Kashyap on Nov 17, 2010 12:40 PM -
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. -
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,
ChinmayHi 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. -
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 -
How to use At Selection Screen for fields whiledealing with Multiple Blocks
Hi Guys,
In my requirement i am having 4 blocks.1st block with raduio buttons for activating the opther 3 Blocks.
In these 3 blocks i am having some fields.
How to do Validation for these fields.?
I am using At Selection-screen on S-SCAD1. I am getting error"S_SCACD1 is neither a selection screen nor a Parameter"
On the top of this" At Selection-screen on S-SCAD1" I am having"AT SELECTION-SCREEN OUTPUT."
Can anybody tell me how to solve this error?
Thanks,
Gopi.If you are using your block name than you should use like:
AT SELECTION-SCREEN ON BLOCK S-SCAD1.
Regards,
Naimesh Patel -
Calling standard program with logical database
Hi all,
I am trying to call a standard report (RPTBAL00) from a custom program without displaying the selection screen. I want to fill some of the select-options programmatically.
My code is somethig like this
submit RPTBAL00
with pernr-pernr = 'XXX'
with pernr-pnpbegda = '20020101'
with pernr-pnpenddaa = '99991231'
and return.
but the report gets called with defaults.
Does anyone know what I am doing wrong?Hi
I seem your code is right, but I don't understand which elements are filled with default values.
Anyway this is a little code to submit a report with logical database:
Co.Ge.
loop at so_umskz.
move-corresponding so_umskz to selopt.
append selopt to frange-selopt_t.
endloop.
if sy-subrc = 0.
frange-fieldname = 'UMSKZ'.
append frange to range-frange_t.
endif.
refresh frange-selopt_t.
loop at so_zlsch.
move-corresponding so_zlsch to selopt.
append selopt to frange-selopt_t.
endloop.
if sy-subrc = 0.
frange-fieldname = 'ZLSCH'.
append frange to range-frange_t.
endif.
if not range-frange_t[] is initial.
range-tablename = 'BSIK'.
append range to trange.
call function 'FREE_SELECTIONS_RANGE_2_EX'
exporting
field_ranges = trange
importing
expressions = texpr.
endif.
submit rfitemap
with ................
with free selections texpr and return.
Max -
Functional area(FKBER field in the selection screen of the report painter))
Hi,
I have a requirement to add functional area field in the selection screen for a report painter report. This report using library 1VK and table 'CCSS'. I added functional area field in the general data selection . After the execution of report with functional area field filled with value. report not giving any output. do i need to maintain any setting to achieve?
Regards,
Palani1. Call GR22 and click "Characteristics".
2. Check FKBER and assign a position number to it.
3. Save and close the library.
4. Call your report in GRR2 and you should now see FKBER as an available characteristic.
5. Use it in the General Data Selection or as a Lead Column, as per requirement.
Or,
1. Call GR21 and create a custom library. Provide a name and description and also provide a library you can copy from (scan for the best-fit library).
2. Now follow the steps 2 through 5 above to achieve your result.
Hope this helps.
Cheers. -
How to auto populte selection screen for variant maintained in User Profile
Hi,
I have to auto populate selection screen of Custom Report , with the variant maintained in User profile of User .
Helpful answers would be awarded .
Thanks
UmeshHi,
use the PARAMETER-ID clausole of the PARAMETERS / SELECT-OPTIONS instructions.
See help for more informations.
You have to know the parameter id of the field and also the parameters, must be tight to the right data element (example : parameters : p_mara like mara-matnr and NOT parameters : p_mara(18) ).
Otherwise, use "get parameter id" in the initialization event to populate the selection screen.
Bye
Andrea -
Modify selection screen for Logical Database 'SDF'
Hi
I need to make a section of the standard selection screen for logical database 'SDF' invisible. I have tried the differet selection screen options of the report attributes, but none of the provided ones give me what I want.
How can I find the name of the screen group for the "Line Item Selection" block of the selection screen so that I can make it invisible when the selection screen is displayed?
Thanks,
ThomasI tried to do this:
Loop at screen.
if screen-group4 = '026'
or screen-group4 = '027'
or screen-group4 = '028'.
screen-invisible = 1.
modify screen.
endif.
endloop.
This removed the selection text for these fields, but the Line Item Selection block is still visible, and the actual input fields are also visible. They now look like password input fields with all ***** in them.
What am I doing wrong?
Thanks for your help!
Thomas
Maybe you are looking for
-
Error while saving new Version
Hi, I am creating a new version in DRM by using Copy to New feature but I am getting an error while saving that version. The version gets created successfully but it does not allow me to save the same and gives the following error. Serve was unable t
-
ADD new fields in OIM to provisioned on OID
Hello, I need a confirmation about these steps to add a new field to provisioned to OID. new field called slClient did i need to do all these steps ? 1- Resource Object OID User --> Object Reconciliation (tab), add Field: sl Client --> String Xellera
-
I got a new desktop and was wondering if I could....
I just got a new desktop computer and was wondering if I have to add everything all again or if I can transfer the one off of the laptop to my desktop and still have everything on itunes? Any help would be appreciated!
-
Hello I am Basile Starynkevitch http://starynkevitch.net/Basile/ (living in France near Paris, born in 1959, professionally working on GCC, in particular its MELT branch). My intern Jeremie Salvucci suggested me to try Arch Linux. I am using Linux si
-
Show not selected anchor points (and connect)
Hello. Every now and then I have the problem in Illustrator that I want to connect two anchor points with the pen tool. The two anchor points belong to different objects. Is there any way to always show all anchor points. Today I have to select one o