Coding in Report
Hi All,
Pl find the requirement details below.
I have a attribute " SAP-ID" of sold_to party.
Ex : SAP-ID = 901234
In my report i need one object say profit-id as 48901234.Means for each SAP-ID I need to add 48 at the staring.
So pl let m eknow how can be achieved.
Regards
Ramakanth.
Hi Ravi,
Thanks for your help.
I have already done thta.But i am getting termination of program issue.
Error Msg : System error in program SAPLRRI2 and form CUNM_CUVL_GET-01.
Any other solution.Back end design level i can do using concatenation.But i do not want to disturb the design.
Any Solution
Regards
Ramakanth.
Edited by: Ramakanth Deepak Gandepalli on Aug 3, 2010 12:52 PM
Similar Messages
-
Need a coding like report events step by step
need a coding how to write report events.
step by step. by the material iam not getting any thing..
please send me if you have coding or any examples..Hi Franklin,
Please see the following link. You will find complete guide to report events.
http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db9a9635c111d1829f0000e829fbfe/frameset.htm
Hope this helps,
Pragya -
Hai,
I want to use tabstrip(with 3 different subscreens) in my report.so could any one of you can send me the coding of this.
thanks in advance
kiranHi,
Check this.
http://help.sap.com/saphelp_nw04/helpdata/en/17/5bf1b52ba211d2954f0000e8353423/content.htm
According to the tab pressed,you can write the coding in PAI and display the output in PBO.
Following is the sample code.I am using custom container.
CONTROLS: main_tab TYPE TABSTRIP.
DATA: BEGIN OF i_main_tab,
subscreen LIKE sy-dynnr,
prog LIKE sy-repid VALUE
'ZZZ_TABSTRIP',
pressed_tab LIKE sy-ucomm VALUE c_main_tab-tab1,
END OF i_main_tab.
MODULE status_9001 OUTPUT.
SET PF-STATUS 'ZSTATUS'.
SET TITLEBAR 'ZTITLE'.
main_tab-activetab = i_main_tab-pressed_tab.
CASE i_main_tab-pressed_tab.
WHEN c_main_tab-tab1.
IF o_custom_container1 IS INITIAL.
* Creating Object
PERFORM f9000_objects_create.
* Building the field catalog
PERFORM f9001_build_field_cat TABLES i_fcat
USING 'ZZZ_GRID'.
* For Layout
PERFORM f9002_layout USING sy-title c_x c_a c_x.
i_main_tab-subscreen = '9100'.
* Displaying data
CALL METHOD o_alvgrid1->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = c_a
is_layout = w_layout
CHANGING
it_outtab = i_grid[]
it_fieldcatalog = i_fcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i005 WITH text-009."Error in ALV report display
LEAVE LIST-PROCESSING.
ENDIF.
endif.
when c_main_tab-tab2.
if o_custom_container2 is initial.
perform f9000_objects_create1 using:
* create custom container
'o_custom_container2' '' '' '',
* Create splitter container
'o_splitter' o_custom_container2 '2' '1',
* Create event reciever
'o_eventreceiver' '' '' ''.
* Creating containers for the split grids
call method o_splitter->get_container exporting row = 1
column = 1
receiving container = o_container1.
call method o_splitter->get_container exporting row = 2
column = 1
receiving container = o_container2.
* Set where the splits on the screen comes
call method o_splitter->set_row_height
exporting
id = 1
height = 45
exceptions
cntl_error = 1
cntl_system_error = 2
others = 3.
if sy-subrc ne 0.
perform f9003_error_handle using text-E04.
endif.
perform f9000_objects_create1 using:
* Create the alv grids
'o_alvgrid2' o_container1 '' '',
'o_alvgrid3' o_container2 '' ''.
set handler o_eventreceiver->handle_double_click for o_alvgrid2.
perform f9001_build_field_cat tables i_fcat1
using 'ZZZ_GRID1'.
perform f9001_build_field_cat tables i_fcat2
using 'ZZZ_GRID2'.
* For Layout
PERFORM f9002_layout USING sy-title c_x c_a c_x.
i_main_tab-subscreen = '9200'.
if not i_grid1[] is initial.
call method o_alvgrid2->set_table_for_first_display
exporting
is_variant = w_variant
i_save = c_a
is_layout = w_layout
CHANGING
it_outtab = i_grid1[]
it_fieldcatalog = i_fcat1[]
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
if sy-subrc <> 0.
message i005 with text-009."Error in ALV report display
leave list-processing.
endif.
* Populate the GRID2 data
read table i_grid1 into w_grid1 index 1.
if sy-subrc = 0.
if not i_grid2[] is initial.
* Generate the grid2 data.
call method o_alvgrid3->set_table_for_first_display
exporting
is_variant = w_variant
i_save = c_a
is_layout = w_layout
CHANGING
it_outtab = i_grid2[]
it_fieldcatalog = i_fcat2[]
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
endif.
endif.
else.
* No data for the entered selection criteria
message i005 with text-010.
leave list-processing.
endif.
endif.
WHEN OTHERS.
* DO NOTHING
ENDCASE.
ENDMODULE. " STATUS_9001 OUTPUT
*& Module MAIN_TAB_ACTIVE_TAB_GET INPUT
* This is used to catch the pressed tab
MODULE main_tab_active_tab_get INPUT.
CASE sy-ucomm.
WHEN c_main_tab-tab1.
i_main_tab-pressed_tab = c_main_tab-tab1.
i_main_tab-subscreen = '9100'.
WHEN c_main_tab-tab2.
i_main_tab-pressed_tab = c_main_tab-tab2.
i_main_tab-subscreen = '9200'.
WHEN OTHERS.
* DO NOTHING
ENDCASE.
ENDMODULE. " MAIN_TAB_ACTIVE_TAB_GET INPUT
*& Module USER_COMMAND_9001 INPUT
* This is used for user command
MODULE user_command_9001 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
PERFORM exit_program.
SET SCREEN '0'.
WHEN 'EXIT' OR 'CANC'.
PERFORM exit_program.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
* For screen 9001 we need to write Flow logic as below. For subscreens, Flow logic is
* not required.
PROCESS BEFORE OUTPUT.
MODULE STATUS_9001.
CALL SUBSCREEN main_tab_sca
INCLUDING i_main_tab-prog i_main_tab-subscreen.
PROCESS AFTER INPUT.
MODULE user_command_9001.
MODULE main_tab_active_tab_get.
If you need it in selection screen,check this link.
http://www.sapdevelopment.co.uk/reporting/selscr/selscr_tabstrip.htm -
Is printing to generic text printer and hand-coding the report possible?
We have created Oracle Reports that are formatted to print to Zebra printers. We code the report in Report Layout and the text printed is for generic text printers, what our Zebra printers requires. Can this be done with APEX reports?
Example:
^xa
^ilr:val_set.grf2^fs
^fo88,132^a0,90,80^fb464,1,0,C,0^fd&<ACCESSION>^fs
^by2,3.0,32^fs
^ft64,402^BCb,32,n,n^fd&<FARMFIELD>^fs
^ft600,402^BCb,32,n,n^sn&<LOCLOW>,1,y^fs
^fo304,232^a0r,20,20^fd&<LOCTYPE>^fs
^fo334,232^a0,50,45^sn&<LOCLOW>,1,y^fs
(skipping some code here for brevity)
^pq&<LOC_ROWS>^fs
^xz
Asking whether APEX can print to generic text printers and can we code the report output
ourselves.
Thanks for any help.
daveHere is a simple example of printing via pl/sql to a text file...
create or replace procedure utl_file_io is
l_fil utl_file.file_type;
l_buf varchar2(200);
begin
l_fil := utl_file.fopen('TMP', 'amar_test.t', 'W');
utl_file.put_line(l_fil, 'This is a sample text file.');
utl_file.put_line(l_fil, 'Generated from Oracle utl_file package.');
utl_file.put_line(l_fil, 'Below is the content of am1010 table.');
for rec in (select col1, col2 from am1000) loop
utl_file.put_line(l_fil, rpad(rec.col1, 15, ' ') || rec.col2);
end loop;
utl_file.put_line(l_fil, 'End of File');
utl_file.fclose(l_fil);
exception
when no_data_found then
utl_file.fclose(l_fil);
end;
This routine will generate a text file to the default directory on your server, you would need to build an Oracle directory and change the code to include the path to your file there. Getting it to the printer could be a simple shell script that copies the file out your your printer if it is on the network and can be seen..
Thank you,
Tony Miller
Webster, TX -
Where we use lock objects in our coding like report
what is the purpose of lock objects s? how we use them in real time? like in devoloping reports?
Hi,,.
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
Check these links
Re: Lock Objects
http://help.sap.com/saphelp_47x200/helpdata/en/ce/931bb5c79911d5993e00508b6b8b11/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/e1/8e51341a06084de10000009b38f83b/frameset.htm
http://www.sapdevelopment.co.uk/dictionary/lock_enqueue.htm
http://help.sap.com/saphelp_nw04/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
GO TO SE11
Select the radio button "Lock object"..
Give the name starts with EZ or EY..
Example: EYTEST
Press Create button..
Give the short description..
Example: Lock object for table ZTABLE..
In the tables tab..Give the table name..
Example: ZTABLE
Save and generate..
Your lock object is now created..You can see the LOCK MODULES..
In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
Lock objects:
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
Match Code Objects:
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
See this link:
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
Lock objects are used to synchronize access to the same data by more than one program.
General information about the lock mechanism.
You can synchronize access by several programs to the same data with a logical lock mechanism. This lock mechanism fulfills two main functions:
A program can tell other programs which data records it is just reading or changing.
A program can prevent itself from reading data that is just being changed by another program.
When accessing data records, the records just being edited by other programs can be identified by the entry in the lock table. Such an entry for the lock must define a number of fully specified key fields, that is either a value is passed for the key field or this field is locked generically.
To set locks, a lock object must be defined in the ABAP Dictionary. When this lock object is activated, two function modules (see Function Modules for Lock Requests) are generated with the names ENQUEUE_<lockobjectname> and DEQUEUE_<lockobjectname>.
If data records are to be locked, you must call function module ENQUEUE_<lockobjectname>. The values of the key fields that specify the records to be locked are passed for all the tables contained in the lock object when the function module is called. There is a generic lock if a value is not passed for all the key fields. The function module writes the appropriate lock entry (see Example for Lock Objects). If another program also requests a lock, it will be accepted or rejected depending on the lock mode (see Lock Collisions). The program can then react to this situation.
Locked data records can be unlocked by calling function module DEQUEUE_<lockobjectname>. The key values and the lock mode used to set the lock must be passed to the function module.
Creating Lock Objects
Procedure
Select object type Lock object in the initial screen of the ABAP Dictionary, enter an object name and choose Create. The name of a lock object should begin with an E (Enqueue).
The maintenance screen for lock objects is displayed.
Enter an explanatory short text in the field Short text.
You can then use the short text to find the lock object at a later time, for example with the R/3 Repository Information System.
Enter the name of the primary table of the lock object.
All other tables in the lock object must be linked with the primary table using foreign keys. There are also some restrictions on the valid foreign key relationships.
Select the lock mode of the primary table in the field below it.
The lock mode is used as the default value for the corresponding parameters of the function modules generated from the lock object.
Choose Add if you want to lock records in more than one table with the lock object.
A list of all the tables linked with the primary table using valid foreign keys is displayed. Select the appropriate table. The lock mode of the primary table is copied as lock mode. You can change this setting as required, for example you can assign the lock mode separately for each table.
Similarly, you can add a table linked with the secondary table just added with foreign keys. To do this, place the cursor on the name of the secondary table and choose Add.
If no lock mode is assigned to a table, no lock is set for the entries in this table when the generated function modules are called. You should not assign a lock mode if a secondary table was only used to define a path between the primary table and another secondary table with foreign keys.
Save your entries.
A dialog box appears in which you have to assign the lock object a development class.
You can (optionally) exclude lock parameters (see lock objects) from the function module generation on the Lock parameter tab page. This makes sense for example if you always want to lock a parameter generically.
To do this, simply deselect the Weight flag for the parameter. The parameter is not taken into consideration in the generated function modules. This parameter is then always locked generically.
The name of a lock parameter is usually the name of the corresponding table field. If two fields with the same name are used as lock parameters in the lock object from different tables, you must choose a new name for one of the fields in field Lock parameter.
You can define whether the function modules generated from the lock object should be RFC-enabled on the Attributes tab page.
If you set the Allow RFC flag, the generated function modules can be called from within another system with Remote Function Call.
If you permit Remote Function Calls for an existing lock object, you must ensure that the generated function modules are called from within an ABAP program with parameters appropriate for the type. You should therefore check all programs that use the associated function modules before activating the lock object with the new option.
Choose .
Result
When you activate the lock object, the two function modules ENQUEUE_<lockobjectname> and DEQUEUE_<lockobjectname> are generated from its definition to set and release locks.
Regards
Vasu -
Colour coding a report depending on one columns' data
Hi All,
I have no experience with CSS but i need to edit my report to show various rows in difrerent colours depending on the data in a single column ( STATUS ).
Does anybody have a CSS file that i could just edit the table details in to acheive this ?
ThanksThe key is the row template:
<tr class="#5#"><td>#1#</td><td>#2#</td><td>#3#</td><td>#4#</td></tr>
(#5# is column 5 in your Query)
where class sets the background color:
tr.class1 td{background-color:#FFCCCC;}
tr.class2 td{background-color:#CCFFCC;}
tr.class3 td{background-color:#CCCCFF;}
The 3 classes switch, depending on the deptno:
decode(deptno, 10, 'class1', 20, 'class2', 30, 'class3') trclass
But it seems that the report source is not correct !!
trclass is defined as Column1 but refered as Column5
Correct report source would be:
select ename, job, sal, comm,
decode(deptno, 10, 'class1', 20, 'class2', 30, 'class3') trclass
from emp
greetings,
Jochen -
Urgent !!! coding for report 9i
Hi evryone
I need oracle proffesional to solve my issue.
I have foloowing code Written Onn KEY-Print Trigger (form 6i):
DD_PARAMETER(LIST_ID, 'P_FIN_YEAR', TEXT_PARAMETER, :FIN_YEAR);
if :bic_cat_no = 3 then
ADD_PARAMETER(LIST_ID, 'P_maint_type', TEXT_PARAMETER, 'عادي');
elsif :bic_cat_no = 4 then
ADD_PARAMETER(LIST_ID, 'P_maint_type', TEXT_PARAMETER, 'ءءءءءءء');
end if;
And i have now i must use this format for 9i :
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no'
||' P_financial_year='||:GLOBAL.FIN_YEAR .....etc
My Question How i deal With if conditins and ADD_PARAMETER ?
if i use above code for 9i.....Dear Balaji,
I think http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf
link will be useful for you.
Regards,
Senthil .A. Perumal. -
Hi experts,
Is there any book or link which gives the description for coding in crystal reports.
I am using cube as my database. I am new in this. Is there any link which provides me some basics of grouping, OLAP etc. Please help me on this.
Thankx in Advance,
Rishit
Edited by: Rishit Kamdar on Apr 14, 2009 12:37 PMHi Rishit,
Try the following link for sample reports. You can get to understand the coding in reports by looking at the comments within the formula.
Crystal Reports Samples
http://www.crystalbook.com/crpr/program/book/samples.asp
Thanks,
Amogh -
Dynamically select detail report for a master report link item or button?
I'm still new to APEX, so apologies if this sounds like a stupid question, but so far I can't find anything online about how to do the following.
I have a simple report, and I want to be able to drill down from here to a detail report via a link item (or a button) in each row. The problem is that the specific detail report to use depends on a combination of values in the parent record.
So if I have a parent record in the master report with values for columns 1/2/3 of A/B/C, I would drill down to a detail report against table X. If my parent record has values of D/E/F, I might drill down to a different detail report against table Y.
I can build the individual reports easily enough, and I can set up a link item in the master report to drill down to a hard-coded detail report page. I can even generate the name (alias) of the relevant target report as an extra non-DB item in each row of the parent report. But I can't figure out how to allow each row in the parent report to actually link to a different detail report dynamically, depending on the contents of the parent row.
Can anybody suggest an easy way to do this, or point me towards an online resource that would explain how to do this (preferably in basic terms that this APEX-newbie can understand)?
Thanks for your help!Hi,
When you say "Detail report" do you just mean a normal report of the child records for the selected master record or a tabular form style "Details report"?
Using different reports on a page would, typically, depend on the value in a hidden page item - for example, P1_REPORT_TYPE. Your link could pass an appropriate value into this item and the second page would then use this as a Condition for each of the report regions - each region being conditionally displayed when the hidden item is a specific value.
Andy -
How to find import and local purchase order for report
Dear Friends,
Please help me in coding this report, =below is the functional requirement.
1. To find the list of Import or Local Purchase Orders(purchase orders to be procured from another country).
2.Once the import purchase order is selected .The report sould display the PO number ,Currency , Value , po Date , Planned recipt date ,
BUy from vendor , ship from vendor , Origin Country, Destination country, and Status of the PO.
I am clear about the PO number Currency ,value and po date but could not get how do i fetch the details like:--Planned recipt date ,
BUy from vendor , ship from vendor , Origin Country, Destination country, and Status .
Your help is greatly appreciated.Hi,
Buy from vendor is the real vendor who is supplying the items while Ship from vendor is the vendor who just arrange for the transport. This should be maintained in the pruchase order, just consult with your MM consultant to get where they are storing those details
Regards
Karthik D -
When a report is grouped by one column, is there anyway to have that column display once instead of for each record? I can do this easily in Crystal and we're in the process of loading BI Publisher...just wonder if it's possible in coding the reports directly in the Apex report display.
Thanks to both of you!!
Just new learned how to write complex collections (thanks BLARMAN!!) and then the simple stuff I don't know...
All the best,
A -
How to auto save pdf report through forms 6i
we are using the forms-6i and database 9i. and report builder-6i
here our requirement is calling the rdf report at the time of saving the form. and rdf report has opened pdf . that should be save into client machine automatically with prescribed file name. report is opening successfully. but i don't know how to save automaticcaly. can anybody help me how to o this
thank youFORM BUILDER VERSION
Forms [32 Bit] Version 6.0.8.11.3 (Production)
Oracle Toolkit Version 6.0.5.35.0 (Production)
PL/SQL Version 8.0.6.0.0 (Production)
Oracle Procedure Builder V6.0.8.11.0 Build #449 - Production
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
Oracle Query Builder 6.0.7.0.0 - Production
Oracle Virtual Graphics System Version 6.0.5.35.0 (Production)
Oracle Tools GUI Utilities Version 6.0.5.35.0 (Production)
Oracle Multimedia Version 6.0.5.34.0 (Production)
Oracle Tools Integration Version 6.0.8.10.2 (Production)
Oracle Tools Common Area Version 6.0.5.32.1
Oracle CORE Version 4.0.6.0.0 - Production
Report Builder Version
Report Builder 6.0.8.11.3
ORACLE Server Release 8.0.6.0.0
Oracle Procedure Builder 6.0.8.11.0
Oracle ORACLE PL/SQL V8.0.6.0.0 - Production
Oracle CORE Version 4.0.6.0.0 - Production
Oracle Tools Integration Services 6.0.8.10.2
Oracle Tools Common Area 6.0.5.32.1
Oracle Toolkit 2 for Windows 32-bit platforms 6.0.5.35.0
Resource Object Store 6.0.5.0.1
Oracle Help 6.0.5.35.0
Oracle Sqlmgr 6.0.8.11.3
Oracle Query Builder 6.0.7.0.0 - Production
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
Oracle ZRC 6.0.8.11.3
Oracle Express 6.0.8.3.5
Oracle XML Parser 1.0.2.1.0 Production
Oracle Virtual Graphics System 6.0.5.35.0
Oracle Image 6.0.5.34.0
Oracle Multimedia Widget 6.0.5.34.0
Oracle Tools GUI Utilities 6.0.5.35.0
Data Base: Oracle 9i
And we are developing the report by using above mentioned report builder and saved as a .rdf file. from the form. and calling that report from the form runtime by passing the parameters. i mentioned already report is opening fine and accurately. we want to that after opening the report that will be like a save as in pdf format of client_machine at specified location. there is no need to save the user manually and to avoid the user from these steps like to go report window file menu save as . can you pls suggest me how to do
sample coding for report calling
RUN_REPORT_OBJECT_PROC(FIND_REPORT_OBJECT('R_CRITICAL_xseries_multiple'),:Global.report_server,
'PDF',CACHE,:Global.path||'R_CRITICAL_xseries_multiple.rdf','paramform=No',:Global.reportserver_path,rep); -
Can not deploy a report using JDBC connection on CR2008 Server
Hi Group,
I have a report created with JDBC connection. When I tried to add it to CR2008 server, it gives an error - "An unexpected error has occurred ". Basically I want to add a report to a public folder via CMC. I am using adminstrator account.
Then I thought I need to add JDBC driver into CR2008 server. so I put oracle jdbc jar into CR2008 server classpath and add JDBC connection info into CRConfig.xml. but I still got the same error.
I also tried:
- Change the report to use native Oracle driver rather than JDBC. The deployment succeeded (but this is not what I want)
- Add a data source connection via Business View Manager, but no luck.
I know how to use/change jdbc connection with programtic way, but I just want to know if I want to use built-in components in CR2008 server without any coding the reports can be deployed and managed.
Thanks in advance.
DennisHello Will,
Crystal Reports supports connections to JDBC/JNDI out of the box, and have done so for a while, whether stand-alone or published to Enterprise.
To specify where the server would search for the JDBC driver jar files, you'd change the classpath tag found in the CRConfig.xml file found on the machine where the Crystal Reports Page or Job Server is running.
For early Crystal Enterprise 10 and before, it used Java Native Interface (JNI) to start the Java process to retrieve the data from the JDBC connection.
For later Crystal Enterprise 10 and later, it starts off a "Java Server" process, and communicates to the Crystal Reports process via CORBA TCP/IP connection.
Commonissues that may arise: (1) CRConfig.xml not configured properly, (2) unable to start or communicate to the "Java Server" because of permissions or firewall.
Note that this is a separate connectivity map from using ADO or ADO.NET.
Sincerely,
Ted Ueda -
why i cant open my report in JDeveloper tools but i can open in report builder ????
this is the error i get ...
Reports Error Page
Fri Oct 18 15:41:54 SGT 2002
javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server reportserver failed
javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server reportserver failed
int oracle.reports.jsp.ReportTag.doStartTag()
ReportTag.java:329
void MyReport.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
MyReport.jsp:4
void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
HttpJsp.java:119
void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
JspPageTable.java:302
void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
JspServlet.java:407
void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
JspServlet.java:328
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
HttpServlet.java:336
void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
ServletRequestDispatcher.java:684
void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
ServletRequestDispatcher.java:269
boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
HttpRequestHandler.java:735
void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
HttpRequestHandler.java:243
void com.evermind.util.ThreadPoolThread.run()
ThreadPoolThread.java:64i still get the same error .. is it i need to set any environment variable or ... any setting ...??
login Oracle Database
user name = system
password = manager
services = dbhenry
setting JSP Report
Report Name = MyReport1
Reports Server = reportserver
Parameters = userid=system/manager@dbhenry
the cource code below is my JSP report coding :
<rw:report id="MyReport1" parameters="server=reportserver&userid=system/manager@dbhenry">
<rw:objects id="objects">
<?xml version="1.0" encoding="WINDOWS-1252" ?>
<report name="MyReport1" DTDVersion="9.0.2.0.0">
<xmlSettings xmlTag="MYREPORT1" xmlPrologType="text">
<![CDATA[<?xml version="1.0" encoding="&Encoding"?>]]>
</xmlSettings>
<data>
<dataSource name="Q_1">
<select>
<![CDATA[SELECT ALL HENRY.TEL, HENRY."ADD", HENRY.NAME, HENRY.ID
FROM HENRY ]]>
</select> -
Hi All,
We developed a report to display RG1 report, currently in that we are facing a problem.
The problem is when we run the report fro the current month its is not displaying the closing balnce done for the material in the previous month. (i.e.) If the report is run for the January month and if not transaction is performed in the December month the report is supose to fetch the last last transaction performed inthe November month.
The thing is it fetching the value for January month and not the value of November month.
Below we have pasted the logic used for this issue.
The Bold sentence is what used for the specific logic.
*& Report ZFI_IN01_RG1_REPORT
REPORT ZFI_IN01_RG1_REPORT LINE-SIZE 265.
TYPE-POOLS : SLIS.
TABLES : ZIN01_RG1BASE, "RG1 Base Table
MAKT, " Material Descriptions
J_1ICHIDTX. " Chapter id and Text
TYPES: BEGIN OF TP_RG1BASE,
MBLNR LIKE ZIN01_RG1BASE-MBLNR,
REF_DOC LIKE ZIN01_RG1BASE-REF_DOC,
MATNR LIKE ZIN01_RG1BASE-MATNR,
ZEILE LIKE ZIN01_RG1BASE-ZEILE,
J_1ICHID LIKE ZIN01_RG1BASE-J_1ICHID, " CHAPTER ID
J_1ICHT1 LIKE J_1ICHIDTX-J_1ICHT1, " CHAPTER ID DESC
BUDAT LIKE ZIN01_RG1BASE-BUDAT,
BWART LIKE ZIN01_RG1BASE-BWART,
KZBEW LIKE ZIN01_RG1BASE-KZBEW,
CPUTM like ZIN01_RG1BASE-CPUTM,
SPLIT_ID like ZIN01_RG1BASE-SPLIT_ID,
MENGE LIKE ZIN01_RG1BASE-MENGE,
CLOSE_BAL_PRD LIKE ZIN01_RG1BASE-CLOSE_BAL_PRD,
EXPIND LIKE ZIN01_RG1BASE-EXPIND,
ZKZBEW LIKE ZIN01_RG1BASE-ZKZBEW,
REF_MTYPE LIKE ZIN01_RG1BASE-REF_MTYPE,
END OF TP_RG1BASE.
DATA : IG_RG1BASE TYPE STANDARD TABLE OF TP_RG1BASE WITH HEADER LINE
INITIAL SIZE 100 WITH DEFAULT KEY,
WG_RG1BASE LIKE LINE OF IG_RG1BASE,
IG_RG1BASE_COPY LIKE TABLE OF IG_RG1BASE,
WG_RG1BASE_COPY LIKE LINE OF IG_RG1BASE,
IG_SUBCONT TYPE STANDARD TABLE OF TP_RG1BASE WITH HEADER LINE
INITIAL SIZE 100 WITH DEFAULT KEY.
WG_SUBCONT LIKE LINE OF IG_RG1BASE.
DATA : G_OPEN_BAL LIKE ZIN01_RG1BASE-CLOSE_BAL_PRD,
G_CLOSE_BAL LIKE ZIN01_RG1BASE-CLOSE_BAL_PRD,
G_FLAG .
<b>DATA : IG_SORT TYPE TABLE OF ZIN01_RG1BASE ,
WG_SORT TYPE ZIN01_RG1BASE,
IG_ZIN01_RG1BASE LIKE TABLE OF ZIN01_RG1BASE WITH HEADER LINE.</b>
Selection Screen
SELECTION-SCREEN : BEGIN OF BLOCK BLOCK1 WITH FRAME.
PARAMETERS : PF_BUDAT LIKE MKPF-BUDAT OBLIGATORY , " FROM DATE
PT_BUDAT LIKE MKPF-BUDAT OBLIGATORY. " TO DATE
SELECTION-SCREEN : END OF BLOCK BLOCK1.
AT Selection Screen
AT SELECTION-SCREEN.
SELECT SINGLE * FROM ZIN01_RG1BASE WHERE BUDAT BETWEEN PF_BUDAT AND PT_BUDAT AND CANC_IND <> 'C'.
IF SY-SUBRC <> 0.
MESSAGE E006(ZIN01_FI).
ENDIF.
START OF SELECTION
START-OF-SELECTION.
SELECT MBLNR REF_DOC MATNR ZEILE A~J_1ICHID J_1ICHT1 BUDAT BWART KZBEW CPUTM
SPLIT_ID MENGE CLOSE_BAL_PRD EXPIND ZKZBEW REF_MTYPE FROM ZIN01_RG1BASE AS A INNER JOIN J_1ICHIDTX AS B
ON A~J_1ICHID = B~J_1ICHID
INTO TABLE IG_RG1BASE
WHERE BUDAT BETWEEN PF_BUDAT AND PT_BUDAT AND CANC_IND <> 'C'
AND B~LANGU = SY-LANGU+0(1) AND BWART <> '602'
AND BWART <> '262'
AND BWART <> '202'
AND BWART <> '123'
AND BWART <> '162'
AND BWART <> '102'
AND BWART <> '502'
AND BWART <> '532'.
IF SY-SUBRC <> 0.
MESSAGE E006(ZIN01_FI).
ELSE.
SELECT A~MBLNR A~XBLNR B~RDOC1 B~ZEILE B~RITEM1 B~EXBAS B~MENGE INTO TABLE IG_EXCISE FROM MKPF AS A INNER JOIN
J_1IEXCDTL AS B ON A~XBLNR = B~RDOC1
FOR ALL ENTRIES IN IG_RG1BASE
WHERE A~MBLNR = IG_RG1BASE-MBLNR AND B~STATUS <> 'R'.
IF SY-SUBRC <> 0.
MESSAGE E006(ZIN01_FI).
ELSE.
SELECT VBELN POSNN INTO TABLE IG_VBFA FROM VBFA FOR ALL ENTRIES IN IG_EXCISE
WHERE VBELV = IG_EXCISE-RDOC1 AND POSNV = IG_EXCISE-RITEM1 AND VBTYP_N = 'M'.
SORT IG_RG1BASE BY MATNR .
IG_RG1BASE_COPY[] = IG_RG1BASE[].
DELETE ADJACENT DUPLICATES FROM IG_RG1BASE_COPY COMPARING MATNR.
<b>SORT IG_RG1BASE BY MATNR BUDAT CPUTM SPLIT_ID.
SELECT * FROM ZIN01_RG1BASE INTO IG_ZIN01_RG1BASE.
IG_SORT[] = IG_ZIN01_RG1BASE[].
SORT IG_SORT BY MATNR BUDAT DESCENDING.</b>
*for 122 AND 161 movement type : if the refdoc is 101 f , subtract 122 menge from 101 menge.
LOOP AT IG_RG1BASE_COPY INTO WG_RG1BASE_COPY.
CLEAR G_FLAG.
LOOP AT IG_RG1BASE INTO WG_RG1BASE WHERE MATNR = WG_RG1BASE_COPY-MATNR.
<b>IF G_FLAG = ' '.
PERFORM OPENING_BALANCE.
WG_MAIN-OPEN_BAL = G_OPEN_BAL.
ELSE.
WG_MAIN-OPEN_BAL = G_CLOSE_BAL.
ENDIF.</b>
APPEND WG_MAIN TO IG_MAIN.
CLEAR : WG_MAIN, WG_RG1BASE.
ENDLOOP.
CLEAR WG_RG1BASE_COPY.
ENDLOOP.
PERFORM OPENING_BAL_CHANGE.
PERFORM DISPLAY.
*& Form OPENING_BALANCE
text
FORM OPENING_BALANCE.
G_FLAG = F.
<b>READ TABLE IG_SORT INTO WG_SORT WITH KEY MATNR = WG_MATERIAL-MATNR.
IF SY-SUBRC = 0.
*RECIPT +
IF WG_RG1BASE-BWART = '101' AND WG_RG1BASE-KZBEW = 'F' OR WG_RG1BASE-BWART = '501' OR WG_RG1BASE-BWART = '561' OR WG_RG1BASE-BWART = '531'.
G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD - WG_RG1BASE-MENGE.
*ISSUES
ELSEIF WG_RG1BASE-REF_MTYPE = '101' AND WG_RG1BASE-ZKZBEW = 'F' .
G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD + WG_RG1BASE-MENGE.
ELSEIF WG_RG1BASE-REF_MTYPE = '501' OR WG_RG1BASE-REF_MTYPE = '561' OR WG_RG1BASE-REF_MTYPE = '531'.
G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD + WG_RG1BASE-MENGE.
ELSE.
G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD.
ENDIF.
ELSE.
G_OPEN_BAL = 0.
ENDIF.</b>
ENDFORM.
Suggestions and Help will be much appreciated.
Regards.
Ramesh.Hi,
I am having already this report please use this coding.
REPORT YMS_EXDET MESSAGE-ID E4 NO STANDARD PAGE HEADING LINE-SIZE 350.
*REPORT ZMM_EXIN_DOC_ALV_HEADER .
TABLES : J_1IEXCHDR, " header table
J_1IEXCDTL, " item table
J_1IPART1, " Excise part I detials
J_1IPART2, " Excise Part II details
LFA1, " vendor master table
J_1IMOVEND, " vendor excise details table
MSEG, " Document Segment: Material
MKPF, " Header: Material Document
DD07T, " domain text table
T001W. " Plant and Branch Details
DATA : BEGIN OF IT_CHDR OCCURS 100,
SERIALNO LIKE J_1IPART1-SERIALNO,
DOCNO LIKE J_1IEXCHDR-DOCNO,
DOCYR LIKE J_1IEXCHDR-DOCYR,
EXNUM LIKE J_1IEXCHDR-EXNUM,
EXDAT LIKE J_1IEXCHDR-EXDAT,
WERKS LIKE J_1IEXCHDR-WERKS,
EXBED LIKE J_1IEXCHDR-EXBED,
EXCCD LIKE J_1IEXCHDR-EXCCD,
ECS LIKE J_1IEXCHDR-ECS,
STATUS LIKE J_1IEXCHDR-STATUS, "CHALLAN STATUS
END OF IT_CHDR.
DATA : BEGIN OF IT_CDTL OCCURS 100,
SERIALNO LIKE J_1IPART1-SERIALNO,
DOCYR LIKE J_1IEXCDTL-DOCYR,
DOCNO LIKE J_1IEXCDTL-DOCNO,
EXNUM LIKE J_1IEXCDTL-EXNUM,
EXDAT LIKE J_1IEXCDTL-EXDAT,
LIFNR LIKE J_1IEXCDTL-LIFNR,
MATNR LIKE J_1IEXCDTL-MATNR,
MAKTX LIKE J_1IEXCDTL-MAKTX,
CHAPID LIKE J_1IEXCDTL-CHAPID,
EXBAS LIKE J_1IEXCDTL-EXBAS,
EXBED LIKE J_1IEXCDTL-EXBED,
ECS LIKE J_1IEXCDTL-ECS,
MENGE LIKE J_1IEXCDTL-MENGE,
MEINS LIKE J_1IEXCDTL-MEINS,
RDOC2 LIKE J_1IEXCDTL-RDOC2,
EXGRP LIKE J_1IEXCDTL-EXGRP,
RDOC1 LIKE J_1IEXCDTL-RDOC1,
STATUS LIKE J_1IEXCDTL-STATUS, "CHALLAN STATUS
END OF IT_CDTL.
DATA TEXT(10).
DATA : BEGIN OF IT_OUT OCCURS 0,
SERIALNO LIKE J_1IPART1-SERIALNO,
TEXT1 LIKE TEXT,
EXNUM LIKE J_1IEXCDTL-EXNUM,
EXDAT LIKE J_1IEXCDTL-EXDAT,
NAME LIKE LFA1-NAME1,
DDTEXT LIKE DD07T-DDTEXT,
EXCCD LIKE J_1IEXCHDR-EXCCD,
BUDAT LIKE MKPF-BUDAT,
EXBAS LIKE IT_CDTL-EXBAS,
EXBED LIKE IT_CDTL-EXBED,
ECS LIKE IT_CDTL-ECS,
MATNR LIKE IT_CDTL-MATNR,
MAKTX LIKE IT_CDTL-MAKTX,
CHAPID LIKE IT_CDTL-CHAPID,
MENGE LIKE IT_CDTL-MENGE,
MEINS LIKE IT_CDTL-MEINS,
DEL_IND(1),
END OF IT_OUT.
DATA IT_PART2 LIKE J_1IPART1 OCCURS 0 WITH HEADER LINE.
DATA S_NO(4) .
DATA DB_CNT LIKE SY-TABIX.
DATA EBELN_T LIKE MSEG-EBELN .
TYPE-POOLS : SLIS.
DATA : AFIELD TYPE SLIS_FIELDCAT_ALV.
DATA : LIST_HEADER TYPE SLIS_T_LISTHEADER,
FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
LS_FTCAT TYPE LVC_S_FCAT,
SORTCAT TYPE SLIS_T_SORTINFO_ALV,
SORTCAT_LN LIKE LINE OF SORTCAT,
G_REPID LIKE SY-REPID,
G_BACK_GROUND(70), "like bapibds01-objkey,
GS_VARIANT LIKE DISVARIANT,
G_SAVE ,
GT_EVENTS TYPE SLIS_T_EVENT,
ALV_EVENT TYPE SLIS_ALV_EVENT,
EVENTCAT TYPE SLIS_T_EVENT,
EVENTCAT_LN LIKE LINE OF EVENTCAT,
LAYOUT_IN TYPE SLIS_LAYOUT_ALV,
LAYOUT_IN1 TYPE SLIS_LAYOUT_ALV.
CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
'TOP_OF_PAGE',
GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
'USER_COMMAND',
GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE
'BEFORE_OUTPUT'.
ALV_EVENT TYPE SLIS_ALV_EVENT,
DATA EX_NO LIKE IT_CHDR-EXNUM VALUE 0.
DATA REGTYP_1 LIKE J_1IPART1-REGTYP.
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
PARAMETERS WERKS TYPE J_1IEXCHDR-WERKS.
SELECT-OPTIONS : BUDAT FOR J_1IEXCHDR-EXDAT.
PARAMETERS : R1 RADIOBUTTON GROUP GRP DEFAULT 'X',
R2 RADIOBUTTON GROUP GRP.
SELECTION-SCREEN END OF BLOCK B.
INITIALIZATION.
G_REPID = SY-REPID.
G_SAVE = 'A'.
PERFORM BUILD_EVENT USING GT_EVENTS[].
PERFORM ALV_EVENT_INIT.
AT SELECTION-SCREEN.
REFRESH LIST_HEADER.
PERFORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER.
START-OF-SELECTION.
PERFORM ALV_EVENT_INIT.
G_REPID = SY-REPID.
G_BACK_GROUND = ' ' .
IF R1 = 'X'.
CLEAR R2. CLEAR : REGTYP_1.
REGTYP_1 = 'A'.
set titlebar 'BALAJI' with DB_CNT.
ELSEIF R2 = 'X'.
CLEAR R1.CLEAR : REGTYP_1.
REGTYP_1 = 'C'.
set titlebar 'BALAJI1' with DB_CNT.
ENDIF.
SELECT * FROM J_1IPART1
INTO CORRESPONDING FIELDS OF TABLE IT_PART2
WHERE REGTYP = REGTYP_1 AND
TRNTYP = 'GRPO'.
AND BUDAT IN BUDAT.
DOCYR = IT_CDTL-DOCYR AND
DOCNO = IT_CDTL-DOCNO.
LOOP AT IT_PART2.
SELECT SINGLE * FROM J_1IEXCHDR
INTO CORRESPONDING FIELDS OF IT_CHDR
WHERE TRNTYP = 'GRPO' AND
STATUS NE ' ' AND
STATUS EQ ' ' AND
DOCYR = IT_PART2-DOCYR AND
DOCNO = IT_PART2-DOCNO AND
WERKS = WERKS AND
EXDAT IN BUDAT.
ORDER BY EXDAT.
IF SY-SUBRC = 0.
APPEND IT_CHDR.
ELSE.
CONTINUE.
ENDIF.
IF SY-SUBRC <> 0.
MESSAGE E084.
ENDIF.
ENDLOOP.
*******************SPD****************
SELECT * INTO CORRESPONDING FIELDS OF IT_CDTL FROM J_1IEXCDTL WHERE
TRNTYP = 'GRPO' AND WERKS = WERKS AND
EXDAT IN BUDAT AND STATUS NE 'B'.
SELECT SINGLE * FROM J_1IPART1 WHERE DOCNO = IT_CDTL-DOCNO AND
DOCYR = IT_CDTL-DOCYR AND
REGTYP = REGTYP_1.
IF SY-SUBRC EQ 0.
SELECT SINGLE * FROM J_1IPART2 WHERE DOCNO = IT_CDTL-DOCNO AND
DOCYR = IT_CDTL-DOCYR.
IF SY-SUBRC NE 0.
IT_CDTL-SERIALNO = J_1IPART1-SERIALNO.
APPEND IT_CDTL.
ENDIF.
ENDIF.
ENDSELECT.
***************SPD********************
SELECT BDOCNO BDOCYR BEXNUM BEXDAT BWERKS BEXBED B~EXCCD
B~ECS
B~STATUS
A~SERIALNO
FROM J_1IPART1 AS A INNER JOIN J_1IEXCHDR AS B
ON ADOCYR = BDOCYR AND ADOCNO = BDOCNO INTO CORRESPONDING
FIELDS OF TABLE IT_CHDR WHERE B~TRNTYP = 'GRPO' AND
BWERKS = WERKS AND BEXDAT IN BUDAT AND
B~STATUS = ' ' AND
B~STATUS = 'C' AND
A~REGTYP = REGTYP_1.
SORT IT_PART2 BY SERIALNO.
LOOP AT IT_CHDR.
SELECT * FROM J_1IEXCDTL
INTO CORRESPONDING FIELDS OF IT_CDTL
FOR ALL ENTRIES IN IT_CHDR
WHERE
TRNTYP = 'GRPO' AND
STATUS EQ ' ' AND
STATUS EQ 'C' AND
STATUS NE 'P' AND
DOCNO = IT_CHDR-DOCNO AND
DOCYR = IT_CHDR-DOCYR AND
EXNUM = IT_CHDR-EXNUM AND
EXDAT = IT_CHDR-EXDAT AND
WERKS = IT_CHDR-WERKS.
IF SY-SUBRC = 0.
APPEND IT_CDTL.
CLEAR IT_CDTL.
ELSE.
CONTINUE.
ENDIF.
ENDSELECT.
MODIFY IT_CDTL INDEX SY-TABIX.
CLEAR IT_CDTL.
ENDLOOP.
*****spd change**********
*LOOP AT IT_CDTL.
*SELECT SINGLE * FROM J_1IPART2 WHERE DOCNO = IT_CDTL-DOCNO AND
DOCYR = IT_CDTL-DOCYR.
*IF SY-SUBRC = 0.
DELETE IT_CDTL INDEX SY-TABIX.
*ENDIF.
*ENDLOOP.
**SELECT
*******spd ****************
SORT IT_CDTL BY EXNUM EXDAT.
DELETE ADJACENT DUPLICATES FROM IT_CDTL COMPARING MATNR EXNUM EXDAT.
LOOP AT IT_CDTL.
CLEAR TEXT.
DB_CNT = DB_CNT + 1.
READ TABLE IT_CHDR WITH KEY EXNUM = IT_CDTL-EXNUM DOCNO =
IT_CDTL-DOCNO.
READ TABLE IT_PART2 WITH KEY DOCNO = IT_CDTL-DOCNO .
IT_OUT-SERIALNO = IT_PART2-SERIALNO.
SELECT SINGLE NAME1 FROM LFA1
INTO IT_OUT-NAME
WHERE LIFNR = IT_CDTL-LIFNR.
SELECT SINGLE * FROM LFA1
WHERE LIFNR = IT_CDTL-LIFNR.
IF LFA1-LAND1 EQ 'IN'.
TEXT = 'INVOICE'.
IT_OUT-TEXT1 = TEXT.
ELSE.
TEXT = 'BOE'.
IT_OUT-TEXT1 = TEXT.
ENDIF.
SELECT SINGLE * FROM J_1IMOVEND
WHERE LIFNR = IT_CDTL-LIFNR.
SELECT SINGLE * FROM DD07T
INTO IT_OUT-DDTEXT
WHERE DOMNAME = 'J_1IVTYP' AND
DDLANGUAGE = 'EN' AND
DOMVALUE_L = J_1IMOVEND-J_1IVTYP.
IF DD07T-DDTEXT = 'First Stage Dealer of indigenous excisable goods'
OR
DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisablegoods'.
DD07T-DDTEXT = 'Dealer'.
ENDIF.
IT_OUT-DDTEXT = DD07T-DDTEXT.
ELSEIF DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisable
*goods'.
DD07T-DDTEXT =
CLEAR EBELN_T.
SELECT SINGLE LFBNR FROM MSEG
INTO EBELN_T
WHERE MBLNR = IT_CDTL-RDOC2 .
SELECT SINGLE * FROM MSEG
WHERE BWART EQ '106' AND
LFBNR = EBELN_T ."and
ebeln = ebeln_t.
IF SY-SUBRC = 0.
IT_OUT-DEL_IND = 'X'.
ELSE.
IT_OUT-DEL_IND = ' '.
ENDIF.
SELECT SINGLE BUDAT FROM MKPF
INTO IT_OUT-BUDAT
WHERE MBLNR = EBELN_T ."MSEG-LFBNR.
IT_OUT-EXNUM = IT_CDTL-EXNUM.
IT_OUT-EXDAT = IT_CDTL-EXDAT.
IT_OUT-EXCCD = IT_CHDR-EXCCD.
IT_OUT-SERIALNO = IT_CHDR-SERIALNO.
IT_OUT-SERIALNO = IT_CDTL-SERIALNO.
IT_OUT-EXBAS = IT_CDTL-EXBAS.
IT_OUT-EXBED = IT_CDTL-EXBED.
IT_OUT-ECS = IT_CDTL-ECS.
IT_OUT-MATNR = IT_CDTL-MATNR.
IT_OUT-MAKTX = IT_CDTL-MAKTX.
IT_OUT-CHAPID = IT_CDTL-CHAPID.
IT_OUT-MENGE = IT_CDTL-MENGE.
IT_OUT-MEINS = IT_CDTL-MEINS.
APPEND IT_OUT.
EX_NO = IT_CDTL-EXNUM.
ENDLOOP.
Title Portion
IF REGTYP_1 = 'A'.
SET TITLEBAR 'BALAJI' WITH DB_CNT.
ELSEIF REGTYP_1 = 'C'.
SET TITLEBAR 'BALAJI1' WITH DB_CNT.
ENDIF.
AFIELD-COL_POS = 1.
AFIELD-FIELDNAME = 'SERIALNO'.
AFIELD-SELTEXT_L = 'SERIAL NO.'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 2.
AFIELD-FIELDNAME = 'TEXT1'.
AFIELD-SELTEXT_L = 'TYPE OF DOC'.
AFIELD-JUST = 'L'.
AFIELD-DECIMALS_OUT = '0'.
AFIELD-NO_ZERO = 'X'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 3.
AFIELD-FIELDNAME = 'EXNUM'.
AFIELD-SELTEXT_L = 'DOC.NO'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 4.
AFIELD-FIELDNAME = 'EXDAT'.
AFIELD-SELTEXT_L = 'DOC.DATE'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 5.
AFIELD-FIELDNAME = 'NAME'.
AFIELD-SELTEXT_L = 'NAME OF THE SUPPLIER'.
AFIELD-NO_ZERO = 'X'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 6.
AFIELD-FIELDNAME = 'DDTEXT'.
AFIELD-SELTEXT_L = 'TYPE-OF-SUPPLIER'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 7.
AFIELD-FIELDNAME = 'EXCCD'.
AFIELD-SELTEXT_L = 'ECC OF THE SUPPLIER'.
AFIELD-NO_ZERO = 'X'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 8.
AFIELD-FIELDNAME = 'BUDAT'.
AFIELD-SELTEXT_L = 'INPUT RECV DATE'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 9.
AFIELD-FIELDNAME = 'EXBAS'.
AFIELD-SELTEXT_L = 'ASSESSABLE-VALUE'.
AFIELD-DO_SUM = 'X'.
AFIELD-JUST = 'R'.
AFIELD-DECIMALS_OUT = '2'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 10.
AFIELD-FIELDNAME = 'EXBED'.
AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN CENVAT'.
AFIELD-JUST = 'R'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 11.
AFIELD-FIELDNAME = 'ECS'.
AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN E-CESS'.
AFIELD-JUST = 'R'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 12.
AFIELD-FIELDNAME = 'MATNR'.
AFIELD-SELTEXT_L = 'MATERIAL-CODE'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 13.
AFIELD-FIELDNAME = 'MAKTX'.
AFIELD-SELTEXT_L = 'DESCRIPTION'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 14.
AFIELD-FIELDNAME = 'CHAPID'.
AFIELD-SELTEXT_L = 'TARIFF-ID'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 15.
AFIELD-FIELDNAME = 'MENGE'.
AFIELD-SELTEXT_L = 'QUANTITY'.
AFIELD-JUST = 'R'.
AFIELD-DO_SUM = ' '.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 16.
AFIELD-FIELDNAME = 'MEINS'.
AFIELD-SELTEXT_L = 'UOM'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 17.
AFIELD-FIELDNAME = 'DEL_IND'.
AFIELD-SELTEXT_L = 'Deleted'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 18.
AFIELD-FIELDNAME = 'PO NO'.
AFIELD-SELTEXT_L = 'PURDOCNO'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
* LAYOUT FOR ZEBRA CATLOG
LAYOUT_IN-COLWIDTH_OPTIMIZE = 'X'.
LAYOUT_IN-ZEBRA = 'X'.
LAYOUT_IN-GET_SELINFOS = 'X'.
LAYOUT_IN-CONFIRMATION_PROMPT = 'X'.
LAYOUT_IN-DETAIL_POPUP = 'X' .
SORTCAT-decimals = '0'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_SAVE = G_SAVE
IS_VARIANT = GS_VARIANT
IT_FIELDCAT = FIELDCAT
IT_SORT = SORTCAT
IS_LAYOUT = LAYOUT_IN
IT_EVENTS = EVENTCAT
I_BACKGROUND_ID = g_back_ground
TABLES
T_OUTTAB = IT_OUT.
*& Form TOP_OF_PAGE_LIST_HEADER
text
-->LIST_HEADERtext
FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.
DATA : HLINE TYPE SLIS_LISTHEADER,
TEXT(60) TYPE C.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'PLANT :' TO TEXT.
WRITE WERKS TO TEXT+8.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-NAME1 TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-STRAS TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-ORT01 TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'DATE :' TO TEXT.
WRITE BUDAT-LOW TO TEXT+7.
IF BUDAT-HIGH NE ''.
WRITE 'TO' TO TEXT+18.
WRITE BUDAT-HIGH TO TEXT+22.
ENDIF.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
ENDFORM. "TOP_OF_PAGE_LIST_HEADER
*& Form ALV_EVENT_INIT
text
FORM ALV_EVENT_INIT .
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.
APPEND ALV_EVENT TO EVENTCAT.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.
APPEND ALV_EVENT TO EVENTCAT.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.
ALV_EVENT-FORM = 'ALV_END_OF_LIST'.
APPEND ALV_EVENT TO GT_EVENTS.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.
ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.
APPEND ALV_EVENT TO GT_EVENTS.
ENDFORM. "ALV_EVENT_INIT
*& Form ALV_TOP_OF_PAGE
text
FORM ALV_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = LIST_HEADER
I_LOGO = 'ENJOYSAP_LOGO'.
ENDFORM. "ALV_TOP_OF_PAGE
*& Form BUILD_EVENT
text
-->P_GT_EVENTS[] text
FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = P_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO
ALV_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.
APPEND ALV_EVENT TO P_EVENTS.
ENDIF.
READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO
ALV_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.
APPEND ALV_EVENT TO P_EVENTS.
ENDIF.
ENDFORM. " BUILD_EVENT
Thanks,
Shankar
Maybe you are looking for
-
Upgraded from Snow Leopard to Lion, SMB issues - incorrect password
This is a very frustrating issue, and its affecting my work now. Basically I used to use the SMB sharing quite a lot in work, it was an ideal way for our clients to get to data off my MBP and worked like a dream in OSX 10.6 I was an early adopter, an
-
Search Criteria - job search for candidate - TREX
I need to add branches field to selection criteria for job search function( candidate pages). in standard we have functional area,hirarchy level,country,Work contract type,Education level. i was able to add branches successful , but when i search wh
-
How can i connect my touch to my home wifi?
I currently live in France and can connect my touch to my son's wifi network in England and even in MacDonalds in Poitiers (France) but i am unable to connect to my wifi network at home using the Orange Livebox. Can anyone help?
-
Moving songs and such to a new PC
My old PC failed. I pulled the hard drive and connected it to the new PC with a USB cable. I copied the contents of My Music folder to the new PC. iTunes sees the song titles and album art but when i try to play a song I get an error message - "The s
-
MBAM 2.5 Issue with Self Service Portal
I have recently set up an MBAM 2.5 server to test with for a potential roll out of encryption to all laptops in our enterprise. All seems well. I have tested the recovery using the Drive Recovery option on the HelpDesk page and that works just fine