Quantity field in alv display
Hi all.
we are phasing a problem.
I am using alv to display in output.
I am using a Quantiti field (BDMNG),.
in this field if nodata is there then it is showing 0.000(that is the default value).
I don't want those zeros.I want only space(blank only).
Can any body help me to solve this issue.
Thanks in advance
Eswar.
Hai,
While building field catalog For quantity field Set the NO-ZERO attribute to 'X'.
Or you can change the quantity filed to character in the alv display.
Mark points if helpful.
Regards,
Umasankar
Similar Messages
-
Quantity fields not getting displayed in the second total row
Hi,
As per the requirement I have to display 2 total rows for an ALV report using CL_GUI_ALV_GRID. I am able to get the first total row properly using method get_subtotal(). However for the next total row only the character fields are getting displayed and the quantity fields are coming blank.
The second total row will have different values based on a formula.
Please help me out in resolving the issue.
Thanks,
AbhishekYou can provide first row as the SUBTOTAL and next row as the TOTAL.
Get one extra column on which you can do the SUBTOTAL.
Regards,
Naimesh Patel -
Removing Zeros from a quantity field in ALV
HI ,
i have req of removing the zeros after decimal point in while displaying in ALV.
e.g 3.000 --> '3' .
I do not need the decimal values.
Is there any FM or field catalogue parameter to control this.
I am using CL_GUI_ALV_GRID for ALV display.
Thaks.Hi,
Whay you can do is...
Copy the Quantity with out zeros into Char field and display.
Thanks & Regards,
Vamsi. -
Hello All,
I am using OO - ALV in which I am displaying a quantity field.This field is an editable field and if user tries to change the value and SAVE , it is taking some wrong values.
Say suppose I am having 1.000 as the initial value and if user changes it to 2.000 and saves it is converted to .002.
I tried with qfieldname , ref_fieldname of fieldcat but of no use. Anything apart from this will be highly appreciated.
Regards,
DhwaniUser might be changing the value to only 2 and you might have declared the fieldcat with 2-3 decimal places. If you enter value with decimals say 2.001 it will take.
Otherwise you need to replace it with char value as Nanda has suggested.
Hope it helps.
Thanks,
Jayant -
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 -
Hide a field in ALV "Display Details" list
Hi Experts,
I have a requirment where I have to hide a field in ALV output, as well as in "Details display". I already put NO_OUT = 'X' for that field in fieldcatalog itself. It is hidden in the ALV output anyway, but the problem is when user selects a row and clicks on "Details" button in toolbar of ALV, it still displays the hidden fields of that ALV list with/out headings there.
Hope you understood my problem, pls respond soon if you hav any solution for this?
Thanks
SaravUse TECH = 'X' in field catalog.
Regards,
Raymond -
F4 for Editable field in ALV, display Name but capture ID
Hi Friends,
I have a ALV for which i have defined a Structure, which is passed to Fieldcatlog.
I have defined a Search help - ZUSER_NAME which has following fields to display.
USERID - USR02-BNAME
FNAME
LNAME
FULLNAME
So my structure for fieldcatalog has User-id which is linked to this search help with Domain XUBNAME.
So in my report i made this User-Id as editable and F4 available, everything is working fine.
when user does a F4, its displaying Userid,Fname,Lname and complete name.upon selection and save i am capturing the id and storing in the ztable.
But now i have a requirement that when user selects a value from this search help on F4, i need to display Fullname but capture the User Id. How can i do that?
This is something similar to the one we have in BSP- key-value pair.
how to do this in ALV.
Appreciate if someone can guide me thru.
Thanks,
Simha
Edited by: Simha on Sep 6, 2008 2:24 PMhai , this is example code for editing the F4 display .. check out this
REPORT zalv_editf4display.
*Type pools for alv
TYPE-POOLS : slis.
*structure for t582a tbale
TYPES : BEGIN OF ty_table,
infty TYPE infty,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_table.
*Structure for infotype text
TYPES : BEGIN OF ty_itext,
infty TYPE infty,
itext TYPE intxt,
sprsl TYPE sprsl,
END OF ty_itext.
*Structure for output display
TYPES : BEGIN OF ty_output,
infty TYPE infty,
itext TYPE intxt,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_output.
*internal table and work area declarations
DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_pbo TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
wa_table TYPE ty_table,
wa_output TYPE ty_output,
wa_ittext TYPE ty_itext.
*Data declarations for dropdown lists for f4
DATA: it_dropdown TYPE lvc_t_drop,
ty_dropdown TYPE lvc_s_drop,
*data declaration for refreshing of alv
stable TYPE lvc_s_stbl.
*Global variable declaration
DATA: gstring TYPE c.
*Data declarations for ALV
DATA: c_ccont TYPE REF TO cl_gui_custom_container, "Custom container object
c_alvgd TYPE REF TO cl_gui_alv_grid, "ALV grid object
it_fcat TYPE lvc_t_fcat, "Field catalogue
it_layout TYPE lvc_s_layo. "Layout
*ok code declaration
DATA:
ok_code TYPE ui_func.
*initialization event
INITIALIZATION.
*start of selection event
START-OF-SELECTION.
*select the infotypes maintained
SELECT infty
pnnnn
zrmkz
zeitb
dname
davo
davoe
FROM t582a UP TO 10 ROWS
INTO CORRESPONDING FIELDS OF TABLE it_table.
*Select the infotype texts
IF it_table[] IS NOT INITIAL.
SELECT itext
infty
sprsl
FROM t582s
INTO CORRESPONDING FIELDS OF TABLE it_ittext
FOR ALL ENTRIES IN it_table
WHERE infty = it_table-infty
AND sprsl = 'E'.
ENDIF.
*Apppending the data to the internal table of ALV output
LOOP AT it_table INTO wa_table.
wa_output-infty = wa_table-infty.
wa_output-pnnnn = wa_table-pnnnn.
wa_output-zrmkz = wa_table-zrmkz.
wa_output-zeitb = wa_table-zeitb.
wa_output-dname = wa_table-dname.
wa_output-davo = wa_table-davo.
wa_output-davoe = wa_table-davoe.
For texts
READ TABLE it_ittext INTO wa_ittext WITH KEY infty = wa_table-infty.
wa_output-itext = wa_ittext-itext.
APPEND wa_output TO it_output.
CLEAR wa_output.
ENDLOOP.
Calling the ALV screen with custom container
CALL SCREEN 0600.
*On this statement double click it takes you to the screen painter SE51.
*Enter the attributes
*Create a Custom container and name it CCONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
*Now a normal screen with number 600 is created which holds the ALV grid.
PBO of the actual screen ,
Here we can give a title and customized menus
*create 2 buttons with function code 'SAVE' and 'EXIT'.
GIVE A SUITABLE TITLE
*& Module STATUS_0600 OUTPUT
text
MODULE status_0600 OUTPUT.
SET PF-STATUS 'DISP'.
SET TITLEBAR 'ALVF4'.
ENDMODULE. " STATUS_0600 OUTPUT
calling the PBO module ALV_GRID.
*& Module PBO OUTPUT
text
MODULE pbo OUTPUT.
*Creating objects of the container
CREATE OBJECT c_ccont
EXPORTING
container_name = 'CCONT'.
create object for alv grid
create object c_alvgd
exporting
i_parent = c_ccont.
SET field for ALV
PERFORM alv_build_fieldcat.
Set ALV attributes FOR LAYOUT
PERFORM alv_report_layout.
CHECK NOT c_alvgd IS INITIAL.
Call ALV GRID
CALL METHOD c_alvgd->set_table_for_first_display
EXPORTING
is_layout = it_layout
i_save = 'A'
CHANGING
it_outtab = it_output
it_fieldcatalog = it_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. " PBO OUTPUT
*& Form alv_build_fieldcat
text
<--P_IT_FCAT text
*subroutine to build fieldcat
FORM alv_build_fieldcat.
DATA lv_fldcat TYPE lvc_s_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '1'.
lv_fldcat-fieldname = 'INFTY'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 8.
lv_fldcat-scrtext_m = 'Infotype'.
lv_fldcat-icon = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '2'.
lv_fldcat-fieldname = 'PNNNN'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Structure'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '3'.
lv_fldcat-fieldname = 'ITEXT'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 60.
lv_fldcat-scrtext_m = 'Description'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '5'.
lv_fldcat-fieldname = 'ZRMKZ'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 1.
lv_fldcat-scrtext_m = 'PERIOD'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '6'.
lv_fldcat-fieldname = 'ZEITB'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 5.
lv_fldcat-scrtext_m = 'Time constraint'.
lv_fldcat-edit = 'X'.
*To avail the existing F4 help these are to
*be given in the field catalogue
lv_fldcat-f4availabl = 'X'.
lv_fldcat-ref_table = 'T582A'.
lv_fldcat-ref_field = 'ZEITB'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '7'.
lv_fldcat-fieldname = 'DNAME'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Dialogmodule'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '8'.
lv_fldcat-fieldname = 'DAVO'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Start'.
lv_fldcat-edit = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '9'.
lv_fldcat-fieldname = 'DAVOE'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'End'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
*To create drop down for the field 'DAVO'
with our own f4 help
ty_dropdown-handle = '1'.
ty_dropdown-value = ' '.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '1'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '2'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '3'.
APPEND ty_dropdown TO it_dropdown.
CALL METHOD c_alvgd->set_drop_down_table
EXPORTING
it_drop_down = it_dropdown.
LOOP AT it_fcat INTO lv_fldcat.
CASE lv_fldcat-fieldname.
To assign dropdown in the fieldcataogue
WHEN 'DAVO'.
lv_fldcat-drdn_hndl = '1'.
lv_fldcat-outputlen = 15.
MODIFY it_fcat FROM lv_fldcat.
ENDCASE.
ENDLOOP.
ENDFORM. " alv_build_fieldcat
*& Form alv_report_layout
text
<--P_IT_LAYOUT text
*Subroutine for setting alv layout
FORM alv_report_layout.
it_layout-cwidth_opt = 'X'.
it_layout-col_opt = 'X'.
it_layout-zebra = 'X'.
ENDFORM. " alv_report_layout
PAI module of the screen created. In case we use an interactive ALV or
*for additional functionalities we can create OK codes
*and based on the user command we can do the coding.
*& Module PAI INPUT
text
MODULE pai INPUT.
*To change the existing values and refresh the grid
*And only values in the dropdown or in the default
*F4 can be given , else no action takes place for the dropdown
*and error is thrown for the default F4 help and font changes to red
*and on still saving, value is not changed
c_alvgd->check_changed_data( ).
*Based on the user input
*When user clicks 'SAVE;
CASE ok_code.
WHEN 'SAVE'.
*A pop up is called to confirm the saving of changed data
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'SAVING DATA'
text_question = 'Continue?'
icon_button_1 = 'icon_booking_ok'
IMPORTING
answer = gstring
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*When the User clicks 'YES'
IF ( gstring = '1' ).
MESSAGE 'Saved' TYPE 'S'.
*Now the changed data is stored in the it_pbo internal table
it_pbo = it_output.
*Subroutine to display the ALV with changed data.
PERFORM redisplay.
ELSE.
*When user clicks NO or Cancel
MESSAGE 'Not Saved' TYPE 'S'.
ENDIF.
**When the user clicks the 'EXIT; he is out
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
CLEAR: ok_code.
ENDMODULE. " PAI INPUT
*& Form REDISPLAY
text
--> p1 text
<-- p2 text
FORM redisplay .
*Cells of the alv are made non editable after entering OK to save
CALL METHOD c_alvgd->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
*Row and column of the alv are refreshed after changing values
stable-row = 'X'.
stable-col = 'X'.
*REfreshed ALV display with the changed values
*This ALV is non editable and contains new values
CALL METHOD c_alvgd->refresh_table_display
EXPORTING
is_stable = stable
EXCEPTIONS
finished = 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. " REDISPLAY -
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 -
I am using KWMENG data element in my ALV grid which is a quantity field. In normal dialog programming this field does not allows entering characters in editable cells. But in ALV grid I am not able to restrict it from entering characters.
Eg: In VA01 if we try to enter any character "ABC...Z" then it wouldn't be typed in the screen. But when using the same data element in ALV grid iot allows to enter alphanumeric values. Since it's a quantity field so character value gives a short dump. I know I can restrict the dump by using "NA" in comparing string but I want to knw is there a way by which I restrict character field entry in alv grid, the same way this field works in VA01. I checked with a simple dialog prog and in that also it doesn not allows character typing in editable fields.simple solution
mention the ref_fieldname and ref_tablename in the fieldcatalog for that column.
ex:
fieldcat-ref_fieldname = 'KWMENG'.
fieldcat-ref_tablename = 'VBAP'. -
Leading zero for a character datatype field in ALV display
I have field access sequence value(VAKEY) which is concatenated by sales org, distibution chnl and division
(0100/01/01). the field is populating proprerly in internal tables, but in ALV display it is displaying as 100/01/01. How to consider leading zero in ALV for a CHAR datatype field.
Thanks in Advance.Hi Srnii,
You can use the below sample statement
Shift mara-matnr right deleting trailing ' '.
overlay mara-matnr with '0000000'.
Thanks,
Chidanand -
Reading fields from ALV display
Hi All,
I have a check box in front of each data record in the ALV display. This check box is editable. The user will check some records after seeing the details and click on a puch button provided. On the click of this button I need to read all the records whose check box has been checked.
However, this edited value of check box is not getting reflected in the program. Is there any FM or any other method through which I can read the changed values in the ALV display ??
Request your urgent help.
Thanks and Regards,
Archana.Hi ,
Please see this example program - BCALV_EDIT_05
I am sure this will help you.
If u have used standard ALV function module(REUSE_ALV_GRID_DISPLAY) instead of class cl_gui_alv_grid , then you can set layout and fieldcatalog accordinglly.
dont forget to add filed
checkbox type c.
in your display table (itab).
fieldcatalog setting :
for field : 'CHECKBOX'.
<b> ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.</b>
In user command subroutine :
check displayed internal table (itab here)
u will find the checkbox-checked record has itab-checkbox = 'X' .
Regards,
Mihir. -
Quantity field not getting displayed for all document types
Hi,
I have made a configuration to include field Quantity(BSEG-MENGE) in the GL account line item display.When I ran the report for stock adjustment account(FAGLL03), only the following document types are showing quantity against them.
WI- Inventory document
WA-Goods Issue
WE---Not showing quantity against (WE- Goods Receipt)
Can any one please explain. I have seen the original document from FI document. The original document as well as FI document carries quantity.
Thanks
AravindHi Aravind,
Check SAP notes 1063198 and 1117587.
FAGLL03 display quantity which is updated in FAGLFLEXA, BSEG is not
relevant in this case. This is clearly explained in the note 1063198.
The quantity posts through to FI on the 'goods receipt' items, but not on the
'invoice receipt' items.
In the FI normally the Quantity is not a 'real' important field, as it
is more related to the MM area.
But in the old 'Profit Center Accounting' and the old' Special Ledger'
the field has been important.
As the same logic of these areas to 'store' the Quantity is also used
in the NewG/L the field get only filled in the line, where it make
'sense' from our point of view, because only in the 'goods receipt'
lines a 'real' Quantity is posted to the system.
So as before in the PCA and SL, now also in the NewG/L the Quantity is
filled in the correct and important lines and postings.
In the BSEG ('old document segment table') the field is filled 'just'
as it is send to the FI, but this is not completely correct from the
business point of view.
This can also lead to issues with the reporting and summation to this
field. So with creating the new logic in the NewG/L the 'correct'
standard of the 'writing' for the Quantity has also been taken over.
So in the end, the update and display is correct according SAP standard behavior.
Actually,Quantities within G/L are never reliable,
because the purpose of FI is a view on the data according to amount
but not according to quantity.
In the FI normally the Quantity is not a 'real' important field, as it
is more related to the MM area.
I hope I could be of assistance.
Regards,
Fernando -
Quantity field not getting displayed
Hi,
I am using Adaptived RFC Model to get Sales Order Data from SAP. The Sales Order BAPI that i am using is
BAPI_SALESORDER_DETAIL. I have mapped the SALESORDER table(SALESOPRDER Model node) to the TABLE UI element in my WebDynpro Application.
The problem i am facing is that while all the fields get displayed the Quantity value is not getting displayed in the appropriate column. I have checked the mapping and everything seems to be fine.
Also when i create a separate value node for the table and fill the value node from the model node the quantity value gets displayed then.
Please suggest what can be the possible cause for this.
Regards
Sidharth
Can you pleaseHi,
As far as I understand you display output parameters of BAPI, so check to following things:
1. After calling BAPI model method call invalidate on context node to update the values (e.g. outputNode.invalidaet() )
2. Check that you dispaly output parameters and not input parameters of the table. (e.g. You have Quantity and QuantityOutput node so connect you table field to QuantityOutput)
Hope it helps.
Victor. -
Hi Experts,
How can we hide a field in the ALV Dipslay.hi check this ....
here i had 3 fields and i am displaying 2 only..
REPORT ZPR_02 no standard page heading.
TYPE-POOLS: SLIS.
TABLES: MARA.
DATA: BEGIN OF IT_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
MATKL LIKE MARA-MATKL,
check type c,
END OF IT_MARA.
DATA: IT_FIELD_CAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELD_CAT TYPE SLIS_FIELDCAT_ALV,
IT_EVENTS TYPE SLIS_T_EVENT,
WA_EVENTS TYPE SLIS_ALV_EVENT,
IT_HEADER TYPE SLIS_T_LISTHEADER,
WA_HEADER TYPE SLIS_LISTHEADER,
wa_layout type SLIS_LAYOUT_ALV.
data : is_variant like disvariant.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM BUILD_FIELD_CAT.
PERFORM GET_EVENTS.
PERFORM DISPLAY_DATA.
*& Form get_data
text
FORM GET_DATA .
SELECT MATNR
MTART
MATKL FROM MARA
INTO TABLE IT_MARA
WHERE MATNR IN S_MATNR.
ENDFORM. " get_data
*& Form build_field_cat
text
FORM BUILD_FIELD_CAT .
CLEAR WA_FIELD_CAT.
WA_FIELD_CAT-COL_POS = 4.
WA_FIELD_CAT-FIELDNAME = 'MATNR'.
WA_FIELD_CAT-SELTEXT_L = 'Material Number'.
WA_FIELD_cat-no_zero = 'X'.
WA_FIELD_CAT-emphasize = 'C100'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
clear WA_FIELD_CAT.
WA_FIELD_CAT-COL_POS = 2.
WA_FIELD_CAT-FIELDNAME = 'MTART'.
WA_FIELD_CAT-SELTEXT_L = 'Material Type'.
WA_FIELD_CAT-no_out = 'X'.
WA_FIELD_CAT-emphasize = 'C110'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
clear WA_FIELD_CAT.
WA_FIELD_CAT-COL_POS = 3.
WA_FIELD_CAT-FIELDNAME = 'MATKL'.
WA_FIELD_CAT-SELTEXT_L = 'Material Group'.
WA_FIELD_CAT-JUST = 'R'.
WA_FIELD_CAT-emphasize = 'C410'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
clear WA_FIELD_CAT.
ENDFORM. " build_field_cat
*& Form display_data
text
FORM DISPLAY_DATA .
wa_layout-box_fieldname = 'CHECK'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'GUI_SET'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELD_CAT
IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = IT_MARA.
ENDFORM. " display_data
*& Form GUI_SET
FORM GUI_SET USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'A000'.
ENDFORM. "GUI_SET
*& Form USER_COMMAND
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
R_SELFIELD TYPE SLIS_SELFIELD.
*refresh itab.
CASE R_UCOMM.
WHEN 'TEST'.
when 'LIST'.
ENDCASE.
ENDFORM. "USER_COMMAND
*& Form get_events
text
FORM GET_EVENTS .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IT_EVENTS .
READ TABLE IT_EVENTS INTO WA_EVENTS
WITH KEY NAME = SLIS_EV_TOP_OF_PAGE.
IF SY-SUBRC = 0.
WA_EVENTS-FORM = 'TOP_OF_PAGE'.
MODIFY IT_EVENTS FROM WA_EVENTS INDEX SY-TABIX.
ENDIF.
ENDFORM. " get_events
*& Form top_of_page
text
FORM TOP_OF_PAGE.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = 'Material Data'.
APPEND WA_HEADER TO IT_HEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_HEADER
I_LOGO = I_LOGO
I_END_OF_LIST_GRID = I_END_OF_LIST_GRID
I_ALV_FORM = I_ALV_FORM
ENDFORM. "top_of_page
regards,
venkat. -
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.
Vickyhi 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
Maybe you are looking for
-
VPN Problems ASA 5505 to 7206 Router MM_WAIT_MSG2
Hi Since I swapped a Pix Firewall for a Cisco ASA 5505 Firewall at one of our Sites the VPN Tunnel wont come up I'm getting this: asaXXXXX# sho crypto isakmp sa Active SA: 1 Rekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during reke
-
How do I copy a page from one Pages document to another using Pages 5.0?
I posted this question on another page, and haven't recieved an answer to it yet. However I have found a temporary solution, so I am posting this here in case anyone else has a similar problem. The issue here is that I have just upgraded from Snow Le
-
Connecting iMac to stereo receiver
I am trying to figure out the best way to connect my iMac to a stereo receiver. Which option will result in superior sound on my home stereo: (1) running a TOSLINK cable from the iMac's optical digital audio out port to the receiver's optical input o
-
Why is Finder (desktop) getting stuck on MacBookPro?
I have OSX version 10.7.4 and my desktop keeps freezing while I am moving things from folder to folder. My browser will work, but nothing on my desktop, the wheel just keeps spinning. I have to shut the computer off and then have trouble restarting.
-
How to restrict acess to a single user for a proxy service in OSB
how to restrict acess to a single user for a proxy service in OSB