Errors in transformation routine
hello,all.
when I checking my routine i have this type of an error:
E:Tables with headers are no longer supported in the OO context.
my global structure is look like this:
type-pools: rssm.
data: begin of custattr occurs 5000.
include structure /BIC/ZDPERNUM. "M-view
data: end of custattr.
v BI 7.0
Can anyone tell me what's wrong with it.
Hi,
first of all the table name will be /bic/pzdpernum for the master data table.
The definition of a table in the OO-context is like
data: custattr type standard table of /bic/pzdpernum.
Additionally you need to define a workarea for that table.
data: wa_custattr type /bic/pzdpernum.
Now reading the table will be done with
read table custattr into wa_custattr with key.....
A loop at the table will be done with
loop at custattr into wa_custattr.
endloop.
The fields of the structure can be accessed with
wa_custattr-<fieldname> ....
Append lines to the table with
append wa_custattr to custattr.
Hope this helps
regards
Siggi
Similar Messages
-
Error in Transformation Routine
Hi all,
I have written a code in transformation routine. I have debugged the code. The code which I have written is working fine. The value in 'Result' is correct and till here the code executes without any error. After that , system throws an error which I cannot understand as this is the system generated code.
I wanted to paste the error analysis here but i dont have any option to copy from there. Message class is "RSBK". Number is 299
Any ideas?
Regards,
Aisha Ishrat
ICI Pakistan Ltd.Hi AI,
As I told you earlier ... jsut copy and paste the code I sent you in the end routine ... if the end routine contains your data then we are sure that the transformations have worked fine ... if it does not contain any data then we are sure something has gone wrong during the transformation.... you cannot find the problem until you are sure where it is happening.... lets work on this and get it out of our way... I am waiting for your response.
Another point if anything has gone wrong while doing the transformations for location then the end routine will not have location info ... this is why I suggest you to put the code above in the end routine and debug ... this will give you a fair idea as to what has happened and where the problem arises.... Hope this helps.
best regards,
Kazmi -
Syntax error in Transformation routine
Hi Folks,
We are In SP 17.
I have migrated standard 0bpartner_attr transfer rules to a transformation with syntax errors.
I have a routine for a gender, Valid From and Valid To its giving the following erorr.
E:Field "TRAN_STRUCTURE-VALID_FROM" is unknown. It is neither in one of
the specified tables nor defined by a "DATA" statement. "DATA"
statement.
the following is the routine code for Gender.
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
TYPES:
BEGIN OF tys_SC_1,
Field: XSEXM Male.
XSEXM TYPE C LENGTH 1,
Field: XSEXF Female.
XSEXF TYPE C LENGTH 1,
Field: XSEXU Unknown.
XSEXU TYPE C LENGTH 1,
Field: RECORD.
RECORD TYPE RSARECORD,
END OF tys_SC_1.
TYPES:
BEGIN OF tys_TG_1,
InfoObject: 0GENDER Gender.
GENDER TYPE /BI0/OIGENDER,
END OF tys_TG_1.
$$ begin of global - insert your declaration only below this line -
... "insert your code here
$$ end of global - insert your declaration only before this line -
METHODS
compute_0GENDER
IMPORTING
request type rsrequest
datapackid type rsdatapid
SOURCE_FIELDS type tys_SC_1
EXPORTING
RESULT type tys_TG_1-GENDER
monitor type rstr_ty_t_monitor
RAISING
cx_rsrout_abort
cx_rsrout_skip_record
cx_rsrout_skip_val.
METHODS
invert_0GENDER
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
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: 0BPARTNER Business Partner.
BPARTNER TYPE /BI0/OIBPARTNER,
InfoObject: 0BP_ACTITL1 First Academic Title.
BP_ACTITL1 TYPE /BI0/OIBP_ACTITL1,
InfoObject: 0BP_ACTITL2 Second Academic Title.
BP_ACTITL2 TYPE /BI0/OIBP_ACTITL2,
InfoObject: 0BP_BTHNAME BP: Person's Name at Birth.
BP_BTHNAME TYPE /BI0/OIBP_BTHNAME,
InfoObject: 0BP_CAT Business Partner Category.
BP_CAT TYPE /BI0/OIBP_CAT,
InfoObject: 0BP_CONS Business Partner (Consolidated/Cleansing).
BP_CONS TYPE /BI0/OIBP_CONS,
InfoObject: 0BP_CONTACT BP: Contact Permission.
BP_CONTACT TYPE /BI0/OIBP_CONTACT,
InfoObject: 0BP_EXTERN BP Number in External System.
BP_EXTERN TYPE /BI0/OIBP_EXTERN,
InfoObject: 0BP_FSTNAME BP: Person's First Name.
BP_FSTNAME TYPE /BI0/OIBP_FSTNAME,
InfoObject: 0BP_GROUP Business Partner Grouping.
BP_GROUP TYPE /BI0/OIBP_GROUP,
InfoObject: 0BP_GRPNAM1 BP: Name 1 (Group).
BP_GRPNAM1 TYPE /BI0/OIBP_GRPNAM1,
InfoObject: 0BP_GRPNAM2 BP: Name 2 (Group).
BP_GRPNAM2 TYPE /BI0/OIBP_GRPNAM2,
InfoObject: 0BP_GRPTYPE BP: Group Type.
BP_GRPTYPE TYPE /BI0/OIBP_GRPTYPE,
InfoObject: 0BP_LSTNAME BP: Person's Surname.
BP_LSTNAME TYPE /BI0/OIBP_LSTNAME,
InfoObject: 0BP_MAR_STA BP: Marital Status.
BP_MAR_STA TYPE /BI0/OIBP_MAR_STA,
InfoObject: 0BP_MDLNAME BP: Person's Middle Name or Second First
*Name.
BP_MDLNAME TYPE /BI0/OIBP_MDLNAME,
InfoObject: 0BP_SECNAME BP: Person's Second Surname.
BP_SECNAME TYPE /BI0/OIBP_SECNAME,
InfoObject: 0CHANGEDBY Changed by.
CHANGEDBY TYPE /BI0/OICHANGEDBY,
InfoObject: 0CH_AT Time of Last Change.
CH_AT TYPE /BI0/OICH_AT,
InfoObject: 0CH_ON Last changed on.
CH_ON TYPE /BI0/OICH_ON,
InfoObject: 0CREATEDBY Name of person who created the object.
CREATEDBY TYPE /BI0/OICREATEDBY,
InfoObject: 0CREATEDON Date on which the record was created.
CREATEDON TYPE /BI0/OICREATEDON,
InfoObject: 0CREA_TIME Time Created.
CREA_TIME TYPE /BI0/OICREA_TIME,
InfoObject: 0GENDER Gender.
GENDER TYPE /BI0/OIGENDER,
InfoObject: 0LEGALFORM Legal Status of Organization.
LEGALFORM TYPE /BI0/OILEGALFORM,
InfoObject: 0NAME_ORG1 BP: Organization Name 1.
NAME_ORG1 TYPE /BI0/OINAME_ORG1,
InfoObject: 0NAME_ORG2 BP: Organization Name 2.
NAME_ORG2 TYPE /BI0/OINAME_ORG2,
InfoObject: 0NAME_ORG3 BP: Organization Name 3.
NAME_ORG3 TYPE /BI0/OINAME_ORG3,
InfoObject: 0NAME_ORG4 BP: Organization Name 4.
NAME_ORG4 TYPE /BI0/OINAME_ORG4,
InfoObject: 0NATION Nationality.
NATION TYPE /BI0/OINATION,
InfoObject: 0TITLE_SPPL Name Supplement, for example, Noble Title
TITLE_SPPL TYPE /BI0/OITITLE_SPPL,
InfoObject: 0BP_TYPE Partner:Partner Type.
BP_TYPE TYPE /BI0/OIBP_TYPE,
InfoObject: 0GN_PAR_SSY Source System of a Partner.
GN_PAR_SSY TYPE /BI0/OIGN_PAR_SSY,
InfoObject: 0LOGSYS Source System.
LOGSYS TYPE RSDLOGSYS,
InfoObject: 0RECORDMODE BW Delta Process: Record Mode.
RECORDMODE TYPE RODMUPDMOD,
InfoObject: 0BP_GUID GUID of Business Partner.
BP_GUID TYPE /BI0/OIBP_GUID,
InfoObject: 0BPDATEFROM GP Attributes Valid from.
BPDATEFROM TYPE /BI0/OIBPDATEFROM,
InfoObject: 0BPDATETO GP Attributes Valid to.
BPDATETO TYPE /BI0/OIBPDATETO,
Field: RECORD Data record number.
RECORD TYPE RSARECORD,
END OF tys_TG_1_full.
Additional declaration for transfer rule interface
DATA:
g_t_errorlog TYPE rssm_t_errorlog_int,
RECORD_ALL LIKE SY-TABIX.
global definitions from transfer rules
DATA: gs_cob_pro TYPE rsd_s_cob_pro,
gt_viobj TYPE rsd_t_viobj,
gs_viobj TYPE rsd_s_viobj.
DATA: l_s_errorlog TYPE rssm_s_errorlog_int,
l_text TYPE string.
FORM compute_BPDATEFROM
CHANGING
RESULT TYPE tys_TG_1_full-BPDATEFROM
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
INCLUDE rs_bct_bupa_form_valid_from.
ENDFORM. "BPDATEFROM
FORM compute_BPDATETO
CHANGING
RESULT TYPE tys_TG_1_full-BPDATETO
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
INCLUDE rs_bct_bupa_form_valid_to.
ENDFORM. "BPDATETO
FORM compute_GENDER
CHANGING
RESULT TYPE tys_TG_1_full-GENDER
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
INCLUDE rs_bct_bupa_form_gender.
ENDFORM. "GENDER
FORM compute_GN_PAR_SSY
CHANGING
RESULT TYPE tys_TG_1_full-GN_PAR_SSY
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
INCLUDE rs_bct_bupa_form_gn_par_ssy.
ENDFORM. "GN_PAR_SSY
$$ end of 2nd part global - insert your code only before this line *
CLASS routine IMPLEMENTATION
CLASS lcl_transform IMPLEMENTATION.
METHOD compute_0GENDER.
IMPORTING
request type rsrequest
datapackid type rsdatapid
SOURCE_FIELDS-XSEXM TYPE C LENGTH 000001
SOURCE_FIELDS-XSEXF TYPE C LENGTH 000001
SOURCE_FIELDS-XSEXU TYPE C LENGTH 000001
EXPORTING
RESULT type tys_TG_1-GENDER
DATA:
MONITOR_REC TYPE rsmonitor.
*$*$ begin of routine - insert your code only below this line *-*
Data:
l_s_error_log type rssm_s_errorlog_int,
l_subrc type sy-tabix,
l_abort type sy-tabix,
ls_monitor TYPE rsmonitor,
ls_monitor_recno TYPE rsmonitors.
REFRESH:
monitor,
monitor_recno.
Migrated transfer rule call
Perform compute_GENDER
CHANGING
RESULT
l_subrc
l_abort.
*-- Convert Messages in Transformation format
LOOP AT G_T_ERRORLOG INTO l_s_error_log.
move-CORRESPONDING l_s_error_log 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_0GENDER
Method invert_0GENDER
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_0GENDER.
$$ 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_0GENDER
ENDCLASS. "routine IMPLEMENTATION
let me know how to correct the above code.
thanksHi,
the field tran_structure is no more available. The name changed to source_fields. Additionally there is no datapak available. It is now source_fields_table. You might need to use field symbols to access the fields.
regards
Siggi -
Undue Syntax error in transformation routine
Hi,
A routine is reported to be incorrect (error RSTRAN 523) during the check of the transformation. However, a check on the source code in the editor returns no errors.
I've implemented the oss note 980548, but I still face the problem.
Do you have any idea of how to solve this issue ?
Thanks in advance !
DieuHi Dieu,
I had a problem related to a Transfer Roule for the selection of the same filed in Start Routine and single filed routine.
Check if you are obtaining two InfoObjects from the same field and check the corresponding routines.
Ciao.
Riccardo. -
Error while transporting Transformation: Syntax error in Start Routine
Hi Everyone,
I'm facing a strange problem during transporting one of the Business Content cubes from Dev. to Quality.
I'd activated the DSO 'Purchase Order Items (0PUR_O01)' and its entire data flow from the 4 datasources 2LIS_02_CGR, 2LIS_02_SCN, 2LIS_02_SGR, and 2LIS_02_ITM from BC. Then I migrated the Transfer/Update rules to transformations and the DataSources to BI7 DataSource. So far so good. The migration was successful and all the objects were activated.
Now when I transport the same to Quality, the import fails with return code 8 and the error message says:
'Start of the after-import method RS_TRFN_AFTER_IMPORT for object type(s) TRFN (Activation Mode)'
'Start Routine: Syntax error in routine'
I verified that the transformation where the error orrured was the one from InfoSource Z2LIS_02_ITM to DSO 0PUR_O01. I went and checked the start routine and it did indeed have a syntax error:
'In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter SOURCE_PACKAGE" is incompatible with the formal parameter DATA_PACKAGE". '
But when I check in the Dev. system, there is no syntax error for the same routine. Later, I tried to transport only the said transformation by re-activating it in Dev, and again I got the same error.
I have no idea why I'm getting a syntax error in the start routine when there are non in the Dev. system. Also none of the coding is customised, it was only the BC code, migrated to a transformation.
Any suggestions on the steps I could take to transport the transformation to my quality system?
Thanks,
RamHi Ajay, Shanthi, svu and Ray
I do indeed have a start routine in my transformation and it was migrated from a 3.x update rule to a BI 7 transformation routine.
The migration was successful and the Start Routine has NO syntax errors in the start routine in the Dev. system. I only encounter the error while transporting it to the Quality system. I cannot modify the code in the Quality system because it is non-changelable and there is no point in trying to change the code in Dev. because there are no errors over there.
I've also made sure that I've transported all the necessary objects required by the transformations to quality. The routine does not perform a lookup, it simply deletes some records from the data package based on the processkey value (which is itself present in the data package). -
Hello All,
I am trying to activate a couple transformations for cubes in purchasing. I am getting the error in start routine. I checked the start routine.
E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
"SOURCE_PACKAGE" is incompatible with the formal parameter
"DATA_PACKAGE"
I did see a couple threads in sdn regarding this. But wanted to make sure if those thing sapplyin my case. I am new to SAP BW hence want to make sure before touching the code.
Can someone help me resolve this soon?
Thanks,
Dee.Hello Rakesh,
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
METHODS
inverse_start_routine
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
ENDCLASS. "routine DEFINITION
$$ begin of 2nd part global - insert your code only below this line *
*The above part is in gray and i cannot change it.
MONITOR_RECNO.
Runtime attributs
SOURCE_SYSTEM = p_r_request->get_logsys( ).
Migrated update rule call
Perform routine_9998
TABLES
SOURCE_PACKAGE
CHANGING
l_abort.
*-- Convert Messages in Transformation format
LOOP AT MONITOR_RECNO INTO ls_monitor_recno.
move-CORRESPONDING ls_monitor_recno to MONITOR_REC.
append monitor_rec to MONITOR.
ENDLOOP.
LOOP AT MONITOR INTO ls_monitor.
move-CORRESPONDING ls_monitor to MONITOR_REC.
append monitor_rec to MONITOR.
ENDLOOP.
IF l_abort <> 0.
RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
ENDIF.
I dont know abap..can you please guide me with this -
Calling a function module from within a transformation routine
I created a routine within a transformation and experience the following weird behavior now:
When I call a function module within that routine, the load fails with the following error message:
Exceptions in Substep: Rules
When I click on the button next to this text, it point me to my function module call.
What I do not understand is, that the following two scenarios work fine:
- Having the same function call (with fake values) in a plain ABAP program works beautilfully
- If I copy the content of my function module directly into my transformation routine, everything works fine as well
I am now wondering whether the routine does not "see" the function module I am calling. The module resides in a different package. Is that a problem? Do I have to include something first?
Here is the code that calls my FM (
CALL FUNCTION 'Z_CA_CONVERT_US_COST'
EXPORTING
PSOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC
PSOURCEUOM = SOURCE_FIELDS-BASE_UOM
PUSITM = SOURCE_FIELDS-/BIC/USITM
PTARGETUOM = PRODUCTION_UOM
IMPORTING
PTARGETVAL = RESULT
EXCEPTIONS
CONVERSION_NOT_MAINTAINED = 1
PARTNO_NOT_FOUND = 2
OTHERS = 3.
Thanks a lot for your help. Points will be assigned.
DennisGood catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
DATA:
SOURCEVAL TYPE /BIC/OIINVQTY,
SOURCEUOM TYPE /BIC/OIUSUOM,
USITM TYPE /BIC/OIUSITM,
TARGETUOM TYPE /BIC/OIUSUOM,
CONVERTED_COST TYPE /BIC/OIINVQTY.
DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
" get the Production UOM
SELECT SINGLE I~/BIC/USPRDUOM
FROM /BIC/PUSITM AS I
INTO PRODUCTION_UOM
WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
IF ( SY-SUBRC = 4 ). " no records found
"RAISE PARTNO_NOT_FOUND.
RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
ENDIF.
" load the parameters
SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
USITM = SOURCE_FIELDS-/BIC/USITM.
" then you can call the FM
CALL FUNCTION 'Z_CA_CONVERT_US_COST'
EXPORTING
PSOURCEVAL = SOURCEVAL
PSOURCEUOM = SOURCEUOM
PUSITM = USITM
PTARGETUOM = PRODUCTION_UOM
IMPORTING
PTARGETVAL = CONVERTED_COST
EXCEPTIONS
CONVERSION_NOT_MAINTAINED = 1
PARTNO_NOT_FOUND = 2
OTHERS = 3.
" ... [do the rest]
Thanks for your help,
Dennis -
Help in transformation routine
I have to put an indicator for delivery block in transformation routine.
Logic: if headed delivery block 'LIFSK' is not blank, result is 'X'.
Here is my code which is not working:
IF SOURCE_FIELDS-LIFSK NE ''.
RESULT = 'X'.
ENDIF.
But this code is not doing anything. I tired using 'test' function in transformation, it gives abap dump.
What is the problem. Code is in right place in transformation routine.
A similar code for item level block is working:
More details:
$$ begin of routine - insert your code only below this line -
... "insert your code here
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
raise exception type CX_RSROUT_ABORT.
... "to skip a record
raise exception type CX_RSROUT_SKIP_RECORD.
... "to clear target fields
raise exception type CX_RSROUT_SKIP_VAL.
IF SOURCE_FIELDS-ZZ_LIFSP ne ''.
RESULT = 'X'.
endif.
$$ end of routine - insert your code only before this line -
ENDMETHOD. "compute_ZDELIBLK
Thanks
Jeff
Edited by: Jeff Edwards on Aug 17, 2008 10:34 PMNo luck.
Error analysis
The following checkpoint group was used: "No checkpoint group specified"
If in the ASSERT statement the addition FIELDS was used, you can find
the content of the first 8 specified fields in the following overview:
" (not used) "
" (not used) "
" (not used) "
" (not used) "
" (not used) "
" (not used) "
" (not used) "
" (not used) "
ST22 / ABAP Editor :
*-- Get field name from source field with extern posit.
READ TABLE i_t_seg_source ASSIGNING <ls_s_seg_source>
WITH KEY segid = i_segid.
ASSERT sy-subrc = 0.
IF sy-subrc = 0.
READ TABLE <ls_s_seg_source>-t_field ASSIGNING <ls_s_field>
WITH KEY position = l_posit_source_ex.
> ASSERT sy-subrc = 0.
ENDIF.
*-- r_s_parameter-param_id has to be set out side due to type inheritance of RuleStepMapping
CONCATENATE '<' <ls_s_seg>-y__nm '>' INTO
c_s_connector-s__nm.
c_s_connector-f__nm = <ls_s_field>-fieldname.
ENDMETHOD. -
Table Declaration in Transformation Routine
Hi all,
I have declared a table in transformation routine as follows :
DATA : BEGIN OF VACATIONS OCCURS 0,
DATE TYPE D,
END OF VACATIONS.
System is giving following error on this :
' E:Tables with headers are no longer supported in the OO context.'
What should I do now?
Regards,
Aisha Ishrat
ICI Pakistan Ltd.Hi Al,
Let me explain here ... because you are doing what is being told to do without actually understanding your purpose. Let me take a scenario. You want to read a database table for sales orders populate it into the internal table. Then you wnat to loop at the internal table you populated and print the output. For this what you need is an internal table where your data will be stored - simply put its a 2 dimentional array. so your data once put into the internal table would look like:
Sales_Order Sold_To_Party
1 1
2 3
3 5
4 1
Now what you do is read it - which means you are going to read one line at a time, which means a structure not an internal table, which was the purpose of the header line. but since header lines are not supported you need a different work area (structure). So that when you read the first line your structure contains as follows:
1 1
When you read the second line your structure or work area contains the second line:
2 3
so on.....
From the explaination above you must be clear that you need an internal table to store data temporarily and a structure to manipulate a single record. Now the cod would look like:
DATA: it_vbak type table of VBAK.
DATA: wa_vbak type vbak.
Notice above that one is using a "table" while declaring and the other is not.
Select * from VBAK into table it_vbak.
loop at it_vbak into wa_vbak.
note above that you are looping at the internal table and populating one record
into the work area.
write:/ wa_vbak-vbeln.
endloop.
Hope this helps. Ask if you have any more concerns.
Best regards,
Kazmi -
CX_SY_NO_HANDLER triggered when call FM in Transformation Routine in BI
Hi,
Currently we are encountering an error whereby the Exception 'CX_SY_NO_HANDLER' will be triggered whenever we call a Function Module inside a Transformation Routine in BI.
Previously, this FM was a Custom FM, but even after changing to a standard FM this error still happens.
The process does not even enter into the FM, but immediately jumps to a 'Try - Catch' block of standard SAP, with the message "an exception (CX_SY_NO_HANDLER) occured".
Hence, we need to confirm:
does SAP/BI allow calling an FM inside a Transformation Routine?
if yes to above, how do we avoid encountering this error when calling a FM inside a Transformation Routine.
Your help is very much appreciated.
Thanks you.Yes, you can call a FM from function module.
Make sure your import and export parameters are of same type as defined in FM when passing values to FM from transformation.
For example:
in function module
xyz type i.
transformation
abc type char.
CALL FUNCTION 'dsjfh'
EXPORT
xyz = abc.
Regards,
San! -
How to know infopackage request ID in transformation routine ?
Hi All,
I'm looking for the ABAP code to know the infopackage request ID in transformation start or end routine
I can see this ID when I clic on "manage" on a PSA (looks like for instance REQU_D706H24SFFUIGNKMQMPPAIJLM)
I need it in transformation routine
Thanks for your help
Sebastien LepeltierSorry Sat but again with the code :
field-symbols: <l_requnr> type any.
data: l_requnr_fieldnm type string value 'l_requnr'.
assign (l_requnr_fieldnm) to <l_requnr>.
I have this error message in debug mode : Field symbol <L_REQUNR> is not yet assigned
Thanks Joe for the answer but in
IMPORTING
request TYPE rsrequest
datapackid TYPE rsdatapid
request and datapackid are filled with information of the current DTP not infopackage source
Sebastien -
Test for Permitted Characters in Transformation Routine
Hello,
Background: There is a data quality issue when loading 3rd party data to BW, which cannot be solved at source. Therefore, initial transformation rules when loading to data warehouse level DSO, should identify and deal with error values.
Possible Solution: Test validity of value within transformation routine via a custom function module.
Execution: Function module would require to check lowercase character handling of target InfoObject (RSDCHABAS-LOWERCASE) and scan source value against permitted character set (RSKC).
Questions: How can the permitted list of characters be returned within transformation routine? Is there an available delivered function module to handle accessing permitted character set?
I would appreciate any answers to the above questions or alternative suggestions to the above strategy.
Thanks -
Brendan.There is a function module "RSKC_ALLOWED_CHAR_GET". Use SE37 to check it out.
-
Coding in transformation routine
Hi,
As per the design there will be two DSO in the data transformtion layer. One is right optimized DSO (for correct data) and another with a ERROR DSO which will contain the erronious records.
In the transformation routine if the check fails the record needs to go to the error dso and a messge need to be updated in the monitor.
Please let me know how to code this. Whether to do this by raising any exception and setting the return code.. or any other mechanism is there.
thanks,
Jugal.As per the reqirement there are two DSO, One is for the correct data and the other one for the error records, which will be send to business later for reconcilation. In the record master data attribute will also be there. For certain condition we need to update/ insert record into master data table as well. I found some function modules to update the master data.
1 RSBCTSRM_UPDATE_MASTER_DATA
2 RSDMD_WRITE_ATTRIBUTES_TEXTS (this is working fine).
Question 2: Let me know is there any way to update the error DSO from error stack through configuration or through coding.
Edited by: jugal behera on Feb 5, 2008 11:50 PM -
Problem to call a easy function in a transformation routine
Hi,
I wanted to convert a string ("12") to an integer (12) in my transformation routine.
Here the code:
DATA: vaca_number TYPE i.
CALL FUNCTION u2019conversion_exit_alpha_outputu2019
EXPORTING
input = source_fields-vaca
IMPORTING
output = vaca_number.
IF source_fields-smocker CS 'Y'.
result = vaca_number * 120.
ELSEIF source_fields-smocker CS 'N'.
result = vaca_number * 240.
ELSE.
monitor_rec-msgid = 'ZMESSAGE'.
monitor_rec-msgty = 'E'.
monitor_rec-msgno = '001'.
monitor_rec-msgv1 = 'ERROR SMOCKER UNKNOWN FOR PPS'.
monitor_rec-msgv2 = source_fields-smocker.
APPEND monitor_rec TO monitor.
RAISE EXCEPTION TYPE cx_rsrout_abort.
ENDIF.
When i check, i have the following error:
E:"RS_C_ICON_VERSION-" expected, not "#CONVERSION_"
Have you an idea ?
Thanks for your help.
Rodolphe.That's one problem. But if you look at the interface for the FM, it requires a character value. The following, using an integer, will dump. Try it and see. The only way to make it work is to define i_2 as a character, not integer.
PROGRAM zz_temp.
DATA:
c_1 TYPE c VALUE '1',
i_2 TYPE i.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = c_1
IMPORTING
output = i_2. -
Transformation routine on 2 different targets fields
Hi gurus,
I have been trying do some ABAP transformation routines, I did 1 and it was good works fine, then I tried to create another transformation routine on a different target field of the same DSO, and for some reason what I did on the global declaration on the other transformation is in this transformation and if I do a change in the second transformation it shows in the first transformation, other thing is that in the second transformation anything works, I got errors for everything and are not very specific. I may be skipping some basic steps; maybe I canu2019t create 2 transformation routines in the same transformation?
ThanksHi,
There can be just 1 start routine.
These are execute once. Also the declarations done in the global section remain visible in all the transformation routines.
You can write multiple transformation(field level) routines.
-Mayuri
Maybe you are looking for
-
What can i do? I have windows 8
-
How to edit text in MS Word HEADER using bookmarks?
I've been using the ActiveX calls to edit text in Word docs for a while. I assumed there was no trick to doing it in the header of a Word doc, but there seems to be no way to get into the header via LabView ActiveX calls. Regretably, Word also makes
-
Is there a simple way to merge mp3 files into one mp3 file:
Is there a way to simply merge multiple mp3s into one? I have audacity; however, that program becomes cumbersome when merging multiple files. My thanks to anyone for help on this one.
-
We r using Standalore Scenario & trying to implement Pcard. We have made all the settings in SPRO settings and created Pcard service provider in R/3 Backend. While shopping the Payment option Pcard is not enabling in the Drop down list. Any other set
-
Function module to fetch account details
Hi Experts, Is there any function module to get the account details for the given account name(name_org1) as input Thanks, Saru