Hi experts , in alv report
in alv report i need to display the different customers in different blocks in the alv output, for example customer : 1000 in one block with all the details , and
customer : 10001 in other block in the same alv , if possible provide the coding.
its very urgent.
Hi,
Check whether this helps u or not :-
TYPE-POOLS : SLIS.
TABLES : EKKO,EKPO,MARA,MAKT,EINE.
DATA : BEGIN OF IEKKO OCCURS 0,
EBELN LIKE EKKO-EBELN,
AEDAT LIKE EKKO-AEDAT,
END OF IEKKO.
DATA : BEGIN OF IEKPO OCCURS 0,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
MENGE LIKE EKPO-MENGE,
MEINS LIKE EKPO-MEINS,
INFNR LIKE EKPO-INFNR,
END OF IEKPO.
DATA : BEGIN OF IMARA OCCURS 0,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
MAKTX LIKE MAKT-MAKTX,
END OF IMARA.
DATA : BEGIN OF IEINE OCCURS 0,
INFNR LIKE EINE-INFNR,
EBELN LIKE EINE-EBELN,
NETPR LIKE EINE-NETPR,
WAERS LIKE EINE-WAERS,
END OF IEINE.
DATA : IFIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
IFIELDCATEINE TYPE SLIS_T_FIELDCAT_ALV,
IFIELDCATMARA TYPE SLIS_T_FIELDCAT_ALV,
WFIELDCAT TYPE SLIS_FIELDCAT_ALV,
ILAYOUT TYPE SLIS_LAYOUT_ALV,
IEVENTHEAD TYPE SLIS_T_EVENT,
IEVENTITEM TYPE SLIS_T_EVENT,
IEVENTEINE TYPE SLIS_T_EVENT,
WEVENT TYPE SLIS_ALV_EVENT,
IKEYINFO TYPE SLIS_KEYINFO_ALV.
PARAMETERS : P_NUM(3) TYPE N DEFAULT 10.
PERFORM GET_DATA_EKKO.
PERFORM GET_DATA_EKPO.
PERFORM GET_DATA_MARA.
PERFORM GET_DATA_EINE.
PERFORM BUILD_FCAT_HEAD.
PERFORM BUILD_FCAT_ITEM.
PERFORM BUILD_FCAT_MARA.
PERFORM BUILD_FCAT_EINE.
PERFORM BUILD_LAYOUT.
PERFORM BUILD_EVENT_TAB.
PERFORM BUILD_KEYINFO.
PERFORM DISPLAY_BLOCK.
*& Form GET_DATA_EKKO
* text
* --> p1 text
* <-- p2 text
FORM GET_DATA_EKKO .
SELECT EBELN AEDAT INTO TABLE IEKKO FROM EKKO UP TO P_NUM ROWS WHERE EBELN LIKE '45000057%'.
ENDFORM. " GET_DATA_EKKO
*& Form GET_DATA_EKPO
* text
* --> p1 text
* <-- p2 text
FORM GET_DATA_EKPO .
IF NOT IEKKO[] IS INITIAL.
SELECT EBELN EBELP MATNR MENGE MEINS INFNR INTO TABLE IEKPO FROM EKPO FOR ALL ENTRIES
IN IEKKO WHERE EBELN = IEKKO-EBELN.
ENDIF.
ENDFORM. " GET_DATA_EKPO
*& Form DISPLAY_BLOCK
* text
* --> p1 text
* <-- p2 text
FORM DISPLAY_BLOCK .
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* IT_EXCLUDING =
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_HS_APPEND'
EXPORTING
IS_LAYOUT = ILAYOUT
IT_FIELDCAT = IFIELDCAT
IS_KEYINFO = IKEYINFO
I_HEADER_TABNAME = 'IEKKO'
I_ITEM_TABNAME = 'IEKPO'
IT_EVENTS = IEVENTHEAD
* IT_SORT =
* I_TEXT = ' '
TABLES
T_OUTTAB_HEADER = IEKKO
T_OUTTAB_ITEM = IEKPO
* 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_APPEND'
EXPORTING
IS_LAYOUT = ILAYOUT
IT_FIELDCAT = IFIELDCATMARA
I_TABNAME = 'IMARA'
IT_EVENTS = IEVENTITEM
* IT_SORT =
* I_TEXT = ' '
TABLES
T_OUTTAB = IMARA
* 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_APPEND'
EXPORTING
IS_LAYOUT = ILAYOUT
IT_FIELDCAT = IFIELDCATEINE
I_TABNAME = 'IEINE'
IT_EVENTS = IEVENTEINE
* IT_SORT =
* I_TEXT = ' '
TABLES
T_OUTTAB = IEINE
* 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'
* EXPORTING
* I_INTERFACE_CHECK = ' '
* IS_PRINT =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_BLOCK
*& Form BUILD_FCAT_HEAD
* text
* --> p1 text
* <-- p2 text
FORM BUILD_FCAT_HEAD .
WFIELDCAT-FIELDNAME = 'EBELN'.
WFIELDCAT-TABNAME = 'IEKKO'.
WFIELDCAT-SELTEXT_L = 'Pur. Doc no'.
WFIELDCAT-OUTPUTLEN = 15.
APPEND WFIELDCAT TO IFIELDCAT.
CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'AEDAT'.
WFIELDCAT-TABNAME = 'IEKKO'.
WFIELDCAT-SELTEXT_L = 'Pur. doc date'.
WFIELDCAT-OUTPUTLEN = 15.
APPEND WFIELDCAT TO IFIELDCAT.
CLEAR WFIELDCAT.
ENDFORM. " BUILD_FCAT_HEAD
*& Form BUILD_FCAT_ITEM
* text
* --> p1 text
* <-- p2 text
FORM BUILD_FCAT_ITEM .
*WFIELDCAT-FIELDNAME = 'EBELN'.
*WFIELDCAT-TABNAME = 'IEKPO'.
*WFIELDCAT-SELTEXT_L = 'Pur. Doc no'.
*WFIELDCAT-OUTPUTLEN = 15.
*APPEND WFIELDCAT TO IFIELDCAT.
*CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'EBELP'.
WFIELDCAT-TABNAME = 'IEKPO'.
WFIELDCAT-SELTEXT_L = 'Pur. Doc item'.
WFIELDCAT-OUTPUTLEN = 15.
APPEND WFIELDCAT TO IFIELDCAT.
CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'MATNR'.
WFIELDCAT-TABNAME = 'IEKPO'.
WFIELDCAT-SELTEXT_L = 'Material no'.
WFIELDCAT-OUTPUTLEN = 18.
APPEND WFIELDCAT TO IFIELDCAT.
CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'MENGE'.
WFIELDCAT-TABNAME = 'IEKPO'.
WFIELDCAT-SELTEXT_L = 'P.O. Qty'.
WFIELDCAT-OUTPUTLEN = 15.
APPEND WFIELDCAT TO IFIELDCAT.
CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'MEINS'.
WFIELDCAT-TABNAME = 'IEKPO'.
WFIELDCAT-SELTEXT_L = 'UOM'.
WFIELDCAT-OUTPUTLEN = 3.
APPEND WFIELDCAT TO IFIELDCAT.
CLEAR WFIELDCAT.
ENDFORM. " BUILD_FCAT_ITEM
*& Form BUILD_LAYOUT
* text
* --> p1 text
* <-- p2 text
FORM BUILD_LAYOUT .
ILAYOUT-COLWIDTH_OPTIMIZE = 'X'.
ILAYOUT-ZEBRA = 'X'.
ENDFORM. " BUILD_LAYOUT
*& Form BUILD_EVENT_TAB
* text
* --> p1 text
* <-- p2 text
FORM BUILD_EVENT_TAB .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IEVENTHEAD
* EXCEPTIONS
* LIST_TYPE_WRONG = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IEVENTITEM = IEVENTHEAD.
IEVENTEINE = IEVENTHEAD.
READ TABLE IEVENTHEAD INTO WEVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC = 0.
WEVENT-FORM = 'TOPOFPAGEHEAD'.
MODIFY IEVENTHEAD FROM WEVENT INDEX SY-TABIX.
ENDIF.
READ TABLE IEVENTITEM INTO WEVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC = 0.
WEVENT-FORM = 'TOPOFPAGEITEM'.
MODIFY IEVENTITEM FROM WEVENT INDEX SY-TABIX.
ENDIF.
READ TABLE IEVENTEINE INTO WEVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC = 0.
WEVENT-FORM = 'TOPOFPAGEEINE'.
MODIFY IEVENTEINE FROM WEVENT INDEX SY-TABIX.
ENDIF.
ENDFORM. " BUILD_EVENT_TAB
FORM TOPOFPAGEHEAD.
DATA : ILIST TYPE SLIS_T_LISTHEADER,
WLIST TYPE SLIS_LISTHEADER.
WLIST-INFO = 'Header data with P.O. no and creating date'.
WLIST-TYP = 'H'.
APPEND WLIST TO ILIST.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = ILIST
* I_LOGO =
* I_END_OF_LIST_GRID =
ENDFORM.
FORM TOPOFPAGEITEM.
DATA : ILIST TYPE SLIS_T_LISTHEADER,
WLIST TYPE SLIS_LISTHEADER.
WLIST-INFO = 'Material no in PO with type and description'.
WLIST-TYP = 'H'.
APPEND WLIST TO ILIST.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = ILIST
* I_LOGO =
* I_END_OF_LIST_GRID =
ENDFORM.
*& Form BUILD_KEYINFO
* text
* --> p1 text
* <-- p2 text
FORM BUILD_KEYINFO .
IKEYINFO-HEADER01 = 'EBELN'.
IKEYINFO-ITEM01 = 'EBELN'.
ENDFORM. " BUILD_KEYINFO
*& Form BUILD_FCAT_MARA
* text
* --> p1 text
* <-- p2 text
FORM BUILD_FCAT_MARA .
WFIELDCAT-FIELDNAME = 'MATNR'.
WFIELDCAT-TABNAME = 'IMARA'.
WFIELDCAT-SELTEXT_L = 'Material no'.
WFIELDCAT-OUTPUTLEN = 18.
APPEND WFIELDCAT TO IFIELDCATMARA.
CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'MAKTX'.
WFIELDCAT-TABNAME = 'IMARA'.
WFIELDCAT-SELTEXT_L = 'Material desc'.
WFIELDCAT-OUTPUTLEN = 30.
APPEND WFIELDCAT TO IFIELDCATMARA.
CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'MTART'.
WFIELDCAT-TABNAME = 'IMARA'.
WFIELDCAT-SELTEXT_L = 'Material typ'.
WFIELDCAT-OUTPUTLEN = 15.
APPEND WFIELDCAT TO IFIELDCATMARA.
CLEAR WFIELDCAT.
ENDFORM. " BUILD_FCAT_MARA
*& Form GET_DATA_MARA
* text
* --> p1 text
* <-- p2 text
FORM GET_DATA_MARA .
IF NOT IEKPO[] IS INITIAL.
SELECT A~MATNR A~MTART B~MAKTX INTO TABLE IMARA FROM MARA AS A INNER JOIN
MAKT AS B ON
A~MATNR = B~MATNR FOR
ALL ENTRIES IN IEKPO
WHERE A~MATNR = IEKPO-MATNR.
ENDIF.
ENDFORM. " GET_DATA_MARA
*& Form GET_DATA_EINE
* text
* --> p1 text
* <-- p2 text
FORM GET_DATA_EINE .
IF NOT IEKPO[] IS INITIAL.
SELECT INFNR EBELN NETPR WAERS INTO TABLE IEINE FROM EINE
FOR ALL ENTRIES IN IEKPO WHERE INFNR = IEKPO-INFNR AND
EBELN = IEKPO-EBELN.
ENDIF.
ENDFORM. " GET_DATA_EINE
FORM TOPOFPAGEEINE.
DATA : ILIST TYPE SLIS_T_LISTHEADER,
WLIST TYPE SLIS_LISTHEADER.
WLIST-INFO = 'Purchasing info record'.
WLIST-TYP = 'H'.
APPEND WLIST TO ILIST.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = ILIST
* I_LOGO =
* I_END_OF_LIST_GRID =
ENDFORM.
*& Form BUILD_FCAT_EINE
* text
* --> p1 text
* <-- p2 text
FORM BUILD_FCAT_EINE .
WFIELDCAT-FIELDNAME = 'INFNR'.
WFIELDCAT-TABNAME = 'IEINE'.
WFIELDCAT-SELTEXT_L = 'Info rec no'.
WFIELDCAT-OUTPUTLEN = 15.
APPEND WFIELDCAT TO IFIELDCATEINE.
CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'EBELN'.
WFIELDCAT-TABNAME = 'IEINE'.
WFIELDCAT-SELTEXT_L = 'Pur ord no'.
WFIELDCAT-OUTPUTLEN = 15.
APPEND WFIELDCAT TO IFIELDCATEINE.
CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'NETPR'.
WFIELDCAT-TABNAME = 'IEINE'.
WFIELDCAT-SELTEXT_L = 'Net price'.
WFIELDCAT-OUTPUTLEN = 15.
APPEND WFIELDCAT TO IFIELDCATEINE.
CLEAR WFIELDCAT.
WFIELDCAT-FIELDNAME = 'WAERS'.
WFIELDCAT-TABNAME = 'IEINE'.
WFIELDCAT-SELTEXT_L = 'Currency'.
WFIELDCAT-OUTPUTLEN = 10.
APPEND WFIELDCAT TO IFIELDCATEINE.
CLEAR WFIELDCAT.
ENDFORM. "
Regards,
Deepu.K
Similar Messages
-
Hi Experts,
In ALV report i am getting warning like
" Field string LS_HEADER is not referenced statically"
Actually i declared this field as "DATA: ls_header TYPE slis_listheader.".
How to correct this warning message.
Thanks in advance.
Thanks,
Madhu.Dear Madhu,
You are not using LS_HEADER statically that you have defined in the program. You will get a warning message since you have defined a field that you have not referenced statically.
Are you using this field dynamically? You can delete/comment the code if you are not using it statically and dynamically.
Moved the thread ABAP forum. Post your queries in relevant forums to get efficient answers.
Regards,
Naveen -
In alv report , how to reserve 20 lines from beginning of page
hi experts
in alv report , how to reserve 20 lines from beginning of page.
regards
subhasis.If by reserve you mean should not move on scrolling then make them KEY from fieldcatalog.
But I think maximum of 10-12 can be handled by that.
Regards,
Amit
Reward all helpful replies. -
Hi Expert,
IN ALV report using RESUE_ALV_GRID_DISPLAY . I want to sort the second field of ALV output . In this function module RESUE_ALV_GRID_DISPLAY using event PF_STATUS . so can u tell me how sort the second field .
Regards
BhabaniHi,
check the fallowing code
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE slis_sortinfo_alv,
****SORT LABELS AT RUN TIME
WA_SORT-TABNAME = 'IT_FINAL1'.
WA_SORT-FIELDNAME = 'BUDAT'.
WA_SORT-UP = 'X'.
WA_SORT-GROUP = 'X'.
WA_SORT-subtot = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-TABNAME = 'IT_FINAL1'.
WA_SORT-FIELDNAME = 'MATNR'.
WA_SORT-UP = 'X'.
WA_SORT-GROUP = 'X'.
WA_SORT-subtot = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_SORT = IT_SORT
I_DEFAULT = 'X'
I_SAVE = 'U'
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_FINAL1
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Nandan.N -
Hi Expert,
In alv report percentage calculation.Here we have a problem, In total column it will adding the fields
in percentage column, but i want to calculate the percentage in run time.
Example:
A B %*100
10 20 20%
20 40 20%
TOTAL: 30 60 40 -
>it is a total but not percentage
Thank you,
Dinesh.Hi,
1. In the ALV output tab add extra fields that are the same as those on which you are sorting and contain the same values.
2. In the Field Catalog you must add these fields but they must be hidden i.e. no_out = 'X'.
3. These fields must be included in the Sort Catalog with subtot = 'X'.
4. In order to handle the final total line in your layout for the ALV you must set field no_totalline'X' because you are going to be taking this over as well.
5. Create a form called SUBTOTAL_TEXT or similar structured as follows:
form subtotal_text using ep_subtot_line like output_tabes_subtottxt type slis_subtot_text.
In this form you will do the percentage calculation again at total level. The structure ep_subtot_line
will contain a field for each of the fields in your output_tab i.e. ep_subtot_line-sales,
ep_subtot_line-cost and ep_subtot_line-margin. Put the margin calculation into ep_subtot_line-margin.
6. In the eventtab that you pass to the ALV_GRID function module you must create a record with the
field name = 'SUBTOTAL_TEXT' and the field form = the name of the form you created in step 5 above. -
Needed select all button in alv report
Dear Experts,
In alv report i want first field as button selectall then remaining fields must be displayed
this is my code,,
DEFINE m_fieldcat.
is_fieldcat-fieldname = &1.
is_fieldcat-hotspot = &2.
is_fieldcat-seltext_m = &3.
is_fieldcat-col_pos = &4.
is_fieldcat-outputlen = &5.
is_fieldcat-emphasize = &6.
is_fieldcat-Checkbox = &7.
append is_fieldcat to it_fcat.
clear is_fieldcat.
END-OF-DEFINITION.
m_fieldcat 'SLNO' '' text-112 '1' '5' 'C310' ''.
m_fieldcat 'KPI' '' text-110 '2' '30' 'C310' ''.
m_fieldcat 'PWEEK' 'X' text-109 '3' '16' 'C310' ''.
m_fieldcat 'CWEEK' 'X' text-111 '4' '16' 'C310' ''.
m_fieldcat 'MONTH' 'X' text-122 '5' '16' 'C310' ''.
m_fieldcat 'PMONTH' 'X' text-132 '6' '16' 'C310' ''.
m_fieldcat 'UOM ' '' text-138 '7' '10' 'C310' ''.
Thanks,
Thiru. RHi,
You can keep first field as checkbox. 'Select All' button is present in ALV whnever you use 'REUSE_ALV_GRID' F.M.
You can click on select all button that appears in ALV grid toolbar and all your checkboxes that appears in first field will get selected. Similar to 'Select All' there is 'Deselct All' button also in ALV grid.
Regards,
Saba -
Hi experts 1 query regarding alv report running in background
when i run my alv report with 40 columns in background in spool when i get output disturbed 20 lines of first row is moving to second row so when i download to excel the o/p is completely disturbed and no use for me is there any way to solve this problem.please reply
hi ,
this will solve your problem
http://www.****************/Tutorials/ALV/Spool/width.htm
Increasing the width of the spool when using ALV List
By Aafaque Husain, YASH Technologies
Whenever an ALV report (with more number of columns) is scheduled in background, the output will be displayed in a zigzag fashion as shown below:
If we try to download the output from the spool or try to view the output, then we observe that the output is not in an appropriate fashion.
To get the right format of output in the spool we generally increase the u201Cno. of columns fieldu201D in the Format typesu201D. Have a look at the following screenshot:
Sometimes even when we change this field, we get the output truncated at the end, like last few columns are not displayed. There is certain limitation for this field, so that even if increase this value again, we find no change in the output display in spool.
This value is effective only when we check the check box u201CNumber of columns from list display formatu201D in the SPAD transaction.
Ø GO to SPAD Transaction code
Ø In the menu Settings -> Spool System as shown belowu2026
Ø In the others tab check the first check box in the Output Controller block, SAVE and exit.
Now Schedule the ALV report again by providing the output device and format, and then we get the full output in the spool as shown below:
Regards,
Madhavi -
Hi experts...
I want single row in alv report.
I have use loop for fatch data into internal table using loop when i am passing data in alv report then the data comes according loop. i want onlu one data in alv row.
how can i do such, plz help me.decleare two internal table.
read table itab into wa index 1.
append wa to itab2.
pass itab2 only one record display. -
ALV . How to remove the sort buttons on toolbar in ALV report?
Hi,experts
As you know, in default case , the alv report will display two sort buttons(ascending ,descending) on its toolbar , So How to remove the sort buttons on toolbar in ALV report?
Thanks for your help .Hi guixin,
1. Before calling REUSE_ALV_LIST_DISPLAY
2. Write this code :
data : excl type SLIS_T_EXTAB.
data : exclwa type SLIS_EXTAB.
exclwa = '&OUP'.
append exclwa to excl.
exclwa = '&ODN'.
append exclwa to excl.
3. Then while calling the FM,
pass this parameter also .
IT_EXCLUDING = excl
It will work fantastic.
regards,
amit m. -
In ALV Report output heading is printing twice.
Hi Experts,
Im working on ALV Reports.
Im printing header text by using listheader and commentary write function module.
the problem is when i sort any column in ALV ouput the heading is printing twice.
Again if i sort the column the heading is printed is 4 times.
so if anybody knows the solution how we can avoid repetition of heading ,
Please reply me as soon as possible.
regards
Imrangs.Hi Noorie,
Thanks a lot.
Your answer is perfect.
Bye.
Regards,
Imran -
Oops alv report not getting displayed
Hi experts,
I have REQUIREMENT WHERE I NEED TO DISPLAY THREE REPORTS USING ALAV OOPS.
I have maintained a FM to call alv rport.
,I have two validations to make at to different location in report. The report needs to be displayed only after I perform two different validations.
Issue is
I call this ALV reprt Fm once at : AT SELECTION SCREEN OUTPUT
and second time at : START OF SELECTION...
Now I can see the ALV report ( oops with three reports in one container) very well when i call it from : AT SECETION SCREEN OUTPUT( Here I perform one of teh two validations which I have mentioned above...The validation performed here is of Selction screen valiudation).
ButNow when I perform another validation at START OF SELECTIOn...here I cannot see the ALV report...TEH screen appearing is blank...
I am calling teh SAME OOPS ALV Function Module from both the locations...( START of SEL and AT selc O/p)..
I have debugged teh code and checked teh feidcatalogue genration as well s output table .and also structure
parameteers .. all of tehm are getting populated in both the cases ,,, but dont know why thye output doesnot appear in th last call..
please help ., I am stuck up...
TX a ton in adv...
Regards,
KTHi Kshitija T,
START-OF-SELECTION is processed in PAI of selection screen - as soon as all processing is done, the program flow will return, initialize your program an all of it's objects and display the selection screen again.
I solved this by disabling the default report status EXECUTE button and used AT-SELECTION-SCREEN events.
Regards,
Clemens -
Hi Experts,
Can i achieve sorting in Blocked ALV report as we can do in ALV Grid Display.???
If so, how can this be achieved????
For example, if there are 3 records with the same value for a field.....say thfreee rows with name 'Gaurav'.
I want to show 'Gaurav' only in the first row and the other two rows must be empty.
Gaurav 1 2 3
Gaurav 4 5 6
Gaurav 7 8 9
Should be seen as
Gaurav 1 2 3
4 5 6
7 8 9
Thanks and regards
Gaurav raghavHere is the code.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_structure_name = 'ZCRM_ACTIVITY_REPORT'
CHANGING
ct_fieldcat = gt_fieldcatalog[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
CLEAR gs_sort.
gs_sort-fieldname = 'ORG'.
gs_sort-tabname = 'GT_ITAB'.
gs_sort-spos = '1'.
gs_sort-up = 'X'.
APPEND gs_sort TO gt_sort.
CLEAR gs_sort.
gs_sort-fieldname = 'EMPLOYEE'.
gs_sort-tabname = 'GT_ITAB'.
gs_sort-spos = '2'.
gs_sort-up = 'X'.
APPEND gs_sort TO gt_sort.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = gt_layout
it_fieldcat = gt_fieldcatalog
i_tabname = 'GT_ITAB'
it_events = gt_events
it_sort = gt_sort
i_text = 'Report 1 '
TABLES
t_outtab = gt_itab
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'. -
How can give the user defined parameter in alv report
Hi experts
I have created one alv report for Sale Order statement.In this alv report have different input parameters
My problem is in this alv i have two input field Sales Orgaization and Plant.When I set this parameter value in user details it snot affected in my alv report.But it is affected in the standard alv report.How can
i rectify this
Regards
Manojhi
i think don't use set parameter value, use there SUBMIT & RETURN statement and write in USER_COMMAND function.
FORM USER_COMMAND USING P_UCOMM LIKE SY-UCOMM
P_SELFIELD TYPE SLIS_SELFIELD.
SUBMIT program name AND RETURN
WITH <selection-screen field> IN <selection-screen field>
WITH WERKS IN WERKS .
ENDFORM .
Regards,
Abhi -
Jump from alv report to FB03 screen when u click BELNR field
Hi experts,
I developed one alv report in that one field is there (BELNR .When u click on BELNR field it will directly go to FB03 screen.
I wrote in this way.
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD
CASE SELFIELD-FIELDNAME.
WHEN 'BELNR'.
READ TABLE T_FINAL INDEX SELFIELD-TABINDEX.
SET PARAMETER ID 'BLN' FIELD T_FINAL-BELNR.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM.
But it is going to initial screen then u enter year it is going to next screen but i don't want this.
I want to go to directly fb03 screen without entering year in the initial screen.Is it possible? pls help me in this.IF RS_SELFIELD-FIELDNAME = 'BELNR'.
READ TABLE GT_FINAL INTO GS_FINAL INDEX RS_SELFIELD-TABINDEX.
SET PARAMETER ID 'MBN' FIELD GS_FINAL-BELNR.
CALL TRANSACTION 'MIGO' AND SKIP FIRST SCREEN.
ENDIF.
i m not getting the value of belnr in migo here is my code -
Jump from alv report to qa03 screen based on PRUEFLOS field
Hi experts,
I developed one alv report ,in that one field name is PRUEFLOS (inspection lot number).I want to jump from alv report
to QA03 screen based on PRUEFLOS field.I wrote in this way but i didn't get.
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
CASE SELFIELD-FIELDNAME.
WHEN 'PRUEFLOS'.
READ TABLE T_FINAL INDEX SELFIELD-TABINDEX.
SET PARAMETER ID 'QLS' FIELD T_FINAL-PRUEFLOS.
CALL TRANSACTION 'QA03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM.
what is the problem ?pls help me in this.Hi Ram,
Recheck:
1) You have passed 'FORM USER_COMMAND' in 'I_CALLBACK_USER_COMMAND' while calling f.m. for ALV displa, and
2) You have checked the value of user command, i.e.
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.
CASE SY-UCOMM.
WHEN '&IC1'.
CASE SELFIELD-FIELDNAME.
WHEN 'PRUEFLOS'.
READ TABLE T_FINAL INDEX SELFIELD-TABINDEX.
SET PARAMETER ID 'QLS' FIELD T_FINAL-PRUEFLOS.
CALL TRANSACTION 'QA03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
ENDFORM.
Regards,
Birendra
Maybe you are looking for
-
How do I use the km utility to get a working Swedish keyboard at inst?
Hi, This is my initial post on this forum. I'm interested in archlinux as I find "the arch way" appealing, however I'm faced by a little problem first thing during the setup. It wasn't easy choosing between newbie corner and the installation forum, a
-
Win 7 Brightness doesn't work after graphics update
Hey, I have a late-2010 MacBook Pro running Bootcamp 4.0 with Windows 7 64-bit. My graphics card is the nVidia GeForce 320m. I looked online recently and found that there was an update available for my graphics card (previously I had the one that com
-
How to add user to one to many groups in Active directory using powershell
Hi All I am working on a script to create a user and based on user type i would like to add that user into 2 to 3 groups . At the moment i have 3 groups e.g domain users, Developers, tester, $NewUser = Read-Host "New Username" $firstname = Read-Hos
-
Handling Error in Recording PB10
Hi, while recording applicant data for infotype 4002 through PB10 i getting a error message saying "Make an Entry in all requried fields" in the 5 screen once i click on the error message question mark and close that message it is proceeding fine.. p
-
I need to know how to authorize or deauthorize a computer when the email address attached to it no longer exists I can't access the account because your system doesn't recognize the last password -- and it won't let me change the password because it