How to generate data in BPS via function, not having any reference data?
<b>Hi everybody,
My approach was to use FM 'API_SEMBPS_SETDATA' but the modified values neighter appear in the layout nor were saved to the infocube after launching 'API_SEMBPS_POST'.</b>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/2e/260a8563b111d4b2ea0050dadfb23f/content.htm">Application Programming Interface (API)</a>
<b>What do I have to take into consideration?
Is there an other way to generate data in BPS?</b>
Thanks in advance,
Zeljko
Here my findings from debugging it:
In Step 1 FM reads data from planning level/layout correctly:
Line ROW COL VALUE INPUT
1 0001 0001 11 1
2 0002 0001 0 1
3 0003 0001 11 1
4 0004 0001 11 1
5 0005 0001 11 1
6 0006 0001 0 1
(Input = 1 indicates that Input is allowed in this cell)
In Step 2 FM modifies the values in all lines to 1:
Line ROW COL VALUE INPUT
1 0001 0001 1 1
2 0002 0001 1 1
3 0003 0001 1 1
4 0004 0001 1 1
5 0005 0001 1 1
6 0006 0001 1 1
Finally the modification is imported to FM 'API_SEMBPS_SETDATA'.
FUNCTION Z_IPS_BPS_GENERATE_DATA_INIT.
*"*"Local Interface:
DATA: area TYPE upc_y_area VALUE 'ZIPM0001',
plevel LIKE upc_plevel-plevel VALUE 'ZPOB0091',
package LIKE upc_package-ppackage VALUE '0-ADHOC',
layout LIKE upp_param-param VALUE 'ZPOL0002',
read_only LIKE upp_ys_flags-read_only VALUE ' '.
DATA: res LIKE sy-subrc, res_mess TYPE bapiret2 OCCURS 0.
DATA: lt_head TYPE upc_ys_api_head OCCURS 0,
lt_col TYPE upc_ys_api_col OCCURS 0,
lt_row TYPE upc_ys_api_row OCCURS 0,
lt_data TYPE upc_ys_api_data OCCURS 0,
lt_data2 TYPE upc_ys_api_data OCCURS 0,
ls_data like upc_ys_api_data.
* 1. reading data from planning level/layout
CALL FUNCTION 'API_SEMBPS_GETDATA'
EXPORTING
i_area = area
i_plevel = plevel
i_package = package
i_layout = layout
i_read_only = read_only
IMPORTING
e_subrc = res
TABLES
etk_head = lt_head
etk_row = lt_row
etk_col = lt_col
etk_data = lt_data
etk_return = res_mess.
IF sy-subrc <> 0.
RETURN.
ENDIF.
* 2. modify values in lt_data to 1
LOOP AT lt_data INTO ls_data .
ls_data-value = '1'.
APPEND ls_data TO lt_data2.
ENDLOOP.
* 3. set dummy values into planning layout/level
CALL FUNCTION 'API_SEMBPS_SETDATA'
EXPORTING
i_area = area
i_plevel = plevel
i_package = package
i_layout = layout
IMPORTING
e_subrc = res
TABLES
itk_row = lt_row
itk_data = lt_data2
etk_return = res_mess.
IF sy-subrc <> 0.
RETURN.
ENDIF.
*CALL FUNCTION 'API_SEMBPS_POST'.
ENDFUNCTION.
Hi Vlad,
I tried both alternatives:
1. Write data in buffer only, not in database
2. Write data in buffer and then writes from buffer to database
How can I check or see the data in the buffer? I tried the following: After executing the FM I opened the layout but the numbers are still the same.
Similar Messages
-
How to access reference data in BPS Exit Function
Hi Experts,
Can any please tell me how to access reference data in BPS Exit function. I am creating a copy function using ABAP Exit Function (Std copy and fox formula doesn't work for my requirement).
Please suggest,
Thanks in advance,
ShiweshHi Deepti,
Thanks a lot for your reply. xth_data contains all the data based on package filteration. Let me explain you,
Say, I have a characteristic char and whose value is 'A', I want to change it to 'B' in my copy function, while keeping the original record with 'A' as well. So now I want my xth_data to contain two records, one with A and other with 'B'. I mean to say from value is 'A' and to value is 'B'. Now my package contains 'B' (the to value) as the allowed value, but not A because in the package I am setting this using a BPS variable. There are two types of variables, one is to variables other is from variable. There could be two scenarios,
1. If I set from varibale in the package: if I do so, I will have the data in xth_data containing 'A' as char value. But in this case when I change it to 'B' and try to save both the records, package won't recognize the record with value 'B' and reject it.
2. If I set to variable in the package: In this case the xth_data itself will not contain anything and I can not loop over xth_data because there is no record with 'B'. Only record available in the system is with 'A' values.
That is why I am thinking about having reference daya somewhere. I could loop over reference data and then pass it to xth_data. Package will contain to variable so it will allow all my modifications to get saved.
Thanks and regards,
Shiwesh -
My iPhone, iPad and iPod are all associated with the same Apple ID. How can I remove the iPod and associate it with a new Apple ID without affecting the data on the other devices (note: there is no data on the iPod I want to keep)?
Very simple. Turn off Find my iDevice, then Tap Settings, General, Erase, Erase all content and settings.
-
How to generate sitemap for SiteStudio sites. Is there any component avai
How to generate sitemap for SiteStudio sites. Is there any component available?
We want to create xml having list of all site URLS for SEO purpose.
Is there any way to achieve this ?
ThanksSiteStudio comes with SiteMap fragments. Change the page template so it is a document type XML, add the fragment and you're practiacally done.
-
When i update my iphone to ios 6.1.3 I can not restore my data neither from icloud nor from my device.How can I restore again. I do not have any backups except the one on icloud.
What happens when you try to restore from icloud?
instructions here, under line "restore from icloud."
iOS: How to back up and restore your content - Support - Apple -
3 Files are in recovery modes & we are not having any backup, how to recove
3 Files are in recovery modes & we are not having any backup, how to recover.
select from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
137 ONLINE ONLINE 1.7142E+10 05-MAR-11
138 ONLINE ONLINE 1.7142E+10 05-MAR-11
139 ONLINE ONLINE 1.7142E+10 05-MAR-11
These 3 files are part of tablespace, whcih is having total 26 files
SQL> select FILE#,TS#,name from v$datafile where TS#=12;
FILE# TS# NAME
137 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_00.dbf
138 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_01.dbf
139 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_02.dbf
140 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_03.dbf
141 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_04.dbf
142 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_05.dbf
177 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_06.dbf
178 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_07.dbf
179 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_08.dbf
180 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_09.dbf
181 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_10.dbf
182 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_11.dbf
183 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_12.dbf
184 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_13.dbf
185 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_14.dbf
186 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_15.dbf
187 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_16.dbf
188 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_17.dbf
189 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_18.dbf
190 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_19.dbf
192 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_20.dbf
195 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_21.dbf
196 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_22.dbf
200 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_23.dbf
257 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_24.dbf
258 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_25.dbf
260 12 /dbo/data/IBPROD/IBPROD_TDB_IDX_26.dbf
Pls treat it urgent.Pls treat it urgent. If it's urgent , open a priority 1 service request on My Oracle Support/metalink.
If it's not so urgent, set the datafiles to OFFLINE, so you can open the database.
Without backup you only can recover if you have ALL archivelogs since creation of the files. Normally that's rarely the case.
Werner -
XMLTABLE function not returning any values if xml has attribute "xmlns"
Hi,
XMLTABLE function not returning any values if xml has attribute "xmlns". Is there way to get the values if xml has attribute as "xmlns".
create table xmltest (id number(2), xml xmltype);
insert into xmltest values(1,
'<?xml version="1.0"?>
<emps>
<emp empno="1" deptno="10" ename="John" salary="21000"/>
<emp empno="2" deptno="10" ename="Jack" salary="310000"/>
<emp empno="3" deptno="20" ename="Jill" salary="100001"/>
</emps>');
insert into xmltest values(2,
'<?xml version="1.0"?>
<emps xmlns="http://emp.com">
<emp empno="1" deptno="10" ename="John" salary="21000"/>
<emp empno="2" deptno="10" ename="Jack" salary="310000"/>
<emp empno="3" deptno="20" ename="Jill" salary="100001"/>
</emps>');
commit;
SELECT a.*
FROM xmltest,
XMLTABLE (
'for $i in /emps/emp
return $i'
PASSING xml
COLUMNS empno NUMBER (2) PATH '@empno',
deptno NUMBER (3) PATH '@deptno',
ename VARCHAR2 (10) PATH '@ename',
salary NUMBER (10) PATH '@salary') a
WHERE id = 1;
The above query returning results but below query is not returning any results because of xmlns attribute.
SELECT a.*
FROM xmltest,
XMLTABLE (
'for $i in /emps/emp
return $i'
PASSING xml
COLUMNS empno NUMBER (2) PATH '@empno',
deptno NUMBER (3) PATH '@deptno',
ename VARCHAR2 (10) PATH '@ename',
salary NUMBER (10) PATH '@salary') a
WHERE id = 1;
how to get rid out of this problem.
Thanks,
-ManiAdded below one in xmltable, its working now.
XmlNamespaces(DEFAULT 'http://emp.com') -
I purchased an apple gift card, but i am not having any success adding the money to my itunes account or apple account so i can purchase music or apps, how can i do this
If you bought an Apple gift card, then you cannot use it in the iTunes store. You can only use it in the Apple store for hardware.
You would need an iTunes gift card to buy anything in iTunes -
i lost my iphoto application how i can restore it? i am not having system restore disk. how i can get my photos back?
If the iPhoto application is no longer on your hard drive (do a search to be sure it didn't just get moved to an unexpected place), there's no way to get it back without either backups or a copy of iPhoto. Your original disks that shipped with the machine would have iPhoto. If you have lost those disks and don't have backups, you'll simply have to buy a copy of iLife. Or call Apple with your machine's serial number in-hand and request replacement disks, which they will send you for a small fee.
-
Server could not find any Meta-Data devices!
Our MDC dropped out and the backups did not engage.
On a reboot of the MDC we were able to mount the volume, but all files (QuickTme movies, FCP projct files) could not be opened with an "unknown file type error".
We shut all the clients down we checked the volume and (cvfsck -nv) and while "dirty" it did not report any errors.
Stopped the volume and ran a cvfsck -w which gave us:
"Server could not find any Meta-Data devices!"
Checking Xsan admin logs shows us:
"PioOpen: no such device.
Fatal: Cannot open stripe group "md" - Operation not supported by device
Fatal: Physio_init failed."
Where "md" is our metadata storage pool.
We shutdown all switches, RAIDS, clients, etc, but bring them all back up and checking with one MDC or another is the same result. Volume will not mount.
All fiber connections seem good, checked in RAID admin and on switch.
Ideas?AppleCare suggested that maybe a metadata backup could have helped.
http://docs.info.apple.com/article.html?artnum=303371
In any case, we nuked and paved. -
Data selection procedure 400 could not find any data
Hi ,
I am getting the Information message "Data selection procedure 400 could not find any data " while doing the Result recording of a inspection lot
Inspection lot status :- REL CALC
Inspection lot Origin :- 04 GR from production order
No user status active
This message i am getting in some inspection lot only
Kindly help me to understand the possible resaon for this message
Thanks,
Ishwarhi,
u r using any copy inspection result like of thing, if not than please provide the Mssg number. and possible than check ur plan properly.
F9 i have checked, this prblm occurs when u using the Copy inspecttion result during RR in QA32, ma suggesstion is to checck ur config "Copy inspection results" in SPRO properly against inspection type "04", and than check ur qaulity plan, than execute it will resolve.
For more information:
SPRO Settings: COPY INSPECTION RESULTS DURING RESULTS RECORDING
Regards
Edited by: D GURU on Dec 5, 2011 8:35 AM -
My daughter downloaded a bunch of apps and I need to know how to get them reversed. I have not received any email receipts, but the charges have shown up on my bank account. This has all happened within the last couple of hours. I have tried numerous times to "report a problem" but am not having any success. Keeps redirecting me to support. I need help trying to get a hold of someone. I know that there has been a settlement recently about this situation.
Apple - Support - iTunes Store - Contact Us - http://www.apple.com/emea/support/itunes/contact.html
How to request a refund for an iTunes or App Store purchase - http://www.imore.com/how-request-refund-itunes-or-app-store-purchase
iOS: Understanding Restrictions - http://support.apple.com/kb/HT4213 - "You can enable Restrictions, also known as Parental Controls, on an iPhone, iPad, or iPod touch to prevent access to specific features."
Children should not have access to your iTunes account password.
You should also consider removing credit card information from your account so no unconsidered purchases can be made by anybody. iTunes Store: Changing Account Information - http://support.apple.com/kb/HT1918 -
HT1296 How to transfer data between 2 iphones while not having the old one
How can I transfer or sync all the data from my previous iphone to the new one while not having the first(it's not working due to high voltage problem of the area),and of course not loosing anything?
Correct, you do not need your old iPhone. All you need is your old iPhone's backup. If you had an old model iPhone and wanted to replace it with a newer one, restoring it from a backup of your older one would be the process you would use.
Make sure before you start that your new iPhone is either really new or completely erased. If you did not just buy it new, do Settings > General > Reset > Erase all content and settings before restoring it from your old iPhone's backup. -
Table-Valued Function not returning any results
ALTER FUNCTION [dbo].[fGetVendorInfo]
@VendorAddr char(30),
@RemitAddr char(100),
@PmntAddr char(100)
RETURNS
@VendorInfo TABLE
vengroup char(25),
vendnum char(9),
remit char(10),
payment char(10)
AS
BEGIN
insert into @VendorInfo (vengroup,vendnum)
select ks183, ks178
from hsi.keysetdata115
where ks184 like ltrim(@VendorAddr) + '%'
update @VendorInfo
set remit = r.remit
from
@VendorInfo ven
INNER JOIN
(Select ksd.ks188 as remit, ksd.ks183 as vengroup, ksd.ks178 as vendnum
from hsi.keysetdata117 ksd
inner join @VendorInfo ven
on ven.vengroup = ksd.ks183 and ven.vendnum = ksd.ks178
where ksd.ks192 like ltrim(@RemitAddr) + '%'
and ks189 = 'R') r
on ven.vengroup = r.vengroup and ven.vendnum = r.vendnum
update @VendorInfo
set payment = p.payment
from
@VendorInfo ven
INNER JOIN
(Select ksd.ks188 as payment, ksd.ks183 as vengroup, ksd.ks178 as vendnum
from hsi.keysetdata117 ksd
inner join @VendorInfo ven
on ven.vengroup = ksd.ks183 and ven.vendnum = ksd.ks178
where ksd.ks192 like ltrim(@PmntAddr) + '%'
and ks189 = 'P') p
on ven.vengroup = p.vengroup and ven.vendnum = p.vendnum
RETURN
END
GO
Hi all,
I'm having an issue where my Table-Valued Function is not returning any results.
When I break it out into a select statement (creating a table, and replacing the passed in parameters with the actual values) it works fine, but with passing in the same exact values (copy and pasted them) it just retuns an empty table.
The odd thing is I could have SWORN this worked on Friday, but not 100% sure.
The attached code is my function.
Here is how I'm calling it:
SELECT * from dbo.fGetVendorInfo('AUDIO DIGEST', '123 SESAME ST', 'TOP OF OAK MOUNTAIN')
I tried removing the "+ '%'" and passing it in, but it doesn't work.
Like I said if I break it out and run it as T-SQL, it works just fine.
Any assistance would be appreciated.Why did you use a proprietary user function instead of a VIEW? I know the answer is that your mindset does not use sets. You want procedural code. In fact, I see you use an “f-” prefix to mimic the old FORTRAN II convention for in-line functions!
Did you know that the old Sybase UPDATE.. FROM.. syntax does not work? It gives the wrong answers! Google it.
Your data element names make no sense. What is “KSD.ks188”?? Well, it is a “payment_<something>”, “KSD.ks183” is “vendor_group” and “KSD.ks178” is “vendor_nbr” in your magical world where names mean different things from table to table!
An SQL programmer might have a VIEW with the information, something like:
CREATE VIEW Vendor_Addresses
AS
SELECT vendor_group, vendor_nbr, vendor_addr, remit_addr, pmnt_addr
FROM ..
WHERE ..;
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
How to select all the people that are not in any equipe ?
Hi,
I have a nice SQL expression that gives me as a result all the "AGENTS" (people) that are working in an EQUIPE (a team)
select a."AGENT_ID",
a."NOM" || ' ' || a."PRENOM" "Nom",
c.libelle "Equipe",
a."DATE_EMBAUCHE" "Date embauche",
a."DATE_DEBAUCHE" "Date débauche"
from OBSERVATOIRE."AGENT" a,
observatoire.equipe_agents b,
observatoire.equipe c
where a.agent_id = b.agent_id
and b.equipe_id = c.equipe_id
order by nom
Now, how to select all the agents that are NOT working in any "EQUIPE" (team) ?
I have tried but could not succeed !
Thank you for your kind help.
ChristianChristian from France wrote:
It is not working because the table EQUIPE_AGENTS does not contains a row if the agent is not into any equipe.
CREATE TABLE "OBSERVATOIRE"."EQUIPE_AGENTS"
( "EQUIPE_AGENTS_ID" NUMBER NOT NULL ENABLE,
"EQUIPE_ID" NUMBER NOT NULL ENABLE,
"AGENT_ID" NUMBER NOT NULL ENABLE)
CREATE TABLE "OBSERVATOIRE"."AGENT"
( "AGENT_ID" NUMBER NOT NULL ENABLE,
"GRADES_ID" NUMBER NOT NULL ENABLE,
"NOM" VARCHAR2(50 BYTE) NOT NULL ENABLE,
"PRENOM" VARCHAR2(50 BYTE),
"DATE_EMBAUCHE" DATE NOT NULL ENABLE,
"DATE_DEBAUCHE" DATE)
The only way to "know" if an agent is not into any equipe (team) is to search into the EQUIPE_AGENTS table, and if we do not find the ID of the agent into this table, then we know that this agent is not into any EQUIPE (team).
I don't know ho to translate this into SQL.And that's what my query does. It uses an OUTER JOIN so that a result record is returned whether or not there is a record in EQUIPE_AGENTS. And the check for EQUIPE_ID is NULL restricts the result set to those where there IS NOT a record in EQUIPE_AGENTS.
A more traditional way would be to use NOT IN or NOT EXISTS clauses, but they can prove inefficient.
Maybe you are looking for
-
Need help with login to RG54G2
Hi, I got this router and tried to use it as access point. I went into the configuration page and change the IP address to 192.168.1.253 and enabled the access point. It restarted itself. After that I was not able to login agian. I tried the Ip 192.1
-
I am having trouble getting one of my treo users syncd up. I have 3 other users using syncml with a problem but for whatever reason this particular user get the error message: sync mode not suppported All the settings are exactly the same on all the
-
Started with Lightroom 5.4 and loved it. Upgraded to 5.5 because I kept getting messages to do so to fix bugs etc. Now it crashes all the time. Very difficult to export from program. After several pictures are exported I suddenly get the blue dump sc
-
EBS with two accounts and two seperate routing
I have 2 different Accounts with same bank with two different routing. How do I config the EBS in terms of masking and posting rules? Do I need to config two separate transactions Type? Thanks,
-
For my proje i want to remove a unwanted paragraph in a text file. For example my text file may have acknowledgment in between sum useful data so i want to remove the acknowledgment paragraph fully...can anyone tel how to do tat?? Am taking Text file