RESULT_TABLE
hi,
i have aproblem i have filled the result table in routine but even then i am getting a single record could u pls rectify this problem
code:
$$ begin of global - insert your declaration only below this line -
TABLES:
DATA:begin of itab occurs 0,
posnr(6) type c.
data:end of itab.
itab-posnr = 'computer'.
append itab.
itab-posnr = 'joystick'.
append itab.
itab-posnr = 'keyboard'.
append itab.
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
RESULT_TABLE STRUCTURE /BIC/VZREC_CUT
USING COMM_STRUCTURE LIKE /BIC/CSPANSLEI
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
ICUBE_VALUES LIKE /BIC/VZREC_CUT
CHANGING RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
RESULT_TABLE = ICUBE_VALUES.
if COMM_STRUCTURE-/BIC/ZSLESID7 = '7000'.
loop at itab .
RESULT_TABLE-/BIC/ZPOSNR = itab-posnr.
RESULT_TABLE-/BIC/ZNETWR1 = 2000.
append RESULT_TABLE.
endloop.
endif.
hi,
yes i have written this code in updata routine.
i have
salesid posnr matnr netwr as my fields.
for each value of sales id i have many <b>posnr</b> such as computer, keyboard ,joystick in my internal table as shown above and netwr but only one recored in flat file
so i have to make many record out of one record using retun table
can u give me code. pls
Similar Messages
-
Start Routine (ABAP) in Transformations
Hi Experts,
As i am new to BW please update me with the required ABAP Code or atlease with the skeleton Code
Source & target fields
Emp_ID ZEMP_ID (CHAR)
Start Date: ZESTA_DT (DATS)
End Date : ZEEND_DT (DATS)
My requirment is to write a start routine that split the record in to 2
Emp_ID-Start_Date-Termination Date
0001----01/01/2005---01/01/2008
0002----01/01/2007---
(Termination date will be blank if emp is still working)
As per my requirment i would like to see data in DSO as
Emp_ID-Start_Date-Termination Date
0001----01/01/2005---
0001----01/01/2005---01/01/2008
0002----01/01/2007---
I want to split the records of an employee
Please let me know if u need any information
ThanksHi bw learner,
In Update rules, at any keyfigure, you write a routine with return table check box selected.
Write the below code.
first of all you need to declare a internal table of type data target
(Example: DATA: ITAB LIKE /BIC/FZ_CUBE). here i consider Z_CUBE as data target.
then loop the DATA_PACKAGE.
loop at DATA_PACKAGE.
transfer corresponding values from DATA_PACKAGE to itab.
then assign itab-Termination Date = ZEEND_DT.
append ITAB to RESULT_TABLE.=
endloop.
By this, whatever the records that are present in the RESULT_TABLE will be added into the Data target.
I hope you can handle now.
Regards,
S P. -
Update Routine with Return table
Hello All:
I'm trying to populate the cube by splitting 1 record into many records.
I have following ABAP code in the routine which is failing at the LOOP keyword
$$ begin of routine - insert your code only below this line -
fill the internal table "MONITOR", to make monitor entries
CLEAR RESULT_TABLE.
REFRESH RESULT_TABLE.
MOVE-CORRESPONDING ICUBE_VALUES TO RESULT_TABLE.
DATA: l_s_forecast like /BIC/TZFCST_TYP OCCURS 40 WITH HEADER LINE.
LOOP AT l_s_forecast.
Forecast Type = Consensus Forecast Adj
IF l_s_forecast-/BIC/ZFCST_TYP = 'CFA'.
IF COMM_STRUCTURE-/BIC/ZACNFCST > 0.
RESULT_TABLE-/BIC/ZFCST_TYP = l_s_forecast-/BIC/ZFCST_TYP.
RESULT_TABLE-QUANTITY = COMM_STRUCTURE-/BIC/ZACNFCST.
APPEND RESULT_TABLE.
ENDIF.
ENDIF.
Forecast Type = Final Forecast Adj
IF l_s_forecast-/BIC/ZFCST_TYP = 'FFA'.
IF COMM_STRUCTURE-/BIC/ZAFNFCST > 0.
RESULT_TABLE-/BIC/ZFCST_TYP = l_s_forecast-/BIC/ZFCST_TYP.
RESULT_TABLE-QUANTITY = COMM_STRUCTURE-/BIC/ZAFNFCST.
APPEND RESULT_TABLE.
ENDIF.
ENDIF.
ENDLOOP
RETURNCODE = 0.
ABORT = 0.
The code inside the loop is not getting executed, when i debugged the routine
Could anybody tell what's missing in the code
Appreciate your efforts
Regards
VijayHello:
I have this code in the start routine to populate the internal table T_FCST.
Loop is going into endless loop.
Any ideas why ?
here is the code******
LOOP at DATA_PACKAGE into s_datapack.
SELECT * FROM /BIC/TZFCST_TYP INTO TABLE T_FCST.
APPEND T_FCST.
ENDLOOP.
Regards
Vijay -
Error in Routine while migrating standard Transformations from 3.5 to BI7.0
Hi Experts,
We are migrating the Standard trasformations, from old version to new BI 7.0 version. when trying to create the new transformation we are getting a routine error, and unable activate the transformation.
Trasformation Name: TRCS ZCO_OM_NAE_1 -> CUBE 0PS_C08
Routine Desc.: Conversion of Actual / Commitment / Plan to Resid.Order Plan
Source Fields: 0CURRENCY & 0FISCPER
Target Fields: 0AMOUNT & 0CURRENCY
Error Message: E:Field "COMM_STRUCTURE" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement.
Routine:
PROGRAM trans_routine.
CLASS routine DEFINITION
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
Available information: Refer to methods of
interface 'if_rsbk_request_admintab_view'
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
Rule specific types
$$ begin of global - insert your declaration only below this line -
... "insert your code here
$$ end of global - insert your declaration only before this line -
ENDCLASS. "routine DEFINITION
$$ begin of 2nd part global - insert your code only below this line *
$$ end of rule type
TYPES:
BEGIN OF tys_TG_1_full,
InfoObject: 0CHNGID Change Run ID.
CHNGID TYPE /BI0/OICHNGID,
InfoObject: 0RECORDTP Record type.
RECORDTP TYPE /BI0/OIRECORDTP,
InfoObject: 0REQUID Request ID.
REQUID TYPE /BI0/OIREQUID,
InfoObject: 0FISCVARNT Fiscal year variant.
FISCVARNT TYPE /BI0/OIFISCVARNT,
InfoObject: 0FISCYEAR Fiscal year.
FISCYEAR TYPE /BI0/OIFISCYEAR,
InfoObject: 0CURRENCY Currency key.
CURRENCY TYPE /BI0/OICURRENCY,
InfoObject: 0CO_AREA Controlling area.
CO_AREA TYPE /BI0/OICO_AREA,
InfoObject: 0CURTYPE Currency Type.
CURTYPE TYPE /BI0/OICURTYPE,
InfoObject: 0METYPE Key Figure Type.
METYPE TYPE /BI0/OIMETYPE,
InfoObject: 0VALUATION Valuation View.
VALUATION TYPE /BI0/OIVALUATION,
InfoObject: 0VERSION Version.
VERSION TYPE /BI0/OIVERSION,
InfoObject: 0VTYPE Value Type for Reporting.
VTYPE TYPE /BI0/OIVTYPE,
InfoObject: 0WBS_ELEMT Work Breakdown Structure Element (WBS Elem
*ent).
WBS_ELEMT TYPE /BI0/OIWBS_ELEMT,
InfoObject: 0COORDER Order Number.
COORDER TYPE /BI0/OICOORDER,
InfoObject: 0PROJECT Project Definition.
PROJECT TYPE /BI0/OIPROJECT,
InfoObject: 0ACTIVITY Network Activity.
ACTIVITY TYPE /BI0/OIACTIVITY,
InfoObject: 0NETWORK Network.
NETWORK TYPE /BI0/OINETWORK,
InfoObject: 0PROFIT_CTR Profit Center.
PROFIT_CTR TYPE /BI0/OIPROFIT_CTR,
InfoObject: 0COMP_CODE Company code.
COMP_CODE TYPE /BI0/OICOMP_CODE,
InfoObject: 0BUS_AREA Business area.
BUS_AREA TYPE /BI0/OIBUS_AREA,
InfoObject: 0ACTY_ELEMT Network Activity Element.
ACTY_ELEMT TYPE /BI0/OIACTY_ELEMT,
InfoObject: 0STATUSSYS0 System Status.
STATUSSYS0 TYPE /BI0/OISTATUSSYS0,
InfoObject: 0PS_OBJ PS Object Type.
PS_OBJ TYPE /BI0/OIPS_OBJ,
InfoObject: 0VTSTAT Statistics indicator for value type.
VTSTAT TYPE /BI0/OIVTSTAT,
InfoObject: 0AMOUNT Amount.
AMOUNT TYPE /BI0/OIAMOUNT,
Field: RECORD Data record number.
RECORD TYPE RSARECORD,
END OF tys_TG_1_full.
Additional declaration for update rule interface
DATA:
MONITOR type standard table of rsmonitor WITH HEADER LINE,
MONITOR_RECNO type standard table of rsmonitors WITH HEADER LINE,
RECORD_NO LIKE SY-TABIX,
RECORD_ALL LIKE SY-TABIX,
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS.
global definitions from update rules
TABLES: ...
DATA: ...
FORM routine_0001
CHANGING
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
init variables
not supported
icube_values = g.
CLEAR result_table. REFRESH result_table.
type-pools: PSBW1.
data: l_psbw1_type_s_int1 type psbw1_type_s_int1.
data: lt_spread_values type PSBW1_TYPE_T_ACT_SPREAD.
field-symbols: .
füllen Rückgabetabelle !
move-corresponding to RESULT_TABLE.
check not RESULT_TABLE-amount is initial.
append RESULT_TABLE.
endloop.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
ENDFORM. "routine_0001
$$ end of 2nd part global - insert your code only before this line *
CLASS routine IMPLEMENTATION
CLASS lcl_transform IMPLEMENTATION.
*$*$ begin of routine - insert your code only below this line *-*
Data:
l_subrc type sy-tabix,
l_abort type sy-tabix,
ls_monitor TYPE rsmonitor,
ls_monitor_recno TYPE rsmonitors.
REFRESH:
MONITOR.
Runtime attributs
SOURCE_SYSTEM = p_r_request->get_logsys( ).
Migrated update rule call
Perform routine_0001
CHANGING
l_subrc
l_abort.
*-- Convert Messages in Transformation format
LOOP AT MONITOR INTO ls_monitor.
move-CORRESPONDING ls_monitor to MONITOR_REC.
append monitor_rec to MONITOR.
ENDLOOP.
IF l_subrc <> 0.
RAISE EXCEPTION TYPE cx_rsrout_skip_val.
ENDIF.
IF l_abort <> 0.
RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
ENDIF.
$$ end of routine - insert your code only before this line -
ENDMETHOD. "compute_0AMOUNT
Method invert_0AMOUNT
This subroutine needs to be implemented only for direct access
(for better performance) and for the Report/Report Interface
(drill through).
The inverse routine should transform a projection and
a selection for the target to a projection and a selection
for the source, respectively.
If the implementation remains empty all fields are filled and
all values are selected.
METHOD invert_0AMOUNT.
$$ begin of inverse routine - insert your code only below this line-
... "insert your code here
$$ end of inverse routine - insert your code only before this line -
ENDMETHOD. "invert_0AMOUNT
ENDCLASS. "routine IMPLEMENTATION
Regards
Krishanu.Hi,
Go through the belowl link it may help you a lot
/message/7377688#7377688 [original link is broken]
Regards,
Marasa. -
Problem with return table(adding extra record)
Hi,gurus,
I am facing a probelm with return table, i.e it is adding body record and workarea record also to the data target. so, it is adding the actual record to data target including the workarea record to with the key figure and year values as zeros and spaces. It's quite strange.
Please help me out, thanks a lot.Hi,
I have an ODS with the keys fields(ZPS_TXMID,ZPS_NODE,ZPS_NODE) and data fields(ZAU_C108,ZAU_C109,0PROJECT). I have to split one record from datasource to 6 records into my ODS. I'm updating ZAU_C109 with a routine with return table. Here is the code, please check it for me:
<i> data: prj like /BIC/PZPS_TXMID-PROJECT.
data: ls_icube_value like ICUBE_VALUES.
clear ls_icube_value.
select single PROJECT into prj from /BIC/PZPS_TXMID
where /BIC/ZPS_TXMID = COMM_STRUCTURE-/BIC/ZPS_TXMID.
ls_icube_value-/BIC/ZPS_TXMID = COMM_STRUCTURE-/BIC/ZPS_TXMID.
ls_icube_value-/BIC/ZAU_C108 = COMM_STRUCTURE-/BIC/ZAU_C108.
ls_icube_value-/BIC/ZPS_NODE = '1'.
ls_icube_value-/BIC/ZPS_SNODE = '0'.
ls_icube_value-PROJECT = prj.
ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_HJHSJ.
APPEND ls_icube_value TO RESULT_TABLE.
ls_icube_value-/BIC/ZPS_NODE = '1'.
ls_icube_value-/BIC/ZPS_SNODE = '1'.
ls_icube_value-PROJECT = prj.
ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_HPSJ.
APPEND ls_icube_value TO RESULT_TABLE.
ls_icube_value-/BIC/ZPS_NODE = '1'.
ls_icube_value-/BIC/ZPS_SNODE = '2'.
ls_icube_value-PROJECT = prj.
ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZAU_C101.
APPEND ls_icube_value TO RESULT_TABLE.
ls_icube_value-/BIC/ZPS_NODE = '2'.
ls_icube_value-/BIC/ZPS_SNODE = '0'.
ls_icube_value-PROJECT = prj.
ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_TJHSJ.
APPEND ls_icube_value TO RESULT_TABLE.
ls_icube_value-/BIC/ZPS_NODE = '2'.
ls_icube_value-/BIC/ZPS_SNODE = '1'.
ls_icube_value-PROJECT = prj.
ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_TDSJ.
APPEND ls_icube_value TO RESULT_TABLE.
ls_icube_value-/BIC/ZPS_NODE = '2'.
ls_icube_value-/BIC/ZPS_SNODE = '2'.
ls_icube_value-PROJECT = prj.
ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZAU_C102.
APPEND ls_icube_value TO RESULT_TABLE.
ABORT = 0.</i>
After loading, I checked the contents of ODS, there are 6 records(0project, ZAU_C108 are blank, other fields are correct) + 1 more record(ZPS_TXMID,0project, ZAU_C108 are correct, other fields are blank), what I expect is only 6 records with all fields being filled properly, no blanks, no extra records. Is it strange? or am I doing sth. wrong?
Your help is appreciated. -
We have problems in abap rules when migrate the infosource
We are having problems to do the migration of some objects of version
3.x to version 7.
There are some objects standard like Update Rule, InfoSource and
Datasource that when we migrated the rules ABAPS contained in the
Update Rule and Infosource are not migrate properly.
We are using the method of automatic migration that when clicking the
right button on the object, choosing the option additional functions,
create transformation and input the name of the new infosource. The
same way is necessary to migrate the transfer structure. After this we
migrated the Datasource and we tried to activate all objects, but
several erros happened in the abap rules.
Example: In the new Transformation based n Upadate Rule 0PS_C08 in the
key figure 0AMOUNT, the routine show me the follow error:
E:Field "COMM_STRUCTURE" is unknown. It is neither in one of the
specified tables nor defined by a "DATA" statement. "DATA" statement
"DATA" statement.
This is one example, but this conversion happened for several
transformations with abap rules.
Which is the recommendation for the standard objects in this case and
the others cases ? For objects Z* there some recommendation too?
Old Routine in Upadte Rule:
"PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
FORM compute_data_field
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
RESULT_TABLE STRUCTURE /BI0/V0PS_C08T
USING COMM_STRUCTURE LIKE /BIC/CS0CO_OM_NAE_1
RECORD_NO LIKE SY-TABIX
RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
ICUBE_VALUES LIKE /BI0/V0PS_C08T
CHANGING RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line -
type-pools: PSBW1.
data: l_psbw1_type_s_int1 type psbw1_type_s_int1.
data: lt_spread_values type PSBW1_TYPE_T_ACT_SPREAD.
field-symbols: .
füllen Rückgabetabelle !
move-corresponding to RESULT_TABLE.
check not RESULT_TABLE-amount is initial.
append RESULT_TABLE.
endloop.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
$$ end of routine - insert your code only before this line -
ENDFORM.
New Routine - Based on Update - DTP:
"PROGRAM trans_routine.
CLASS routine DEFINITION
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
Available information: Refer to methods of
interface 'if_rsbk_request_admintab_view'
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
Rule specific types
$$ begin of global - insert your declaration only below this line -
... "insert your code here
$$ end of global - insert your declaration only before this line -
ENDCLASS. "routine DEFINITION
$$ begin of 2nd part global - insert your code only below this line *
$$ end of rule type
TYPES:
BEGIN OF tys_TG_1_full,
InfoObject: 0CHNGID ID de execução de modificação.
CHNGID TYPE /BI0/OICHNGID,
InfoObject: 0RECORDTP Categoria de registro.
RECORDTP TYPE /BI0/OIRECORDTP,
InfoObject: 0REQUID ID requisição.
REQUID TYPE /BI0/OIREQUID,
InfoObject: 0FISCVARNT Variante de exercício.
FISCVARNT TYPE /BI0/OIFISCVARNT,
InfoObject: 0FISCYEAR Exercício.
FISCYEAR TYPE /BI0/OIFISCYEAR,
InfoObject: 0CURRENCY Código da moeda.
CURRENCY TYPE /BI0/OICURRENCY,
InfoObject: 0CO_AREA Área de contabilidade de custos.
CO_AREA TYPE /BI0/OICO_AREA,
InfoObject: 0CURTYPE Tipo de moeda.
CURTYPE TYPE /BI0/OICURTYPE,
InfoObject: 0METYPE Tipo de índice.
METYPE TYPE /BI0/OIMETYPE,
InfoObject: 0VALUATION Perspectiva de avaliação.
VALUATION TYPE /BI0/OIVALUATION,
InfoObject: 0VERSION Versão.
VERSION TYPE /BI0/OIVERSION,
InfoObject: 0VTYPE Ctg.valor para reporting.
VTYPE TYPE /BI0/OIVTYPE,
InfoObject: 0WBS_ELEMT Elemento do plano da estrutura do projeto
*(elemento PEP).
WBS_ELEMT TYPE /BI0/OIWBS_ELEMT,
InfoObject: 0COORDER Nº ordem.
COORDER TYPE /BI0/OICOORDER,
InfoObject: 0PROJECT Definição do projeto.
PROJECT TYPE /BI0/OIPROJECT,
InfoObject: 0ACTIVITY Tarefa do diagrama de rede.
ACTIVITY TYPE /BI0/OIACTIVITY,
InfoObject: 0NETWORK Diagrama de rede.
NETWORK TYPE /BI0/OINETWORK,
InfoObject: 0PROFIT_CTR Centro de lucro.
PROFIT_CTR TYPE /BI0/OIPROFIT_CTR,
InfoObject: 0COMP_CODE Empresa.
COMP_CODE TYPE /BI0/OICOMP_CODE,
InfoObject: 0BUS_AREA Divisão.
BUS_AREA TYPE /BI0/OIBUS_AREA,
InfoObject: 0ACTY_ELEMT Elemento operação diagram.rede.
ACTY_ELEMT TYPE /BI0/OIACTY_ELEMT,
InfoObject: 0STATUSSYS0 Status do sistema.
STATUSSYS0 TYPE /BI0/OISTATUSSYS0,
InfoObject: 0PS_OBJ Tipo de objeto do PS.
PS_OBJ TYPE /BI0/OIPS_OBJ,
InfoObject: 0VTSTAT Código estatístico para ctg.valor.
VTSTAT TYPE /BI0/OIVTSTAT,
InfoObject: 0AMOUNT Montante.
AMOUNT TYPE /BI0/OIAMOUNT,
Field: RECORD Nº registro de dados.
RECORD TYPE RSARECORD,
END OF tys_TG_1_full.
Additional declaration for update rule interface
DATA:
MONITOR type standard table of rsmonitor WITH HEADER LINE,
MONITOR_RECNO type standard table of rsmonitors WITH HEADER LINE,
RECORD_NO LIKE SY-TABIX,
RECORD_ALL LIKE SY-TABIX,
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS.
global definitions from update rules
TABLES: ...
DATA: ...
FORM routine_0001
CHANGING
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
init variables
not supported
icube_values = g.
CLEAR result_table. REFRESH result_table.
type-pools: PSBW1.
data: l_psbw1_type_s_int1 type psbw1_type_s_int1.
data: lt_spread_values type PSBW1_TYPE_T_ACT_SPREAD.
field-symbols: .
füllen Rückgabetabelle !
move-corresponding to RESULT_TABLE.
check not RESULT_TABLE-amount is initial.
append RESULT_TABLE.
endloop.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
ENDFORM. "routine_0001
$$ end of 2nd part global - insert your code only before this line *
CLASS routine IMPLEMENTATION
CLASS lcl_transform IMPLEMENTATION.
*$*$ begin of routine - insert your code only below this line *-*
Data:
l_subrc type sy-tabix,
l_abort type sy-tabix,
ls_monitor TYPE rsmonitor,
ls_monitor_recno TYPE rsmonitors.
REFRESH:
MONITOR.
Runtime attributs
SOURCE_SYSTEM = p_r_request->get_logsys( ).
Migrated update rule call
Perform routine_0001
CHANGING
l_subrc
l_abort.
*-- Convert Messages in Transformation format
LOOP AT MONITOR INTO ls_monitor.
move-CORRESPONDING ls_monitor to MONITOR_REC.
append monitor_rec to MONITOR.
ENDLOOP.
IF l_subrc <> 0.
RAISE EXCEPTION TYPE cx_rsrout_skip_val.
ENDIF.
IF l_abort <> 0.
RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
ENDIF.
$$ end of routine - insert your code only before this line -
ENDMETHOD. "compute_0AMOUNT
Method invert_0AMOUNT
This subroutine needs to be implemented only for direct access
(for better performance) and for the Report/Report Interface
(drill through).
The inverse routine should transform a projection and
a selection for the target to a projection and a selection
for the source, respectively.
If the implementation remains empty all fields are filled and
all values are selected.
METHOD invert_0AMOUNT.
$$ begin of inverse routine - insert your code only below this line-
... "insert your code here
$$ end of inverse routine - insert your code only before this line -
ENDMETHOD. "invert_0AMOUNT
Please, HELP!!!!
Thanks,
Mateus.Hi,
I checked the code and as I saw you're using return tables. This feature is not yet implemented in transformations! You have to find a workaoround for a code in start- or endroutines that appends the data.
In general you have to replace comm_structure and icube_Values by new class attributes/variables.
On which SP are you currently?
Regards,
JUergen -
SQL to find a value in a database column
Hi All,
I need to write a pl/sql block to find a given value in any database column.
Is there a written function or program which I could use.
Requirement is to see which columns in which table has the value 'ABCD123' in whole database
Thanks,
SNOT TESTED
declare
seeking varchar2(30) := 'ABCD123';
begin
create table result_table as
select owner,table_name,column_name,cast(null as varchar2(30)) column_value
from all_tab_cols
where 1 = 0;
for r in (select owner,table_name,column_name
from all_tab_cols
where data_type = 'VARCHAR2'
and data_length >= length(seeking)
loop
execute immediate 'insert into result_table ' ||
'select ' || r.owner || ',' || r.table_name || ',' || r.column_name || ',''' || seeking || '''' ||
' from dual ' ||
' where exists(select null ' ||
' from ' || r.owner || '.' || r.table_name ||
' where ' || r.column_name || ' = ''' || seeking || '''' ||
end loop;
commit;
end;Regards
Etbin -
RFC call results in StORAGE_PARAM_WRONG_SET
I'm in trouble with a RFC call, the process is as following: SAP system A calls a report. This report selects FI documents via LDB SDF. After user selects one or more documents from the list I call a RFC to read the payroll posting results from system B. The call of the RFC takes place for each FI document separatly what means user selects e.g. 10 FI documents, so I have 10 RFC calls with one result list. After each RFC call I add the result table of the RFC to the output table within the report. Before calling the RFC I of course clear all relevant tables again and additionaly I also use the 'FREE' statement within the RFC to set free all the memory, so there is no data stored in internal tables. But when the user selects a great no. of FI documents to read the payroll postings sometimes the RFC cancels in system B telling me that the storage parameters were set wrong. Calling the RFC step by step by selecting the FI document in single mode from the list I don't receive this dump. Do you have an idea what to do to avoid the dump? One problem: I don't have access to system B to test there, I only can do testing in system A and therefore I have no possibility to debugg this.
This is the code of the RFC module:
FUNCTION y_rfc_read_payroll_postings.
*"*"Local interface:
*" IMPORTING
*" VALUE(I_AWKEY) TYPE AWKEY
*" VALUE(I_CHECKNO) TYPE XFELD
*" VALUE(I_TAX) TYPE XFELD
*" EXPORTING
*" VALUE(E_PPDHD) TYPE PPDHD
*" TABLES
*" T_PPDIT STRUCTURE PPDIT
*" T_PPOIX STRUCTURE PPOIX
*" T_PPDIX STRUCTURE PPDIX
*" T_PAYR STRUCTURE PAYR OPTIONAL
*" T_HRPAY STRUCTURE PC209 OPTIONAL
*" T_REGUTA STRUCTURE REGUTA OPTIONAL
*" T_VALUES STRUCTURE YSHR_RFC_PAYROLL_POSTING OPTIONAL
*" T_CSKA STRUCTURE CSKA
*" RETURN STRUCTURE BAPIRET2
* local data
TYPE-POOLS: pptgs.
TYPES: BEGIN OF type_helpval,
pernr TYPE p_pernr,
lgart TYPE lgart,
rel TYPE xfeld,
END OF type_helpval.
TYPES: BEGIN OF type_cluster,
pernr TYPE p_pernr,
seqno TYPE cdseq,
abrj TYPE pnppabrj,
abrp TYPE pnppabrp,
actual TYPE srtza,
betrg TYPE ppoix-betrg,
waers TYPE ppoix-waers,
END OF type_cluster.
DATA: BEGIN OF lt_ppoix_key OCCURS 0,
pernr LIKE ppoix-pernr,
seqno LIKE ppoix-seqno,
actsign LIKE ppoix-actsign,
runid LIKE ppoix-runid,
postnum LIKE ppoix-postnum,
END OF lt_ppoix_key.
FIELD-SYMBOLS: <payroll> TYPE yshr_rfc_payroll_posting.
DATA ht_ppoix TYPE TABLE OF ppoix.
DATA productive_runs LIKE hrpp_pernr_runtab OCCURS 0 WITH HEADER LINE.
DATA t_rgdir TYPE TABLE OF pc261.
DATA wa_rgdir TYPE pc261.
DATA t_helpval TYPE TABLE OF type_helpval.
DATA t_cluster TYPE TABLE OF type_cluster.
DATA wa_helpval TYPE type_helpval.
DATA wa_cluster TYPE type_cluster.
DATA h_molga TYPE molga.
DATA h_ltext TYPE t5utz-ltext.
DATA wa_t512w TYPE t512w.
DATA wa_return TYPE bapiret2.
DATA par1 TYPE syst-msgv1.
DATA par2 TYPE syst-msgv2.
DATA par3 TYPE syst-msgv3.
DATA wa_ppoix TYPE ppoix.
FIELD-SYMBOLS: <wa_ppdit> TYPE ppdit.
DATA wa_ppdix TYPE ppdix.
DATA result_tab_us TYPE payus_result.
DATA result_tab_in TYPE payin_result.
DATA t_bt TYPE hrpay99_bt.
DATA t_rt TYPE hrpay99_rt.
DATA wa_bt TYPE pc209.
DATA wa_rt TYPE pc207.
DATA h_time(6) TYPE c.
DATA t_inter TYPE TABLE OF pay99_international WITH HEADER LINE.
DATA t_tax TYPE hrpayus_tax.
DATA wa_tax TYPE pc22t.
DATA wa_payr TYPE payr.
DATA wa_reguta TYPE reguta.
DATA wa_payroll TYPE yshr_rfc_payroll_posting.
DATA t_ppopx TYPE TABLE OF ppopx.
DATA wa_ppopx TYPE ppopx.
DATA wa_t001 TYPE t001.
FREE: t_ppdit, t_ppoix, t_ppdix, t_payr, t_hrpay, t_reguta,
t_values, t_helpval, t_cluster, t_ppopx.
* read general information
SELECT SINGLE * FROM ppdhd INTO e_ppdhd WHERE
docnum EQ i_awkey.
CASE syst-subrc.
* everthing ok, continue
WHEN 0.
* get the company code and assign US flag
SELECT SINGLE * FROM t001 INTO wa_t001 WHERE
bukrs EQ e_ppdhd-bukrs.
* exit and set err. mess.
WHEN OTHERS.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = 'HR3PRNA'
number = '704'
* PAR1 = ' '
* PAR2 = ' '
* PAR3 = ' '
* PAR4 = ' '
* LOG_NO = ' '
* LOG_MSG_NO = ' '
* PARAMETER = ' '
* ROW = 0
* FIELD = ' '
IMPORTING
return = wa_return
wa_return-field = 'PPDHD'.
APPEND wa_return TO return.
EXIT.
ENDCASE.
* read table PPDIT
SELECT * FROM ppdit INTO TABLE t_ppdit
FOR ALL ENTRIES IN t_cska
WHERE docnum = i_awkey AND
hkont = t_cska-kstar.
CASE syst-subrc.
* everthing ok, continue
WHEN 0.
* exit and set err. mess.
WHEN OTHERS.
par1 = 'PPDIT'.
par2 = 'document'.
par3 = i_awkey.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = '5G'
number = '58'
par1 = par1
par2 = par2
par3 = par3
* PAR4 = ' '
* LOG_NO = ' '
* LOG_MSG_NO = ' '
* PARAMETER = ' '
* ROW = 0
* FIELD = ' '
IMPORTING
return = wa_return
wa_return-field = 'PPDIT'.
APPEND wa_return TO return.
EXIT.
ENDCASE.
* read table PPDIX
SELECT * FROM ppdix INTO TABLE t_ppdix
FOR ALL ENTRIES IN t_ppdit
WHERE evtyp EQ e_ppdhd-evtyp AND
runid EQ e_ppdhd-runid AND
docnum EQ e_ppdhd-docnum AND
doclin = t_ppdit-doclin.
CASE syst-subrc.
* everthing ok, continue
WHEN 0.
* exit and set err. mess.
WHEN OTHERS.
par1 = 'PPDIX'.
par2 = 'runid'.
par3 = e_ppdhd-runid.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = '5G'
number = '58'
par1 = par1
par2 = par2
par3 = par3
* PAR4 = ' '
* LOG_NO = ' '
* LOG_MSG_NO = ' '
* PARAMETER = ' '
* ROW = 0
* FIELD = ' '
IMPORTING
return = wa_return
wa_return-field = 'PPDIX'.
APPEND wa_return TO return.
EXIT.
ENDCASE.
* read detail values on accounting level
SELECT * FROM ppoix INTO TABLE t_ppoix
FOR ALL ENTRIES IN t_ppdix WHERE
runid EQ t_ppdix-runid AND
tslin EQ t_ppdix-linum.
* read reposted documents from ppopx
SELECT * FROM ppopx INTO TABLE t_ppopx
FOR ALL ENTRIES IN t_ppdix WHERE
runid EQ t_ppdix-runid AND
tslin EQ t_ppdix-linum.
IF syst-subrc EQ 0.
* append corresponding lines to T_ppoix
LOOP AT t_ppopx INTO wa_ppopx.
MOVE-CORRESPONDING wa_ppopx TO productive_runs.
CLEAR productive_runs-runid.
COLLECT productive_runs.
ENDLOOP.
* get run table
CALL FUNCTION 'HR_EVAL_PROD_A_RUN_GET_TABLE'
TABLES
result_table = productive_runs.
LOOP AT productive_runs.
IF productive_runs-runid IS INITIAL.
DELETE productive_runs.
ENDIF.
ENDLOOP.
* fill ppoix-keys for needed ppoix
LOOP AT productive_runs.
LOOP AT t_ppopx INTO wa_ppopx.
IF wa_ppopx-pernr EQ productive_runs-pernr AND
wa_ppopx-seqno EQ productive_runs-seqno.
* built key
CLEAR lt_ppoix_key.
MOVE-CORRESPONDING productive_runs TO lt_ppoix_key.
lt_ppoix_key-postnum = wa_ppopx-postnum.
lt_ppoix_key-actsign = 'A'.
COLLECT lt_ppoix_key.
ENDIF.
ENDLOOP.
ENDLOOP.
* any values to append?
READ TABLE lt_ppoix_key INDEX 1.
IF syst-subrc EQ 0.
SELECT * FROM ppoix INTO TABLE ht_ppoix
FOR ALL ENTRIES IN lt_ppoix_key
WHERE pernr = lt_ppoix_key-pernr
AND seqno = lt_ppoix_key-seqno
AND actsign = 'A'
AND runid = lt_ppoix_key-runid
AND postnum = lt_ppoix_key-postnum.
IF syst-subrc EQ 0.
LOOP AT t_ppopx INTO wa_ppopx.
LOOP AT ht_ppoix INTO wa_ppoix WHERE
pernr EQ wa_ppopx-pernr AND
seqno EQ wa_ppopx-seqno AND
postnum EQ wa_ppopx-postnum.
MOVE-CORRESPONDING wa_ppopx TO wa_ppoix.
IF wa_ppoix-actsign <> 'A'.
wa_ppoix-betrg = - wa_ppoix-betrg.
wa_ppoix-anzhl = - wa_ppoix-anzhl.
ENDIF.
APPEND wa_ppoix TO t_ppoix.
DELETE ht_ppoix.
ENDLOOP.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
* check for any entries in table T_PPOIX
READ TABLE t_ppoix INTO wa_ppoix INDEX 1.
CASE syst-subrc.
* everthing ok, continue
WHEN 0.
* exit and set err. mess.
WHEN OTHERS.
par1 = 'PPOIX'.
par2 = 'runid'.
par3 = e_ppdhd-runid.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = '5G'
number = '58'
par1 = par1
par2 = par2
par3 = par3
* PAR4 = ' '
* LOG_NO = ' '
* LOG_MSG_NO = ' '
* PARAMETER = ' '
* ROW = 0
* FIELD = ' '
IMPORTING
return = wa_return
wa_return-field = 'PPOIX'.
APPEND wa_return TO return.
EXIT.
ENDCASE.
CHECK i_checkno EQ 'X' OR
i_tax EQ 'X'.
CLEAR t_values.
* read payroll results, determine values
LOOP AT t_ppdit ASSIGNING <wa_ppdit>.
LOOP AT t_ppdix INTO wa_ppdix WHERE
evtyp = e_ppdhd-evtyp AND
runid = e_ppdhd-runid AND
doclin = <wa_ppdit>-doclin.
LOOP AT t_ppoix INTO wa_ppoix WHERE
runid EQ e_ppdhd-runid AND
tslin EQ wa_ppdix-linum.
* append anywhere for checkno
IF i_checkno EQ 'X'.
wa_cluster-pernr = wa_ppoix-pernr.
wa_cluster-seqno = wa_ppoix-seqno.
wa_cluster-abrj = <wa_ppdit>-abper+0(4).
wa_cluster-abrp = <wa_ppdit>-abper+4(2).
wa_cluster-actual = wa_ppoix-actsign.
wa_cluster-betrg = wa_ppoix-betrg.
wa_cluster-waers = wa_ppoix-waers.
IF <wa_ppdit>-abper IS INITIAL.
* write BONDT into field ZUONR
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = wa_ppoix-pernr
TABLES
in_rgdir = t_rgdir.
READ TABLE t_rgdir INTO wa_rgdir WITH KEY
seqnr = wa_ppoix-seqno.
IF syst-subrc EQ 0.
<wa_ppdit>-zuonr+0(10) = wa_rgdir-bondt.
ENDIF.
ENDIF.
APPEND wa_cluster TO t_cluster.
ENDIF.
IF i_tax EQ 'X'.
* check if LGART is relevant
READ TABLE t_helpval INTO wa_helpval WITH KEY
pernr = wa_ppoix-pernr
lgart = wa_ppoix-lgart.
CASE syst-subrc.
WHEN 0.
* relevant or not
CASE wa_helpval-rel.
WHEN 'X'.
wa_cluster-pernr = wa_ppoix-pernr.
wa_cluster-seqno = wa_ppoix-seqno.
wa_cluster-abrj = <wa_ppdit>-abper+0(4).
wa_cluster-abrp = <wa_ppdit>-abper+4(2).
wa_cluster-actual = wa_ppoix-actsign.
wa_cluster-betrg = wa_ppoix-betrg.
wa_cluster-waers = wa_ppoix-waers.
IF <wa_ppdit>-abper IS INITIAL.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = wa_ppoix-pernr
TABLES
in_rgdir = t_rgdir.
READ TABLE t_rgdir INTO wa_rgdir WITH KEY
seqnr = wa_ppoix-seqno.
IF syst-subrc EQ 0.
<wa_ppdit>-zuonr+0(10) = wa_rgdir-bondt.
ENDIF.
ENDIF.
APPEND wa_cluster TO t_cluster.
* save values
MOVE-CORRESPONDING wa_ppoix TO wa_payroll.
wa_payroll-betrg = ABS( wa_payroll-betrg ).
APPEND wa_payroll TO t_values.
WHEN ' '.
CONTINUE.
ENDCASE.
WHEN OTHERS.
* determine values
CALL FUNCTION 'HR_COUNTRYGROUPING_GET'
EXPORTING
pernr = wa_ppoix-pernr
* TCLAS = 'A'
begda = e_ppdhd-bldat
endda = e_ppdhd-bldat
* WERKS =
IMPORTING
molga = h_molga
EXCEPTIONS
not_found = 1
OTHERS = 2
IF sy-subrc NE 0.
WRITE wa_ppoix-pernr TO par1.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = 'HRPAYBR94'
number = '278'
par1 = par1
IMPORTING
return = wa_return.
wa_return-field = wa_ppoix-pernr.
APPEND wa_return TO return.
CONTINUE.
ENDIF.
SELECT * FROM t512w INTO wa_t512w
WHERE molga = h_molga
AND lgart = wa_ppoix-lgart
AND endda GE e_ppdhd-bldat
AND begda LE e_ppdhd-bldat.
EXIT.
ENDSELECT.
IF syst-subrc EQ 0.
IF wa_t512w-vklas+77(1) = '2'.
wa_helpval-pernr = wa_ppoix-pernr.
wa_helpval-lgart = wa_ppoix-lgart.
wa_helpval-rel = 'X'.
APPEND wa_helpval TO t_helpval.
wa_cluster-pernr = wa_ppoix-pernr.
wa_cluster-seqno = wa_ppoix-seqno.
wa_cluster-abrj = <wa_ppdit>-abper+0(4).
wa_cluster-abrp = <wa_ppdit>-abper+4(2).
wa_cluster-actual = wa_ppoix-actsign.
wa_cluster-betrg = wa_ppoix-betrg.
wa_cluster-waers = wa_ppoix-waers.
IF <wa_ppdit>-abper IS INITIAL.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = wa_ppoix-pernr
TABLES
in_rgdir = t_rgdir.
READ TABLE t_rgdir INTO wa_rgdir WITH KEY
seqnr = wa_ppoix-seqno.
IF syst-subrc EQ 0.
<wa_ppdit>-zuonr+0(10) = wa_rgdir-bondt.
ENDIF.
ENDIF.
APPEND wa_cluster TO t_cluster.
MOVE-CORRESPONDING wa_ppoix TO wa_payroll.
wa_payroll-betrg = ABS( wa_payroll-betrg ).
APPEND wa_payroll TO t_values.
ELSE.
wa_helpval-pernr = wa_ppoix-pernr.
wa_helpval-lgart = wa_ppoix-lgart.
wa_helpval-rel = ''.
APPEND wa_helpval TO t_helpval.
ENDIF.
ENDIF.
ENDCASE.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDLOOP.
SORT t_cluster.
DELETE ADJACENT DUPLICATES FROM t_cluster.
LOOP AT t_cluster INTO wa_cluster.
CLEAR: result_tab_us, result_tab_in.
CASE wa_t001-land1.
WHEN 'US'.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
* CLUSTERID = 'RU'
employeenumber = wa_cluster-pernr
sequencenumber = wa_cluster-seqno
* READ_ONLY_BUFFER = ' '
* READ_ONLY_INTERNATIONAL = ' '
* ARC_GROUP = ' '
check_read_authority = ''
filter_cumulations = ''
* CLIENT =
* IMPORTING
* VERSION_NUMBER_PAYVN =
* VERSION_NUMBER_PCL2 =
CHANGING
payroll_result = result_tab_us
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10
WHEN OTHERS.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
* CLUSTERID = 'RU'
employeenumber = wa_cluster-pernr
sequencenumber = wa_cluster-seqno
* READ_ONLY_BUFFER = ' '
* READ_ONLY_INTERNATIONAL = ' '
* ARC_GROUP = ' '
check_read_authority = ''
filter_cumulations = ''
* CLIENT =
* IMPORTING
* VERSION_NUMBER_PAYVN =
* VERSION_NUMBER_PCL2 =
CHANGING
payroll_result = result_tab_in
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10
ENDCASE.
IF sy-subrc NE 0.
CLEAR wa_return.
wa_return-field = wa_ppoix-pernr.
CASE syst-subrc.
WHEN '1'.
wa_return-message = 'ILLEGAL_ISOCODE_OR_CLUSTERID'.
WHEN '2'.
wa_return-message = 'ERROR_GENERATING_IMPORT'.
WHEN '3'.
wa_return-message = 'IMPORT_MISMATCH_ERROR'.
WHEN '4'.
wa_return-message = 'SUBPOOL_DIR_FULL'.
WHEN '5'.
wa_return-message = 'NO_READ_AUTHORITY'.
WHEN '6'.
wa_return-message = 'NO_RECORD_FOUND'.
WHEN '7'.
wa_return-message = 'VERSIONS_DO_NOT_MATCH'.
WHEN '8'.
wa_return-message = 'ERROR_READING_ARCHIVE'.
WHEN '9'.
wa_return-message = 'ERROR_READING_RELID'.
WHEN OTHERS.
wa_return-message = 'OTHERS'.
ENDCASE.
APPEND wa_return TO return.
CONTINUE.
ELSE.
CASE wa_t001-land1.
WHEN 'US'.
t_inter = result_tab_us-inter.
WHEN OTHERS.
t_inter = result_tab_in-inter.
ENDCASE.
APPEND t_inter.
t_tax = result_tab_us-nat-tax.
LOOP AT t_inter.
t_bt = t_inter-bt.
t_rt = t_inter-rt.
ENDLOOP.
LOOP AT t_values ASSIGNING <payroll> WHERE
pernr EQ wa_cluster-pernr.
CLEAR wa_rt.
LOOP AT t_rt INTO wa_rt WHERE
lgart EQ <payroll>-lgart.
wa_rt-betrg = ABS( wa_rt-betrg ).
IF wa_rt-betrg EQ <payroll>-betrg AND NOT
wa_rt-cntr1 IS INITIAL.
IF wa_t001-land1 EQ 'US'.
LOOP AT t_tax INTO wa_tax WHERE
cntr1 EQ wa_rt-cntr1.
EXIT.
ENDLOOP.
IF syst-subrc EQ 0.
<payroll>-cntr1 = wa_tax-cntr1.
<payroll>-taxau = wa_tax-taxau.
* determine long text
SELECT SINGLE ltext FROM t5utz INTO h_ltext
WHERE taxau = wa_tax-taxau.
IF syst-subrc EQ 0.
<payroll>-ltext = h_ltext.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDLOOP.
* check table BT abd determine check no.
IF i_checkno EQ 'X'.
LOOP AT t_bt INTO wa_bt.
APPEND wa_bt TO t_hrpay.
CASE wa_bt-zlsch.
* check
WHEN 'C'.
SELECT * FROM payr INTO wa_payr WHERE
rzawe = 'C' AND
laufd = wa_bt-dtadt AND
pernr = wa_cluster-pernr AND
seqnr = wa_cluster-seqno AND
btznr = wa_bt-btznr.
EXIT.
ENDSELECT.
IF syst-subrc EQ 0.
* store period in a field to find correlation later
wa_payr-znme4+0(4) = wa_cluster-abrj.
wa_payr-znme4+4(2) = wa_cluster-abrp.
ELSE.
CLEAR wa_payr.
wa_payr-pernr = wa_cluster-pernr.
wa_payr-rwbtr = wa_cluster-betrg.
wa_payr-waers = wa_cluster-waers.
APPEND wa_payr TO t_payr.
ENDIF.
APPEND wa_payr TO t_payr.
* bank transfer
WHEN OTHERS.
h_time = wa_bt-dtati+0(5).
h_time+5(1) = 'P'.
SELECT * FROM reguta INTO wa_reguta WHERE
laufd = wa_bt-dtadt AND
laufi = h_time.
EXIT.
ENDSELECT.
IF syst-subrc EQ 0.
APPEND wa_reguta TO t_reguta.
ENDIF.
ENDCASE.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
ENDFUNCTION.Hi Sudhir,
These settings need to be done by basis people. Anyhow, you can go to the tcode RZ11 and put in these parameters mentioned in the error message. There will be documentation available for these parameters. Try to see if the defaults are not met for any of these parameters. If you find something strange, report it to the basis. The documentations in this are very helpful. Hope this helps.
Thanks and Regards
Subray Hegde -
How can I execute a query using RSCRMBW_REPORT?
Hi everybody,
I have read the document:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3ba5e590-0201-0010-59b1-cab51fd245b7
and found it is very intersting for my requirement.
I copied the report,and modified it regarding our case.But during the second call,I get runtime error.
I debugged the code, and found the error results from method GET_CUBETYPE() of class CL_RSCRMBW_BAPI.In this method,it tries to create a object which is TYPE REF TO cl_rsd_dta.
CREATE OBJECT lr_dta
EXPORTING
i_infoprov = g_s_status-infocube
But g_s_status-infcube is null.
I am not able to find where this 'infocube' component in this g_s_status struction is filled,even I found,I don't know how I can give this infocube parameter from report which 2 FM are called.
My code is following:
parameters: p_repuid TYPE RSCRMSTATUS-REPORTUID
DEFAULT 'Z_IC_01/Z_COMP_Q003'.
parameters: p_split type BAPI6110DIM-DIM_NAM.
data:name_query TYPE CHAR50,
result_table LIKE RSCRMSTATUS-TABNAME,
it_return LIKE BAPIRET2 OCCURS 2 WITH HEADER LINE,
infocube TYPE CHAR30,
compid TYPE CHAR30.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_repuid.
CALL FUNCTION 'RSZ_COMPONENT_TREE_GET'
EXPORTING
i_title = 'Query auswählen'(031)
IMPORTING
E_INFOCUBE = infocube
E_COMPID = compid
EXCEPTIONS
OTHERS = 1.
IF sy-subrc GT 0.
ENDIF.
concatenate infocube '/' compid into p_repuid.
START-OF-SELECTION.
CALL FUNCTION 'RSCRMBW_REPORT'
EXPORTING
i_mode = 'OPEN'
i_reportuid = p_repuid
I_PACKSIZE = 10000
I_EXECMODE = 'TABLE'
I_EXTRACT = 'ZBWTEST'
I_SPLIT = p_split
I_CLEAREXTRACT = 'X'
TABLES
E_T_RETURN = it_return.
CALL FUNCTION 'RSCRMBW_REPORT'
EXPORTING
i_mode = 'START'
i_reportuid = p_repuid
I_PACKSIZE = 10000
I_EXECMODE = 'TABLE'
I_CLEAREXTRACT = 'X'
TABLES
E_T_RETURN = it_return.
So far this creation of report is only the 2nd step.But I am not sure how step 3 to step 6 should be done so that the report can be execute exactly.
What should I do? Pleas help me!
Thanks in advance
Regards,
Liying
Message was edited by: Liying Wang
Message was edited by: Liying Wang
Message was edited by: Liying WangLiying
Were you able to get a solution to this problem? I am facing the same issue too. The g_s_status-infocube is showing blank.
Regards
Dilip -
Risk analysis in GRC 10 error "Subnode COMPONENTCONTROLLER.1.SEARCH.RESULT"
HI
We have configured Risk analysis application within GRC 10. Also have executed the sync jobs. Now when i try to do SOD analysis i am getting an error "FPM application started without configuration" . this comes even before opening the link to SOD analysis is even open and this error comes for all type of SOD analysis like for user and role and HR object.
I check the logs file and in logs system is complaing that "Subnode COMPONENTCONTROLLER.1.SEARCH.RESULT_TABLE" does not exist.
Any idea why we getting this error message?
ParvenHI
Connector is working fine as sync jobs are running perfectly.
we have done the mimimum configuration setting as suggested by SAP guide ie Parameter 1023, 1024,1025 and 1026
For activating BC sets i think we need to do that only when you using out of box SOD rules. In our case we are using customised SOD rules. So i think we dont need to activate the BC set.
any other suggestion
Parveen -
Icube_values are not supporting in bi7
Hi All,
We are migrating Updates to Tranformations.Actuvally we migrated one of the update rule into transformations by selecting the update rule and by creating transformations from additional functions.We got some syntax erros saying that Field "ICUBE_VALUES" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement.I think ICUBE_VALUES are not supported in ABAP 00.
Can any one please let me know how to remediate in this particular case.
below is my coding
FORM routine_0001
CHANGING
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
init variables
not supported
icube_values = g.
CLEAR result_table. REFRESH result_table.
fill the internal table "MONITOR", to make monitor entries
RESULT_TABLE = ICUBE_VALUES.
IF COMM_STRUCTURE-/BIC/ZMOTC NE 0.
RESULT_TABLE-/BIC/ZDCUAMT = COMM_STRUCTURE-/BIC/ZMOTC.
RESULT_TABLE-CURRENCY = COMM_STRUCTURE-CURRENCY.
RESULT_TABLE-ACCOUNT = '00154326666'.
RESULT_TABLE-CHRT_ACCTS = COMM_STRUCTURE-COMP_CODE.
RESULT_TABLE-/BIC/ZDNNPLA = 1.
APPEND RESULT_TABLE.
ENDIF.
IF COMM_STRUCTURE-/BIC/ZDHSTOC NE 0.
RESULT_TABLE-/BIC/ZDCYAMT = COMM_STRUCTURE-/BIC/ZDHSTOC * -1.
RESULT_TABLE-CURRENCY = COMM_STRUCTURE-CURRENCY.
RESULT_TABLE-ACCOUNT = '002374949949'.
RESULT_TABLE-CHRT_ACCTS = COMM_STRUCTURE-COMP_CODE.
RESULT_TABLE-/BIC/ZDNNPLA = 1.
APPEND RESULT_TABLE.Hi,
Please check the thread below:
Return code code need to change from bw to BI
-Vikram -
Db Adapter: problems by calling a procedure with type as parameter
Hi,
We using a db adapter in a bpel process.
In that dapter we call a procedure with types as in and out parameter
package.procedure(p_in IN in_t, p_rsult OUT result_t).
When we calling the procedure, we don't call the procedure directly.
We call that procedure in a schema who have the execute rigths for the package and the types.
When we run the process we get the error message
unable to convert the xsd element p_in whose user defined type is in_t
cause: java.sql.SQLException: ora-01436 connect by loop in user data
I am not shore if I draw the right conclusions.
Is it rigth that bpel have a problem by using types as parameter when using two schematas? Isn't it a bug.
For every help I was thankful.
Thanks in advanced.
MichaelHi,
thanks for the hint. I have implemented a wrapper package and it's working well.
Only one crux. The parameter of the called procedure are data types and not simple types.
CREATE OR REPLACE TYPE pesa_db_return_t AS OBJECT
(SUCCESS_MSG varchar2(255)
,FAULT_SQLCODE varchar2(255)
,FAULT_SQLMSG varchar2(255)
Wrapper package...
IS
PROCEDURE prc_writeReOinDB (p_AuftragRechnungOnline IN pesa_data.pesa_tivu_reo_t
,p_result OUT pesa_data.pesa_db_return_t)
IS
BEGIN
pkg_pesa_reo.prc_writeReOinDB (p_AuftragRechnungOnline => p_AuftragRechnungOnline
,p_result => p_result
END prc_writeReOinDB;
END pkg_pesa_wrapper;
So I have to declare the parameter with the schema user in front of.
Now, we have deployed thes sources on a second enviroment and get following error:
<2008-04-22 15:01:25,749> <ERROR> <eweber.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.CallbackDeliveryMessage"; the exception is: Type class not found.
Cannot find class for type "org.apache.xerces.dom.ElementNSImpl". Please check that the class is located in the classpath.
You have a hint for me what I have to do?
Thanks in advanced,
Michael -
I have created a database that contains mp3 numbered audio
such as 411.mp3, 412.mp3. However, in Flash, I cannot play the mp3.
I am using Flash Pro 2004.
My mp3 audios are located in this folder.
/media/aduioSermons/audios
My flash MediaPlayBack that I used from Flash MX 2004 Pro, in
the parameters tab I had selected mp3 radio button and then in the
URL this is what has been typed.
/media/aduioSermons/audios/<?php echo
$row_rsAudioSermon['listen']; ?>
The <?php echo $row_rsAudioSermon['listen']; ?> is my
database in MySQL that stores the name "411.mp3".
So my plan is to embed one flash file called
"audioSermonPreview.swf" and inside that SWF has that URL so when
it is called up in a details page it plays that clip.
Is this possible to do or there is no way to link them?
Thank you for all who help.
AdonaiEchad
This is my PHP PageHi all_begin,
here you have to create an another loadvar (which will be the
return the data in order to you request ) object like to have made
"var sendMail_lv:LoadVars = new LoadVars();". The newer may be "var
resultMail_lv:LoadVars = new LoadVars();" and then you have to put
this "resultMail_lv" in "sendAndLoad" method of flash like :
sendMAil_lv.sendAndLoad(
http://PATHtoMYserver/sendMail.php",
resultMail_lv "POST");.
Now, you have to write bit of code in your send_btn.onRelease
function to load data that you want to get from your php file.
resultMail_lv.onLoad = function(success:Boolean) {
if (success) {
result_ta.text = resultMail_lv.welcomeMessage;
} else {
result_ta.text = "Error connecting to server.";
here " result_ta " will be the text area in which you can
show the data which is cominig from your php side. -
Absolute dynamic select query with dynamic join and where
Has anyone ever tried creating an absolutely dynamic SELECT query with dynamic Join and Where conditions.
I have a requirement of creating such a query in an Utility Class, and i have written the code. But its throwing my sysntax errors.
Please let me know where am I going wrong OR is it really possible to create such a dynamic Query??
SELECT (FIELDS) INTO TABLE IT_TABLES
FROM ( (ME->TABLE1) inner join ( me->table2 )
on ( on_condition ) )
WHERE (me->where_fields).
Ags.It worked for me in a following way:
select * into corresponding fields of table <result_table>
from (join_string)
where (l_where).
Where the contents of join_string were dynamically build using concatenation. So it will be something like
concatenate ME->TABLE1 'as a INNER JOIN' me->table2 'as b ON (' into join_string separated by space.
<...>
add here matching/reference colums, something like
concatenate 'a~' me->TABLE1_JOIN_COL into temp1.
concatenate 'b~' me->TABLE2_JOIN_COL into temp2.
concatenate join_string temp1 '=' temp2 into join_string separated by space.
<...>
concatenate join_string ')' into join_string separated by space.
And then use similar approach for l_where variable. -
Create table as select statement.
Hello Oracle Gurus,
I am trying to create a table using select * from other table.
The procedure that I am following is this:-
I have a temp table whose signature is on commit delete rows.
I insert records in this table.
when I do select * from temp_table,perm_table I get some rows.
then I try to create a result_table using this
CREATE TABLE result_table
AS SELECT * FROM temp_table,perm_table;
I see the table in created but number of records in 0. Can anyone please explain where commit takes place while sequence in this query occurs.
Thanks
Edited by: user10696492 on Nov 10, 2009 8:47 AMCreate table statement is a ddl - so an implicit commit is performed before the create statement begins. The implicit commit will delete all the rows from the temp table. If it is feasible change the definition of the temp table to on commit preserve rows.
Maybe you are looking for
-
MMy iPad will not show up in itunes
-
Urgent... need help in alv.
hai all, in an alv report i want a pushbutton in the application tool bar . how can i get it. and also i want to select multiple rows from the list and the first column as a button to select the rows. please.. help me. its very urgent. thanks in adva
-
Printers removed from workstation and readded by themselves- policy should not be running
We are currently ins a state of upgrading all our netwrae 6 servers to netware 6.5 and our zen from 4.01 to zen 7. While we have most of our netware serveres up to 6.5, the one that has zen 4.01 is still a newtare 6 server. Our printers are mostly HP
-
Secondary cost element........
Hi, Is it necessary to create number of activities = to number of secondary cost element. or only one cost element is enough for all activities for posting to cost center. Regards, Imran
-
A security-constraint question - Hopefully to get answered.
I have a security-constraint that protects URLs with pattern "/test/*". Now, the login page is defined as /login.jsp. Now if i directly access the url say "/test/1.jsp" , I am redirected to /login.jsp. Now, what i want is to find out what was the ori