Problem with OOPS ALv-field editable
hi experts,
I am displaying one report using OOPS ALV. Now i am inserting a line in the output, so some mandatory fields are automatically filled up in the new line, and i am trying to fill new values for the remaining empty fields, So initially they are non-editable in the fieldcatalog.if i click on the 'INSERT LINE' button then only the fields shud be input enabled, how to do this.
Thanks in advance,
maybe sample report BCALV_EDIT_04 might help you there.
Similar Messages
-
Problem with the quantity field
hi every one
i am facing a problem with the quantity field (vbap-kwmeng)
as per my requirement i need to display this quantity field along with some other item fields from VBAP in an alv grid.
among all the fields displayed in the alv grid only this quantity field is editable(end user can change this quantity)
once end user changes this quantity and press save button i need to capture this new quantity in my internaltable.
problem is input of length of quantity is 15 and the output length is 19
so when i am pressing save
say my quantity is 50 when i am pressing save '0.050' is coming because of the length difference
how can i capture the original changed value.
vamsiwhat about define two fields in you inner table ,one as char and the other as vbap-kwmeng, you can show the char one in the ALV gird , when user input value and press SAVE ,you can move the value to vbap-kwmeng.
you can test it,mybe some one has one better idea. -
Problem with printing ALV lists
Hey Guys,
I have a problem with printing ALV lists ,
I created a report with several ALV lists (not grids) on the same screen but when i attempt to print the report
it prints each alv list on a different page..so if i have 3 alv lists in the same report it will print the report on 3 pages
How can i print them all in one page?
Thanks in advance
Noha Salah.Hey Max,
I tried setting the Layout-list_append before my block_list_append function call
And setting the is_print-NO_NEW_PAGE , it printed the 3 lists on one page the only problem i have
is that the lists are truncated and the list formats has totally been messed up..how can i restore them back
to their original format? -
Problem with a Dynpro field (type numc)
hi everybody.
I'm developping a ModulPool application in wich i have 2 RadioButtons with 2 textbox fields.
What i pretend to do is, when the user clicks a radiobutton and strikes Intro, enable the corresponding textbox field and disable the other one.
My code runs fine, but i have a little problem. When I loop the screen table, to set the appropiate value to the 'input' property, in this case, when i try to disable it (input = '0'), I get a zero character in that field. This field has NUMC type, i'm sure this is the problem
'cos i've got no problem with the other field (type char). But i can't solve it.
Anybody's got an idea?
ThanksWhat you are seeing is the normal behavior of a numeric field represented by the SAPgui. This is how all numeric fields are displayed via SAPgui. If you don't want to see the 0, then you just change the field type to CHAR and handle accordingly.
Regards,
Rich Heilman -
Problem with adding new field to the mass change screen in FBL5N
Hi,
We have a problem with adding the field XREF3 to the mass change screen. We followed steps described in the SAP Note 640908, but the result is that when we try to mass change some documents in FBL5N and enter some values in the mass change screen, a message appears: "Please enter at least one new value" and nothing is changed.
If you have faced with such a problem, we would be grateful if you give us some tips.
Regards,
Miłosz WłodarczykThe problem has been resolved: we didn't activate a code in SE80.
-
Alv grid filter problem with oops display
HI experts ,
i am using o_alv->set_table_for_first_display
for displaying the data in the grid ,
i have a problem in filter for fields, when i am selecting any field for filtering , then size of that field becomes less then the orignal size , even search help on that field is shoun only 4 characters of dat fields.
ex: Bulding (field in alv) is a 9 character field but in filter when we select f4 help then it shows only first four characters, plz tell me the solution.Hi Rahul
Try using output length in field catalogue for those fields. It may solve ur problem.
Venkat -
Problem with non currency field calculations to become curr
Hi guys,
Is there a problem if I have a QUAN field and DEC field forming to become a CURR field? I mean a have this computation below:
v_var1 = v_var2 * v_var3.
where v_var1 type QUAN, v_var2 type DEC and v_var3 type CURR...
would it incur any problem with the calculations?
Thanks!Hi,
Did you try ?
Worked for me flawlessly
tables bseg.
parameters : qty like bseg-menge,
amt like bseg-dmbtr.
data : result like bseg-dmbtr.
result = qty * amt.
write result.
The only issue is that the result will be rounded upto 2 decimals.
But if you declare result as
data : result(13) type p decimals 3.
Then there will be no issues.
regards,
Advait
Edited by: Advait Gode on Oct 3, 2008 3:59 PM -
Mapping Problem with 2 ALV Tables after sorting
Hi,
I have a context node INCIDENTS with a sub-node SUB_INCIDENTS.
The sub-node is filled via a Supply Function.
Both nodes are displayed in separate ALV Grids on the same view, which works pretty well.
The only problem I face is when I try to sort one of the ALVs, then I get an error "The node specified in mapping ( SUB_INCIDENTS) could not be found ".
I have no clue how to solve that, already tried to fill the sub-node with the ALV standard function "ON_STD_FUNCTION_AFTE", no effect.
Does anybody can imagine what might be the reason?
Best regards, Steffen
Edited by: Steffen Weber on Aug 27, 2008 2:55 PMIn general, having two ALVs for parent and then a sub node is not supported. Here is a section from the online help that describes what happens when a sort occurs on the parent node in ALV:
Important Exception: Sorting
Here ALV has to use the entire dataset so that the data records can be arranged in the new order. For this purpose, the ALV component temporarily takes control of the internal data table and invalidates the corresponding context node of your application during this time. This ensures that the application cannot access the context node while the ALV component is editing the internal data table.
Once the internal data table has been resorted, ALV rebuilds the context node, releases it again for the application, and displays the data accordingly.
This ensures that the internal data table is never copied. This is important because large volumes of data would considerably impact performance and memory space.
When you are planning your application, note the following side-effects of this mechanism:
● When the context node is invalidated, information about current selections, and in particular the lead selection, is lost.
● If your application has created subnodes for the context node, (master-detail scenario), these subnodes are lost as soon as the ALV component invalidates the context node. If the application then tries to access the subnodes, a runtime error occurs.
Because of the invalidation that is described here, the subnode leadselection is lost and is invalidated as well. This leads to the error you are encountering. -
Problem with printing ALV - repetitive page breaks
Hi,
I have a problem with ALV during printing or print preview. First, let me describe the situation. My requirement was to have a page break for every Material Number. This was working fine already. However, the user had a change of heart and decided he didn't want to have a page break for every material. Now, they wanted only one page for all materials.
I thought this was easy to do since I only needed to comment out the SORT (and all codes related to SORT) table that was used to create the page-break. Thing is, it's not working anymore. Although I was able to display one table only, the old page breaks still appear! For example, if there were 7 materials before, therefore, 7 page breaks with 7 blocks of internal tables. Now, only 1 full internal table is displayed while the other 6 are empty! Please help me how to get rid of the other tables or page breaks.
I hope this is clear. Thanks. I appreciate all the help I can get.Amit,
Using sort option.
Do one thing. Just create one ALV program with SORT options anf GROUP = '*'.
Now go to output and save the Variant. Print the report.
with out sort option and variant.
Now come back and Delete the sort options , activate the code.
And see the output. Choose the variant which you created beofre. and print the report.
See both the case. it triggeres the same output. you just copy paste it and un comment the commented sort code
Just test with this code,
REPORT zalv_total_sub.
TYPE-POOLS: slis.
INCLUDE <icon>.
DATA: layout TYPE slis_layout_alv .
DATA: BEGIN OF it_flight OCCURS 0,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
seatsmax LIKE sflight-seatsmax,
seatsocc LIKE sflight-seatsocc,
END OF it_flight.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fcat LIKE LINE OF it_fieldcat.
DATA: it_sort TYPE slis_t_sortinfo_alv,
wa_sort LIKE LINE OF it_sort.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'IT_FLIGHT'
i_inclname = sy-repid
CHANGING
ct_fieldcat = it_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE it_flight
wa_fcat-do_sum = 'X'.
MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
WHERE fieldname = 'SEATSOCC' .
CLEAR wa_fcat.
*wa_sort-fieldname = 'CONNID'.
*wa_sort-up = 'X'.
*wa_sort-group = '*'.
*wa_sort-subtot = 'X'.
*APPEND wa_sort TO it_sort.
*CLEAR wa_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_save = 'X'
i_callback_user_command = 'USER_COMMAND'
is_layout = layout
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1. -
Problem with Update Text fields in Infoset
Hi experts,
Here i would like to rephrase the question. Normaly while working with Infosets, when press "update text fields" button, those fields having text is updated. But one of my field is not updated. I need some help from you for that.
One more question i've that my field is having check table so i would like to know how exactly the text field is updated.
scenario.
Customized IT9320 has field prt_pos added. This field is having check table T528B. But i want text field to be attached is IT1000-STEXT.
How this can be done, because i suspect that just using check table field IT1000-STEXT is not attached to IT9320-prt_pos.
Please help. I'm really got stuck here.
Thanks a lot,
Toral.
Hi,
I'm working on customised Infotype. I need to add one new customised field ie Present Position. This field has number as well as text associated with it. There is a check table attached with this field so that text can be displayed alongwith number.
I need this field in SAP/Adhoc query. But when i go to SQ02 this fields shows only value. Text is disabled for this field. I'm not sure why is it so.
I looked into other infotype which as one field using same data element, and that field shows both value as well as text. Please help me to rectify this issue for present position field.
Thanks,
Toral.
Edited by: Toral Sheth on Jul 4, 2008 2:01 PMYou would be much better off with one multi-line form field.
There are many problems with trying to determine when one is at the end of the display field with text entry. -
Hi,
Please help me,
I need to make a ALV report, which is having one field editable.
I want a code , when i will give input in editable field in ALV report , it should be save in my internal table.
Please give me a sample program ,
like take a internal table with two field. whose one field will editable.when user will give input in editable field it should save in internal table in same row like ALV list.
Thanks,
AbhishekThe follow program demonstrates how to make individual fields of an ALV grid editable (NetPR greater than 10).
Changes required from a basic ALV grid include adding a new field to ALV grid data table(it_ekko), Populating this
field with style attribute and adding an entry to layout control table.
*& Report ZDEMO_ALVGRID_EDIT *
*& Example of a simple ALV Grid Report *
*& The basic ALV grid, Enhanced to display specific fields as *
*& editable depending on field value *
REPORT ZDEMO_ALVGRID_EDIT .
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
field_style TYPE lvc_t_styl, "FOR DISABLE
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: it_fieldcat TYPE lvc_t_fcat, "slis_t_fieldcat_alv WITH HEADER LINE,
wa_fieldcat TYPE lvc_s_fcat,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE lvc_s_layo, "slis_layout_alv,
gd_repid LIKE sy-repid.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM set_specific_field_attributes.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
wa_fieldcat-fieldname = 'EBELN'.
wa_fieldcat-scrtext_m = 'Purchase Order'.
wa_fieldcat-col_pos = 0.
wa_fieldcat-outputlen = 10.
wa_fieldcat-emphasize = 'X'.
wa_fieldcat-key = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'EBELP'.
wa_fieldcat-scrtext_m = 'PO Item'.
wa_fieldcat-col_pos = 1.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'STATU'.
wa_fieldcat-scrtext_m = 'Status'.
wa_fieldcat-col_pos = 2.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'AEDAT'.
wa_fieldcat-scrtext_m = 'Item change date'.
wa_fieldcat-col_pos = 3.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-scrtext_m = 'Material Number'.
wa_fieldcat-col_pos = 4.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MENGE'.
wa_fieldcat-scrtext_m = 'PO quantity'.
wa_fieldcat-col_pos = 5.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MEINS'.
wa_fieldcat-scrtext_m = 'Order Unit'.
wa_fieldcat-col_pos = 6.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'NETPR'.
wa_fieldcat-scrtext_m = 'Net Price'.
wa_fieldcat-edit = 'X'. "sets whole column to be editable
wa_fieldcat-col_pos = 7.
wa_fieldcat-outputlen = 15.
wa_fieldcat-datatype = 'CURR'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'PEINH'.
wa_fieldcat-scrtext_m = 'Price Unit'.
wa_fieldcat-col_pos = 8.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
FORM build_layout.
Set layout field for field attributes(i.e. input/output)
gd_layout-stylefname = 'FIELD_STYLE'.
gd_layout-zebra = 'X'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
is_layout_lvc = gd_layout
it_fieldcat_lvc = it_fieldcat
i_save = 'X'
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
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. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
*& Form set_specific_field_attributes
populate FIELD_STYLE table with specific field attributes
form set_specific_field_attributes .
DATA ls_stylerow TYPE lvc_s_styl .
DATA lt_styletab TYPE lvc_t_styl .
Populate style variable (FIELD_STYLE) with style properties
The NETPR field/column has been set to editable in the fieldcatalog...
The following code sets it to be disabled(display only) if 'NETPR'
is gt than 10.
LOOP AT it_ekko INTO wa_ekko.
IF wa_ekko-netpr GT 10.
ls_stylerow-fieldname = 'NETPR' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
"set field to disabled
APPEND ls_stylerow TO wa_ekko-field_style.
MODIFY it_ekko FROM wa_ekko.
ENDIF.
ENDLOOP.
endform. " set_specific_field_attributes
hope this helps
reward if useful
Edited by: Richa Khosla on Mar 25, 2008 1:30 PM -
Problem with select max(FIELD)
I have a table with the following fields:
PARTID ART_TYP AEC SERVICE PLANT STATUS
4711 A A 2 P 230
4711 A B 0 P 230
4712 A B 2 P 230
4713 A B 0 P 230
I need a sqlscript where I get the records with MAX(SERVICE)
In this example
4711 A A 2 P 230
4712 A B 2 P 230
4713 A B 0 P 230
I tried this with:
select distinct partid,
art_typ,
aec,
max(service),
plant,
status
from t_msltmp
group by partid,art_typ,aec,plant,status
But I get both records of partid=4711
Can someone help me with this problem
kind regards
Menk SlotROW_NUMBER() requires explicit ORDER BY clause in OVER:
http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/functions105a.htm#86312
SQL> select partid, art_typ, aec, mx, plant, status
2 from(select partid,
3 art_typ,
4 aec,
5 max(service) over (partition by partid) mx,
6 row_number() over (partition by partid order by service desc) rn
7 plant,
8 status
9 from t_t)
10 where rn = 1
11 /
PARTID A A MX P STATUS
4711 A A 2 P 230
4712 A B 2 P 230
4713 A B 0 P 230Rgds.
P.S.
Another way to get this (more tedoius):
SQL> select partid,
2 max(art_typ) keep (dense_rank first order by service desc) art_typ,
3 max(aec) keep (dense_rank first order by service desc) aec,
4 max(service) service,
5 max(plant) keep (dense_rank first order by service desc) plant,
6 max(status) keep (dense_rank first order by service desc) status
7 from t_t
8 group by partid
9 /
PARTID A A SERVICE P STATUS
4711 A A 2 P 230
4712 A B 2 P 230
4713 A B 0 P 230Message was edited by:
dnikiforov -
Problem with SAPbouiCOM.EditText field
Hey Everyone,
I am experiencing a problem with an edit text box on a form that I created. For some reason when I go into the add mode on the form and type into the field the text disappears as soon as I go to another one of the controls on the form.
If i leave the cursor in that text box the text stays. Has anyone experienced this problem before?
Thanks in advance.Laura,
I had this problem and the reason was about the datasource.
If you item is linked to a UserDataSource, there is no problem.
If you item is linked to a dbdatasource, you have to ensure the datasource contains at least one record.
Can you show us the part of xml file, or VB code that you use to create your item on you form.
the event that you can catch would be et_validate. But I think it's fired when your text box is linked to datasource
HTH
Sebastien -
Is anyone else having problems with Apertures Date fields?
After experiencing a sysems failure I began restoring my images from backups. I have had no end of problems with Image dates. I have come to the determination that Aperture is NOT using either the "Create Date" or "DateTimeOriginal" as the image "Date" or "Date Created" data if other fields have other dates.
Here is a clip from my image metadata using exiftool:
File Modification Date/Time : 2012:09:23 19:53:15-04:00
File Access Date/Time : 2013:01:16 11:34:38-05:00
File Inode Change Date/Time : 2013:01:16 11:31:32-05:00
Create Date : 2006:02:20 11:51:12.10
Date/Time Original : 2006:02:20 16:51:12.10
Modify Date : 2006:02:20 11:51:12.10
And here is what Aperture utilized on import
Date: 9/23/12 7:53:15 PM EDT
Date Created 9/23/2012 7:53:15 PM
So Aperture utlized the File Modification Date/Time as the Create Date despite that the fact that the Create Date field is present and is properly formatted in the original image.
According to the Aperture mapping table, this shouldn't be happening.
Now, before someone recommends that I use Aperture's Date Adjust utility - I'm talking about slightly over 30,000 images. Editing images one at a time, or in blocks when you don't know what field Aperture is using as the Create Date would require individual inspection of each image followed by manual adjustment of each image. That approach isn't acceptable.Hmm ok, let me restate the issue then, I thought I was clear. I could have pointed out in my original post however, that only the EXIF and IPTC date fields were displayed from the metadata dump.
The data set presented in my first post is the EXIF dataset from the file which clearly shows the image was captured by digital camera at
Create Date : 2006:02:20 11:51:12.10
Date/Time Original : 2006:02:20 16:51:12.10
(The delta of 5 hours is the result of Zulu versus local time offset)
But, when I ingested it into Aperture, the import routine utilized the IPTC field
File Modification Date/Time : 2012:09:23 19:53:15-04:00
which is updated by the OS whenever you move the file around outside of Aperture. (a number of image data fields are updated by the OS - filename for example is another.). This resulted in the image date fields being stamped in Aperture as:
Date: 9/23/12 7:53:15 PM EDT
Date Created 9/23/2012 7:53:15 PM
Which obviously came form the File Modification Date/Time field and not (either) the Create Date or Date/Time Original fields. -
Problem in OOPs ALV using the BOX_FNAME property in LAYOUT
Hello Guys,
I am trying to use the property BOX_FNAME property in the LAYOUT of OOPs ALV, as a CHECKBOX for selecting the records and then processing the selected records.
Also i need to implement the functionality of SELECT/DESELECT ALL.
Below is the code i am using:-
DATA : w_layo TYPE lvc_s_layo. " Layout
w_layo-box_fname = 'MARKE'.
MARKE is a field used in internal table as CHAR01 field.
But know when i select record on display, the internal table field MARKE is not reflected back with the values.
Please suggest if i am missing something.
Thanks in advance.
Regards,
Tarun GambhirSolved by own, using method GET_SELECTED_ROWS of class CL_GUI_ALV_GRID.
Regards,
Tarun
Maybe you are looking for
-
Things have just kind of escalated. We started with the ipad and she really liked it. Then we were given an itv and it worked so nicely with the ipad, that we decided to get her an iphone. We've been buying music, tv shows, movies, taking photos, loo
-
Error occured when giving down payment request through Tcode F-47
Dear All, Following error occured when giving down payment request through Tcode F-47 by inserting purchase contract in Purch. Doc. field : Purch. doc. 4600000442 neither a purch. order nor a schedul. agmt. Message no. ME703 please
-
How to rewind to a specific point?
I have a 30 gig. Ipod on which I like to listen to audible.com books. I just got a new Nano. On my 30 gig Ipod, I can rewind or fast forward to a SPECIFIC point of the book, not just to the very beginning or to the end. I can't seem to do this with t
-
In flash I would like to have questions being displayed. When the question is selected I want the answer to appear under the question. Can anyone help explain how I would do this in flash. Here is a link off an adobe site that does what I want to do.
-
Where to find the performance counter information?
Code: class Program static void Main(string[] args) if(CreatePerformanceCounters()) Console.WriteLine("Created performance counters"); Console.WriteLine("Please restart application"); Console.ReadKey(); return; var totalOperationsCounter = new Perfor