Want to check whether input field in selection-screen is numeric or not
i have a select -option in selection-screen in which user enters a value.i just want to check if this value is numeric then it should be 18 positions prefixed with zeroes if numeric like 000000000000400000 and needs to be left justified if not numeric like G0032-BTI.
i check the fourm also but it didn't helped me.
i m using the code.
SELECT-OPTIONS : S_MAT FOR CDHDR-OBJECTID,
LOOP AT S_MAT.
if S_MAT ca sy-abcde .
shift s_mat left deleting leading space.
else.
SHIFT s_mat RIGHT DELETING TRAILING SPACE.
TRANSLATE s_mat USING '0'.
ENDIF.
endloop.
can anybody help.
<REMOVED BY MODERATOR>
thanks
Edited by: Alvaro Tejada Galindo on Jan 17, 2008 4:00 PM
I have a solution for you! Try this code below, just copy/paste "as-it-is".
TABLES: cdhdr.
DATA: gv_type TYPE dd01v-datatype.
SELECT-OPTIONS : s_mat FOR cdhdr-objectid.
AT SELECTION-SCREEN.
LOOP AT s_mat.
CLEAR gv_type.
IF NOT s_mat-low IS INITIAL.
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
string_in = s_mat-low
IMPORTING
htype = gv_type.
IF gv_type NE 'NUMC'.
MESSAGE e016 WITH 'Not Numeric'.
ELSE.
SHIFT s_mat-low LEFT DELETING LEADING: '0', space.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = s_mat-low
IMPORTING
output = s_mat-low.
MODIFY s_mat TRANSPORTING low.
ENDIF.
ENDIF.
IF NOT s_mat-high IS INITIAL.
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
string_in = s_mat-high
IMPORTING
htype = gv_type.
IF gv_type NE 'NUMC'.
MESSAGE e016 WITH 'Not Numeric'.
ELSE.
SHIFT s_mat-high LEFT DELETING LEADING: '0', space.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = s_mat-high
IMPORTING
output = s_mat-high.
MODIFY s_mat TRANSPORTING high.
ENDIF.
ENDIF.
ENDLOOP.
I hope this solves your problem.
Cheers,
Sougata.
Similar Messages
-
How to hide input fields on selection screen using variant attribute
Hello all,
I want to know how to hide input fields on selection screen using variant attribute conpletely.
As you know, when setting the attribute of variant "Hide field" checked, the field is temporarily hidden, but when clicking "All Selections(F7)" button on the selection screen, the fileds become appeared.
I want to hide the field completely. Di you know how to do ?
Thank you for your support.
Regards,
Hideki KozaiUse this attribute hide field and save the variant. Then create transaction for this program setting default variant for parameter Start with variant . The user who runs it will have it by defualt set.
Otherwise
in PBO simply use LOOP at screen and output = 0 for this field. This will ensure that field is invisible in any case.
Regards
Marcin -
How to check whether a field contains at least one numeric value
how to check whether a field contains at least one numeric value..
Hi,
I hope that this code will works.
constants:
c_digit_grp TYPE char11 VALUE '0123456789', " Digit group
* Data Declaration
data :
str type string.
* if you want check entire string and pass entire string
if str CA c_digit_grp.
* write your logic ---this block will execute atleast one numeric value exists in the string
Endif.
Regards
Bhupal Reddy -
Month/year input field in selection screen
Hi,
Can anyone tell how to declare an input field in selection screen in the format month/year with out day.
Thanks.
Prasad.hi ,
I have the same doubt ,
but its taking invalid input also as in if i enter 13/2006
Can it be avoided,
also can the calender be displayed at F4 on such field.
Thanks in advance
Regards
Bijal -
Display input field on selection screen based on condition
Hi,
I have a report with selection with no of input fields and a checkbox .I want to hide few i/p fileds based on checkbox i/p.
If the checkbox = 'X',then only those fields should apper on screen for input.
how do we get this on sel screen.
thanks in advance.Hi,
you can use this code as reference.
Here, depens on check box, in the next screen resepective select options will be displayed.
You can use this logic for your requirement.
REPORT Z50871_SELECTOPS_DYNAMIC.
PARAMETERS : CH_EBELN AS CHECKBOX,
CH_VBELN AS CHECKBOX.
DATA: V_EBELN TYPE EKKO-EBELN,
V_VBELN TYPE VBAK-VBELN.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
VBELN FOR V_VBELN MODIF ID G2.
SELECTION-SCREEN END OF SCREEN 100 .
AT SELECTION-SCREEN OUTPUT.
IF SY-DYNNR = 100.
IF CH_EBELN = 'X' AND
CH_VBELN = ''.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G1'.
SCREEN-ACTIVE = '1'.
ELSE.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF CH_VBELN = 'X' AND
CH_EBELN = '' .
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G2'.
SCREEN-ACTIVE = '1'.
ELSE.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF CH_EBELN = 'X' AND CH_VBELN = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'G1'
OR SCREEN-GROUP1 EQ 'G2' .
SCREEN-ACTIVE = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF SY-DYNNR = 1000.
IF CH_EBELN = 'X' OR CH_VBELN = 'X'.
CALL SELECTION-SCREEN 100.
ELSE.
MESSAGE I000(Z50871MSG) WITH 'Please select atleast one checkbox'.
ENDIF.
ENDIF.
Regards
Sandeep Reddy -
Input Fields of Selection Screen
HI
GIven the program name and the Screen #, i need to figure out all the Input fields , Data type and Length for that program( SAP STD REPORT).
I checked out the Element List in Se51 for the program name and screen number, I need something similar to it ..I need to pull out that data. How should i approach.
-Ravi.Output checkbox, means that it is a "disabled" input field. Output Only checkbox, means that it is more like a static text box.
F1 Help on Output Only.
<i>Pure output field
This specification makes sense only for template fields.
At runtime, the format of a template field can be distinguished from that of a field/text field, if it is defined as an output field, but not if it is defined as an input field.
If the flag is set for an output template, you cannot distinguish the format of a template field from that of a text field. This allows you to insert variable components in apparently fixed texts.
At runtime, you cannot dynamically modify the input/output attributes of output templates which have this flag set within the LOOP AT SCREEN ... ENDLOOP block in PBO modules.</i>
Regards,
Rich Heilman
Message was edited by: Rich Heilman -
Adding a new input field on selection screen after input in a select option
Hi Experts,
There are 2 input fields on the selection screen.
I would like to add a new select option field when a value is entered in the 2nd field <b>only</b>. If there is an input in the 1st field or both the fields, the new input field should not appear.
Message was edited by:
Gaurav Kothariexecute the code .
you will get sel option for s_lgort only when there is a value in s_werks.
tables mard.
select-options: s_matnr for mard-matnr,
s_werks for mard-werks,
s_lgort for mard-lgort modif id abc.
at selection-screen output.
if not s_werks[] is initial and s_matnr[] is initial.
loop at screen.
if screen-group1 = 'ABC'.
screen-active = '1'.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-group1 = 'ABC'.
screen-active = '0'.
modify screen.
endif.
endloop.
endif. -
How to skip required check on mandatory field of selection screen
Hi expert,
In my report, I define two rodiobutton to show block1 or block2, but every time I click each radiobutton, the message "Fill in all required entry" shown, so my question is how can I skip required check when click radiabutton?
Some of my selection-screen code is :
PARAMETER: P_block1 RADIOBUTTON GROUP GRP1 DEFAULT 'X' USER-COMMAND UC1.
PARAMETER: P_block2 RADIOBUTTON GROUP GRP1.
SELECT-OPTIONS S_ERDAT FOR VBRK-ERDAT OBLIGATORY.Hi,
If you dont want PAI to be triggered when you select the radio button, then you can remove the USER-COMMAND while declaring parameter.
If User Command is necessary, use following code
PARAMETER: P_block1 RADIOBUTTON GROUP GRP1 DEFAULT 'X' USER-COMMAND UC1.
PARAMETER: P_block2 RADIOBUTTON GROUP GRP1.
SELECT-OPTIONS S_ERDAT FOR VBRK-ERDAT .
AT SELECTION-SCREEN.
CHECK SY-UCOMM NE 'UC1'.
IF S_ERDAT IS INITIAL.
MESSAGE E038(001) WITH 'ERDAT IS MANDATORY'.
ENDIF.
Please Reward points. -
Hi Experts,
I hv a selection screen with,
1)SELECT-OPTIONS: input_fld_1 with domain value range of A, B, C, D, E, F
2)input_fld_2
3)PARAMETERS: input_fld_3 has the LIST BOX
So, my requirement is,
If the user selects/enters A, B, C, D in input_fld_1, the next moment/second (here, prog. shuld not ask the user to press any ENTER/button)
the input_fld_3 shuld b automatically dis-abled/un-able to input!
(I tried with MOD ID GRP1, but in this case, user has to press ENTER button, which is not suits to my requirement!)
So, Is it possible? If so How?
thanq.
Message was edited by:
Srikharhi Srikhar,
It is not possible to have your requirement.
As the AT SELECTION SCREEN OUTPUT will be triggered only when you press the ENTER key.
You need to ask user to press the enter key or you need to have USER COMMAND to the selection screen parameter, which I think is not available with select-options.
Reward points if useful.
Regards,
Atish -
I need to add check whether 21 fields of a internal table are empty or not.
Hello,
I need to add check whether 21 fields of a internal table are empty or not.How can we write a code for the same wand what would be the correct syntax for it.
I tried entering all the fields in the IF loop with AND condition but its giving syntax error.Perhaps this is because the lenght of the IF condition would be more than the allowed one.Hi,
After the select quiery.
If not itab is initial.
Message 'Table is not empty' type 'I'.
Endif.
Regards,
Jagadish. -
Just want to check whether i am on the right track
Im trying to learn to do a feedback form for an online application(online store) where the user input whatever he want in a textbox and click submit and then the text will be sent to a specified email.
Just want to check whether the stuffs i should be reading on are servlets and javamail??
if there any more things which i should read on and i did not state it above,i would be glad if u guys could enlighten me with the relevant information
tomleoYou probably want to save the user's e-mail address and any other identifying information he/she submitted in the questionaire. For this, you will probably want to use a database, so I would suggest learning JDBC as well.
- Saish -
Error message disble the Fields in Selection Screen
Hi,
In my Report i am validating some fields as mandatory.
If the field is initial then one Error message should be display in the screen and user has to modify the selection screen.
But after displaying the errro message my selection screen is input disable except the mandatory field.
I want all the fields should be input enable.
Sample code for Error message,
MESSAGE E018 WITH 'Enter Plant'.
Please provide the code for this.Performing checks on SELECTION-SCREEN
- if the check uses only one independent field (e.g.: value exist in a table) use a[ AT SELECTION-SCREEN ON <field>|http://help.sap.com/abapdocu/en/ABAPAT_SELECTION-SCREEN_EVENTS.htm#!ABAP_ALTERNATIVE_2@2@], the field will be editable when error is raised
- if the check uses some fields, group them using [SELECTION-SCREEN BEGIN OF BLOCK <block>/END OF BLOCK <block>|http://help.sap.com/abapdocu/en/ABAPSELECTION-SCREEN_BLOCK.htm] and then [AT SELECTION-SCREEN ON BLOCK <block>|http://help.sap.com/abapdocu/en/ABAPAT_SELECTION-SCREEN_EVENTS.htm#!ABAP_ALTERNATIVE_4@4@], each field of the block will be editable when error is raised
So, if you really want that each and every field be editable when an error is raised, declare every parameter and select-options in a big block, and perform the check in a unique AT SELECTION-SCREEN ON BLOCK xxx.
Use Error message, Warning and Information don't break the flow of the report.
Regards,
Raymond -
Validating field on selection screen
wht is the meaning of validation
how to validate a particular field on selection screen
suppose parameters:p_vkorg like vbak-vkorg.
how to validate p_vkorg.
pz give me codingHello pavan,
Validation means "checking whether the input which u are gining to the selection secreen is valid or not". means...
Lets take your example only...
parameters:p_vkorg like vbak-vkorg.
in selection screen you will give inout in that parameter....
users can give any input... lets suppose I'll give input as ABC... which is not in the table VBAK. No need to excute the code once we came to know that the input is not there in the table. So we will do validation like...
at selection-screen on p_vkorg.
select * from vbak where vkorg = p+vkorg. " This is the case with Parameter.
at selection-screen on p_vkorg.
Select * from vbak where vkorg = p+vkorg. " This is the case with Selct-option.
if the input that u r giving is present in the table... the above stmt will execute successfully, otherwise not.
You can make use of System variable SY-SUBRC and you can go ahead with ur coding...
Reward If Helpful
Regards
Sasidhar Reddy Matli.
Message was edited by:
Sasidhar Reddy Matli -
Setting only the TO field on the Created on Field in Selection screen to Current date
Hello,
We have a requirement to Set only the To date in the Created on Field in Selection screen to the Current date, I have tried through Dynamic variable option to set the Date calculation but I am able to see Options to set the Current date to From or From and To Created on Date fields instead of setting the Current date only to To created on Field.
We are in 4.7 and are not supported with user defined variables, Appreciate your inputs on this.
Thanks and Regards
Mohammed Roshan>
sunitha j wrote:
> Hi ,
>
> It would br gr8..if u could give some more info about the usage of this class..i mean if i hav to implement it in my program....wat is the necessary data that needs to b copied...
>
> Thanx,
> Sunitha
what Text field you want to change.
Since you are working with Dynpros , you have to split the screen in two parts, and one for the Showing differenet fonts and other your normal Dynpro information.
you need to use the Method ADD_TEXT Did you check the program DD_STYLE_TABLE. -
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
Maybe you are looking for
-
the wifi on my ipod is not working. i have reset the network settings and i have restored the ipod. i am not sure what to do now and help would be nice thank you
-
Hi. My sent items aren't showing up in the sent file. They are being sent though. Can anyone help? Thanks!
-
Put variable into another variable
Hi All~ I am writing the following script: Add-Type -Path 'C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Smo\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Smo.dll' get-content 'C:\SLDATA\Serverlist.txt' | foreach-object { #write-output `n ###wri
-
Iphone device not detected in PC, hence autoplay setting not available
My iphone is not detected under autoplay, therefore i cannot import/export pictures.. please help!
-
Hi we have 10 servers (windows server 2008 standard) in that 4 servers Event logs really showing with bad eventID 5038 please anybody respond to my two questions a) due to which reason this EVENT ID triggers?? b) how to stop this EVENT ID 5038 furth