Capture the list of fields from Report Explorer?
Is there a way to readily capture the list of fields used in a given report from the report explorer or field explorer? I want to streamline my command to only select the fields in use for a given report, and it would be easier if I had a list for each.
There are usually stored procedures or views available in the database that will list the fields in tables. I don't think the API is consistent, though, so you should check your database reference.
The other thing that you could do is use "select *" during development, then note which fields are checked in the field explorer (indicating it's used) and replacing the * with the list of fields once your more or less done with the report.
Note that if you're not using an SQL command (selected a table instead), I'm pretty sure Crystal only requests the fields from the table that are used by the report.
HTH,
Carl
Similar Messages
-
How to find out the list of field exists for a particular transaction
Hi all,
Can u please help me find out the list of field exits available for a particular Tcode?
Is it similar to User exit or . . . . ?
Thanks,
C.Selvaraj
SAP-QMCreate a program and add this code to find user exit
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname =
tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ', "#EC NOTEXT
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name', "#EC NOTEXT
21 sy-vline ,
22 'Description', "#EC NOTEXT
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill. "#EC NOTEXT
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'. "#EC NOTEXT
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'. "#EC NOTEXT
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
Rewards if useful........................
Minal -
How to get the list of materials from Sap r/3
Hi Experts,
I have one doubt, here iam implementing
HTTP TO RFC scenario.
My doubts are------
1. Should we create DT MT MI and all (OR) not
2.In Request DT how the message structure wil be to get the list of materials from sap r/3 system as Response(Ex: Fields in the source structure).
3.Or the second thing is how to get the list of materials start with some alphabate.
Please reply me for each and every questions mentioned above. Please clarify me.
Helpful answers wil be rewarded.
Reagards
khannaHi Khanna,
<i> 1. Should we create DT MT MI and all (OR) not</i>
Yes U need to create for HTTP site...for RFC U need to import..
<i>2.In Request DT how the message structure wil be to get the list of materials from sap r/3 system as Response(Ex: Fields in the source structure).</i>
You create your own structres for Request and respoce.. and Map it with RFC..
<i>3.Or the second thing is how to get the list of materials start with some alphabate.</i>
I think it will come with acending order....
for more help go through this link
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
regards,
Ansar. -
Hi all,
For all BO reports scheduled to be sent out, can we get the list of all BO report to be sent(or have been sent) for a specified day?(For example, today or nex Monday). Thank you.
Regards,
Eton.Hi Eton,
To check the instances which have ran today, you can use the below query in query builder.
SELECT SI_NAME,SI_ID FROM CI_INFOOBJECTS WHERE SI_INSTANCE=1 AND SI_STARTTIME > '2014.08.20 00:00:00' Order by SI_STARTTIME DESC
To check the instances which would be running in the future, that means you have recurring schedules. Check for the SI_NEXTRUNTIME to get the details of instances which will run in the future as per the recurrences.
Thanks,
Prithvi -
How to reduce the pdf version & how to remove all the pre-delivered field from a pdf file.
Hi Team,
1) Please help me to reduce the version of a pdf file which is v1.7 as my BI Publisher support only pdf version upto Version1.5.
2)This pdf file 1.7 contains some pre-delivered fields, i want to remove all the pre-delivered fields. Please suggest.
PFA link:-
http://www.uscis.gov/files/form/i-539.pdf
Please guide to remove the pre-delivered fields from this pdf & how to reduce the version.A lot depends on what you want to do with the file. The encryption has limited most options on the form. If you are wanting to simply post a view of the form, then you might try a screen capture. Of course there is always the question of what you want to do with the form and any legal aspects related to that use. Other than answering potential legal questions of your use, we might be able to help more if we were aware of the desired use. At the moment, the screen capture is my only suggestion. There may be other work arounds, but probably not appropriate for discussion on this forum.
If you are wanting the form for publication as an example in some document, I would strongly suggest you contact the gov't agency and discuss your intent and try to get a version you can use with their approval. Overall, that is the cleanest way to do whatever you are after for a legit purpose. Even a graphic version should have the permission of the government agency. -
How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
I currently run OS X 10.10.1
Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
Here is an example of what i want to happen.
I will have 2 tabs: Contact | Sales
Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
Now how do i do this, Excel can do this so how can numbers do it?Hi Shegra,
Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
quinn
Script starts:
-- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
property DataEntryTable : "Sales" --name of table with popups to be refreshed
set copyRange to {}
property PopValueSheet : "Sheet 1" --name of sheet with popup values table
property PopValueTable : "Contacts" --name of table with popup values
set PopStartRow to {}
tell application "Numbers"
set d to front document
set ps to d's sheet PopValueSheet
set pt to ps's table PopValueTable
set s to d's sheet DataEntrySheet
set t to s's table DataEntryTable
set tf to t's filtered --this records filter setting on data Entry Table
display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
set PopStartRow to {text returned of result}
tell pt --convert list to alphabetized popups
set ptRows to count rows
set copyRange to ("A2:" & name of cell ptRows of column "A")
set selection range to range copyRange
set selection range's format to text
sort by column 1 direction ascending
set selection range's format to pop up menu
-- popupsmade
set selection range to cell ptRows of column 1 of pt
set v to value of cell ptRows of pt
end tell
activate application "Numbers"
tell application "System Events" to keystroke "c" using command down
tell pt
set selection range to range copyRange
set selection range's format to text
end tell
tell t
set filtered to false
set tRows to count rows
set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
set selection range to range pasteRange
tell application "System Events" to keystroke "v" using command down
set filtered to tf
end tell
end tell -
Can I create a custom XMP panel but using the exact same fields from standard XMP panels?
Hi,
I am new to XMP and not very technical, so please excuse me if this sounds like a stupid question!
I have managed to create my own custom panels for Photoshop using the Generic Panel method with my own custom fields and they work fine. However what I need to do now is create a custom panel that uses the exact same fields from some of the standard panels. The reason being is that I have 4 fields that need to be integrated into another non-adobe system (Extensis Portfolio) that recognizes standard XMP fields, but at present these 4 fields are spread across different standard panels and it would be much easier for the user in Photoshop if they were all together on one panel.
An example field is the "Additional Model Info" field that currently resides on the standard IPTC Extension panel. If I fill in a value in this field on a JPEG then open the the image in Extensis Portfolio, then the field is also filled in in a field called IPTC - Model Info, displaying a key of Iptc4xmpExt:AddlModelInfo.
Is there a way I can take this standard field and use it on a custom panel, so that it can still be filled in in Photoshop and the value viewed in Extensis Portfolio? Sure I can create a custom panel and create a field called "Additional Model Info" but I can't figure out how to connect it to the corresponding field in Portfolio. I tried changing the xmp_property name="Iptc4xmpExt:AddlModelInfo" but this just broke the panel.
Is what I am trying to do possible and if so how and can it be done using the Generic Panel method?
Many thanks!I am trying to do the same thing but with only the IPTC Keywords field. Searching everywhere but no luck.
Thanks! -
How to capture the first execution of a report
Hi,
I am executing a report in background. The first time the report is executed I have to do a different processing. After the 1st execution I have to different processing.
Someone please tell me how to capture the 1st execution of a report. Is there a system variable ?
Appreciate your <removed by moderator> response.
Thanks,
Dikshitha G
Edited by: Thomas Zloch on May 12, 2011 11:36 AMKeshav.T wrote:
Are you going to create a Z table for this ???? ... Is there nobody to advice you in your firm ???
Hello Keshav,
A couple of years ago i would have recommended using the INDX table, but it has got it's demerits.
Maintenance of Z-table is easier than the INDX table. Say there is some error in the program & you want to override the flag. Will it be easier to do so in the INDX table or via SM30 for the Z-Table?
As a matter-of-fact i will recommend using the solution provided by Florian the TVARVC technique.
1. Create a parameter(specific to your program) & transport it.(See the trxn STVARV)
2. In your program check the value of this param & set it accordingly.
Using TVARVC you will 2 birds with one stone:
1. You don't have to create a custom table.
2. Easy maintenance via STVARV trxn.
Hope you get the point!
Cheers,
Suhas
PS: In our system we have a Z-table designed specifically for this particular purpose. All the programs having this kind of requirement refer to this table. -
How to use a .Mac alias in the outgoing address field from iPhone?
I do not want my .Mac Apple ID showing up in the outgoing address field from my iPhone. I want to use an alias instead, just like I use in Mail. How can I use the same alias in iPhone?
The iPhone has been great once I finally got it activated...no problems synching from Outlook on my PC and Address Book and iCal on my Mac. Now all of my PC and Mac data are finally merged on my iPhone and on both computers...wish I would have saved the money I spent on two versions of MissingSync! Looking forward to some software updates...
Mac Mini Mac OS X (10.4.10) iPhoneIf you want to setup a different REPLY TO, you have to use the OTHER shortcut when creating the mail account on the iPhone. It allows you to specify an address in the Account Information box different from your incoming and outgoing server login IDs.
-
How can I extract the list of fields for every view of the material master?
Hello SAPients,
Is there a table or a FM where I can extract the list of fields that every view of material master have?
I need to create a dynamic selection-screen with something like this:
Basic Data
mara-matnr
makt-maktx
mara-meins
Sales: Sales Organization Data
mara-matnr
makt-maktx
Thank you in advance.Hi
Try to run the trx OMT3B: this the customizing where the dynpro for the views are defined: perhaps u can find something can help you.
Max -
Hi am having issues with getting the list of users from the Active Director
Hi am having issues with getting the list of users from the Active Directory, can anyone help me with this!
Hi Jason,
Try this:
1. In Ultiboard select Tools>>Netlist Editor>>Pins, press the Delete button
2. Select all nets in the Select the Net to Delete dialog and then press the Delete button. This will clear all nets in the layout, don't worry all traces, parts are still on the design.
3. Go to Multisim and select Transfer>>Forward annotate to Ultiboard. This will add all nets that you removed back and it should fix the pin problem
Tien P.
National Instruments -
How do you print the list of songs from a songlist in I-Tunes that you burn to a blank CD for the cover of a CD case?
Click the playlist in iTunes. Then go to File > Print ...
One of the options you will see to print is "CD Jewel Case Insert". That's just what you want! -
Need to know how to iterate a list of field from the req xml in page servic
Hi All,
Please help me out with java code in which i am able to iterate a list of field coming in the request xml to my page service class under read(Pageheader header) method of mine queryPagemaintenace class.
package com.splwg.cm.domain.pageService;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import com.ibm.icu.math.BigDecimal;
import com.splwg.base.api.businessObject.BusinessObjectDispatcher;
import com.splwg.base.api.businessObject.BusinessObjectInstance;
import com.splwg.base.api.businessObject.COTSInstanceListNode;
import com.splwg.base.api.datatypes.Date;
import com.splwg.base.api.lookup.BusinessObjectActionLookup;
import com.splwg.base.api.service.DataElement;
import com.splwg.base.api.service.ItemList;
import com.splwg.base.api.service.PageHeader;
import com.splwg.shared.common.ApplicationError;
import com.splwg.shared.environ.FieldDefinition;
import com.splwg.shared.environ.ListDefinition;
import com.splwg.shared.logging.Logger;
import com.splwg.shared.logging.LoggerFactory;
* @author
@QueryPage (program = CMUSER, service = CMUSER,
* body = @DataElement (contents = { @ListField (name = USER_GROUP_LIST)
* , @ListDataField (name = USR_GRP_ID)
* , @DataField (name = MESSAGE_TEXT)
* , @DataField (name = USER_ID)
* , @DataField (name = PASSWORD)
* , @DataField (name = LAST_NAME)
* , @DataField (name = FIRST_NAME)
* , @DataField (name = USER_TYPE_FLG)
* , @DataField (name = EMAILID)}),
* actions = { "add"
* ,"read"
* , "delete"
* , "change"},
* header = { @DataField (name = USER_TYPE_FLG)
* , @DataField (name = EMAILID)
* , @DataField (name = LAST_NAME)
* , @DataField (name = FIRST_NAME)
* , @DataField (name = PASSWORD)
* , @DataField (name = USER_ID)},
* headerFields = { @DataField (name = USER_TYPE_FLG)
* , @DataField (name = USR_GRP_ID)
* , @DataField (name = EMAILID)
* , @DataField (name = LAST_NAME)
* , @DataField (name = FIRST_NAME)
* , @DataField (name = PASSWORD)
* , @DataField (name = USER_ID)},
* lists = { @List (name = USER_GROUP_LIST, size = 100, includeLCopybook = false,
* body = @DataElement (contents = { @DataField (name = USR_GRP_ID)}))},modules = {})
public class CMUSER extends CMUSER_Gen {
public static final Logger logger = LoggerFactory.getLogger(CMUSER.class);
DataElement root = new DataElement();
PageHeader page = new PageHeader();
protected DataElement read(PageHeader header) throws ApplicationError{
I want to know how can i iterate this USER_GROUP_LIST in my read method and get the USR_GRP_ID field data from it.
A Prompt reply from your end will help me to resolve this issueGuru Sir,
i tried to override the add() method of the framework in that i was able to iterate the field from the list. But now the i am facing there is that i am not able to send back the response to the external system in XML format. I am getting a blank response in my SOAP UI Tool while testing here is the code:
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import com.ibm.icu.math.BigDecimal;
import com.splwg.base.api.businessObject.BusinessObjectDispatcher;
import com.splwg.base.api.businessObject.BusinessObjectInstance;
import com.splwg.base.api.businessObject.COTSInstanceListNode;
import com.splwg.base.api.datatypes.Date;
import com.splwg.base.api.lookup.BusinessObjectActionLookup;
import com.splwg.base.api.service.DataElement;
import com.splwg.base.api.service.ItemList;
import com.splwg.base.api.service.PageHeader;
import com.splwg.shared.common.ApplicationError;
import com.splwg.shared.logging.Logger;
import com.splwg.shared.logging.LoggerFactory;
* @author
@QueryPage (program = CMUSER4, service = CMUSER4,
* body = @DataElement (contents = { @DataField (name = MESSAGE_TEXT)
* , @DataField (name = PASSWORD)
* , @DataField (name = USER_ID)
* , @DataField (name = LAST_NAME)
* , @DataField (name = FIRST_NAME)
* , @DataField (name = USER_TYPE_FLG)
* , @DataField (name = EMAILID)
* , @ListDataField (name = USR_GRP_ID)
* , @ListField (name = USER_GROUP_LIST)}),
* actions = { "add"
* , "delete"
* , "change"
* , "read"},
* header = { @DataField (name = USER_ID)
* , @DataField (name = MESSAGE_TEXT)},
* headerFields = { @DataField (name = USER_ID)
* , @DataField (name = MESSAGE_TEXT)},
* lists = { @List (name = USER_GROUP_LIST, size = 100,
* body = @DataElement (contents = { @DataField (name = USR_GRP_ID)}))}, modules = {})
public class CMUSER4 extends CMUSER4_Gen {
public static final Logger logger = LoggerFactory.getLogger(CMUSER4.class);
DataElement root = new DataElement();
PageHeader page = new PageHeader();
protected PageHeader add(DataElement item) throws ApplicationError{
BusinessObjectInstance boInstance = BusinessObjectInstance.create("CM-USER");
String USR_GRP_ID = null;
try{
logger.info("Data coming from the Service into the Application is :"+item.get(STRUCTURE.USER_ID));
logger.info("Data coming from the Service into the Application is :"+item.get(STRUCTURE.FIRST_NAME));
logger.info("Data coming from the Service into the Application is :"+item.get(STRUCTURE.LAST_NAME));
logger.info("Data coming from the Service into the Application is :"+item.get(STRUCTURE.EMAILID));
// logger.info("Data coming from the Service into the Application is :"+getInputHeader().getString(STRUCTURE.list_USER_GROUP_LIST.USR_GRP_ID));
// Iterator it = STRUCTURE.
ItemList sourceList = item.getList(STRUCTURE.list_USER_GROUP_LIST.name);
List userGrpID = new ArrayList();
logger.info("The Size of the User Group List here is :"+sourceList.size());
Iterator iter;
if ((sourceList != null) &&
(sourceList.size() > 0)) {
for (iter = sourceList.iterator(); iter.hasNext(); ) {
DataElement myItem = (DataElement)iter.next();
USR_GRP_ID = myItem.get(STRUCTURE.list_USER_GROUP_LIST.USR_GRP_ID);
logger.info("The User Group Id coming in the List here is :"+USR_GRP_ID);
logger.info("Data coming from the Service into the Application is :"+item.get(STRUCTURE.PASSWORD));
boInstance.set("user", item.get(STRUCTURE.USER_ID));
boInstance.set("firstName", item.get(STRUCTURE.FIRST_NAME));
boInstance.set("lastName", item.get(STRUCTURE.LAST_NAME));
boInstance.set("emailAddress", item.get(STRUCTURE.EMAILID));
// COTSInstanceList userGrpList = boInstance.getList("userGroupUser");
// COTSInstanceListNode userGroupList = userGrpList.newChild();
COTSInstanceListNode userGroupList = boInstance.getList("userGroupUser").newChild();
userGroupList.set("userGroup", USR_GRP_ID);
logger.info("Data coming from the Service into the Application is :"+userGroupList.toString());
/*boInstance.set
boInstance.set("userGroup", getInputHeader().getString(STRUCTURE.HEADER.USR_GRP_ID));*/
// UserTypeLookup.constants.TEMPLATE_USER
//if(element.get(STRUCTURE.USER_TYPE_FLG))
//boInstance.set("user", element.get(STRUCTURE.));
boInstance.set("dashboardWidth","200");
boInstance.set("homeNavigationOption","CI0000000574");
boInstance.set("language","ENG");
boInstance.set("toDoEntriesAge1", new BigDecimal(50));
boInstance.set("toDoEntriesAge2",new BigDecimal(100));
boInstance.set("displayProfileCode", "NORTHAM");
String expirationDate = "2100-12-31";
String[] array = expirationDate.split("-");
userGroupList.set("expirationDate",new Date(Integer
.parseInt(array[0]), Integer
.parseInt(array[1]), Integer
.parseInt(array[2])));
//boInstance.set("userGroupUser", userGroupList);
COTSInstanceListNode roleUserList = boInstance.getList("roleUser").newChild();
roleUserList.set("toDoRole","F1_DFLT");
COTSInstanceListNode dataAccessList = boInstance.getList("dataAccessUser").newChild();
dataAccessList.set("dataAccessRole","***");
String expiryDate = "2100-01-01";
String[] array1 = expiryDate.split("-");
dataAccessList.set("expireDate",new Date(Integer
.parseInt(array1[0]), Integer
.parseInt(array1[1]), Integer
.parseInt(array1[2])));
BusinessObjectDispatcher.execute(boInstance,
BusinessObjectActionLookup.constants.FAST_ADD);
page.put(STRUCTURE.HEADER.MESSAGE_TEXT, "User Added Successfully");
page.put(STRUCTURE.HEADER.USER_ID,item.get(STRUCTURE.USER_ID));
}catch(Exception e){
e.printStackTrace();
page.put(STRUCTURE.HEADER.MESSAGE_TEXT, "Caught Exception in the ORMB System. Please reach out to the Admin"+e.getMessage());
page.put(STRUCTURE.HEADER.USER_ID,item.get(STRUCTURE.USER_ID));
return page;
If you can help me to find out what went wrong here while sending the response back it can close my issue. -
How to capture the value in AVL intracrivity report
Hi ,
i have one doubt please clarify me.
in ALV interactivity report if user click on the one field, how captured the that field value in one variable. presentably i am using
ws_field_catalog-col_pos = '2'.
ws_field_catalog-fieldname = 'BELNR'.
ws_field_catalog-tabname = 'I_OUTPUT'.
ws_field_catalog-scrtext_l = 'Original Document number.'.
ws_field_catalog-hotspot = 'V'.
ws_field_catalog-scrtext_m = 'Original Doc.no.'.
ws_field_catalog-scrtext_s = 'Original Doc.no.'.
APPEND ws_field_catalog TO lt_fieldcat.
CLEAR: ws_field_catalog.
but it is not capture the valu it is capture the only field name please any one can you suggest me.
Thanks,
Hari.hi,
there is one type pool availabe for the. SLIS_SELFIELD.
make ur own structure and use case sy-ucomm.
when '&IC1'.
write ur code here.
TYPE-POOLS: SLIS.
*type declaration for values from ekko
TYPES: BEGIN OF I_EKKO,
EBELN LIKE EKKO-EBELN,
AEDAT LIKE EKKO-AEDAT,
BUKRS LIKE EKKO-BUKRS,
BSART LIKE EKKO-BSART,
LIFNR LIKE EKKO-LIFNR,
END OF I_EKKO.
DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
WA_EKKO TYPE I_EKKO.
*type declaration for values from ekpo
TYPES: BEGIN OF I_EKPO,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
MENGE LIKE EKPO-MENGE,
MEINS LIKE EKPO-MEINS,
NETPR LIKE EKPO-NETPR,
END OF I_EKPO.
DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
WA_EKPO TYPE I_EKPO .
*variable for Report ID
DATA: V_REPID LIKE SY-REPID .
*declaration for fieldcatalog
DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
declaration for events table where user comand or set PF status will
be defined
DATA: V_EVENTS TYPE SLIS_T_EVENT,
WA_EVENT TYPE SLIS_ALV_EVENT.
declartion for layout
DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
declaration for variant(type of display we want)
DATA: I_VARIANT TYPE DISVARIANT,
I_VARIANT1 TYPE DISVARIANT,
I_SAVE(1) TYPE C.
*PARAMETERS : p_var TYPE disvariant-variant.
*Title displayed when the alv list is displayed
DATA: I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
DATA: I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
INITIALIZATION.
V_REPID = SY-REPID.
PERFORM BUILD_FIELDCATLOG.
PERFORM EVENT_CALL.
PERFORM POPULATE_EVENT.
START-OF-SELECTION.
PERFORM DATA_RETRIEVAL.
PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_REPORT.
*& Form BUILD_FIELDCATLOG
Fieldcatalog has all the field details from ekko
FORM BUILD_FIELDCATLOG.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'AEDAT'.
WA_FIELDCAT-SELTEXT_M = 'DATE.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'LIFNR'.
WA_FIELDCAT-NO_OUT = 'X'.
WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG
*& Form EVENT_CALL
we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
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.
ENDFORM. "EVENT_CALL
*& Form POPULATE_EVENT
Events populated for TOP OF PAGE & USER COMAND
FORM POPULATE_EVENT.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
ENDIF.
ENDFORM. "POPULATE_EVENT
*& Form data_retrieval
retreiving values from the database table ekko
FORM DATA_RETRIEVAL.
SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
ENDFORM. "data_retrieval
*& Form bUild_listheader
text
-->I_LISTHEADEtext
FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA HLINE TYPE SLIS_LISTHEADER.
HLINE-INFO = 'this is my first alv pgm'.
HLINE-TYP = 'H'.
ENDFORM. "build_listheader
*& Form display_alv_report
text
FORM DISPLAY_ALV_REPORT.
V_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_GRID_TITLE = I_TITLE_EKKO
I_GRID_SETTINGS =
IS_LAYOUT = ALV_LAYOUT
IT_FIELDCAT = I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'ZLAY1'
I_SAVE = 'A'
is_variant = i_variant
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKKO
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_alv_report
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo =
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
PERFORM BUILD_FIELDCATLOG_EKPO.
PERFORM EVENT_CALL_EKPO.
PERFORM POPULATE_EVENT_EKPO.
PERFORM DATA_RETRIEVAL_EKPO.
PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_EKPO.
ENDCASE.
ENDFORM. "user_command
*& Form BUILD_FIELDCATLOG_EKPO
text
FORM BUILD_FIELDCATLOG_EKPO.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELP'.
WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MENGE'.
WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-SELTEXT_M = 'UOM'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'NETPR'.
WA_FIELDCAT-SELTEXT_M = 'PRICE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG_EKPO
*& Form event_call_ekpo
we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL_EKPO.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
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.
ENDFORM. "event_call_ekpo
*& Form POPULATE_EVENT
Events populated for TOP OF PAGE & USER COMAND
FORM POPULATE_EVENT_EKPO.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
ENDFORM. "POPULATE_EVENT
*& Form TOP_OF_PAGE
text
FORM F_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo =
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
*retreiving values from the database table ekko
FORM DATA_RETRIEVAL_EKPO.
SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
ENDFORM.
FORM BUILD_LISTHEADER_EKPO USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA: HLINE1 TYPE SLIS_LISTHEADER.
HLINE1-TYP = 'H'.
HLINE1-INFO = 'CHECKING PGM'.
ENDFORM.
FORM DISPLAY_ALV_EKPO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE = I_TITLE_EKPO
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT =
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKPO
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.
REWARD ME IF HELPFUL. PLEASE -
Hi All,
I want read the line of the interactive.But in that line i nedd only 3 field values so when i try to read the line using the READ LINE ststement and try to assign the read value to a field it is going for the dump and saying conversion problem. So help me on reading a selected line are clicked line in interactive report and take only the required 3 field values from that entire line.Sample code will help a lot.
Thanks in Advance.hi Shri,
Do not use Read Line statment. instead of that use SY-LISEL, this will have the
entire line which you double clicked row, so in this you will get entire data of that row
other wise, You can use the HIDE technique, so here you need to call the At-USER COMMAND, so you will get the values to the next list level,
here are some of example codes which you want
http://www.guidancetech.com/people/holland/sap/abap/yusrlock.htm
http://www.erpgenie.com/abap/ireports.htm
http://www.planetsap.com/Z_interactive_reporting_1.htm
http://www.planetsap.com/Z_interactive_reporting_2.htm
Regards
Sudheer
Maybe you are looking for
-
How to delete one skype account if I have 2.
I don't know how to delete one of them. How?
-
Getting javascript error in dmw 8
was working fine....now when i go to save to the remote server it freezes and gives me this error: While executing DMW_File SaveDocumentToRemoteServer command in menus.xml, the following javascript errors ocurred: Exception thrown in native function.
-
Z61m Access connection works but opens up to 15 minutes
Guys, what the prublem may be? It was OK for 2 years of use but now previously set profile in Access connection catches wireless LAN automatically at start up without problems but I can not manage it. It takes up to 15 minutes before Access connectio
-
Password protecting and encrypting received pdf file
Hello there, how can I password protect (and encrypt) a pdf file that I received from someone else? For example, I may get a copy of my tax return from my accountant that I don't want anyone else to see on my computer or when I back up contents of my
-
Is there any profile options needed for revaluation program
revaluation program is taking long time to complete in 11.5.10.2 is there any profile options to setup revaluation. what may be the reson for this issue