How to Concat multiple columns to single column at the report level
Hi All,
I have a requirement in such a way that I have to concat multiple colulmns to single column at the report level.
First of all the column I am using in my report is "X" with datatype as Integer. Now if the length of this column "X" is <8 then I have add zero's (0) before the number.
And then I have to concat with a column "Y" and then cocnat with a column "Z" and finally the datatype should be casted to CHAR.
Can anyone please let me know the logic how I can add to my column so that it satisfies all the above.
Thanks All
>Also, Another thing is if X < length of 8 Ihave to append with zero's..
>Ex: if the actual value of X is 123456 i wanted to show it as 000123456.
Try to be consistence what you said, you are looking for 8 length and above ex is 9 in length.
You need to learn many things one of those is CASE, at least do copy and also read
Forums Etiquette/Reward Points
Similar Messages
-
Need multiple lines in single column of header using alv oops
Hi
I am using alv oops in a report.
I need multiple lines in single column of header.
In header of my report i am using 9 columns.
In the second column i need to split the line
Notification description/activity/work/activity long text/
as
Notification description/
activity/
work/
activity long text/
Please guide me to achieve this functionality.It is not possible to break the column description in the ALV disply.
Actually, if you have a longer description in one of the seltext_* field of the fiels catalog, it will automatically display it as a tooltip, if you put the mouse over the heading. In ALV OO, you can explicitly set the tooltip text.
Also you can get more help on the field pressing F1: If you use DDIC fields, it it automatic, otherwise you can do it as you like. -
How to send multiple attachements in single mail
Hi All,
Currently i am using this function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send mail with only one attachment.
But now i need to send multiple attachments to a single mail.
Can any one please tell me as how to send multiple attachments in single mail.
Thanks in advance.Hi
See this and do accordingly
Mailing with Attachment by ABAP Coding
Refer this link:
Mail with attachment.
FORM send_list_to_basis .
DATA: w_path LIKE rlgrap OCCURS 0 WITH HEADER LINE,
lt_index TYPE sy-tabix,
doc_type(3) TYPE c,
descr LIKE it_objpack_basis-obj_descr,
temp_data LIKE w_path,
temp1 TYPE string,
tab_lines TYPE i,
langu(15) TYPE c,
expirydate TYPE so_obj_edt,
L_FILE1(100).
CONCATENATE 'C:\' sy-repid '_' sy-datum '.XLS' INTO L_FILE1.
W_PATH-FILENAME = L_FILE1.
APPEND w_path.
CLEAR w_path.
wa_doc_chng-obj_descr = 'User List not logged on for 180 days'.
wa_doc_chng-obj_langu = 'E'.
wa_doc_chng-obj_expdat = sy-datum.
CLEAR w_subject.
CONCATENATE 'Please find attached document with list of users'
'not logged on for 180 days for client' sy-mandt
INTO w_subject SEPARATED BY space.
it_objtxt_basis-line = w_subject.
APPEND it_objtxt_basis.
CLEAR it_objtxt_basis.
it_objtxt_basis-line = text-004.
APPEND it_objtxt_basis.
CLEAR it_objtxt_basis.
CLEAR w_tab_line.
DESCRIBE TABLE it_objtxt_basis LINES w_tab_line.
READ TABLE it_objtxt_basis INDEX w_tab_line INTO l_cline.
wa_doc_chng-doc_size =
( w_tab_line - 1 ) * 255 + STRLEN( l_cline ).
CLEAR it_objpack_basis-transf_bin.
it_objpack_basis-head_start = 1.
it_objpack_basis-head_num = 0.
it_objpack_basis-body_start = 1.
it_objpack_basis-body_num = w_tab_line.
it_objpack_basis-doc_type = 'RAW'.
APPEND it_objpack_basis.
CLEAR it_objpack_basis.
LOOP AT w_path.
temp1 = w_path.
descr = w_path.
CALL FUNCTION 'STRING_REVERSE'
EXPORTING
string = descr
lang = 'E'
IMPORTING
rstring = descr.
CALL FUNCTION 'STRING_SPLIT'
EXPORTING
delimiter = '\'
string = descr
IMPORTING
head = descr
tail = temp_data.
CALL FUNCTION 'STRING_REVERSE'
EXPORTING
string = descr
lang = 'E'
IMPORTING
rstring = descr.
CALL FUNCTION 'STRING_SPLIT'
EXPORTING
delimiter = '.'
string = descr
IMPORTING
head = temp_data
tail = doc_type.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = temp1
filetype = 'BIN'
header_length = 0
read_by_line = 'X'
replacement = '#'
TABLES
data_tab = it_upload.
DESCRIBE TABLE it_upload LINES tab_lines.
DESCRIBE TABLE it_objbin_basis LINES lt_index.
lt_index = lt_index + 1.
LOOP AT it_upload.
wa_objbin_basis-line = it_upload-line.
APPEND wa_objbin_basis TO it_objbin_basis.
CLEAR wa_objbin_basis.
ENDLOOP.
it_objpack_basis-transf_bin = 'X'.
it_objpack_basis-head_start = 0.
it_objpack_basis-head_num = 0.
it_objpack_basis-body_start = lt_index.
it_objpack_basis-body_num = tab_lines.
it_objpack_basis-doc_type = doc_type.
it_objpack_basis-obj_descr = descr.
it_objpack_basis-doc_size = tab_lines * 255.
APPEND it_objpack_basis.
CLEAR it_objpack_basis.
ENDLOOP.
it_reclist_basis-receiver = '[email protected]'.
it_reclist_basis-rec_type = 'U'.
APPEND it_reclist_basis.
CLEAR it_reclist_basis.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_objpack_basis
contents_txt = it_objtxt_basis
contents_bin = it_objbin_basis
receivers = it_reclist_basis
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
IF sy-subrc EQ 0.
SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
ENDIF.
ENDFORM. " send_list_to_basis
<b>Reward points for useful Answers</b>
Regards
Anji -
How to attach Multiple attachments to single mail
How to attach multiple pdfs to single mail ?
or
how to attach one pdf & One excel & One word document to single mail ?
Thanks In AdvanceHello Karunya,
Please refer to the link below.
https://wiki.sdn.sap.com/wiki/display/Snippets/Send%20email%20with%20multiple%20zipped%20attachments
Regards,
P Bansal -
Dear All
Can you help me How To Use Multiple Currencies in single payroll?
with regards
User600722I am not a functional expert. but ML Note 150173.1 (which is quite old) states that this is not possible.
Srini -
How to Pass multiple parameter into single store procedure
How to Pass multiple parameter into single store procedure
like a one to many relationship.
it is possible then reply me immediatlyyou mean like this .....
CREATE OR REPLACE procedure display_me(in_param in varchar2,in_default in varchar2 := 'Default') is
BEGIN
DBMS_OUTPUT.put_line ('Values is .....'||in_param || '....'||in_default);
END display_me;
CREATE OR REPLACE procedure display_me_2 as
cnt integer :=0;
BEGIN
For c1_rec In (SELECT empno,deptno FROM test_emp) Loop
display_me(in_param => c1_rec.empno);
cnt := cnt+1;
end loop;
DBMS_OUTPUT.put_line('Total record count is ....'||cnt);
END display_me_2;
SQL > exec display_me_2
Values is .....9999....Default
Values is .....4567....Default
Values is .....2345....Default
Values is .....7369....Default
Values is .....7499....Default
Values is .....7521....Default
Values is .....7566....Default
Values is .....7654....Default
Values is .....7698....Default
Values is .....7782....Default
Values is .....7788....Default
Values is .....7839....Default
Values is .....7844....Default
Values is .....7876....Default
Values is .....7900....Default
Values is .....7902....Default
Values is .....7934....Default
Values is .....1234....Default
Total record count is ....18 -
BPS-dynamic columns-single value in the planning level.
Hello, we would like to use a compound characteristic in dynamic colums.
Based on test and documentation we already know that we can use compound characteristics in dynamic columns only if the higher-level characteristic is restricted to a single value in the planning level.
If we use a variable restricted to a singel value per user it does not work. Does it mean in general that a varibel cannot be used in that case and that we have to create about 30 planning packages with a fixed value for the higher level charactersictic?
Thanks for help.This is solved now with support package 12
-
How to uploade multiple flatfiles for single transaction using BDC?
How to uploade multiple flatfiles for single transaction using BDC?
Hi,
You need to upload all data files into an internal table first either using OPEN DATASET (application server files) or GUI_UPLOAD (PC files).
Then loop at the internal table and call BDC transaction to process the data.
Regards,
Ferry Lianto -
How to supress the single Entries in the report?
Hi
I have a report of "Customer unpaid Cheques". This report displays Customer wise.
For eg. Let say Customer 1234 cheques have been unpaid and returned many times. Some customers have single time retrns.
In a report I want to filter the Customers with Single Entry.
Report is like ths.
Cust No: Ret.Doc: Cheque No: Amount:
1234 7999 3331 100
1234 8999 3332 100
1234 9999 3333 100
1235 7777 4444 200
Customer 1234 has been returned 3 times where as Customer 1235 is ed one time.
I want a report which displays the customers with more than one returns. The report should be like this. How can I do this..
1234 7999 3331 100
1234 8999 3332 100
1234 9999 3333 100
Thanks for your help.
Sudha..HI Sudhakar,
It's bit complex but will work.
Just create a new formuale with this option F= SUMCT(Amount)( This is basiclly the "result" option you get when you try to create a formlae.
Now make a calculate key figure with the logic CKF=( Amount - F)
This will give you basically this kind of difference
F CKF
1234 7999 3331 100 300 -200
1234 8999 3332 100 300 -200
1234 9999 3333 100 300 -200
1235 7777 4444 200 200 0
Now put a condition on the report level that show only those rows where the CKF!=0
IT will show only those value which have moer then one rows.
Also you can hide these additional columns depending upon your need.
I think it will work
If helpful assign points.
Thanks -
How can I will declare the symbol u2018 (Single Quote) in the report
Hi ,
Could you please tell me how can I will declare the symbol u2018 (Single Quote) in the report.
My requirement is that I have concate the data with single quote and after that I have to store the data in to an internal table and I have to download the data in the form text file in the presentation server.
For example :
Let the below data I want to download into the presentation serve in the format of text file by storing in internal table.
Assume all are constants:
1st line : abcu2019add
2nd line : defu2019gef
Thanks in advance.Hi Jyothi,
Thanks for the quick reply .
I can agree with you are point but My requirement is like this I am explaining clearly.
I have declared the internal table like this.
DATA: BEGIN OF OTAB OCCURS 0,
LINE (9024),
END OF OTAB.
So I have to append the each line item into the internal table.
So I am explaining what the data I have to append
Ist line contains
'UNBUNOC:2020308u2019 where 020308 I will get the date from reguh table
2nd line contains:
'DTM+20020510' where the 20020510 will be reference document number from the table reguh.
So I want to declare a constant 'UNBUNOC:2
2nd the date from reguh table
And another constant u2018
So that I can concate all the three and I can put into string and I will append into internal table and I can download the data into the presentation server.
Please let me know if you need any more clarification regarding my requirement.
Thanks in advance. -
How to generate multiple output pdf's from one oracle reports
how to generate multiple output pdf's from one oracle reports.
I have a report where I have to generate more than one output files from the same report based on a parameter.
Each output file is for each parameter.
Is this possible in oracle reports, is so how ?You can better post your question in the reports forum instead of this pl/sql forum.
-
How to validate multiple lines which is exist in the form builder at the same session
Hi All,
we are working on oracle Forms personalization to trigger the message at the point of saving multiple lines rather than requiring each line to be save individually. Currently the oracle form is allowing to user to enter two distinct lines that have same resource and basis type in BOM.
Currently the Oracle form is allowing to enter the duplicate combination and not giving any error message even we enter the same combination of data.
As per the customer requirement, they don’t want to validate the data while creating the records but when they try to save the form, in that case it should validate all the records at a time then need to display the appropriate message.
Customer don’t want to customize the Oracle standard form. Here we have only option to use form personalization or through custom.pll.
Any idea on how to validate multiple lines which is exist in the form builder at the same session as before inserting the record itself need to perform the validations for all the records.
Thanks for your help in this regard.
Regards,
Thirupathiyou can write a post script which will do the necessary tasks.
I mean, once you are done with inserting records into these tables, exeute another procedure which will insert these "extra" records, based on some logic.
you may not be able use DB trigger as it may generate mutating error or if you don't write it carefully, it will go into recursive loops as you are refering to same tables.
HTH -
Convert multiple rows into single rows for the respective index name
Dear Experts,
I want to convert multiple rows into single rows for the respective index name,
Here is my query.
SELECT user_tables.table_name, user_indexes.index_name, user_ind_columns.column_name
FROM user_tables
JOIN user_indexes on user_indexes.table_name = user_tables.table_name
join USER_IND_COLUMNS on USER_INDEXES.INDEX_NAME = USER_IND_COLUMNS.INDEX_NAME
where user_indexes.index_name not like '%PK%' AND user_ind_columns.column_name NOT LIKE '%SYS%'
ORDER BY user_tables.table_name,user_indexes.index_name;
Result of previous query
TABLE_NAME
INDEX_NAME
COLUMN_NAME
T1
IDX_ACCNTYPCFG1
ENABLE_SERVICE
T1
IDX_ACCTTYPCFG1
ACC_CODE
T1
IDX_ACCTTYPCFG1
ACCTYPE
T2
IDX_ACCTTYPCFGAPP1
ACCTYPE
T3
IDX_ACTLG1
MOBILE_NO
T3
IDX_ACTLG1
ID
Desired output required is
TABLE_NAME
INDEX_NAME
COLUMN_NAME
T1
IDX_ACCNTYPCFG1
ENABLE_SERVICE,ACC_CODE,ACCTYPE
T2
IDX_ACCTTYPCFGAPP1
ACCTYPE
T3
IDX_ACTLG1
ACCTYPE,MOBILE_NO
please help.Maybe
with
user_tables as
(select 'T1' table_name,'IDX_ACCNTYPCFG1' index_name,'ENABLE_SERVICE' column_name from dual union all
select 'T1','IDX_ACCTTYPCFG1','ACC_CODE' from dual union all
select 'T1','IDX_ACCTTYPCFG1','ACCTYPE' from dual union all
select 'T2','IDX_ACCTTYPCFGAPP1','ACCTYPE' from dual union all
select 'T3','IDX_ACTLG1','MOBILE_NO' from dual union all
select 'T3','IDX_ACTLG1','ID' from dual
select table_name,
case index_name when 'IDX_ACCNTYPCFG1' then 'IDX_ACCTTYPCFG1' else index_name end index_name,
listagg(case column_name when 'ID' then 'ACCTYPE' else column_name end,',') within group (order by null) column_name
from user_tables
group by table_name,case index_name when 'IDX_ACCNTYPCFG1' then 'IDX_ACCTTYPCFG1' else index_name end
TABLE_NAME
INDEX_NAME
COLUMN_NAME
T1
IDX_ACCTTYPCFG1
ACCTYPE,ACC_CODE,ENABLE_SERVICE
T2
IDX_ACCTTYPCFGAPP1
ACCTYPE
T3
IDX_ACTLG1
ACCTYPE,MOBILE_NO
Regards
Etbin -
Can anybody explain how to print multiple copies of different documents at the same time as at the moment I have to open each individually and press print
is this a windows in bootcamp question ?
-
How can I make signature darker when I print the report?
I need to put my manager's signature on the report. The signature is too light, How can I make it darker when I print the report?
I used file link and OLE, both did't make it.
Thanks.No way to do it directly in the report. You need to work with signature image file using any graphic software to increase its contrast. The easiest probably would be to use Paintbrush and change the image to black-and-white, then save back as jpeg file.
Maybe you are looking for
-
Ichat video not working when screen sharing into iMac in target display
I have my MBP (current model) plugged into my 27" iMac and using it as an external monitor. If I screen share into the running iMac from my MBP, several things aren't working properly. When I try to use iChat video, iChat crashes. Full size images do
-
Pop Up while listening to iTunes
While playing itunes a pop up arrives every time the song changes? I have no clue.
-
Hi, I have one query regarding uccx reporting. In uccx suppose any user is configured as UCCX agent and he is not login in CAD, if user gets call in his ACD extension, will that call detail be availabe in uccx historical reporting. Regards, Dinesh Jo
-
Hi I need help in interactive ALV Repot. When i executed the report, it is displaying the material Doc number ,material etc in grid layout. my requirement is , when i double click on material Document number , it has to show the sales order number, s
-
Hey Folks. Have an AS2 file that keeps TAB focus/order properly when using Firefox or Safari but NOT when using IE. It's fine at first but when I TAB to and select a button the next TAB goes to IE's address bar. This does NOT happen in Firefox or S