How to display mutilpe list in a screen ( ALV list)
Hello,
Could you please help me the source code sample for displaying many list in an ALV screen (Basic list)
For example : I 've 2 table with different information.
Table A Col A1 col A2 Col A3
Table B Col B1 B2 B3 B4 B5
Now I need to display them in only 1 screen like :
List of record in table A
Col A1 Col A2 Col A3
List of record in table B
B1 B2 B3 B4 B5
Thanks,
for this kind of requirement use the LIst ALV.
The below sample code might help you
DATA : g_t_print TYPE slis_print_alv.
Initialize ALV
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-repid.
ADD first ALC
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = g_t_layout
it_fieldcat = g_t_fieldcat[]
i_tabname = 'g_t_strans'
it_events = g_t_events_strans
TABLES
t_outtab = g_t_strans
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2.
IF sy-subrc NE 0.
MESSAGE s999 WITH 'Error in ''REUSE_ALV_LIST_DISPLAY'' FM'.
STOP.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = g_t_layout
it_fieldcat = g_t_fieldcat[]
i_tabname = 'g_t_sretrev'
it_events = g_t_events_sretrev
TABLES
t_outtab = g_t_sretrev
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2.
IF sy-subrc NE 0.
MESSAGE s999 WITH 'Error in ''REUSE_ALV_LIST_DISPLAY'' FM'.
STOP.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = g_t_layout
it_fieldcat = g_t_fieldcat[]
i_tabname = 'g_t_stransrev'
it_events = g_t_events_stransrev
TABLES
t_outtab = g_t_stransrev
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2.
IF sy-subrc NE 0.
MESSAGE s999 WITH 'Error in ''REUSE_ALV_LIST_DISPLAY'' FM'.
STOP.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = g_t_layout
it_fieldcat = g_t_fieldcat[]
i_tabname = 'g_t_sret'
it_events = g_t_events_sret
TABLES
t_outtab = g_t_sret
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2.
IF sy-subrc NE 0.
MESSAGE s999 WITH 'Error in ''REUSE_ALV_LIST_DISPLAY'' FM'.
STOP.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
is_print = g_t_print.
Similar Messages
-
How to display logo in module pool screen
Hi,
I need to display a logo in the screen of module pool programming. I have already imported the logo image using transaction OAER.
Please suggest how to display the image in the screen..
Thanks and Regards,
Sayan GhoshYou can show the image using the calss
CL_DD_DOCUMENT
For reference how to use the class
check the example program
DD_ADD_PICTURE -
How to display negative values in a screen field of a screen
Hi All,
Please let me know how to display negative values in a screen field of a screen.
thanksHi Kishore,
You can do this method. In the screen , create a text field of CHAR instead fo creating an INT4 field.
I have created a field of CHAR of name say TEXT.
In the main program,
declare a variable of the same name ie. TEXT.
data: TEXT(5) TYPE C.
In PBO, just assign the negative values.
It will work.Since there is automatic conversion between character and integer data types, it will work for positive values as well.
Regards,
Sylendra. -
How to display two grids in same screen using SALV Method
Hi Freinds,
Please let me know how to display two grids in same screen using SALV Method.
Thank you
Regards,
SDVUsing the same concept as described in How to dispaly Three Internal Table Data (One below another) in ALV OOPS .
All you need to add is passing your new containers as r_container parementer of factory method.
"1st one
cl_salv_table=>factory(
EXPORTING
R_CONTAINER = g_top_container
"2nd one
cl_salv_table=>factory(
EXPORTING
R_CONTAINER = g_bottom_container
Regards
Marcin -
How to display 2 lines of fieldcat in alv
hi,all.
I wonder how to display 2 lines of fieldcat in alv,no matter grid,list ,oo. whatever.
thanks in anvance.Hi,
it's only possible in alv-list (3 lines).
A. -
How to display subtotals in separate column in alv report?
hi,
I am displayed the subtotals for QUantity field BDMNG in Reuse_alv_grid_display in the same column.
but I want to display subtotal in separate column.
How to display subtotals in separate column in alv report?
thanks®ards.
samba.kHi
As far as i know you can't do this,the option you have is to create one more column (subtotal) and populate it by manual calculation at every subtotal (not alv subtotal but yours) .
Best Regards
Yossi -
How to display multi line headings in procedural alv report
Hi experts,
How to display multi line heading in alv( procedural alv report) report.
some columns single line and some columns multi line in the same report.
ex:
solvent consumed solvent recovered
fresh | recovery recovery | spent batch no storage
I am using procedural alv .pls give me idea.Hi Ram,
Check the sample report [how to display multi line headings in procedural alv report|http://sample-code-abap.blogspot.com/2008/01/printing-multiple-line-header-and.html]
Thanks,
Duy -
Urgent help needed: how to display a list of records on the screen
Hello,
This is very urgent. Can anyone help me. I have posted this query of mine before also but still no reply came. My whole application is dependent on this problem. Actually I am developing an application for mobile phone using MIDP. I have a record store which contains personal details for users. I am able to add records to the record store. Now I want that these records can be edited. For this I want to display a list of firstname field on the screen (and not console) so that i can select a user to edit its details. I have written the code to read the records and individual fields and display it on the console but i want to display that list on screen. I tried list and array but it s giving some error.
I am giving the code to read the records below. Please tell me how can I display it in a list on the screen.
public void readStream(){
try
byte[] recData=new byte[50];
String varname;
ByteArrayInputStream strmBytes = new ByteArrayInputStream(recData);
DataInputStream strmData=new DataInputStream(strmBytes);
if (rsperdt.getNumRecords() > 0){
ComparatorString comp=new ComparatorString();
int i=1;
RecordEnumeration re=rsperdt.enumerateRecords(null, comp, false);
while(re.hasNextElement()){
rsperdt.getRecord(re.nextRecordId(), recData,0);
System.out.println("Record #" + i );
varname = strmData.readUTF();
System.out.println("Name #"+varname);
System.out.println("---------------------------");
i=i+1;
strmBytes.reset();
comp.compareStringClose();
re.destroy();
strmBytes.close();
catch(Exception e){
System.err.println("read Records class:read");
}I could not understand ur point "post the code in tags". I am pasting the code below. Please help as my whole application is stuck due to this problem and I have a deadline of 7th oct.
This midlet is getting called from some other midlet.
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.rms.*;
import java.io.*;
import java.util.*;
public class frmread extends Form implements CommandListener
static final String rec_store="db_per";
private RecordStore rsperdt=null;
private Vector vecname;
private ChoiceGroup chname;
private boolean flagSortByPriority = false, flagShowPriority = true;
private Form fmmain;
private Command cmdBack;
private teledoc midlet;
public frmread(String title, teledoc midlet)
super(title);
this.midlet = midlet;
openRecStore();
this.setCommandListener(this);
chname = new ChoiceGroup("new", Choice.EXCLUSIVE);
vecname = new Vector();
cmdBack = new Command("Back", Command.BACK, 1);
fmmain = new Form("Record Search");
addCommand(cmdBack);
setCommandListener(this);
readStream();
rebuildTodoList();
closeRecStore();
* Process events for this form only
protected void rebuildTodoList()
for(int j=chname.size(); j>0; j--)
chname.delete(j-1);
int priority;
todoitem item;
String text;
StringBuffer sb;
for (int j=0; j<vecname.size(); j++)
item=(todoitem) vecname.elementAt(j);
priority = item.getPriority();
text = item.getText();
sb = new StringBuffer((flagShowPriority ? (Integer.toString(priority) + "-"): ""));
sb.append(text);
chname.append(sb.toString(), null);
public void commandAction(Command c, Displayable s)
if (c == cmdBack){
midlet.displayteledoc();
public void readStream(){
try
byte[] recData=new byte[100];
String varname;
int varname1=0;
ByteArrayInputStream strmBytes = new ByteArrayInputStream(recData);
DataInputStream strmData=new DataInputStream(strmBytes);
if (rsperdt.getNumRecords() > 0){
ComparatorString comp=new ComparatorString();
int i=1;
int id = 1;
vecname.removeAllElements();
RecordEnumeration re=rsperdt.enumerateRecords(null, comp, false);
while(re.hasNextElement()){
rsperdt.getRecord(re.nextRecordId(), recData,0);
System.out.println("Record #" + i );
varname = strmData.readUTF();
varname1 = strmData.readInt();
id = re.nextRecordId();
System.out.println("Name #"+varname);
todoitem item = new todoitem(varname1, varname, id);
vecname.addElement(item);
System.out.println("---------------------------");
i=i+1;
strmBytes.reset();
comp.compareStringClose();
re.destroy();
strmBytes.close();
catch(Exception e){
System.err.println("read Records class:read");
public void openRecStore(){
try{
rsperdt=RecordStore.openRecordStore("db_per",true);
catch(RecordStoreException e){
db(e.toString());
public void closeRecStore(){
try{
rsperdt.closeRecordStore();
catch(Exception e){
db(e.toString());
public void db(String str){
System.err.println("Msg:" + str);
class ComparatorString implements RecordComparator{
private byte[] recData = new byte[20];
private ByteArrayInputStream strmBytes = null;
private DataInputStream strmDataType = null;
public void compareStringClose(){
try{
if(strmBytes != null)
strmBytes.close();
if(strmDataType != null)
strmDataType.close();
catch (Exception e)
public int compare(byte[] rec1, byte[] rec2)
String str1, str2;
try {
int maxsize = Math.max(rec1.length, rec2.length);
if (maxsize > recData.length)
recData = new byte[maxsize];
strmBytes = new ByteArrayInputStream(rec1);
strmDataType = new DataInputStream(strmBytes);
str1=strmDataType.readUTF();
strmBytes = new ByteArrayInputStream(rec2);
strmDataType = new DataInputStream(strmBytes);
str2=strmDataType.readUTF();
int result=str1.compareTo(str2);
if (result == 0)
return RecordComparator.EQUIVALENT;
else if (result < 0)
return RecordComparator.PRECEDES;
else
return RecordComparator.FOLLOWS;
catch (Exception e)
return RecordComparator.EQUIVALENT; -
How to display a "Transaction in progress" screen
Is it possible to replace (in ITS) the current waiting screen (a moving ball or something like that) with something else?
We have a transaction that takes a long time to display. It's not a problem in the ITS, it's just how the transaction is - assume that it can't be optimized (for many reasons) or changed.
We want to display (in EP 6) a screen warning the user. This transaction is being displayed with a standard ITS iView (SAPGUI for HTML).
Can this be done?Hi Carlos,
The content of the waiting screen can be found in a html page called hourglass.html. This file is located where the ITS mimes are stored:
For ITS 6.20 the path would be:
...\sap\its\mimes\system\[theme 99|2002]\page\hourglass.html
(For the integrated ITS releases the path is similar.)
You can change this file according to your needs, but please be aware that in case of problems the support will ask you to take back all customization changes first and restore the original files before it will analyse your problem.
Also with each upgrade to a new ITS patchlevel these files will be overwritten by the installer and have to be changed manually again to get back your customized content.
Best regards,
Henning -
How to display the error message on screen in display mode
Hi all,
How to display error message as as status message on the screen(module pool).
The requirement is if I call the screen, it should get with the error message in the status bar. If I write with error message 'E' error mesage information displays and when I click on exit, it lives the current transaction.
Thank you!
PrasadHi,
Try as below.
MESSAGE IXXX DISPLAY LIKE 'E'.
LEAVE TO SCREEN XXXX.
After displaying the information message like E, leave to the screen you want to navigate or can also navigate to the transaction required.
Regards,
Nangunoori. -
How to display an error message on screen?
Hi experts,
In screen painter, how to display an error message in the message area just below the screen?
Thanks!hi wuyia,.
Write like this;
Message 'Process completed Successfuly' TYPE 'S'.
Message 'Want to Overwrite Value' TYPE 'W'.
Message 'Press enter to continue' TYPE 'I'.
Message 'Invalid Input' TYPE 'E'.
S - Success
W - Warning
I - Information
E - Error
You can adjust your GUI option to display the message in a Popup or in the status bar.
Regards
Karthik D -
How to display Call list Large view as the initial view dynamically.
My requiremet is that
1) User chooses a call list -> then clicks display calls -> then clicks Calls Full view
Now ClmCallListDetailsLarge View is displayed
2) Now the user chooses a call and then prceeds to Account confirmation, Interaction Record and then ends the call.
3) Now when the Call list is choosen from navigation bar Available 'ClmAvailbleCallLists' View is displayed, but the requirement is to display 'ClmCallListDetailsLarge' view.
4) There is some standard code related to this in 'DO_REPLACE_INITIAL_VIEW' method of the window controller. but this method is not getting triggered at all.
Please let me know how this can be achievedThanks for idea.
Assume I stored my data in a List of HashMap.
Could you provide an example of JSTL for displaying this list? -
How to display Column List (Search Bar - Do Not Display) in Ascending Order
Hi,
I am having a Interactive Report..
In the Search Bar we have Select Columns, under that we have Do Not Display.
where all the columns (currently not displayed) are listed.
How can we display these columns in Ascending order
Thanks,
DeepakDo you want to display these columns in the IR?
If yes. Select the column you want to display and click the the '>'.
In the interactive report regions - source, where you have your query to select the columns use order by to sort them in assn order.
Do you want to keep these columns as 'Do not display' and have them in assn order there?
Select all columns to display and move the columns back to the 'Do not display' region one by one making selections in assn order.
Or in the query select the columns in the order desired.
I don't know if I am helping. I fell like I got your question all wrong. Still...
Edited by: machan on Dec 11, 2009 11:01 AM -
How to display second list under an alv already displayed
hi
I have a list being displayed using grid control...i need to display anotehr list data below the first list please suggest?
block list display will not have sorted and all functinality ? do i need touse block list display function module??
regards
aroraHi Arora Nishant,
REUSE_ALV_BLOCK_LIST_INIT
then
REUSE_ALV_BLOCK_LIST_APPEND " for each fieldcat
create two diff fieldcate for both alv output and use this FM for each fieldcat to append it in output..
it's having sorting Functionality as well as export functionalities... etc etc..
then
REUSE_ALV_BLOCK_LIST_DISPLAY
Done..
See below example...
REPORT ZILESH_ALV3 LINE-COUNT 100 .
**& tables declaration
TABLES: MARA.
**& type-pools declaration
TYPE-POOLS: SLIS.
**& data declaration
DATA: G_REPID TYPE SY-REPID.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV, "mara
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA : IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV, "makt
WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
DATA : IT_FIELDCAT2 TYPE SLIS_T_FIELDCAT_ALV, "marc
WA_FIELDCAT2 TYPE SLIS_FIELDCAT_ALV.
DATA: GT_PRINT TYPE SLIS_PRINT_ALV,
WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
XS_EVENT TYPE SLIS_ALV_EVENT,
GT_XEVENTS TYPE SLIS_T_EVENT,
GT_YEVENTS TYPE SLIS_T_EVENT,
GT_ZEVENTS TYPE SLIS_T_EVENT,
WA_SORT TYPE SLIS_SORTINFO_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA: BEGIN OF IT_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
MATKL LIKE MARA-MATKL,
MEINS LIKE MARA-MEINS,
NTGEW LIKE MARA-NTGEW,
END OF IT_MARA.
DATA: BEGIN OF IT_MAKT OCCURS 0,
MATNR LIKE MAKT-MATNR,
SPRAS LIKE MAKT-SPRAS,
MAKTX LIKE MAKT-MAKTX,
MAKTG LIKE MAKT-MAKTG,
END OF IT_MAKT.
DATA: BEGIN OF IT_MARC OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
LADGR LIKE MARC-LADGR,
MTVFP LIKE MARC-MTVFP,
DISPR LIKE MARC-DISPR,
DISMM LIKE MARC-DISMM,
DISPO LIKE MARC-DISPO,
END OF IT_MARC.
**& initialisation
INITIALIZATION.
G_REPID = SY-REPID.
**& selection screen
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR,
S_MTART FOR MARA-MTART.
SELECTION-SCREEN END OF BLOCK B.
**& start of selection
START-OF-SELECTION.
PERFORM GET_MARADETAILS.
PERFORM GET_MAKTDETAILS.
PERFORM GET_MARCDETAILS.
**& Form get_maradetails
*text
*--> p1 text
*<-- p2 text
FORM GET_MARADETAILS .
SELECT MATNR
MTART
MATKL
MEINS
NTGEW FROM MARA
INTO TABLE IT_MARA
WHERE MATNR IN S_MATNR AND
MTART IN S_MTART.
ENDFORM. " get_maradetails
**& Form get_maktdetails
*text
*--> p1 text
*<-- p2 text
FORM GET_MAKTDETAILS .
SELECT MATNR
SPRAS
MAKTX
MAKTG FROM MAKT INTO TABLE IT_MAKT
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR = IT_MARA-MATNR..
ENDFORM. " get_maktdetails
**& Form get_marcdetails
*text
*--> p1 text
*<-- p2 text
FORM GET_MARCDETAILS .
SELECT MATNR
WERKS
LADGR
MTVFP
DISPR
DISMM
DISPO FROM MARC
INTO TABLE IT_MARC
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR = IT_MARA-MATNR.
ENDFORM. " get_marcdetails
**& end of selection
END-OF-SELECTION.
PERFORM SORT_LIST.
PERFORM MODIFY_FIELDCAT.
PERFORM EVENT_LIST.
PERFORM BLOCK_LIST.
**& Form modify_fieldcat
*text
*--> p1 text
*<-- p2 text
FORM MODIFY_FIELDCAT .
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-SELTEXT_L = 'MATERIAL NUM'.
WA_FIELDCAT-COL_POS = 1.
WA_FIELDCAT-OUTPUTLEN = 18.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MTART'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-SELTEXT_L = 'MAT TYPE'.
WA_FIELDCAT-COL_POS = 2.
WA_FIELDCAT-OUTPUTLEN = 5.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MATKL'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-SELTEXT_L = 'MAT GROUP'.
WA_FIELDCAT-COL_POS = 3.
WA_FIELDCAT-OUTPUTLEN = 10.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-SELTEXT_L = 'UNIT'.
WA_FIELDCAT-COL_POS = 4.
WA_FIELDCAT-OUTPUTLEN = 5.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'NTGEW'.
WA_FIELDCAT-TABNAME = 'IT_MARA'.
WA_FIELDCAT-DO_SUM = 'X'.
WA_FIELDCAT-SELTEXT_L = 'QUANTITY'.
WA_FIELDCAT-COL_POS = 5.
WA_FIELDCAT-OUTPUTLEN = 15.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-FIELDNAME = 'MATNR'.
WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
WA_FIELDCAT1-SELTEXT_L = 'MATERIAL NUM'.
WA_FIELDCAT1-COL_POS = 1.
WA_FIELDCAT1-OUTPUTLEN = 18.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-FIELDNAME = 'SPRAS'.
WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
WA_FIELDCAT1-SELTEXT_L = 'LANGUAGE'.
WA_FIELDCAT1-COL_POS = 2.
WA_FIELDCAT1-OUTPUTLEN = 2.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-FIELDNAME = 'MAKTX'.
WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
WA_FIELDCAT1-SELTEXT_L = 'MAT DESC'.
WA_FIELDCAT1-COL_POS = 3.
WA_FIELDCAT1-OUTPUTLEN = 40.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
WA_FIELDCAT1-FIELDNAME = 'MAKTG'.
WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
WA_FIELDCAT1-SELTEXT_L = 'GRP DESC'.
WA_FIELDCAT1-COL_POS = 4.
WA_FIELDCAT1-OUTPUTLEN = 40.
APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
CLEAR WA_FIELDCAT1.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'MATNR'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'MATERIAL NUM'.
WA_FIELDCAT2-COL_POS = 1.
WA_FIELDCAT2-OUTPUTLEN = 18.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'WERKS'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'PLANT'.
WA_FIELDCAT2-COL_POS = 2.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'LADGR'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'LOAD GRP'.
WA_FIELDCAT2-COL_POS = 3.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'MTVFP'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'GRP CHK'.
WA_FIELDCAT2-COL_POS = 4.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'DISPR'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'MRP PROFILE'.
WA_FIELDCAT2-COL_POS = 5.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'DISMM'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'MRP TYPE'.
WA_FIELDCAT2-COL_POS = 6.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
WA_FIELDCAT2-FIELDNAME = 'DISPO'.
WA_FIELDCAT2-TABNAME = 'IT_MARC'.
WA_FIELDCAT2-SELTEXT_L = 'MRP CON'.
WA_FIELDCAT2-COL_POS = 7.
WA_FIELDCAT2-OUTPUTLEN = 4.
APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
CLEAR WA_FIELDCAT2.
ENDFORM. " modify_fieldcat
**& Form BLOCK_LIST
*text
*--> p1 text
*<-- p2 text
FORM BLOCK_LIST .
CLEAR WA_LAYOUT.
WA_LAYOUT-ZEBRA = 'X'.
WA_LAYOUT-TOTALS_TEXT = 'TOTAL'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'user_command'.
*IT_EXCLUDING =
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
I_TABNAME = 'IT_MARA'
IT_EVENTS = GT_XEVENTS
IT_SORT = IT_SORT
I_TEXT = ' '
TABLES
T_OUTTAB = IT_MARA
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 = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT1
I_TABNAME = 'IT_MAKT'
IT_EVENTS = GT_YEVENTS
*IT_SORT =
I_TEXT = ' '
TABLES
T_OUTTAB = IT_MAKT
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 = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT2
I_TABNAME = 'IT_MARC'
IT_EVENTS = GT_ZEVENTS
*IT_SORT =
I_TEXT = ' '
TABLES
T_OUTTAB = IT_MARC
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 = GT_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. " BLOCK_LIST
**& Form EVENT_LIST
*text
*--> p1 text
*<-- p2 text
FORM EVENT_LIST .
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENT-FORM = 'XTOP_OF_PAGE'.
APPEND XS_EVENT TO GT_XEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
XS_EVENT-FORM = 'XEND_OF_PAGE'.
APPEND XS_EVENT TO GT_XEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
XS_EVENT-FORM = 'XTOP_OF_LIST'.
APPEND XS_EVENT TO GT_XEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
XS_EVENT-FORM = 'XEND_OF_LIST'.
APPEND XS_EVENT TO GT_XEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
XS_EVENT-FORM = 'YEND_OF_PAGE'.
APPEND XS_EVENT TO GT_YEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENT-FORM = 'YTOP_OF_PAGE'.
APPEND XS_EVENT TO GT_YEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
XS_EVENT-FORM = 'YTOP_OF_LIST'.
APPEND XS_EVENT TO GT_YEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
XS_EVENT-FORM = 'YEND_OF_LIST'.
APPEND XS_EVENT TO GT_YEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
XS_EVENT-FORM = 'ZEND_OF_PAGE'.
APPEND XS_EVENT TO GT_ZEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENT-FORM = 'ZTOP_OF_PAGE'.
APPEND XS_EVENT TO GT_ZEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
XS_EVENT-FORM = 'ZTOP_OF_LIST'.
APPEND XS_EVENT TO GT_ZEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
XS_EVENT-FORM = 'ZEND_OF_LIST'.
APPEND XS_EVENT TO GT_ZEVENTS.
CLEAR XS_EVENT.
ENDFORM. " EVENT_LIST
*& Form XTOP_OF_PAGE
* text
FORM XTOP_OF_PAGE.
WRITE:/ 'TOP OF PAGE FOR MARA'.
ENDFORM. "XTOP_OF_PAGE
*& Form YTOP_OF_PAGE
* text
FORM YTOP_OF_PAGE.
WRITE:/ 'TOP OF PAGE FOR MAKT'.
ENDFORM. "YTOP_OF_PAGE
*& Form ZTOP_OF_PAGE
* text
FORM ZTOP_OF_PAGE.
WRITE:/ 'TOP OF PAGE FOR MARC'.
ENDFORM. "ZTOP_OF_PAGE
*& Form XEND_OF_PAGE
* text
FORM XEND_OF_PAGE.
WRITE:/ 'END OF PAGE FOR MARA'.
ENDFORM. "XEND_OF_PAGE
*& Form YEND_OF_PAGE
* text
FORM YEND_OF_PAGE.
WRITE:/ 'END OF PAGE FOR MAKT'.
ENDFORM. "YEND_OF_PAGE
*& Form ZEND_OF_PAGE
* text
FORM ZEND_OF_PAGE.
WRITE:/ 'END OF PAGE FOR MARC'.
ENDFORM. "ZEND_OF_PAGE
*& Form XTOP_OF_LIST
* text
FORM XTOP_OF_LIST.
WRITE:/ 'TOP OF LIST FOR MARA'.
ENDFORM. "XTOP_OF_LIST
*& Form YTOP_OF_LIST
* text
FORM YTOP_OF_LIST.
WRITE:/ 'TOP OF LIST FOR MAKT'.
ENDFORM. "YTOP_OF_LIST
*& Form ZTOP_OF_LIST
* text
FORM ZTOP_OF_LIST.
WRITE:/ 'TOP OF LIST FOR MARC'.
ENDFORM. "ZTOP_OF_LIST
*& Form XEND_OF_LIST
* text
FORM XEND_OF_LIST.
WRITE:/ 'END OF LIST FOR MARA'.
ENDFORM. "XEND_OF_LIST
*& Form YEND_OF_LIST
* text
FORM YEND_OF_LIST.
WRITE:/ 'END OF LIST FOR MAKT'.
ENDFORM. "YEND_OF_LIST
*& Form ZEND_OF_LIST
* text
FORM ZEND_OF_LIST.
WRITE:/ 'END OF LIST FOR MARC'.
ENDFORM. "ZEND_OF_LIST
**& Form sort_list
*text
*--> p1 text
*<-- p2 text
FORM SORT_LIST .
CLEAR WA_SORT.
WA_SORT-FIELDNAME = 'MTART'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-FIELDNAME = 'MATKL'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
ENDFORM. " sort_list
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7 -
How to display Cleared/open item symbol' in alv?
Hi Experts,
I am developing ALV report like faglb03,additionaly including some fields as per user requirement.here i want to display " Cleared/open item symbol' in alv.Can anyone tel me how to do this.In which and how it is stored in table?
Thanks in Advance![Formatting Column Contents|http://help.sap.com/saphelp_nw04/helpdata/en/ff/4649a6f17411d2b486006094192fe3/frameset.htm]
check the documentation for ICON , check the table ICON for more symbols
[Sample code of alv list|http://www.sap-img.com/abap/regarding-icon-display-in-alv.htm]]
Maybe you are looking for
-
Error in scheduling a single mapping
Hi everyone, I am new to owb and i am scheduling a single mapping and i successfully deploy it and run it. In the control center i see that the job has ran successfully but no records were inserted. Then i went into the OEM to see the job and it show
-
a table "address", which has a column "x" and a column "id". i want to update the column "x" in each row. in JSP file, do a loop for (int i=1,i<100,i++) { CoorX = i*i; ID = i; sql = "UPDATE address SET x=CoorX WHERE id=ID"; i got error says "General
-
How to stop being prompted to make Thunderbird the default client
When I launch Thunderbird on my iMac (using Mavericks iOS), I'm continually prompted to either "set as default" or "skip integration". I neither want Thunderbird to become my default email application, nor do I want to continually be prompted to skip
-
Is ist possible to bring objects behind text? It should be possible somehow, becouse one template (Letter --> Elegant, im not quite shure if it's the same name in english) can do this!
-
T60 will not start. While turning on and initiating system, it died suddenly. Even the battery light was not illuminated. Battery part# is FRU P/N 42T4504. Should the system still start with the AC adapter, even if battery has died? Are others h