To display selection screen date parameter in smart form
Hi to all
My requirement is to display date parameters which are given at selection screen (module pool program ) on the smart forms.
I just want to dispaly this on selection.
SO_BLDAT-LOW
SO_BLDAT-HIGH
Please guide.
Regards
Anubhav
Hi,
If you are calling the smartform from the module program then export the parameters from the calling FM
and import the same in the smartform.
Regards,
Sandeep
Similar Messages
-
Displaying selection screen data on alv header in multiple rows and columns
Hi
Presently in my requirement , whatever the data entered in selection screen should display on alv header and item details on alv grid display.
for eg...
on alv header
customer no : 1000 to 2000 sales order no: 111
name : gff to ff sales org:
city: country:
item details below this
plz guide me how to solve this issue.
Thanks & Regards,
PradeepHi,
Check this code this may help you.
<code>
TYPE-POOLS : SLIS.
TABLES VBRK.
TYPES : BEGIN OF TY_VBRK,
VBELN TYPE VBRK-VBELN,
VKORG TYPE VBRK-VKORG,
VTWEG TYPE VBRK-VTWEG,
SPART TYPE VBRK-SPART,
FKDAT TYPE VBRK-FKDAT,
END OF TY_VBRK,
BEGIN OF TY_VBRP,
VBELN TYPE VBRP-VBELN,
POSNR TYPE VBRP-POSNR,
MATNR TYPE VBRP-MATNR,
ARKTX TYPE VBRP-ARKTX,
FKIMG TYPE VBRP-FKIMG,
NETWR TYPE VBRP-NETWR,
END OF TY_VBRP,
BEGIN OF TY_TARGET,
VBELN TYPE VBRK-VBELN,
VKORG TYPE VBRK-VKORG,
VTWEG TYPE VBRK-VTWEG,
SPART TYPE VBRK-SPART,
FKDAT TYPE VBRK-FKDAT,
POSNR TYPE VBRP-POSNR,
MATNR TYPE VBRP-MATNR,
ARKTX TYPE VBRP-ARKTX,
FKIMG TYPE VBRP-FKIMG,
NETWR TYPE VBRP-NETWR,
END OF TY_TARGET.
DATA : T_VBRK TYPE TABLE OF TY_VBRK,
W_VBRK TYPE TY_VBRK,
T_VBRP TYPE TABLE OF TY_VBRP,
W_VBRP TYPE TY_VBRP,
T_TARGET TYPE TABLE OF TY_TARGET,
W_TARGET TYPE TY_TARGET,
FIELD CATALOG ******************
T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
W_FCAT TYPE SLIS_FIELDCAT_ALV,
*************************************SUB TOTALS AND SORTING***********
T_SORT TYPE SLIS_T_SORTINFO_ALV,
W_SORT TYPE SLIS_SORTINFO_ALV,
*************************************FOR LIST HEADER******************
T_LIST_HEAD TYPE SLIS_T_LISTHEADER,
W_LIST_HEAD TYPE SLIS_LISTHEADER,
T_LIST_HEAD1 TYPE SLIS_T_LISTHEADER,
W_LIST_HEAD1 TYPE SLIS_LISTHEADER,
*************************************FOR LIST HEADER******************
W_LAYOUT TYPE SLIS_LAYOUT_ALV,
************************************FOR EVENTS************************
T_EVENT TYPE SLIS_T_EVENT,
W_EVENT TYPE SLIS_ALV_EVENT.
*********************************SELECT OPTIONS***********************
SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN DEFAULT 90005316 TO 90005330.
**RETRIVING DATA************************
PERFORM DATA_RETRIVE.
**BUILDING THE FIELD CATALOG************
PERFORM BUILD_FCAT.
**BUILDING THE TABLE FOR LIST HEADER****
PERFORM BUILD_LIST_HEAD.
*******************************CALLING THE FUNCTION MODULE************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'LIST_TOP_OF_PAGE'
IT_FIELDCAT = T_FCAT
IT_SORT = T_SORT
TABLES
T_OUTTAB = T_TARGET.
*& Form DATA_RETRIVE
FORM DATA_RETRIVE .
SELECT VBELN VKORG VTWEG SPART FKDAT FROM VBRK INTO CORRESPONDING FIELDS
OF TABLE T_VBRK WHERE VBELN IN S_VBELN.
IF SY-SUBRC EQ 0.
SORT T_VBRK BY VBELN.
SELECT VBELN POSNR MATNR ARKTX FKIMG NETWR FROM VBRP INTO TABLE
T_VBRP FOR ALL ENTRIES IN T_VBRK WHERE VBELN = T_VBRK-VBELN.
ENDIF.
LOOP AT T_VBRP INTO W_VBRP.
LOOP AT T_VBRK INTO W_VBRK WHERE VBELN = W_VBRP-VBELN.
W_TARGET-VBELN = W_VBRK-VBELN.
W_TARGET-VKORG = W_VBRK-VKORG.
W_TARGET-VTWEG = W_VBRK-VTWEG.
W_TARGET-SPART = W_VBRK-SPART.
W_TARGET-FKDAT = W_VBRK-FKDAT.
W_TARGET-POSNR = W_VBRP-POSNR.
W_TARGET-MATNR = W_VBRP-MATNR.
W_TARGET-ARKTX = W_VBRP-ARKTX.
W_TARGET-FKIMG = W_VBRP-FKIMG.
W_TARGET-NETWR = W_VBRP-NETWR.
APPEND W_TARGET TO T_TARGET.
ENDLOOP.
ENDLOOP.
SORT T_TARGET BY VBELN.
ENDFORM. " DATA_RETRIVE
*& Form BUILD_FCAT
FORM BUILD_FCAT .
W_FCAT-COL_POS = 1.
W_FCAT-FIELDNAME = 'VBELN'.
W_FCAT-SELTEXT_M = 'BILLING NO'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 2.
W_FCAT-FIELDNAME = 'VKORG'.
W_FCAT-SELTEXT_M = 'SALES ORGANIZATION'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 3.
W_FCAT-FIELDNAME = 'VTWEG'.
W_FCAT-SELTEXT_M = 'DISTRIBUTION CHANNEL'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 4.
W_FCAT-FIELDNAME = 'SPART'.
W_FCAT-SELTEXT_M = 'DIVISION'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 5.
W_FCAT-FIELDNAME = 'FKDAT'.
W_FCAT-SELTEXT_M = 'CREATION DATE'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 6.
W_FCAT-FIELDNAME = 'POSNR'.
W_FCAT-SELTEXT_M = 'BILLING ITEM'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 7.
W_FCAT-FIELDNAME = 'MATNR'.
W_FCAT-SELTEXT_M = 'MATERIAL NUM'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 8.
W_FCAT-FIELDNAME = 'ARKTX'.
W_FCAT-SELTEXT_M = 'DESCRIPTION'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 9.
W_FCAT-FIELDNAME = 'FKIMG'.
W_FCAT-SELTEXT_M = 'QUANTITY'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 10.
W_FCAT-FIELDNAME = 'NETWR'.
W_FCAT-SELTEXT_M = 'NET VALUE'.
W_FCAT-DO_SUM = 'X'.
APPEND W_FCAT TO T_FCAT.
ENDFORM. " BUILD_FCAT
*& Form BUILD_LIST_HEAD
FORM BUILD_LIST_HEAD .
DATA : L_DATE(10),
L_TIME(8).
W_LIST_HEAD-TYP = 'S'.
W_LIST_HEAD-KEY = 'Sales org :'.
W_LIST_HEAD-INFO = S_VBELN-LOW .
APPEND W_LIST_HEAD TO T_LIST_HEAD.
CLEAR W_LIST_HEAD.
W_LIST_HEAD-TYP = 'S'.
W_LIST_HEAD-KEY = 'TO '.
W_LIST_HEAD-INFO = S_VBELN-HIGH.
APPEND W_LIST_HEAD TO T_LIST_HEAD.
CLEAR W_LIST_HEAD.
ENDFORM. " BUILD_LIST_HEAD
*& Form LIST_TOP_OF_PAGE
FORM LIST_TOP_OF_PAGE .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_LIST_HEAD.
ENDFORM. " LIST_TOP_OF_PAGE
<code>
Regards -
Displaying selection screen as pop-up from dialog box
Hi,
I have a screen which is of dialog-box type. This dialog screen shows an ALV and has a button in the ALV toolbar. On pressing this button, a pop-up screen is to be displayed. This pop-up screen is designed as a selection-screen. Is it possible to display this selection screen as a pop-up from a dialog box screen?
Regards,
SuhasHi Suhas,
Its possible to display selection screen as pop-up from dialog box.....Check the code below...copy paste and execute...
SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE text-001.
PARAMETER p.
SELECTION-SCREEN END OF SCREEN 123.
CALL SELECTION-SCREEN 123 STARTING AT 20 5
ENDING AT 80 15.
The below code might help u to add a button in alvgrid's toolbar......
* CLASS lcl_event_handler DEFINITION
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
DATA: wa_toolbar TYPE stb_button,
calc TYPE REF TO cl_gui_frontend_services.
METHODS : toolbar_handle FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object
e_interactive,
ucomm_handle FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
ENDCLASS. "lcl_event_handler DEFINITION
* CLASS lcl_event_handler IMPLEMENTATION
CLASS lcl_event_handler IMPLEMENTATION.
METHOD toolbar_handle.
MOVE 3 TO wa_toolbar-butn_type.
APPEND wa_toolbar TO e_object->mt_toolbar.
MOVE : 0 TO wa_toolbar-butn_type,
'CALC' TO wa_toolbar-function,
'@0M@' TO wa_toolbar-icon,
'Calculator' TO wa_toolbar-quickinfo.
APPEND wa_toolbar TO e_object->mt_toolbar.
ENDMETHOD. "toolbar_handle
METHOD ucomm_handle.
IF e_ucomm = 'CALC'. " When button added in toolbar is clicked
IF calc IS INITIAL.
CREATE OBJECT calc.
ENDIF.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = 'CALC'.
ENDIF.
ENDMETHOD. "ucomm_handle
ENDCLASS. "lcl_event_handler IMPLEMENTATION
DATA : container TYPE REF TO cl_gui_custom_container,
grid TYPE REF TO cl_gui_alv_grid,
event TYPE REF TO lcl_event_handler,
it_display TYPE TABLE OF mara,
wa_display TYPE mara.
START-OF-SELECTION.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'BASIC'.
PERFORM build_it_display.
PERFORM create_objects.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'EXIT'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'CANC'.
SET SCREEN 0.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form build_it_display
* text
* --> p1 text
* <-- p2 text
FORM build_it_display .
SELECT * FROM mara UP TO 15 ROWS INTO TABLE it_display.
ENDFORM. " build_it_display
*& Form create_objects
* text
* --> p1 text
* <-- p2 text
FORM create_objects .
IF container IS INITIAL.
CREATE OBJECT container
EXPORTING
container_name = 'CUSTOM'.
CREATE OBJECT event.
CREATE OBJECT grid
EXPORTING
i_parent = container.
SET HANDLER event->toolbar_handle FOR grid.
SET HANDLER event->ucomm_handle FOR grid.
CALL METHOD grid->set_table_for_first_display
EXPORTING
i_structure_name = 'MARA'
CHANGING
it_outtab = it_display.
ENDIF.
ENDFORM. " create_objects
Cheers,
Jose. -
Depndng on chkbox, should display selection screen block on selectionscreen
Hi,
Depending upon the chkbox it should display selection screen block on selection screen.
If not checked it should display B3 and If checked it should display Block B2 .
SELECTION-SCREEN BEGIN OF BLOCK B1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS P_DAT AS CHECKBOX USER-COMMAND FLAG.
SELECTION-SCREEN COMMENT 3(79) text-112.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-109.
PARAMETER: p_year1 LIKE ce1rh03-gjahr,
p_perid1 LIKE ce1rh03-perde.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-109.
PARAMETER: p_year LIKE ce1rh03-gjahr MODIF ID MO1,
p_period LIKE ce1rh03-perde MODIF ID MO1.
SELECTION-SCREEN END OF BLOCK B3.
If P_Dat is checked .... It should display the Block B2 and
If p_Dat is not checked .... it should display the Block B3
Any suggestions will be appreciated!
Regards,
KittuHello Kittu,
You can try this code:
SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_dat AS CHECKBOX USER-COMMAND flag.
SELECTION-SCREEN COMMENT 3(79) text-112.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-109.
PARAMETER: p_year1 TYPE gjahr MODIF ID mo1,
p_perid1 TYPE perio MODIF ID mo1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-110.
PARAMETER: p_year TYPE gjahr MODIF ID mo2,
p_period TYPE perio MODIF ID mo2.
SELECTION-SCREEN END OF BLOCK b3.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_dat = 'X' AND screen-group1 = 'MO2'.
screen-active = '0'.
ELSEIF p_dat <> 'X' AND screen-group1 = 'MO1'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Hope this helps.
BR,
Suhas -
Is there any option to display selection screen text in bold or big font?
Hi all,
Is there any option to display selection screen text in bold letters or with increase font size?
Thanks n RegardsHi,
Just give atry in this way..
open the same program ans selection-screen screen no will be 1000 in se51 screen painter,
go to properties of the texts u want to change then go to display tab and check the checkbox bright.
it may or may not work but this will work in module pool .
just give a try...
Regards,
Suresh. -
FM to display Selection screen on report output??
Hi Experts,
Is there an FM to display Selection screen on report output.
Thanks In Advance.Hi Ashwin,
Refer to below link
http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm
or
The easiest way is to define your selection screen in the TOP include of your module pool.
Then call the selection screen.
Selection Screen
selection-screen begin of screen 1010 as window title text-001.
selection-screen begin of block b1 with frame title text-002.
parameters: p_vornr type resb-vornr,
p_refno(20) type c,
p_plnid type zplcfg-plnid as listbox visible length 20,
p_sorts type c as listbox visible length 20.
selection-screen begin of line.
selection-screen comment (20) text-004.
selection-screen position 33.
parameters: p_order as checkbox default 'X'.
selection-screen end of line.
selection-screen end of block b1.
selection-screen end of screen 1010.
Now call the selection screen.
call selection-screen 1010.
if sy-subrc = 0.
perform get_production_orders.
perform process_orders.
endif.
Thanks!! -
Error which validating selection screen data in subroutine
Hi,this is my code
selection-screen begin of block b_selection with frame title text-001.
SELECT-OPTIONS: s_belnr for rbkp-belnr, "Invoice number
s_gjahr for rbkp-gjahr NO-EXTENSION NO INTERVALS, "Fiscal year
s_stat for rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT c_status, "Invoice status
s_blart for rbkp-blart OBLIGATORY DEFAULT c_doc_type, "Document type
s_lifnr for rbkp-lifnr. "Vendor
selection-screen end of block b_selection.
at selection-screen.
select belnr gjahr from rbkp into table i_inv_data
where belnr IN s_belnr
and gjahr IN s_gjahr
and blart IN s_blart
and rbstat IN s_stat.
and lifnr IN s_lifnr.
if i_inv_data[] is initial.
message e000 with 'No record matching the search criteria'(001).
endif.
This is working fine...now when I try to modularise it, it is nt working
selection-screen begin of block b_selection with frame title text-001.
SELECT-OPTIONS: s_belnr for rbkp-belnr, "Invoice number
s_gjahr for rbkp-gjahr NO-EXTENSION NO INTERVALS, "Fiscal year
s_stat for rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT c_status, "Invoice status
s_blart for rbkp-blart OBLIGATORY DEFAULT c_doc_type, "Document type
s_lifnr for rbkp-lifnr. "Vendor
selection-screen end of block b_selection.
at selection-screen.
perform sub_validate_data.
FORM SUB_VALIDATE_DATA.
select belnr gjahr from rbkp into table i_inv_data
where belnr IN s_belnr
and gjahr IN s_gjahr
and blart IN s_blart
and rbstat IN s_stat.
and lifnr IN s_lifnr.
if i_inv_data[] is initial.
message e000 with 'No record matching the search criteria'(001).
endif.
ENDFORM. " SUB_VALIDATE_DATA
the error which I m getting is ' IN s_belnr should be followd by an internal table'Please tell how can I modularize this code and put the checking part in subroutineIf I remove the period after s_stat your code is compiling without problems:
SELECTION-SCREEN BEGIN OF BLOCK b_selection WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_belnr FOR rbkp-belnr,
s_gjahr FOR rbkp-gjahr NO-EXTENSION NO INTERVALS,
s_stat FOR rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT 'X',
s_blart FOR rbkp-blart OBLIGATORY DEFAULT 'X',
s_lifnr FOR rbkp-lifnr.
SELECTION-SCREEN END OF BLOCK b_selection.
AT SELECTION-SCREEN.
PERFORM sub_validate_data.
*& Form SUB_VALIDATE_DATA
* text
FORM sub_validate_data.
SELECT belnr gjahr FROM rbkp INTO TABLE i_inv_data
WHERE belnr IN s_belnr
AND gjahr IN s_gjahr
AND blart IN s_blart
AND rbstat IN s_stat
AND lifnr IN s_lifnr.
IF i_inv_data[] IS INITIAL.
MESSAGE e000(oo) WITH 'No record matching the search criteria'(001).
ENDIF.
ENDFORM. " SUB_VALIDATE_DATA
Check, if you have an additional period somewhere else, or any other subtle differenec.
Michael -
Suppress leading spaces while displaying an amount field in a Smart form
Hi all,
In a smart form, I am using fields like KONV-kbetr and VBAP-netwr each of them currency type and 2 decimal places. I want to suppress the decimal places and also the leading spaces while displaying these fields in a smartform cause when this field is inserted in a sentence, a lot of gap is there between the field and the words of the sentence. I dont want to change the field length cause it can be that huge in some cases.
Please help.
Thanks ,Hi, if you would place it in a sentence, it would be an option to concatenate the text and values into one string and then condense it.
concatenate <text> <value> into lv_sentence.
condense lv_sentence.
but another way is to use codes for displaying values in smartforms:
This is from a smartforms PDF i have..
Output Options for Field Contents
Use the Formatting options to adapt the value of a field before printing it. You can enter the
relevant parameters directly behind the field name. Make sure to write the short forms of the
different options in uppercase letters. Some of the options can be combined.
General Information
The formatting options are not suited for all data types of fields (for example, for character fields
you need no exponential representation). You must distinguish between numeric fields and
character fields.
Numeric Fields
If specified, the system first evaluates the length (<length>).
If no length is specified, the system displays the value in its overall length.
The trailing blank indicates a positive sign. To suppress it, use formatting option S.
Any offset <offset> specified is ignored.
Sequence of evaluation: (<length>), sign to the left(<),Japanese date (L), suppress blanks (C),
right-justified display (R), insert fillers (F).
Character Fields
By default, the system displays the value of a field in its overall length, but truncates trailing
blanks.
Sequence of evaluation: suppress blanks (C), <offset> and (<length>), right-justified display (R),
insert fillers (F).
Overview
Formatting Options for Fields
Syntax Description
&field+<offset>& Skips <offset> places of the field value (character fields only). If the
offset is greater than the length of the value, nothing is displayed.
&field(<length>)& Sets the output length to <length>.
&field(*)& If the field is defined by a Data Dictionary type, Smart Forms set the
output length to the value specified there.
&field(S)& Suppresses the sign
&field(<)& Displays the sign to the left of the number
&field(.<nat.number>)& Limits output of decimal places to <nat.number>
&field(E<nat.number>)& Displays the field value with the fixed exponent <nat.number>. The
mantissa is adapted to this exponent by shifting the decimal
character and inserting zeros.
SAP Smart Forms (BC-SRV-SCR) SAP AG
Output Options for Field Contents
72 April 2001
&field(T)& Suppresses thousand indicators when displaying fields of types
DEC, CURR, INT, and QUAN.
&field(Z)& Suppresses leading zeros of numbers
&field(I)& Suppresses display of initial values
&field(K)& Deactivates a conversion routine specified in the Data Dictionary.
&field(R)& Right-justified display. Use this option only when specifying an
output length as well.
&field(F<filler>)& Replaces left-justified blanks in the value by the fill character <filler>.
&field(L)& Converts and a date field to a local date and displays it. The date is
then formatted using edit mask JPDAT.
Since this representation uses Japanese characters, use it in the
Japanese version of the SAP System only.
&field(C)& The system takes the field value as a sequence of words separated
by blanks. Option C shifts these words to the left and leaves only
one blank inbetween as separator. Any leading blanks are
suppressed. This effect corresponds to that of the ABAP statement
CONDENSE. -
Displaying selection screen details in Alv Report output display as Header
Hi all,
May be somebody knows how I can show selected values with select-options in top_of_page using REUSE_ALV_GRID_DISPLAY.
This shoud work for all the reports and diff selection screens .
I need one dynamic process which will for display any report selection screen selected details.(Basically varient information of report).
Small example if possible, please.
Thanks in advance,
RimasHi Thiru,
Thanks for the input.
This is my exact requirement.
Hi Experts,
I would like to Display / Print Select-options selected details in ALV Header.
Ex: Say suppose here i enter kunnr as 1000
lifnr as 2000 to 4000
p_langu as 'EN'.
p_dir as 'C:\TEMP,
p_upda as 'X'
for selection screen below.
SELECTION-SCREEN :BEGIN OF BLOCK blk1 WITH FRAME TITLE text-000.
SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.
SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr.
PARAMETER : p_lanuge LIKE t002-spras DEFAULT sy-langu.
PARAMETER: p_dir LIKE rlgrap-filename
DEFAULT text-003 LOWER CASE.
PARAMETERS: p_upd AS CHECKBOX DEFAULT 'X'.
I dont want to Hard code selection screen values like
DATA: header TYPE slis_t_listheader,
wa TYPE slis_listheader,
wa-typ = 'S'(093).
wa-key = s_lifnr .
wa-info = 'Vendor no".
APPEND wa TO header.
I want dynamic process for all of my selection screen values selected
hard code may be it will be fine small selection screen it will work.
Fur that i got one process to get dynamically through fm
Ex: DATA: irsparams TYPE rsparams OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = program
TABLES
selection_table = irsparams
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
loop at irsparams.
write : / irsparams-SELNAME.
write : / irsparams-SIGN.
write : / irsparams-OPTION.
write : / irsparams-LOW.
write : / irsparams-HIGH.
endloop.
I have done my requirement partially but i am failed to achive my full requirement.
Because
rsparams strcture is diff from slis_t_listheader.
Can any one help me for further assistence to display irsparams strcture data in alv header.
Thanks
Nag -
Selection screen data validation problem
Hello all,
Transaction FBL3N has an authority check on company. If the user enters a company for which they have no authority, a message displays and they can then exclude that company. The following steps can be repeated as many times as are required to ensure that all selection-screen values can be used. The program, RFITEMGL, is doing all of the authorization using the code of the logical database that is part of the program.
I added the following logic in my program, which works fine, except when the entered values fail the authority check, I can't get off of screen 1000 and get to the sub-screen to exclude the unauthorized values unless I first change the range on screen 1000.
For an example:
If I enter range '100 ' through '900 ', and there is an unauthorized company, '200' in that range, I can't add '200' as an excluded value without first changing the range to '100 ' to ' 199 ' on screen 1000.
Any thoughts on a solution? I tried looking at the logical database code without much success.
at selection-screen on s_bukrs.
check if person entering company has authority
data: i_t001 type table of t001.
data: w_t001 type t001.
select * from t001
into table i_t001
where bukrs in s_bukrs.
loop at i_t001 into w_t001.
authority-check object 'F_BKPF_BUK'
id 'BUKRS' field w_t001-bukrs
id 'ACTVT' field '03'.
if sy-subrc ne 0.
message e000(zf) with 'Company'
w_t001-bukrs
'not authorized'.
endif.
endloop.
Thanks
BruceHi,
Yes this is normal way as you entered wrong value in s_bukrs unless and until you change that you cannot proceed further.
instead of at selection-screen on s_bukrs.
use at selection-screen.
if s_bukrs is not initial.
do processing .,
and display info message'
endif.
or ., instead of error message use dispaly like 'E'
like.,
at selection-screen on s_bukrs.
check authority.,
MESSAGE 'You are not Authorized to use the Company Code' type 'S' display like 'E'.
hope this helps you,
Thanks & Regards. -
Selection Screen - Date and Time
Hi,
I have given a selection screen where the user needs to key in the input in the following format
dd.mm.yyyy hh:mm:ss.
Reason is that the database fetching these elements accepts only in this criteria.
Now as they look into automating this program, they would want to automatically take the current system date and time - 24 hours .
How do I achieve this in the above format? If this is not possible, let me know if i can make the selection screen with normal sap date format and convert it to the above format on passing to the select statement.
Regards
SamHi Sam,
See this. Is this your requirement.
With this we are able to get Current time-stamp to selection parameter.
REPORT ZTEST.
DATA: L_TS TYPE TZNTSTMPS,
L_TS_C TYPE CHAR14.
PARAMETERS:
P_TMSTMP TYPE TMSTMP OBLIGATORY MEMORY ID TEST.
INITIALIZATION.
GET TIME STAMP FIELD L_TS.
MOVE L_TS TO L_TS_C.
SET PARAMETER ID 'TEST' FIELD L_TS_C.
The output is
Jogeswara Rao K -
Selection screen with Parameter - field name not coming when made mandatory
Hi Experts,
I have added a parameter in my selection screen which has other select options as well.
I used below code in wd_initi to add parameter
create data LR_LIFNR type LIFNR.
WD_THIS->M_HANDLER->ADD_PARAMETER_FIELD(
I_ID = 'LIFNR'
I_VALUE = LR_LIFNR
I_OBLIGATORY = ABAP_TRUE
I_READ_ONLY = L_READ_ONLY ).
I have a submit button in the selection screen, so when ever the value is empty in parameter for LIFNR, system throws an error *Enter selection in Field "" * but error message is unable to take the name of the parameter?
It is expected to give as Enter selection in Field "Vendor"
This throwing of error message is working fine for another select-options for PO which is also mandatory.
What could be the error?
Any clue is highly appreciated.
Regards,
AjayHi,
WDDOINIT the code is:
lt_range_table = wd_this->m_handle->create_range_table(
i_typename = 'ZRM_T_CV_END_DATE1' ).
wd_this->m_handle->add_selection_field(
i_id = 'ZRM_T_CV_END_DATE1'
i_description = 'Project End Date (MM.YYYY)'
it_result = lt_range_table
i_read_only = read_only ).
on submit the code is :
rt_prj_end = wd_this->m_handle->get_range_table_of_sel_field(
i_id = 'ZRM_T_CV_END_DATE1' ).
ASSIGN rt_prj_end->* TO <fs_prj_end>.
1.is the data element the same in both the methods u mentioned.i,e on WDDOINIT AND ON ACTION OF SUBMIT.
please check it once.
2.2does the data element LIFNR has field label assosciated with it.(check in domain).
3.check adding description to the field shown as below.
wd_this->m_handle->add_selection_field(
i_id = 'ZRM_T_CV_END_DATE1'
i_description = 'Project End Date (MM.YYYY)'
it_result = lt_range_table
i_read_only = read_only )
Try checking these 3 cases.
Priya -
Display selection screen details in the header of ALV
hi..
can someone please help me on how to display the data in the selection screen in the header in ALV?
i hope someone can help me..thanks very much..Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100 -
How to display Selection screen on Web for RSCRM_BAPI
HI,
For a customer we want to create the possibility to extract data from BI2004s to other systems, therefore we want to use RSCRM_BAPI.
Thing is that we want to provide the possibility for them to enter selectioncriteria, but we don't want them to log on using the Gui.
We want to use the VC to create an interface cockpit.
question is how we can allow users to use selectioncriteria but:
variants can not be used
TVARV can not be used
is there any way to capture the selection screen and to display it on the web/VC?
Anyone ever did this?
Tnx
rogierGili.
thank you for your quick reply,.
Reason why we are looking into the RSCRM_BAPI is due to the layout
requirements of the extract. the recieving systems requires specific layouts. If we do this with the infospoke we will have to use a BADI to perfom complex transformations which will need additional knowlegde (of BADI's) of the support organisation whereas with RSCRM_BAPI they can adjust the query.
and as far as i know you can not define the variable input via the web for open hub.
Grtz
rogier -
Urgent :Show all records till selection screen date
Hi Techis
i want to show all records till selected date , selection screen consist of date also and my select statement is given below so any body pls tell me what changes i hav to make so that all records till particular date should b shwn
Select statement is
SELECT BUKRS KUNNR
BLDAT
GSBER
DMBTR
BUDAT
GJAHR
SGTXT
SAKNR
SHKZG
PRCTR FROM BSID INTO corresponding fields of TABLE IT_FINAL WHERE BUKRS IN S_BUKRS AND
SAKNR IN S_SAKNR AND
GSBER IN S_GSBER AND
PRCTR IN S_PRCTR AND
BUDAT IN S_BUDAT AND
KOSTL IN S_KOSTL.
and selection screen is ...
SELECTION-SCREEN BEGIN OF BLOCK AGE WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_BUKRS FOR BSID-BUKRS," OBLIGATORY DEFAULT 'TCIL'
S_KUNNR FOR KNA1-KUNNR,
S_SORTL FOR KNA1-SORTL,
S_SAKNR FOR BSID-SAKNR DEFAULT '15110013',
S_KTOKD FOR KNA1-KTOKD ,"OBLIGATORY DEFAULT 'LTOB'
S_GSBER FOR BSID-GSBER,
S_PRCTR FOR BSID-PRCTR,
S_KOSTL FOR BSID-KOSTL,
S_GJAHR FOR BKPF-GJAHR," OBLIGATORY.
S_BUDAT FOR BSID-BUDAT DEFAULT SY-DATUM."OPEN ITEM DATE
*PARAMETERS : P_BUDAT LIKE BSID-BUDAT DEFAULT SY-DATUM." OBLIGATORY.
SELECTION-SCREEN END OF BLOCK AGE.
rewars for help ful ansHi Santosh,
If your requirement is up to the selection date you'd better use a parameter (which can only hold one value).
Then define a range in your program:
DATA:
zlt_budat_range TYPE RANGE OF budat,
zls_budat_range LIKE LINE OF zlt_budat_range.
zls_budat_range-sign = 'I'.
zls_budat_range-option = 'LE'.
zls_budat_range-low = pa_budat.
APPEND zls_budat_range TO zlt_budat_range.
.....AND budat IN zlt_budat_range.
Regards,
John.
Maybe you are looking for
-
Error 400 when attempting to sign in . . .
to Photoshop.com (Photoshop.com services are currently unavailable. Please try laer or check your network connections. Error 400) I checked to be sure I had internet connection and that there was no firewall blockage - what else should I do (keep i
-
How to set group name as default value in People Picker in Infopath 2010
How to set group name (shareoint Groupname) as default value in People Picker in Infopath 2010
-
Upgrade to BW 7.4 runs for days in phase PARMVNT_SHD - Nametab Activation
Hi everyone, We are upgradeing from BW 7.01 to BW 7.4 and facing a very long runtime in the phase PARMVNT_SHD (actual phase PARMVNT_TRANS). It has been running for 3 days! In this phase nametab activations are taking place. The upgrade is not stuck,
-
1 Email shows all tasks assigned to team member
Hi, Project Server 2013, (not using timesheets) Can any ways I can accumulate all the 10 tasks assigned to user xyz, and send him 1 email containing all tasks info to the users. 2nd- Can I send a email to every users- with their Pending tasks of last
-
How to center mx:window Component in adobe air
Hello Friends i am making a simple application in adobe air 2.0 .In this application i made a seprate window on some button click.but every time it open with random positoning i just want to center that window component.if any bod