To Blank the Quantity field in ALV output
Hi Gurus,
I have an Internal Table & 'MENGE' is the field, but when i am passing 'SAPCE' to blank that particular field, it is showing 0.00 quantity in the output of ALV, but i want to make that field blank.
Please tell me what should i do.
Vicky
hi vicky ,
declare the field
xyz type fkimg or xyz l type vbrp-fkimg .
i have declared like this only and in output it is showing blank .
also giving you the field catalogue .
fcat-fieldname = 'YFKIMG'.
fcat-hotspot = ' '.
fcat-outputlen = '000016'.
fcat-just = 'L'.
fcat-seltext_m = 'CRATE'.
fcat-ddictxt = 'M'.
fcat-inttype = 'Q'.
fcat-datatype = 'QUQN'.
fcat-do_sum = 'X'.
fcat-just = 'R'.
fcat-no_zero = 'X'.
* fcat-decimals_out = 0.
APPEND fcat.
CLEAR fcat.
regards
ranjan
Similar Messages
-
Dynamically summing up the numeric fields in ALV output
Dear all,
I had report which contains of the stock overview for a particular date based on materials. I am having the fields as
Plant Storage location Quantity
HC01 H14f 12
Hc01 H1w 13
Whenever the layout is selected as
Plant and Quantity . i have to get the output as
HC01 25
But if the option is based on storeage location
H14F 12
H1W 13
One thing the layout will be selected in the output of alv only the user will not run the report again.
Is there any option to thisHi Shreehari,
As per i understand your question u want sum based on a particular field.
For that you first select the numeric filed for which you want sum and click on sum tab on screen .
After that select the field based on which you want subtotal.
Now beside Total tab there will be sub-total , just click on that and you will get the ouput in your desired form.
Hope it will help you.
Regards,
Ashish T. -
Negative sign for DMBTR field in ALV output
Hi Experts,
Before posting I have searched for more than 3 hours in the forums to get a solution for this.
I did not get any solution so I am posting this problem which I need to resolve.
I have to display the DMBTR field in ALV output for which a grand total will have to be displayed.
Here for all the values in DMBTR which are negative are getting displayed as '- 6673.56','- 289956.23' as I am using the edit mask 'V_____________.__'.
I have to get the value shown as '-6673.56', '-289956.23'.
I tried to use convert this DMBTR to String and have successfully displayed the negative sign correctly in front of the value but I am not getting the totals which I need to have
PLease check and suggest for a solution.
Regards
KishoreHi,
If this is the case, then you can use character field to display the sign on the left. Sum up the total and use the event end of list to display the same. Remember to set the TECH and NO_OUT in the field catalog.
Hope this helps.
Regards,
Siva -
I am not getting the headings of the fields in ALV output.
I am not getting ALV out put but the headings of the fields in ALV output.
Please see my below code .
TYPES : BEGIN OF ty_zgxmit.
INCLUDE STRUCTURE zgxmit.
TYPES : END OF ty_zgxmit.
DATA : gt_zgxmit TYPE TABLE OF ty_zgxmit.
*& Form alv_display *
This subroutine is to display the out put in ALV. *
FORM alv_display .
Local data
DATA: y_x LIKE boole VALUE 'X'.
DATA: lt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: lf_fieldcat TYPE slis_fieldcat_alv.
DATA: lh_index LIKE lf_fieldcat-col_pos.
For variant
DATA: ws_repid LIKE sy-repid,
g_save TYPE c VALUE 'A',
g_exit TYPE c,
g_variant LIKE disvariant,
gx_variant LIKE disvariant.
For 1st field.( RPT_LOC )
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'RPT_LOC'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'RPT_LOC'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
For 2nd field.( BAL_XMIT )
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'BAL_XMIT'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'BAL_XMIT'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
For 3rd field.( INC_XMIT )
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'INC_XMIT'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'INC_XMIT'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
For 4th field.( Z500_XMIT )
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'Z500_XMIT'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'Z500_XMIT'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZJV_2245'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_zgxmit
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. " alv_displayYou can force the headings like so.
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'RPT_LOC'.
lf_fieldcat-tabname = 'GT_ZGXMIT'.
lf_fieldcat-ref_tabname = 'RPT_LOC'.
lf_fieldcat-ref_fieldname = 'ZGXMIT'.
lf_fieldcat-reptext_ddic = 'Whatever Heading'. "<- Right here
lh_index = lh_index + 1.
lf_fieldcat-col_pos = lh_index.
lf_fieldcat-key = y_x.
lf_fieldcat-no_sum = y_x.
APPEND lf_fieldcat TO lt_fieldcat.
Regards,
Rich Heilman -
How to display the fields in ALV Output without using Field catalog?
How to display the fields in ALV Output without using Field catalog?
Could you pls tell me the coding?
Akshitha.Hi,
u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
data: itab type table of mara.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_structure_name = itab
CHANGING
ct_fieldcat = lt_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*Pass that field catalog into the fillowing FM
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_grid_title = 'REPORTING'
is_layout = gt_layout
it_fieldcat = lt_fieldcat[]
tables
t_outtab = itab. -
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. -
Regarding Editable Quantity field in ALV Grid
Hi Experts,
I need your advice in this 2 scenarios.
1.I have a scenario where quantity field in output is editable and the user wants the quantity field printed without thousand separator. If i take a char field and display the field is editable then user may mistakenly type a,bcd...z/ special characters which it should not capture. Is there any char data type data element which accepts only integers. Because after that i need to save that value in z database table quantity field.
2. when there i raised an error message after validation of that editable field in alv output(by events), the user wants all other rows in that grid as uneditable except the row which has got error till this error is solved. Is this possible. If yes how.
Please share your valuable suggestions.Hi abilash n
as in dictionary, all quantity fields should have a reference to the unit field which then defines the number of decimals.
The rest is done automatically as long as you do it standard way. In field catalog you have to set the fcat-qfieldname to the name of the field that has the unit.
If you do so, also totals will be grouped by unit.
SAP has really done a great thing by inventing units for quantities (and currency keys for currency amounts). Only developers do not understand and thus refuse to use it.
Regards,
Clemens -
Group Quantity field in ALV GRID
hi all,
how to group the Quantity fileds in ALV grid output here fldcat-group = 'X' is not useful.
ex : in my for a order qty column values are 10.00,10.00,10.00,10.00 for a given sales order then i have to display only one 10.00 instead of 4 times.
any idea..?
Regards
Ashok PHi Ashok,
If can you check this using Onchange of in a loop statement.
Regards,
Prashanth -
Co41 enhancement for add field in ALV output
I must add a custom filed to ALV output of transaction CO41 and i trying to use all the 25 enhancements provided (that i find in other post CO41- Enhancement ), but i haven't found any way to get the desired results.
Can any body help me?
Thanks in advance.Hi,
I had the same requirement to add a custom field to ALV output of transaction CO41.
1. I first added the custom field to an new append-structure to the structure SFC_POCO.
2. Then i added this field to the Dynpro-Screen 200 in the function-group COUP (by choosing the table control, pressing F6 and then adding the custom field of SFC_POCO).
3. At last i added an Enhancement to the function CO_UP_PLANNED_ORDERS_SELECT and filled my custom field with data there.
Please reward if useful.
Regards,
Henry -
How to pass custom search help(F4 help) for a field in ALV output?
Hi,
I want to activate the F4 help in ALV output for a field for which we do not have search help assigned at table ,data element and domain level.
In field catalog i have enabled it by below line.
ls_fcat-F4AVAILABL = 'X'.
but because there are no standard input help available it is giving message as "No input help is available".
so how to pass our custom search help (g_search) for any field in ALV output.
I am using object oriented ALV grid display.
Thanks!!!
Rajesh Gupta.hi,
check this out:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/acdefb13-0701-0010-f1a2-8eeefa7d3780
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d?quicklink=index&overridelayout=true -
Unit of the Quantity field is displaying in internal format in Bex report
Hi Experts,
I have a BEx Query, in which i have quantity keyfigure added(Examble - Sales Quantity).
When i run the report for a selection the report displayes the unit for the quantity field in internal format.
Examble - instead of showing 10 CS (case), the report is shwing in 10 CV (internal format of unit CS is CV).
Also when i check the cube content, it has the unit updated into the cube as CS for that keyfigure.
Can any one let us know, how to dispaly the report output in external format.
Regards.
Muruganand.KHi Gopi,
The property in question is "calculated". This is a property of a context value attribute. So select the value attribute in the context to which your field is bound and view the properties. Set "calculated=true". It will generate the accessors.
In the setter method, add the following piece of code:
public void set<your attribute name>(IPrivate<your component>View.IContextElement element, java.lang.String value)
DecimalFormat df = new DecimalFormat("#.00");
value = df.format(value).toString();
Regards,
Satyajit
Message was edited by: Satyajit Chakraborty
Message was edited by: Satyajit Chakraborty -
HOW TO READ THE EDITABLE FIELD IN ALV
CAN ANYONE HELP ME IN READING THE EDITABLE FIELD IN ALV.
I AM DOING THE FOLLOWING.
BUT STILL THE EDITABLE FIELD IN NOT READ.
WHEN 'EXE' OR 'EXEC'.
LOOP AT I_RB1 INTO L_WA_STRU.
L_WA_STRU-LIFSK = L_WA_STRU-LIFSK1.
MODIFY I_RB1 FROM L_WA_STRU.
CLEAR L_WA_STRU.
ENDLOOP.
I_RB1 IS MY TABLE WHICH I PASSED IN TABLES OF REUSE_ALV_GRID_DISPLAY.LIFSK1 IS MY EDITABLE FIELD.
AND LIFSK IS THE FIELD WHERE THE DATA SHOULD GET TRANSFERRED WHEN I HIT EXECUTE BUTTON.DATA: lt_display LIKE TABLE OF gt_display.
REFRESH lt_display.
CLEAR lt_display.
lt_display[] = gt_display[].
CLEAR ref_grid.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
IF lt_display[] NE gt_display[].
gv_tosave = 'X'.
ENDIF.
Check this program. It will help you.
awrd points if helpful
Bhupal -
How to get a minus sign with the cost field in ALV.
Hi ,
How to get a minus sign with the cost field in ALV.
The Ouput will be displayed like Rs -1500 instead of 1500-
I can't use concatenate also as i may have to use the sum functionality of ALV .
Cheers
SunnyHi sunny,
1. The OTHER FIELD
has to be character field of say length 15.
2. Write the original numeric value to
this character field (in a loop)
3. But simply writing won't help.
4. use this kind of logic.
5.
REPORT abc.
DATA : m TYPE i.
DATA : chr(15) TYPE c.
m = -100.
WRITE m TO chr.
IF m < 0.
SHIFT chr RIGHT BY 1 PLACES.
CONDENSE chr.
CONCATENATE '-' chr INTO chr.
ENDIF.
WRITE chr.
regards,
amit m. -
In smartforms the quantity field is not showing the perfect value .
In smartforms the quantity field is not showing the perfect value because the point is shifting left
insted of showing 8.10 it is showing 80.00.Hi,
Dont use the quantity field same as that it come from interface Fm declare one field for quantity in the global settings and write the logic to pass the value to that field and pass that global value to the particular texts...same is the case with currency fields also.
Regards,
Rohan. -
Query Alert for a change in value of the Quantity field of the sales order
Hi Experts,
A query alert has been set up to alert the warehouse employee when a new sales order is created by a sales employee. Our client wants the warehouse employee alerted when the sales employee edits the quantity field of an already added sales order.
Kindly assist in designing a query to notify of this change in the Quantity field of the sales order.
DavidTry this one:
SELECT T0.DocNum, T0.CardCode, T1.ItemCode, T3.Quantity 'Old Qty', T0.Quantity 'New Qty', MAX(T2.LogInstanc) 'Times Changed'
FROM dbo.ORDR T0
INNER JOIN dbo.RDR1 T1 ON T1.DocEntry = T0.DocEntry
INNER JOIN dbo.ADOC T2 ON T2.DocNum = T0.DocNum AND T2.ObjType = '17'
INNER JOIN dbo.ADO1 T3 ON T3.DocEntry = T2.DocEntry AND T3.ItemCode = T1.ItemCode
WHERE T0.DocStatus = 'O' and T0.DocType = 'I' AND T1.Quantity != T3.Quantity
GROUP BY T0.DocNum, T0.CardCode, T1.ItemCode, T1.Quantity, T3.quantity
Maybe you are looking for
-
Hi, Mac here. I have downloaded the DMG package and have triede running the pkg installer both from the mounted image and from a copy on my desktop.In both cases I get the following error: In english it says: "Installation failure. There was an unkno
-
TDS not calculating at the time of advance payment to vendor
hello gurus, need urgent help , TDS not calculating for advance payment made to vendor, checked configuration in detail. payment WT type is marked as central invoicing prop.all other config is o.k. regards, Anand
-
Declarative component stops working after taskflow-call-in-popup
Hi! JDev 11.1.1.3.0 I need a component, much like the commandToolbarButton, but I have the requirement that the user should still be able to select from the popup even if the button is disabled. So I created a declarative component, combining two but
-
hello, could use some help, photos from camera, (digital still),---after bridge and cs3 into imovie and created movie with transitions etc.. then into idvd--created 2 dvd's--16:9-- about 15 minutes--one quality wise ok the other over saturation espec
-
Premiere 6.5 en Windows XP
Tengo instalada una miro dc 30 en windows XP y al comenzar a trabajar con Adobe Premiere 6.5 no me permite arrastrar las transiciones hacia el Timeline es decir si puedo colocar los videos 1 y 2 pero al no poder colocar las transiciones no me permite