Displaying no default zeroes for the numeric field in the table display.
hi folks,
I am binding a table in the context which has some numeric fields. I'm displaying the same table which has some records for editing purpose. But the problem is that the numeric field column is being displayed with zeros if it doesnot have any value in it. Can u explain how to disable the zeroes by not displaying them by defualt when there is no value for the numeric field.
regards,
Ramu
set the format of the context attribute TEST is the context attribute name
data: lr_info type ref to if_wd_context_node_info.
data: ls_prop type WDY_ATTRIBUTE_FORMAT_PROP.
lr_info = wd_context->get_node_info( ).
ls_prop = lr_info->GET_ATTRIBUTE_FORMAT_PROPS( name = 'TEST' ).
LS_PROP-NULL_AS_BLANK = 'X'.
lr_info->sET_ATTRIBUTE_FORMAT_PROPS( name = 'TEST'
FORMAT_PROPERTIES = ls_prop ).
Abhi
Similar Messages
-
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. -
Total for a Numeric field in ALV Grid display
Hi all,
I am not getting the Total for a Numeric field in ALV Grid output. What might be the problem.
Regards,
Balavardhan.KCheck this code for subtotals and totals..
REPORT ZYFI_REPT007
NO STANDARD PAGE HEADING
LINE-SIZE 300
LINE-COUNT 50
MESSAGE-ID ZYFI.
TABLES : COOI, " Commitments Management: Line Items
LFA1, " Vendor master (general section)
VBEP,
RKPLN.
TABLE TYPES AND INTERNAL TABLES *
DATA : BEGIN OF TYP_COOI ,
OBJNR LIKE COOI-OBJNR,
SAKTO LIKE COOI-SAKTO,
MEGBTR LIKE COOI-MEGBTR,
MEINH LIKE COOI-MEINH,
WKGBTR LIKE COOI-WKGBTR,
REFBN LIKE COOI-REFBN,
RFPOS LIKE COOI-RFPOS,
SGTXT LIKE COOI-SGTXT,
BUDAT LIKE COOI-BUDAT,
LIFNR LIKE COOI-LIFNR,
END OF TYP_COOI.
DATA : BEGIN OF TYP_LFA1 ,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
END OF TYP_LFA1.
DATA : BEGIN OF IT_OUTTAB OCCURS 0,
OBJNR LIKE COOI-OBJNR,
SAKTO LIKE COOI-SAKTO,
MEGBTR LIKE COOI-MEGBTR,
MEINH LIKE COOI-MEINH,
WKGBTR LIKE COOI-WKGBTR,
REFBN LIKE COOI-REFBN,
RFPOS LIKE COOI-RFPOS,
SGTXT LIKE COOI-SGTXT,
BUDAT LIKE COOI-BUDAT,
LIFNR LIKE COOI-LIFNR,
NAME1 LIKE LFA1-NAME1,
END OF IT_OUTTAB.
DATA : IT_COOI LIKE TYP_COOI OCCURS 0 WITH HEADER LINE,
IT_LFA1 LIKE TYP_LFA1 OCCURS 0 WITH HEADER LINE.
*-- ALV Declarations
TYPE-POOLS SLIS.
DATA: IT_EVENTS TYPE SLIS_T_EVENT,
GS_EVENT TYPE SLIS_ALV_EVENT,
wa_fldcat type slis_fieldcat_alv.
DATA: S_LAYOUT TYPE SLIS_LAYOUT_ALV,
GT_PRINT TYPE SLIS_PRINT_ALV.
DATA: IT_FLDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA: V_REPID LIKE SY-REPID.
SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_KOKRS FOR COOI-KOKRS NO-EXTENSION NO INTERVALS,
" Controlling Area
S_BUKRS FOR COOI-BUKRS NO-EXTENSION NO INTERVALS,
" Company code
S_GJAHR FOR COOI-GJAHR NO-EXTENSION NO INTERVALS,
" Fiscal Year
S_OBJNR FOR RKPLN-AUFNR MATCHCODE OBJECT ORDE,
" Internal order
S_SAKTO FOR COOI-SAKTO MATCHCODE OBJECT KART,
" Cost Element
S_BUDAT FOR COOI-BUDAT, " Debit Date
S_LIFNR FOR COOI-LIFNR. " Vendor
SELECTION-SCREEN END OF BLOCK B1.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
*-- Read data
PERFORM GET_DATA.
E N D O F S E L E C T I O N *
END-OF-SELECTION.
*-- Process the data and prepare the output data
PERFORM CALCULATE_FINAL_INFO.
*--Display Report output
PERFORM DISPLAY_REPORT.
FORM CALCULATE_FINAL_INFO *
Process the data and prepare final internal table *
FORM CALCULATE_FINAL_INFO.
DATA : L_OBJNR LIKE COOI-OBJNR.
SORT IT_LFA1 BY LIFNR.
DELETE ADJACENT DUPLICATES FROM IT_LFA1 COMPARING LIFNR.
LOOP AT IT_COOI.
L_OBJNR = IT_COOI-OBJNR+2(20).
SHIFT L_OBJNR LEFT DELETING LEADING '0'.
IF L_OBJNR IN S_OBJNR.
READ TABLE IT_LFA1 WITH KEY LIFNR = IT_COOI-LIFNR.
IF SY-SUBRC EQ 0.
IT_OUTTAB-NAME1 = IT_LFA1-NAME1.
ENDIF.
MOVE-CORRESPONDING IT_COOI TO IT_OUTTAB.
CLEAR IT_OUTTAB-OBJNR.
IT_OUTTAB-OBJNR = L_OBJNR.
APPEND IT_OUTTAB.
CLEAR IT_OUTTAB.
CLEAR IT_LFA1.
CLEAR L_OBJNR.
ENDIF.
ENDLOOP.
ENDFORM.
*& Form GET_DATA
Fetch the Data from the table COOI and LFA1
FORM GET_DATA.
SELECT OBJNR
SAKTO
MEGBTR
MEINH
WKGBTR
REFBN
RFPOS
SGTXT
BUDAT
LIFNR
FROM COOI
INTO TABLE IT_COOI
WHERE BUDAT IN S_BUDAT
AND LIFNR IN S_LIFNR
AND KOKRS IN S_KOKRS
AND BUKRS IN S_BUKRS
AND GJAHR IN S_GJAHR
AND SAKTO IN S_SAKTO.
IF SY-SUBRC EQ 0 .
Get the Vendor name from LFA1
SELECT LIFNR
NAME1
FROM LFA1
INTO TABLE IT_LFA1
FOR ALL ENTRIES IN IT_COOI
WHERE LIFNR EQ IT_COOI-LIFNR.
ELSE.
MESSAGE I999 WITH TEXT-013.
ENDIF.
ENDFORM. " GET_DATA
*& Form DISPLAY_REPORT
Display the output
FORM DISPLAY_REPORT.
PERFORM BUILD_CATALOG.
PERFORM FRM_PREPARE_EVENT_LIST TABLES IT_EVENTS.
IF NOT IT_OUTTAB[] IS INITIAL.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = IT_FLDCAT
IT_SORT = IT_SORT
IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = IT_OUTTAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ELSE.
MESSAGE I999 WITH TEXT-013.
ENDIF.
ENDFORM. " DISPLAY_REPORT
*& Form BUILD_CATALOG
Build the Field catalog for the ALV Report
FORM BUILD_CATALOG.
DATA: V_INDEX LIKE SY-TABIX.
V_REPID = SY-REPID.
DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = V_REPID
I_INTERNAL_TABNAME = 'IT_OUTTAB'
I_INCLNAME = V_REPID
CHANGING
CT_FIELDCAT = IT_FLDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 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.
READ TABLE IT_FLDCAT WITH KEY FIELDNAME = 'WKGBTR'
TABNAME = 'IT_OUTTAB' INTO WA_FLDCAT.
IF SY-SUBRC EQ 0.
WA_FLDCAT-DO_SUM = 'X'.
MODIFY IT_FLDCAT FROM WA_FLDCAT INDEX SY-TABIX.
ENDIF.
READ TABLE IT_FLDCAT WITH KEY FIELDNAME = 'OBJNR'
TABNAME = 'IT_OUTTAB' INTO WA_FLDCAT.
IF SY-SUBRC EQ 0.
WA_FLDCAT-SELTEXT_L = 'Order'.
WA_FLDCAT-COL_POS = 1.
WA_FLDCAT-DDICTXT = 'L'.
MODIFY IT_FLDCAT FROM WA_FLDCAT INDEX SY-TABIX.
ENDIF.
LS_SORT-FIELDNAME = 'OBJNR'.
LS_SORT-SPOS = 1.
LS_SORT-UP = 'X'.
LS_SORT-SUBTOT = 'X'.
APPEND LS_SORT TO IT_SORT.
ENDFORM. " BUILD_CATALOG
*& Form FRM_PREPARE_EVENT_LIST
Build the Events
FORM FRM_PREPARE_EVENT_LIST TABLES IT_EVENTS TYPE SLIS_T_EVENT.
CLEAR GS_EVENT.
GS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
GS_EVENT-FORM = 'TOP_OF_PAGE_REPORT'.
APPEND GS_EVENT TO IT_EVENTS.
ENDFORM. " FRM_PREPARE_EVENT_LIST
TOP OF PAGE
FORM TOP_OF_PAGE_REPORT.
CALL FUNCTION 'Z_YREPORT_HEADER'
EXPORTING
DL_TITLE = SY-TITLE
DL_REPID = SY-CPROG
DL_LINSZ = SY-LINSZ
EXCEPTIONS
OTHERS = 1.
ENDFORM. " FRM_TOP_OF_PAGE_REPORT
*& Form USER_COMMAND
Drill Down Functionality to Call the Transaction ME23
FORM USER_COMMAND USING P_UCOMM LIKE SY-UCOMM
P_SELFIELD TYPE SLIS_SELFIELD.
DATA : L_INDEX LIKE SY-INDEX,
L_REFBN LIKE COOI-REFBN.
L_INDEX = P_SELFIELD-TABINDEX. " holds the selected table index
CLEAR L_REFBN.
CASE P_UCOMM.
*-- On Double Click
WHEN '&IC1'.
CLEAR L_REFBN.
*-- Read the Current Line
READ TABLE IT_OUTTAB INDEX L_INDEX.
IF SY-SUBRC EQ 0.
L_REFBN = IT_OUTTAB-REFBN.
IF NOT L_REFBN IS INITIAL.
*-- Set the BES Paramater Id to the Current line Purchase Order Number
SET PARAMETER ID 'BES' FIELD L_REFBN.
*-- Call the Transaction Purchase Order Display with the above PO Number
CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
ENDIF.
ELSE.
MESSAGE E999 WITH TEXT-014.
ENDIF.
ENDCASE.
ENDFORM. " USER_COMMAND -
Default Days for Order Cancellation field
Hi,
I want to use the Default Days for Order Cancellation field in the Document Settings/Per Document tab - Sales Order.
Questions:
1. Does it calculate based on the posting or document date?
2. If you change that date field, will it recalculate the cancel date based on the new date or does it still have the cancel date calculated based on the first date?
3. If the Order Cancellation field number is changed, are the cancellation dates for existing orders recalculated?
Thank you,
HeatherHello Heather,
I will answer your question after I finished replicate it in my database. Based on SDK file description as follows :
Sets the default number of days before cancelling a sales order. After this date the goods are not to be eccepted by the customer. The default value is 30 days after the Delivery Date.
1. It is based on delivery date
2. It will recalculate the cancel date based on the new date (because it is updated)
3. It is also recalculated by the system
The company data table for the field is i.e. CINF.
let me know if you need more detail
Rgds,
JM -
What is the initial value for a numeric field ??
Can someone tell me what the INITIAL VALUE FOR A NUMERIC FIELD is ?? Thank you
Rod.Using the following...
class MyClass
int myvar1; // Default initial value
int myvar2 = 3; // Default initial value and default value
MyOtherClass myclass1; // Default initial value
void doit()
int mylocal1; // No value
MyOtherClass myclass2; // No value
All number member variables, like myvar1 start off with andefault initial value which is zero. For booleans this is false. Object reference variables, like myclass1, have a null value.
All local numeric variables are considered undefined. So mylocal1 and myclass2 are undefined. Before you can use them you must explicitly provide a value.
Finally note that myvar2 will have two values during class instantiation. Initially it will have a value of zero. Sometime later it will have the value of 3. (When that happens is very definitely outside the scope of what this forum covers. If you want to know then ask in the advanced forum.) -
How can I change the numeric format of the cursor coordinates display in LV 8.2
Since LV 8.0 or so the cursor display window of a graph indicator seems to be a tree control. I couldn't find where to change the numeric format of the numbers displayed in that control. What did I miss?
lecroy wrote:
Maybe I'm not clear on what your looking for but I just use a property node and route the raw cursor data out to what ever function I want to run on it, then display it in a seperate field. The nice thing with the property node is you can have multiple graphs linked together by one set of cursors all with different readouts.
Yes, of course that's an option and I guess I'll have to do it that way.
The point is that I converted a pre-LV-8.x program to LV 8.5. In the program I had used the coordinates display field in the cursor legend to display the position, just the was the cursor legend is supposed to be used, IMO. And in pre-LV-8.x days it was possible to customize the numeric format property of the cursor legend (either directly or by property nodes). It seems that with LV 8.x NI chose to use a treeview control for the cursor legend. With that 'improvement' the numeric formatting flexibility was lost since now the conversion to the string content in the cursor legend's treeview is happening somewhere 'under the hood'.
<rant> Why do they (NI) always try to 'improve' things (where nothing needs be improved) and sacrifice functionality on the way....? </rant> -
KE5Z : UserExit or SAP Note for adding new fields in the report output
Hi,
I want to add 2 new fields in KE5Z (Profit Center: Actual Line Items) report output.
Order reason(AUGRU), Sales Document Type (AUART) fields.
Is there any UserExit or SAP Note available for this....
Thanks in advance,
fractalHi Fractal,
See if Note 92864 will help you.
Summary
Symptom
Through a modification, it is possible for you to include additional fields in the profit center line-item reports 'actual' and 'plan' (Release 3.1*).
Additional key words
KE5Z, KE5Y, RCOPCA02, RCOPCA08 -
SUPPORTGUIDE 20010613143936 -
REPORTWRITER,
SGRW_OM SGRW_PS SGRW_PC SGRW_SL SGRW_PCA SGRW_EC SGRW_LIS
Cause and prerequisites
The fields must be located in table GLPCA (for actual) or GLPCP (for plan).
For Release 3.0F, you should ensure you have applied Note 62511 first.
Solution
To include a field in the actual line item report, proceed as follows:
Call the ABAP/4 Dictionary (Transaction SE11) and display table GLPCA. You can then find in a line the field name and data element for the field you want to include.
Return to the initial screen of the ABAP/4 Dictionary. Now change the structure RPCA2. If the structure does not yet contain the field, you select Edit -> Insert field; enter the field name and data element. Do not insert the new field at the beginning of the structure but in the rear half of the structure.
Then save and activate the structure.
Now call the ABAP Editor (Transaction SE38). Change the source code of program RCOPCA02. Insert the lines set out in the attachment in FORM routine FIELDCAT_FILL. When you do this, replace SGTXT by the field name of the field. If you normally want the field to be displayed when you the access the report, delete the line afield-no_out = 'X'. "<<<< insert Note 92864 .
You should note that the place where you insert the lines influences the position of the column in the report list.
To include a field in the Plan-line-item report, carry out the same procedure except with table GLPCP, structure RPCA8 and program RCOPCA08.
Note: Pls check if these 2 fields are available in any of the layout versions you have available with the transaction.
Cheers,
Vikram
Pls reward for helpful replies!! -
How to set a default date for a custom field of Date type in project server 2010.
hi,
can somebody help me.
How Can i set the default date for a custom field of date type in project server 2010 ?Dear Rohan,
You can set default value to custom field thru Lookup table. Assign lookup table to custom field and set default value to some lookup value (Note: check the “Choose a value to use as a default when adding new item” checkbox).
Regards,
Avinash kumar | Blog:http://avigr8.wordpress.com | If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. -
NaN as default value for LabVIEW numeric control
TestStand 2010 SP1, LabVIEW 2011 SP1
This may be a "feature" but I also may be missing something here.
Reproduce my issue doing this:
Create a VI with a numeric double. Set the value to NaN. Make that the default value. Connect it to the connector pane. Try and call it from TestStand. The prototype will not reload. Why? NOTE: it only works for controls and not indicators.
Not sure if it's related to this because that's in .NET: http://forums.ni.com/t5/Measurement-Studio-for-NET/NaN-as-default-value-for-a-numeric-edit-control/t...
We have hundreds of VIs with the default set to NaN. We started seeing this issue when we just upgraded to the latest dev suite.
Thanks in advance,
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~The prototype reloads fine in TestStand 4.2.1 and LabVIEW 2010, as you probably already knew.
In TestStand 2010, the problem is that it doesn't reload only when you set to NAN? Or does it never reload no matter what the numeric value is?
What is your logic for using NaN values? Are these values that are not used in tests? We have a suite of over 50+ tests and I have never used NaN values as inputs.
Thanks,
PH -
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 -
When i double click itunes it doesn't open it just comes up with an error saying " The itunes library.itl file cannot be found or created. The default location for this file is in the 'itunes' folder in the 'music' folder. How can i fix this problem?
Anyone can help to advice how to solve this issue ?
-
My laptop was updating itunes and turned off and every since when i try to load itunes it brings up a window that says
The itunes library.itl fie cannot be found or created. The default location for this fie is in the itunes folder in the Music folder.
an I cant figure out what to do to get itunes to load so I can't use itunes at all which ***** since it also means I right now I can't add music to my ipod or apps or anything. So hopefully someone can tell me what happened and how to fix it or solve itHi pgarard1,
If you are having issues with launching iTunes after an update, you may want to take a look at the troubleshooting in the following article:
iTunes for Windows: Doesn't open after upgrading in Windows Vista or Windows 7
http://support.apple.com/kb/TS2363
Regards,
- Brenden -
I just upgraded my mac book to 10.6.8 and downloaded the new version of itunes. When I try to open it and error message appears saying, "The iTunes Library file cannot be found or created. The default location for this file is in the "iTunes" folder in the "Music" folder."
I have tried a few things but iTunes closes right after i click okay. Anyone know anything?Look in your Home > Music folder. There should be an iTunes folder there and it should have a number of files and folders including one called library.itl You want to guide iTunes to that file. If you don't see that file or folder then in your next post you will have to be very specific as to what you do see or how you have your iTunes set up because that's where it should be according to default settings.
-
Every time I have to upgrade iTunes it gives me this messege:'The default location for this file is in the "iTunes" folder in the "Music" folder.' the file should be there but I don't understand why it does this every time Apple upgrades the Itunes library. Its on the computer somewhere but it only affects this login on my computer (meaning on this Windows Account). Why does my iTunes do this? Then I have to spend hours placing all my libraries back together and all my music back into the library. Which usually takes me a few days to sort all out. What is wrong with my iTunes? The iTunes folder is a folder in my Music folder where I store the iTunes music/files/libraries at on my computer so I can have all of the iTunes files in one place on my computer.
I have a Windows 7 operating system my computer runs from.
-
itunes library.itl file cannot be found or created. The default location for this file is in the "iTunes" folder in the "Music" folder, I keep getting this message everytime I try to install Itunes after having to remove windows 8.1 and go back to windows 8. I have uninstalled and reinstalled and it keeps telling me the same thing. What do I do?
Hi Renee31,
If you are having issues with the library.itl file in iTunes, you may find the following articles helpful:
iTunes: What are the iTunes library files?
http://support.apple.com/kb/ht1660
Apple Support: Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
http://support.apple.com/kb/HT1923
Regards,
- Brenden
Maybe you are looking for
-
PI 7.31 SP14: use of MessageTransformBean Complex conversion w/o KEY values
In a mail sender channel I need to pick up a csv file with 2 (different) header lines and a number of data lines. the structure is like this: header1 header2 line line line There are no Key values in the file that I can use and no fixed lengths eithe
-
Hi , I've configured webutil 105. When i try to open a webutil configured form i get the following message on console and the form does not open.Non webutil forms are working fine. Pls suggest a solution. Rgds, Shruti. The JInitiator gives the follow
-
I can't get along with Tomcat and MySQL
i'm using tomcat 5.5 and wan to connect to mysql database. when trying to run my webapp, the compiler said like the driver(java-connector) is not detected. what should i do now... someone tell me please. and where exactly i should copy the driver(jar
-
Hi All, need your help to consume the message as string !! here are the explanation .. I have created Adapter to consume the message from the MMX.while creating adapter the jdev is asking me to define the message format which need to be consumed.i ca
-
Can ALV Grid show credit limit and excess credit limit but do not sum them?
Can ALV Grid show 100,000.00(in ???1) and 84,260.94(???2). Not sum them up. Credit limit, Inv. Curr, Inv. Amount, Amt in LC, Excess Credit Limit 100,000.00 USD 1,594.20 5,260.86 84,260.94 100,000.00 USD 263.84 870.67 8