How to find all the columns in an ALV Layout?
Hi all
Here's what I need to do. When I run a program (with ALV output in online mode) in the background mode, I need to save the data to a file. And this file is supposed to contain only those columns in a specified ALV Layout.
Any suggestion how to achieve this?
Thank you so much!!!
hi,
u are appending to a field catlog.
eg:
int_fieldcatalog-fieldname = 'CHECT'.
int_fieldcatalog-seltext_m = 'Check No'.
int_fieldcatalog-col_pos = 0.
int_fieldcatalog-outputlen = 13.
int_fieldcatalog-emphasize = 'X'.
int_fieldcatalog-key = 'X'.
APPEND int_fieldcatalog TO int_fieldcatalog.
CLEAR int_fieldcatalog.
so chk this int_fieldcatalog internal table.
it will containthe field in the field in the ALV display.
rgds
anver
Similar Messages
-
How to find all the tables associated for a particular transaction
Hi-
May I know how to find all the tables, related(foreign key) tables for a transaction within SAP GUI?
Up to my technical knowledge, this can be achieved by looking database diagrams from DB level. But that would be for entire database as a whole. What I'm expecting is to see transaction level relative tables that too from SAP GUI. Please share the possibilities if any.
Regards
SekharDear Micky Oestreich
May be we possess expertise or high level experience, it should not show up in our way of communication. Every professional starts with the basic stuff to learn. When the question is raised in such minimum polite way, the same level of courtesy is expected in return. If you felt my question was basic, you might have refused it gently. If you are in good mood or bad mood it doesn't matters.
Hi Vengal Rao
Thanks for your response. It helped me.
Regards
Sekhar -
How to get all the columns displayed in pdf.
If the ALV Display contains 25 columns.When i tried to give the print in PDF format.
in the PDF it is displaying only 10 columns.Can you let me know how to display all the columns (i.e 25) in the pdf.Hi,
Check the OSS Note 186603 which deals with how to handle Spool lists with width > 255 characters.
Regards,
Satish -
How to find out the total, subtotal in alv report
hi dears,
how to find out the total, subtotal in alv report?
pls tell me logic ,
i will be waiting for eply
regards
eswarHi,
<b>ALV Grid List with sub-totals</b>
REPORT z_demo_alv_sort.
* This program lists orders (VBAK) with sort and sub-total for *
* 'sold-to-party' (KUNNR) and 'Sales organization' (VKORG) *
TABLES : vbak.
TYPE-POOLS: slis. " ALV Global types
SELECT-OPTIONS :
s_vkorg FOR vbak-vkorg, " Sales organization
s_kunnr FOR vbak-kunnr, " Sold-to party
s_vbeln FOR vbak-vbeln. " Sales document
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.
PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
DATA:
BEGIN OF gt_vbak OCCURS 0,
vkorg LIKE vbak-vkorg, " Sales organization
kunnr LIKE vbak-kunnr, " Sold-to party
vbeln LIKE vbak-vbeln, " Sales document
netwr LIKE vbak-netwr, " Net Value of the Sales Order
waerk LIKE vbak-waerk, " Document currency
END OF gt_vbak.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
PERFORM f_read_data.
PERFORM f_display_data.
* Form f_read_data
FORM f_read_data.
SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_vbak
FROM vbak
UP TO p_max ROWS
WHERE kunnr IN s_kunnr
AND vbeln IN s_vbeln
AND vkorg IN s_vkorg.
ENDFORM. " F_READ_DATA
* Form f_display_data
FORM f_display_data.
DEFINE m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = 'VBAK'.
ls_fieldcat-do_sum = &2.
ls_fieldcat-cfieldname = &3.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
DEFINE m_sort.
add 1 to ls_sort-spos.
ls_sort-fieldname = &1.
ls_sort-up = 'X'.
ls_sort-subtot = &2.
append ls_sort to lt_sort.
END-OF-DEFINITION.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv,
lt_sort TYPE slis_t_sortinfo_alv,
ls_sort TYPE slis_sortinfo_alv,
ls_layout TYPE slis_layout_alv.
m_fieldcat 'VKORG' '' ''.
m_fieldcat 'KUNNR' '' ''.
m_fieldcat 'VBELN' '' ''.
m_fieldcat 'NETWR' 'X' 'WAERK'.
m_fieldcat 'WAERK' '' ''.
m_sort 'VKORG' 'X'. " Sort by vkorg and subtotal
m_sort 'KUNNR' 'X'. " Sort by kunnr and subtotal
m_sort 'VBELN' ''. " Sort by vbeln
ls_layout-cell_merge = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_sort = lt_sort
TABLES
t_outtab = gt_vbak.
ENDFORM. " F_DISPLAY_DATA
***************** END OF PROGRAM Z_DEMO_ALV_SORT **********************
Regards
Sudheer -
How to find out the columns which has 16 digit credit card number
Hi All,
I have a requirement where in i need to find out the columns which has 16 digit credit number in it and create a report with owner, table name and column name.
The issue is that the credit card number can be entered in any columns of any table of any schema. For example the credit card number can be entered in any description field(eg: The number is 4001412134642881), in that case i need to filter only the numbers and do the LUHN check to validate the credit card number.
Please provide me a suggestion on how to scanl the values of all the columns to know the column which has credit card number.
Regards,
Raj.Tell me this - how the hell do you have a database with credit card number data and NOT know which columns of which tables contain credit card numbers? (and how on earth is this data NOT encrypted!?)
How is what you want to do, NOT a fishing expedition to hack a database that may or may not be storing credit card details?
And do you honestly think that we should simply trust that once you have extracted these numbers, performed a Luhn algorithm to verify these as credit card numbers, you are not going to fraudulently use these credit card numbers!?
I have marked your posting as an attempt to hack an Oracle database for fraudulent use of credit card data. I hope that your OTN account is terminated soon and trust that your too much of a coding idiot to actually succeed in this endevour. -
How to find all the shopping carts for a Supplier
Hello if i have the supplier , how can i find ALL the shopping carts associated to him?thx
Hi,
Try the below & let me know:
1) Go to table "BUT000", enter the Partner No & get the PARTNER GUID.
2) Go to table "BBP_PDVIEW_INDEX", copy the partner GUID in the field "IPARTNER_NO". Enter BUS2121 as the OBJECT_TYPE & execute. You could even restrict the display list by the Partner function value (39 or 19).
Cheers,
Akash -
How to find all the user exits includes ,
Hi All ,
I need to find all the includes which are created for purpose of implementing user exits , I know they all start with ZX* but where to get the list .
THank you all
Vinay KollaHi Vinay....
Just excute following program in your ABAP Edter....
( Input parameters: T'CODE and User exit type.)
>TABLES: MODSAP, MODACT, TSTC.
>
>PARAMETERS: INPUT1 LIKE TSTC-TCODE DEFAULT ' ',
> INPUT2 LIKE MODSAP-TYP DEFAULT ' '.
>
>DATA: SEARCH1(6),
> SEARCH2(3),
> SEARCH3 LIKE MODSAP-MEMBER.
>DATA : FIRST_ROW VALUE 'Y'.
>
>CONCATENATE: '%' INPUT1 '%' INTO SEARCH1,
> '%' INPUT2 INTO SEARCH2.
>
>SELECT * FROM TSTC WHERE TCODE LIKE SEARCH1.
> FIRST_ROW = 'Y'.
> CHECK TSTC-PGMNA NE SPACE.
> CONCATENATE '%' TSTC-PGMNA '%' INTO SEARCH3.
> SELECT * FROM MODSAP WHERE TYP LIKE SEARCH2
> AND MEMBER LIKE SEARCH3.
> SELECT SINGLE * FROM MODACT WHERE MEMBER = MODSAP-NAME.
> IF FIRST_ROW EQ 'Y'.
> WRITE: /0 TSTC-TCODE, 6 TSTC-PGMNA, 16 MODSAP-NAME, 32 MODSAP-TYP,
> 45 MODSAP-MEMBER, 70 MODACT-NAME.
> FIRST_ROW = 'N'.
> ELSE.
>WRITE: /16 MODSAP-NAME, 32 MODSAP-TYP, 45 MODSAP-MEMBER, 70 MODACT-NAME.
> ENDIF.
> CLEAR : MODSAP, MODACT.
> ENDSELECT.
> IF SY-SUBRC NE 0.
> WRITE : /0 TSTC-TCODE, 6 TSTC-PGMNA, 30 'No exits found'.
> ENDIF.
> CLEAR TSTC.
>ENDSELECT.
>
>END-OF-SELECTION.
> CLEAR: SEARCH1, SEARCH2, SEARCH3.
Thanks,
Naveen Inuganti. -
How to find all the parts used from stock for 1 machine
Dear Sap community,
I'm trying to find all the spare components that are used for 1 specific machine.
If I look in the work orders under components it only gives the components that are orderd.
But I would like to find the components that come out of stock. I asked the stockkeeper and he said he writes it all in the work orders but we can't find it back.
It would be nice to just find it on the work order but it would be easier if I could just choose a machine and then find all the spare parts used from stock.
So my question is can I find all the spare parts used for 1 machine or just find the spare parts in the work order?
Thank you for any help you can provide in this situation,
Michael ClaesHi,
In addition to puneet's information:
Training and Event Mgmt infotypes:
Prices (Infotype 1021)
Availability Indicators (Infotype 1023)
Capacity (Infotype 1024)
Depreciation Meter/Validity (Infotype 1025)
Business Event Info (Infotype 1026)
Site-Dependent Additional Info (Infotype 1027)
Address (Infotype 1028)
Business Event Type Info (Infotype 1029)
Procedure (Infotype 1030)
Mail Address (Infotype 1032)
Name Format (Infotype 1034)
Schedule (Infotype 1035)
Costs (Infotype 1036)
Billing/Allocation Info (Infotype 1037)
Business Event Blocks (Infotype 1041)
Schedule Model (Infotype 1042)
Demand (Infotype 1060)
Web Link (Infotype 1061)
Knowledge Link (Infotype 1062)
Business Event Group Info (Infotype 1063)
Thanks,
Anil.G -
How to see all the columns in the spool output of an ABAP program
I have an ABAP program which displays all the columns when I run it manually. (by scrolling to the right using right arrows). When I run that report in the scheduler and when I see the output in the spool in transaction SP01, it does allow me to go to the right to see all columns.
thanks
RamCheck OSS Note 409339 - Spool requests with ABAP lists with more than 255 columns.
Summary
Symptom
As of Release 4.6x, the ABAP list processor can create spool requests for ABAP lists with a width of more
than 255 columns. However, when you print using the SAP spool, only the start of the list lines is printed,
the rest of the line is truncated at the end of the page.
Other terms
ABAP, lists, print parameter, LINE-SIZE
Reason and Prerequisites
Creating "wide" lists on the screen (in other words, lists in the SAPGUI with more than 255 columns) was
already introduced by the ABAP list processor for Release 4.0B. However, before Release 4.6 these lists
cannot be printed out in the width used on screen.
In older releases (for example, 4.0B, 4.5B), you were not able to generate spool requests for lists with a
width of more than 255 columns:
The system issues error message PT 026: "No. of columns > 255, no standard print-out possible".
Therefore, we did not have the problem described here of non-existing device-type support in 4.0/4.5 for
printing out "wide" lists.
Up to and including 4.6C there are no SAP device types that support print formats for lists with a width of
more than 255 characters). Since Release 3.0A, all SAP device types support a maximum list width of 255
characters with device format X_65_255.
Solution
When you create the spool request and a print dialog box appears, enter a column width of maximum 255
in the "Number of columns" field.
As of Release 4.6D, you have the option of using device type SWIN with the new format X_65_1024/4 when
printing with Windows (see Note 213382). -
How to find all the photos whose date has been modified?
I have recently exported my entire collection of photos and I realized that (perhaps) some of the photos whose dates I have modified in iPhoto, have not been exported with the updated date but maybe the original dates.
Is there a way for me to find all the photos whose dates I modified in iPhoto?no
LN -
How to find all the methods in oops
Hi all,
is there any way to find all the methods of all class in a single screen j(ust like using t.code se37 we can find all the fm created)
sathishHi,
1.Go to the class builder(SE24).
2.Type the class name[eg..cl_gui_alv_grid]
3.You will see a tab called methods.Click that.In that,you can view all the methods.Place the cursor in a method and click parameter tab.You can find the parameters for the method.
Kindly reward points by clicking the star on the left of reply,if it helps. -
How to find all the objects by Module.
Hey all,
Can any one please help me in finding all the objects by Module.
I need to have all the objects(like app engines, records, fields, file layouts, etc,.) in AP, AM, GL, BI, AR.
thank you,
Bye.You can use the OwnerID field as a starting point. The reason why i say that is because there are some objects that cross-over between more than one module.
http://www.CompShack.com -
How to find all the changes management details (thr DB tables or FMs)
Hi Experts,
Could anyone please tell me how to get all the Change management details.
I mean are there any database tables or FM through which I can get all the Changes Management(CHARM) details.
like status,priority,texts,descriptions etc...
I need them for an interface....
Thanks
Yogesh GuptaHi,
Yet another request to use my crystal ball.
We had one pc which is having oracle 9i enterprise manager configured(windows 2000) only to connect the db.
This remembers me of the Gospel of St. Luke, chapter 2, where it is stated,
'and they found the child in the manger'.
This resulted a Jewish theologian to remark: 'The manger? Well, so that must have been their own manger'
So what does 'the' db mean? The Linux one? Or a separate on Win2000?
It is quite possible to manage a Linux database using OEM on Win2000, with OMS on Win2000.
'But our server is not having enterprise manager'. Yet another riddle. Which server? There seem to be at least two.
1 Now if I drop these tables, will I be able to connect to our database using the windows2k pc through Enterprise Manager?
Yes, but only in standalone mode, and you can't use OEM alerts, and jobs anymore. You would be better off using Sqldeveloper, as OEM Sql worksheet is a nightmare.
2 That is your decision.
3
oemctl ping oms
will check whether you have an Oracle Management Server running.
You already seem to have the Enterprise Manager Repository, so you must have OMS running somewhere. (Why install the repository, if you don't use it)
Sybrand Bakker
Senior Oracle DBA -
All the columns of an alv grid report are not downloading in excel in 1 lin
Hi All,
I have some 60 columns in my alv grid report and user can download the report using list->export->localfile->spreadsheet.
What the issue is that all the columns are not downloading in one line, instead they split in two rows.
Please help.
Regards,
Neha Patelhi,
just use this procedure it will solve your problem:
Firstly export the data to memory using the FM LIST_FROM_MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_listobject
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE e000(su) WITH text-001.
ENDIF.
then i converted it into ASCII using LIST_TO_ASCI,
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = t_xlstab
listobject = t_listobject
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE e003(yuksdbfzs).
ENDIF.
This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
cl_abap_char_utilities=>horizontal_tab.
Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
This will create an excel attachment.
Sample code for formatting the data for the attachment in excel format.
u2022 Format the data for excel file download
LOOP AT t_xlstab INTO wa_xlstab .
DESCRIBE TABLE t_xlstab LINES lw_cnt.
CLEAR lw_sytabix.
lw_sytabix = sy-tabix.
u2022 If not new line then replace '|' by tabs
IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
WITH cl_abap_char_utilities=>horizontal_tab.
MODIFY t_xlstab FROM wa_xlstab .
CLEAR wa_xlstab.
wa_xlstab = cl_abap_char_utilities=>newline.
IF lw_cnt NE 0 .
lw_sytabix = lw_sytabix + 1.
u2022 Insert new line for the excel data
INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
lw_cnt = lw_cnt - 1.
ENDIF.
CLEAR wa_xlstab.
ENDIF.
ENDLOOP.
Sample code for creating attachment and sending mail:
FORM send_mail .
u2022 Define the attachment format
lw_doc_type = 'XLS'.
u2022 Create the document which is to be sent
lwa_doc_chng-obj_name = 'List'.
lwa_doc_chng-obj_descr = w_subject. "Subject
lwa_doc_chng-obj_langu = sy-langu.
u2022 Fill the document data and get size of message
LOOP AT t_message.
lt_objtxt = t_message-line.
APPEND lt_objtxt.
ENDLOOP.
DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
IF lw_tab_lines GT 0.
READ TABLE lt_objtxt INDEX lw_tab_lines.
lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
lwa_doc_chng-obj_langu = sy-langu.
lwa_doc_chng-sensitivty = 'F'.
ELSE.
lwa_doc_chng-doc_size = 0.
ENDIF.
u2022 Fill Packing List For the body of e-mail
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0.
lt_packing_list-body_start = 1.
lt_packing_list-body_num = lw_tab_lines.
lt_packing_list-doc_type = 'RAW'.
APPEND lt_packing_list.
u2022 Create the attachment (the list itself)
DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
u2022 Fill the fields of the packing_list for creating the attachment:
lt_packing_list-transf_bin = 'X'.
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0.
lt_packing_list-body_start = 1.
lt_packing_list-body_num = lw_tab_lines.
lt_packing_list-doc_type = lw_doc_type.
lt_packing_list-obj_name = 'Attach'.
lt_packing_list-obj_descr = w_docdesc.
lt_packing_list-doc_size = lw_tab_lines * 255.
APPEND lt_packing_list.
u2022 Fill the mail recipient list
lt_reclist-rec_type = 'U'.
LOOP AT t_recipient_list.
lt_reclist-receiver = t_recipient_list-address.
APPEND lt_reclist.
ENDLOOP.
u2022 Finally send E-Mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = lw_sent_to_all
TABLES
packing_list = lt_packing_list
object_header = lt_objhead
contents_bin = t_xlstab
contents_txt = lt_objtxt
receivers = lt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Hope it will help you
Regards
Rahul sharma -
How to find all the instances for specific recurring report
How can I use UQery Builder to find out all the instance related to specific Recurring job. I have tried using following query to get the result with poor performance.
select SI_ID, IS_SCHEDUILE_STATUS from ci_infoobjects where SI_NEW_JOB_ID = 2604480
Since I find that SI_ID stores the current instance id and SI_NEW_JOB_ID stores the recurrign job's ID.
Please Help.
Edited by: Gabriel Luk on Feb 14, 2011 5:21 PMI can not find 'SI_KEYWORD' is a indexed properties in following SAP Notes.
1364250 - Which BusinessObjects Enterprise InfoObject properties are indexed
1499196 - Which of the InfoObject properties are indexed
Edited by: Gabriel Luk on Feb 15, 2011 5:09 AM
Maybe you are looking for
-
How to open a pdf file in Adobe Reader using URL scheme on iOS devices
To open a pdf files in Adobe Reader on iOS devices, I created url links as follows: com.adobe.Adobe-Reader://mysite.com/myfile.pdf com.adobe.reader.request://mysite.com/myfile.pdf But none of these does work. Adobe Reader starts up but never opens pd
-
I am trying to figure out how to get to a BC4J application from a TAB on my portal corporate page. This is just a test. My experience thus far with the UI of PORTAL is the it LEAVES MUCH TO BE DESIRED! It feels like something from the 1970's. Anyway,
-
my wife opened an email she thought was from me. It said it was from me but was not. The subject line said VCBG or something like that. When she opened it, the screen went into garbled broken code. She closed that email and every email she opened
-
Jdeveloper 11.1.1.6 I observe that Jdev is very slow & hangs often, though I am having 8 GB RAM in my PC. Found certain articles in the web to improve Jdev performance & made the following changes in the Jdev configuration files: $JDEV_HOME/jdevelope
-
Still no retina support?
My Adobe Reader is latest (11.0.02), still no retina support. When it will be supported?