Help reqd for Selection Screen Input paramter
Hi Friends,
I've developed a noraml ALV grid report which have Date selection option as input selection parameter. In that , I want to declare last month date as defualt value to date-low range. Whenever the Tcode is entered, it should show the date ranges with my default values as date-low is last month date and date-high is current system date (this one I've given as sy-datlo).
Please help me how to declare last month date to my low range field.
thanks & regards
sankar.
Hi Suhas,
i think so there is no need to specify the sign and options.
SELECT-OPTIONS:so_dat for sy-datum.
INITIALIZATION.
so_dat-low = sy-datum.
so_dat-high = sy-datum.
append so_dat.
START-OF-SELECTION.
BREAK-POINT.
it assigns BT by default.
Sankar:Please provide your code
Similar Messages
-
Help Needed for selection screen
Hi Experts
I'm doing one report of pm module using one standard program called me RIQMEL10
my query is if u execute this stand.prog u'll get one selection screen ,and having three selction-screen blocks. first sel-scr block name is Notification status this selection screen is calling dynamically by using sap stand.prog SAPDBQMI
SCR NO : 1000
can any one send me the default code of this selection screen block ( Notification status ) which sap is providing .INCLUDE DBQMISEL
It will be automatically included into the database program.
If the source code is automatically generated,
please perform the following steps:
1. Replace ? by suitable names (at most 8 characters).
2. Activate SELECT-OPTIONS and PARAMTERS (delete stars).
3. Save source code.
4. Edit database program
Hint: Syntax-Check is not possible within this Include!
It will be checked during syntax-check of database program.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-011.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS dy_ofn LIKE rihea-dy_ofn FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 3(11) text-001
FOR FIELD dy_ofn ID 001.
PARAMETERS dy_rst LIKE rihea-dy_rst FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 16(10) text-002
FOR FIELD dy_rst ID 002.
PARAMETERS dy_iar LIKE rihea-dy_iar FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 29(10) text-003
FOR FIELD dy_iar ID 003.
PARAMETERS dy_mab LIKE rihea-dy_mab FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 42(10) text-004
FOR FIELD dy_mab ID 004.
SELECTION-SCREEN COMMENT 52(10) text-005
FOR FIELD selschem ID 005.
PARAMETERS: selschem LIKE tj48t-selid FOR TABLE diqmel.
SELECTION-SCREEN PUSHBUTTON 73(5) p_addr USER-COMMAND addr
FOR TABLE diqmel ID 006.
PARAMETERS dy_adrfl NO-DISPLAY FOR TABLE diqmel.
SELECTION-SCREEN COMMENT 79(30) ad_icon FOR TABLE diqmel ID ic1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-012.
SELECT-OPTIONS:
qmnum FOR diqmel-qmnum MATCHCODE OBJECT qmeg,
qmart FOR diqmel-qmart,
tplnr FOR diqmel-tplnr NO-DISPLAY,
strno FOR diqmel-strno MATCHCODE OBJECT iflm,
equnr FOR diqmel-equnr MATCHCODE OBJECT equi,
matnr FOR diqmel-matnr MATCHCODE OBJECT mat1,
serialnr FOR diqmel-serialnr,
deviceid FOR diqmel-deviceid,
aufnr FOR diqmel-aufnr MATCHCODE OBJECT orde.
*--- date from - until
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(28) text-009 FOR FIELD datuv.
SELECTION-SCREEN POSITION 33 FOR TABLE diqmel.
PARAMETERS datuv LIKE rihea-termab FOR TABLE diqmel DEFAULT sy-datum.
SELECTION-SCREEN COMMENT 51(6) text-010 FOR FIELD datub.
PARAMETERS datub LIKE rihea-termbi FOR TABLE diqmel DEFAULT sy-datum.
SELECTION-SCREEN END OF LINE.
*--- partner function, partner
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(9) text-006 FOR FIELD dy_parvw.
SELECTION-SCREEN POSITION 10 FOR TABLE diqmel.
PARAMETERS dy_parvw LIKE ihpa-parvw FOR TABLE diqmel
AS LISTBOX VISIBLE LENGTH 22.
SELECTION-SCREEN POSITION 33 FOR TABLE diqmel.
PARAMETERS dy_parnr LIKE ihpa-parnr FOR TABLE diqmel VALUE-REQUEST.
*--- button classification
SELECTION-SCREEN PUSHBUTTON 73(5) text-013 USER-COMMAND clse
FOR TABLE diqmel.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block2.
*--- freie Abgrenzungen für log.Datenbankselektion -
SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE diqmel ID 010.
SELECTION-SCREEN BEGIN OF VERSION 001 text-v01.
SELECTION-SCREEN EXCLUDE PARAMETERS: dy_mab, dy_ofn, dy_rst, dy_iar,
selschem, dy_adrfl.
SELECTION-SCREEN EXCLUDE IDS: 001, 002, 003, 004, 005, 006, 010, ic1.
SELECTION-SCREEN END OF VERSION 001.
SELECTION-SCREEN BEGIN OF VERSION 002 text-v02.
SELECTION-SCREEN EXCLUDE IDS: 010.
SELECTION-SCREEN END OF VERSION 002.
*--- Parameter für Selektionssteuerung -> es sollen nicht -
*--- automatisch alle Segmente der log.DB selektiert werden -
*--- neu mit P30K047900 -
PARAMETERS: ldb_ihpa NO-DISPLAY DEFAULT 'X' FOR TABLE diihpa,
ldb_iflo NO-DISPLAY DEFAULT 'X' FOR TABLE diiflo,
ldb_equi NO-DISPLAY DEFAULT 'X' FOR TABLE diequi,
ldb_qmfe NO-DISPLAY DEFAULT 'X' FOR TABLE diqmfe,
ldb_qmma NO-DISPLAY DEFAULT 'X' FOR TABLE diqmma,
ldb_qmmx NO-DISPLAY DEFAULT 'X' FOR TABLE diqmmax,
ldb_clas NO-DISPLAY DEFAULT 'X' FOR TABLE diclass,
ldb_clda NO-DISPLAY DEFAULT 'X' FOR TABLE dicldat,
ldb_qmsm NO-DISPLAY DEFAULT 'X' FOR TABLE diqmsm,
ldb_qmsx NO-DISPLAY DEFAULT 'X' FOR TABLE diqmsmx,
ldb_aufk NO-DISPLAY DEFAULT 'X' FOR TABLE diaufk.
regards
vinod -
I need some help on a selection screen. I have the following:
SELECTION-SCREEN: BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
PARAMETERS: p_bldat TYPE bkpf-bldat OBLIGATORY DEFAULT sy-datum,
p_budat TYPE bkpf-budat OBLIGATORY DEFAULT sy-datum,
p_xref1 TYPE proj-pspid OBLIGATORY,
p_bktxt TYPE bkpf-bktxt,
p_bukrs TYPE bkpf-bukrs OBLIGATORY DEFAULT '1100',
p_waers TYPE bkpf-waers OBLIGATORY DEFAULT 'USD'.
SELECTION-SCREEN: END OF BLOCK a1.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETERS: p_lifnr TYPE ekko-lifnr OBLIGATORY,
p_ebeln TYPE ekko-ebeln OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK c1 WITH FRAME TITLE text-003.
PARAMETERS: p_amt TYPE wrbtr,
p_ret TYPE wrbtr.
SELECTION-SCREEN: END OF BLOCK c1.
SELECTION-SCREEN: BEGIN OF BLOCK d1 WITH FRAME TITLE text-004.
PARAMETERS: p_cmode TYPE callmode DEFAULT 'N' OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK d1.
AT SELECTION-SCREEN ON p_ebeln.
SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
MESSAGE d_string TYPE 'E'.
ENDIF.
AT SELECTION-SCREEN.
check p_ret is not INITIAL.
IF p_amt > p_ret.
MESSAGE 'Amt. To Be Released is more than the remaining retention. Please check your input.' TYPE 'E'.
ELSEIF p_amt IS INITIAL.
MESSAGE 'Amt. To Be Released is required. Please check your input.' TYPE 'E'.
ENDIF.
What I want is for the parameter p_ret to be populated when the user inputs a PO (p_ebeln). This seems to work except I want this to be brought in without running through the other checks (AT SELECTION-SCREEN). In order to bring in p_ret I am having to hit ENTER which will trigger the event AT SELECTION-SCREEN.
How can I bring in p_ret without triggering the event AT SELECTION-SCREEN?
Regards,
DavisIn this case.
If you don't want at selection-screen to be triggered on hitting enter, you can give an if condition in at selection-screen.
tables : sscrfields.
AT SELECTION-SCREEN ON p_ebeln.
SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
clear sscrfield-ucomm.
MESSAGE d_string TYPE 'E'.
ENDIF.
AT SELECTION-SCREEN.
if sscrfields-ucomm = 'ONLI'.
check p_ret is not INITIAL.
IF p_amt > p_ret.
MESSAGE 'Amt. To Be Released is more than the remaining retention. Please check your input.' TYPE 'E'.
ELSEIF p_amt IS INITIAL.
MESSAGE 'Amt. To Be Released is required. Please check your input.' TYPE 'E'.
ENDIF.
endif.
The code in at selection-screen is executed only when user presses F8. on pressing 'Enter' it will not be executed.
Hope this helps you.
Regards,
Siddarth -
Help: related to selection screen
hi all,
Fields on selection screen (input screen) : Company Code, Document Number, Fiscal Year , Date , Tax Code , LST Condition, CST Condition.
Field in the output List : Total Amount comes as Basic Amount and ( BED + CESS ) amount , vendor Information ( Code , Name , address ) , Excise Invoice Number , Excise Invoice Date , Quantity , Unit , LST or CST Amount with TAX% .
can any body help me for finding related table and example of this problem .
thnx. konv, "Conditions (Transaction Data)
kna1, "General Data in Customer Master
vbpa, "Partner function table
t005u, "Taxes: Region (Province) Key
tvko, "Organizational Unit: Sales Organizations
tspat, "Organizational Unit: Sales Divisions: Texts
tvtw, "Organizational Unit: Distribution Channels
vbak, "sales doc header
vbap. "Sales doc Item
You can use vbrpwkreg <> vbrpregio_auft check to get the cst based details from SAP
Reward if helpful -
Global Variable for selection screen variable
Hi All,
We need to create a report where calendar day has to be included in the selection screen.Later after executing the report we should be able to retrieve the selection screen input for calendar day and modify it and use the modified one for other calculations.Can somebody help me out in finding the global variable in the variable exit where we find all the inputs for selection screen variables....
Regards,
Shravanishravani,
I_vnam will store the varaible names...if you have varaible in the query...
please use this code for ur help...
DATA: ww_der_date LIKE sy-datum,
wzdate LIKE sy-datum,
wzact_gi_dte TYPE /bi0/oiact_gi_dte.
wzact_gi_dte = sy-datum.
IF i_step = 2.
READ TABLE i_t_var_range INTO wa_i_t_var_range WITH KEY vnam =
'ZNODAYS'.
ww_der_date = sy-datum - wa_i_t_var_range-low.
CLEAR wa_i_t_var_range.
IF i_vnam = 'ZVAGIDCUSTEXIT'.
CLEAR l_s_range.
l_s_range-low = ww_der_date .
l_s_range-high = wzact_gi_dte.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
APPEND l_s_range TO e_t_range.
CLEAR l_s_range.
ENDIF.
ENDIF.
in this case user will enter no.of days in ZNODAYS and that being is used in calculation and used in the next varaible.... -
How i can show the selection screen input field in the top of page in alv
hi ,
how i can show the selection screen input field in the top of page in alv grid output.
tell me the processHi,
excample from my program:
FORM topof_page.
DATA: l_it_header TYPE TABLE OF slis_listheader WITH HEADER LINE,
l_info LIKE l_it_header-info.
DATA: l_it_textpool TYPE TABLE OF textpool WITH HEADER LINE.
DATA: l_key LIKE l_it_textpool-key.
READ TEXTPOOL c_repid INTO l_it_textpool LANGUAGE sy-langu.
DEFINE m_selinfo.
if not &1 is initial.
clear l_it_header.
l_it_header-typ = 'S'.
l_key = '&1'.
translate l_key to upper case.
read table l_it_textpool with key key = l_key.
if sy-subrc = 0.
shift l_it_textpool-entry left deleting leading space.
l_it_header-key = l_it_textpool-entry .
endif.
loop at &1.
case &1-option.
when 'EQ'
or 'BT'
or 'CP'.
write &1-low to l_it_header-info.
when others.
write &1-low to l_it_header-info.
concatenate &1-option
l_it_header-info
into l_it_header-info
separated by space.
endcase.
if not &1-high is initial.
write &1-high to l_info left-justified.
concatenate l_it_header-info
l_info
into l_it_header-info
separated by space.
endif.
if &1-sign = 'E'.
concatenate ']'
l_it_header-info
into l_it_header-info.
endif.
append l_it_header.
clear: l_it_header-key,
l_it_header-info.
endloop.
endif.
END-OF-DEFINITION.
m_selinfo: s_trmdat,
s_trmext,
s_trmint,
s_fkdat,
s_delno,
s_vbeln,
s_deact,
s_kdmat.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = l_it_header[].
ENDFORM.
I hope, this will help you.
Regards
Nicole -
Error in search help button at selection-screen
hi all,
i have a small issue.
i have created a seach help button in selection screen .
my code is as bellow.
TYPES: BEGIN OF ty_ZSD_SNID,
KUNNR TYPE KUNNR,
BAREA TYPE WERKS_D,
END OF ty_ZSD_SNID.
DATA : it_z TYPE STANDARD TABLE OF ty_ZSD_SNID.
selection-screen : begin of block b with frame title text-000.
select-options : skunnr for zsd_snid-kunnr.
parameters : pbarea like zsd_snid-barea obligatory.
selection-screen : end of block b.
INITIALIZATION.
SELECT KUNNR BAREA FROM ZSD_SNID INTO TABLE it_z.
SORT it_z BY BAREA KUNNR.
DELETE ADJACENT DUPLICATES FROM it_z COMPARING BAREA KUNNR.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SKUNNR-low.
IF it_z[] IS NOT INITIAL.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'KUNNR' " data base table field name
PVALKEY = ' '
dynpprog = sy-repid " program name
dynpnr = sy-dynnr "screen name
dynprofield = 'SKUNNR-LOW' " layot field name
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = it_z[] " internal talble name
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
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.
ELSE.
MESSAGE E000(zsdsn).
ENDIF.
my issue is , its working properly if records are there in my z table.
if no records are there in the table then if i do comment the last message statement then its working.
if i do uncomment like the above code, then its dumming.
what i should i do ??
kind regardsclosed because of no answer.
-
How to provide F4 help in a selection screen
Hi..
How to provide F4 help in a selection screen for a particular field using
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'.
Thanks in Advance.
Regards
Raj KumarAT SELECTION SCREEN
at selection-screen on value-request for s_contr-low.
Get contract (low value)
perform get_contract changing s_contr-low.
form get_contract changing p_contr .
types: begin of ty_ycontract,
ycontract type xchcontract-ycontract,
lifnr type xchcontract-lifnr,
ycontdate type xchcontract-ycontdate,
ycont_end_dt type xchcontract-ycont_end_dt ,
end of ty_ycontract.
data: ds_returntab type ddshretval,
dt_returntab type table of ddshretval,
dl_fieldname type dfies-fieldname.
data: dt_ycontract type table of ty_ycontract.
select ycontract lifnr ycontdate ycont_end_dt
from xchcontract
into table dt_ycontract.
if sy-subrc = 0.
clear dl_fieldname.
dl_fieldname = 'YCONTRACT'.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = dl_fieldname
value_org = 'S'
tables
value_tab = dt_ycontract
return_tab = dt_returntab
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
clear ds_returntab.
read table dt_returntab into ds_returntab index 1.
if sy-subrc = 0.
p_contr = ds_returntab-fieldval.
endif.
endif.
endif.
endform. -
F4 help in the selection screen from a int table
I collected the datas from the function module. and the internal table is populated.
the internal table contains manny fields.
among these fields i need to take only one field and this field value to be used for F4 help in the selection screen ( not a dynpro)
for example : in the selection screen
I have to select the PO.
based on the user i have filtered the PO. (determined dynamically by using the user name this i have done it)
then i have to assign the PO the selection screen.
which FM will be better to use for this type of scenario and help me out with some example codes particularly for my req
ThanksHi ,
use the FM 'F4IF_INT_TABLE_VALUE_REQUEST'
This example is for search help for material type .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_mtart-low .
select all material types you want to display in search help into table i_mtart.
PERFORM select_material_type.
PERFORM help_material_type.
*& Form help_material_type
text
--> p1 text
<-- p2 text
FORM help_material_type .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'MTART'
PVALKEY = ' '
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'S_MTART-LOW'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = i_mtart
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
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.
ENDFORM. " help_material_type
Regards,
Balaji. -
To display the user login details in selection-screen( input screen )
HI Experts,
I have a requirement.
Assume there is a report on travel details. Report access has been given to all in the organization based on authorization level.
Before excecuting the report, in the selection-screen(input screen) itself I need to display the login user details.
suppose user A belongs to ITS-business unit and user B-belongs to RDS-business unit and Industry group-Multi markets.
so when User B logs into production system and try to access the report, in the selection screen, i need to display like
user-id-- XXXX Business Unit---RDS and IG -
Multi Markets
how to achieve this? User details will vary based on login.
Regards,
Praveencheck this
REPORT Z_demo.
*& Function Modules: HR_GET_EMPLOYEE_DATA
*& HR_IMAGE_EXISTS
*& SCMS_DOC_URL_READ
*& HR_IMAGE_RESET
*& Class & Methods : CL_GUI_DOCKING_CONTAINER
*& CL_GUI_PICTURE->SET_POSITION
*& CL_GUI_PICTURE->SET_DISPLAY_MODE
*& CL_GUI_PICTURE->DISPLAY_MODE_FIT
*& CL_GUI_PICTURE->LOAD_PICTURE_FROM_URL_ASYNC
*REPORT ZEMPLOYEE.
TABLES: PA0001, PERSON.
*----------------------Declaration for Image------------------------*
DATA: DOCKING_CONT TYPE REF TO CL_GUI_DOCKING_CONTAINER, " Custom Container
PICTURE TYPE REF TO CL_GUI_PICTURE.
*--------------------Declaration of Internal table------------------*
DATA: ITAB_EMPDATA LIKE TABLE OF PERSON.
DATA: ITAB_DATA LIKE TABLE OF PERSON WITH HEADER LINE.
DATA: P_CONNECT_INFO LIKE TABLE OF TOAV0 WITH HEADER LINE.
DATA: P_DOCUMENT_TYPE LIKE TOAV0-RESERVE.
DATA: URL(255) TYPE C.
DATA: HANDLE TYPE I.
DATA: PPERNR TYPE PA0001-PERNR.
*----------------------Start of Selection Screen----------------------*
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-099.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN COMMENT 40(25) TEXT-010 .
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) TEXT-002 FOR FIELD PERNR.
PARAMETERS PERNR TYPE PA0001-PERNR.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) TEXT-008 FOR FIELD ENAME.
PARAMETERS ENAME TYPE PA0001-ENAME.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) TEXT-003 FOR FIELD PERSG.
PARAMETERS PERSG TYPE PA0001-PERSG.
SELECTION-SCREEN COMMENT 45(15) TEXT-009 FOR FIELD WERKS.
PARAMETERS WERKS TYPE PA0001-WERKS.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) TEXT-004 FOR FIELD PERSK.
PARAMETERS PERSK TYPE PA0001-PERSK.
SELECTION-SCREEN COMMENT 45(15) TEXT-005 FOR FIELD KOSTL.
PARAMETERS KOSTL TYPE PA0001-KOSTL.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) TEXT-006 FOR FIELD ORGEH.
PARAMETERS ORGEH TYPE PA0001-ORGEH.
PARAMETERS ORGEHTXT TYPE PERSON-ORGEH_TXT .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(15) TEXT-007 FOR FIELD PLANS.
PARAMETERS PLANS TYPE PA0001-PLANS.
PARAMETERS PLANSTXT TYPE PERSON-PLANS_TXT .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN END OF BLOCK B1.
*AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT .
LOOP AT SCREEN.
IF SCREEN-NAME = 'ENAME'
OR SCREEN-NAME = 'PERSG'
OR SCREEN-NAME = 'PERSK'
OR SCREEN-NAME = 'KOSTL'
OR SCREEN-NAME = 'WERKS'
OR SCREEN-NAME = 'ORGEH'
OR SCREEN-NAME = 'PLANS'
OR SCREEN-NAME = 'ORGEHTXT'
OR SCREEN-NAME = 'PLANSTXT'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
LOOP AT SCREEN.
IF SCREEN-NAME = 'ORGEHTXT'
OR SCREEN-NAME = 'PLANSTXT'.
SCREEN-OUTPUT = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
PERFORM GET_PIC.
*AT SELECTION-SCREEN .
AT SELECTION-SCREEN .
PPERNR = PERNR.
CALL FUNCTION 'HR_GET_EMPLOYEE_DATA'
EXPORTING
PERSON_ID = PPERNR
SELECTION_BEGIN = SY-DATUM
SELECTION_END = SY-DATUM
IMPORTING
PERSONAL_DATA = ITAB_DATA
EXCEPTIONS
PERSON_NOT_FOUND = 1
NO_ACTIVE_INTEGRATION = 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.
ENAME = ITAB_DATA-ENAME.
PERSG = ITAB_DATA-PERSG.
PERSK = ITAB_DATA-PERSK.
ORGEH = ITAB_DATA-ORGEH.
PLANS = ITAB_DATA-PLANS.
KOSTL = ITAB_DATA-KOSTL.
WERKS = ITAB_DATA-WERKS.
ORGEHTXT = ITAB_DATA-ORGEH_TXT.
PLANSTXT = ITAB_DATA-PLANS_TXT.
*Function Module To check Existance of Image
CALL FUNCTION 'HR_IMAGE_EXISTS'
EXPORTING
P_PERNR = PPERNR
IMPORTING
P_CONNECT_INFO = P_CONNECT_INFO
EXCEPTIONS
OTHERS = 2.
P_DOCUMENT_TYPE = P_CONNECT_INFO-RESERVE.
*Function Module To Get the URL of Image
CALL FUNCTION 'SCMS_DOC_URL_READ'
EXPORTING
STOR_CAT = SPACE
CREP_ID = P_CONNECT_INFO-ARCHIV_ID
DOC_ID = P_CONNECT_INFO-ARC_DOC_ID
COMP_ID = 'DATA'
DP_URL_ONLY = 'X'
IMPORTING
URL = URL
EXCEPTIONS
OTHERS = 10.
IF SY-SUBRC <> 0.
ENDIF.
*Method To load Image from URL
CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL_ASYNC
EXPORTING
URL = URL.
IF SY-SUBRC NE 0.
ENDIF.
IF PPERNR NE PERNR.
*Function Module To Reset Image
CALL FUNCTION 'HR_IMAGE_RESET'
EXPORTING
HANDLE = HANDLE
EXCEPTIONS
INVALID_HANDLE = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ENDIF.
ENDIF.
*& Form Get_Pic
FORM GET_PIC.
DATA: REPID LIKE SY-REPID.
REPID = SY-REPID.
IF PICTURE IS INITIAL.
*Object To Create the Custom Container
CREATE OBJECT PICTURE
EXPORTING
PARENT = DOCKING_CONT.
CHECK SY-SUBRC = 0.
*Method To Set Position of Image
CALL METHOD PICTURE->SET_POSITION
EXPORTING
HEIGHT = 47
LEFT = 610
TOP = 25
WIDTH = 70.
*Method To Set Display Mode Fit to Container
CALL METHOD PICTURE->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
ELSE.
*Function Module To Reset Image
CALL FUNCTION 'HR_IMAGE_RESET'
EXPORTING
HANDLE = HANDLE
EXCEPTIONS
INVALID_HANDLE = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ENDIF.
ENDIF.
ENDFORM. "Get_pic -
How to set default variant for selection screen
Hi,
I want to make one variant as default for selection screen for one user.
For eg., take COOIS. For the selection screen, i have 3 variants. But i want one variant to be default. Thsi is not for all users. Thsi is for particular user.
I am not seeing any way to do this. please help me..
Thanks
SriniHi,
If you are using Z program then you can ask your developer to get Variant name Runtime from Parameter ID.
This means you decide a Parameter ID name : ZVAR in your Z program and ask your developer to load variant each time your Z program loads.
Now, second step will be using SU01 transaction you can set value of ZVAR in Parameters tab for the user. This value will be the variant which you created for this user.
This will solve your problem and you can make n number of variants and assign it to different users.
Regards,
Arpit -
Dinamic variant for selection screen
Hi,
I got a requirement where i need a Dynamic variant for selection screen .There is a date field in the selection screen i want to create a variant such that when i choose it,it should give the current day date in selection screen.can anyone help me.
Regards,
RaviHi,
Using Customer Exit code you can give it.
Create a Customer Exit Variable and write simple code in CMOD. See the usefull Exit code for reports in the following url.
https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
WHEN 'ZV_DAT'.
IF i_step = 1 .
CLEAR l_s_range.
l_s_range-low = sy-datum.
l_s_range-opt = 'EQ'.
l_s_range-sign = 'I'.
APPEND l_s_range TO e_t_range.
ENDIF.
Thanks
Reddy -
Transaction Variant for Selection Screen
Hi, experts!
A question regarding transaction variants: Is it possible to create screen variants and transaction variants via SHD0 for selection screens? I' ve created a customer report with one selection screen including parameters and select options and would like to provide the users with a variant transaction for this.
Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported. And trying to create a transaction variant via SHD0 fails because values entered in the selection screen parameters and select options help screens are not saved and presented.
Any hints are more than welcome!
Regards,
ThomasYou wrote
Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
Regards,
Raymond -
Default value for selection screen field
Hi all,
I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
How can I do it?
Thanks
RahulHi Rahul,
In the INITIALIZATION event we can set the default values for selection screen fields.
INITIALIZATION.
loop at screen.
if screen-name = 'S_MATNR-LOW'.
CLEAR S_MATNR.
s_matnr-low = '1234'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr.
CLEAR S_MATNR.
s_matnr-high = '5678'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr
clear s_matnr.
endif.
endloop.
Hope it helps.
Mark if useful
Regards,
Saumya -
SELECTION SCREEN INPUTS FROZEN
Hi Guru's
I have prepared a web dynpro java application using standard bapi. I have used 'tray' under which selection fields and output table is created. However, after deployment selection screen input area becomes read only that is it freezes. Please help me asap.Hi,
You might be trying to display your output in the table.
1. Check that you have binded proper values to the table datasource.
2. Check the size of the node binded to the table.
You can write this line to know the size of the output node returned after executing the RFC.
wdComponentAPI.getMessageManager().reportSuccess(wdContext.node<nodename>().size()+"");
If the size is 0 that means that your BAPI is not returning anything.
Regards,
Murtuza
Maybe you are looking for
-
Jabber 9.2 for Windows contact add
Hi, I have installed Jabber 9.2 on few workstations and I can see some strange issue. When I try to add contact from outlook to the Jabber contact list it has no add button in the search bar and if I try to add contact by "New-Contact" it returns an
-
Why is my iPod Touch messing up the music library?
Hello, My iPod Touch is having weird issues with the Music library. I think it started in 5.0.1 but it may have been from 5.0, I'm not too sure about it. Problem description: My problem is that my Artist list is corrupt, and my Album list as well. Le
-
Runtime.exec() in Java not working in Oracle 10 Application Server
Hi , I am trying to call a .exe file which is in the Web Application folder . I am Using Process p = Runtime.exec("path to .exe file ") This code is working fine when used with JBOSS , but not working with Oracle Application server . Please tell me w
-
Photo Stream displays grey jpg icon on iPad
I have iMac, MBA, iPhone (4), and iPad (1). Photo Stream seems to be working as advertized, except on my iPad. When looking on iPad, in the Photo Stream tab, I see grey icons with a camera image, and "JPG". If I turn off photo stream, and turn it ba
-
i used the following in my code. compiles ok but give a Invalid Descriptor Index when i try to run this. why? isn't the index automatic? if not how can i get this index? while(res.next()) { tour = res.getString(1) + " TO " + res.getString(2); pls adv