Help for dynamic selection
Hello guy,
I want to dynamically search for the occurrence of certain words in each data record(each field) in each table. Below is my code
Parameters: p_tabname like dd02l-tabname.
SELECT * FROM dd02l
INTO TABLE itab
WHERE as4local = 'A'
AND tabname = p_tabname
LOOP AT itab INTO w_tab.
CREATE DATA ref_itab TYPE STANDARD TABLE OF (w_tab-tabname).
ASSIGN ref_itab->* TO <fs_itab>.
CREATE DATA ref_wa TYPE (w_tab-tabname).
ASSIGN ref_wa->* TO <fs_wa>.
SELECT * FROM (w_tab-tabname)
INTO CORRESPONDING FIELDS OF TABLE <fs_itab>.
DESCRIBE TABLE itab. "check if the table contains entries.
IF sy-tfill > 0.
LOOP AT <fs_itab> INTO <fs_wa>. " loop at each table that contains entries and search for the strings or characters
SEARCH <fs_wa> for 'bbbb_' and '3456*' and '8970*' and '2980*' "this is not working
* If any of the entries exist in a table, I would like to give out the table name, the field which contains this entry and the dataelement
* of the field that contain the entry
ENDLOOP.
ENDIF.
ENDLOOP.
Can some one please show me how to move forward to achieve this?
Thank you
Nadin
Thank you so much Micky. It works perfectly. I really much appreciate your help. I will award points.
Now I want to do some thing more. I want to output the data element and description,fieldname tabledescription for example. I know that the dataelement of a field and the description can be found in the TABLE dd04t OR FM: DDIF_FIELDINFO_GET but you need to know the exact position of the field element dynamically. My problem now is I want to get the table description of SPFLI from dd02t, all the dataelements and the descriptions of the field 'TOKYO' and perhaps AIRPTO 'KIX'. Have adjusted my code as follows but still have trouble: Could you please Micky or any body show me how to achieve this?
It is kind of tricky because the sy-tabix can be 2 but the TOKYO is at the 5th field. Thank you.
Parameters: p_tabname like dd02l-tabname default 'spfli'.
DATA: t_dd02l TYPE STANDARD TABLE OF dd02l.
DATA: t_dd03l TYPE STANDARD TABLE OF dd03l.
DATA: t_dfies TYPE STANDARD TABLE OF dfies.
DATA: ref_itab TYPE REF TO data.
DATA: ref_wa TYPE REF TO data.
DATA: ref_itab_temp TYPE REF TO data.
DATA: ref_wa_temp TYPE REF TO data.
DATA: w_dd02l TYPE dd02l.
DATA: w_dd03l TYPE dd03l.
DATA: w_dfies TYPE dfies.
DATA: w_string TYPE string.
DATA: w_fieldname TYPE string.
DATA: w_fieldnamestring TYPE string.
DATA: w_tabix TYPE sy-tabix.
DATA: w_dd02t TYPE dd02t.
DATA: w_dd04t TYPE dd04t.
DATA: w_datenelement TYPE rollname.
DATA: w_dfies_tmp TYPE dfies.
FIELD-SYMBOLS:
<fs_itab> TYPE ANY TABLE,
<fs_itab_temp> TYPE ANY TABLE,
<fs_wa_temp> TYPE ANY,
<fs_wa> TYPE ANY,
<component> TYPE ANY.
CLEAR t_dd02l.
SELECT * FROM dd02l
INTO TABLE t_dd02l
WHERE as4local = 'A'
AND tabclass = 'TRANSP'
AND tabname IN so_tab.
LOOP AT t_dd02l INTO w_dd02l.
CREATE DATA ref_itab TYPE STANDARD TABLE OF (w_dd02l-tabname).
ASSIGN ref_itab->* TO <fs_itab>.
ASSIGN ref_itab->* TO <fs_itab_temp>.
CREATE DATA ref_wa TYPE (w_dd02l-tabname).
ASSIGN ref_wa->* TO <fs_wa>.
ASSIGN ref_wa->* TO <fs_wa_temp>.
SELECT * FROM dd03l
INTO TABLE t_dd03l
WHERE tabname = w_dd02l-tabname
AND as4local = 'A'
AND datatype = 'CHAR'.
CLEAR: w_dd03l, w_fieldnamestring.
LOOP AT t_dd03l INTO w_dd03l.
CLEAR w_fieldname.
w_fieldname = w_dd03l-fieldname.
CONCATENATE w_fieldname w_fieldnamestring INTO
w_fieldnamestring SEPARATED BY space IN CHARACTER MODE.
ENDLOOP.
CREATE DATA ref_itab_temp TYPE STANDARD TABLE OF (w_dd03l-tabname).
ASSIGN ref_itab_temp->* TO <fs_itab_temp>.
CREATE DATA ref_wa_temp TYPE (w_dd03l-tabname).
ASSIGN ref_wa_temp->* TO <fs_wa_temp>.
SELECT (w_fieldnamestring) FROM (w_dd03l-tabname)
INTO CORRESPONDING FIELDS OF TABLE <fs_itab_temp>.
DESCRIBE TABLE <fs_itab_temp>.
IF sy-tfill > 0.
CLEAR w_tabix.
CLEAR w_nut.
LOOP AT <fs_itab_temp> INTO <fs_wa_temp>.
CLEAR w_longstring.
w_tabix = w_tabix + 1.
IF <fs_wa_temp> IS NOT INITIAL.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <fs_wa_temp> TO <component>.
CLEAR w_string.
IF sy-subrc <> 0.
EXIT.
ENDIF.
CLEAR: w_string.
IF NOT <component> IS INITIAL.
MOVE <component> TO w_string.
CONCATENATE w_string w_longstring INTO w_longstring
SEPARATED BY ';'.
IF w_string CS 'TOKYO'.
CLEAR w_dd02t.
SELECT SINGLE * FROM dd02t INTO w_dd02t
WHERE tabname = w_dd03l-tabname
AND ddlanguage = 'DE'.
CLEAR t_dfies.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = w_dd03l-tabname
TABLES
dfies_tab = t_dfies
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc = 0.
CLEAR w_dfies.
READ TABLE t_dfies INTO w_dfies
WITH KEY tabname = w_dd03l-tabname.
READ TABLE t_dfies INDEX w_tabix INTO w_dfies_tmp.
SELECT SINGLE * FROM dd04t INTO w_dd04t
WHERE rollname = w_dfies_tmp-rollname
AND ddlanguage = 'EN'
AND as4local = 'A'.
WRITE:/ w_dfies-tabname, w_dd02t-ddtext, w_string, w_dd04t-rollname, w_dd04t-ddtext, w_longstring.
ENDIF.
ENDIF.
ENDIF.
ENDDO.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
Edited by: nadin ram on Apr 11, 2008 7:06 PM
Similar Messages
-
Selection variable for dynamic selection in QE51n
Hi All,
I have a scenario were we have a repetitive Manufacturing and we create one insp. lot of origin 13 and keep creating insp. points for days, so my user wants the insp. points to be displayed only for the past 3 days based of the Date Insp. point identifier which is one of dynamic selection criteria under insp. points, I see with other transaction I can do selection variable on dates for dynamic selection fields but I cannot do that in QE51n, I can do the same in QE51 but not in QE51n, can some tell me if there is a OSS or other way to get this working.
I appreciate your help.
Thanks,Hi Srikant,
I think you can meet the requirement in QE51N also.
In the screen for QE51N :Result Recording Work list", Follow this Path,,,,,,,,,
Edit--->Dynamic Selection.
The system will pop-up new small window for "Dynamic selection for insp. lot and operation" here I there is one folder is available named "Inspection point " which is having the selection criteria "Inspection point", double click on it and enter the desired values.
Regards,
Shyamal -
Submit syntax for dynamic selections for T-code FAGLL03
Hi Experts,
My z report contains following fields in selction screen.
1 . G/ L account
2. Comapny code
3. posting date
4. Profit Center
5. layout
In my z report i used following syntax for passing selection screen values to standard program and getting data.
This is for T-code FAGLL03
SUBMIT FAGL_ACCOUNT_ITEMS_GL
WITH SD_SAKNR IN S_SAKNR
WITH SD_BUKRS IN S_BUKRS
WITH %%DYN001-LOW (Profit Center)
EXPORTING LIST TO MEMORY
AND RETURN.
The above syntax is not working for dynamic selection field ( Profit Center), entire Profit center data is fetching from standard program. I want to fetch profit center data based on my z report selection values .
Expect for profit center field , submit syntax is working.
kindly provide submit syntax for my above requirement .
Any suggestions from experts....
Edited by: PLP REDDY on Nov 25, 2009 8:59 AMIndeed it won't work. Instead of passing parameters one by one use
[SUIBMIT... WITH SELECTION-TABLE rspar|http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_SELSCREEN_PARAMETERS.htm#!ABAP_ADDITION_3@3@]
Here you add one line per parameter (field KIND = 'P' ) and multiple lines per select options (field KIND = 'S' ). For the latter you need also provide SIGN and OPTIONS, i.e SIGN = 'I' , OPTIONS = 'EQ'
The lin I gave you will explain it more.
Regards
Marcin -
F4 HELP FOR ONLY SELECTED FIELD VALUES
Hi,
I have to display the F4 help for the selection screen field parameter. From the ICON table, I need to display the field ID values. In the ICON table, I have lot of field values for the field ID, but I need to display only 3 field values into F4 help.(like say @07@, @08@, @0A@ only at the F4 help).
Thanks in advance.
Regards
Ramesh mavilla.Hi,
See the follwoing code example
REFRESH: I_DYNPREAD .
CLEAR : I_DYNPREAD .
I_DYNPREAD-FIELDNAME = 'P_KAPPL'.
APPEND I_DYNPREAD.
CLEAR I_DYNPREAD.
L_REPID = SY-REPID .
L_DYNNR = '1000' .
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = L_REPID
DYNUMB = L_DYNNR
TABLES
DYNPFIELDS = I_DYNPREAD.
IF SY-SUBRC EQ 0.
READ TABLE I_DYNPREAD INDEX 1.
P_KAPPL = I_DYNPREAD-FIELDVALUE.
ENDIF.
REFRESH: I_DYNPREAD .
CLEAR : I_DYNPREAD .
REFRESH: I_KSCHL.
TRANSLATE P_KAPPL TO UPPER CASE.
TRANSLATE P_KVEWE TO UPPER CASE.
SELECT KAPPL KVEWE KSCHL VTEXT FROM T685T
INTO CORRESPONDING FIELDS OF TABLE I_KSCHL
WHERE KAPPL = P_KAPPL
AND KVEWE = P_KVEWE
AND SPRAS = 'EN'.
IF SY-SUBRC <> 0.
MESSAGE E001(ZZ) WITH 'No Condition Type exist for Application'.
*p_kappl ' and Usage' p_kvewe.
ELSE.
REFRESH: I_FIELDS.
I_FIELDS-TABNAME = 'T685T'.
I_FIELDS-FIELDNAME = 'KAPPL'.
I_FIELDS-SELECTFLAG = ''.
APPEND I_FIELDS.
I_FIELDS-TABNAME = 'T685T'.
I_FIELDS-FIELDNAME = 'KVEWE'.
I_FIELDS-SELECTFLAG = ''.
APPEND I_FIELDS.
I_FIELDS-TABNAME = 'T685T'.
I_FIELDS-FIELDNAME = 'KSCHL'.
I_FIELDS-SELECTFLAG = 'X'.
APPEND I_FIELDS.
I_FIELDS-TABNAME = 'T685T'.
I_FIELDS-FIELDNAME = 'VTEXT'.
I_FIELDS-SELECTFLAG = ' '.
APPEND I_FIELDS.
CLEAR: V_SEL.
CALL FUNCTION 'HELP_VALUES_GET_NO_DD_NAME'
EXPORTING
CUCOL = 0
CUROW = 0
DISPLAY = ' '
SELECTFIELD = 'KSCHL'
TITEL = 'Cond Type'
IMPORTING
IND =
SELECT_VALUE = V_SEL
TABLES
FIELDS = I_FIELDS
FULL_TABLE = I_KSCHL
IF SY-SUBRC = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF. "SY-SUBRC.
And also go throw the link which it clears more about F4
Check the link below for creating collective search help
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee86446011d189700000e8322d00/content.htm
Check the ink below for creating elementary search help
http://help.sap.com/saphelp_erp2005/helpdata/en/cf/21ee5f446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/3d/e53642e2a3ab04e10000000a1550b0/content.htm
<b>Reward with points if helpful.</b>
Regards,
Vijay -
One search help for multiple select-options in webdynpro abap
Hi,
I need a way to use one search help for multiple select-options fields. My scenario is :
I have a table for keeping different organizational units' values of different systems. I have pasted some sample data from this table at the end of this mail. On the screen I want to have 1 select-options filed for werks, and 1 select-options filed for vkorg. (In fact I will have more org. unit fields...) In the beginning of my application the user will select sid.
If the user selects ADS as SID, when he opens search-help for the first org. unit (werks), he will see the records with SID: ADS, VARBL = $WERKS, LANGU = SY-LANGU.
If the user selects AGT as SID, when he opens search-help for the second org. unit (vkorg), he will see the records with SID: AGT, VARBL = $VKORG, LANGU = SY-LANGU.
I have created a search-help taking SIDD, VARBL and LANGU as import parameters; used field mapping and bound this search help to my table. I have created 2 context nodes : org1 and org2 having attributes SID, VARBL, VALUE, LANGU .
I have assigned related SID, VARBL and Langu values to these attributes at runtime as I needed. That way, if I use input field and reference to the related context attributes org1-value and org2-value2 accordingly, search help works well as I want.
However, when I use select-options field , I can not bind the field to the context data. I can give reference only to ddic structure. Is there any way to reference to a context attribute? I searched for this in SDN, but could find nothing.
I think I won't be able to use this way. What do you say?
As I read from forums maybe using OVS help will be suitable for me. But I have to use one search-help for all select-options fields. Do you know how I can determine the active select-options field and pass its name (for instance "werks" ) as parameter to this OVS search help. (Also I'll pass SID and LANGU.)
MY TABLE (ZBYYT080) CONTENTS:
SID VARBL VALUE LANGU VTEXT
ADS $WERKS 1 T Werk 0001
ADS $WERKS 11 T OZYAS GIDA URETIM YERI
ADS $WERKS 5501 T BOYA GEBZE FABRİKASI
ADS $WERKS 5502 T BOYA CIGLI FABRİKASI
AGT $WERKS 2301 T KAMLI DAMIZLIK
AGT $WERKS 9601 T PANAR DENIZ URETIM YERI
ADS $VKORG 22 T AA KİMYASALLAR
ADS $VKORG 8001 T İINSAAT BOYALARI
AGT $VKORG 6500 T DAMk St.Org
AGT $VKORG 5400 T PANAR St.Org.
I wish I'm clear enough..
I will be gald if someone answers me as soon as possible...
Thanks İn advance..
MERALHi,
Your ques is how to refer to a DDIC search help to refer to selection screen parameter ?
Am I right ?
If Yes, then in the interface IF_WD_SELECT_OPTIONS
method ADD_SELECTION_FIELD, ADD_PARAMETER_FIELD etc
have importing param like I_VALUE_HELP_TYPE and I_VALUE_HELP_ID, I_VALUE_HELP_MODE, I_VALUE_HELP_STRUCTURE
etc which may help you to link your create DDIC Search help to selection screen params.
this is just a clue from my side. I haven't tried it myself.
You can go to the where used list of this method and find some sample implementations which use these params.
Hope this helps.
Regards
Manas Dua -
F4 Help for the selection screen field
Hi Gurus,
I have to display F4 help for a selection screen field. i am using following code:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CODE'
dynpprog = lw_repid
dynpnr = sy-dynnr
VALUE_ORG = 'S'
TABLES
value_tab = gi_text
field_tab = li_fields_tab
return_tab = pi_return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
001 test
001 test1
but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
Please help me out.
Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.Sachin,
I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
REPORT zktest01 .
DATA :
BEGIN OF value_tab OCCURS 0,
field LIKE e070-trkorr,
text LIKE e07t-as4text,
END OF value_tab.
DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
PARAMETERS : p_field LIKE value_tab-field,
p_text LIKE value_tab-text. "NO-DISPLAY.
INITIALIZATION.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'FIELD'.
t_fldtab-langu = 'E'.
t_fldtab-position = 1.
t_fldtab-offset = 0.
t_fldtab-fieldtext = 'Key'.
t_fldtab-reptext = 'Key'.
t_fldtab-leng = 20.
t_fldtab-intlen = 20.
t_fldtab-outputlen = 20.
t_fldtab-datatype = 'CHAR'.
t_fldtab-inttype = 'C'.
t_fldtab-headlen = 20.
t_fldtab-keyflag = 'X'.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'TEXT'.
t_fldtab-position = 2.
t_fldtab-offset = 20.
t_fldtab-fieldtext = 'Text'.
t_fldtab-reptext = 'Text'.
t_fldtab-leng = 60.
t_fldtab-intlen = 60.
t_fldtab-outputlen = 60.
t_fldtab-headlen = 60.
t_fldtab-keyflag = ' '.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
value_tab-field = '101'.
value_tab-text = 'dddd'.
APPEND value_tab.
value_tab-field = '202'.
value_tab-text = 'aaaa'.
APPEND value_tab.
t_dynmap-fldname = 'FIELD'.
t_dynmap-dyfldname = 'P_FIELD'.
APPEND t_dynmap.
t_dynmap-fldname = 'TEXT'.
t_dynmap-dyfldname = 'P_TEXT'.
APPEND t_dynmap.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FIELD'
dynpprog = 'ZKTEST01'
dynpnr = '1000'
dynprofield = 'P_FIELD'
value_org = 'S'
TABLES
field_tab = t_fldtab
value_tab = value_tab
return_tab = t_rettab
dynpfld_mapping = t_dynmap
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
ENDIF.
START-OF-SELECTION.
Jeffrey Satriadi -
Search help for PERNR select options in Webdynpro
Hi,
I am using the method: lv_r_helper_class->add_selection_field
and passing the value:
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
to get search help for pernr select option in the webdynpro application.
But can anyone please tell me what value i have to pass to
i_value_help_id = ??hi,
pass your search help name there so that your desired search help ll come there..
use this,
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
i_value_help_id = 'SEARCHHELPNAME'
if you want standard SH means comment this stmt,
if you dont want SH means,
use tis,
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_NONE
hope this helps,
Mathan R. -
FAGLL03 : Submit syntax for dynamic selections
Hi Experts,
My z report contains following fields in selction screen.
1 . G/ L account
2. Comapny code
3. posting date
4. document type
5. layout
In my z report i used following syntax for passing selection screen values to standard program and getting data.
SUBMIT FAGL_ACCOUNT_ITEMS_GL
WITH SD_SAKNR IN S_SAKNR
WITH SD_BUKRS IN S_BUKRS
WITH X_OPSEL EQ ' '
WITH X_CLSEL EQ ' '
WITH X_AISEL EQ 'X'
WITH SO_BUDAT IN S_BUDAT
WITH PA_VARI EQ P_VAR
EXPORTING LIST TO MEMORY
AND RETURN.
The above syntax is not working for dynamic selection field ( document type ), entire document types data is fetching from standard program. I want to fetch document type data based on my z report selection values for document type field.
Expect for document type field , submit syntax is working.
kindly provide submit syntax for my above requirement .
Any suggestions from experts....
thanks & regards,
Hari priya
Edited by: Hari Priya on Aug 24, 2009 4:33 PMHi,
Try like this.
call function 'RS_REFRESH_FROM_SELECTOPTIONS'
exporting
curr_report = 'FAGL_ACCOUNT_ITEMS_GL'
tables
selection_table = i_sel[].
Fill your profit center values in i_sel
Submit FAGL_ACCOUNT_ITEMS_GL with selection-table i_sel and return
WITH FREE SELECTIONS TEXPR AND RETURN
Regards,
Shamma -
How to add Document group in t code S_ALR_87012082 for dynamic selection.
Hi Gurus,
I Need to add Document group in t code S_ALR_87012082 for dynamic selection.
Currently here two groups are showing , Vender and Comp Code. i need to add Document group there. Kindly guide me in this.
Thanks in advance.Hi
Pls follow below report
*S_ALR_87012103 - List of Vendor Line Items *
In dynamic selections you can find Document number, there you can give the range
Reg
Vishnu -
Can we create serach help for a selection screen field
Can we create serach help for a selection screen field with out creating searchhelp object.
I mean is it possible to create serchelp in the program itself with some specific values i want to give.
E.g say we can define any internal table and fill it with values and using that into selection screen fields
Regards
MaveAT SELECTION-SCREEN ON VALUE-REQUEST FOR paymeth.
PERFORM PAYMENT_HELP.
FORM PAYMENT_HELP.
DATA: begin of DESCR_TAB occurs 0,
DESCR LIKE BKPF-BKTXT,
END OF DESCR_TAB.
DATA: gd_repid like sy-repid.
gd_repid = sy-repid.
DESCR_TAB-DESCR = 'aaaaa'.
append DESCR_TAB.
DESCR_TAB-DESCR = 'bbbbb'.
append DESCR_TAB.
DESCR_TAB-DESCR = 'ccccc'.
append DESCR_TAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'DESCR'
DYNPPROG = gd_repid
DYNPNR = '1000'
DYNPROFIELD = 'paymeth'
VALUE_ORG = 'S'
DISPLAY = ' '
TABLES
value_tab = DESCR_TAB.
endform.
Svetlin -
Search help for a select options
Hi ,
I need to place a search help for a select-options field on my report selection screen. It should work for a z-table field . I can create a search help for the Z-table field , but I do not know how to make it available for the select-options.
Thank you .hi Krish,
SELECT OPTIONS ... MATCHCODE OBJECT name_of_search_help.
hope this helps
ec -
F4 help for a selection screen parameter with filename created dynamically
Hi All,
I have a requirement where in an F4 help should be present for a selection screen parameter. After selecting the filepath and clicking OK button on the Dialog, the filename should be dynamically get created in the selection screen parameter field. For example:
if the path is D:\DOCS then at the end of DOCS the filename should automatically get populated.
Like below string:
D:\DOCS\new.txt
Is there any function module or method which does this kind of activity.
Thanks in advance,
Deepakthis code will help:
FORM get_filename CHANGING p_filename.
DATA : lv_filename TYPE string,
lv_rc TYPE i,
li_filetable TYPE filetable.
CONSTANTS : lc_fname TYPE string VALUE 'ZRPP4000.XLS',
lc_fpath TYPE string VALUE 'C:\',
lc_extn TYPE string VALUE 'XLS'.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
default_filename = lc_fname
initial_directory = lc_fpath
default_extension = lc_extn
CHANGING
file_table = li_filetable
rc = lv_rc
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
OTHERS = 5.
IF sy-subrc = 0 .
READ TABLE li_filetable INTO lv_filename INDEX 1.
IF sy-subrc = 0.
p_filename = lv_filename.
ENDIF.
ENDIF.
REFRESH li_filetable.
CLEAR:lv_filename.
ENDFORM. "get_filename
" p_filename is selection screen parameter -
Addition of field for Dynamic Selection in TCode FBL1N
Hi,
We have a requirement to add the field Partner Bank Type in TCode FBL1N on clicking dynamic selection button (under vendor master) in TCode FBL1N. To achieve this we went to TCode SE36 (Logical database) and selected logical databse KDF and then seleted selection views from the extras menu. There we have selected the table LFBK and then entered 01 (function group for Vendor Master) in the box next to the field BVTYP and selected the checbox on the right of BVTYP to enable Preselection. Saved the changes.
However the field Partner Bank Type does not show in the dynamic selection in TCode FBL1N under Vendor Master. Please help.
Thanks in advance.
MickThanks Miguel.
I found this on the web:
http://joyjitghosh.blogspot.com/2009/05/how-to-add-new-fields-in-dynamic.html
I have done exactly as per the instructions given in the above link, but still I am unable to see the field in the dynamic selections of TCode FBL1N. Any reason why and how can we add the field in the dynamic selections?
Mick -
Input help for a selection screen field
I have a selection screen with field species and checkoff activity .
For a given species('sc','sb' or 'ss') , the input values allowed for the
check off activity must be 'SCCK' for species 'SC' ,'SBCK' for species 'SB' and so on.
I need to provide input help for check off activity based on the value of the species.How do i do that?PARAMETER : p_val(10) TYPE c ,
p_val2(10) TYPE c.
AT SELECTION-SCREEN on p_val.
IF p_val = 'SC'.
p_val2 = 'SCCK'.
ENDIF. -
How to add Business area in t code S_ALR_87012082 for dynamic selection.
Hi Gurus,
I need to add Business area field in T-code S_ALR_87012082.
On choosing dynamic selection, i found that Business area is not there.
Can any one please tell me how can i add Business area field over there.
Thanks in advance.Please check following SAP notes for this.
188663 and 832997 and 310886
Maybe you are looking for
-
When i click on general settings, the software update does not seem to come up? It wont let me download any apps. I Want to download i0s 5 i have ipod touch 3rd gen
-
ID Panels pref auto collapse deletes extra pages
Hi all - ID 5.0.2 on 10.5.3. Today I tried turning on auto collapse in the Interface->panels prefs. Later, when trying to delete a single page, I found that it would delete a spread instead. This would only happen if there were objects on the page, a
-
HT204088 Why is App Store saying a purchase has gone wrong
Whenever I log in to the App Store it pops up saying "A purchase has gone wrong" but I havnt purchased anything. Now I can't download anything atall
-
Hi, I'm attempting to make our ASA log urls and I am getting some success. However, the output presents the IP instead of the actual domain, e.g, when browsing to imdb it is logged as: Nov 16 2009 14:12:35: %ASA-5-304001: 30.30.30.30 Accessed URL 209
-
Help Pls Table is not getting created
Hi, DECLARE CURSOR c IS SELECT * FROM emp; v_count NUMBER; BEGIN BEGIN SELECT COUNT (*) INTO V_COUNT FROM all_tables WHERE table_name = 'EMP_BKP'; IF V_COUNT = 0 THEN EXECUTE IMMEDI