A question about keeping screen field unchangable in selection screen
Hello Expert,
I have a program as below.
REPORT Z_TEST.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-i01.
SELECT-OPTIONS: s_kappl FOR a017-kappl DEFAULT 'M' NO INTERVALS.
SELECTION-SCREEN: END OF BLOCK b1.
INITIALIZATION.
LOOP AT SCREEN.
IF screen-name CS 'KAPPL'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
When I executed the report, the field for S_KAPPL is unchangable. This is as expected. But if I select one variant, the filed will change back to changable.
My question is how can I keep the field unchangable after I select variant?
Thanks in advance,
Regards, Johnny
Hello Johnny,
When you're creating the variant you've to mark the check-box "Protect field" as true.
This will make the field as output only.
BR,
Suhas
Similar Messages
-
Question about the MAKZN field in the RBKP table
Hello all.
I have a question about the MAKZN field. Does anyone know what field in MIRO is assigned to this field? We have an issue where a line item amount was not selected invoice was out of balance but the agent selected accept and post. And invoice posted. but I am interested in knowing where the amount if keyed in because when I go to the RBKP table I see an amount entered in the MAKZN (manually accept net difference amount)Hi,
it seems as if the value was calculated internally:
program SAPLMR1M
dynpro 6000
PAI module fcode_6000
Include LMR1MI3W
*-------- buchen ------------------------------------------------------*
WHEN fcobu OR fcomanak.
*--- identical code in PAI Module FCODE_6250 --------------------------*
PERFORM ota_check USING vf_kred-xcpdk rbkpv-xcpdd
CHANGING rc.
IF rc NE 0.
CLEAR ok-code.
EXIT.
ENDIF.
IF ok-code = fcomanak.
PERFORM diff_akzeptieren.
ok-code = fcobu.
ENDIF.
where:
fcomanak LIKE ok-code VALUE 'MANAK', " Manuell akzeptiert
*& Form DIFF_AKZEPTIEREN
* Differenz manuell akzeptieren
FORM diff_akzeptieren.
* Manuell akzeptierter Betrag
rbkpv-makzn = rbkpv-makzn + rbkpv-diffn.
rbkpv-makzmw = rbkpv-makzmw + rbkpv-diffmw.
* Differenzbeträge
CLEAR: rbkpv-diffn, rbkpv-diffmw.
ENDFORM. " DIFF_AKZEPTIEREN
maybe it´s happenning when releasing manually the invoice in MRBR?
Best regards. -
How to Add a new fields in the selection screen of LDB.
Hi All,
I want to add a new fields in the selection screen of LDB & then i need to select the data for that fields.
So could you please tell me for that where i need to add the code for selecting the data.
Thanks
RoliHi
welcome to SDN forum
If you are designing your own LDB with your own tables you can define tree structure and then the selection screen for the tables
if you wants to modify the std LDB of SAp means take the access key and to modify that code
if you add the extra field you have to modify the where conditions in the code also
see the doc
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
Less coding s required to retrieve data compared to normal internel tables.
Tables used LDB are in hierarchial structure.
Mainly we used LDBs in HR Abap Programming.
Where all tables are highly inter related so LDBs can optimize the performance there.
Check this Document. All abt LDB's
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Re: **LDB**
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Gothru the blog which provides info on LDB's:
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Sample code
TABLES: SPFLI,
SFLIGHT,
SBOOK,
SCARR.
START-OF-SELECTION.
GET SPFLI.
WRITE:/ SPFLI: , SPFLI-CARRID, SPFLI-CONNID,
SPFLI-AIRPFROM, SPFLI-AIRPTO.
GET SFLIGHT.
WRITE:/ SFLIGHT: , SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.
GET SBOOK.
WRITE:/ SBOOK: , SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.
GET SFLIGHT LATE.
WRITE:/ GET SFLIGHT LATE: , SFLIGHT-FLDATE.
Regards
anji -
Can you "combine" criteria for 2 or more fields on a Selection Screen?
Good day everyone,
Here's my question: I understand that I can put fields on a Selection Screen and pre-fill them with data values. In this particular case, I want to pre-fill a couple of hidden fields with data values that will be used as criteria when I read data from the database; however, I need to pull back records that have this COMBINATION of data. For example:
WERKS BTRTL
Z002 Z001
Z002 Z002
Z003 Z001
Z003 Z002
So in my SQL, if I say "werks IN s_werks" and "btrtl IN s_brtrl", true, it will still work. But really, I need to say "if werks = 'z002' and btrtl = 'z001', or werks = 'z002' and btrtl = 'z002', etc. I can't rely on the simple "IN" functionality because it's possible a new value could be added in the future:
WERKS BTRTL
Z003 Z003
So if I use the "IN" logic and the record has werks = 'Z002' and btrtl = 'Z003', it would be returned. But I really don't want it returned, since a combination of werks = 'Z002' and btrtl = 'Z003' doesn't exist in my table of valid combinations.
Is this even possible to do in a Selection Screen? Do I go ahead and populate the fields separately, use the "IN" functionality, then spin through my resulting internal table and delete anything that doesn't match my "table" of valid combinations? Do I skip putting these on a Selection Screen completely and check the values in my SQL statement?
Thanks in advance -- points, as always, will be given.Hi
Yuo can try to use FOR ALL ENTRIES option.
IF you have:
WERKS BTRTL
Z002 Z001
Z002 Z002
Z003 Z001
Z003 Z002
You should do something like that:
DATA: BEGIN OF <TAB_SEL> OCCURS 1,
WERKS TYPE WERKS,
BTRTL TYPE BTRTL,
END OF <TAB_SEL>.
WERKS BTRTL
<TAB_SEL>-WERKS = 'Z002'. <TAB_SEL>-BTRTL = 'Z001'.
APPEND <TAB_SEL>.
<TAB_SEL>-WERKS = 'Z002'. <TAB_SEL>-BTRTL = 'Z002'.
APPEND <TAB_SEL>.
<TAB_SEL>-WERKS = 'Z003'. <TAB_SEL>-BTRTL = 'Z001'.
APPEND <TAB_SEL>.
<TAB_SEL>-WERKS = 'Z003'. <TAB_SEL>-BTRTL = 'Z002'.
APPEND <TAB_SEL>.
SELECT * FROM <TABLE> INTO TABLE ITAB
FOR ALL ENTRIES IN <TAB_SEL>
WHERE WERKS = <TAB_SEL>-WERKS
AND BTRTL = <TAB_SEL>-BTRTL.
In this case you need to fill correctly the internal table <TAB_SEL> with the all combinations.
Max -
Add certain field at dynamic selection screen in FBL3N transaction
Hello Expert,
I would like to add entry date field (BKPF-CPUDT) at dynamic selection screen in FBL3N transaction.
So, I went to SE36 transaction and changed something in selection view for SDF.
However, it didn't work.
Is there anyone who knows how to add a certain field at dynamic selection screen in FBL3N transaction?
Thanks in advance.
BR,
Chris KimHi
Refer to the following thread
Additional field selections in FB03
It talks about adding Header Text field
You should be able to add entry date similarly
Regards
Sach!n -
Adding field in the selection-screen of a zprogram
hi gurus,
i have to add field in the selection-screen of oppurtunities. in database i have a field salesvalues, some of oppurtunity guids have this field value. first i need to add in selection-screen in this alv report. and fetch the data from ztable into required field . if the input fields of the salesvalues field id filled, then filter the global guids(from global table which had the guid values already) with this guids related to salesvalues. and if one single guid mathes to 2 values of salesvalues then concatenate 2 values with comma and display in single field. if select-options are blank then fetch all opportunity guids which have salesvalues. pls give solution.Hi Srini,
Thanks for your Reply
I have kept 01 against the field BSEG-AUGDT and selected the preselect check box also.
But still that field is not visible in the dynamic selection screen.
Thanks
Ajay.D -
Functional area(FKBER( field in the selection screen))
Hi,
I have a requirement to add functional area field in the selection screen for a report painter report. This report using library 1VK and table 'CCSS'. I added functional area field in the general data selection . After the execution of report with functional area field filled with value. report not giving any output. do i need to maintain any setting to achieve?
Regards,
PalaniHi,
How you have filled the values?
It is 16 CHAR long. -
Functional area(FKBER field in the selection screen of the report painter))
Hi,
I have a requirement to add functional area field in the selection screen for a report painter report. This report using library 1VK and table 'CCSS'. I added functional area field in the general data selection . After the execution of report with functional area field filled with value. report not giving any output. do i need to maintain any setting to achieve?
Regards,
Palani1. Call GR22 and click "Characteristics".
2. Check FKBER and assign a position number to it.
3. Save and close the library.
4. Call your report in GRR2 and you should now see FKBER as an available characteristic.
5. Use it in the General Data Selection or as a Lead Column, as per requirement.
Or,
1. Call GR21 and create a custom library. Provide a name and description and also provide a library you can copy from (scan for the best-fit library).
2. Now follow the steps 2 through 5 above to achieve your result.
Hope this helps.
Cheers. -
I need below fields at my selection screen.From which table we can find the
Sales Org > only one selection field
Division > only one selection field
Channel > from u2013 to fields
Sales Office Channel > from u2013 to fields
Sales Rep Channel > from u2013 to fields
User ID of the CSR Channel > from u2013 to fields
Customer Channel > from u2013 to fields
Material Channel > from u2013 to fields
Date: Channel > from u2013 to fields
I need these fields at my selection screen.From which tables I find these things.I need this logic also.I need help
-
Behaviour of radiobutton and mandatory fields in a selection screen
Hello all
In the selection screen in a report , I have one mandatory field F1 and 2 radio button p_val and p_prov. there's no relationship between p_prov, p_val & F1.
I have 2 others fields p_dom and p_seg which are active when I select p_val : they are also mandatory when selecting p_val.
p_prov is the default radiobutton so p_dom and p_seg are inactive when the screen appears
I have 2 problems :
1 - First I select p_val (the message for F1 as mandatory appears -> normal) so p_val appears selected but The 2 fields p_dom and p_seg are not active. I would like them to be active even I have not filled F1.
2- I fill F1then I select p_val, so p_dom and p_seg are active, I fill only p_dom but not p_seg : I select radio button p_prov (the message for p_seg as mandatory appears -> normal) : p_prov appears selected but I don't want it.
Thanks for your help.
below the code of selection screen with event at selection-screen output :
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_val RADIOBUTTON GROUP GR2 USER-COMMAND radio.
SELECTION-SCREEN COMMENT 4(37) text-132.
SELECTION-SCREEN END OF LINE.
PARAMETERS : p_dom TYPE GSBER OBLIGATORY MODIF ID SC1.
PARAMETERS : p_seg TYPE FB_SEGMENT OBLIGATORY MODIF ID SC1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_prov RADIOBUTTON GROUP GR2 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 4(37) text-133.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
IF p_prov = 'X'.
SCREEN-INPUT = '0'.
SCREEN-REQUIRED = '0'.
ENDIF.
IF p_val = 'X'.
SCREEN-INPUT = '1'.
SCREEN-REQUIRED = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.hello Jerome,
Here you go.
2 things to remember:
1. Remove the obligatory addition from all fields.
2. Remove the input required while changing the screen elements.
PARAMETER: f1 TYPE c LENGTH 10.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_val RADIOBUTTON GROUP gr2 USER-COMMAND radio.
SELECTION-SCREEN COMMENT 4(37) text-132.
SELECTION-SCREEN END OF LINE.
PARAMETERS : p_dom TYPE gsber MODIF ID sc1.
PARAMETERS : p_seg TYPE fb_segment MODIF ID sc1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_prov RADIOBUTTON GROUP gr2 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 4(37) text-133.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
IF p_prov = 'X'.
screen-input = '0'.
ENDIF.
IF p_val = 'X'.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
CHECK sy-ucomm <> 'RADIO'.
IF p_val = 'X'.
IF p_dom IS INITIAL OR p_seg IS INITIAL.
MESSAGE 'Fill Mandatory fields' TYPE 'E'.
ENDIF.
ENDIF.
IF f1 IS INITIAL.
MESSAGE 'Fill F1' TYPE 'E'.
ENDIF.
Thanks,
Jinesh. -
I have mapped the fields on the selection-screen to the BDC on transaction
I have mapped the fields on the selection-screen to the BDC on transaction F110.
When I am selecting a particular any value in select-option on the selection screen, it is giving some default value and the value given by me,for example:
Payment methods:C
but in BDC recording for F110 Payment methods:IEQC when the programs is running in foreground mode.
how can I rectify it?This is because payment methods may be a table and what you see IEQC is actually, I for include, EQ for equal and C as your payment method. This is standard structure for ranges or select-options. You can use variable-low which will give you only C.
-
Hiding and Unhiding Fields On The Selection Screen
Hi Guys/Dolls
I've managed to grey out and hide some fields on a selection screen within the AT SELECTION-SCREEN OUTPUT section but don't know how to re-instate them.
basically on initial entry of the screen some fields are hidden but once I enter some pre-requisite data I need to display them but in a greyed out manner.
I've done the first bit but don't know how to do the 2nd bit i.e re-display the fields.
Any help would be appreciated.
Many thanks in advance.
Raj
My code is as follows:-
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION POS_LOW.
PARAMETERS: begcalsh LIKE t549q-begda MODIF ID pe4.
SELECTION-SCREEN COMMENT (1) text-199 FOR FIELD endcalsh
MODIF ID pe4.
PARAMETERS: endcalsh LIKE t549q-endda MODIF ID pe4.
SELECTION-SCREEN POSITION POS_HIGH.
PARAMETERS: begrefsh LIKE t549q-begda MODIF ID pe5.
SELECTION-SCREEN COMMENT (1) text-199 FOR FIELD endrefsh
MODIF ID pe5.
PARAMETERS: endrefsh LIKE t549q-endda MODIF ID pe5.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
* Grey out the parameters.
PERFORM params_grey_in_out USING 'false' 'PE4'.
PERFORM params_grey_in_out USING 'false' 'PE5'.
* Hide the parameters.
PERFORM params_show_hide USING 'false' 'PE4'.
PERFORM params_show_hide USING 'false' 'PE5'.
AT SELECTION-SCREEN.
PERFORM params_show_hide USING 'true' 'PE4'.
PERFORM params_show_hide USING 'true' 'PE5'.
*& Form params_grey_in_out
FORM params_grey_in_out USING value(iv_triggering_param)
value(iv_screen_group).
*this form activates fields with MODIF ID = IV_SCREEN_GROUP
*if IV_TRIGGERING_PARAM eq TRUE and greys them out otherwise.
DATA lx_input LIKE screen-input.
IF iv_triggering_param EQ 'true'.
lx_input = 1.
ELSE.
lx_input = 0.
ENDIF.
LOOP AT SCREEN.
IF screen-group1 EQ iv_screen_group.
screen-input = lx_input.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM. " params_grey_in_out
*& Form params_show_hide
FORM params_show_hide USING value(iv_triggering_param)
value(iv_screen_group).
*this form displays fields with MODIF ID = IV_SCREEN_GROUP
*if IV_TRIGGERING_PARAM eq TRUE and hides them otherwise.
DATA lx_active LIKE screen-active. "(1) type n.
DATA lx_invisible LIKE screen-active. "(1) type n.
IF iv_triggering_param EQ 'true'.
lx_active = 1.
lx_invisible = 0.
ELSE.
lx_active = 0.
lx_invisible = 1.
ENDIF.
LOOP AT SCREEN.
IF screen-group1 EQ iv_screen_group.
screen-invisible = lx_invisible.
screen-active = lx_active.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM. " params_show_hidehi u use this logic
LOOP AT SCREEN.
IF screen-group1 = 'GR3'.
screen-active = 1.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'GR2'.
screen-invisible = 0.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF. -
Currency field on a selection screen of type 'DMBTR'.
Hello ABAPers,
Could you please tell me how to do it?
I have a currency field on a selection screen of type 'DMBTR'.
When i input and press the enter key ,i want the value to be displayed in the following style.
1. CURRENCY EQ 'JPY'
EX:
Value before pressing EnterKey = 123456
Value after pressing EnterKey = 123,456
i.c the value should be displayed without decimal point
2. CURRENCY NE 'JPY'
EX:
Value before pressing EnterKey = 123456
Value after pressing EnterKey = 123,456.00
i.c the value should be displayed with decimal point
Note:The above trick has already been done on a standard dynpro screen of Tr.Code FB60 and Field 'Amount'.
<removed_by_moderator>
Thanks and Regards,
Mohan
Edited by: Govindasamy Mohan on Oct 8, 2009 6:22 PM
Edited by: Julius Bussche on Oct 9, 2009 1:36 PMHi ABAP Lover,
Thanks a lot for your reply.
I had the same idea as yours like using data type 'P'.
But, the problem is that there is only one currency field on the screen .There is also a field of 'Company Code'.
Both fields are mandatory .
Hence,the requirement is to convert the currency value to the currency of the company code which is input .
The conversion should yield the following output on the screen after pressing the enter button.
1. When currency EQ 'JPY' , the value should be displayed without decimal point
2.When currency NE 'JPY' , the value should be displayed with decimal point
I am very sorry for not explaining you clearly in my first posting.
Thanks and Regards,
Mohan -
Maintaing a default value for a particular field in the selection screen
Hi all,
How to maintain a default value for a particular field in the Selection Screen of a Standard report
Regards
Ajay>
ajay babu wrote:
> Hi all,
>
> How to maintain a default value for a particular field in the Selection Screen of a Standard report
>
> Regards
> Ajay
Create a variant for your standard program and assign this variant to the field 'Start with variant' while creating transaction code for the standard program in the transaction 'SE93'.
Regards
Rajesh. -
Field in the selection screen as a select option with two default values
Hi All,
can anybody tell me how to put field in the selection screen with two defaul values.
for ex: selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
please reply ASAP. Its urgent.
Thanks in advance,
MadhuHi Madhu,
Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
s_ktokd-sign = 'I'.
s_ktokd-option = 'EQ'.
s_ktokd-low = 'Y001'.
append s_ktokd.
s_ktokd-low = 'Y005'.
append s_ktokd.
clear s_ktokd.
However, if you want to mention a range like all the values between these given two values to be considered then u may use,
select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
or
s_ktokd-sign = 'I'.
s_ktokd-option = 'BT'.
s_ktokd-low = 'Y001'.
s_ktokd-high = 'Y005'.
append s_ktokd.
Reward if helpful.
Maybe you are looking for
-
ITunes installed, but dosent open
I have installed the new iTunes 7.0 but the problem is it wont open. Theres no error, no sort of problem notification, I just double click on the icon like normal and the hour glass shows, but then nothing happens. Is there an installation glitch?? I
-
Store File as .xml using standalone="yes"
Hello i have a working scenario which creates an .xml from a purchase order. The encoding ist UTF-8. What i am missing is the standalone="yes" in the <xml-tag>. How can i get this optional attribute into my created xml? Help is greatly appreciated. T
-
Read Invoice Plan data in BADI impl "ME_PROCESS_PO_CUST" during PO creation
Hello All, We had implemented BADI "ME_PROCESS_PO_CUST", during the check & post methods I require to fetch the invoicing plan data for calculating the total value of purchase order. Because invoice plan is splitted just like an instalment for a peri
-
Scratch Disk Error for no reason
Recently I have been receiving the notification stating that my scratch disk is full on Photoshop Elements 11 and I can no longer save any of the images I have been working on. Currently on my Mac Book i have 384.99GB free of a 499GB hard drive. Read
-
Hello, When does the following status show up in the MONI? 1. Recorded 2. Recorded for outbound processing 3. scheduled Venkat.