Query on display the Alv output,...................its urgent pls help
hi friends,
Here is my query on a Alv Report output display
I have two internal tables i_vbak and i_vbap
i_vbak contains the fields and value as
vbeln kunnr auart audat bstnk vkorg
1000066 1000071 ze0r 20070918 Itest1 PA11
1000067 1000072 ze0r 20070919 SLA-Test1 PA11
i_vbap contains the field and value as
VBELN MATNR ARKTX
1000066 SAMPLE MATERIAL1 Sample Material for reports
1000066 SAMPLE MATERIAL Sample Material for reports
1000066 TEST MATERIAL Test Material for reports
1000067 SAMPLE MATERIAL Sample Material for reports
1000067 TEST MATERIAL Test Material for reports
1000067 SAMPLE MATERIAL1 Sample Material for reports
I have a another internal table called inv_final which contain all these fields and respective values to display in the alv output.Here i am giving only two field how it whould come in alv output.
Sold to Patry(kunnr) Sales Doc No(vbap-vbeln) Material Name(matnr)
1000071 1000066 Sample Material1
1000071 1000066 Sample Material
1000071 1000066 Test Material
1000072 1000067 Sample Material
1000072 1000067 Test Material
1000072 1000067 Sample Material1
If anybody have done similay kind of repore than help me with the code,or else if anybody having any idea to solve this out than help me.I have only prob with the logic bofore the final table display in the alv output.
Helpful answer will be rewardad generously.
Thanks a lot
mrutyun^
Hi
Put all the fields in to an internal table and disply only your required fields.
Kuntal
Similar Messages
-
Delete duplicate entriess from the internal table its urgent pls help.
Hi friends,
Hope everybody is doing good,Here is m query on delete duplicate data from the intenal table.
I have an internal table which contain data in the following format.
Doc No Comp Cod Vendor Assignment
1500000009 JM11 00000000
1500000008 JM11 20070212(Repeating)
1500000007 JM11 20070212
1500000006 JM11 00000000
1500000005 JM11 00000000
1500000004 JM11 00000000(Repeating)
1500000003 JM11 00000000 (Repeating)
1500000002 JM11 00000000
1500000001 JM11 20050302
1500000000 JM11 00000000
1500000003 JM11 10000088
1500000001 JM11 10000088
1500000030 JM11 10006260
1500000010 JM11 10006269
1500000008 JM11 10006269
1500000006 JM11 10006269
1500000004 JM11 10006269
if you see the document numbers,there are some document number which are repeating here,there are some document numer which contain vendor number but not the assignments,some of the document numbers contain the assignments but not the vendors.
If my internal table contain this kind of data with repeted document numbers than i want the document number which contains only the vendor number.
Pls help me with the appropriate logic,its urgent.
Thanks a lot
mrutyun^Hi,
<u><b>Deleting Adjacent Duplicate Entries</b></u>
To delete adjacent duplicate entries use the following statement:
DELETE ADJACENT DUPLICATE ENTRIES FROM <itab>
[COMPARING <f1> <f2> ...
|ALL FIELDS].
The system deletes all adjacent duplicate entries from the internal table <itab>. Entries are
duplicate if they fulfill one of the following compare criteria:
Without the COMPARING addition, the contents of the key fields of the table must be
identical in both lines.
If you use the addition COMPARING <f1> <f2> ... the contents of the specified fields <f1>
<f2> ... must be identical in both lines. You can also specify a field <fi> dynamically as
the contents of a field <ni> in the form (<ni>). If <ni> is empty when the statement is
executed, it is ignored. You can restrict the search to partial fields by
specifying offset and length.
If you use the addition COMPARING ALL FIELDS the contents of all fields of both lines
must be identical.
You can use this statement to delete all duplicate entries from an internal table if the table is
sorted by the specified compare criterion.
If at least one line is deleted, the system sets SY-SUBRC to 0, otherwise to 4.
Examples
DATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA ITAB LIKE HASHED TABLE OF LINE WITH UNIQUE KEY COL1.
DO 4 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
INSERT LINE INTO TABLE ITAB.
ENDDO.
LINE-COL1 = 1.
DELETE TABLE ITAB: FROM LINE,
WITH TABLE KEY COL1 = 3.
LOOP AT ITAB INTO LINE.
WRITE: / LINE-COL1, LINE-COL2.
ENDLOOP.
The output is:
2 4
4 16
The program fills a hashed table with a list of square numbers. The DELETE
statement delete the lines from the table where the key field COL1 has the contents 1 or 3.
Regards,
Bhaskar -
ALV Report_ its urgent pls help me ( every input gets the reward points)
Program with ALV_Grid
1. Selection Screen
Customer Number: KUNNR
Billing Date: FKDAT
Now Using the above Selection screen inputs, I want to generate the following fields in the output.
2. Output Screen
Invoice No: VBELN
Invoice Date: FKDAT
Customer Number: KUNNR
Customer Name: NAME1
Material Description: MAKTX
Payment Terms: ZTERM
Net Value: NETWR
Ship-to City: ORT01
Sold-to party: KUNAG
Ship-to party: KUNNR
Tables Used:
Delivery: LIKP, LIPS
Invoice:VBRK, VBRP
Customer: KNA1
Material: MARA
Material Description: MAKT
Now the Problem what I got is....How to link between these tables...ie., what common fields can be used between these tables so that I can use FOR ALL ENTRIES and retrieve the above output fields.
3. Create Dictionary Structure for Output Data
4. Create Dynpro (Screen 9000)
5. Create ALV Grid Object and Call Method "set_table_for_first_display" of alv obj in PBO Module of Screen
Can anyone please help me out in giving a REPORT program or a pseudo code for the above data.Hi
The link with select-options
VBRK-KUNAG (or KUNRG) -> KUNNR (Select option)
VBRK-FKDAT -> FKDAT (Select option)
Link between header and item data
VBRP-VBELN = VBRK-VBELN.
Link beetween invoice and delivery
VBRP-VGBEL = LIPS-VBELN
VBRP-VGPOS = LIPS-POSNR
Link beetween header and item delivery
LIPS-VBELN = LIKP-VBELN
Link beetween document and material
VBRP-MATNR (or LIPS-MATNR) = MARA-MATNR
Link with customer master data
VBRK-KUNAG (or KUNRG) = KNA1-KUNNR
Max -
Its urgent pls help me .
how can i call a portal from webdynpro application
my requirment is
i was created webdynpro application.
in that i was created one view . in that i was created one button (go).
if i click that button i want move some other portal.
how can i acchive pls help me.
its urgent.
pls send any example programe
Message was edited by:
madipadiga nagaraju
Message was edited by:
madipadiga nagarajuhi,
there is no direct tcode for going to webdynpro component/interfaces in ecc 6.0.
but u have se58 in ecc 5.0,as webdynpro convertor.u give ur program name and click web dynpro convertor button then it takes u to se80 .but this wda(webdynpro abap) component comes as in application tree hierarchy .
i can say in wda component refers a class .if u select webdynpro component/interface,it ask u to create a class or interface.
after that it automatically generate component controller(it is also a class),
interface view and windows.all these 3 are classes.for every window one interface view will be created.ie.. window is internal visible where as interface view is external visible.
u create view and embed these views in windows.by going to the window layout,right click on the window name and click embed view.u can enbed as many view as u wish.in order to navigate from one view to other view ,click "create navigation" by right clicking the view plugs.
by default windows and view have inbound plugs.this is literally a event of that class.
if u want to navigate from view1 to view2 ,create outbound plug for view1,the click outbound plug of view1 and right click the click create navigation the select inbound plug of view2.
then create a application .this is simillar of creating an object.
click on this object and test .this will open in browser.
for deploying u have use "sap webdynpro iview". -
How to display the ALV output in a Group format
Hello Experts,
I have my current ALV report output like this:
GROUP DESCRIPTION
group1 adsfadsfadsfa
group1 lkjadsfjlajdsfla
group1 adsfadsfadsf
group1 adsfadsfadfa
group2 adsfadsfafaa
group2 oiueworuowe
group2 zxvzcxvzvcsd
group2 oiuqoewruqw
And I need to display the output of my ALV report in a group format like this:
GROUP DESCRIPTION
group1 adsfadsfadsfa
lkjadsfjlajdsfla
adsfadsfadsf
adsfadsfadfa
group2 adsfadsfafaa
oiueworuowe
zxvzcxvzvcsd
oiuqoewruqw
Can anybody please let me know if there is any sample program/thread/help etc.
I grealty appreciate your help.
Thanks.Hi Rainer,
Thanks for the reply. I am using container for the ALV Display.
So I wrote my code lie this:
sort t_data by zgroup zdesc ( t_data is my output internal table) .
I have my ALV layout delcared like this:
data: alv_layout type lvc_s_layo.
So I have modified my code like this:
alv_layout-NO_MERGING = 'X'.
But it did'nt work. Please let me know if I need make any other changes.
Thanks again. -
Download ALV to EXcel- Urgent pls help me
Please help me in this...
I have an ALV report around 120 column. The report is displayed perfectly on screen. But when I use the Export option to download as an excel file, some data is missing in SAP No field
For example
My report output is like this
sap No Name Jobdes. Dept
00021 AAA clerk1 FI
00022 BBB clerk1 FI
00023 CCC clerk1 FI
00024 DDD clerk1 FI
00025 EEE clerk1 FI
00026 FFF clerk1 FI
Excel output is
sap No Name Jobdes. Dept
00021 AAA clerk1 FI
Blank BBB clerk1 FI
Blank CCC clerk1 FI
Blank DDD clerk1 FI
00025 EEE clerk1 FI
Blank FFF clerk1 FI
Pls help meHi Kumar,
Pls try the below Function Modules to download the data to excel.
ALSM_EXCEL_TO_INTERNAL_TABLE
KCD_EXCEL_OLE_TO_INT_CONVERT Uploads data directly from Excel sheet
RH_START_EXCEL_WITH_DATA Starts Excel with contents of an internal table
or the below links also might help you.
For uploading Excel to Internal Table??????
Data from Excel sheet to my internal table
Check the following link:
http://www.sap-img.com/abap/upload-direct-excel.htm
or even the below code might be helpful.
Multiple excel sheets generation in a workbook
CREATE OBJECT EXCEL 'EXCEL.SHEET'.
GET PROPERTY OF EXCEL 'Application' = APPLICATION.
SET PROPERTY OF APPLICATION 'Visible' = 1.
CALL METHOD OF APPLICATION 'Workbooks' = BOOKS.
CALL METHOD OF BOOKS 'Add' = BOOK.
CALL METHOD OF BOOK 'WORKSHEETS' = SHEET.
CALL METHOD OF SHEET 'ADD'.
Fill all the sheets with relavant data
PERFORM SHEET1 TABLES ITAB1.
PERFORM SHEET2 TABLES ITAB2.
PERFORM SHEET3 TABLES ITAB3.
PERFORM SHEET4 TABLES ITAB4.
Quit the excel after use
CALL METHOD OF EXCEL 'QUIT'.
FREE OBJECT: COLUMN,SHEET,BOOK,BOOKS,APPLICATION,EXCEL. "NO FLUSH.
CLEAR V_SHEET.
FORM FILL_CELL USING ROW COL VAL.
CALL METHOD OF SHEET 'cells' = CELL NO FLUSH
EXPORTING #1 = ROW #2 = COL.
SET PROPERTY OF CELL 'value' = VAL.
FREE OBJECT CELL NO FLUSH.
ENDFORM. " FILL_CELL
FORM SHEET1 TABLES ITAB1 STRUCTURE ITAB1.
V_SHEET = Sheet Name.
V_NO = V_NO + 1.
CALL METHOD OF BOOK 'worksheets' = SHEET NO FLUSH EXPORTING #1 = V_NO.
SET PROPERTY OF SHEET 'Name' = V_SHEET NO FLUSH.
PERFORM FILL_SHEET1 TABLES ITAB1 USING V_NO V_SHEET.
CALL METHOD OF SHEET 'Columns' = COLUMN.
FREE OBJECT SHEET.
CALL METHOD OF COLUMN 'Autofit'.
FREE OBJECT COLUMN.
ENDFORM.
Repeat above procedure for all sheets you want to add
FORM FILL_SHEET1
TABLES ITAB1 STRUCTURE ITAB1
USING V_NO V_SHEET.
ROW = 1.
PERFORM FILL_CELL USING ROW 1 'Column1 Name'.
PERFORM FILL_CELL USING ROW 2 'Column2 Name'.
PERFORM FILL_CELL USING ROW 3 'Column3 Name'.
ROW = ROW + 1.
LOOP AT ITAB1.
PERFORM FILL_CELL USING ROW 1 ITAB1-Column1.
PERFORM FILL_CELL USING ROW 2 ITAB1-Column2.
PERFORM FILL_CELL USING ROW 3 ITAB1-Column3.
ROW = ROW + 1.
ENDLOOP.
ENDFORM.
Repeat above procedure for all sheets you want to add
Try this also
TYPE-POOLS: truxs.
DATA: it_raw TYPE truxs_t_text_data.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
Upload Excel file
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = p_file
TABLES
i_tab_converted_data = i_XCEL[]
EXCEPTIONS
conversion_failed = 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.
Pls reward if useful.
THanks,
Sirisha -
Query to display the following output
Hello,
I am using Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production.
My table structure is
Loaneenumber varchar2(10),
Loaneename varchar2(50),
Loantype varchar2(30),
Balance_amount number(12,2),
Remarks varchar2(200)
Sample data
insert into test values ('01002S001', ' Srinivas K.' , ' Advance', ' 25000', '200708 Outstanding loans');
insert into test values ('01002S001', ' Srinivas K.' , ' Advance', ' 22500', '200607 Outstanding loans');
insert into test values ('01002S001', ' Srinivas K.' , ' Advance', ' 5000', 200506 Out Standing Loan For Advance);
I need to display output as follows
Loaneenumber Loaneename Loantype Inputs0708 Inputs0607 Inputs0506
01002S001 Srinivas K. Advance 25,000 22,500 5,000
Years 200708, 200607 are in remarks column. Can I use like operator in decode function?
For one year data I have written the following query
SELECT loaneenumber,
loaneename,
loantype,
balance_amount as "Inputs0708"
FROM cmsloanissuetransaction
WHERE balance_amount >0
AND loantype NOT IN ( 'Bank Loan' ,
'LOANS 2001-02',
'LOANS 2002-03',
'LOANS 2003-04',
'LOANS 2004-05')
AND loancategory ='RYOT'
AND (remarks NOT LIKE '200506%' AND remarks NOT LIKE '200607%')
How to display three years data side by side?
Regards
Krishna
Edited by: KRKP on Sep 17, 2008 9:08 PMTry this..
SELECT loaneenumber,
loaneename,
loantype,
(case
when remarks LIKE '200708%' then balance_amount) as "Inputs0708" ,
(case
when remarks LIKE '200607%' then balance_amount) as "Inputs0607" ,
(case
when remarks LIKE '200506%' then balance_amount) as "Inputs0506" ,
FROM cmsloanissuetransaction
WHERE balance_amount >0
AND loancategory ='RYOT' -
Bat files from java application..its urgent pls help me
hi
My java application tries to execute the bat file, the code followes
Runtime runs = Runtime.getRuntime();
runs.exec("e:/customisation/test.bat");
The bat file contains commands to copy files from one folder to another
and some dos commands, but the commands are not executing. If i tried the bat file with some exe's like notepad its working well, but not working with dos commands.
thanks in advance
nisamHi
Your batch file will be working actually. But no output will be seen in the console window.
For example I had created a batch file with the folowing code
echo This is test
copy test.bat test1.bat
pause
Even though I can't see the messages in the console, it executed when called using
Runtime runs = Runtime.getRuntime();
runs.exec("hi.bat");
where hi.bat contains the above code.
If you want to see the output messages also in the console, you have to redirect the outputstream to the current console. One such class this does is available somewhere in Java(I don't exactly remember :-( ). I think it is StreamPluginThread.java
Regards -
Problems with async callback with the BPEL Java API (Urgent- pls help)
Hi,
I have an async BPEL process and I invoke it form a JSP page using BPEL java API.
I have followed the tutorials and docs at:
$SOA_HOME/bpel\samples\tutorials\102.InvokingProcesses\rmi\com\otn\samples\async
I can inititiate successfully the process, but when I try to get the result using getResult() or getField(String fieldName) methods I get the error:
Oct 2, 2007 2:35:16 PM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
WARNING: Exception returned by remote server: {0}
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at com.evermind.io.ClassLoaderObjectInputStream.resolveClass(ClassLoaderObjectInputStream.java:33)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:856)
at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:287)
at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:242)
at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:224)
at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152)
at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.util.MissingResourceException: Can't find bundle for base name com.collaxa.cube.i18n.exception_cube, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)
at com.collaxa.cube.CubeException.getResourceBundle(CubeException.java:142)
at com.collaxa.cube.CubeException.<clinit>(CubeException.java:82)
... 17 more
07/10/02 14:35:16 java.lang.ClassCastException: java.util.MissingResourceException
07/10/02 14:35:16 at com.oracle.bpel.client.delivery.ext.async.thread.AsyncInstanceWatchdog.run(AsyncInstanceWatchdog.java:152)
I check for the result only after I have checked that the instance is closed (completed or faulted) by using IInstanceHandle:getState() and InstanceHandle.STATE_CLOSED_COMPLETED, or IInstanceHandle.STATE_CLOSED_FAULTED
I would like to add that so far I had no problems with invocation and geting result of sync BPEL processes. I do not what is missing for async processes.
Any kind of help is appreciable.
Thanks and best regards,
EvanelaHi again,
i managed to solve the problem:) Totally stupid.. the process variable name was not specified correctly..., but more stupid sounds the error message:))))
Best Regards,
Evanela -
Total is not getting displayed in the ALV output.
Hi,
Total is not getting displayed in the ALV output.
I m using :REUSE_ALV_BLOCK_LIST_APPEND & REUSE_ALV_BLOCK_LIST_DISPLAY
Are there any issues with it as the same settings are working fine with REUSE_ALV_LIST_DISPLAY
source code:
DATA: layout TYPE slis_layout_alv,
IT_eventS TYPE slis_t_event,
fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
rec_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
TYPES: BEGIN OF ty_tab,
belnr TYPE dberchz-belnr,
belzart TYPE dberchz-belzart,
net TYPE dberchz-nettobtr,
END OF ty_tab.
DATA: lt_tab TYPE STANDARD TABLE OF ty_tab.
SELECT belnr belzart nettobtr
FROM dberchz
INTO TABLE lt_tab[]
WHERE belnr eq '000000000001'.
if sy-subrc ne 0.
ENDIF.
* defining layout
layout-colwidth_optimize = 'X'.
layout-def_status = 'X'.
*defning event
*event
*defining field catalog
fcat-col_pos = 1.
fcat-fieldname = 'BELNR'.
fcat-tabname = 'LT_TAB'.
APPEND fcat.
fcat-col_pos = 2.
fcat-fieldname = 'BELZART'.
fcat-tabname = 'LT_TAB'.
APPEND fcat.
fcat-col_pos = 3.
fcat-fieldname = 'NET'.
fcat-tabname = 'LT_TAB'.
fcat-do_sum = 'X'.
APPEND fcat.
*calling alv
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = 'YZ_PLR'
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* IT_EXCLUDING =
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = layout
it_fieldcat = fcat[]
i_tabname = 'LT_TAB'
it_events = IT_EVENTS[]
* IT_SORT =
* I_TEXT = ' '
tables
t_outtab = lt_tab[]
* EXCEPTIONS
* PROGRAM_ERROR = 1
* MAXIMUM_OF_APPENDS_REACHED = 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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
Thanks,
GauravHi
No I don't think, this is my code (based on your code) and it works fine:
TYPE-POOLS SLIS.
DATA: BEGIN OF LT_TAB OCCURS 0,
BELNR LIKE BSEG-BELNR,
GJAHR LIKE BSEG-GJAHR,
WRBTR LIKE BSEG-WRBTR,
WAERS LIKE BKPF-WAERS,
END OF LT_TAB.
DATA: LAYOUT TYPE SLIS_LAYOUT_ALV,
IT_EVENTS TYPE SLIS_T_EVENT,
FCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
REC_FCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
START-OF-SELECTION.
FCAT-COL_POS = 1.
FCAT-FIELDNAME = 'BELNR'.
FCAT-TABNAME = 'LT_TAB'.
FCAT-REF_FIELDNAME = 'BELNR'.
FCAT-REF_TABNAME = 'BSEG'.
APPEND FCAT.
FCAT-COL_POS = 2.
FCAT-FIELDNAME = 'GJAHR'.
FCAT-TABNAME = 'LT_TAB'.
FCAT-REF_FIELDNAME = 'GJAHR'.
FCAT-REF_TABNAME = 'BSEG'.
APPEND FCAT.
FCAT-COL_POS = 3.
FCAT-FIELDNAME = 'WRBTR'.
FCAT-TABNAME = 'LT_TAB'.
FCAT-CFIELDNAME = 'WAERS'.
FCAT-REF_FIELDNAME = 'WRBTR'.
FCAT-REF_TABNAME = 'BSEG'.
FCAT-DO_SUM = 'X'.
APPEND FCAT.
FCAT-COL_POS = 4.
FCAT-FIELDNAME = 'WAERS'.
FCAT-TABNAME = 'LT_TAB'.
FCAT-REF_FIELDNAME = 'WAERS'.
FCAT-REF_TABNAME = 'BKPF'.
FCAT-DO_SUM = SPACE.
APPEND FCAT.
SELECT * FROM BSEG INTO CORRESPONDING FIELDS OF TABLE LT_TAB
WHERE BUKRS = 'MAAB'
AND BELNR = '0000000001'.
LT_TAB-WAERS = 'EUR'.
MODIFY LT_TAB FROM LT_TAB TRANSPORTING WAERS WHERE WAERS = SPACE.
*CALLING ALV
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = 'ZPROVAMAX5'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FCAT[]
I_TABNAME = 'LT_TAB'
IT_EVENTS = IT_EVENTS[]
TABLES
T_OUTTAB = LT_TAB[].
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
I've also inserted a currency field
Max -
How to display the Form output in multiple languages ? ------ Urgent
How to display the Form output in multiple languages ? -
UrgentHi,
Do u mean the Form output in 2-3 languages ...like form output will be having english russian etc...
for the above case , what u have to do ...
first have to get the transalations for all the fields
say for example : if the english word is PO Number , then u have to get the transalation text for PO Number :
after this , what u have to is ,,, Log on to SAP with russian language , then in the form o/p u have to paste that russian test ( translation text ) ...
do like this for all the components in the form .
Reward Points if it is Useful.
Thanks,
Manjunath MS -
Very Important (Query to display the output in required format)
CREATE TABLE TEMP(X VARCHAR2(10),Y VARCHAR2(100));
INSERT INTO TEMP('RIDER1','2001-12;2002-32;2003-42');
INSERT INTO TEMP('RIDER2','2001-52;2003-72');
SELECT * FROM TEMP
Initial Out Put in 2 columns X/Y_
X Y
RIDER1 2001-12;2002-32;2003-42
RIDER2 2001-52;2003-72
Write a Query to display the above data in the format below in 3 columns A/B/C*
A B C
Rider1 2001 12
Rider1 2002 32
Rider1 2003 42
Rider2 2001 52
Rider2 2003 72So your old version doesn't support Regular expression. It will be very easy and efficient if you could use regular expression.
SQL> SELECT x,TRIM(REGEXP_SUBSTR(col2,'[^-]+', 1, 1)) col2,
2 TRIM(REGEXP_SUBSTR(col2,'[^-]+', 1, 2)) col3
3 FROM (
4 SELECT DISTINCT x,regexp_substr (y, '[^;]+', 1, level) col2
5 FROM temp
6 CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (y, '[^;]+')) + 1
7 ORDER BY 1,2
8 );
X COL2
COL3
RIDER1 2001
12
RIDER1 2002
32
RIDER1 2003
42
X COL2
COL3
RIDER2 2001
52
RIDER2 2003
72But for your version you can use something like
SQL> /* By curtesy Frank Kulash */
SQL> SELECT x,SUBSTR(the_value,1,INSTR(the_value,'-',1)-1) col2,
2 SUBSTR(the_value,INSTR(the_value,'-',1)+1)col3
3 FROM (
4 SELECT DISTINCT x,SUBSTR(y,
5 DECODE(level,
6 1,
7 1,
8 INSTR(y, ';', 1, level - 1) + 1),
9 DECODE(INSTR(y, ';', 1, level),
10 0,
11 length(y),
12 instr(y, ';', 1, level) -
13 DECODE(level,
14 1,
15 0,
16 INSTR(y, ';', 1, level - 1)) - 1)) the_value
17 FROM temp
18 CONNECT BY level <=
19 LENGTH(y) - LENGTH(REPLACE(y, ';')) + 1
20 )
21 ORDER BY 1,2,3
22 ;
X COL2
COL3
RIDER1 2001
12
RIDER1 2002
32
RIDER1 2003
42
X COL2
COL3
RIDER2 2001
52
RIDER2 2003
72
SQL> -
Is it possible to create the ALV output with dropdown list for the columns
Hi forum experts,
Could the ALV output contain the dropdown list for the column names? if yes, then how we can acheive this to happen.
Thanks in advance,
Regards,
Samad.
Edited by: Samad arif on Aug 21, 2009 4:40 PMHi Arif,
Yes we can .FOr the codding check the article,
[dropdowns in ALV|https://wiki.sdn.sap.com/wiki/display/Snippets/DropdownsinALV]
regards,
Archana
Edited by: Archana Kumari on Aug 21, 2009 1:22 PM -
To write a single query to get the desired output.
Hi,
I have table by name "employees" it contains 20 records meaning 20 employee details.
some of the column it contains are employee_id,Hiredate as below.
EMPLOYEE_ID|HIRE_DATE
100|6/17/1987
101|9/21/1989
102|1/13/1993
103|1/3/1993
104|5/21/1991
107|2/7/1999
124|11/16/1999
141|10/17/1995
142|1/29/1997
143|3/15/1998
144|7/9/1998
149|1/29/2000
174|5/11/1996
176|3/24/1998
178|5/24/1999
200|9/17/1987
201|2/17/1996
202|8/17/1997
205|6/7/1994
206|6/7/1994
The query should display the total number of employees, employees hired in 1995,1996,1997 and 1998 some thing like below.
output
Total 1995 1996 1997 1998
20 1 2 2 3
please let me know the query.
Thanks
DineshSQL> select * from employees;
EMPLOYEE_ID HIRE_DATE
100 17-JUN-1987 00:00:00
101 21-SEP-1989 00:00:00
102 13-JAN-1993 00:00:00
103 03-JAN-1993 00:00:00
104 21-MAY-1991 00:00:00
107 07-FEB-1999 00:00:00
124 16-NOV-1999 00:00:00
141 17-OCT-1995 00:00:00
142 29-JAN-1997 00:00:00
143 15-MAR-1998 00:00:00
144 09-JUL-1998 00:00:00
149 29-JAN-2000 00:00:00
174 11-MAY-1996 00:00:00
176 24-MAR-1998 00:00:00
178 24-MAY-1999 00:00:00
200 17-SEP-1987 00:00:00
201 17-FEB-1996 00:00:00
202 17-AUG-1997 00:00:00
205 07-JUN-1994 00:00:00
206 07-JUN-1994 00:00:00
20 rows selected.
SQL> select count(*) total_employees
2 ,sum(case when to_char(hire_date,'YYYY') = '1995' then 1 else 0 end) hired_1995
3 ,sum(case when to_char(hire_date,'YYYY') = '1996' then 1 else 0 end) hired_1996
4 ,sum(case when to_char(hire_date,'YYYY') = '1997' then 1 else 0 end) hired_1997
5 ,sum(case when to_char(hire_date,'YYYY') = '1998' then 1 else 0 end) hired_1998
6 from employees;
TOTAL_EMPLOYEES HIRED_1995 HIRED_1996 HIRED_1997 HIRED_1998
20 1 2 2 3Edited by: SomeoneElse on Jan 6, 2009 8:09 AM -
How to modify this query to get the desired output format
I hv written a Query to display all the parent table names and their primary key columns(relevant to this foreign key of the child table).The query is given below...
SELECT DISTINCT(TABLE_NAME) AS PARENT_TABLE,COLUMN_NAME AS PARENT_COLUMN
FROM ALL_CONS_COLUMNS
WHERE CONSTRAINT_NAME IN (SELECT AC.R_CONSTRAINT_NAME
FROM ALL_CONSTRAINTS AC
WHERE AC.TABLE_NAME=TABLE_NAME
AND AC.TABLE_NAME='&TABLE'
AND AC.R_CONSTRAINT_NAME IS NOT NULL);
This query will display all the parent tables and their primary key columns.Now my problem is that how to modify this query to also display the foreign key column name of the child table.
I want the query result in the following format.The query should display the following columns.1)child table's name,2)child table's foreign key column name,3)the corresponding parent table's name,4)the parent table's primary key column name(which is the foreign key in the child table).
For Example I want the output as follows...
TAKE THE CASE OF SCOTT.EMP(AS INPUT TO YOUR QUERY)
CHILD_TABLE CHILD_COLUMN PARENT_TABLE PARENT_COLUMN
EMP DEPTNO DEPT DEPTNO
In this result I hv used alias name for the columns.The query should display this only for the foreign keys in the child table.In the query which I sent to you earlier will give the parent table and the parent column names,But I also want to append the child table and child column names there.
any help on how to tackle would be appreciated.Try this query
SELECT c.table_name child_table,
c.column_name child_column,
p.table_name parent_table,
p.column_name parent_column
FROM user_constraints a,user_constraints b,user_cons_columns c,
user_cons_columns p
WHERE a.r_constraint_name=b.constraint_name and
a.constraint_name=c.constraint_name and
b.constraint_name=p.constraint_name and
c.position=p.position
ORDER BY c.constraint_name,c.position
Anwar
Maybe you are looking for
-
Drag andn Drop facility in af:tree in ADF Faces
Hi, I am exploring on the possibilities to get drag and drop feature working in an ADF Faces Tree element. Basically, I want to drag the nodes in the tree under other nodes within the same tree. I tried using some Javascript libraries to achieve the
-
Control video (Impress vs PowerPoint)
I installed SO8 on winXP box and converted a PowerPoint file to OPD file. Everything worked great except video. This PowerPoint file comes with video (avi files) and during the presentation, to play it all I have to do is to click over the video and
-
I'm just finishing off a project that has to run in full-screen mode, but I'm having trouble adding this feature. A couple of quick details: • I'm using Flash CS3, ActionScript 2.0, targetting Flash Player 9 (this could change, but I have to stick wi
-
Problem in uploading update to my App
Hello, I am wanting to submit and updated version of the Iris Magazine app I created and have been unsuccessful in my attempt to complete this action. I have named the updated version Iris Magazine 2.0. I will attach a screen shot of the dialogue box
-
New spool number is not created .. appending to prevoius spool
Hi friends we have requirement to print smartform labels for each Delivery item. i created smartform and written code in User Exit.. but spool is creating first time and next label onwards label is appending to the old spool instead of creating new s