Want create filter data in using routine by DTP
hi
I want create filter data in using routine by DTP
I want dowload data in my DSO, if the material exist in my infoobject 0material.
But my code donu2019t worked:
===============================================================
*& Include RSBC_SEL_ROUTINE_TPL
program conversion_routine.
Type pools used by conversion program
type-pools: rsarc, rsarr, rssm.
tables: rssdlrange.
Global code used by conversion rules
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
tables : /BIC/MATERIAL.
DATA:
l_s_ztable TYPE /BIC/MATERIAL,
l_s_range type rssdlrange.
$$ end of global - insert your declaration only before this line -
Fieldname = ZCOSTCTR
data type = CHAR
length = 000010
form compute_ZCOSTCTR
tables l_t_range structure rssdlrange
using i_r_request type ref to IF_RSBK_REQUEST_ADMINTAB_VIEW
i_fieldnm type RSFIELDNM
changing p_subrc like sy-subrc.
Insert source code to current selection field
$$ begin of routine - insert your code only below this line -
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = '/BIC/MATERIAL'.
l_idx = sy-tabix.
clear l_s_range.
SELECT DISTINCT /BIC/ZCOSTCTR FROM /BIC/MATERIAL INTO l_s_ztable.
l_s_range-iobjnm = '/BIC/MATERIAL'.
l_s_range-fieldname = '/BIC/MATERIAL'.
l_s_range-sign = 'I'.
l_s_range-option = 'EQ'.
l_s_range-low = l_s_ztable-/BIC/ZCOSTCTR.
l_t_range-HIGH = l_s_ztable-/BIC/ZCOSTCTR.
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
ENDSELECT.
==================================
best regard
francoise
my code
===============================================================
*& Include RSBC_SEL_ROUTINE_TPL
program conversion_routine.
Type pools used by conversion program
type-pools: rsarc, rsarr, rssm.
tables: rssdlrange.
Global code used by conversion rules
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
tables : /BIC/SMATERIAL.
DATA:
l_s_ztable TYPE /BIC/SMATERIAL,
l_s_range type rssdlrange.
$$ end of global - insert your declaration only before this line -
Fieldname = MATERIAL
data type = CHAR
length = 000010
form compute_MATERIAL
tables l_t_range structure rssdlrange
using i_r_request type ref to IF_RSBK_REQUEST_ADMINTAB_VIEW
i_fieldnm type RSFIELDNM
changing p_subrc like sy-subrc.
Insert source code to current selection field
$$ begin of routine - insert your code only below this line -
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = '/BIC/MATERIAL'.
l_idx = sy-tabix.
clear l_s_range.
SELECT DISTINCT MATERIAL FROM /BIC/SMATERIAL INTO l_s_ztable.
l_s_range-iobjnm = '/BIC/SMATERIAL'.
l_s_range-fieldname = '/BIC/SMATERIAL'.
l_s_range-sign = 'I'.
l_s_range-option = 'EQ'.
l_s_range-low = l_s_ztable-/BIC/SMATERIAL.
l_t_range-HIGH = l_s_ztable-/BIC/SMATERIAL.
if l_idx 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
ENDSELECT.
Similar Messages
-
How to create Geniric data source using the SAP FUNCTION MODULE
Hi,
I want to create genric data source using function module
MD_STOCK_REQUIREMENTS_LIST_API (delivered by sap)
for this function module where I can find Extract Structer
or I have to create ?
How can i use this ?
Thanks in AdvanceHi Shilpa,
Check here..........
Using function module as the generic extractor
Generic Delta Update using Function Module
Document regarding R/3 extractors using function module/user exits
Generic extractors using FM -
Creating Master Data Centrally Using Guided Procedures
Is it possible to create master data centrally using GP say for example creating Material master data without using MDM? Is there a stand out of box delivered scenario exist without MDM. I did see the article Create Master Data Centrally Using Guided Procedures but it uses MDM.
Any help appreciated.Wow, that was indeed a quick reply i have ever got on SDN. Thanks for the excellent link jitesh. However, where will i get the deployable files that it selects in the Import GP/CAF contents step of the demo? those are the webdynpro components files. One is SCA and other is SDA. Where will i get them?
Kindly post the link to those files if u have them or else send it across.
Regards,
Ameya
Edited by: Ameya Pimpalgaonkar on Sep 27, 2008 11:53 AM -
Error while creating Generic data source using FM
Hi Experts,
I try to create a generic data source using the Function Module via the transaction RSO2. I got the following error messages.
" Das Einheitenfeld CURR des Feldes ZPKZA1 der DataSource ZBWN_DS_POLPOSP ist ausgeblendet"
" Das Einheitenfeld CURR des Feldes ZPKZA2 der DataSource ZBWN_DS_POLPOSP ist ausgeblendet"
" Das Einheitenfeld CURR des Feldes ZPKZA10 der DataSource ZBWN_DS_POLPOSP ist ausgeblendet"
"The unit field CURR of the field ZPKZA1 of the DATA SOURCE ZBWN_DS_POLPOSP is not visible/ stopped/ hide".
for all 10 fields of type CURR.
How shall i handle this issue..........any suggestions please........
thanks in advance
cheers
sailekhaHi,
Are your CURR fields refereded to a currency field of your structure?? Maybe the problem is that the field containing the currency is refered to other table/structure and it has to be one of your structure fields.
Hope this helps,
Regards,
Carlos. -
Creating a Date object using an existing date object of different format
I am stuck in a problem while converting the date formats:
I have a date object in the format "yyyy-MM-dd" (e.g., 2009-08-21). And i want to create a date object in the format "MM/dd/yyyy" (e.g., 08/21/2009)
String s = oldDate.toString(); SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); Date newDate = formatter.parse(s);
the above code gives parse Exception:
java.text.ParseException: Unparseable date: "2009-08-21"
Any Clues ?
Edited by: Rahul.Mittal on Aug 21, 2009 10:09 AM
Edited by: Rahul.Mittal on Aug 21, 2009 10:12 AMmy apologies for putting it into a wrong forum. Anyways thanks for the pointer.
But i still feel that if i somehow get the desired Date object i can get through the problem. Something like this:
public Date getdOJ() {
Date oldDate = this.dOJ;
SimpleDateFormat oldFormatter = new SimpleDateFormat("yyyy-mm-dd");
Date newDate;
try {
String s = oldDate.toString();
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
Date newDate = formatter.parse(s);
} catch (ParseException e) {
e.printStackTrace();
return newDate;
}Unfortunately i am getting java.text.ParseException -
How to create NC data by using API?
Hi, all
I want to log NC by using API. but can't complet succsessful .
please help me check the following source code.
thanks.
NCProductionServiceInterface ncPSI = Services.getService("com.sap.me.nonconformance", "NCProductionService");
CreateNCRequest ncRequest = new CreateNCRequest();
//NC500_part: copy from NC500,and ALLOW_PARTIAL=YES
ncRequest.setActivity("NC500_part");
ncRequest.setSfcRef(new SFCBOHandle(site, sfc).toString());
ncRequest.setValidateNCCodeOperation(true);
// defined NCCODE: NCJPN1
ncRequest.setNcCodeRef(new NCCodeBOHandle(site,"NCJPN1").toString());
ncRequest.setDefectCount(new BigDecimal("3"));
CreateNCResponse ncResponse = ncPSI.createNC(ncRequest);
DispositionRequest disRequest = new DispositionRequest();
disRequest.setActivity("NC500_part"); //what can be set for this Activity, NC500_part is OK?
disRequest.setSfcRef(new SFCBOHandle(site, sfc).toString());
ProductionContext productionCtx = new ProductionContext();
productionCtx.setResourceRef(new ResourceBOHandle(site, "COIL").toString());
disRequest.setProdCtx(productionCtx);
DispositionSelection disSelection = new DispositionSelection();
//DispositionSelection is must need, but what shuold be set?
disSelection.setXXXX();
disRequest.setDispositionSelection(disSelection);
disRequest.setNcCodeRef(new NCCodeBOHandle(site,"NCJPN1").toString());
disRequest.setTotalDefectCount(new BigDecimal("3"));
// DispositionNC
DispositionResponse disResponse = ncPSI.disposition(disRequest);I log the nc to my SFC,but how to complete the nc process by API?
Wait for you help,thanks -
Need to Create a Date for Use in Filter
I need to set a filter to the effect of Modified Date >= [CURRENT_YEAR] || '02-01' and can't seem to get the filter right to allow me to concat/insert the year to the '02-01' to just get MM/DD/YYYY = 02/01/[Current Year]. It keeps throwing SQL errors.
Here is the text I used to get the string but I can't seem to get this into an actual date format. I've tried doing CAST as DATE and doing a DATE 'YYYY-MM-DD' format as well.
CAST(VALUEOF(NQ_SESSION.CURRENT_YEAR) AS CHAR)) || '-02-01'Ok. I finally found something that will work no matter what month we are talking about. The goal was to find the first day of the prior month so I always look for the two months activities.
So if current date is 06/08/2010 then I wanted all activities >= 05/01/2010. If the date were 01/12/2010 then I would want 12/01/2010 as my date to filter etc. It is the rollover that messes up most of the date logic when using date parts as filters.
Here is what I came up with and it works great. You basically subtract a month from today's date and then subtract the number of days (minus one) to get back the first of the prior month.
TIMESTAMPADD(SQL_TSI_DAY,
((DAY(TIMESTAMPADD(SQL_TSI_MONTH,-1,VALUEOF(NQ_SESSION.CURRENT_DT))) -1) * -1)
TIMESTAMPADD(SQL_TSI_MONTH,-1,VALUEOF(NQ_SESSION.CURRENT_DT)) ) -
Several single value selection in InfoPackage Data selection using Routine
Hi,
I am trying to extract data from a table(containing Ticket data) in R/3 using Generic extractor with table. As the table is not supporting the delta functionality i have to do daily full load for more than 5 lak records.
I dont want all the tickets from R/3, i just need the tickets which are open. Unfortunately there is no field in R/3 table which indicates Ticket status. But in BW i have a DSO where i can get the tickets along with their status.
Now what i want to do is:
in the Infopackage i want to give the dataselection for ticket, whose status is open which will be calculated in ABAP code by lookup to the DSO. Is this possible?
I know that in ABAP routine for Data selection we can give single values and range values. but here i just want to give several single values. That means if suppose i have 4 tickets T1,T2,T3,T4 in the DSO and if T1 and T4 are open tickets, then i have to get the data from R/3 just for T1 and T4.
in the above case if we use range then the low and high values in the range will be T1 and T4 respectively and the data pulled from R/3 will be from T1 - T4 ie all T1,T2,T3 & T4. but i need just T1 and T4.
Please share your ideas. also please send the code as i am not an ABAPer.
If Several single value selection is not possible at least send the code for the range values.
Thanks,
Cnu.you can write a code like this in the ABAP routine in data selection in front of ticket characteristic
types: Begin of s_ticket,
ticket type <type of ticket characterisitcs>,
End of s_ticket.
data: l_idx like sy-tabix,
wa_ticket type s_ticket,
it_ticket type standard table of s_ticket,
l_s_range type rsrdrange.
You can declare
read table l_t_range with key
fieldname = '<your field name for ticket>'.
l_s_range-infoobject = '<infoobject name>'.
l_s_range-fieldname = '<field name of ticket cahracteristics>'.
l_s_range-sign = 'I'.
l_s_range-option = 'EQ'.
select * from <ODS active table> into table it_ticket where status = <value for open status>.
if sy-subrc = 0.
loop at it_ticket into wa-ticket.
l_s_range-low = wa_ticket-ticket.
append l_s_range to l_t_range.
endloop.
end if.
p_subrc = 0.
you need to modify it as per your requirements, i hope this might help you. -
Wants - Create CCMS Alerts without using RWB
Hi,
I would like to create CCMS Alerts such as CPU performance, memory ect. ect. without using RWB
is that posible ? if yes how can i do that...
also I want to create CCMS alert will sent mail for different users, like memory alert sent to couple of users, and CPU performance alerts mail to different users like basis team...
Thanks in AdvancedThanks for Accept my Eaddress, can I get your Eaddress please.... yahoo or msn
as you know that I am trying to create CCMS in XI 3.0 and its nothing any link with tcode: ALRTCATDEF
I am follow some sim.file / doc to setup CCMS to (Lotus notes)
I setup everything but alerts is not show in lotus notes
SAPconnect works fine, internal mails are working fine
I wana share with you guys, what i done yet
USER SETTING
1. in SU01 my user has my Eaddress on it
2. Comm. Meth mail
SMTP SETTING
1. SAP&CONNECTNET is actives and internet mail works
2. In SMTP setting mail host localhost and port: 25
3. Create background job every 5 munites
RZ21 METHOD SETTING
RZ21 --> copy Method CCMS_OnAlert_mail to TEST_CCMS_OnAlert_mail
in parameters tab: Sender: my user name
Recipient: myamil address
Recipient - typeid: U
In Release tab check autore action method
MTE CLASS
1. under SAP CCMS Monitor Templates --> Dialog overview --> dialog Response Time --> Server name --> properties
then double click MTE class, and in auto-reaction method name: TEST_CCMS_OnAlert_mail
2. Goback to MTE tree, click open alerts push button
3. its show 10 alerts when I click display alerts push button show 10 alerts and status "Action_Failed"
Question: why its not mail automatically, did i miss anything or will i need to change profile ?????
please i would like to setup only this thing
thanks -
How to create temp. data base using 10g edition
i was usining oracle 10g edition and got a problem
create table #albums (
ERROR at line 1:
ora-00911:invalid character
could you please sort this problem out.
thanking you
gouravor try this:
create table "#albums" (Ah, yes.
Another one who loves to forever use double-quotes around identifiers. Very proper thing to do, especially useful in trouble shooting environments such as SQLPlus. <g>
BTW: The proper way to handle temp tables in Oracle is to learn about Global Temporary Tables. -
Hi,
We have a requirement to create a BI report based on plant maintenance report. The plant maintenance report is based on a ABAP program with complex logic. My question is i want create a Generic Datasource using Function module and can I include the logic(Abap Program) that is used for plant maintenance report in the function module? Please share your thoughts.
Thanks,
RaviHi,
Step1-Create a table structure which you need to create same as the fields you require in you data source.
Step 2-create a custom abap program and inside that call the Client abap program with the selections as required and save the result data in some table
Step 3-create infoset query.In the infoset query give your table structure name and program name which you developed.
Step4-create data source on top of that query -
Filter data using where statement : need to filter a variable if it starts
Hi,
in my loop statment , i am using a where condition.
a variable has numbers and characters , i want to filter the variable using where statement identifying if it is acharacter not to enter into the loop.
any suggestions . Thanks in advance.
regards,
RyHi ,
try like this
data:l_file_data(20) type c,
oref TYPE REF TO cx_root.
data: l_amount type p decimals 2.
l_file_data = '12A3'.
try.
l_amount = l_file_data.
catch cx_root into oref.
endtry.
if oref is not initial.
write: 'Miss Match'.
endif.
regards
Prabhu -
How to filter data by list item
hi all,
I create list item on block BLK1 ,
name :emp_name
item type: list item
elements in list : list_elements : (null) list_item : (null)
data type : Char
maximum length : 200
and create PROCEDURE :
PROCEDURE POPULATE_LIST_BY_QUERY(P_LIST_NAME VARCHAR2,P_QUERY VARCHAR2) IS
RG_NAME VARCHAR2(30) := 'RG_CODE_DESC' ;
RG_ID RecordGroup;
errcode NUMBER;
LIST_ID ITEM;
BEGIN
RG_ID := FIND_GROUP(RG_NAME);
IF NOT ID_NULL (RG_ID)
THEN DELETE_GROUP (RG_ID) ;
END IF;
RG_ID := Create_Group_From_Query (RG_NAME, P_QUERY) ;
errcode := Populate_Group (RG_ID) ;
LIST_ID := FIND_ITEM (P_LIST_NAME) ;
POPULATE_LIST (LIST_ID,RG_ID) ;
END;and wrote in trigger WHEN_NEW_FORM_INSTANCE:
POPULATE_LIST_BY_QUERY('BLK1.emp_name', 'SELECT emp_name,emp_id FROM employees');
create table employees
(emp_no number(10) primary key,
emp_name varchar2(200))
Insert into EMPLOYEES
(EMP_NO, EMP_NAME)
Values
(1, 'hhh uuo');
Insert into EMPLOYEES
(EMP_NO, EMP_NAME)
Values
(2, 'hh ppp');
Insert into EMPLOYEES
(EMP_NO, EMP_NAME)
Values
(3, 'ph');
Insert into EMPLOYEES
(EMP_NO, EMP_NAME)
Values
(4, 'uuuuu');
COMMIT;when Run my form list item give me all data, no problem ,ok
My question is that can i want to filter data when write anythnig data is found im my list or part of data,
show data only by my filter,
for example:
I wrote in my list : hh
show data in list:
hhh uuo
hh ppp
I wrote in my list : h
show data in list:
hhh uuo
hh ppp
ph
I wrote in my list : uu
show data in list:
uuuuu
if not wrote anything fetch me all data,
Thanks a lotHi,
You can try,
POPULATE_LIST_BY_QUERY('BLK1.EMP_NAME', 'SELECT EMP_NAME, EMP_ID FROM EMPLOYEES WHERE EMP_NAME LIKE ''' || <your_search_variable> || '%''');Hope this helps.
Regards,
Manu. -
Oracle Apps Custom Form, How to Filter data in the LOV
Detail Data Block I am Calling One LOV, Based on Master Block Item I want to filter data in the LOV.
in the select statement
SELECT * FROM MTL_SYSTEM_ITEMS WHERE
ORGANIZATION_ID = :BLOCK_NAME.FIELD_NAME
specified
but it is showing no data found error.Do this:
MESSAGE(:BLOCK_NAME.FIELD_NAME);
MESSAGE(:BLOCK_NAME.FIELD_NAME);
SELECT * FROM MTL_SYSTEM_ITEMS WHERE
ORGANIZATION_ID = :BLOCK_NAME.FIELD_NAME
This will tell you the value of BLOCK_NAME.FIELD_NAME
Then use PLSQL and run the query using the value of BLOCK_NAME.FIELD_NAME
and see if you get data. If you don't get data using PLSQL, then you won't get data using LOV. -
Create Filter in Hyperion Planning
I have created a Data Form using Classic Hyperion Planning Application. I want to have few cells in this data form having Read only access while others have Write access. How can I do this?
For ex: I have 10 users, some of them will have write access to some of the "Accounts" and "Period(Q1, Q2)" Dimension members while they will have read access to all the other members.
I have externalised my Essbase Server to Shared Services. I don't know how to assign filters to users using User Management Console.
Thanks in advance.HI RahulS
Wont this feature will make a particular cell read-only for all the users? My requirement is to make the Data Form Read-Only for some specific users.
Hi John,
I cant find the Assign Access option in my Accounts or Time Period dimension which were created by default.
Is there any way to enable the security for the built-in dimension?
Open Question:
While i was trying RahulS's suggestion i came across an error which i cant resolve myself. Requesting you to help me out in this regard........when i try to open the data form i come across this message "Unable to obtain a connection to Hyperion Essbase. If this problem persists, please contact your administrator".
I checked the hspsys_properties table in the database and the info are correct but when i try to query the table it says "The table or view does not exist"
When i check the Essbase log it says "Database Plan1 does not exist" though i have changed the name of the Plan1 database.
Please help....I am badly stuck.
Maybe you are looking for
-
Color not consistent for Line Chart and Legend for prev and curryr
Hi I am trying to pull last year and current year data in line chart with different color coding. I have multiple parameters selection on single chart. For some it reflects the color properly and for others it interchanges the color. Crystal xI R2..
-
Regarding edit_mask in ALV ?
hi , can anyone provide me an example where edit mask option is used.. becoz whn i use this option it is giving me a dump.. any prior conditions to be put before using this option Regards.
-
Checkbox won't stay checked by default in Bc...
Hello, I'm hoping someone has a fix to this issue. I have a "subscribe to newsletter" checkbox on a web page, and I want it to be checked by default. I know how to edit the code (I've added "checked") but Bc deletes my changes to the html every time
-
Why did my 5s stop finding my SIM card
Why is phone not seeing my SIM card intermittently
-
Script to lock and expire if it is sql sever authentication and disable login if it is windows authentication. If we have more than 100 logins to lock, how we can write a query on this. Please anyone help me on this. Thanks