Column heading is not coming while generating a .csv file from .sql file
Hi all,
Now since I am able to generate a .csv file by executing my .sql file, the column heading is missing in that. Please advise. I have used the following parameters in my query:
set linesize 1000
set colsep ','
set echo off
set feedback off
set pagesize 0
set trimspool on
spool /path/file.csv
select ...... from .... where .....;
spool off
exit
set pagesize 0 <-- your problem
you must set it into a high value (max value 50000)
see:
SQL> select * from dual;
D
X
SQL> set pagesize 0
SQL> select * from dual;
X
SQL> set pagesize 50000
SQL> select * from dual;
D
X
Similar Messages
-
How to generate XML file from SQL file !
I am new to XML publisher. I known one way to generate XML file is register one report file in concurrent manager.
But I want to generate XML file from sql file.
Could someone show me how to code in sql file, how to register is in concurrent manager.
Thanks !Hi
Phew ... not sure we have the space here. So I can point you in the right direction:
1. XML data generation - there are two packages in the db you can use with a plsql procedure, XMLGEN and SQL XML. You can also use java APIs too. Try checking the db documentation and search for the above methods.
2. Registering the report - the system administrators guide will provide this info. Hooking the program up with XMLP is covered here - http://www.oracle.com/technology/products/applications/publishing/resource/CM%20Whitepaper5.0.pdf
Regards, Tim -
Error while generating java client code from wsdl file
I am trying to generate a java client code from WSDL file um_workflowSaveCreateProfile.wsdl which includes um_workflowSaveCreateProfile_interface.wsdl file, so I am keeping both the files in the same folder and trying to generate the client code but it is showing me the below error highlighted .
um_workflowSaveCreateProfile.wsdl
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="E:/DIPPWF/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:oblix="http://www.oblix.com/" xmlns:obinterface="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile_interface" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile" targetNamespace="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile">
<import namespace="D:/DIPP/WSDL/um_workflowSaveCreateProfile_interface" location="um_workflowSaveCreateProfile_interface.wsdl"/>
<service name="OblixIDXML_um_workflowSaveCreateProfile_Service">
<port name="OblixIDXML_um_workflowSaveCreateProfile_Port" binding="obinterface:OblixIDXML_um_workflowSaveCreateProfile_Binding">
<soap:address location="http://localhost:7777/identity/oblix/apps/userservcenter/bin/userservcenter.cgi"/>
</port>
</service>
</definitions>
um_workflowSaveCreateProfile_interface.wsdl
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:oblix="http://www.oblix.com/" xmlns:oblixxmllocalschema="http://www.oblix.com/OblixXMLLocalSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile_interface" targetNamespace="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile_interface">
<types>
<xsd:schema targetNamespace="http://www.oblix.com/" elementFormDefault="qualified"
xmlns="http://www.oblix.com/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="../XMLSchema/common_parameters.xsd" />
<xsd:include schemaLocation="../XMLSchema/common_authentication.xsd" />
<xsd:include schemaLocation="../XMLSchema/workflowSaveCreateProfile.xsd" />
</xsd:schema>
<xsd:schema targetNamespace="http://www.oblix.com/OblixXMLLocalSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="request">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="params">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="oblix:ObWorkflowName"/>
<xsd:element ref="oblix:ObDomainName"/>
<xsd:element ref="oblix:ObWfComment" minOccurs="0"/>
<xsd:element ref="oblix:noOfFields"/>
<xsd:element ref="oblix:AttributeParams"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="version" type="xsd:string" use="optional"/>
<xsd:attribute name="application" type="xsd:string" use="required" />
<xsd:attribute name="function" type="xsd:string" use="required" />
<xsd:attribute name="mode" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="OblixIDXMLInput">
<part name="authentication" element="oblix:authentication"/>
<part name="request" element="oblixxmllocalschema:request"/>
</message>
<message name="OblixIDXMLOutput">
<part name="body" element="oblix:Oblix"/>
</message>
<portType name="OblixIDXMLPortType">
<operation name="OblixIDXML_um_workflowSaveCreateProfile">
<input message="tns:OblixIDXMLInput"/>
<output message="tns:OblixIDXMLOutput"/>
</operation>
</portType>
<binding name="OblixIDXML_um_workflowSaveCreateProfile_Binding" type="tns:OblixIDXMLPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="OblixIDXML_um_workflowSaveCreateProfile">
<soap:operation soapAction="http://www.oblix.com/"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
</definitions>
I am using WSDL2 Java for generating the client code .
Please suggest where am I wrong .
E:\axis2-1.4\bin>WSDL2Java -uri E:\DIPPWF\um_workflowSaveCreateProfile.wsdl -p R
ND -d adb -s -o build\client--http-proxy-host 10.74.93.35 --http-proxy-port 80
Using AXIS2_HOME: E:\axis2-1.4
Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_02
Retrieving document at 'E:\DIPPWF\um_workflowSaveCreateProfile.wsdl'.
Retrieving document at 'um_workflowSaveCreateProfile_interface.wsdl', relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_parameters.xsd', relative to 'f
ile:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_authentication.xsd', relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/workflowSaveCreateProfile.xsd', relati
ve to 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'navbar.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/workfl
owSaveCreateProfile.xsd'.
Retrieving schema at 'searchform.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/wo
rkflowSaveCreateProfile.xsd'.
Retrieving schema at 'component_basic.xsd', relative to 'file:/E:/DIPPWF/XMLSche
ma/workflowSaveCreateProfile.xsd'.
Retrieving schema at 'displaytype.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/c
omponent_basic.xsd'.
Retrieving schema at 'error.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/compone
nt_basic.xsd'.
Retrieving schema at 'component_workflowTicket.xsd', relative to 'file:/E:/DIPPW
F/XMLSchema/workflowSaveCreateProfile.xsd'.
Retrieving document at 'E:\DIPPWF\um_workflowSaveCreateProfile.wsdl'.
Retrieving document at 'um_workflowSaveCreateProfile_interface.wsdl', relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_parameters.xsd', relative to 'f
ile:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/common_authentication.xsd', relative t
o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'E:/DIPPWF/XMLSchema/workflowSaveCreateProfile.xsd', relati
ve to 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
Retrieving schema at 'navbar.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/workfl
owSaveCreateProfile.xsd'.
Retrieving schema at 'searchform.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/wo
rkflowSaveCreateProfile.xsd'.
Retrieving schema at 'component_basic.xsd', relative to 'file:/E:/DIPPWF/XMLSche
ma/workflowSaveCreateProfile.xsd'.
Retrieving schema at 'displaytype.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/c
omponent_basic.xsd'.
Retrieving schema at 'error.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/compone
nt_basic.xsd'.
Retrieving schema at 'component_workflowTicket.xsd', relative to 'file:/E:/DIPPW
F/XMLSchema/workflowSaveCreateProfile.xsd'.
*[ERROR] More than one part for message OblixIDXMLInput*
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException:
More than one part for message OblixIDXMLInput
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1162)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1085)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi
ng(WSDL11ToAxisServiceBuilder.java:686)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
int(WSDL11ToAxisServiceBuilder.java:538)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
ints(WSDL11ToAxisServiceBuilder.java:489)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:363)
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
llServices(WSDL11ToAllAxisServicesBuilder.java:107)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:147)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: Error parsing WSDL
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:153)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault: More than one part for message OblixIDXML
Input
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:397)
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
llServices(WSDL11ToAllAxisServicesBuilder.java:107)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:147)
... 2 more
Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessin
gException: More than one part for message OblixIDXMLInput
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1162)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1085)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi
ng(WSDL11ToAxisServiceBuilder.java:686)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
int(WSDL11ToAxisServiceBuilder.java:538)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
ints(WSDL11ToAxisServiceBuilder.java:489)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:363).
Thanks in advance.
akshayHello,
Were you able to resolve this issue ?
I am seeing the same issue and at my wits end.
regards
Amit -
Error while executing Multiple Stored Procedure through .sql file
Hi Guru's.
I am new to ORACLE. I am facing problem while creating Stored Procedure through .sql file.
I have one test.sql file with Stored Procedure is like,
CREATE OR REPLACE PROCEDURE skeleton1
AS
BEGIN
DBMS_Output.Put_Line('skeleton1');
END skeleton1;
CREATE OR REPLACE PROCEDURE skeleton2
AS
BEGIN
DBMS_Output.Put_Line('skeleton2');
END skeleton2;
Now when i try to execute this test.sql file through SQL PLUS it gives me Error like this
I am opening test.sql file from SQL PLUS,
SQL>
1 CREATE OR REPLACE PROCEDURE skeleton1
2 AS
3 BEGIN
4 DBMS_Output.Put_Line('skeleton1');
5 END skeleton1;
6 /
7 CREATE OR REPLACE PROCEDURE skeleton2
8 AS
9 BEGIN
10 DBMS_Output.Put_Line('skeleton2');
11* END skeleton2;
SQL> /
Warning: Procedure created with compilation errors.
SQL> show errors;
Errors for PROCEDURE SKELETON1:
LINE/COL ERROR
6/1 PLS-00103: Encountered the symbol "/"
SQL>
Please suggest how to create multiple CREATE PROCEDURE using single .sql script file....
Regards,
ShatrughanHi,
Try this
CREATE OR REPLACE PROCEDURE skeleton1
AS
BEGIN
DBMS_Output.Put_Line('skeleton1');
END ;
CREATE OR REPLACE PROCEDURE skeleton2
AS
BEGIN
DBMS_Output.Put_Line('skeleton2');
END;
/Save the file and call it.
Regards,
Bhushan -
Column Heading are not displayed in ALV Report using CL_SALV_DISPLAY?
Hi,
I am using CL_SALV_DISPLAY class to display data. I Created an Internal Table Dynamically based fieldcatalog which was prepared based data at run time. When i displayed data using CL_SALC_DISPALY data is display in output but column headings are not displayed.
can anyone suggest me how to display heading in ALV using CL_SALV_DISPLAY class, My code is
CLASS lcl_report DEFINITION
CLASS lcl_report DEFINITION.
PUBLIC SECTION.
METHODS:
display IMPORTING l_table TYPE string
l_fcat TYPE string.
ENDCLASS. "lcl_report DEFINITION
CLASS lcl_report IMPLEMENTATION
CLASS lcl_report IMPLEMENTATION.
METHOD display.
DATA: gr_table TYPE REF TO cl_salv_table.
DATA: gr_columns TYPE REF TO cl_salv_columns_table,
gr_column TYPE REF TO cl_salv_column_table,
ls_fcat TYPE slis_fieldcat_alv.
DATA: gr_display TYPE REF TO cl_salv_display_settings.
DATA: l_o_functions TYPE REF TO cl_salv_functions_list,
l_field TYPE string.
FIELD-SYMBOLS : <fs_table> TYPE STANDARD TABLE,
<ft_fcat> TYPE STANDARD TABLE.
Get the ALV object refering to the output table
ASSIGN (l_table) TO <fs_table>.
ASSIGN (l_fcat) TO <ft_fcat>.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = <fs_table> ).
CATCH cx_salv_msg. "#EC NO_HANDLER
ENDTRY.
Add basic default functionality in the ALV report
Functions
l_o_functions = gr_table->get_functions( ).
l_o_functions->set_all( abap_true ).
gr_columns = gr_table->get_columns( ).
gr_columns->set_headers_visible( abap_true ).
Display the list
gr_table->display( ).
ENDMETHOD. "extract
ENDCLASS. "lcl_report IMPLEMENTATION
*& start-of-selection declaration
START-OF-SELECTION.
PERFORM :
get store codes
get_storecodes USING p_stfile
CHANGING it_t001w,
fetching mard data
read_mard_data,
preparing fieldcatalog for Final Data
create_filedcat USING it_t001w
it_site
CHANGING it_fieldcat,
preparing structure & internal table for Final Data
create_final_table_structure USING it_fieldcat,
prepare output data
prepare_final_data.
*& end-of-selection declaration
END-OF-SELECTION.
PERFORM :
display data
display_data USING l_table
l_fcat.
*& Form get_storecodes
FORM get_storecodes USING p_p_stfile
CHANGING p_it_t001w LIKE it_t001w[].
DATA :
internal table for RAW
lt_raw TYPE truxs_t_text_data,
rs_site LIKE LINE OF rt_site,
l_index LIKE sy-tabix.
FIELD-SYMBOLS :
field symbol for it_t001w
<fs_t001w> LIKE LINE OF p_it_t001w.
calling function module to get Stores Data from File
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_line_header = 'X'
i_tab_raw_data = lt_raw
i_filename = p_p_stfile
TABLES
i_tab_converted_data = p_it_t001w[]
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ENDIF.
SORT p_it_t001w BY werks.
CLEAR rs_site.
rs_site-sign = 'I'.
rs_site-option = 'EQ'.
rs_site-low = p_dccode.
APPEND rs_site TO rt_site.
IF it_t001w[] IS NOT INITIAL.
LOOP AT p_it_t001w ASSIGNING <fs_t001w>.
l_index = sy-tabix.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = <fs_t001w>-werks
IMPORTING
output = <fs_t001w>-werks.
MODIFY p_it_t001w FROM <fs_t001w> INDEX l_index.
IF <fs_t001w>-werks GE s_site-low AND <fs_t001w>-werks LE s_site-high.
append site to ranges
CLEAR rs_site.
rs_site-sign = 'I'.
rs_site-option = 'EQ'.
rs_site-low = <fs_t001w>-werks.
APPEND rs_site TO rt_site.
CONTINUE.
ENDIF.
ENDLOOP.
SORT p_it_t001w BY werks.
SORT rt_site.
ENDIF.
ENDFORM. " get_storecodes
*& Form create_final_table_structure
FORM create_filedcat USING p_it_t001w LIKE it_t001w[]
p_it_site LIKE it_site[]
CHANGING p_it_fieldcat LIKE it_fieldcat[].
FIELD-SYMBOLS :
field symbol for p_it_t001w
<fs_t001w> LIKE LINE OF p_it_t001w,
field symbol for p_it_site
<fs_site> LIKE LINE OF p_it_site.
DATA :
fieldname
l_fieldname TYPE slis_fieldname,
workarea for site ranges
rs_site LIKE LINE OF rt_site.
CLEAR : l_fieldname, rs_site.
l_fieldname = p_dccode.
PERFORM
prepare fieldcatalog
build_fieldcatalog USING : 'MTART' 'CHAR' '5' ,
'MTBEZ' 'CHAR' '25' ,
'MATKL' 'CHAR' '6' ,
'WGBEZ' 'CHAR' '20' ,
'MATNR' 'CHAR' '18' ,
'MAKTX' 'CHAR' '30' ,
l_fieldname 'CHAR' '17' .
create header for excel
PERFORM create_excel_header USING : 'Division',
'Divsion Description',
'MC Code',
'MC Description',
'Article',
'Article Description',
l_fieldname.
loop for creating fieldcatalog
LOOP AT it_site ASSIGNING <fs_site>.
READ TABLE it_t001w ASSIGNING <fs_t001w> WITH KEY werks = <fs_site>-werks
BINARY SEARCH.
IF sy-subrc = 0 AND <fs_t001w> IS ASSIGNED AND
<fs_site> IS ASSIGNED AND <fs_site>-stock GT 0.
CLEAR : l_fieldname, rs_site.
l_fieldname = <fs_site>-werks.
prepare fieldcatalog
PERFORM build_fieldcatalog USING : l_fieldname 'CHAR' '17'.
create header for excel
PERFORM create_excel_header USING l_fieldname .
CONTINUE.
ENDIF.
ENDLOOP.
l_fcat = 'it_fieldcat[]'.
ENDFORM. " create_final_table_structure
*& Form build_fieldcatalog
FORM build_fieldcatalog USING p_fieldname TYPE slis_fieldname
p_datatype TYPE datatype_d
p_length TYPE intlen.
DATA : ls_fieldcat LIKE LINE OF it_fieldcat.
CLEAR : ls_fieldcat.
ls_fieldcat-fieldname = p_fieldname.
ls_fieldcat-datatype = p_datatype.
ls_fieldcat-intlen = p_length.
APPEND ls_fieldcat TO it_fieldcat.
ENDFORM. " build_fieldcatalog
*& Form create_final_table_structure
FORM create_final_table_structure USING p_it_fieldcat.
Create dynamic internal table and assign to FS
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = t_table.
ASSIGN t_table->* TO <ft_final>.
ENDFORM. " create_final_table_structure
*& Form create_excel_header
FORM create_excel_header USING p_p_fieldname.
DATA : ls_header LIKE LINE OF it_header.
CLEAR ls_header.
ls_header-col_name = p_p_fieldname.
APPEND ls_header TO it_header.
ENDFORM. " create_excel_header
*& Form prepare_final_data
FORM prepare_final_data .
DATA : l_matnr LIKE g_matnr,
l_werks LIKE g_werks,
l_index LIKE sy-tabix.
FIELD-SYMBOLS : <fs_mard> LIKE LINE OF it_mard.
Getting No. of Lines in IT_MARD internal table
DESCRIBE TABLE it_mard LINES g_lines.
LOOP AT it_mard ASSIGNING <fs_mard>.
l_index = sy-tabix.
IF l_matnr IS INITIAL.
l_matnr = <fs_mard>-matnr.
CLEAR : l_werks.
l_werks = <fs_mard>-werks.
UNASSIGN : <fs_value>, <fs_final>.
Create dynamic work area and assign to FS
CREATE DATA t_line LIKE LINE OF <ft_final>.
ASSIGN t_line->* TO <fs_final>.
ASSIGN COMPONENT 'MATNR' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_mard>-matnr.
ASSIGN COMPONENT l_werks OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_value> + <fs_mard>-labst.
getting Article Type,MC & its Descriptions
PERFORM get_other_data USING l_matnr
l_werks.
ELSEIF l_matnr <> <fs_mard>-matnr.
APPEND <fs_final> TO <ft_final>.
CLEAR l_matnr.
l_matnr = <fs_mard>-matnr.
CLEAR : l_werks.
l_werks = <fs_mard>-werks.
UNASSIGN : <fs_value>, <fs_final>.
Create dynamic work area and assign to FS
CREATE DATA t_line LIKE LINE OF <ft_final>.
ASSIGN t_line->* TO <fs_final>.
ASSIGN COMPONENT 'MATNR' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_mard>-matnr.
ASSIGN COMPONENT l_werks OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_value> + <fs_mard>-labst.
getting Article Type,MC & its Descriptions
PERFORM get_other_data USING l_matnr
l_werks.
ELSE.
CLEAR : l_werks.
l_werks = <fs_mard>-werks.
ASSIGN COMPONENT l_werks OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_value> + <fs_mard>-labst.
ENDIF.
IF l_index = g_lines.
APPEND <fs_final> TO <ft_final>.
ENDIF.
ENDLOOP.
l_table = '<ft_final>[]'.
ENDFORM. " prepare_final_data
*& Form get_other_data
FORM get_other_data USING p_l_matnr
p_l_werks.
FIELD-SYMBOLS : <fs_mara> LIKE LINE OF it_mara,
<fs_t023t> LIKE LINE OF it_t023t,
<fs_t134t> LIKE LINE OF it_t134t,
<fs_makt> LIKE LINE OF it_makt.
READ TABLE it_mara ASSIGNING <fs_mara> WITH KEY matnr = p_l_matnr. " BINARY SEARCH.
IF sy-subrc = 0 AND <fs_mara> IS ASSIGNED.
ASSIGN COMPONENT 'MTART' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_mara>-mtart.
ASSIGN COMPONENT 'MATKL' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_mara>-matkl.
READ TABLE it_makt ASSIGNING <fs_makt> WITH KEY matnr = <fs_mara>-matnr BINARY SEARCH.
IF sy-subrc = 0 AND <fs_makt> IS ASSIGNED.
ASSIGN COMPONENT 'MAKTX' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_makt>-maktx.
ENDIF.
READ TABLE it_t023t ASSIGNING <fs_t023t> WITH KEY matkl = <fs_mara>-matkl BINARY SEARCH.
IF sy-subrc = 0 AND <fs_t023t> IS ASSIGNED.
ASSIGN COMPONENT 'WGBEZ' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_t023t>-wgbez.
ENDIF.
READ TABLE it_t134t ASSIGNING <fs_t134t> WITH KEY mtart = <fs_mara>-mtart BINARY SEARCH.
IF sy-subrc = 0 AND <fs_t134t> IS ASSIGNED.
ASSIGN COMPONENT 'MTBEZ' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_t134t>-mtbez.
ENDIF.
ENDIF.
ENDFORM. " get_other_data
*& Form display_data
text
FORM display_data USING p_l_table
p_l_fcat.
DATA:
Variable for Object Creation
o_report TYPE REF TO lcl_report.
CREATE OBJECT o_report.
o_report->display( EXPORTING l_table = p_l_table
l_fcat = p_l_fcat ).
ENDFORM. " display_dataI don't know how to read the code you pasted or I would have checked this myself.
Do your fields in the internal table reference dictionary objects or elementary types? If not using dictionary types, the column names will be blank by default. If you can't change your fields to be dictionary types, you can try this to change the column names:
I made a method inside my local class to add the names:
call method set_colname
EXPORTING iv_tab = alv_tab
iv_colid = 'xxxx' "fieldname from the table
iv_stxt = text-t54
iv_mtxt = text-t55
iv_ltxt = text-t55.
METHOD set_colname .
data:
alv_cols type REF TO cl_salv_columns_table,
alv_col type REF TO cl_salv_column.
TRY .
*... Change fieldnames
call METHOD iv_tab->get_columns RECEIVING value = alv_cols.
call method alv_cols->get_column EXPORTING columnname = iv_colid RECEIVING value = alv_col.
IF iv_stxt <> ''.
CALL METHOD alv_col->set_short_text EXPORTING value = iv_stxt.
ENDIF.
IF iv_mtxt <> ''.
CALL METHOD alv_col->set_medium_text EXPORTING value = iv_mtxt.
ENDIF.
IF iv_ltxt <> ''.
CALL METHOD alv_col->set_long_text EXPORTING value = iv_ltxt.
ENDIF.
CATCH cx_salv_not_found.
ENDTRY.
ENDMETHOD. "set_colname -
Header is not coming in alv list display- urgent
hi all,
i am sending my code below....
my requirement is in selection screen i have 4 radio buttons . if i click 1 radio button it will duiisplay data and and its header. report is working fine. my requirement id when i click r_mssng radio button(missing radio button) it is showing data correctsly. here i want to show header as 'Missing details report'.
this is not coming in my report. anybody can suggest me.
i am sending my code below....
report zvra0001ftb13 message-id zv.
Confidential and Proprietary
* Celestica Corporation
* All Rights Reserved
*ABAP Name: ZVRA0001FTB13
*Created by: Srinivasa Chakravarthi
*Created on: 26/03/2003
*SAP Version: 4.6 C
*Description: This report displays details of foreign trades
and EHS based on the deliveries made to the outside
countries.
*Input: Selection Screen Criteria includes country of
origin,Company code, Sales Organisation,
Ship-to-party, Sold-to-paarty, Goods movement date,
Invoice number, Invoice type, Material , Material
Type, Exporter ID, Province of origin.
*Output: ALV output that contains Mode of Transport, Export
HS number, Commodity Description, Quantity, UOM,
Value, Country of Destination, Goods Origin
*Dependency: Nil
*Modification Log:
*CR# Date Coded Transport Description
*====== ======== ========= ============= ===============================
*5147 26/03/2003 Srinivas ED1K922286 New Development
*8700 02/11/2004 H.Arular ED1K938380 To check if entries of Comm
Code(HS code)is less than 8
digits and give a warning
message.
*18684 25/07/2007 MAHEEDHAR Merge the logic from report
ZVRA0001FTB13_ERROR into
report ZVRA0001FTB13 and
added two radio buttons
called missing data and non
missing data, addedc logic
accoriding to the radio
buttons.
*Declaring Tables.
tables: likp, "Delivery document Header
lips, "Delivery Document Item
vbfa, "Sales document Flow
bkpf, "Accounting Document Header
eikp, "Foreign Trade:Export/Import Data
eipo, "Foreign Trade:Export/ Import
"Header data
t618t, "Forein Trade:Mode of Transport
"Description
t604t, "Foreign Trade: Commodity Code/
"Import Code number Description.
mara, "Material master data.
t005, "Countries
t001, "Company Codes
tvko, "Sales Organisations
kna1, "Customer Master
t003, "Document types
t134, "Material types
tvfk,
konv,
vbrk.
constants : c_rep like vbrk-fkart value 'YGFB',
c_for(10) value 'Foreign'.
*Decalre Type pool for ALV
type-pools: slis.
*Type declaration for LIKP.
types: begin of t_data1,
vbeln like likp-vbeln, "Delivery
kunnr like likp-kunnr,
end of t_data1.
*Type declaration for LIPS,VBFA.
types: begin of t_data2,
vbeln like lips-vbeln, "Delivery
posnr like lips-posnr, "Delivery Item
vbelv like vbfa-vbelv, "Preceding SD document
posnv like vbfa-posnv, "Preceding item of SD document
matnr like lips-matnr, "Material Number
meins like lips-meins, "Base unit of measure
lfimg like lips-lfimg, "Actual Quantity Delivered
mtart like mara-mtart,
end of t_data2.
**Type declaration for BKPF.
*types: begin of t_data3,
belnr like bkpf-belnr, "Accounting Documnet number
bukrs like bkpf-bukrs, "Company Code
end of t_data3.
*Type declaration for BKPF.
types: begin of t_data3,
vbeln like vbrk-belnr, " Billing Doc
fkart like vbrk-fkart,
land1 like vbrk-land1,
end of t_data3.
*Type declaration for EIPO.
types: begin of t_data4,
vbeln like lips-vbeln, "Delivery
posnr like lips-posnr, "Delivery Item
matnr like vbrp-matnr,
fkimg like vbrp-fkimg,
meins like vbrp-meins,
verld like eipo-verld, "Country of dispatch for Foreign
"trade
herkl like eipo-herkl, "Country of origin of material
grwrt like eipo-grwrt, "Statistical value for Foreign
" trade
stawn like eipo-stawn, "Commodity code for foreign trade
expvz like eikp-expvz, "Mode of transport for foreign
"trade
end of t_data4.
*Type declaration for T618T.
types: begin of t_data5,
land1 like t618t-land1, "Country key
expvz like t618t-expvz, "Mode of Transport
bezei like t618t-bezei, "Description
end of t_data5.
*Type declaration for T604T.
types: begin of t_data6,
land1 like t604t-land1, "Country key
stawn like t604t-stawn, "Commodity Code
text1 like t604t-text1, "Description
end of t_data6.
*Type declaration for T604T.
types: begin of t_mara,
matnr like mara-matnr,
end of t_mara.
types : begin of rep_val,
vbelv like vbfa-vbelv,
posnv like vbfa-posnv,
vbeln like vbfa-vbeln,
posnn like vbfa-posnn,
uepos like vbap-uepos,
posnr like vbap-posnr,
netwr like vbap-netwr,
end of rep_val.
types : begin of t_price,
vbeln like vbak-vbeln,
posnr like vbap-posnr,
knumv like konv-knumv,
kposn like konv-kposn,
kbetr like konv-kbetr,
kpein like konv-kpein,
end of t_price.
data : t_sord type rep_val occurs 0 with header line.
data : t_dord type rep_val occurs 0 with header line.
data : t_rord type rep_val occurs 0 with header line.
data : t_hord type rep_val occurs 0 with header line.
data : t_ford type rep_val occurs 0 with header line.
data : i_price type t_price occurs 0 with header line.
data : i_price1 type t_price occurs 0 with header line.
data : i_mara type t_mara occurs 0 with header line.
data : i_sort type slis_t_sortinfo_alv.
DATA: t_layout TYPE slis_layout_alv.
*Declaring Selection screen.
selection-screen begin of block b1 with frame title text-101.
select-options:
s_verld for eipo-verld, "Country of Dest.
s_bukrs for bkpf-bukrs, "Company code
s_vkorg for likp-vkorg, "Sales Organisation
s_kunnr for likp-kunnr, "Ship-to-Party
s_kunag for likp-kunag, "Sold-to-party
s_wadat for likp-wadat_ist, "Goods Movement date
s_belnr for vbrk-vbeln, "Invoice number
s_blart for vbrk-fkart. "Invoice type.
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-101.
select-options:
s_matnr for mara-matnr, "Material
s_mtart for mara-mtart. "Material Type
selection-screen end of block b2.
selection-screen begin of block b3 with frame title text-101.
parameters:
p_export(30) type c default '1366770724RM' obligatory , "Exporter ID
p_provi(30) type c default 'ONTARIO' obligatory ,
p_sumid(30) type c default 'SUM0704'.
"Province of Origin
selection-screen end of block b3.
selection-screen begin of block b4 with frame title text-104.
parameters:
r_summ radiobutton group zsum,
r_dets radiobutton group zsum,
r_mssng radiobutton group zsum, " maheedhar
R_NMSNG RADIOBUTTON GROUP ZSUM. " MAHEEDHAR
selection-screen skip.
parameter : p_sum as checkbox .
selection-screen end of block b4.
selection-screen begin of block b5 with frame title text-105.
select-options : s_i_kun for likp-kunnr.
selection-screen end of block b5.
*Data Declaration
data: i_fieldcat type slis_t_fieldcat_alv.
data: l_fieldcat type slis_fieldcat_alv .
data: v_lin type i.
data: v_lfstk type c value 'C'.
data: v_vbtyp type c value 'U'.
data: i_data1 type t_data1 occurs 0 with header line.
data : begin of t_T005t occurs 0.
include structure t005t.
data : end of t_t005t.
data: i_data2 type t_data2 occurs 0 with header line.
data: t_delv type t_data2 occurs 0 with header line.
data: t_bild type t_data2 occurs 0 with header line.
data: i_data3 type t_data3 occurs 0 with header line.
data: i_data4 type t_data4 occurs 0 with header line.
data: i_data5 type t_data5 occurs 0 with header line.
data: i_data6 type t_data6 occurs 0 with header line.
*Declare Internal table for ALV output.
data: begin of i_output occurs 0,
belnr like vbrk-vbeln,
posnr like vbrp-posnr,
bezei like t618t-bezei,
stawn like eipo-stawn,
text1 like t604t-text1,
quantity type p decimals 2,
meins like lips-meins,
value type p decimals 2,
verld like t_t005t-landx,
herkl like t_t005t-landx,
strlen, "ED1K938380
end of i_output.
maheedhar-start.
data : i_output1 like i_output occurs 0 with header line,
i_output2 like i_output occurs 0 with header line.
maheedhar-end
data : buff_out like i_output occurs 0 with header line.
data: begin of t_outsum occurs 0,
bezei like t618t-bezei,
stawn like eipo-stawn,
text1 like t604t-text1,
quantity type p decimals 2,
meins like lips-meins,
value type p decimals 2,
verld like t_t005t-landx,
herkl like t_t005t-landx,
end of t_outsum.
data : v_ans.
data : variante LIKE disvariant.
data : v_repid LIKE sy-repid.
data : wa_listheader TYPE slis_listheader.
data : t_listheader TYPE slis_t_listheader.
data : b_text(250).
data: evntS type slis_t_event with header line. " MAHEEDHAR
EVENT AT SELECTION-SCREEN
at selection-screen.
*For Autorisation check
perform authorisation_check.
Validation of Selection screen
perform check_entry.
EVENT START-OF-SELECTION
start-of-selection.
*Get data
perform select_data.
**For calling ALV function modules
MAHEEDHAR - START
if r_mssng eq 'X'.
DELETE I_OUTPUT WHERE BEZEI NE SPACE AND
STAWN NE SPACE AND
HERKL NE SPACE AND
VERLD NE SPACE.
DESCRIBE TABLE I_OUTPUT LINES V_LIN.
IF V_LIN > 0.
PERFORM DISPLAY_OUTPUT.
ELSE.
MESSAGE E000 WITH TEXT-130.
ENDIF.
elseif R_SUMM eq 'X' OR R_DETS EQ 'X'. "ENDIF. " MAHEEDHAR
MAHEEDHAR-END
describe table i_output lines v_lin.
if v_lin > 0.
buff_out[] = i_output[].
Begin of ED1K938380
delete buff_out where stawn ne space or "ED1K938380
verld eq space or
herkl eq space.
delete buff_out where strlen ne 'X' or
verld eq space or
herkl eq space.
End of ED1K938380
describe table buff_out lines v_lin.
Lines with no commodity code exists.
if v_lin gt 0.
concatenate text-902 text-903 into b_text.
concatenate text-906 text-907 into b_text. "ED1K938380
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = Text-901
TEXT_QUESTION = b_text
TEXT_BUTTON_1 = 'Yes'
TEXT_BUTTON_2 = 'No'
DEFAULT_BUTTON = '2'
IMPORTING
ANSWER = v_ans.
if v_ans eq '1'.
perform display_output.
endif.
else.
perform display_output.
endif.
else. " MAHEEDHAR
message e000 with text-130.
endif.
MAHEEDHAR-START
*"-- If non missing details radiobutton is selected
elseif r_nmsng = 'X'.
*"-- move data from i_output to i_output1.
i_output1[] = i_output[].
sort i_output by belnr.
sort i_output1 by belnr.
*"-- to get missing data
delete i_output1 where bezei ne space and
stawn ne space and
herkl ne space and
verld ne space.
loop at i_output.
*"-- compare two int tables with respective document number
read table i_output1 with key belnr = i_output-belnr.
if sy-subrc ne 0.
move-corresponding i_output to i_output2.
append i_output2.
clear i_output2.
endif.
endloop.
describe table i_output2 lines v_lin.
if v_lin gt 0.
perform display_output.
else.
message e000 with text-130.
endif.
MAHEEDHAR-END.
ENDIF. " MAHEEDHAR
FORM SELECT_DATA *
form select_data.
Data:l_strlen type i. "ED1K938380
*Get details from LIKP.
if s_i_kun[] is initial.
select likpvbeln likpkunnr
into corresponding fields of table i_data1
from likp
inner join vbuk on likpvbeln = vbukvbeln
where
likp~vkorg in s_vkorg and
likp~kunnr in s_kunnr and
likp~kunag in s_kunag and
likp~wadat_ist in s_wadat and
vbuk~wbstk = 'C' .
else.
select likpvbeln likpkunnr
into corresponding fields of table i_data1
from likp
inner join vbuk on likpvbeln = vbukvbeln
where
( ( likp~vkorg in s_vkorg and
likp~kunnr in s_kunnr and
likp~kunag in s_kunag and
likp~wadat_ist in s_wadat and
vbuk~wbstk = 'C' )
or
likp~kunnr in s_i_kun and
likp~wadat_ist in s_wadat and
vbuk~wbstk = 'C' ) .
endif.
if sy-subrc ne 0.
message e000 with text-200.
endif.
*Get details from table LIPS
select lips~vbeln
lips~posnr
vbfa~vbeln
vbfa~posnn
lips~matnr
lips~meins
lips~lfimg
mara~mtart
from lips
inner join vbfa on vbfavbelv = lipsvbeln
and vbfaposnv = lipsposnr
inner join mara on maramatnr = lipsmatnr
into table i_data2
for all entries in i_data1
where
lips~vbeln = i_data1-vbeln and
lips~matnr in s_matnr and
vbfa~vbeln in s_belnr and
mara~mtart in s_mtart and
vbfa~vbtyp_n = 'U'.
if sy-subrc ne 0.
message e000 with text-201.
endif.
t_delv[] = i_data2[].
t_bild[] = i_data2[].
sort t_delv by vbeln.
delete adjacent duplicates from t_delv comparing vbeln.
sort t_bild by vbeln ascending vbelv descending.
delete adjacent duplicates from t_bild comparing vbeln.
*Get details of Accounting document number
select vbeln fkart land1 from vbrk
into table i_data3
for all entries in t_bild
where vbeln = t_bild-vbelv and
bukrs in s_bukrs and
fkart in s_blart and
vkorg in s_vkorg and " MAHEEDHAR
land1 in s_verld. " MAHEEDHAR
sort i_data3.
*Get details from EIPO.
select vbrp~vbeln
vbrp~posnr
vbrp~matnr
vbrp~fkimg
vbrp~meins
eipo~verld
eipo~herkl
eipo~grwrt
eipo~stawn
eikp~expvz
from eikp
inner join vbrp on vbrp~vbeln = eikp~refnr
inner join eipo on eikp~exnum = eipo~exnum
and eipo~expos = vbrp~posnr
into table i_data4 for all entries in i_data3
where vbrp~vbeln = i_data3-vbeln.
eipo~verld in s_verld.
if sy-subrc ne 0.
message e000 with text-201.
endif.
IF R_MSSNG NE 'X' or r_nmsng = 'X'. " MAHEEDHAR
perform get_price.
ENDIF. " MAHEEDHAR
Get details from T618T.
select land1
expvz
bezei
from t618t
into table i_data5
for all entries in i_data4
where
land1 = 'CA' and " Getting for Canada only
expvz = i_data4-expvz and
spras = sy-langu.
select matnr from mara into table i_mara where matnr in s_matnr
and mtart in s_mtart.
Get details from T604T.
select land1
stawn
text1
from t604t
into table i_data6
for all entries in i_data4
where
land1 = i_data4-VERLD and
stawn = i_data4-stawn and
spras = sy-langu.
select * from T005t into table t_T005t where spras = sy-langu.
loop at i_data3.
loop at i_data4 where vbeln eq i_data3-vbeln.
clear : i_data1, i_data2.
read table i_data2 with key vbelv = i_data4-vbeln
posnv = i_data4-posnr.
read table i_data1 with key vbeln = i_data2-vbeln.
if not s_i_kun[] is initial.
check ( ( i_data1-kunnr in s_i_kun ) or
( i_data3-land1 in s_verld ) ).
else.
check i_data3-land1 in s_verld .
endif.
read table i_mara with key matnr = i_data4-matnr.
if sy-subrc eq 0.
read table i_data5 with key expvz = i_data4-expvz .
land1 = i_data3-land1.
read table i_data6 with key stawn = i_data4-stawn
land1 = i_data4-VERLD.
move i_data4-vbeln to i_output-belnr.
move i_data4-posnr to i_output-posnr.
move i_data5-bezei to i_output-bezei.
move i_data6-text1 to i_output-text1.
Begin of ED1K938380.
l_strlen = strlen( i_data4-stawn ).
if l_strlen < 8.
move 'X' to i_output-strlen.
endif.
End of ED1K938380.
move i_data4-stawn to i_output-stawn.
move i_data4-meins to i_output-meins.
read table t_T005t with key land1 = i_data3-land1.
move t_t005t-landx to i_output-verld.
if p_sum eq space.
if i_data4-herkl ne 'CA'.
i_output-herkl = c_for.
else.
read table t_T005t with key land1 = i_data4-herkl.
move t_t005t-landx to i_output-herkl.
endif.
else.
read table t_T005t with key land1 = i_data4-herkl.
move t_t005t-landx to i_output-herkl.
endif.
move i_data4-fkimg to i_output-quantity.
if i_data3-fkart eq c_rep.
read table t_dord with key vbeln = i_data4-vbeln
posnn = i_data4-posnr.
if sy-subrc eq 0.
read table t_sord with key vbeln = t_dord-vbelv
posnn = t_dord-posnv.
if sy-subrc eq 0.
read table t_hord with key vbeln = t_sord-vbelv
posnr = t_sord-posnv.
if sy-subrc eq 0.
read table t_ford with key vbeln = t_hord-vbeln
posnr = t_hord-uepos.
if sy-subrc eq 0.
read table i_price with key vbeln = t_ford-vbeln
posnr = t_ford-posnr.
if sy-subrc eq 0.
read table i_price1 with key knumv = i_price-knumv
kposn = t_ford-posnr.
if sy-subrc eq 0.
if i_price1-kpein ne 0.
i_output-value =
( i_price1-kbetr / i_price1-kpein ) *
i_data4-fkimg.
endif.
endif.
endif.
endif.
endif.
endif.
endif.
else.
move i_data4-grwrt to i_output-value.
endif.
append i_output.
clear i_output.
clear : i_data5, i_data6.
endif.
endloop.
endloop.
sort i_output by verld herkl bezei stawn.
endform.
FORM DISPLAY_OUTPUT *
This form is to create the ALV output
form display_output.
data: xevents type slis_t_event,
ls_event type slis_alv_event,
slis_ev_top_of_page type slis_formname value 'TOP_OF_PAGE',
slis_ev_end_of_list type slis_formname value 'END_OF_LIST'.
*Call Function 'REUSE_ALV_EVENTS' for top of page
call function 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = xevents
EXCEPTIONS
list_type_wrong = 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.
read table xevents with key name = slis_ev_top_of_page
into ls_event.
if sy-subrc = 0.
move slis_ev_top_of_page to ls_event-form.
append ls_event to xevents.
endif.
read table xevents with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move slis_ev_end_of_list to ls_event-form.
append ls_event to xevents.
endif.
if r_dets ne space.
*Call Function 'REUSE_ALV_FIELD_CATALOG_MERGE' for position fixing in
*the output.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = 'ZVRA0001FTB13'
i_internal_tabname = 'I_OUTPUT'
i_inclname = 'ZVRA0001FTB13'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME =
i_bypassing_buffer = 'X'
i_buffer_active = ' '
changing
ct_fieldcat = i_fieldcat
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.
loop at i_fieldcat into l_fieldcat.
l_fieldcat-key = ' '.
case l_fieldcat-fieldname.
when 'BELNR'.
l_fieldcat-seltext_m = text-912.
l_fieldcat-seltext_l = text-912.
l_fieldcat-reptext_ddic = text-912.
l_fieldcat-col_pos = '1'.
l_fieldcat-just = 'C'.
l_fieldcat-outputlen = '12'..
when 'POSNR'.
l_fieldcat-seltext_m = text-913.
l_fieldcat-seltext_l = text-913.
l_fieldcat-reptext_ddic = text-913.
l_fieldcat-col_pos = '2'.
l_fieldcat-just = 'C'.
l_fieldcat-outputlen = '6'.
when 'BEZEI'.
l_fieldcat-seltext_m = text-911.
l_fieldcat-seltext_l = text-911.
l_fieldcat-reptext_ddic = text-911.
l_fieldcat-col_pos = '3'.
l_fieldcat-just = 'C'.
l_fieldcat-outputlen = '15'..
when 'STAWN'.
l_fieldcat-seltext_m = text-111.
l_fieldcat-seltext_l = text-111.
l_fieldcat-reptext_ddic = text-111.
l_fieldcat-col_pos = '4'.
l_fieldcat-just = 'C'.
l_fieldcat-outputlen = '30'.
when 'TEXT1'.
l_fieldcat-seltext_m = text-112.
l_fieldcat-seltext_l = text-112.
l_fieldcat-outputlen = '40'.
l_fieldcat-col_pos = '5'.
l_fieldcat-just = 'C'.
l_fieldcat-reptext_ddic = text-112.
when 'QUANTITY'.
l_fieldcat-outputlen = '18'.
l_fieldcat-reptext_ddic = text-113.
l_fieldcat-seltext_m = text-113.
l_fieldcat-col_pos = '6'.
l_fieldcat-just = 'C'.
l_fieldcat-seltext_l = text-113.
when 'MEINS'.
l_fieldcat-outputlen = '8'.
l_fieldcat-reptext_ddic = text-114.
l_fieldcat-seltext_m = text-114.
l_fieldcat-col_pos = '7'.
l_fieldcat-just = 'C'.
l_fieldcat-seltext_l = text-114.
when 'VALUE'.
l_fieldcat-outputlen = '20'.
l_fieldcat-seltext_m = text-115.
l_fieldcat-seltext_l = text-115.
l_fieldcat-just = 'C'.
l_fieldcat-reptext_ddic = text-115.
when 'VERLD'.
l_fieldcat-outputlen = '20'.
l_fieldcat-seltext_m = text-116.
l_fieldcat-seltext_l = text-116.
l_fieldcat-just = 'C'.
l_fieldcat-reptext_ddic = text-116.
when 'HERKL'.
l_fieldcat-seltext_m = text-117.
l_fieldcat-seltext_l = text-117.
l_fieldcat-outputlen = '30'.
l_fieldcat-just = 'C'.
l_fieldcat-reptext_ddic = text-117.
when others.
l_fieldcat-no_out = 'X'.
endcase.
modify i_fieldcat from l_fieldcat.
endloop.
Call Function 'REUSE_ALV_LIST_DISPLAY' for dispaly of data in ALV.
call function 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = 'ZVRA0001FTB13'
it_fieldcat = i_fieldcat
it_events = xevents
is_layout = t_layout
i_save = 'A'
i_bypassing_buffer = 'X'
i_buffer_active = ' '
TABLES
t_outtab = i_output
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.
else. " MAHEEDHAR
ELSEIF R_SUMM EQ 'X'. " MAHEEDHAR
sort i_output by verld herkl stawn bezei.
loop at i_output.
move-corresponding i_output to t_outsum.
collect t_outsum.
endloop.
*Call Function 'REUSE_ALV_FIELD_CATALOG_MERGE' for position fixing in
*the output.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZVRA0001FTB13'
i_internal_tabname = 'T_OUTSUM'
i_inclname = 'ZVRA0001FTB13'
i_bypassing_buffer = 'X'
i_buffer_active = ' '
CHANGING
ct_fieldcat = i_fieldcat
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.
loop at i_fieldcat into l_fieldcat.
l_fieldcat-key = ' '.
case l_fieldcat-fieldname.
when 'BEZEI'.
l_fieldcat-seltext_m = text-911.
l_fieldcat-seltext_l = text-911.
l_fieldcat-reptext_ddic = text-911.
l_fieldcat-col_pos = '1'.
l_fieldcat-just = 'C'.
l_fieldcat-outputlen = '15'..
when 'STAWN'.
l_fieldcat-seltext_m = text-111.
l_fieldcat-seltext_l = text-111.
l_fieldcat-reptext_ddic = text-111.
l_fieldcat-col_pos = '2'.
l_fieldcat-just = 'C'.
l_fieldcat-outputlen = '30'.
when 'TEXT1'.
l_fieldcat-seltext_m = text-112.
l_fieldcat-seltext_l = text-112.
l_fieldcat-outputlen = '40'.
l_fieldcat-col_pos = '3'.
l_fieldcat-just = 'C'.
l_fieldcat-reptext_ddic = text-112.
when 'QUANTITY'.
l_fieldcat-outputlen = '18'.
l_fieldcat-reptext_ddic = text-113.
l_fieldcat-seltext_m = text-113.
l_fieldcat-col_pos = '4'.
l_fieldcat-just = 'C'.
l_fieldcat-seltext_l = text-113.
when 'MEINS'.
l_fieldcat-outputlen = '8'.
l_fieldcat-reptext_ddic = text-114.
l_fieldcat-seltext_m = text-114.
l_fieldcat-col_pos = '5'.
l_fieldcat-just = 'C'.
l_fieldcat-seltext_l = text-114.
when 'VALUE'.
l_fieldcat-outputlen = '20'.
l_fieldcat-seltext_m = text-115.
l_fieldcat-seltext_l = text-115.
l_fieldcat-col_pos = '6'.
l_fieldcat-just = 'C'.
l_fieldcat-reptext_ddic = text-115.
when 'VERLD'.
l_fieldcat-outputlen = '20'.
l_fieldcat-seltext_m = text-116.
l_fieldcat-seltext_l = text-116.
l_fieldcat-col_pos = '7'.
l_fieldcat-just = 'C'.
l_fieldcat-reptext_ddic = text-116.
when 'HERKL'.
l_fieldcat-seltext_m = text-117.
l_fieldcat-seltext_l = text-117.
l_fieldcat-outputlen = '30'.
l_fieldcat-col_pos = '8'.
l_fieldcat-just = 'C'.
l_fieldcat-reptext_ddic = text-117.
when others.
l_fieldcat-no_out = 'X'.
endcase.
modify i_fieldcat from l_fieldcat.
endloop.
Call Function 'REUSE_ALV_LIST_DISPLAY' for dispaly of data in ALV.
call function 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = 'ZVRA0001FTB13'
it_fieldcat = i_fieldcat
it_events = xevents
i_save = 'A'
is_layout = t_layout
i_default = 'X'
is_variant = variante
i_bypassing_buffer = 'X'
i_buffer_active = ' '
TABLES
t_outtab = t_outsum
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.
MAHEEDHAR-START.
*"-- if detail summary checkbox is selected
elseIF R_MSSNG = 'X'.
PERFORM PREPARE_HEADER.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = 'ZVRA0001FTB13'
i_internal_tabname = 'I_OUTPUT'
i_inclname = 'ZVRA0001FTB13'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME =
i_bypassing_buffer = 'X'
i_buffer_active = ' '
changing
ct_fieldcat = i_fieldcat
exceptions
inconsistent_interface = 1
program_error = 2
hi,
*& Report ZALV_FIELD_GRID1
REPORT ZALV_FIELD_GRID1
NO STANDARD PAGE HEADING.
TABLES MARA.
type-pools :slis.
TYPES : BEGIN OF TMARA ,
MATNR LIKE MARA-MATNR,
MEINS LIKE MARA-MEINS,
ERSDA LIKE MARA-ERSDA,
color(4) type c,
SEL type c,
LIGHT TYPE C,
END OF TMARA.
TYPES: BEGIN OF TMAKT,
MATNR LIKE MAKT-MATNR,
MAKTX LIKE MAKT-MAKTX,
MAKTG LIKE MAKT-MAKTG,
SEL TYPE C,
COLOR(4),
END OF TMAKT.
DATA: ITAB TYPE TMARA OCCURS 0 WITH HEADER LINE,
ITAB1 TYPE TMAKT OCCURS 0 WITH HEADER LINE,
wa_fieldcat type slis_fieldcat_alv,
fieldcat type slis_fieldcat_alv occurs 0,
i_layout type slis_layout_alv,
WA_LISTHEADER TYPE SLIS_LISTHEADER ,
i_LISTHEADER TYPE SLIS_LISTHEADER OCCURS 0,
V_EVENTS TYPE SLIS_T_EVENT ,
WA_EVENT TYPE SLIS_ALV_EVENT,
I_TITLE_MARA TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED',
I_TITLE_MAKT TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED',
SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE,
PRINT_CONT type slis_print_alv.
SELECTION SCREE
selection-screen begin of block screen1 with frame title TEXT-001.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN COMMENT /32(35) COMM1.
SELECTION-SCREEN ULINE /27(35).
SELECTION-SCREEN SKIP.
SELECT-OPTIONS MATNR FOR MARA-MATNR.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN ULINE.
SELECTION-SCREEN COMMENT /30(50) COMM2.
SELECTION-SCREEN ULINE /27(40).
SELECTION-SCREEN SKIP.
SELECT-OPTIONS ERSDA FOR MARA-ERSDA.
SELECTION-SCREEN SKIP.
selection-screen end of block screen1.
INITIALIZATION
INITIALIZATION.
MATNR-low = '23'.
MATNR-high = '1000'.
MATNR-option = 'BT'.
MATNR-sign = 'I'.
APPEND MATNR.
ERSDA-low = '20030124'.
ERSDA-high = '20050302' .
APPEND ERSDA.
PERFORM FILLFIELD.
PERFORM FILLLAYOUT.
PERFORM build_print_params.
PERFORM FILL_SORT.
PERFORM EVENT_CALL.
PERFORM POPULATE_EVENT.
SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
comm1 ='SELECT MATERIAL NUMBER RANGE'.
comm2 ='SELECT MATERIAL CREATION DATE'.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM READDATA.
PERFORM POPDATA.
*& Form READDATA
text
FORM READDATA .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = MATNR-LOW
IMPORTING
OUTPUT = MATNR-LOW.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = MATNR-HIGH
IMPORTING
OUTPUT = MATNR-HIGH.
SELECT MATNR
ERSDA
MEINS
FROM MARA
INTO CORRESPONDING FIELDS OF
TABLE ITAB
WHERE MATNR IN MATNR AND ERSDA IN ERSDA.
LOOP AT ITAB.
data id_color type i VALUE 1.
data id_colors(2) type c.
IF ITAB-MATNR < '000000000000000100'.
ITAB-LIGHT = '1'.
ELSEIF ITAB-MATNR < '000000000000000150' AND ITAB-MATNR >
'000000000000000100' .
ITAB-LIGHT = '2'.
ELSE.
ITAB-LIGHT = '3'.
ENDIF.
id_color = id_color + 1.
if id_color > 7.
id_color = 1.
endif.
id_colors = id_color.
concatenate 'C' id_colors '10' into itab-color.
modify itab.
CLEAR ITAB.
endloop.
ENDFORM. " READDATA
Form FILLFIELD
FORM FILLFIELD .
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-KEY = 'X'.
WA_FIELDCAT-COL_POS = '1'.
WA_FIELDCAT-outputlen = 20.
WA_FIELDCAT-HOTSPOT = 'X'.
wa_fieldcat-seltext_m = 'MATERIAL NUMBER'.
*WA_FIELDCAT-EMPHASIZE = 'C210'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-COL_POS = '2'.
*WA_FIELDCAT-EMPHASIZE = 'C510'.
WA_FIELDCAT-outputlen = 10.
wa_fieldcat-seltext_m = 'UNIT'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
WA_FIELDCAT-FIELDNAME = 'ERSDA'.
WA_FIELDCAT-COL_POS = '3'.
WA_FIELDCAT-outputlen = 15.
*WA_FIELDCAT-EDIT_MASK = 'DD.MM.YYYY'.
*WA_FIELDCAT-EMPHASIZE = 'C710'.
wa_fieldcat-seltext_m = 'CREAT DATE'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
ENDFORM. "FILLFIELD
Setup print parameters
form build_print_params.
PRINT_CONT-reserve_lines = '3'. "Lines reserved for footer
PRINT_CONT-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
Form POPDATA
FORM POPDATA .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER-COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOPPAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE = I_TITLE_MARA
I_GRID_SETTINGS =
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = V_EVENTS
IT_EVENT_EXIT =
IS_PRINT = PRINT_CONT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
ENDFORM. " POPDATA
Form TOPPAGE
FORM TOPPAGE.
REFRESH I_LISTHEADER.
DATA: ld_lines type i,
ld_linesc(10) type c,
I_DATE(10) TYPE C,
I_INFO LIKE WA_LISTHEADER-INFO.
WA_LISTHEADER-TYP = 'H'.
WA_LISTHEADER-INFO = 'MATERIAL DETAIL'.
APPEND WA_LISTHEADER TO I_LISTHEADER.
CLEAR WA_LISTHEADER.
WA_LISTHEADER-TYP = 'S'.
WA_LISTHEADER-KEY = 'DATE :'.
CONCATENATE SY-DATUM+6(2) '.'
SY-DATUM+4(2) '.'
SY-DATUM(4) INTO I_DATE.
WA_LISTHEADER-INFO = I_datE.
APPEND WA_LISTHEADER TO I_LISTHEADER.
CLEAR WA_LISTHEADER.
describe table ITAB lines ld_lines.
ld_linesc = ld_lines.
concatenate 'TOTAL NUMBER OF RECORD SELECTED: ' ld_linesc
into I_INFO separated by space.
WA_LISTHEADER-TYP = 'A'.
WA_LISTHEADER-INFO = I_INFO.
append WA_LISTHEADER to I_LISTHEADER.
clear: WA_LISTHEADER , I_INFO.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = I_LISTHEADER
I_LOGO = 'ENJOYSAP_LOGO'.
ENDFORM. "TOPPAGE
Form FILLLAYOUT
FORM FILLLAYOUT .
i_layout-zebra = 'X'.
i_layout-info_fieldname = 'COLOR'.
i_layout-box_fieldname = 'SEL'.
I_LAYOUT-lights_fieldname = 'LIGHT'.
I_LAYOUT-EDIT ='X'.
I_LAYOUT-colwidth_optimize = 'X'.
I_LAYOUT-window_titlebar = 'EXAMPLE FOR ALV GRID'.
I_LAYOUT-no_totalline = 'X'.
ENDFORM. "FILLLAYOUT
Form FILL_SORT
FORM FILL_SORT .
SORT-DOWN = 'X'.
SORT-SPOS = 1.
SORT-FIELDNAME = 'MATNR'.
SORT-tabname = 'MARA'.
APPEND SORT.
ENDFORM. " FILL_SORT
Form EVENT_CALL
FORM EVENT_CALL .
DATA: I_EVENT LIKE V_EVENTS.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS.
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. " EVENT_CALL
Form POPULATE_EVENT
FORM POPULATE_EVENT .
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
READ TABLE V_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
INTO WA_EVENT.
IF SY-SUBRC = 0.
move 'END_OF_PAGE' to WA_EVENT-FORM.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
endif.
ENDIF.
ENDFORM. "POPULATE_EVENT
FORM END_OF_PAGE.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
ENDFORM.
*& Form USER_COMMAND
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
CASE RS_SELFIELD-FIELDNAME.
when 'MATNR'.
read table itab with key matnr = RS_SELFIELD-VALUE.
if sy-subrc = 0.
PERFORM DATA_RETRIEVAL_MAKT USING RS_SELFIELD-VALUE.
PERFORM BUILD_FIELDCATLOG_MAKT.
PERFORM FILLLAYOUT_MAKT.
PERFORM DISPLAY_ALV_MAKT.
CLEAR RS_SELFIELD.
ENDIF.
ENDCASE.
ENDCASE.
ENDFORM. "user_command
Form DATA_RETRIEVAL_MAKT
FORM DATA_RETRIEVAL_MAKT USING TMATNR .
SELECT MATNR
MAKTX
MAKTG
UP TO 100 ROWS
FROM MAKT
INTO TABLE ITAB1
WHERE SPRAS = 'EN' AND MATNR = TMATNR.
LOOP AT ITAB1.
data id_color type i VALUE 1.
data id_colors(2) type c.
id_color = id_color + 1.
if id_color > 7.
id_color = 1.
endif.
id_colors = id_color.
concatenate 'C' id_colors '10' into itab1-color.
modify itab1.
CLEAR ITAB1.
ENDLOOP.
ENDFORM. "DATA_RETRIEVAL_MAKT
Form FILLLAYOUT_MAKT
FORM FILLLAYOUT_MAKT .
CLEAR I_LAYOUT.
i_layout-zebra = 'X'.
i_layout-info_fieldname = 'COLOR'.
i_layout-box_fieldname = 'SEL'.
I_LAYOUT-EDIT ='X'.
I_LAYOUT-colwidth_optimize = 'X'.
I_LAYOUT-window_titlebar = 'EXAMPLE FOR ALV GRID'.
ENDFORM. " LAYOUT_MAKT
Form BUILD_FIELDCATLOG_MAKT
FORM BUILD_FIELDCATLOG_MAKT .
REFRESH FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-KEY = 'X'.
WA_FIELDCAT-COL_POS = '1'.
*WA_FIELDCAT-EDIT_MASK = 'DD.MM.YYYY'.
WA_FIELDCAT-EMPHASIZE = 'C510'.
wa_fieldcat-seltext_m = 'MATERIAL NUMBER'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
WA_FIELDCAT-FIELDNAME = 'MAKTX'.
WA_FIELDCAT-COL_POS = '2'.
WA_FIELDCAT-EMPHASIZE = 'C710'.
wa_fieldcat-seltext_m = 'MATERIAL DESCRIPTION'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
WA_FIELDCAT-FIELDNAME = 'MAKTG'.
WA_FIELDCAT-COL_POS = '3'.
WA_FIELDCAT-EMPHASIZE = 'C210'.
wa_fieldcat-seltext_m = 'MATERIAL DESCRIPTION'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
ENDFORM. " BUILD_FIELDCATLOG_MAKT
Form DISPLAY_ALV_MAKT
FORM TOP-OF-PAGE.
REFRESH I_LISTHEADER.
DATA: ld_lines type i,
ld_linesc(10) type c,
I_DATE(10) TYPE C,
I_INFO LIKE WA_LISTHEADER-INFO.
WA_LISTHEADER-TYP = 'H'.
WA_LISTHEADER-INFO = 'MATERIAL DESCRIPTION FOR SELECTED NUMBER'.
APPEND WA_LISTHEADER TO I_LISTHEADER.
CLEAR WA_LISTHEADER.
WA_LISTHEADER-TYP = 'S'.
WA_LISTHEADER-KEY = 'DATE :'.
CONCATENATE SY-DATUM+6(2) '.'
SY-DATUM+4(2) '.'
SY-DATUM(4) INTO I_DATE.
WA_LISTHEADER-INFO = I_datE.
APPEND WA_LISTHEADER TO I_LISTHEADER.
CLEAR WA_LISTHEADER.
describe table ITAB1 lines ld_lines.
ld_linesc = ld_lines.
concatenate 'TOTAL NUMBER OF RECORD SELECTED: ' ld_linesc
into I_INFO separated by space.
WA_LISTHEADER-TYP = 'A'.
WA_LISTHEADER-INFO = I_INFO.
append WA_LISTHEADER to I_LISTHEADER.
clear: WA_LISTHEADER , I_INFO.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = I_LISTHEADER
I_LOGO = 'ENJOYSAP_LOGO'.
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM. "TOP-OF-PAGE
*& Form DISPLAY_ALV_MAKT
text
FORM DISPLAY_ALV_MAKT .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_GRID_TITLE = I_TITLE_MAKT
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = fieldcat
TABLES
T_OUTTAB = ITAB1
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_MAKT
Regards
Ashok kumar -
IR column Header value not displayed entirely during filteration
I have a IR, when I click any column Header and it shows the list of values as a dropdown.
some of them (which are larger) get cut off.. means the the entire content/value are not displayed within the dropdown. [width of dropdown is fixed and no of characters in the content/value is more..]
how can we fix this?
Also.. is there any we can increase the width of the Select List window when we click any column header in IR.
Thanks,
Deepak
Edited by: DeepakJ on Sep 15, 2011 4:08 PMHi,
jQuery is not included to Apex 3.2 by default.
If you have not include jQuery library's to e.g. your page template or page header, then it is not "installed".
You can run your app and inspect HTML source to be sure.
You can download jQuery and jQuery UI and place files to your HTTP server folder. Then load those in e.g. page template header.
Or use jQuery files from Google by placing to page template header.
<link type="text/css" rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>Regards,
Jari -
ABAP Query change not coming while execute corresponding T.code
Hi gurus
I added some values(country field) in existing ABAP query in development server using sq01 . Now the changes were not coming (in the selection screen for field selection) while running the query using corresponding Z T.code. In SE93 it shows START REPORT as report name. Can anyone guide me how to change an existing query and how to transport it properly into production server.
Regards
ArunThis is happened due to
-ve Qty (Quantity of goods received) -
Warranty Popup not coming while creating maintenance order
Dear Experts,
I have created master warranty for distance covered having unit Mile.
Created counter with same charateristic and unit (ie mile). In the equipment master data entered the master warranty no and start date.
Now when i am creating the maintenance order , it is not giving me any pop up. i have done necessary customising for dialog box while creating order and notification, but still the dialog box not coming.
If i am not using any master warranty and giving start and end date of master warranty then it is giving me the dialog box.
Can you please see what is the problem
Regards
Amarhi
check whether you have defined the counter in the warranty ,and cross check with measuring point for that equipment ,is the same characteristic used.
also in the equipment warranty tab whether Green coloured check is appearing and the details
regards
thyagarajan -
11.1.1.5 - Column Heading Alignment not working
I've created a simple one-column analysis, and I'm viewing the Table. I'd like to center the column header (currently it is left-aligned).
In the Layout section for the Table view, I'm selecting Format Headings from the column's option icon.
Changing the font characteristics works fine. Changing the cell background color works. However, changing the Horizontal Alignment and Vertical Alignment have no effect.
I've also tried this on the on the Column Properties ... Column Format for the column, selecting the formatting icon next to the Column Heading field. No luck there either.
Where is the correct place to change the alignment for column headings?hi
try this....
1. select criteria and go to column properties
2.Select Column Format(second tab) ->Column Heading ->format ->set the center for cell horizontal and vertical.
if you selected sort for this column, the center alignment is not working.
Thanks
Edited by: Kavitha on Jul 1, 2011 4:15 PM -
Column header filtering not functioning for external lists
I have a problem with column header filtering on external lists, specific for columns of Number and Date types.
When the site's regional settings are in English (United States) filtering works fine, but if I choose any other regional setting with different number formatting (ie Dutch) then filtering on these columns gives no results.
When clicking on the column header filter dropdown, the numbers to filter on are displayed with thousands seperators where the numbers in the views are not formatted as seen in attached screenshot.
Filtering on custom sharepoint list with these regional settings is working fine, it is just on external lists, on number and date fields and regional setting is not English.
I have tried all different kind of regional settings on the client and the server, but no results.
Anybody has a clue?
Clicking on the column header shows all available filter values (with thousand seperator). Selecting one value gives no results:
No results after selecting a filter valueHi,
According to your post, my understanding is that you had an issue about column filter in external list.
We can use the SharePoint Manager to change the column type to “single line of text”, then you would filter column in the external list.
There is a similar thread for your reference:
http://social.technet.microsoft.com/Forums/en-US/fe67d581-6e7b-4770-b296-8ec0f9b5b769/not-able-to-filter-or-sort-by-list-column-headers-for-external-data-fields-ideas?forum=sharepointgeneralprevious
Thanks,
Jason
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Jason Guo
TechNet Community Support -
Hide column in SSRS is not working while exporting to CSV format.
Hi,
I have a report where some columns are hidden based on parameter value. When I export to Excel all the hidden columns are hiding which is fine, but the issue is when I exported to CSV all the hidden columns are exporting to csv.
I tried to using " =IIF(Globals!RenderFormat.Name = "CSV", True,False)" in Column visibility but It is not working. When I select Hide option it is working fine. But I want to hide based on expression.
Any help !!!!!!!!Hi sumancv,
In SQL Server Reporting Services (SSRS), we can control whether an item is visible in CSV separately from whether an item is visible in other renderers. As Shahfaisal Muhammed posted earlier, the CSV renderers use the DataElementOutput property to control
visibility. When an item has DataElementOutput=Output, it will appear in the CSV. When an item has DataElementOutput=NoOutput, it will not appear in CSV.
Based on my test, we cannot use expression to control column visibility in the report when it is export to CSV.
Reference:
http://connect.microsoft.com/SQLServer/feedback/details/742658/ssrs-csv-export-issue-for-hiding-certain-columns-using-expressions
Since the issue is by design, I recommend you that submit a wish to the Microsoft Connect at
https://connect.microsoft.com/SQLServer/Feedback. Your feedback is valuable for us to improve our products and increase the level of service provided.
Regards,
Alisa Tang
If you have any feedback on our support, please click
here.
Alisa Tang
TechNet Community Support -
Images in some Column-Heads are not visible
Hi there,
in an Webdynpro-Application I am using tables that are sorted in that way that is discribed in the Tables-Tutorial (with TableSort-Class). Everything works fine except that initially there is no image in the column-head although I set one in the layout-designer. After sorting the apropriate images appear.
I tried to set the image-source again, I tried to set the image in the source like:
<i>IWDTable table = (IWDTable)view. ...
table.getColumns()[...].getHeader().setImageSource("...");</i>
... doesn't work.
Are there solutions? Thanks!<i></i>Hi,
Your code is right. but i think you have placed the setImageSource code before the call of Table Sorter class.
if you put that code after the object creation of TableSorter class, it will work.
regards
Karthik -
Lookup not coming while writing email address
In my Blackberry 8520, when I am typing email address in corporate email, it's not showing the loopup option. Earlier, when I used to type 2 or 3 characters, it used to show addresses from my contact list + show a lookup option. This is not coming since last some time. I had installed LinkedIn for BB, not sure whether due to that it went away or some other reason. I have uninstalled LinkedIn but it's still not showing. Can someone help in getting over this issue as email sending has become very tedious in the absence of it.
Hi and Welcome to the Forums!
As a BES user, you need to go see your BES admins for support...they control, well, everything. They may want to wipe and re-activate your BB.
Good luck!
Occam's Razor nearly always applies when troubleshooting technology issues!
If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
Join our BBM Channels
BSCF General Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
No column heading in second page in alv report when save in excel file
Hi Expert,
How can i remove the column header from Alv report when program execute in background and save in excel file right now
its comming column header in each page. Client dont want header column in excel from second page. is this possible?
with regards
chandan_vijiHi Ravi,
thanks for reply i have solved this problm throug line count and NEW-PAGE LINE COUNT 10000 bcoz client want output in excel file only one page header.
with regards
chandan_viji
Maybe you are looking for
-
Why won't iMovie voiceover clips won't play sound!
I've been using iMovie '11 version 9.0.9, to make a school assignment. I started two days ago and it was allw orking perfectly fine, until today when some of the clips won't play. It started after I deleted a voiceover clip to replace it with a song
-
Hello, I have just upgraded to a G5 Dual 1.8. I need to buy wireless keyboard mouse. FCP is my main Application Is there any recommendation regarding a keyboard for this sort of usage? Any links to reviews of such? Thanks!
-
I have F.F 3.6 and windows 7.: 1) When i want to buy a airplane ticket and want to select 2 adults or 2 children, the draw down select, does not work in any websides,? WHY?. 2) Have FF any problems with SKYPE == This happened == Not sure how often ==
-
After updates my daughter's macbook pro cant get onto safari
quits unexpectantly error and no way that I acan get to safari menu bar. I am a complete beginner with computers. im posting this from my pc. thansk
-
iPhoto library missing. Tried "other library", found iPhoto library, clicked open, nothing happened.