Dynamic selections in LDB's
Hi Abapers,
I'm using LDB:; SDF - G/L Account database where im restricting few document types thru dynamic selection. I need to access dynamic selection - document type in End-of-selection of my program while selecting document header details. Can i read Dynamic values in my program?
DYN_SEL global variable. See [abap documentation|http://help.sap.com/abapdocu/en/ABAPSELECTION-SCREEN_LDB_DYNAMIC.htm] and [sap library|http://help.sap.com/saphelp_nw70/helpdata/EN/67/93b80914a911d2953c0000e8353423/frameset.htm]
Similar Messages
-
Hi,
I want to include two fields of custom infotype in dynamic selection of LDB so that they are handeled automatically by LDB while selection.
can anyone tell me how to achieve the same?
Thanks
-AleriaThankyou for the reply. However, can you plz tell me the step to followfor addition of fields after copying the LDB.
-Aleria -
Hello Guys,
I hope some of you will be using the LdB FMF and the many SAP reports that use FMF. It is in Funds Management, specifically for Public sectors.
There are some transactions for the program RFFMEPGAX. When any of these transactions or program is executed, the selection screen comes up with some PRE-DETERMINED NODES for dynamic selections. There are about 20+ nodes for FMF, but the dynamic selections are available only for 5 nodes.
I am not able to figure out where and how these nodes are restricted. I need to make few other fields available for dynamic selections. I hope some of you will be able to help me out.
Thank you all for your time.
PS: I am not sure, but think FMF is available only in Enterprise.The nodes for dynamic selection that are displayed are the nodes that the program is using. Try this simple program that uses LDB FMF:
REPORT zcdf_ldb_test.
TABLES: fkrs, ffnd.
WRITE: sy-datum.
I get dynamic selections for only these 2 tables. Keep adding tables and you get more nodes for dynamic selection. So when you see 5 nodes, the selection screen is trying to tell you that only those 5 tables are used by the program. Making more available that the program does not use would be misleading to the user.
You can use transaction SE36, and do a where used on LDB FMF to find other programs that use this LDB and execute them to see how the number of dynamic nodes changes.
In SE36, click on Selections to see all of the tables available for dynamic selection.
Is this the information your were looking for? -
Hi,
I am trying to use the LDB PSJ in one of my custom Reports,
We are interested only in the "Dynamic Selections" part of the LDB.
Right now the report works fine without any LDB assigned,but once the LDB is assigned,
the report code does not get executed. Am assuming the LDB is doing some check and exiting
without executing the report code.
The selection screen is not modified, i.e it still displays my custom Selection screen
and not one by the LDB.
Is there some way of disabling this selection or this check.
and also how do I go about programming to use the fields selected in the dynamic selection
for my select statments.
Am assuming will be able to get the fieldname once the user selects it ,and then will be able to us them
Appreciate any input
Thank u
LalithaHad u got the solution , i am facing the same problem
Thanks -
Values of dynamic selections for LDB DDF
Hi
I have to customize a SAP standard program which is using LDB-DDF. As per client requirement, we have to add a few select statement and there we have to add the selection criteria of dynamic selections.
The problem I am facing is that I dont know how and where i can track the values given in the dynamic selection screen.
I did some research and I found out that values entered in the dynamic selections is stored in complex data object (deep structure) but I am not able to find it where and how we can use it.
The name of the SAP standard program is RFDZIS00.
Thanks in advance
BhavHi,
In SE36-> DDF-> select the Selections radio button.
Menubar Extras->Selection Views-> Here you can change the "origin of view" which is created by SAP or we can create our own views under "origin of view" CUS.
Best Regards,
Mohan, -
Read Dynamic Selections for LDB ADA
Hi,
I have a report program using Logical Database ADA, but for performance reasons needed to include a wrapper program , so that the wrapper program schedules a job in case the report is run for huge volume comp codes.
Now the actual program uses the logical database ADA, which gives them the option of dynamic selections,So needed to add it to the wrapper also, since we they need to have the option to be able to enter conditions in Dynamic selections also. Now How do I pass the dynamic selections made in the wrapper to the actual program.Was planning to export the selection to memory and then import it.
I schedule the job or run it in foreground based on the selection made using the SUBMIT functionality.
Would be great if someone can let me know how to read the dynamic selections entered.
Thank you
LalithaHi,
You have to use SUBMIT statement with FREE SELECTIONS. Declare RSDS structure and fill them.
Just refer this block, similar type of code
Re: Reg: SUBMIT WITH Free Selections
Thanks & Regards
Bala Krishna -
Hi,
I am using logical database PSJ. I need to use dynamic selections for fields PROFIT CENTER,COST CENTER.
But not PROJECT,WBS ELEMENT ETC. For this u can run the transaction s_alr__87013573 .
Kindly help me immUse
Loop at screen.
if screen-name = 'XXX'.
screen-active = 1.
endif.
modify screen.
Endloop. -
Hi Friends,
I have a basic question. What is the use of dynamic selections in LDB?
Thanks in advance.
Regards,
nathan.Nathan,
SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE <node>.
If the node <node> is requested by the user of the logical databases, the dynamic selections are included in the selection screen. A user can then choose Dynamic selections to enter extra selections for the corresponding fields. If you call the logical database using the function module LDB_PROCESS, you can pass a corresponding parameter. You can use these selections in dynamic statements in the logical database program to read data. The values of the program-specific selection criteria that you defined for a node for which dynamic selections were available are also passed to the logical database. The user can also define the fields for dynamic selections as a selection view for the logical database.
The selection screen of a logical database is part of the standard selection screen (number 1000) of the executable program to which the logical database is attached. It has a standardized layout - the selection criteria and parameters appear on separate lines in the order in which they were declared. You can change the layout using the SELECTION-SCREEN statement.
The runtime environment generates the selection screen with number 1000 for every program in which the attributes do not contain a different selection screen version. You can prevent certain input fields from the selection screen of a logical database from appearing on the selection screen by defining selection screen versions with a screen number lower than 1000 in the selection include, and entering this version number in the program attributes. By pressing F4 there, you can get an overview of the selection screen versions defined in the logical database concerned. To define a selection screen version, use the statements SELECTION-SCREEN BEGIN|END OF VERSION. Within these statements you can use SELECTION-SCREEN EXCLUDE to specify fields that you do not want to appear on the selection screen.
If the attributes of an executable program contain the number of a selection screen version, the version is used in the standard selection screen. Although the input fields that you excluded from the selection screen are not displayed, the corresponding selections still exist, and you can still edit them in the program or by calling the function module LDB_PROCESS.
Pls. Mark if useful -
Join Table & Dynamic Selection
Hi Gurus,
I need to do a performance tuning on a bad response time program.
Therefore i use inner join to improve the response time, it works.
But my problem is the original program was using dynamic selection(with LDB), so i need to retain the same feature(i.e. dynamic selection) in new program.
I use FM 'FREE_SELECTIONS_INIT' & FM 'FREE_SELECTIONS_DIALOG' to let user entering dynamic selections.
How can the SELECT with JOIN be done with dynamic selection?
Thanks in advance.
Regards,
HikarunoHai ... here is the program for using the dynamic selection FM used .
REPORT zmodtab NO STANDARD PAGE HEADING.
TYPE-POOLS: rsds.
DATA: is_x030l TYPE x030l,
it_dfies TYPE TABLE OF dfies,
is_dfies TYPE dfies,
it_fdiff TYPE TABLE OF field_dif,
is_fdiff TYPE field_dif.
DATA: w_selid TYPE rsdynsel-selid,
it_tables TYPE TABLE OF rsdstabs,
is_tables TYPE rsdstabs,
it_fields TYPE TABLE OF rsdsfields,
it_expr TYPE rsds_texpr,
it_ranges TYPE rsds_trange,
it_where TYPE rsds_twhere,
is_where TYPE rsds_where,
w_active TYPE i.
DATA: it_content TYPE REF TO data,
it_modif TYPE REF TO data,
it_fcat TYPE lvc_t_fcat.
DATA: w_okcode TYPE sy-ucomm.
FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
<ntab> TYPE STANDARD TABLE.
* Macros
DEFINE table_error.
message e398(00) with 'Table' p_table &1.
END-OF-DEFINITION.
DEFINE fixed_val.
is_fdiff-fieldname = is_dfies-fieldname.
is_fdiff-fixed_val = &1.
is_fdiff-no_input = 'X'.
append is_fdiff to it_fdiff.
END-OF-DEFINITION.
* Selection screen
SELECTION-SCREEN: BEGIN OF BLOCK b01 WITH FRAME.
PARAMETERS: p_table TYPE tabname OBLIGATORY "table
MEMORY ID dtb
MATCHCODE OBJECT dd_dbtb_16.
SELECTION-SCREEN: BEGIN OF LINE,
PUSHBUTTON 33(20) selopt USER-COMMAND sel,
COMMENT 55(15) selcnt,
END OF LINE.
SELECTION-SCREEN: SKIP.
PARAMETERS: p_rows TYPE i. "rows
SELECTION-SCREEN: END OF BLOCK b01,
SKIP,
BEGIN OF BLOCK b02 WITH FRAME.
PARAMETERS: p_displ TYPE c AS CHECKBOX. "display
SELECTION-SCREEN: END OF BLOCK b02.
* Initialization
INITIALIZATION.
MOVE '@4G@ Filter records' TO selopt.
* PBO
AT SELECTION-SCREEN OUTPUT.
IF w_active IS INITIAL.
CLEAR: selcnt.
ELSE.
WRITE w_active TO selcnt LEFT-JUSTIFIED.
ENDIF.
* PAI
AT SELECTION-SCREEN.
IF p_table NE is_x030l-tabname.
CALL FUNCTION 'DDIF_NAMETAB_GET'
EXPORTING
tabname = p_table
IMPORTING
x030l_wa = is_x030l
TABLES
dfies_tab = it_dfies
EXCEPTIONS
OTHERS = 1.
IF is_x030l IS INITIAL.
table_error 'does not exist or is not active'.
ELSEIF is_x030l-tabtype NE 'T'.
table_error 'is not selectable'.
ELSEIF is_x030l-align NE 0.
table_error 'has alignment - cannot continue'.
ENDIF.
* Default values for system fields
REFRESH: it_fdiff.
is_fdiff-tabname = p_table.
LOOP AT it_dfies INTO is_dfies.
IF is_dfies-datatype = 'CLNT'.
fixed_val sy-mandt.
ELSEIF is_dfies-rollname = 'ERDAT'
OR is_dfies-rollname = 'ERSDA'
OR is_dfies-rollname = 'AEDAT'
OR is_dfies-rollname = 'LAEDA'.
fixed_val sy-datum.
ELSEIF is_dfies-rollname = 'ERTIM'
OR is_dfies-rollname = 'AETIM'.
fixed_val sy-uzeit.
ELSEIF is_dfies-rollname = 'ERNAM'
OR is_dfies-rollname = 'AENAM'.
fixed_val sy-uname.
ENDIF.
ENDLOOP.
* Prepare free selection on table
REFRESH it_tables.
is_tables-prim_tab = p_table.
APPEND is_tables TO it_tables.
CLEAR: w_selid.
ENDIF.
IF sy-ucomm = 'SEL'.
IF w_selid IS INITIAL.
* Init free selection dialog
CALL FUNCTION 'FREE_SELECTIONS_INIT'
EXPORTING
expressions = it_expr
IMPORTING
selection_id = w_selid
expressions = it_expr
TABLES
tables_tab = it_tables
EXCEPTIONS
OTHERS = 1.
ENDIF.
* Display free selection dialog
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
EXPORTING
selection_id = w_selid
title = 'Selection'
status = 1
as_window = 'X'
IMPORTING
expressions = it_expr
field_ranges = it_ranges
number_of_active_fields = w_active
TABLES
fields_tab = it_fields
EXCEPTIONS
OTHERS = 1.
ENDIF.
* Start of processing
START-OF-SELECTION.
PERFORM f_create_table USING p_table.
PERFORM f_select_table.
PERFORM f_display_table.
* FORM f_create_table *
FORM f_create_table USING in_tabname.
FIELD-SYMBOLS: <fcat> TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = in_tabname
CHANGING
ct_fieldcat = it_fcat
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
* Complete field catalog
LOOP AT it_fcat ASSIGNING <fcat>.
<fcat>-tabname = in_tabname.
ENDLOOP.
CALL FUNCTION 'LVC_FIELDCAT_COMPLETE'
CHANGING
ct_fieldcat = it_fcat
EXCEPTIONS
OTHERS = 1.
ELSE.
WRITE: 'Error building field catalog'.
STOP.
ENDIF.
* Create dynamic table for data
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fcat
IMPORTING
ep_table = it_content.
IF sy-subrc = 0.
ASSIGN it_content->* TO <itab>.
ELSE.
WRITE: 'Error creating internal table'.
STOP.
ENDIF.
* Create dynamic table for modif
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fcat
IMPORTING
ep_table = it_modif.
IF sy-subrc = 0.
ASSIGN it_modif->* TO <ntab>.
ELSE.
WRITE: 'Error creating internal table'.
STOP.
ENDIF.
ENDFORM.
* FORM f_select_table *
FORM f_select_table.
IF w_active = 0.
SELECT * FROM (p_table)
INTO CORRESPONDING FIELDS OF TABLE <itab>
UP TO p_rows ROWS.
ELSE.
* Selection with parameters
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_WHERE'
EXPORTING
field_ranges = it_ranges
IMPORTING
where_clauses = it_where.
READ TABLE it_where INTO is_where WITH KEY tablename = p_table.
SELECT * FROM (p_table)
INTO CORRESPONDING FIELDS OF TABLE <itab>
UP TO p_rows ROWS
WHERE (is_where-where_tab).
ENDIF.
IF sy-dbcnt = 0.
WRITE: 'No record selected'.
STOP.
ENDIF.
ENDFORM.
* FORM f_display_table *
FORM f_display_table.
DATA: l_answer TYPE c,
l_eflag TYPE c.
CLEAR: w_okcode.
REFRESH: <ntab>.
* Display table contents
CALL FUNCTION 'STC1_FULLSCREEN_TABLE_CONTROL'
EXPORTING
header = p_table
tabname = p_table
display_only = p_displ
endless = 'X'
no_button = space
IMPORTING
okcode = w_okcode
TABLES
nametab = it_dfies
table = <itab>
fielddif = it_fdiff
modif_table = <ntab>
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
IF p_displ IS INITIAL AND w_okcode = 'SAVE'.
* Confirm update
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = p_table
text_question = 'Do you want to update table ?'
default_button = '2'
display_cancel_button = ' '
IMPORTING
answer = l_answer
EXCEPTIONS
OTHERS = 1.
IF l_answer = '1'.
* Apply modifications
IF NOT <ntab>[] IS INITIAL.
PERFORM f_add_system USING space.
MODIFY (p_table) FROM TABLE <ntab>.
IF sy-subrc NE 0.
l_eflag = 'X'.
ENDIF.
ENDIF.
* Apply deletions
IF l_eflag IS INITIAL.
REFRESH: <ntab>.
CALL FUNCTION 'STC1_GET_DATA'
TABLES
deleted_data = <ntab>
EXCEPTIONS
OTHERS = 1.
IF NOT <ntab>[] IS INITIAL.
DELETE (p_table) FROM TABLE <ntab>.
IF sy-subrc NE 0.
ROLLBACK WORK.
l_eflag = 'X'.
ENDIF.
ENDIF.
ENDIF.
* Apply creations
IF l_eflag IS INITIAL.
REFRESH: <ntab>.
CALL FUNCTION 'STC1_GET_DATA'
TABLES
new_data = <ntab>
EXCEPTIONS
OTHERS = 1.
IF NOT <ntab>[] IS INITIAL.
PERFORM f_add_system USING 'X'.
INSERT (p_table) FROM TABLE <ntab>.
IF sy-subrc NE 0.
ROLLBACK WORK.
l_eflag = 'X'.
ENDIF.
ENDIF.
ENDIF.
IF l_eflag IS INITIAL.
COMMIT WORK.
MESSAGE s261(53).
ELSE.
MESSAGE s075(3i).
PERFORM f_select_table.
ENDIF.
ENDIF.
* Display table again
PERFORM f_display_table.
ENDIF.
ENDIF.
ENDFORM.
* FORM f_add_system *
FORM f_add_system USING new TYPE c.
FIELD-SYMBOLS: <irec> TYPE ANY,
<upd> TYPE ANY.
LOOP AT it_fdiff INTO is_fdiff.
READ TABLE it_dfies INTO is_dfies
WITH KEY fieldname = is_fdiff-fieldname.
LOOP AT <ntab> ASSIGNING <irec>.
ASSIGN COMPONENT is_fdiff-fieldname OF STRUCTURE <irec> TO <upd>.
IF is_dfies-datatype = 'CLNT'.
<upd> = sy-mandt.
ELSE.
CASE is_dfies-rollname.
WHEN 'AENAM'.
<upd> = sy-uname.
WHEN 'AEDAT' OR 'LAEDA'.
<upd> = sy-datum.
WHEN 'AETIM'.
<upd> = sy-uzeit.
WHEN OTHERS.
ENDCASE.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDFORM.
reward points if it is usefull......
Girish -
How to retrieve values from Dynamic Selection screen while using LDB - PSJ
I am having problem in PSJ Logical database. In a custom report which is using PSJ LDB, we are using PROJ and PRPS_R tables.
When I run program it displays one dynamic selection screen, there we are giving selection criteria for PRPS (Master data WBS element) - Created on (giving some range like 2011/01/01 to 2011/01/31).
So I want to display all WBS element which are created during the period (2011/01/01 - 2011/01/31).
How do I retrieve the select-option low and high value of the field Created on Of WBS element if we Select data from any table based on this condition.
Please help me.
Thanks.in fact you don't have to get the values, you only need to tell to the program to take them into account :
GET PRPS.
CHECK SELECT-OPTIONS. -
Adding new table dynamic selection screen of transaction FBL5N (LDB DDF).
Hi,
I have a requirement to add SEGMENT (CEPC-SEGMENT) field on the dynamic selection screen of transaction FBL5N (LDB DDF).
Please let me know how can I meet this requirement
ThanksI did not find any screen exits for this Tcode, may be you need to use enhancement spots.
-
Access field from dynamic selection screen of LDB in local program
I am using ldb PSJ in my program. I want to use input given in fields "Plant" and "Business Area" in my program and do some process based on input in this field. Both these fields come as part of dynamic selection. How can I access this field in my program?
Take a look at [Dynamic Selections in the Database Program|http://help.sap.com/saphelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/frameset.htm]
You may try to access this LDB program data via field-symbols and assign to (SAPDBPSJ)DYN_SEL.
> TYPE-POOLS rsds.
> DATA: l_dyn_sel TYPE rsds_type.
> FIELD-SYMBOLS: <fs> TYPE rsds_type.
> DATA: name(17) VALUE '(SAPDBPSJ)DYN_SEL'.
> ASSIGN (name) TO <fs>.
> l_dyn_sel = <fs>.
> UNASSIGN <fs>.
Regards -
Add field in dynamic selections to ME2A, to create aselection view in LDB
Hi all,
I would like to include in the search selection of ME2A the field 'Relevant for agency business', but this field doesn´t appear at the purchasing document . I´ve been reading that by the Logical database builder it is possible to do this, but I don´t manage how.
I've been trying (with transaction SE36) to copy from Source view - SAP to Target view - CUS for some logical database (for example LDB - ELM) and I havn't been success. I received Error "The selection view does not exist"
Which LDB should I choose? How to create a selection view STANDARD SAP ?
Thanks in advance
All RegardsDear Weiyang
kindly note that as per SAP note 310886 Only certain tables or fields are permitted
Permitted tables:
SKA1: all fields
SKB1: all fields
BSIS: all fields
no other table is allowed
so your field BKPF-CPUDT is not allowed in dynamic selection
Hope your query is solved
Cheers
IMK -
Working with dynamic selection screen in LDB FMF
Hi Guys,
I am working with LDB FMF and I have a requirement where user need the selection field in initial screen which is already comming in dynamic selection option.
Is it possible without changing the standerd LDB.
Atul
Edited by: Atul Dhariwal on Jun 16, 2009 6:27 AMHi,
my requirement is to list fields from dynamic selection to appear in the main selection screen.
user doesn't want's to click on dynamic selection option and select the fields.
I hope i am clear this time.
Atul -
How to default the Document Type in Dynamic selections linked with DDF LDB?
Hello all,
A report is associated with Logical database DDF. In the selection screen we have Dynamic selections screen in which Document type is one of the fields. As per the requirement, this field document type(BLART) needs to be filled by default on certain actions done by the user. To be more precise when user clicks on a particluar check box, then document type values from a customized table should appear in that parameter in dynamic selections.
Query here is I am not able to track the selection screen name for those dynamic fields. Can you please guide me in knowing the selection screen name for document type so that I can append values into it upon certain actions. I tried to check in the LDB 'DDF' but I could not get any apt information there.
Thanks in advance.
Chandra.Hi,
In the report event at selection-screen output, based on the user action you can do that try like below:
at selection-screen output.
if p_checkbox = 'X'. "Checkbox checked
s_blart-low = 'F'.
s_blart-option = 'EQ'.
s_blart-sign = 'I'.
append s_blart.
endif.
Regards,
Himanshu
Maybe you are looking for
-
My trackpad and keyboard randomly become unresponsive on MBP Retina
I just got my Macbook Pro with Retina a week ago. Its the newest model that just came out the week I got it. Its a 13 Inch. I noticed when I am using it, the trackpad and kayboard randomly become unresponsive for sometime. I have to close it and wait
-
Hi I am a complete novice and have just updated to Mavericks. My mail now repeatedly crashes as soon as it opens. The following message appears and I haven't a clue what to do. If youcan help please keep it simple Many thanks in anticipatio f a fix!
-
JUST WON'T WORK...I HAVE THE SOLUTION!!
I posted on this forum yesterday with a problem it seems that a lot of you are having. I did everything. But then I thought I did. Go to the following page of the apple support: http://docs.info.apple.com/article.html?artnum=61771 then click on the l
-
How to override limitation of no triggers on SYS owned tables?
Hi! I haven't got any answers to my earlier question so I try to make it simple now... Anybody have any ideas how I could override Oracles limitation of allowing no triggers on SYS owned tables? I would need a trigger on SYS.AUD$ that would fire and
-
HT4993 how do i de aouthoroze aanother computer if i dont have acesses to it
how do i deaothorize a itunes acount on another computer if i dont have acesse to it