Procedure to generate new numbers using BRFplus
Hi Experts,
I need your suggestions regarding my proposed solution to a requirement.
The requirement is as following..I have to read the current number from a number range and by following certain rules generate new number..For e,g, if current number is 141 then next numbers would be 142,143....149.After 149 instead of 150 , the number should be 14A,14B....14Z and then 150.Also , we are not supposed to use alphabets like Q , O ,I (for e.g.14Q , 14O , 14I are prohibited)
Now my proposal is to use a procedure call expression and then call a static method which incorporates the logic. Is this ok?
I checked the other expressions but couldn't find one which supports offset and replace operations. Could you guys please provide your valuable suggestions. Can I achieve this using any other expression?
Regards,
Raghu.
It depends on the release and SP-level .
You cannot do it with NW 701 but NW 702 should be fine. Any formula functions for stirng operations you need that is not (yet) available in the standard can easily be added. However, from a recent customer visit I took some homework back to Germany. The homework consists of a list of about 10 new formula functions for string operations such as replace, find, count occurencies, ... that we will add to the BRFplus standard with a note.
BR,
Carsten
Similar Messages
-
How to generate Serial numbers using JAVA SCRIPT
how to generate serial numbers(incrementing by 1) using JAVA SCRIPT
thanking you,
pola pradeepi am afraid that whether ur looking for this. bcoz its a simple for loop
<script language="JavaScript">
//count = limit value for u
for(i=0;i<count;++i){
alert(i);
</script>
or if ur looking for something else, pls mention ur requrment precisely
aleena -
How to send sap generated invoice numbers using rffoedi1 program
Hi all
we are generating PEXR2002 IDocs using RFFOEDI1 program . The program is populating the invoice number field in IDoc with the value from reference number field in MIRO screen. Is there any way that we can populate the SAP generated invoice number also in the IDoc.Hi Steve,
Have you tried the user-exits or BADi available.
Regards,
Atish -
Procedure to create new table using existing metadata
Hi All,
THis is what I want to achieve,
I want to create procedure which will take a input parameter as name of a table lets say 'EMP',
and this procedure will check whether that table exist or not?
if exist then
it will create a new table with name appending _dummy to existing table name (ex: new table will be EMP_DUMMY) ,
and new table should have the same table structure ,index and constraint imposed on EMP table.
NB: It should not be created using as select like create table EMP_DUMMY as select * from EMP where condition=false;
Can any one please help me how to achieve this?Hi,
you can use the DBMS_METADATA package
declare
cddl clob;
ctable varchar2(80):='EMP';
cowner varchar2(80):='HR';
begin
cddl:=dbms_metadata.get_ddl ('TABLE',ctable,cowner);
cddl:=replace(cddl, 'CREATE TABLE "'||cowner||'"."'||ctable||'"','CREATE TABLE "'||cowner||'"."'||ctable||'_DUMMY"');
dbms_output.put_line(substr(cddl,1,1200));
execute immediate dbms_lob.substr(cddl,least(dbms_lob.getlength(cddl),32000));
cddl:=dbms_metadata.get_dependent_ddl ('INDEX',ctable,cowner);
cddl:=replace(cddl,'ON "'||cowner||'"."'||ctable,'ON "'||cowner||'"."'||ctable||'_DUMMY');
execute immediate dbms_lob.substr(cddl,least(dbms_lob.getlength(cddl),32000));
end;but you'll need to adapt (ex: existing contraint name etc) -
Procedure to generate time demensions using System date
Hi Experts,
I have created a Table having time dimensions such as Year start date , Month Start Date , Week start date etc. Now i need to write a stored Procedure to Populate all the above time dimensions of this Table based upon Calendar day for last 5 years and also 15 years going forward.
Can you please guide on writing the Procedure for this.
ThanksHi John,
Thanks.
Actually we need to implement the same in HANA.
The Table M_TIME_DIMENSION is not helping much as i need to do various time based calculations for YTD, MTD etc. that's why i thought to create some Time Dimension Table as stated in below blog by Ravindra.
Implementation of WTD, MTD, YTD in HANA using Input Parameters Derived from Table
For this i need to write Procedure to populate this table with all the required time dimensions.
Please suggest.
Thanks -
How to generate random numbers in a range using random class?
I know how to use Math.random for this, but how would I generate random numbers using the random class?
Say I want a number between 40 and 50, inclusive--how would I do this?
What i have in mind is:
int randomNumber = random.nextInt(max) + min;
where max is 50 and min is 40. Is this correct?Fredddir_Java wrote:
I know how to use Math.random for this, but how would I generate random numbers using the random class?
Say I want a number between 40 and 50, inclusive--how would I do this?
What i have in mind is:
int randomNumber = random.nextInt(max) + min;
where max is 50 and min is 40. Is this correct?What happened when you generated a couple hundred numbers that way? Did you get all the ints in the range you wanted? -
Hello,
I know that XSLT basically deals with transformations. However I am curious to know whether it is possible to generate new xml files from an existing xml document.
I mean you can change the way xml file is displayed using xslt but can u generate new files using that?I know that XSLT basically deals with transformations. However I am curious to know whether it is possible to >generate new xml files from an existing xml document. Yes... You can transform xml to xml using XSLT.
I mean you can change the way xml file is displayed using xslt but can u generate new files using that? In most cases XSLT will create new files, e.g. XML + XSL => HTML, The output can also be a stream or a DOM/JDOM Object. -
Configure Universal Adapter 2 generate New BAW Tables or use Existings OBAW
Hi Experts,
i have a doubt on if New OBAW tables have to be created as we add new subject areas from Universal Adapter Containers
or can use existing OBAW tables that are generated from Other containers.
For Example:
Our Existing contianer is PeopleSoft 9.0 and OBAW Tables are created usign Peoplesoft Container.
of all the subject areas from Peoplesoft Containers, Only Workforce Profile and HR Payroll is used.
as the container is created using Peoplesoft 9.0, all the Tables (532 tABLES) are created for all the subject areas.
now, we are planning to use Universal Adapters to configure rest of the subject areas like Absence Managementr and Recruitment because they are maintained by Third Party Vendors which have no relation with Peoplesoft.
my doubt is,
1. if i can use the same Existing OBAW Tables for Universal Adapters or create NEW OBAW tables using Universal Adapter container.
2. if ii have to create New tables using Universal Adapter containers, all the table belonging to other Universal Adapters Subject areas like Loyalty Analytics, call center analytics are also created by default. how to avaoid this. i tried to create OBAW by creating a container with Only HR-Absence Management subject area and Recruitment subject area, unfortunatley, all the tables are again created.
3. it looks like there are common dimension files used for this Universal Subject areas, is it Mandory to use them to Populate HR-Absence Managment subject area.
Please HELP
Is there is a good refernce guides on how to configure all this espically with Universal adapters in Out side world or in Metalink
Thanks
KumarPlease take a look at this article which states SYSDATE is not supported in a
where clause.
http://www.oracle.com/technology/pub/articles/bpel_cookbook/qualcomm-bpel.html
Excerpt from the article:
Here are three important things you should do in implementing the above design:
Have the status of the record being processed stored in the database. The status includes the process state, next process attempt time, and processing attempt count.
Create an updatable view that exposes only records that are ready to be processed. A view is needed because the database adapter cannot handle a where clause that compares against SYSDATE.
Design logic that determines if a process instance that has faulted should be retried and when the retry should occur. This information will be updated in the database by use of a stored procedure. This can also be done with an update partner link and additional logic in BPEL.
mahalo,
a iii -
Hello,
I move channels on ListTab in the DataPortal and then Generates New Channel Numbers (with rightclick menu).
How do I get the new channel order on the StructureTab in the DataPortal?
I'm by the way using DIAdem 10...The channel numbers in the structure view have nothing to do with
the chanel numbers in the list view.
The purpose of the list view is to communicate a flat list with
information where the channels are stored.
The purpose of the structure view is to show the hierarchy
root -> groups -> channels
The position within a group is independent from the storage
position of the channel.
On the other hand, channels can be moved in the structure view,
even from one group to another group, without affecting the
order in the list view. -
How to generate DBMS_RANDOM Timestamp using procedure
Hi,
I got a copy from askTom site for the store procedure of creating random numbers in a table:
create or replace procedure clone( p_tname in
varchar2, p_records in number )
authid current_user
as
l_insert long;
l_rows number default 0;
begin
execute immediate 'create table clone_' || p_tname ||
' as select * from ' || p_tname ||
' where 1=0';
l_insert := 'insert into clone_' || p_tname ||
' select ';
for x in ( select data_type, data_length,
rpad( '9',data_precision,'9')/power(10,data_scale) maxval
from user_tab_columns
where table_name = 'CLONE_' || upper(p_tname)
order by column_id )
loop
if ( x.data_type in ('NUMBER', 'FLOAT' ))
then
l_insert := l_insert || 'dbms_random.value(1,' || x.maxval ||
elsif ( x.data_type = 'DATE' )
then
l_insert := l_insert ||
'sysdate+dbms_random.value+dbms_random.value(1,1000),';
else
l_insert := l_insert || 'dbms_random.string(''A'',' ||
x.data_length || '),';
end if;
end loop;
l_insert := rtrim(l_insert,',') ||
' from all_objects where rownum <= :n';
loop
execute immediate l_insert using p_records - l_rows;
l_rows := l_rows + sql%rowcount;
exit when ( l_rows >= p_records );
end loop;
end;
Can somebody tell me how to generate a random TIMESTAMP?
I try to change "sysdate" to systimestamp" and it give me an error:
ERROR at line 1:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0
Please help!!
Message was edited by:
eecow
Message was edited by:
eecow
nullCan you give me an example of doing this?
The other question is:
Can the store procedure code (above) check other things other than data type?
For example:
if attributeName = 'percentage' --> create a random number from 0 to 100
The reason is because I am trying to generate some more "realistic" data. Some fields can be unrelistic, but fields like "percentage" should be within 0-100 and should not have something like 200 :)
Please advise.
Thanks! -
Post Author: tadj188#
CA Forum: Formula
Needed: Sum of LineCount Including Groups and Detail Data On Each Page Used To Generate New Page If TotalPageLineCount > 28
Background:
1) Report SQL is created with unions to have detail lines continue on a page, until it reaches page footer or report footer, rather than using subreports. A subreport report is now essentially a group1a, group1b, etc. (containing column headers and other data within the the report with their respective detail lines). I had multiple subreports and each subreport became one union.
Created and tested, already:
1) I have calculated @TotalLineForEachOfTheSameGroup, now I need to sum of the individual same group totals to get the total line count on a page.
Issue:
1) I need this to create break on a certain line before, it dribbles in to a pre-printed area.
Other Ideas Appreciated:
1) Groups/detail lines break inconveniently(dribble) into the pre-printed area, looking for alternatives for above situation.
Thank you.
Tadjexport all image of each page try like this
var myDoc = app.activeDocument;
var myFolder = myDoc.filePath;
var myImage = myDoc.allGraphics;
for (var i=0; myImage.length>i; i++){
app.select(myImage[i]);
var MyImageNmae = myImage[i].itemLink.name;
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high;
app.jpegExportPreferences.exportResolution = 300;
app.selection[0].exportFile(ExportFormat.JPG, File(myFolder+"/"+MyImageNmae+".JPEG"), false);
alert(myImage[i].itemLink.name) -
Error while generating DDL commands using startSQLRepository for a new Repository
Hi,
I am trying to generate DDL Commands using startSQLRepository for my new repository SubashRepository so that I can use them to create new table structure.
All the repository related changes looks good. i can see my repository in ACC
When I run the command:
startSQLRepository -m SupremeATG –repository /com/supreme/SubashRepository /com/supreme/subashRepository.xml -outputSQLFile C:/ATG/ATG9.3/SupremeATG/config/com/supreme/subashRepositoryDDL.txt
I get following error:
Table 'SUBASH_MEMBER' in item-descriptor: 'member' does not exist in a table space accessible by the data source. DatabaseMetaData.getColumns returns no columns
Note:
* errors related to definition file were cleared as the same command threw relevant exception while trying to store a array property with out creating a multi table.
* Now this is the only exception i see
* Some DDL are getting generated in the output file, but those are related to inventory repository (I am not sure why this is happening as I have specifically gave the path to my definition file).
Any help in resolving this is highly appreciated.Pl post in the ATG forum
-
In the old Numbers I could change the colour of a checkbox using rules - I cannot seem to do this in new Numbers 2013?
I have an old Numbers sheet where I could make the checkbox Cell go Green when ticking "Equal to" TRUE. When I open the old sheet it into new iWork it functions correctly. But I am unable to copy or paste the rule - nor recreate it.
Any suggestions on how to create a Conditional checkbox cell that goes green once ticked would be most apprecicated.
Thanks - SteveNumbers 3.0 is missing the logic-based "equal to TRUE" or "equal to FALSE" conditions for conditional formatting. The replacement is text based: "text is TRUE" or "text is FALSE". You can apply these rules to cells formatted as checkboxes.
-
How to generate new perner number using Abap Code in pa0002. what is the fu
how to generate new perner number using Abap Code in pa0002. what is the function Module used.
hi
define internal number ranges for ur implementation then when u run PA 40 do not input any employee number , system will generate the employee number automatically.
Regards
sameer -
How to Generate a new PERNR using HR_MAINTAIN_MASTERDATA in WD?
Hi Experts;
Can I get some sample code for creating a new PERNR using HR_MAINTAIN_MASTERDATA FM. ???!!!
I've created a some input fields in webdynpro using infotype PA0002 and depending upon those fields I want to generate a PERNR number .
Plz help me with some sample code ..
Thanks in Adv.
Buntywhat am I missing in the below code ??? is the code correct ??? Using the below code how will I get the new PERNR value ??
method ONACTIONSAVE .
DATA lo_nd_final_node TYPE REF TO if_wd_context_node.
DATA lo_el_final_node TYPE REF TO if_wd_context_element.
DATA ls_final_node TYPE wd_this->element_final_node.
DATA lv_inits LIKE ls_final_node-inits.
DATA lv_nachn LIKE ls_final_node-nachn.
DATA lv_vorna LIKE ls_final_node-vorna.
DATA lv_titel LIKE ls_final_node-titel.
DATA lv_gesch LIKE ls_final_node-gesch.
DATA lv_natio LIKE ls_final_node-natio.
DATA lv_famst LIKE ls_final_node-famst.
DATA lv_gbpas LIKE ls_final_node-gbpas.
DATA lv_stras LIKE ls_final_node-stras.
DATA lv_ort01 LIKE ls_final_node-ort01.
DATA lv_pstlz LIKE ls_final_node-pstlz.
DATA lv_telnr LIKE ls_final_node-telnr.
DATA lv_locat LIKE ls_final_node-locat.
DATA lv_usrid LIKE ls_final_node-usrid.
* navigate from <CONTEXT> to <FINAL_NODE> via lead selection
lo_nd_final_node = wd_context->get_child_node( name = wd_this->wdctx_final_node ).
* get element via lead selection
lo_el_final_node = lo_nd_final_node->get_element( ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `INITS`
IMPORTING
value = lv_inits ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `NACHN`
IMPORTING
value = lv_nachn ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `VORNA`
IMPORTING
value = lv_vorna ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `TITEL`
IMPORTING
value = lv_titel ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `GESCH`
IMPORTING
value = lv_gesch ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `NATIO`
IMPORTING
value = lv_natio ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `FAMST`
IMPORTING
value = lv_famst ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `GBPAS`
IMPORTING
value = lv_gbpas ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `STRAS`
IMPORTING
value = lv_stras ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `ORT01`
IMPORTING
value = lv_ort01 ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `PSTLZ`
IMPORTING
value = lv_pstlz ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `LAND1`
IMPORTING
value = lv_land1 ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `LOCAT`
IMPORTING
value = lv_locat ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `TELNR`
IMPORTING
value = lv_telnr ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `USRID`
IMPORTING
value = lv_usrid ).
DATA lv_new_pernr LIKE ls_final_node-new_pernr.
* get single attribute
lo_el_final_node->SET_attribute(
EXPORTING
name = `NEW_PERNR`
IMPORTING
value = lv_new_pernr ).
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
* EXPORTING
* PERNR = '00000000'
* MASSN =
* ACTIO = 'INS'
* TCLAS = 'A'
* BEGDA = SY-DATUM
* ENDDA = '99991231'
* OBJPS =
* SEQNR =
* SPRPS =
* SUBTY =
* WERKS =
* PERSG =
* PERSK =
* PLANS =
* DIALOG_MODE = '0'
* LUW_MODE = '1'
* NO_EXISTENCE_CHECK = ' '
* NO_ENQUEUE = ' '
* IMPORTING
* RETURN =
* RETURN1 =
* HR_RETURN =
TABLES
proposed_values =
* MODIFIED_KEYS =
endmethod.
Maybe you are looking for
-
Having error while running coherence.sh
I'm running wls 10.3.5 with coherence 3.6 on linux SUSE. According to the Coherence Developer guide, it stated that after updating the cache-server.sh with the following settings, apply the same settings in coherence.sh. set java_opts="-Xms%memory% -
-
Problem in transporting WPC Content
Hi, I am facing problem in transporting WPC Content from server1 to server2. After transport the webpages are not displaying the contents. Webpages are showing empty layouts. I have done the layout configurations. Webpages are cotaining iViews and
-
How can I find out WHEN a specific iPhone was reported stolen?
I bought a storage unit at auction. There was a brand new iphone 4S, among other items, in the locker. Many had receipts with the owner's name so I know it wasn't a storage unit full of stolen merchandise. I ran a check of the iphone through a web
-
Check printing r12 print stub @ last page
Hi I designed r12 check print rtf to accommodate 12 invoice lines per page and a check stub @ bottom... When I have 28 lines it goes upto 3 pages..and 4th page shows voided stub... But in each page(page 1&2&3) I am getting the stub printed out..print
-
I'm still getting all these annoying popups windows, although I followed every solution suggested(safari extensions,block the pop ups) it's really disturbing please help