ALV GRID out put issue
hi,
how to increase the font size of the output of alv grid...
Actually my list is printing nearly 50 lins in one page how to control it to 20 and how to increase the font size in the alv grid output
can anyone guide me its bit urgent plzzzzzz
SIRI
Ya Rich,
Actually... While i am taking all the records on the paper i got all the records on one page so if they wanted to enter some more data in the last filed which i provided blank they were telling that its too small font and its not so easy to enter
so they were asking me to do the above job
how to do that can u guide me plz
SIRI
Similar Messages
-
Field Length in Alv Grid out put
hi,
How to increase the length of the filed in the output of alv grid,
Actually i am getting one blank field in the alv grid out put, my requirement is to increase the length through out the column how to do that
can anyone guide me plz
SIRIin your fieldcat of the field
wfieldcat-fieldname = '<your fieldname in caps>'
wfieldcat-outputlen = 10 (or the length you want for the field)
<you can define any other property also for that field>
append wfieldcat to ifieldcat.
now pass it in fm.
regards
shiba dutta -
Hi SAP Experts,
Currently I have ALV Grid table as below as example :
FIELD1
FIELD2
Account
Amount
1. Rev
1.Rev
Acct1
100.00
1. Rev
1.Rev
Acct2
50.00
Subtotal FIELD2 (1.Rev)
150.00
Subtotal FIELD1 (1.Rev)
150.00
2. Cost
2.1 Cost1
Acct3
100.00
2. Cost
2.1 Cost1
Acct4
75.00
Subtotal FIELD2 (2.1 Cost1)
175.00
2. Cost
2.2 Cost2
Acct5
25.00
Subtotal FIELD2 (2.2 Cost 2)
25.00
| Subtotal FIELD1 (2.Cost) | 200.00 |
I have 2 questions.
First, as you can see, I have 2 subtotal for 1.Rev eventhough 1.Rev actually only need one subtotal because there is no subgroup for 1.Rev. Is it possible to have only one subtotal for this 1.Rev but I still maintained 2 subtotal for 2.Cost because 2.Cost has subgroup?
My 2nd issue is I need to insert another row exactly below Subtotal FIELD1 (2.Cost) row like this:
Gross Margin
(Some formula)
This row does not come from any sub total. The problem is I can not just insert this column and put Gross Margin description in FIELD1 because I will have 3 row like below :
Gross Margin
(Formula)
Subtotal FIELD2 (blank)
(Formula) sub total
Subtotal FIELD1 (Gross Margin)
(Formula) sub total
Is there any way I can insert Gross Margin Row without creating new subtotal for it so it will only have one line in the ALV Grid table? Please help. Thank you.
Regards,
AbrahamHi Vijay.
I'm not posting this before I search everywhere and this is not the first time I post in this forum so I know what I should do before posting. If I miss something, maybe you can give me at least a hint whether it can be done or not.
This report that I am using is ALV Grid using REUSE_ALV_GRID_DISPLAY function module and not OOP using dialog module. I never said I need sample code because I only want to know is there a way to do that using ALV Grid which until now I will say that SAP ALV grid has this limitation where you can not insert row without including it in the subtotal.
So, I would be very thankful if someone can give me some clarity on this thing and Vijay, if you really don't know what is the answer, I really appreciate if you can hold your self from making that kind of reply. It does not need experienced ABAP Consultant to write such remarks. Thanks.
Regards,
Abraham -
hi,
i am not able to get the print preview for delivery output, i have checked delivery output has got determined, when i goto vl02n, and issue out put then i am able to get the delivery output type, when i select the output type and click on the print preview i get the error "output could not be issued" errormessage no. vl086.
please suggestHi,
1) Kindly check what output type is assisgned to the Delivery Type at OVLK.
2) Then goto Tcode-> NACE.
Select V2-> 'Shipping' and click on Condition Record.
Then select the approprieate Access sequence and check whether condition record is maintained or not.
3) If condition record does not exit create , if created then select the approprieate method and Select the condition record and click on the communication button. Here Output Device, Print immediately should be checked.
Thank You,
RB -
could anybody advice, ALV GRID FM(field catalog issue)is getting short dump, but workig fine for ALV LIST.
PERFORM create_field_catalog USING:
'TRAFFIC_LIGHT' ' ' 15 'Status' 'Status' ' ',
'VKORG' ' ' 15 'Sales Org' 'Sales Org' ' ',
'VTWEG' ' ' 15 'Dist Channel' 'Dist Channel' ' ',
'KUNRG' ' ' 15 'Payer' 'Payer' ' ',
'PAYER' ' ' 15 'Payer Name' 'Payer Name' ' ',
'KUNAG' ' ' 15 'Ship-To' 'Ship-To' ' ',
'SHIPTO' ' ' 15 'Ship-To Name' 'Ship-To Name' ' ',
'SHIPTOPAR' ' ' 15 'Bill to Party' 'Bill To Party' ' ',
'KDGRP' ' ' 15 'Customer Grp' 'Customer Grp' ' ',
'ZCUSTPO' ' ' 15 'Customer PO' 'Customer PO' ' ',
'VBELN' ' ' 15 'Billing Doc' 'Billing Doc' ' ',
'FKDAT' ' ' 15 'Billing Date' 'Billing Date' ' ',
'FKART' ' ' 15 'Billing Type' 'Billing Type' ' ',
'ZOUTPUT' ' ' 15 'Output Type' 'Output Type' ' ',
'NETWR' ' ' 15 'Net Value' 'Net Value' 'X',
'KWERT' ' ' 15 'Total VAT' 'Total VAT' 'X',
'WAERK' ' ' 15 'Currency' 'Currency' ' ',
'XBLNR' ' ' 15 'Reference' 'Reference' ' ',
'DELNO' ' ' 15 'Delivery #' 'Delivery #' ' ',
'TLINE' ' ' 15 'Manifest #' 'Manifest #' ' ',
'ZBOL' ' ' 15 'Bill Of Ldng' 'Bill of Ldng' ' ',
'LIFEX' ' ' 15 'Ext Del #' 'Ext Del #' ' ',
'POSNR' ' ' 15 'Item' 'Item' ' ',
'MATNR' ' ' 18 'Material' 'Material' ' ',
'KDMAT' ' ' 15 'Cust Matl' 'Cust Matl' ' ',
'WERKS' ' ' 15 'Plant' 'Plant' ' ',
'ZZPLAT' ' ' 10 'Platform' 'Platform' ' ',
'ZZPRONUM' ' ' 10 'Program' 'Program' ' ',
'ZZPROCODE' ' ' 10 'Prod Code' 'Prod Code' ' ',
'FKIMG' ' ' 15 'Qty' 'Qty' ' ',
'VRKME' ' ' 15 'UoM' 'UoM' ' ',
'ARKTX' ' ' 15 'Description' 'Description' ' ',
'KBETR' ' ' 15 'Price' 'Price' ' ',
'VATRT' ' ' 15 'VAT Rate' 'VAT Rate' ' ',
'KWERT_D' ' ' 15 'Item VAT' 'Item VAT' 'X',
'NETWR_D' ' ' 15 'Item Net Value' 'Item Net Value' 'X',
'VGBEL' ' ' 15 'Ref Document' 'Ref Document' ' ',
'VGPOS' ' ' 13 'Ref Doc Line' 'Ref Doc Line' ' ' .
FORM create_field_catalog USING fieldname TYPE c
inttype TYPE c
outputlen TYPE i
coltext TYPE c
seltext TYPE c
do_sum TYPE c.
DATA: l_f_fieldcat TYPE slis_fieldcat_alv.
l_f_fieldcat-fieldname = fieldname.
l_f_fieldcat-inttype = inttype.
l_f_fieldcat-outputlen = outputlen.
l_f_fieldcat-seltext_m = coltext.
l_f_fieldcat-seltext_l = seltext.
l_f_fieldcat-reptext_ddic = coltext.
l_f_fieldcat-do_sum = do_sum.
APPEND l_f_fieldcat TO t_field_catalog.
CLEAR l_f_fieldcat.
ENDFORM. "CREATE_FIELD_CATALOG
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = 'F_USER_COMMAND'
i_grid_settings = f_grid_settings
is_layout = f_grid_layout
is_print = f_print_settings
i_background_id = 'BACK'
it_events = t_events[]
it_fieldcat = t_field_catalog
it_sort = t_sortcat[]
i_default = 'X'
i_save = 'A'
is_variant = f_variant
TABLES
t_outtab = t_output4
EXCEPTIONS
program_error = 1
OTHERS = 2.BEGIN OF t_output4 OCCURS 0,
traffic_light TYPE c,
vkorg LIKE vbrk-vkorg,
vtweg LIKE vbrk-vtweg,
kunrg LIKE vbrk-kunrg,
payer LIKE adrc-name1,
kunag LIKE vbrk-kunag,
shipto LIKE adrc-name1,
shiptopar LIKE likp-kunnr,
kdgrp LIKE vbrk-kdgrp,
zcustpo LIKE vbkd-bstkd,
vbeln LIKE vbrk-vbeln,
fkdat LIKE vbrk-fkdat,
fkart LIKE vbrk-fkart,
zoutput LIKE dnast-kschl,
netwr LIKE vbrk-netwr,
kwert LIKE konv-kwert,
waerk LIKE vbrk-waerk,
xblnr LIKE vbrk-xblnr,
delno LIKE likp-vbeln,
t_line LIKE tline-tdline,
zbol LIKE likp-bolnr,
lifex LIKE likp-lifex,
posnr LIKE vbrp-posnr,
matnr LIKE vbrp-matnr,
kdmat LIKE lips-kdmat,
werks LIKE vbrp-werks,
zzplat LIKE vbrp-zzplat,
zzpronum LIKE vbrp-zzpronum,
zzprocode LIKE a802-zzprocode,
fkimg LIKE vbrp-fkimg,
vrkme LIKE vbrp-vrkme,
arktx LIKE vbrp-arktx,
kbetr LIKE konv-kbetr,
vatrt TYPE p DECIMALS 1,
kwert_d LIKE konv-kwert,
netwr_d LIKE vbrp-netwr,
vgbel LIKE vbrp-vgbel,
vgpos LIKE vbrp-vgpos,
END OF t_output4, -
Dear All,
I have one sales order where out put types DLO1, DLO3 and DLO4 are determined as sales order confirmation out put. The transmission medium for all of these is Print out ie external send.
Here in the sales order multiple out puts are issued. Customer has received 5-6 mails for each output. When i go to out put determination / edit screen thre also i can see as many number of lines partaining to output types.
Can you please help me solving this issue since i am not able to analyse from where or how this thing is happening.
One imp thing i noted that all the out put are automatically detemined. I mean no mannual addtion of lines has happened.
Regards,
Vishi.Hi Vishi
Please check you routine associated with your output type, suppose you have a requiremnt that is qty=5 then trigger DLO1, in such cases every time you save sales order with qty =5 output will trigger automatically.
To avoid such cases add some code in routine that is output has already triggered then don't trigger.
Take help of ABAPer.
try and revert -
Hi Gurus,
I have customized billing document out put as follows:
1) i have maintained condition table 002 that is Sales Org/Billing document type.
2) i have maintained condition type with Z and given appropriate name and In the overview i have maintained following details against each Tab:
General Data tab :
i have given access sequence as 002 that is Sales
org and billing type i have clicked on Access to
conditions.
Default values tab :
Dispatch time : 3 Send with application own transaction
Transmission medium : Print output
Partner function : BP bill to party
Communication Strategy : blank
Time tab:
no were i have maintained any value.
Storage System:
Storage Mode : printing only
Document type: SDINVOICE
Print:
Print Param : Sales organization
In Processing routines :
in output type : i have maintained my own output type
Application : V3
Medium : Print out
Program : RLB_INVOICE
FORM routine : Entry
PDF/Smart form : ZLB_BIL_VATINVOICE2
Partner function :
i have maintained Out type
Medium : print out
function : BP
In determination procedure V10000
i have maintained my output types and i have given requirement 62 for my all out put types.
and i have assigned this out type procedure to my billing documents.
i have maintained condition records (VV31) for my key combination Sales org and billing type.
But problem is after saving my billing document and posting the billing document i am not getting out put type automatically.
Even i am not able to see any billing documents in t-code VF31 after giving necessary details.
So pls tell me where i am wrong in config
My second question is we have made couple of invoices proper to this config so will system pick up those invoices which are pending for print out by giving VF31.
Please reply me on urgent basis since all the invoices are pending for print out and client is panic.
Correct asn will get good reward.
thanks & regards
SriniHi murali,
thanks for your reply
I have maintained communication for condition records
like Output Device : ZAA3
clicked on Print immediately
release after output
these i have maintained in condition records.
So please tell me where else i am missing.
thanks
Srini -
Dear All PP gurus,
I am having one issue regarding MRP as below
We encounter one item 1.03424.0009 x 6 , which system did not prompt us to buy on 30.03.09 after MRP run .
Can you please advise why ?
strategy is 40,MRP type PD ,Lot size is MB,Availability check ZC,Procurement type F.
Means what my problem is that why the system didnot prompt to buy yhis item on 30.03.2009?
Thanks,
NarayanHi,
Please create a planning file entry for this material - plant combination using MD20.
After creating the entry, re-run MRP & the system should put out a procurement proposal if there is no stock.
Check & revert if it resolves the issue.
Regards,
Vivek
Added
For MRP run to consider a material, initial pre-requisites the MRP type should be relevant for MRP eg: PD, then a planning file entry should exist.
In this case as you say there is no planning file entry, system will not consider the same. Hope it clarifies your query.
Edited by: Vivek on Apr 7, 2009 4:24 PM -
ALV Report out put not down loading in XLS sheet
Hi Guis,
I am trying to down load ALV report output in XLS sheet . I am selecting LIST ->SPREADSHEET->TABLE
I am getting the fallowing message . Even though I have 18 columns .
An XXL list object is exported with
8 lines and 1 columns.
But no data has been exported in the XLS sheet.
Will you please any body solve my problem.
Thanks,
Santhosh .VDoesn't It work if you try to export to all extensions?
Case yes, the problem really would be with the composition of the field catalog. You can search for another one where the exportation works and compare to know.
Try to open your ALV using the office integration to test (button that opens your output inside excel).
Regards,
Alysson Dias -
sales order is created for sales area 1000/10/00. The material used in the sales order belongs to division 10.
There is a condition record maintained for delivery output with combination of 1000/10/10 and this is getting picked at the delivery header.
question is how this record is picked up in the delivery of the sales order that is created for 1000/10/00.
Issue is imp, kindly guide on this.Helllo,
Goto change mode of the Delivery document and goto the Extras-Delivery output-Header and then choose the output type
In the Menu bar you can find DETERMINE ANALYSIS for output, Please check there, you can get some idea .
May be in the Output definition you might have set the Output as Manual entry option also.
Please check and revert back.
regards,
santosh -
Creation of pf-status functionality in ALV out put
Hi experts,
i created pf-status and made one button to save the ccontents displayed in ALV grid out put.
But i could not find that button in out put. Is it possible to create custom functionality in ALV output.
thank you
regards
vijayHi Viajay,
find the below steps to create the PF-STATUS..
PF-Status
1. How to set pf-status
2. How to set pf-status excluding/including single menu items
3. How to set pf-status excluding/including several menu items
4. Setting PF status to the (SAP) system default
5. How to check for pf-status
6. Use of SY-PFKEY
1. How to set pf-status
set pf-status 'ZZBILSTA'.
2. How to set pf-status excluding/including single menu items
You can exclude menus by using exclude :
set pf-status 'ZZBILSTA' excluding 'PST'.
Note: Can also be used with include instead of exclude
3. How to set pf-status excluding/including several menu items
You have to use an internal table to store the status you wan't to ex- or include:
DATA: BEGIN OF I_PF_STATUS_TAB OCCURS 10,
FCODE(4),
END OF I_PF_STATUS_TAB.
FORM SET_PF_STATUS_POSTER.
REFRESH I_PF_STATUS_TAB.
MOVE 'PST' TO I_PF_STATUS_TAB.
APPEND I_PF_STATUS_TAB.
MOVE 'ART' TO I_PF_STATUS_TAB.
APPEND I_PF_STATUS_TAB.
SET PF-STATUS 'ZZBILSTA' EXCLUDING I_PF_STATUS_TAB.
ENDFORM.
4. Setting PF status to the (SAP) system default
set pf-status 'BASIC'.
5. How to check for pf-status
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'ART'.
PERFORM STYR_ARTSKONTI.
WHEN 'PST'.
PERFORM STYR_POSTER.
WHEN 'BIL'.
PERFORM VIS_BILAG.
ENDCASE.
6. Use of SY-PFKEY
You can use the system variable sy-pfkey to retrieve the name of the current pf status
Regards,
Prabhudas -
Dynamic ALV Grid is not displaying !!
Hi all,
I am trying to create dynamic alv grids and upto five levels(five grids) out put is displaying fine without any problem. But when I try to display the 6th grid, the program is going into infinite loop and getting timed out. Even I tried to increse the height of the grid even though it is not displaying.
Please correct me if any thing is wrong in below code.
*1st Level grid
IF <table1> IS ASSIGNED AND <table1> IS NOT INITIAL.
CREATE OBJECT ob_split1
EXPORTING
parent = ob_custom
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split1 '20'.
CREATE OBJECT ob_grid1
EXPORTING
i_parent = ob_split1->top_left_container.
ELSE.
CREATE OBJECT ob_split1
EXPORTING
parent = ob_custom
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split1 '0'.
ENDIF.
*2nd Level grid
IF <table2> IS ASSIGNED AND <table2> IS NOT INITIAL.
CREATE OBJECT ob_split2
EXPORTING
parent = ob_split1->bottom_right_container
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split2 '20'.
CREATE OBJECT ob_grid2
EXPORTING
i_parent = ob_split2->top_left_container.
ELSE.
CREATE OBJECT ob_split2
EXPORTING
parent = ob_split1->bottom_right_container
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split2 '0'.
ENDIF.
(Created 3rd,4th,5th same like above).
*6th Level grid
IF <table6> IS ASSIGNED AND <table6> IS NOT INITIAL.
CREATE OBJECT ob_split6
EXPORTING
parent = ob_split5->bottom_right_container
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split6 '20'.
CREATE OBJECT ob_grid6
EXPORTING
i_parent = ob_split6->top_left_container.
ELSE.
CREATE OBJECT ob_split6
EXPORTING
parent = ob_split5->bottom_right_container
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split6 '0'.
ENDIF.
Appreciated your reply. Please let me know for additional info.
Thanks,
Ranjith.
Edited by: Thomas Zloch on Dec 8, 2010 5:44 PM - please use code tagsHi romanch,
defining the field catalog you must reference all currency fields to the respective currency key field (type CUKY).
<alv_fieldcat>-cfieldname = 'HWAER'.
This is sample for alv output of a currency field. The alv structure has a field HWAER which carries the currency key, e.g. USD or so.
Obviously you do not provide a cutrrency key for your values. If they are initial (zero), ALV will not display them as 0,00 but leave the field empty if the reference too currency key is not established.
If you define a DDIC structure for the ALV output this refernce is enforced. You can pass the DDIC structure name to the ALV and don not have to create the field catalog manually.
Regards,
Clemens -
ALV Grid Collect Statment for SUM the data.
Hellow Experts,
i am new to ABAP i have on programme which output is coming like ,
Prod.ID ... .... ... Qnty in Date1 .. Qnty in Date2... Qnty in Date3........Qnty in Date31.
0001 12.1 0.00 10.1
0001 12.1 0.00 10.1
I need the summestion of qnty against that date , and prodId should not repate my Output should be like this,
Prod.ID ... .... ... Qnty in Date1 .. Qnty in Date2... Qnty in Date3........Qnty in Date31.
0001 24.2 0.00 20.2
0002 12.1 0.00 10.1
I wrote collect statment but its not working , plz help me for this, and one more thing that i am passing the data to gt_data.
My code is here,
TABLES: AFRU,AUFK,VBAK,KNA1,VBAP,VBKD.
DATA: BEGIN OF i_alv OCCURS 0,
ARBID TYPE AFRU-ARBID,
BUDAT TYPE AFRU-BUDAT,
WERKS TYPE AFRU-WERKS,
LMNGA TYPE AFRU-LMNGA,
AUFNR TYPE AFRU-AUFNR,
KDAUF TYPE AUFK-KDAUF,
KDPOS TYPE AUFK-KDPOS,
VBELN TYPE VBAK-VBELN,
KUNNR TYPE VBAK-KUNNR,
NAME1 TYPE KNA1-NAME1,
MATNR TYPE VBAP-MATNR,
KDKG1 TYPE VBKD-KDKG1,
end of i_alv.
TYPES: BEGIN OF ty_data,
lmnga TYPE AFRU-LMNGA,
BUDAT TYPE AFRU-BUDAT,
ARBID TYPE AFRU-ARBID,
aufnr TYPE AFRU-AUFNR,
kdauf TYPE AUFK-KDAUF,
name1 TYPE KNA1-NAME1,
matnr TYPE VBAP-MATNR,
kdkg1 TYPE VBKD-KDKG1,
END OF ty_data,
tt_data TYPE STANDARD TABLE OF ty_data,
BEGIN OF ty_dyn1, "#EC NEEDED
ARBID TYPE AFRU-ARBID,
aufnr TYPE AFRU-AUFNR,
kdauf TYPE AUFK-KDAUF,
name1 TYPE KNA1-NAME1,
matnr TYPE VBAP-MATNR,
kdkg1 TYPE VBKD-KDKG1,
END OF ty_dyn1,
BEGIN OF ty_dyn2, "#EC NEEDED
date TYPE AFRU-LMNGA,
END OF ty_dyn2,
BEGIN OF ty_cols,
date TYPE BUDAT,
END OF ty_cols,
tt_cols TYPE SORTED TABLE OF ty_cols WITH UNIQUE KEY date.
DATA: gt_data TYPE tt_data,
gt_data2 type tt_data,
gt_cols TYPE tt_cols,
gs_col TYPE ty_cols.
DATA: go_sdescr TYPE REF TO cl_abap_structdescr,
go_sdescr_new TYPE REF TO cl_abap_structdescr,
go_tdescr TYPE REF TO cl_abap_tabledescr,
gdo_handle TYPE REF TO data,
gs_component TYPE abap_compdescr,
gs_comp TYPE abap_componentdescr,
gt_components TYPE abap_component_tab,
gr_data TYPE REF TO cl_salv_table,
gr_funct TYPE REF TO cl_salv_functions,
gr_columns TYPE REF TO cl_salv_columns_table,
gr_column TYPE REF TO cl_salv_column_table,
g_col TYPE lvc_fname,
g_txt TYPE scrtext_l.
FIELD-SYMBOLS: <t_data> TYPE ANY TABLE,
<s_data> TYPE any,
<c> TYPE any,
<d> TYPE ty_data.
DATA: pono TYPE ztecerti-pono,
jobno TYPE ztecerti-jobno,
sdk TYPE string,
insert TYPE c,
ok_code LIKE sy-ucomm.
CALL SCREEN 100.
START-OF-SELECTION.
* Populate test data
FORM get_data.
SELECT A~ARBID
A~BUDAT
A~WERKS
A~LMNGA
A~AUFNR
B~KDAUF
B~KDPOS
C~VBELN
C~KUNNR
D~NAME1
E~MATNR
F~KDKG1
INTO CORRESPONDING FIELDS OF TABLE gt_data
FROM AFRU AS A INNER JOIN AUFK AS B ON A~AUFNR EQ B~AUFNR
INNER JOIN VBAK AS C ON B~KDAUF = C~VBELN
INNER JOIN KNA1 AS D ON C~KUNNR = D~KUNNR
INNER JOIN VBAP AS E ON B~KDAUF = E~VBELN
INNER JOIN VBKD AS F ON B~KDAUF = F~VBELN
WHERE A~ARBID = '10000181' AND A~BUDAT BETWEEN PONO AND jobno
GROUP BY A~ARBID A~LMNGA A~BUDAT A~WERKS A~AUFNR B~KDAUF F~KDKG1 E~MATNR D~NAME1 C~KUNNR C~VBELN B~KDPOS
ORDER BY B~KDPOS.
*collect gt_data into gt_data2.
*gt_data
*LOOP AT gt_data ASSIGNING <d>.
ENDFORM.
Thanking you i realy need it badlyAnswer is fully given here: Re: alv grid Cross Tab Issue....
m. -
Hi,
i need a help from you my dear friend I'm providing you the following information in which i have extract some of the fields from two internal tables and i have to display it in the alv grid format. All the work was done successfully but the problem is the values from internal table are moved but the values are not coming in output in ALV grid format. so pleease try to solve my problem.
Thanking you
TABLES: J_1IEXCHDR, J_1IEXCDTL.
type-pools: slis.
DATA: ITAB1 TYPE J_1IEXCHDR OCCURS 0 WITH HEADER LINE.
DATA: ITAB2 TYPE J_1IEXCHDR OCCURS 0 WITH HEADER LINE.
DATA: ITAB3 TYPE J_1IEXCHDR OCCURS 0 WITH HEADER LINE.
DATA: OK_CODE LIKE SY-UCOMM,
GT_SFLIGHT TYPE TABLE OF itab,
G_CONTAINER TYPE SCRFNAME VALUE 'BCALV_GRID_DEMO_0100_CONT1',
GRID1 TYPE REF TO CL_GUI_ALV_GRID,
G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
DATA: G_TABNAME TYPE SLIS_TABNAME VALUE 'RTAB_ALV'.
data: fieldcat type slis_t_fieldcat_alv.
data: begin of itab occurs 0,
lifnr type j_1iexchdr-lifnr,
docno type j_1iexchdr-docno,
exyear type j_1iexchdr-exyear,
budat type j_1iexchdr-budat,
exbed type j_1iexcDTL-exbed,
rdoc1 type j_1iexcDTL-rdoc1,
ecs type j_1iexcDTL-ecs,
exbas type j_1iexcDTL-exbas,
end of itab.
start-of-selection.
perform get_data.
perform call_alv.
form get_data.
select * into corresponding fields of table itab
from J_1IEXCHDR
inner join J_1IEXCDTL
on J_1IEXCDTLlifnr = J_1IEXCHDRlifnr
where J_1IEXCHDr~status = 'P'.
append itab.
endform.
CALL_ALV
form call_alv.
perform build_field_catalog.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = i_repid
IT_SORT = gt_sort
it_fieldcat = fieldcat[]
TABLES
t_outtab = itab
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.
Call ABAP List Viewer (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = fieldcat
tables
t_outtab = itab.
endform.
form build_field_catalog.
clear: fieldcat. refresh: fieldcat.
data: tmp_fc type slis_fieldcat_alv.
tmp_fc-reptext_ddic = 'Vendor No'.
tmp_fc-fieldname = 'lifnr'.
tmp_fc-tabname = 'itab'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
tmp_fc-reptext_ddic = 'docno'.
tmp_fc-fieldname = 'docno'.
tmp_fc-tabname = 'itab'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
tmp_fc-reptext_ddic = 'exyear'.
tmp_fc-fieldname = 'exyear'.
tmp_fc-tabname = 'itab'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
tmp_fc-reptext_ddic = 'budat'.
tmp_fc-fieldname = 'budat'.
tmp_fc-tabname = 'itab'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
tmp_fc-reptext_ddic = 'exbas'.
tmp_fc-fieldname = 'exbas'.
tmp_fc-tabname = 'itab'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
tmp_fc-reptext_ddic = 'exbed'.
tmp_fc-fieldname = 'exbed'.
tmp_fc-tabname = 'itab'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
tmp_fc-reptext_ddic = 'rdoc1'.
tmp_fc-fieldname = 'rdoc1'.
tmp_fc-tabname = 'itab'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
tmp_fc-reptext_ddic = 'ecs'.
tmp_fc-fieldname = 'ecs'.
tmp_fc-tabname = 'itab'.
tmp_fc-outputlen = '10'.
append tmp_fc to fieldcat.
endform.
*loop at itab.
*WRITE: / ITAB-LIFNR,
ITAB-DOCNO,
ITAB-EXYEAR,
ITAB-BUDAT,
ITAB-EXBAS,
ITAB-EXBED,
ITAB-RDOC1,
ITAB-ECS.
*endloop.Hi Praveen,
In the field cat internal tabel for fieldname you have to pass the values in caps.look at the followig eg:
tmp_fc-fieldname = 'LIFNR'.
let me know if you still have a problem after this change.
regards,
Raju -
ALV GRID edit mode keyboard issue
Hi,
I have created a program that displays an ALV GRID.
From the Layout I said to edit in edit mode the ALV Grid.
In the menu toolbar I exclude the button 'cut - copy -paste and delete line'.
When I run the program I see that these buttons are not displayed --> OK.
BUT my problem is: if I use the keyboard then the ALV Grid manages these actions.
For instance. I select some lines and press the key DELETE on the keyboard --> the lines are removed and that is not that I expect because I removed this action from the toolbar.
For the cut - copy and paste it's the same.
Do you have a solution for me --> intercept an event or change the function keys or ....
I would like that the ALV Grid does not manage the keys delete, CRTL-C, CRTL-V in edit mode.
Thanks,
Stevie,Hi Steve
I was not aware of this. So, I recommend you to try this:
At the event <b>"before_user_command"</b> you can terminate the process by resetting the ALV user command.
<u><b>e.g.</b></u>
CASE e_ucomm .
WHEN '&INFO' .
CALL METHOD gr_alvgrid->set_user_command
EXPORTING i_ucomm = space.
ENDCASE .
This code within the event overrides the '&INFO' function and terminates its process. For cut and copy, you can find out ucomm values by putting a break point inside the event and tracing the value of <b>"i_ucomm"</b>.
For some relevant issues, you can inspect the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf">"An Easy Reference For ALV Grid Control"</a>.
<i>As another thing, since you are a new SDN member, you are welcome and let me introduce you the SDN forums pointing system: You can assign points to posts you find helpful while solving your question. You can reward points by clicking the yellow star icon at header of each reply post. You can reward;
- one 10 points (solved)
- two 6 points (very helpful answer)
- many 2 points (helpful answer)</i>
Kind regards...
*--Serdar
Maybe you are looking for
-
I use BPM standalone 10g and BPM studio 10g. I copy the AntTasks folder to F: Then, I change the BPMHOME of all files. Then, I ran the ant. However, the ant is fail. Error mesage: F:\AntTasks\build.xml: 268: The file or path you specified (..\..\basi
-
Cannot run HP QTP 11 in integrated mode with Solution Manager 7.1
Hi, I have setup qtp to work with solution manager 7.1. QTP works in standalone mode with no issues. as soon as I try and use it in integrated, i.e. launch qtp from solution manager, the message "failed to start external test tools quicktest professi
-
Code to call url in abap program
code to call url in abap program using cl_http requests and save the outcome to a location in a file
-
Could someone help resolve this problem : I have created a program to change int to hex but it does not seem to woek ? What could be wrong ? import java.lang.String; import javax.swing.JOptionPane; // import class JOptionPane public class KcHexConver
-
Using iDVD to burn movie reduces quality. Any suggestions?
When i used iDVD to burn DVD the resulting picture quality was poor. I know that there is a better way to retain quality but can't remember how to do it.